hexsha
string | size
int64 | ext
string | lang
string | max_stars_repo_path
string | max_stars_repo_name
string | max_stars_repo_head_hexsha
string | max_stars_repo_licenses
list | max_stars_count
int64 | max_stars_repo_stars_event_min_datetime
string | max_stars_repo_stars_event_max_datetime
string | max_issues_repo_path
string | max_issues_repo_name
string | max_issues_repo_head_hexsha
string | max_issues_repo_licenses
list | max_issues_count
int64 | max_issues_repo_issues_event_min_datetime
string | max_issues_repo_issues_event_max_datetime
string | max_forks_repo_path
string | max_forks_repo_name
string | max_forks_repo_head_hexsha
string | max_forks_repo_licenses
list | max_forks_count
int64 | max_forks_repo_forks_event_min_datetime
string | max_forks_repo_forks_event_max_datetime
string | content
string | avg_line_length
float64 | max_line_length
int64 | alphanum_fraction
float64 | qsc_code_num_words_quality_signal
int64 | qsc_code_num_chars_quality_signal
float64 | qsc_code_mean_word_length_quality_signal
float64 | qsc_code_frac_words_unique_quality_signal
float64 | qsc_code_frac_chars_top_2grams_quality_signal
float64 | qsc_code_frac_chars_top_3grams_quality_signal
float64 | qsc_code_frac_chars_top_4grams_quality_signal
float64 | qsc_code_frac_chars_dupe_5grams_quality_signal
float64 | qsc_code_frac_chars_dupe_6grams_quality_signal
float64 | qsc_code_frac_chars_dupe_7grams_quality_signal
float64 | qsc_code_frac_chars_dupe_8grams_quality_signal
float64 | qsc_code_frac_chars_dupe_9grams_quality_signal
float64 | qsc_code_frac_chars_dupe_10grams_quality_signal
float64 | qsc_code_frac_chars_replacement_symbols_quality_signal
float64 | qsc_code_frac_chars_digital_quality_signal
float64 | qsc_code_frac_chars_whitespace_quality_signal
float64 | qsc_code_size_file_byte_quality_signal
float64 | qsc_code_num_lines_quality_signal
float64 | qsc_code_num_chars_line_max_quality_signal
float64 | qsc_code_num_chars_line_mean_quality_signal
float64 | qsc_code_frac_chars_alphabet_quality_signal
float64 | qsc_code_frac_chars_comments_quality_signal
float64 | qsc_code_cate_xml_start_quality_signal
float64 | qsc_code_frac_lines_dupe_lines_quality_signal
float64 | qsc_code_cate_autogen_quality_signal
float64 | qsc_code_frac_lines_long_string_quality_signal
float64 | qsc_code_frac_chars_string_length_quality_signal
float64 | qsc_code_frac_chars_long_word_length_quality_signal
float64 | qsc_code_frac_lines_string_concat_quality_signal
float64 | qsc_code_cate_encoded_data_quality_signal
float64 | qsc_code_frac_chars_hex_words_quality_signal
float64 | qsc_code_frac_lines_prompt_comments_quality_signal
float64 | qsc_code_frac_lines_assert_quality_signal
float64 | qsc_codepython_cate_ast_quality_signal
float64 | qsc_codepython_frac_lines_func_ratio_quality_signal
float64 | qsc_codepython_cate_var_zero_quality_signal
bool | qsc_codepython_frac_lines_pass_quality_signal
float64 | qsc_codepython_frac_lines_import_quality_signal
float64 | qsc_codepython_frac_lines_simplefunc_quality_signal
float64 | qsc_codepython_score_lines_no_logic_quality_signal
float64 | qsc_codepython_frac_lines_print_quality_signal
float64 | qsc_code_num_words
int64 | qsc_code_num_chars
int64 | qsc_code_mean_word_length
int64 | qsc_code_frac_words_unique
null | qsc_code_frac_chars_top_2grams
int64 | qsc_code_frac_chars_top_3grams
int64 | qsc_code_frac_chars_top_4grams
int64 | qsc_code_frac_chars_dupe_5grams
int64 | qsc_code_frac_chars_dupe_6grams
int64 | qsc_code_frac_chars_dupe_7grams
int64 | qsc_code_frac_chars_dupe_8grams
int64 | qsc_code_frac_chars_dupe_9grams
int64 | qsc_code_frac_chars_dupe_10grams
int64 | qsc_code_frac_chars_replacement_symbols
int64 | qsc_code_frac_chars_digital
int64 | qsc_code_frac_chars_whitespace
int64 | qsc_code_size_file_byte
int64 | qsc_code_num_lines
int64 | qsc_code_num_chars_line_max
int64 | qsc_code_num_chars_line_mean
int64 | qsc_code_frac_chars_alphabet
int64 | qsc_code_frac_chars_comments
int64 | qsc_code_cate_xml_start
int64 | qsc_code_frac_lines_dupe_lines
int64 | qsc_code_cate_autogen
int64 | qsc_code_frac_lines_long_string
int64 | qsc_code_frac_chars_string_length
int64 | qsc_code_frac_chars_long_word_length
int64 | qsc_code_frac_lines_string_concat
null | qsc_code_cate_encoded_data
int64 | qsc_code_frac_chars_hex_words
int64 | qsc_code_frac_lines_prompt_comments
int64 | qsc_code_frac_lines_assert
int64 | qsc_codepython_cate_ast
int64 | qsc_codepython_frac_lines_func_ratio
int64 | qsc_codepython_cate_var_zero
int64 | qsc_codepython_frac_lines_pass
int64 | qsc_codepython_frac_lines_import
int64 | qsc_codepython_frac_lines_simplefunc
int64 | qsc_codepython_score_lines_no_logic
int64 | qsc_codepython_frac_lines_print
int64 | effective
string | hits
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
12aa7974eda86efbe06ee210f79ae371f0ae6d2b
| 1,900
|
py
|
Python
|
ecommerce/fornecedor/models.py
|
lfbtessarolli/tcc_puc
|
3cbdebc5064599866a09e4518614908266dd2287
|
[
"MIT"
] | null | null | null |
ecommerce/fornecedor/models.py
|
lfbtessarolli/tcc_puc
|
3cbdebc5064599866a09e4518614908266dd2287
|
[
"MIT"
] | 3
|
2020-02-11T23:45:17.000Z
|
2021-06-10T21:10:18.000Z
|
ecommerce/fornecedor/models.py
|
lfbtessarolli/tcc_puc
|
3cbdebc5064599866a09e4518614908266dd2287
|
[
"MIT"
] | null | null | null |
from django.db import models
from django.contrib.auth.models import User
class Fornecedor(models.Model):
nome = models.CharField(max_length=200)
categoria = models.TextField(default="Categoria")
fornecedor = models.ForeignKey(User, on_delete=models.CASCADE, default=1)
preco = models.DecimalField(max_digits=10, decimal_places=2)
descricao = models.TextField(default="Descriรงรฃo do Produto")
atributos = models.FileField(upload_to='data/json') #SQLite
imagem = models.FileField(upload_to='data/img') #SQLite
# atributos = models.JSONField() #PostgreSQL
# imagem = models.ImageField() #Postgresql
class Meta:
verbose_name_plural = "Fornecedores"
class NovoFornecedor(models.Model):
nome = models.CharField(max_length=200)
categoria = models.TextField(default="Categoria")
fornecedor = models.ForeignKey(User, on_delete=models.CASCADE, default=1)
preco = models.DecimalField(max_digits=10, decimal_places=2)
descricao = models.TextField(default="Descriรงรฃo do Produto")
atributos = models.FileField(upload_to='data/json') #SQLite
imagem = models.FileField(upload_to='data/img') #SQLite
# atributos = models.JSONField() #PostgreSQL
# imagem = models.ImageField() #Postgresql
class Meta:
verbose_name_plural = "NovosFornecedores"
class AgroFornecedor(models.Model):
nome = models.CharField(max_length=200)
categoria = models.TextField(default="Categoria")
fornecedor = models.ForeignKey(User, on_delete=models.CASCADE, default=1)
preco = models.DecimalField(max_digits=10, decimal_places=2)
descricao = models.TextField(default="Descriรงรฃo do Produto")
atributos = models.FileField(upload_to='data/json') #SQLite
imagem = models.FileField(upload_to='data/img') #SQLite
# atributos = models.JSONField() #PostgreSQL
# imagem = models.ImageField() #Postgresql
class Meta:
verbose_name_plural = "AgroFornecedores"
| 43.181818
| 74
| 0.756316
| 225
| 1,900
| 6.28
| 0.248889
| 0.063694
| 0.093418
| 0.097665
| 0.887473
| 0.887473
| 0.887473
| 0.887473
| 0.887473
| 0.887473
| 0
| 0.012651
| 0.126316
| 1,900
| 43
| 75
| 44.186047
| 0.838554
| 0.170526
| 0
| 0.75
| 0
| 0
| 0.117458
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.0625
| 0
| 0.90625
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 8
|
12b13986eec509017c071293c5c4f1fbd4507fd4
| 137
|
py
|
Python
|
notescribe/views/about.py
|
SatvikR/notescribe
|
8ac46297407065a920595768410be18da14d6256
|
[
"Apache-2.0"
] | null | null | null |
notescribe/views/about.py
|
SatvikR/notescribe
|
8ac46297407065a920595768410be18da14d6256
|
[
"Apache-2.0"
] | null | null | null |
notescribe/views/about.py
|
SatvikR/notescribe
|
8ac46297407065a920595768410be18da14d6256
|
[
"Apache-2.0"
] | null | null | null |
from notescribe import app
from flask import render_template
@app.route('/about')
def about():
return render_template('about.html')
| 19.571429
| 40
| 0.759124
| 19
| 137
| 5.368421
| 0.631579
| 0.27451
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.131387
| 137
| 6
| 41
| 22.833333
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0.116788
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| true
| 0
| 0.4
| 0.2
| 0.8
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 1
| 1
| 0
|
0
| 7
|
12c203293c47eb9de83fcab654b9330cdfdfe1b9
| 1,953
|
py
|
Python
|
firstApp/migrations/0007_alter_registration_address_alter_registration_city_and_more.py
|
sayan706/SchoolWebsite
|
8a3faea4582e3c15f0d33347e6c0793a78481c52
|
[
"MIT"
] | null | null | null |
firstApp/migrations/0007_alter_registration_address_alter_registration_city_and_more.py
|
sayan706/SchoolWebsite
|
8a3faea4582e3c15f0d33347e6c0793a78481c52
|
[
"MIT"
] | null | null | null |
firstApp/migrations/0007_alter_registration_address_alter_registration_city_and_more.py
|
sayan706/SchoolWebsite
|
8a3faea4582e3c15f0d33347e6c0793a78481c52
|
[
"MIT"
] | null | null | null |
# Generated by Django 4.0.1 on 2022-01-10 09:31
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('firstApp', '0006_alter_registration_degree'),
]
operations = [
migrations.AlterField(
model_name='registration',
name='address',
field=models.CharField(max_length=122, null=True),
),
migrations.AlterField(
model_name='registration',
name='city',
field=models.CharField(max_length=122, null=True),
),
migrations.AlterField(
model_name='registration',
name='email',
field=models.CharField(max_length=122, null=True),
),
migrations.AlterField(
model_name='registration',
name='gender',
field=models.CharField(max_length=12, null=True),
),
migrations.AlterField(
model_name='registration',
name='lastname',
field=models.CharField(max_length=122, null=True),
),
migrations.AlterField(
model_name='registration',
name='middlename',
field=models.CharField(max_length=122, null=True),
),
migrations.AlterField(
model_name='registration',
name='passwrd',
field=models.CharField(max_length=12, null=True),
),
migrations.AlterField(
model_name='registration',
name='phone',
field=models.CharField(max_length=12, null=True),
),
migrations.AlterField(
model_name='registration',
name='pincode',
field=models.CharField(max_length=12, null=True),
),
migrations.AlterField(
model_name='registration',
name='semester',
field=models.CharField(max_length=12, null=True),
),
]
| 30.515625
| 62
| 0.559652
| 179
| 1,953
| 5.977654
| 0.26257
| 0.186916
| 0.233645
| 0.271028
| 0.78972
| 0.78972
| 0.747664
| 0.747664
| 0.711215
| 0.711215
| 0
| 0.033359
| 0.324629
| 1,953
| 63
| 63
| 31
| 0.777862
| 0.023041
| 0
| 0.701754
| 1
| 0
| 0.118048
| 0.01574
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.017544
| 0.017544
| 0
| 0.070175
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 9
|
12e918a3568636e0e38899f10ca31b893ac17de9
| 131
|
py
|
Python
|
squash/admin.py
|
craigotis/Squash
|
f2b487bf729808c33594772414732d9679e49066
|
[
"MIT"
] | 1
|
2017-11-20T02:38:25.000Z
|
2017-11-20T02:38:25.000Z
|
squash/admin.py
|
craigotis/Squash
|
f2b487bf729808c33594772414732d9679e49066
|
[
"MIT"
] | null | null | null |
squash/admin.py
|
craigotis/Squash
|
f2b487bf729808c33594772414732d9679e49066
|
[
"MIT"
] | null | null | null |
from squash.models import Project, Version, Issue
from django.contrib import admin
admin.site.register({Project, Version, Issue})
| 26.2
| 49
| 0.801527
| 18
| 131
| 5.833333
| 0.666667
| 0.266667
| 0.361905
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.10687
| 131
| 4
| 50
| 32.75
| 0.897436
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 7
|
12f93072bcda5f3c50fd5472639fc392e36126ac
| 4,611
|
py
|
Python
|
simpleml/linear_regression.py
|
lautarodc/INVAP_disw_sphinx
|
8b2f9266ac79b88d0cad2a4c6f2c0f07f82e6be6
|
[
"MIT"
] | null | null | null |
simpleml/linear_regression.py
|
lautarodc/INVAP_disw_sphinx
|
8b2f9266ac79b88d0cad2a4c6f2c0f07f82e6be6
|
[
"MIT"
] | null | null | null |
simpleml/linear_regression.py
|
lautarodc/INVAP_disw_sphinx
|
8b2f9266ac79b88d0cad2a4c6f2c0f07f82e6be6
|
[
"MIT"
] | null | null | null |
import numpy as np
from abc import ABC
class BaseModel(ABC):
"""
Abstract Model Class used as interface of all regression models.
:param model: Stored model data (NumPy array in most cases)
:type model: np.ndarray
:param data: input data for training or testing
:type data: np.ndarray
:param labels: labels of the input data for training
:type labels: np.ndarray
"""
def __init__(self):
self.model = None
def fit(self, data: np.ndarray, labels: np.ndarray):
"""
:param data: input data for training
:type data: np.ndarray
:param labels: labels of the input data for training
:type labels: np.ndarray
"""
pass
def predict(self, data: np.ndarray):
"""
:param data: input data for testing
:type data: np.ndarray
:return: predicted data
:rtype: np.ndarray
"""
pass
class ConstantModel(BaseModel):
"""
Constant model class that uses the average of each feature as prediction.
:param model: Stored model data (NumPy array in most cases)
:type model: np.ndarray
:param data: input data for training or testing
:type data: np.ndarray
:param labels: labels of the input data for training
:type labels: np.ndarray
"""
def fit(self, data: np.ndarray, labels: np.ndarray) -> None:
"""
Method for fitting the training data and determining and storing the model parameters. In this case
the model returns always the data average.
:param data: input data for training
:type data: np.ndarray
:param labels: labels of the input data for training
:type labels: np.ndarray
:return: None
"""
w = labels.mean()
self.model = w
def predict(self, data: np.ndarray) -> np.ndarray:
"""
Given the input data it returns the predicted output for each input point using the model, in this case
the average.
:param data: input data for testing
:type data: np.ndarray
:return: predicted data
:rtype: np.ndarray
"""
return np.ones(len(data)) * self.model
class LinearRegression(BaseModel):
"""
Linear regression model class that uses the following model for predictions:
.. math::
y = \\omega*X
"""
def fit(self, data: np.ndarray, labels: np.ndarray) -> None:
"""
Method for fitting the training data and determining and storing the model parameters :math:`\\omega`.
:param data: input data for training
:type data: np.ndarray
:param labels: labels of the input data for training
:type labels: np.ndarray
:return: None
"""
if len(data.shape) == 1:
w = data.T.dot(labels) / data.T.dot(data)
else:
w = np.linalg.inv(data.T.dot(data)).dot(data.T).dot(labels)
self.model = w
def predict(self, data: np.ndarray) -> np.ndarray:
"""
Given the input data it returns the predicted output for each input point using the model, in this case:
.. math::
y = \\omega*X
:param data: input data for testing
:type data: np.ndarray
:return: predicted data
:rtype: np.ndarray
"""
return self.model * data
class LinearRegressionWithB(BaseModel):
"""
Affine regression model class that uses the following model for predictions:
.. math::
y = \\omega*X + b
"""
def fit(self, data: np.ndarray, labels: np.ndarray) -> None:
"""
Method for fitting the training data and determining and storing the model parameters :math:`\\omega` and b.
:param data: input data for training
:type data: np.ndarray
:param labels: labels of the input data for training
:type labels: np.ndarray
:return: None
"""
x_expanded = np.vstack((data, np.ones(len(data)))).T
w = np.linalg.inv(x_expanded.T.dot(x_expanded)).dot(x_expanded.T).dot(labels)
self.model = w
def predict(self, data: np.ndarray) -> np.ndarray:
"""
Given the input data it returns the predicted output for each input point using the model, in this case:
.. math::
y = \\omega*X + b
:param data: input data for testing
:type data: np.ndarray
:return: predicted data
:rtype: np.ndarray
"""
x_expanded = np.vstack((data, np.ones(len(data)))).T
return x_expanded.dot(self.model)
| 28.81875
| 116
| 0.602472
| 606
| 4,611
| 4.567657
| 0.148515
| 0.120303
| 0.084538
| 0.086705
| 0.813945
| 0.805997
| 0.793714
| 0.790462
| 0.790462
| 0.776734
| 0
| 0.000311
| 0.30167
| 4,611
| 159
| 117
| 29
| 0.859317
| 0.556712
| 0
| 0.40625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.28125
| false
| 0.0625
| 0.0625
| 0
| 0.5625
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 9
|
4201f8b63ff7900b5c466a4178e82885df7a3702
| 14,686
|
py
|
Python
|
app/src/main/assets/code/matatabot/motion.py
|
tongjinlv/py_and
|
a069336c47dd233648fbbadee7275ef188696a44
|
[
"Apache-2.0"
] | null | null | null |
app/src/main/assets/code/matatabot/motion.py
|
tongjinlv/py_and
|
a069336c47dd233648fbbadee7275ef188696a44
|
[
"Apache-2.0"
] | null | null | null |
app/src/main/assets/code/matatabot/motion.py
|
tongjinlv/py_and
|
a069336c47dd233648fbbadee7275ef188696a44
|
[
"Apache-2.0"
] | null | null | null |
import sys
import math
import random
class motion:
def __init__(self,call):
self.call=call
def forward_step(self,step):
data = [0x10,0x01,0x00,0x00]
mm=100
data[2]=mm//256
data[3]=mm%256
for i in range(0, step):
self.call.blewrite(data)
self.call.blewait(0x88)
def forward(self,step):
data = [0x10,0x01,0x00,0x00]
mm=None
if isinstance(step,int):
mm=round(step)
mm=mm*10
elif isinstance(step,float):
mm=round(step)
mm=mm*10
elif isinstance(step,str):
if(step=="step_1"):
self.forward_step(1)
return
elif(step=="step_2"):
self.forward_step(2)
return
elif(step=="step_3"):
self.forward_step(3)
return
elif(step=="step_4"):
self.forward_step(4)
return
elif(step=="step_5"):
self.forward_step(5)
return
elif(step=="step_6"):
self.forward_step(6)
return
elif(step=="random_step"):
mm=random.randint(1,6)
self.forward_step(mm)
return
elif(step=="random"):
mm=random.randint(1,6)
mm=mm*100
if(mm==None):
pass
data[2]=mm//256
data[3]=mm%256
self.call.blewrite(data)
self.call.blewait(0x88)
def backward_step(self,step):
data = [0x10,0x02,0x00,0x00]
mm=100
data[2]=mm//256
data[3]=mm%256
for i in range(0, step):
self.call.blewrite(data)
self.call.blewait(0x88)
def backward(self,step):
data = [0x10,0x02,0x00,0x00]
mm=None
if isinstance(step,int):
mm=step
mm=mm*10
elif isinstance(step,float):
mm=round(step)
mm=mm*10
elif isinstance(step,str):
if(step=="step_1"):
self.backward_step(1)
return
elif(step=="step_2"):
self.backward_step(2)
return
elif(step=="step_3"):
self.backward_step(3)
return
elif(step=="step_4"):
self.backward_step(4)
return
elif(step=="step_5"):
self.backward_step(5)
return
elif(step=="step_6"):
self.backward_step(6)
return
elif(step=="random_step"):
mm=random.randint(1,6)
self.backward_step(mm)
return
elif(step=="random"):
mm=random.randint(1,6)
mm=mm*100
else:
mm=100
data[2]=mm//256
data[3]=mm%256
self.call.blewrite(data)
self.call.blewait(0x88)
def turn_left(self,angle):
data = [0x10,0x03,0x00,0x00]
mm=None
if isinstance(angle,int):
mm=angle
elif isinstance(angle,float):
mm=round(angle)
elif isinstance(angle,str):
if(angle=="random"):
mm=random.randint(30,180)
elif(angle=="30degree"):
mm=30
elif(angle=="36degree"):
mm=36
elif(angle=="45degree"):
mm=45
elif(angle=="60degree"):
mm=60
elif(angle=="72degree"):
mm=72
elif(angle=="90degree"):
mm=90
elif(angle=="108degree"):
mm=108
elif(angle=="120degree"):
mm=120
elif(angle=="135degree"):
mm=135
elif(angle=="145degree"):
mm=145
elif(angle=="150degree"):
mm=150
elif(angle=="180degree"):
mm=180
else:
mm=30
data[2]=mm//256
data[3]=mm%256
self.call.blewrite(data)
self.call.blewait()
def turn_right(self,angle:int):
data = [0x10,0x04,0x00,0x00]
mm=None
if isinstance(angle,int):
mm=angle
elif isinstance(angle,float):
mm=round(angle)
elif isinstance(angle,str):
if(angle=="random"):
mm=random.randint(30,180)
elif(angle=="30degree"):
mm=30
elif(angle=="36degree"):
mm=36
elif(angle=="45degree"):
mm=45
elif(angle=="60degree"):
mm=60
elif(angle=="72degree"):
mm=72
elif(angle=="90degree"):
mm=90
elif(angle=="108degree"):
mm=108
elif(angle=="120degree"):
mm=120
elif(angle=="135degree"):
mm=135
elif(angle=="145degree"):
mm=145
elif(angle=="150degree"):
mm=150
elif(angle=="180degree"):
mm=180
else:
mm=30
data[2]=mm//256
data[3]=mm%256
self.call.blewrite(data)
self.call.blewait()
def move_position(self,position):
#print(str(position))
if(float(position)>9999):
position=9999
if(float(position)<-9999):
position=-9999
position=position*10
position=round(position)
data = [0x10,0x01,0x00,0x00]
mm=None
if(position>0):
data[1]=0x01
if(position>1000):
position=1000
mm=position
else:
data[1]=0x02
if(position<-1000):
position=-1000
mm=0-position
data[2]=mm//256
data[3]=mm%256
self.call.blewrite(data)
self.call.blewait()
def move_angle(self,angle):
if(float(angle)>9999):
angle=9999
if(float(angle)<-9999):
angle=-9999
angle=round(angle)
data = [0x10,0x03,0x00,0x00]
mm=None
if(angle>0):
data[1]=0x04
if(angle>360):
angle=360
mm=angle
else:
data[1]=0x03
if(angle<-360):
angle=-360
mm=0-angle
data[2]=mm//256
data[3]=mm%256
self.call.blewrite(data)
self.call.blewait()
def move_speed(self,left_speed,right_speed):
left_s=0
right_s=0
data = [0x11,0x03,0x01,0x00,0x00,0x01,0x00,0x00]
if isinstance(left_speed,int):
left_s=144*left_speed/9.70
elif isinstance(left_speed,float):
left_s=144*left_speed/9.70
elif isinstance(left_speed,str):
if(left_speed=="gear_1"):
left_s=70
elif(left_speed=="gear_2"):
left_s=105
elif(left_speed=="gear_3"):
left_s=140
elif(left_speed=="gear_4"):
left_s=175
elif(left_speed=="gear_5"):
left_s=210
elif(left_speed=="gear_6"):
left_s=245
elif(left_speed=="inf"):
left_s=245
elif(left_speed=="gear_stop"):
left_s=0
elif(left_speed=="gear_random"):
a=random.randint(0,5)
left_s=70+35*a
elif(left_speed=="backgear_1"):
left_s=-70
elif(left_speed=="backgear_2"):
left_s=-105
elif(left_speed=="backgear_3"):
left_s=-140
elif(left_speed=="backgear_4"):
left_s=-175
elif(left_speed=="backgear_5"):
left_s=-175
elif(left_speed=="backgear_6"):
left_s=-210
elif(left_speed=="-inf"):
left_s=-210
elif(left_speed=="backgear_stop"):
left_s=0
elif(left_speed=="backgear_random"):
a=random.randint(0,5)
left_s=-70-35*a
if isinstance(right_speed,int):
right_s=144*right_speed/9.70
elif isinstance(right_speed,float):
right_s=144*right_speed/9.70
elif isinstance(right_speed,str):
if(right_speed=="gear_1"):
right_s=70
elif(right_speed=="gear_2"):
right_s=105
elif(right_speed=="gear_3"):
right_s=140
elif(right_speed=="gear_4"):
right_s=175
elif(right_speed=="gear_5"):
right_s=210
elif(right_speed=="gear_6"):
right_s=245
elif(right_speed=="inf"):
right_s=245
elif(right_speed=="gear_stop"):
right_s=0
elif(right_speed=="gear_random"):
a=random.randint(0,5)
right_s=70+35*a
elif(right_speed=="backgear_1"):
right_s=-70
elif(right_speed=="backgear_2"):
right_s=-105
elif(right_speed=="backgear_3"):
right_s=-140
elif(right_speed=="backgear_4"):
right_s=-175
elif(right_speed=="backgear_5"):
right_s=-175
elif(right_speed=="backgear_6"):
right_s=-210
elif(right_speed=="-inf"):
right_s=-210
elif(right_speed=="backgear_stop"):
right_s=0
elif(right_speed=="backgear_random"):
a=random.randint(0,5)
right_s=-70-35*a
if(left_s>0):
left_s=left_s
data[2]=0x01
else:
left_s=0-left_s
data[2]=0x02
if(right_s>0):
right_s=right_s
data[5]=0x01
else:
right_s=0-right_s
data[5]=0x02
left_s=round(left_s)
right_s=round(right_s)
data[3]=left_s//256
data[4]=left_s%256
data[6]=right_s//256
data[7]=right_s%256
self.call.blewrite(data)
def move_right_speed(self,right_speed):
right_s=0
data = [0x11,0x01,0x01,0x00,0x00]
if isinstance(right_speed,int):
right_s=144*right_speed/9.70
elif isinstance(right_speed,float):
right_s=144*right_speed/9.70
elif isinstance(right_speed,str):
if(right_speed=="gear_1"):
right_s=70
elif(right_speed=="gear_2"):
right_s=105
elif(right_speed=="gear_3"):
right_s=140
elif(right_speed=="gear_4"):
right_s=175
elif(right_speed=="gear_5"):
right_s=210
elif(right_speed=="gear_6"):
right_s=245
elif(right_speed=="inf"):
right_s=245
elif(right_speed=="gear_stop"):
right_s=0
elif(right_speed=="gear_random"):
a=random.randint(0,5)
right_s=70+35*a
elif(right_speed=="backgear_1"):
right_s=-70
elif(right_speed=="backgear_2"):
right_s=-105
elif(right_speed=="backgear_3"):
right_s=-140
elif(right_speed=="backgear_4"):
right_s=-175
elif(right_speed=="backgear_5"):
right_s=-175
elif(right_speed=="backgear_6"):
right_s=-210
elif(right_speed=="-inf"):
right_s=-210
elif(right_speed=="backgear_stop"):
right_s=0
elif(right_speed=="backgear_random"):
a=random.randint(0,5)
right_s=-70-35*a
if(right_s>0):
right_s=right_s
data[2]=0x01
else:
right_s=0-right_s
data[2]=0x02
right_s=round(right_s)
data[3]=right_s//256
data[4]=right_s%256
self.call.blewrite(data)
def move_left_speed(self,left_speed):
left_s=0
data = [0x11,0x02,0x01,0x00,0x00]
if isinstance(left_speed,int):
left_s=144*left_speed/9.70
elif isinstance(left_speed,float):
left_s=144*left_speed/9.70
elif isinstance(left_speed,str):
if(left_speed=="gear_1"):
left_s=70
elif(left_speed=="gear_2"):
left_s=105
elif(left_speed=="gear_3"):
left_s=140
elif(left_speed=="gear_4"):
left_s=175
elif(left_speed=="gear_5"):
left_s=210
elif(left_speed=="gear_6"):
left_s=245
elif(left_speed=="inf"):
left_s=245
elif(left_speed=="gear_stop"):
left_s=0
elif(left_speed=="gear_random"):
a=random.randint(0,5)
left_s=70+35*a
elif(left_speed=="backgear_1"):
left_s=-70
elif(left_speed=="backgear_2"):
left_s=-105
elif(left_speed=="backgear_3"):
left_s=-140
elif(left_speed=="backgear_4"):
left_s=-175
elif(left_speed=="backgear_5"):
left_s=-175
elif(left_speed=="backgear_6"):
left_s=-210
elif(left_speed=="-inf"):
left_s=-210
elif(left_speed=="backgear_stop"):
left_s=0
elif(left_speed=="backgear_random"):
a=random.randint(0,5)
left_s=-70-35*a
if(left_s>0):
left_s=left_s
data[2]=0x01
else:
left_s=0-left_s
data[2]=0x02
left_s=round(left_s)
data[3]=left_s//256
data[4]=left_s%256
self.call.blewrite(data)
def stop(self,wheel):
data =None
if(wheel=="left"):
data= [0x11,0x01,0x01,0x00,0x00]
elif(wheel=="right"):
data= [0x11,0x02,0x01,0x00,0x00]
elif(wheel=="all"):
data = [0x11,0x03,0x01,0x00,0x00,0x01,0x00,0x00]
else:
data = [0x11,0x03,0x01,0x00,0x00,0x01,0x00,0x00]
self.call.blewrite(data)
| 31.447537
| 60
| 0.463571
| 1,717
| 14,686
| 3.776937
| 0.060571
| 0.046261
| 0.068157
| 0.051812
| 0.903161
| 0.896839
| 0.846723
| 0.837317
| 0.769776
| 0.717194
| 0
| 0.112288
| 0.414817
| 14,686
| 466
| 61
| 31.515021
| 0.642309
| 0.001362
| 0
| 0.839479
| 0
| 0
| 0.063971
| 0
| 0
| 0
| 0.025097
| 0
| 0
| 1
| 0.0282
| false
| 0.002169
| 0.006508
| 0
| 0.067245
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
4230fcf2d15631a570b4bb73eb294a146b99456a
| 15,630
|
py
|
Python
|
ub/modules/script.py
|
parv779/javes-3.0
|
d510717b2756a65b39ff18d9f53d4adc46d8e23f
|
[
"MIT"
] | 15
|
2020-12-13T17:37:05.000Z
|
2021-06-23T00:00:49.000Z
|
ub/modules/script.py
|
parv779/javes-3.0
|
d510717b2756a65b39ff18d9f53d4adc46d8e23f
|
[
"MIT"
] | 2
|
2021-01-11T16:39:31.000Z
|
2021-01-25T22:35:28.000Z
|
ub/modules/script.py
|
parv779/javes-3.0
|
d510717b2756a65b39ff18d9f53d4adc46d8e23f
|
[
"MIT"
] | 78
|
2020-12-13T17:52:51.000Z
|
2022-03-24T03:43:09.000Z
|
import os
import asyncio
from getpass import getuser
from os import remove
from subprocess import PIPE
from subprocess import run as runapp
import pybase64
from sys import executable
from ub import CMD_HELP, BOTLOG, BOTLOG_CHATID
from ub.events import javes05, bot, rekcah05
javes = client = bot
from ub import CMD_HELP, ALIVE_NAME, PM_MESSAGE, JAVES_NAME, JAVES_MSG, ORI_MSG
JAVES_NNAME = str(JAVES_NAME) if JAVES_NAME else str(JAVES_MSG)
FULL_SUDO = os.environ.get("FULL_SUDO", None)
import inspect
running_processes: dict = {}
@javes05(outgoing=True, pattern="^\!term(?: |$|\n)([\s\S]*)")
async def evaluate(event):
await event.edit(f"**{JAVES_NNAME}**: `Running Terminal.....`")
message = (str(event.chat_id) + ':' + str(event.message.id))
if running_processes.get(message, False):
await event.edit("A process for this event is already running!")
return
cmd = event.pattern_match.group(1).strip()
if not cmd:
await event.edit("``` Give a command or use !help script.```")
return
if cmd in ("ub.session", "env", "printenv"):
return await event.edit(f"`{JAVES_NNAME}:` **Privacy Error, This command not permitted**")
process = await asyncio.create_subprocess_shell(
cmd, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE)
running_processes.update({message: process})
stdout, stderr = await process.communicate()
not_killed = running_processes.get(message, False)
if not_killed:
del running_processes[message]
text = f"**Terminal Command**: `{cmd}`\n**Return code**: `{process.returncode}`\n\n"
if stdout:
text += "\n**[stdout]**\n`" + stdout.decode("UTF-8").strip() + "\n`"
if stderr:
text += "\n**[stderr]**\n`" + stderr.decode('UTF-8').strip() + "\n`"
if stdout or stderr:
if not len(text) > 4096:
return await event.edit(text)
output = open("term.txt", "w+")
output.write(text)
output.close()
await event.client.send_file(event.chat_id, "term.txt", reply_to=event.id, caption=f"`{JAVES_NNAME}:` **Output too large, sending as file**")
os.remove("term.txt")
return
@javes.on(rekcah05(pattern=f"term(?: |$|\n)([\s\S]*)", allow_sudo=True))
async def evaluate(event):
if not FULL_SUDO:
await query.reply(f"`{JAVES_NNAME}:` **Sorry , Normal Sudo cant acess this comand, active advance sudo by set FULL_SUDO as true in heroku var**")
else:
rkp = await event.reply(f"**{JAVES_NNAME}**: `Running Terminal.....`")
message = (str(event.chat_id) + ':' + str(event.message.id))
if running_processes.get(message, False):
await rkp.edit("A process for this event is already running!")
return
cmd = event.pattern_match.group(1).strip()
if not cmd:
await rkp.edit("``` Give a command or use .help script.```")
return
if cmd in ("ub.session", "env", "printenv"):
return await rkp.edit(f"`{JAVES_NNAME}:` **Privacy Error, This command not permitted**")
process = await asyncio.create_subprocess_shell(
cmd, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE)
running_processes.update({message: process})
stdout, stderr = await process.communicate()
not_killed = running_processes.get(message, False)
if not_killed:
del running_processes[message]
text = f"**Terminal Command**: `{cmd}`\n**Return code**: `{process.returncode}`\n\n"
if stdout:
text += "\n**[stdout]**\n`" + stdout.decode("UTF-8").strip() + "\n`"
if stderr:
text += "\n**[stderr]**\n`" + stderr.decode('UTF-8').strip() + "\n`"
if stdout or stderr:
if not len(text) > 4096:
return await rkp.edit(text)
output = open("term.txt", "w+")
output.write(text)
output.close()
await event.client.send_file(event.chat_id, "term.txt", reply_to=event.id, caption=f"`{JAVES_NNAME}:` **Output too large, sending as file**")
os.remove("term.txt")
return
@javes05(outgoing=True, pattern=r"^\!exec(?: |$)([\s\S]*)")
async def run(run_q):
code = run_q.pattern_match.group(1)
if not code:
await run_q.edit(f"`{JAVES_NNAME}:` **At least a variable is required to \
execute. Use !help script for an example.**")
return
if code in ("ub.session", "env", "printenv"):
await run_q.edit(f"`{JAVES_NNAME}:` **Privacy Error, This command not permitted**")
return
if len(code.splitlines()) <= 5:
codepre = code
else:
clines = code.splitlines()
codepre = clines[0] + "\n" + clines[1] + "\n" + clines[2] + \
"\n" + clines[3] + "..."
command = "".join(f"\n {l}" for l in code.split("\n.strip()"))
process = await asyncio.create_subprocess_exec(
executable,
'-c',
command.strip(),
stdout=asyncio.subprocess.PIPE,
stderr=asyncio.subprocess.PIPE)
stdout, stderr = await process.communicate()
result = str(stdout.decode().strip()) \
+ str(stderr.decode().strip())
if result:
if len(result) > 4096:
file = open("exec.txt", "w+")
file.write(result)
file.close()
await run_q.client.send_file(
run_q.chat_id,
"exec.txt",
reply_to=run_q.id,
caption="`Output too large, sending as file`",
)
remove("exec.txt")
return
await run_q.edit("**Query: **\n`"
f"{codepre}"
"`\n**Result: **\n`"
f"{result}"
"`")
else:
await run_q.edit("**Query: **\n`"
f"{codepre}"
"`\n**Result: **\n`No Result Returned/False`")
@javes.on(rekcah05(pattern=f"exec(?: |$)([\s\S]*)", allow_sudo=True))
async def run(run_q):
if not FULL_SUDO:
await query.reply(f"`{JAVES_NNAME}:` **Sorry , Normal Sudo cant acess this comand, active advance sudo by set FULL_SUDO as true in heroku var**")
else:
code = run_q.pattern_match.group(1)
if not code:
await run_q.reply(f"`{JAVES_NNAME}:` **At least a variable is required to \
execute. Use !help script for an example.**")
return
if code in ("ub.session", "env", "printenv"):
await run_q.reply(f"`{JAVES_NNAME}:` **Privacy Error, This command not permitted**")
return
if len(code.splitlines()) <= 5:
codepre = code
else:
clines = code.splitlines()
codepre = clines[0] + "\n" + clines[1] + "\n" + clines[2] + \
"\n" + clines[3] + "..."
command = "".join(f"\n {l}" for l in code.split("\n.strip()"))
process = await asyncio.create_subprocess_exec(
executable,
'-c',
command.strip(),
stdout=asyncio.subprocess.PIPE,
stderr=asyncio.subprocess.PIPE)
stdout, stderr = await process.communicate()
result = str(stdout.decode().strip()) \
+ str(stderr.decode().strip())
if result:
if len(result) > 4096:
file = open("exec.txt", "w+")
file.write(result)
file.close()
await run_q.client.send_file(
run_q.chat_id,
"exec.txt",
reply_to=run_q.id,
caption="`Output too large, sending as file`",
)
remove("exec.txt")
return
await run_q.reply("**Query: **\n`"
f"{codepre}"
"`\n**Result: **\n`"
f"{result}"
"`")
else:
await run_q.reply("**Query: **\n`"
f"{codepre}"
"`\n**Result: **\n`No Result Returned/False`")
@javes05(outgoing=True, pattern="^\!eval(?: |$)(.*)")
async def evaluate(query):
if query.pattern_match.group(1):
expression = query.pattern_match.group(1)
else:
await query.edit(f"`{JAVES_NNAME}:` **Please give command type !help script for more info**")
return
if expression in ("ub.session", "env", "printenv"):
await query.edit(f"`{JAVES_NNAME}:` **Privacy Error, This command not permitted**")
return
try:
evaluation = str(eval(expression))
if evaluation:
if isinstance(evaluation, str):
if len(evaluation) >= 4096:
file = open("eval.txt", "w+")
file.write(evaluation)
file.close()
await query.client.send_file(
query.chat_id,
"eval.txt",
reply_to=query.id,
caption="`Output too large, sending as file`",
)
remove("eval.txt")
return
await query.edit("**Query: **\n`"
f"{expression}"
"`\n**Result: **\n`"
f"{evaluation}"
"`")
else:
await query.edit("**Query: **\n`"
f"{expression}"
"`\n**Result: **\n`No Result Returned/False`")
except Exception as err:
await query.edit("**Query: **\n`"
f"{expression}"
"`\n**Exception: **\n"
f"`{err}`")
@javes.on(rekcah05(pattern=f"eval(?: |$)(.*)", allow_sudo=True))
async def evaluate(query):
if not FULL_SUDO:
await query.reply(f"`{JAVES_NNAME}:` **Sorry , Normal Sudo cant acess this comand, active advance sudo by set FULL_SUDO as true in heroku var**")
else:
if query.pattern_match.group(1):
expression = query.pattern_match.group(1)
else:
await query.reply(f"`{JAVES_NNAME}:` **Please give command type !help script for more info**")
return
if expression in ("ub.session", "env", "printenv"):
await query.reply(f"`{JAVES_NNAME}:` **Privacy Error, This command not permitted**")
return
try:
evaluation = str(eval(expression))
if evaluation:
if isinstance(evaluation, str):
if len(evaluation) >= 4096:
file = open("eval.txt", "w+")
file.write(evaluation)
file.close()
await query.client.send_file(
query.chat_id,
"eval.txt",
reply_to=query.id,
caption="`Output too large, sending as file`",
)
remove("eval.txt")
return
await query.reply("**Query: **\n`"
f"{expression}"
"`\n**Result: **\n`"
f"{evaluation}"
"`")
else:
await query.reply("**Query: **\n`"
f"{expression}"
"`\n**Result: **\n`No Result Returned/False`")
except Exception as err:
await query.reply("**Query: **\n`"
f"{expression}"
"`\n**Exception: **\n"
f"`{err}`")
@javes05(outgoing=True, pattern="^\!hash (.*)")
async def gethash(hash_q):
hashtxt_ = hash_q.pattern_match.group(1)
hashtxt = open("hashdis.txt", "w+")
hashtxt.write(hashtxt_)
hashtxt.close()
md5 = runapp(["md5sum", "hashdis.txt"], stdout=PIPE)
md5 = md5.stdout.decode()
sha1 = runapp(["sha1sum", "hashdis.txt"], stdout=PIPE)
sha1 = sha1.stdout.decode()
sha256 = runapp(["sha256sum", "hashdis.txt"], stdout=PIPE)
sha256 = sha256.stdout.decode()
sha512 = runapp(["sha512sum", "hashdis.txt"], stdout=PIPE)
runapp(["rm", "hashdis.txt"], stdout=PIPE)
sha512 = sha512.stdout.decode()
ans = ("Text: `" + hashtxt_ + "`\nMD5: `" + md5 + "`SHA1: `" + sha1 +
"`SHA256: `" + sha256 + "`SHA512: `" + sha512[:-1] + "`")
if len(ans) > 4096:
hashfile = open("hashes.txt", "w+")
hashfile.write(ans)
hashfile.close()
await hash_q.client.send_file(
hash_q.chat_id,
"hashes.txt",
reply_to=hash_q.id,
caption="`It's too big, sending a text file instead. `")
runapp(["rm", "hashes.txt"], stdout=PIPE)
else:
await hash_q.reply(ans)
@javes.on(rekcah05(pattern=f"hash (.*)", allow_sudo=True))
async def gethash(hash_q):
hashtxt_ = hash_q.pattern_match.group(1)
hashtxt = open("hashdis.txt", "w+")
hashtxt.write(hashtxt_)
hashtxt.close()
md5 = runapp(["md5sum", "hashdis.txt"], stdout=PIPE)
md5 = md5.stdout.decode()
sha1 = runapp(["sha1sum", "hashdis.txt"], stdout=PIPE)
sha1 = sha1.stdout.decode()
sha256 = runapp(["sha256sum", "hashdis.txt"], stdout=PIPE)
sha256 = sha256.stdout.decode()
sha512 = runapp(["sha512sum", "hashdis.txt"], stdout=PIPE)
runapp(["rm", "hashdis.txt"], stdout=PIPE)
sha512 = sha512.stdout.decode()
ans = ("Text: `" + hashtxt_ + "`\nMD5: `" + md5 + "`SHA1: `" + sha1 +
"`SHA256: `" + sha256 + "`SHA512: `" + sha512[:-1] + "`")
if len(ans) > 4096:
hashfile = open("hashes.txt", "w+")
hashfile.write(ans)
hashfile.close()
await hash_q.client.send_file(
hash_q.chat_id,
"hashes.txt",
reply_to=hash_q.id,
caption="`It's too big, sending a text file instead. `")
runapp(["rm", "hashes.txt"], stdout=PIPE)
else:
await hash_q.reply(ans)
@javes05(outgoing=True, pattern="^\!base64 (en|de) (.*)")
async def endecrypt(query):
if query.pattern_match.group(1) == "en":
lething = str(
pybase64.b64encode(bytes(query.pattern_match.group(2),
"utf-8")))[2:]
await query.reply("Encoded: `" + lething[:-1] + "`")
else:
lething = str(
pybase64.b64decode(bytes(query.pattern_match.group(2), "utf-8"),
validate=True))[2:]
await query.reply("Decoded: `" + lething[:-1] + "`")
@javes.on(rekcah05(pattern=f"base64 (en|de) (.*)", allow_sudo=True))
async def endecrypt(query):
if query.pattern_match.group(1) == "en":
lething = str(
pybase64.b64encode(bytes(query.pattern_match.group(2),
"utf-8")))[2:]
await query.reply("Encoded: `" + lething[:-1] + "`")
else:
lething = str(
pybase64.b64decode(bytes(query.pattern_match.group(2), "utf-8"),
validate=True))[2:]
await query.reply("Decoded: `" + lething[:-1] + "`")
CMD_HELP.update({
"script":
"!term\
\nUsage: run shell command in javes, Javes's os is alpine so use apline commands like !term apk add < packges>\
\n\n!exec \
\nUsage: run python command in javes. like !exec print ('hello')\
\n\n!eval\
\nUsage: Evalute mini-expressions. like !eval 1+1\
\n\n!hash\
\nUsage: find the md5, sha1, sha256, sha512 of the string.\
\n\n!base64 en/de\
\nUsage: find the base64 encode/decode the given string. like !base64 en hello\
\n\n**Sodo commands ( type !help sudo for more info)**\
\n .term , .exec , .eval, .base64 en/de , .hash\
"
})
| 36.863208
| 154
| 0.537812
| 1,842
| 15,630
| 4.486428
| 0.119435
| 0.022991
| 0.022628
| 0.026137
| 0.875605
| 0.848742
| 0.840876
| 0.833616
| 0.832527
| 0.824782
| 0
| 0.021699
| 0.304159
| 15,630
| 424
| 155
| 36.863208
| 0.738139
| 0
| 0
| 0.825613
| 0
| 0.010899
| 0.210863
| 0.003327
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.002725
| 0.032698
| 0
| 0.092643
| 0.019074
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
42a260729e8da177ce5721a120eea86c8b2c4149
| 44
|
py
|
Python
|
3-Patron/python/IMapa.py
|
TanZng/patrones-combinados
|
93796d9d5296649bd76b7b2ee7c723156b9a120f
|
[
"MIT"
] | 1
|
2021-09-13T15:45:48.000Z
|
2021-09-13T15:45:48.000Z
|
3-Patron/python/IMapa.py
|
TanZng/patrones-combinados
|
93796d9d5296649bd76b7b2ee7c723156b9a120f
|
[
"MIT"
] | null | null | null |
3-Patron/python/IMapa.py
|
TanZng/patrones-combinados
|
93796d9d5296649bd76b7b2ee7c723156b9a120f
|
[
"MIT"
] | 1
|
2021-09-24T03:00:47.000Z
|
2021-09-24T03:00:47.000Z
|
import abc
class IMapa(abc.ABC):
pass
| 7.333333
| 21
| 0.659091
| 7
| 44
| 4.142857
| 0.714286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.25
| 44
| 5
| 22
| 8.8
| 0.878788
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.333333
| 0.333333
| 0
| 0.666667
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
|
0
| 7
|
c4176361a2daeb440a9fefb7082658372fb13f9c
| 156
|
py
|
Python
|
locale/pot/api/plotting/_autosummary/pyvista-themes-DefaultTheme-antialiasing-1.py
|
tkoyama010/pyvista-doc-translations
|
23bb813387b7f8bfe17e86c2244d5dd2243990db
|
[
"MIT"
] | 4
|
2020-08-07T08:19:19.000Z
|
2020-12-04T09:51:11.000Z
|
locale/pot/api/plotting/_autosummary/pyvista-themes-DefaultTheme-antialiasing-1.py
|
tkoyama010/pyvista-doc-translations
|
23bb813387b7f8bfe17e86c2244d5dd2243990db
|
[
"MIT"
] | 19
|
2020-08-06T00:24:30.000Z
|
2022-03-30T19:22:24.000Z
|
locale/pot/api/plotting/_autosummary/pyvista-themes-DarkTheme-antialiasing-1.py
|
tkoyama010/pyvista-doc-translations
|
23bb813387b7f8bfe17e86c2244d5dd2243990db
|
[
"MIT"
] | 1
|
2021-03-09T07:50:40.000Z
|
2021-03-09T07:50:40.000Z
|
# Enable anti-aliasing in the global theme.
#
import pyvista
pyvista.global_theme.antialiasing = True
pyvista.global_theme.antialiasing
# Expected:
## True
| 19.5
| 43
| 0.801282
| 20
| 156
| 6.15
| 0.6
| 0.268293
| 0.292683
| 0.487805
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.115385
| 156
| 7
| 44
| 22.285714
| 0.891304
| 0.358974
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 7
|
670771e5c5148bbf2de506cd92e9483dacd7f3d1
| 9,630
|
py
|
Python
|
evaluater/evaluater.py
|
LanXiangExcavator/Beat-aligned_Transformer
|
c17b014f01761d1b38addd3a846db3c0b5ba5e80
|
[
"MIT"
] | 3
|
2022-03-03T07:37:01.000Z
|
2022-03-09T07:47:11.000Z
|
evaluater/evaluater.py
|
LanXiangExcavator/Beat-aligned_Transformer
|
c17b014f01761d1b38addd3a846db3c0b5ba5e80
|
[
"MIT"
] | null | null | null |
evaluater/evaluater.py
|
LanXiangExcavator/Beat-aligned_Transformer
|
c17b014f01761d1b38addd3a846db3c0b5ba5e80
|
[
"MIT"
] | 1
|
2022-02-28T14:55:23.000Z
|
2022-02-28T14:55:23.000Z
|
from base import BaseEvaluater
from utils import *
import torch.nn as nn
from data_loader.util import *
class Evaluater_beat_aligned_data(BaseEvaluater):
"""
Evaluater class
"""
def __init__(self, model, criterion, metric_ftns, config, checkpoint_dir=None, result_dir=None):
super().__init__(model, criterion, metric_ftns, config, checkpoint_dir, result_dir)
self.config = config
# self.beat_length = config["evaluater"]["beat_length"]
self.test_metrics = MetricTracker('loss', *[m.__name__ for m in self.metric_ftns])
self.num_classes = config['arch']['args']['num_classes']
self.lead_number = config['data_loader']['args']['lead_number']
self.split_index = config['data_loader']['args']['split_index']
self.label_dir = config['data_loader']['args']['label_dir']
self.resample_Fs = config["data_loader"]['args']["resample_Fs"]
self.window_size = config["data_loader"]['args']["window_size"]
self.n_segment = config["evaluater"]["n_segment"]
self.save_dir = config["data_loader"]["args"]["save_dir"]
self.seg_with_r = config["data_loader"]["args"]["seg_with_r"]
self.sigmoid = nn.Sigmoid()
split_idx = loadmat(self.split_index)
train_index, val_index, test_index = split_idx['train_index'], split_idx['val_index'], split_idx['test_index']
self.test_index = test_index.reshape((test_index.shape[1], ))
# self.train_info = np.array(np.load(os.pandasth.join(self.save_dir, 'train_info' + str(self.window_size) + '_' + str(self.resample_Fs) + '_' + str(self.seg_with_r) + '.npy')))
if self.lead_number == 2:
# two leads
self.leads_index = [1, 10]
elif self.lead_number == 3:
# three leads
self.leads_index = [0, 1, 7]
elif self.lead_number == 6:
# six leads
self.leads_index = [0, 1, 2, 3, 4, 5]
elif self.lead_number == 8:
# eight leads
self.leads_index = [0, 1, 6, 7, 8, 9, 10, 11]
else:
self.leads_index = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
def evaluate(self):
"""
Evaluate after training procedure finished
"""
self.model.eval()
weights_file = 'weights.csv'
normal_class = '426783006'
equivalent_classes = [['713427006', '59118001'], ['284470004', '63593006'], ['427172004', '17338001']]
# Find the label files.
print('Finding label...')
label_files = load_label_files(self.label_dir)
# Load the labels and classes.
print('Loading labels...')
classes, labels_onehot, labels = load_labels(label_files, normal_class,
equivalent_classes)
self.classes = classes
# Load the weights for the Challenge metric.
print('Loading weights...')
weights = load_weights(weights_file, classes)
self.weights = weights
# Classes that are scored with the Challenge metric.
indices = np.any(weights, axis=0) # Find indices of classes in weight matrix.
# Get number of samples for each category
self.indices = indices
num_files = len(label_files)
output_logits = []
targets = []
recordings_saved = np.load(os.path.join('/data/ecg/challenge2020/data/recordings_' + str(5000) + '_' + str(
500) + '_' + str(False) + '.npy'))
ratio_saved = np.load(os.path.join('/data/ecg/challenge2020/data/info_' + str(5000) + '_' + str(
500) + '_' + str(False) + '.npy'))
for i in range(num_files):
recording, header, name = load_challenge_data(label_files[i], self.label_dir)
if i in self.test_index and name[0] != 'A' and name[0] != 'Q':
print('{}/{}'.format(i + 1, num_files))
recording = [recordings_saved[i]]
info2save = ratio_saved[i]
if info2save.sum() <= 0:
continue
if recording is None:
continue
data, info = torch.tensor(recording), torch.tensor(info2save)
data = data[:, self.leads_index, :, :]
# info -= self.train_info.mean()
# info /= self.train_info.std()
data, info = data.to(self.device, dtype=torch.float), info.to(self.device, dtype=torch.float)
output = self.model(data, info)
output_logit = torch.sigmoid(output)
output_logit = output_logit.detach().cpu().numpy()
output_logit = np.mean(output_logit, axis=0)
output_logits.append(output_logit)
targets.append(labels_onehot[i])
output_logits = np.array(output_logits)
targets = np.array(targets)
for met in self.metric_ftns:
self.test_metrics.update(met.__name__, met(output_logits, targets))
result = self.test_metrics.result()
# print logged informations to the screen
for key, value in result.items():
self.logger.info(' {:15s}: {}'.format(str(key), value))
class Evaluater(BaseEvaluater):
"""
Evaluater class
"""
def __init__(self, model, criterion, metric_ftns, config, checkpoint_dir=None, result_dir=None):
super().__init__(model, criterion, metric_ftns, config, checkpoint_dir, result_dir)
self.config = config
self.test_metrics = MetricTracker('loss', *[m.__name__ for m in self.metric_ftns])
self.num_classes = config['arch']['args']['num_classes']
self.lead_number = config['data_loader']['args']['lead_number']
self.split_index = config['data_loader']['args']['split_index']
self.label_dir = config['data_loader']['args']['label_dir']
self.resample_Fs = config["data_loader"]['args']["resample_Fs"]
self.window_size = config["data_loader"]['args']["window_size"]
self.n_segment = config["evaluater"]["n_segment"]
self.sigmoid = nn.Sigmoid()
split_idx = loadmat(self.split_index)
train_index, val_index, test_index = split_idx['train_index'], split_idx['val_index'], split_idx['test_index']
self.test_index = test_index.reshape((test_index.shape[1], ))
if self.lead_number == 2:
# two leads
self.leads_index = [1, 10]
elif self.lead_number == 3:
# three leads
self.leads_index = [0, 1, 7]
elif self.lead_number == 6:
# six leads
self.leads_index = [0, 1, 2, 3, 4, 5]
elif self.lead_number == 8:
# eight leads
self.leads_index = [0, 1, 6, 7, 8, 9, 10, 11]
else:
self.leads_index = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
def evaluate(self):
"""
Evaluate after training procedure finished
"""
self.model.eval()
weights_file = 'weights.csv'
normal_class = '426783006'
equivalent_classes = [['713427006', '59118001'], ['284470004', '63593006'], ['427172004', '17338001']]
# Find the label files.
print('Finding label...')
label_files = load_label_files(self.label_dir)
# Load the labels and classes.
print('Loading labels...')
classes, labels_onehot, labels = load_labels(label_files, normal_class,
equivalent_classes)
self.classes = classes
# Load the weights for the Challenge metric.
print('Loading weights...')
weights = load_weights(weights_file, classes)
self.weights = weights
# Classes that are scored with the Challenge metric.
indices = np.any(weights, axis=0) # Find indices of classes in weight matrix.
# Get number of samples for each category
self.indices = indices
num_files = len(label_files)
output_logits = []
targets = []
for i in range(num_files):
recording, header, name = load_challenge_data(label_files[i], self.label_dir)
if i in self.test_index and name[0] != 'A' and name[0] != 'Q':
print('{}/{}'.format(i + 1, num_files))
output_logit = self.run_my_model(header, recording)
output_logits.append(output_logit)
targets.append(labels_onehot[i])
output_logits = np.array(output_logits)
targets = np.array(targets)
for met in self.metric_ftns:
self.test_metrics.update(met.__name__, met(output_logits, targets))
result = self.test_metrics.result()
# print logged informations to the screen
for key, value in result.items():
self.logger.info(' {:15s}: {}'.format(str(key), value))
def run_my_model(self, header, recording):
recording[np.isnan(recording)] = 0
# divide ADC_gain and resample
recording = resample(recording, header, self.resample_Fs)
recording = recording[self.leads_index, :]
# slide and cut
recording = slide_and_cut(recording, self.n_segment, self.window_size, self.resample_Fs)
data = torch.tensor(recording)
data = data.to(self.device, dtype=torch.float)
output = self.model(data)
output_logit = torch.sigmoid(output)
output_logit = output_logit.detach().cpu().numpy()
output_logit = np.mean(output_logit, axis=0)
return output_logit
| 40.125
| 184
| 0.590862
| 1,169
| 9,630
| 4.646707
| 0.160821
| 0.028351
| 0.035346
| 0.044183
| 0.834683
| 0.830449
| 0.830449
| 0.815169
| 0.815169
| 0.815169
| 0
| 0.035172
| 0.282555
| 9,630
| 240
| 185
| 40.125
| 0.751049
| 0.111423
| 0
| 0.815789
| 0
| 0
| 0.096759
| 0.008753
| 0
| 0
| 0
| 0
| 0
| 1
| 0.032895
| false
| 0
| 0.026316
| 0
| 0.078947
| 0.052632
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
670fefe8c2bcb2f40a0ec657f409764f1c778a8a
| 182
|
py
|
Python
|
Statistics/Variance.py
|
rar9898/StatisticalCalculator
|
34ffd7e9e60facd5cce7af3e43ceb244f741138b
|
[
"MIT"
] | null | null | null |
Statistics/Variance.py
|
rar9898/StatisticalCalculator
|
34ffd7e9e60facd5cce7af3e43ceb244f741138b
|
[
"MIT"
] | null | null | null |
Statistics/Variance.py
|
rar9898/StatisticalCalculator
|
34ffd7e9e60facd5cce7af3e43ceb244f741138b
|
[
"MIT"
] | null | null | null |
from Calculator.Square import square
from Statistics.StandardDeviation import standard_deviation
def variance(numbers): # complete
return square(standard_deviation(numbers))
| 22.75
| 59
| 0.824176
| 20
| 182
| 7.4
| 0.65
| 0.22973
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.120879
| 182
| 7
| 60
| 26
| 0.925
| 0.043956
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.5
| 0.25
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 7
|
671ef438bc3f69acea840e4dca9042761b0d3573
| 168
|
py
|
Python
|
ibsng/handler/admin/expire_all_admin_o_t_ps.py
|
ParspooyeshFanavar/pyibsng
|
d48bcf4f25e3f23461528bf0ff8870cc3d537444
|
[
"MIT"
] | 6
|
2018-03-06T10:16:36.000Z
|
2021-12-05T12:43:10.000Z
|
ibsng/handler/admin/expire_all_admin_o_t_ps.py
|
ParspooyeshFanavar/pyibsng
|
d48bcf4f25e3f23461528bf0ff8870cc3d537444
|
[
"MIT"
] | 3
|
2018-03-06T10:27:08.000Z
|
2022-01-02T15:21:27.000Z
|
ibsng/handler/admin/expire_all_admin_o_t_ps.py
|
ParspooyeshFanavar/pyibsng
|
d48bcf4f25e3f23461528bf0ff8870cc3d537444
|
[
"MIT"
] | 3
|
2018-01-06T16:28:31.000Z
|
2018-09-17T19:47:19.000Z
|
"""Expire all admin OTPs API method."""
from ibsng.handler.handler import Handler
class expireAllAdminOTPs(Handler):
"""Expire all admin OTPs class."""
pass
| 18.666667
| 41
| 0.714286
| 21
| 168
| 5.714286
| 0.619048
| 0.15
| 0.233333
| 0.3
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.172619
| 168
| 8
| 42
| 21
| 0.863309
| 0.369048
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.333333
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
|
0
| 8
|
677d727768c843d9e8600b74938868481ae77822
| 12,487
|
py
|
Python
|
tests/inventory/pipelines/test_data/fake_instances.py
|
pombredanne/forseti-security
|
68a9a88243460065e00b6c131b3d9abd0331fb37
|
[
"Apache-2.0"
] | 1
|
2018-03-26T08:15:21.000Z
|
2018-03-26T08:15:21.000Z
|
tests/inventory/pipelines/test_data/fake_instances.py
|
pombredanne/forseti-security
|
68a9a88243460065e00b6c131b3d9abd0331fb37
|
[
"Apache-2.0"
] | null | null | null |
tests/inventory/pipelines/test_data/fake_instances.py
|
pombredanne/forseti-security
|
68a9a88243460065e00b6c131b3d9abd0331fb37
|
[
"Apache-2.0"
] | null | null | null |
#!/usr/bin/env python
# Copyright 2017 The Forseti Security 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.
'''Test instances data.'''
FAKE_API_RESPONSE1 = [
{
'kind': 'compute#instance',
'id': '6440513679799924564',
'creationTimestamp': '2017-05-26T22:08:11.094-07:00',
'name': 'iap-ig-79bj',
'tags': {
'items': [
'iap-tag'
],
'fingerprint': 'gilEhx3hEXk='
},
'machineType': 'https://www.googleapis.com/compute/v1/projects/project1/zones/us-central1-c/machineTypes/f1-micro',
'status': 'RUNNING',
'zone': 'https://www.googleapis.com/compute/v1/projects/project1/zones/us-central1-c',
'canIpForward': False,
'networkInterfaces': [
{
'kind': 'compute#networkInterface',
'network': 'https://www.googleapis.com/compute/v1/projects/project1/global/networks/default',
'subnetwork': 'https://www.googleapis.com/compute/v1/projects/project1/regions/us-central1/subnetworks/default',
'networkIP': '10.128.0.2',
'name': 'nic0',
'accessConfigs': [
{
'kind': 'compute#accessConfig',
'type': 'ONE_TO_ONE_NAT',
'name': 'External NAT',
'natIP': '104.198.131.130'
}
]
}
],
'disks': [
{
'kind': 'compute#attachedDisk',
'type': 'PERSISTENT',
'mode': 'READ_WRITE',
'source': 'https://www.googleapis.com/compute/v1/projects/project1/zones/us-central1-c/disks/iap-ig-79bj',
'deviceName': 'iap-it-1',
'index': 0,
'boot': True,
'autoDelete': True,
'licenses': [
'https://www.googleapis.com/compute/v1/projects/debian-cloud/global/licenses/debian-8-jessie'
],
'interface': 'SCSI'
}
],
'metadata': {
'kind': 'compute#metadata',
'fingerprint': '3MpZMMvDTyo=',
'items': [
{
'key': 'instance-template',
'value': 'projects/600687511243/global/instanceTemplates/iap-it-1'
},
{
'key': 'created-by',
'value': 'projects/600687511243/zones/us-central1-c/instanceGroupManagers/iap-ig'
}
]
},
'serviceAccounts': [
{
'email': '600687511243-compute@developer.gserviceaccount.com',
'scopes': [
'https://www.googleapis.com/auth/devstorage.read_only',
'https://www.googleapis.com/auth/logging.write',
'https://www.googleapis.com/auth/monitoring.write',
'https://www.googleapis.com/auth/servicecontrol',
'https://www.googleapis.com/auth/service.management.readonly',
'https://www.googleapis.com/auth/trace.append'
]
}
],
'selfLink': 'https://www.googleapis.com/compute/v1/projects/project1/zones/us-central1-c/instances/iap-ig-79bj',
'scheduling': {
'onHostMaintenance': 'MIGRATE',
'automaticRestart': True,
'preemptible': False
},
'cpuPlatform': 'Intel Haswell'
}
]
FAKE_API_RESPONSE2 = []
FAKE_PROJECT_INSTANCES_MAP = {
'project1': [
{
'kind': 'compute#instance',
'id': '6440513679799924564',
'creationTimestamp': '2017-05-26T22:08:11.094-07:00',
'name': 'iap-ig-79bj',
'tags': {
'items': [
'iap-tag'
],
'fingerprint': 'gilEhx3hEXk='
},
'machineType': 'https://www.googleapis.com/compute/v1/projects/project1/zones/us-central1-c/machineTypes/f1-micro',
'status': 'RUNNING',
'zone': 'https://www.googleapis.com/compute/v1/projects/project1/zones/us-central1-c',
'canIpForward': False,
'networkInterfaces': [
{
'kind': 'compute#networkInterface',
'network': 'https://www.googleapis.com/compute/v1/projects/project1/global/networks/default',
'subnetwork': 'https://www.googleapis.com/compute/v1/projects/project1/regions/us-central1/subnetworks/default',
'networkIP': '10.128.0.2',
'name': 'nic0',
'accessConfigs': [
{
'kind': 'compute#accessConfig',
'type': 'ONE_TO_ONE_NAT',
'name': 'External NAT',
'natIP': '104.198.131.130'
}
]
}
],
'disks': [
{
'kind': 'compute#attachedDisk',
'type': 'PERSISTENT',
'mode': 'READ_WRITE',
'source': 'https://www.googleapis.com/compute/v1/projects/project1/zones/us-central1-c/disks/iap-ig-79bj',
'deviceName': 'iap-it-1',
'index': 0,
'boot': True,
'autoDelete': True,
'licenses': [
'https://www.googleapis.com/compute/v1/projects/debian-cloud/global/licenses/debian-8-jessie'
],
'interface': 'SCSI'
}
],
'metadata': {
'kind': 'compute#metadata',
'fingerprint': '3MpZMMvDTyo=',
'items': [
{
'key': 'instance-template',
'value': 'projects/600687511243/global/instanceTemplates/iap-it-1'
},
{
'key': 'created-by',
'value': 'projects/600687511243/zones/us-central1-c/instanceGroupManagers/iap-ig'
}
]
},
'serviceAccounts': [
{
'email': '600687511243-compute@developer.gserviceaccount.com',
'scopes': [
'https://www.googleapis.com/auth/devstorage.read_only',
'https://www.googleapis.com/auth/logging.write',
'https://www.googleapis.com/auth/monitoring.write',
'https://www.googleapis.com/auth/servicecontrol',
'https://www.googleapis.com/auth/service.management.readonly',
'https://www.googleapis.com/auth/trace.append'
]
}
],
'selfLink': 'https://www.googleapis.com/compute/v1/projects/project1/zones/us-central1-c/instances/iap-ig-79bj',
'scheduling': {
'onHostMaintenance': 'MIGRATE',
'automaticRestart': True,
'preemptible': False
},
'cpuPlatform': 'Intel Haswell'
}
],
}
EXPECTED_LOADABLE_INSTANCES = [
{
'can_ip_forward': False,
'cpu_platform': 'Intel Haswell',
'creation_timestamp': '2017-05-26 22:08:11',
'description': None,
'disks': '[{"source": "https://www.googleapis.com/compute/v1/projects/project1/zones/us-central1-c/disks/iap-ig-79bj", "kind": "compute#attachedDisk", "mode": "READ_WRITE", "autoDelete": true, "deviceName": "iap-it-1", "licenses": ["https://www.googleapis.com/compute/v1/projects/debian-cloud/global/licenses/debian-8-jessie"], "index": 0, "interface": "SCSI", "boot": true, "type": "PERSISTENT"}]',
'id': '6440513679799924564',
'machine_type': 'https://www.googleapis.com/compute/v1/projects/project1/zones/us-central1-c/machineTypes/f1-micro',
'metadata': '{"items": [{"value": "projects/600687511243/global/instanceTemplates/iap-it-1", "key": "instance-template"}, {"value": "projects/600687511243/zones/us-central1-c/instanceGroupManagers/iap-ig", "key": "created-by"}], "kind": "compute#metadata", "fingerprint": "3MpZMMvDTyo="}',
'name': 'iap-ig-79bj',
'network_interfaces': '[{"kind": "compute#networkInterface", "network": "https://www.googleapis.com/compute/v1/projects/project1/global/networks/default", "accessConfigs": [{"kind": "compute#accessConfig", "type": "ONE_TO_ONE_NAT", "name": "External NAT", "natIP": "104.198.131.130"}], "networkIP": "10.128.0.2", "subnetwork": "https://www.googleapis.com/compute/v1/projects/project1/regions/us-central1/subnetworks/default", "name": "nic0"}]',
'project_id': 'project1',
'scheduling': '{"automaticRestart": true, "preemptible": false, "onHostMaintenance": "MIGRATE"}',
'service_accounts': '[{"scopes": ["https://www.googleapis.com/auth/devstorage.read_only", "https://www.googleapis.com/auth/logging.write", "https://www.googleapis.com/auth/monitoring.write", "https://www.googleapis.com/auth/servicecontrol", "https://www.googleapis.com/auth/service.management.readonly", "https://www.googleapis.com/auth/trace.append"], "email": "600687511243-compute@developer.gserviceaccount.com"}]',
'status': 'RUNNING',
'status_message': None,
'tags': '{"items": ["iap-tag"], "fingerprint": "gilEhx3hEXk="}',
'zone': 'https://www.googleapis.com/compute/v1/projects/project1/zones/us-central1-c',
'raw_instance': '{"status": "RUNNING", "cpuPlatform": "Intel Haswell", "kind": "compute#instance", "machineType": "https://www.googleapis.com/compute/v1/projects/project1/zones/us-central1-c/machineTypes/f1-micro", "name": "iap-ig-79bj", "zone": "https://www.googleapis.com/compute/v1/projects/project1/zones/us-central1-c", "tags": {"items": ["iap-tag"], "fingerprint": "gilEhx3hEXk="}, "disks": [{"source": "https://www.googleapis.com/compute/v1/projects/project1/zones/us-central1-c/disks/iap-ig-79bj", "kind": "compute#attachedDisk", "mode": "READ_WRITE", "autoDelete": true, "deviceName": "iap-it-1", "licenses": ["https://www.googleapis.com/compute/v1/projects/debian-cloud/global/licenses/debian-8-jessie"], "index": 0, "interface": "SCSI", "boot": true, "type": "PERSISTENT"}], "scheduling": {"automaticRestart": true, "preemptible": false, "onHostMaintenance": "MIGRATE"}, "canIpForward": false, "serviceAccounts": [{"scopes": ["https://www.googleapis.com/auth/devstorage.read_only", "https://www.googleapis.com/auth/logging.write", "https://www.googleapis.com/auth/monitoring.write", "https://www.googleapis.com/auth/servicecontrol", "https://www.googleapis.com/auth/service.management.readonly", "https://www.googleapis.com/auth/trace.append"], "email": "600687511243-compute@developer.gserviceaccount.com"}], "metadata": {"items": [{"value": "projects/600687511243/global/instanceTemplates/iap-it-1", "key": "instance-template"}, {"value": "projects/600687511243/zones/us-central1-c/instanceGroupManagers/iap-ig", "key": "created-by"}], "kind": "compute#metadata", "fingerprint": "3MpZMMvDTyo="}, "creationTimestamp": "2017-05-26T22:08:11.094-07:00", "id": "6440513679799924564", "selfLink": "https://www.googleapis.com/compute/v1/projects/project1/zones/us-central1-c/instances/iap-ig-79bj", "networkInterfaces": [{"kind": "compute#networkInterface", "network": "https://www.googleapis.com/compute/v1/projects/project1/global/networks/default", "accessConfigs": [{"kind": "compute#accessConfig", "type": "ONE_TO_ONE_NAT", "name": "External NAT", "natIP": "104.198.131.130"}], "networkIP": "10.128.0.2", "subnetwork": "https://www.googleapis.com/compute/v1/projects/project1/regions/us-central1/subnetworks/default", "name": "nic0"}]}',
}
]
| 57.810185
| 2,253
| 0.563386
| 1,203
| 12,487
| 5.815461
| 0.179551
| 0.058319
| 0.131218
| 0.153087
| 0.866638
| 0.866638
| 0.856061
| 0.836049
| 0.836049
| 0.830475
| 0
| 0.055969
| 0.267398
| 12,487
| 215
| 2,254
| 58.07907
| 0.708789
| 0.050292
| 0
| 0.671795
| 0
| 0.107692
| 0.664358
| 0.090287
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.035897
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
58afd36de9093d093d64c04829a07959540bc689
| 4,219
|
py
|
Python
|
Model/model/FCN.py
|
LovingThresh/CJTeam
|
ce03e107e0b33ac8132d4d6369fd7f98013e7563
|
[
"Apache-2.0"
] | 1
|
2022-03-28T05:57:45.000Z
|
2022-03-28T05:57:45.000Z
|
Model/model/FCN.py
|
LovingThresh/CJTeam
|
ce03e107e0b33ac8132d4d6369fd7f98013e7563
|
[
"Apache-2.0"
] | null | null | null |
Model/model/FCN.py
|
LovingThresh/CJTeam
|
ce03e107e0b33ac8132d4d6369fd7f98013e7563
|
[
"Apache-2.0"
] | null | null | null |
from base import *
# modelๆฏ็ฝ็ปๅฏน่ฑก
model = object
# FCN็ณปๅ็ฝ็ป-FCN-8s๏ผFCN-16s๏ผFCN-32s
# ๅจ็ปๅ
ธ็VGGNet็ๅบ็กไธ๏ผๆVGG็ฝ็ปๆๅ็ๅ
จ่ฟๆฅๅฑๅ
จ้จๅปๆ๏ผๆขไธบๅท็งฏๅฑ
def FCN_32sDecoder(Encoder, feature_list=None, out_num=None):
global model
f1, f2, f3, f4 = feature_list
Encoder_out_layer = Encoder.output
# D_block1
x = keras.layers.Conv2D(4096, (7, 7), strides=(1, 1), activation='relu', padding='same',
name='D_block1_conv1')(Encoder_out_layer)
x = keras.layers.Dropout(0.5)(x)
x = keras.layers.Conv2D(4096, (1, 1), strides=(1, 1), padding='same', activation='relu',
name='D_block1_conv2')(x)
x = keras.layers.Dropout(0.5)(x)
# D_block2
x = keras.layers.Conv2D(out_num, (1, 1), kernel_initializer='he_normal',
name='Seg_feats')(x)
# D_block3
x = keras.layers.Conv2DTranspose(out_num, (64, 64), strides=(32, 32), use_bias=False,
name='D_block3_Tconv1')(x)
model = keras.models.Model(inputs=Encoder.input, outputs=x, name='FCN_32s')
return model
def FCN_16sDecoder(Encoder, feature_list=None, out_num=None):
global model
f1, f2, f3, f4, _ = feature_list
Encoder_out_layer = Encoder.output
# D_block1
x = keras.layers.Conv2D(4096, (7, 7), strides=(1, 1), activation='relu', padding='same',
name='D_block1_conv1')(Encoder_out_layer)
x = keras.layers.Dropout(0.5)(x)
x = keras.layers.Conv2D(4096, (1, 1), strides=(1, 1), padding='same', activation='relu',
name='D_block1_conv2')(x)
x = keras.layers.Dropout(0.5)(x)
# D_block2
x = keras.layers.Conv2D(out_num, (1, 1), kernel_initializer='he_normal',
name='Seg_feats')(x)
# D_block3
x = keras.layers.Conv2DTranspose(out_num, (4, 4), (2, 2), use_bias=False,
name='D_block3_Tconv1')(x)
# D_block4
x = keras.layers.Conv2DTranspose(out_num, (4, 4), strides=(2, 2), use_bias=False,
name='D_block4_Tconv1')(x)
# D_block5
f3 = keras.layers.Conv2D(out_num, (1, 1), kernel_initializer='he_normal',
name='D_block5_conv1')(f3)
x = keras.layers.Add(name='D_block5_add1')([x, f3])
x = keras.layers.Conv2DTranspose(out_num, (16, 16), strides=(8, 8), use_bias=False,
name='D_block5')(x)
model = keras.models.Model(inputs=Encoder.input, outputs=x, name='FCN_8s')
return model
def FCN_8sDecoder(Encoder, feature_list=None, out_num=None):
global model
f1, f2, f3, f4, _ = feature_list
Encoder_out_layer = Encoder.output
# D_block1
x = keras.layers.Conv2D(4096, (7, 7), strides=(1, 1), activation='relu', padding='same',
name='D_block1_conv1')(Encoder_out_layer)
x = keras.layers.Dropout(0.5)(x)
x = keras.layers.Conv2D(4096, (1, 1), strides=(1, 1), padding='same', activation='relu',
name='D_block1_conv2')(x)
x = keras.layers.Dropout(0.5)(x)
# D_block2
x = keras.layers.Conv2D(out_num, (1, 1), kernel_initializer='he_normal',
name='Seg_feats')(x)
# D_block3
x = keras.layers.Conv2DTranspose(out_num, (4, 4), (2, 2), use_bias=False,
name='D_block3_Tconv1')(x)
# D_block4
f4 = keras.layers.Conv2D(out_num, (1, 1), kernel_initializer='he_normal',
name='D_block4_conv1')(f4)
x = keras.layers.Add(name='D_block4_add1')([x, f4])
x = keras.layers.Conv2DTranspose(out_num, (4, 4), strides=(2, 2), use_bias=False,
name='D_block4_Tconv1')(x)
# D_block5
f3 = keras.layers.Conv2D(out_num, (1, 1), kernel_initializer='he_normal',
name='D_block5_conv1')(f3)
x = keras.layers.Add(name='D_block5_add1')([x, f3])
x = keras.layers.Conv2DTranspose(out_num, (16, 16), strides=(8, 8), use_bias=False,
name='D_block5')(x)
model = keras.models.Model(inputs=Encoder.input, outputs=x, name='FCN_8s')
return model
| 38.706422
| 92
| 0.579047
| 573
| 4,219
| 4.066318
| 0.137871
| 0.132189
| 0.128755
| 0.069528
| 0.914592
| 0.914592
| 0.906009
| 0.906009
| 0.893562
| 0.893562
| 0
| 0.06873
| 0.272339
| 4,219
| 108
| 93
| 39.064815
| 0.690228
| 0.046694
| 0
| 0.835821
| 0
| 0
| 0.100874
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.044776
| false
| 0
| 0.014925
| 0
| 0.104478
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
4525670312c778b35d334d57947620a66304417f
| 8,837
|
py
|
Python
|
new_code/model.py
|
Cozyzheng/RS_DL_Junyi
|
c2c894ee9a2c6d4d5ffba6504c3c5f55ffda03d3
|
[
"MIT"
] | null | null | null |
new_code/model.py
|
Cozyzheng/RS_DL_Junyi
|
c2c894ee9a2c6d4d5ffba6504c3c5f55ffda03d3
|
[
"MIT"
] | null | null | null |
new_code/model.py
|
Cozyzheng/RS_DL_Junyi
|
c2c894ee9a2c6d4d5ffba6504c3c5f55ffda03d3
|
[
"MIT"
] | null | null | null |
import tensorflow as tf
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Conv2D,MaxPooling2D,UpSampling2D,BatchNormalization,Reshape,Permute,Activation
from tensorflow.keras.optimizers import Adam
from cfg import *
img_w = 256
img_h = 256
lr_init = 0.01
lr_decay = 0.00001
def SegNet():
model = Sequential()
#encoder
model.add(Conv2D(64,(3,3),strides=(1,1),input_shape=(img_w,img_h,3),padding='same',activation='relu',data_format='channels_last'))
model.add(BatchNormalization())
model.add(Conv2D(64,(3,3),strides=(1,1),padding='same',activation='relu'))
model.add(BatchNormalization())
model.add(MaxPooling2D(pool_size=(2,2)))
#(128,128)
model.add(Conv2D(128, (3, 3), strides=(1, 1), padding='same', activation='relu'))
model.add(BatchNormalization())
model.add(Conv2D(128, (3, 3), strides=(1, 1), padding='same', activation='relu'))
model.add(BatchNormalization())
model.add(MaxPooling2D(pool_size=(2,2)))
#(64,64)
model.add(Conv2D(256, (3, 3), strides=(1, 1), padding='same', activation='relu'))
model.add(BatchNormalization())
model.add(Conv2D(256, (3, 3), strides=(1, 1), padding='same', activation='relu'))
model.add(BatchNormalization())
model.add(Conv2D(256, (3, 3), strides=(1, 1), padding='same', activation='relu'))
model.add(BatchNormalization())
model.add(MaxPooling2D(pool_size=(2, 2)))
#(32,32)
model.add(Conv2D(512, (3, 3), strides=(1, 1), padding='same', activation='relu'))
model.add(BatchNormalization())
model.add(Conv2D(512, (3, 3), strides=(1, 1), padding='same', activation='relu'))
model.add(BatchNormalization())
model.add(Conv2D(512, (3, 3), strides=(1, 1), padding='same', activation='relu'))
model.add(BatchNormalization())
model.add(MaxPooling2D(pool_size=(2, 2)))
#(16,16)
model.add(Conv2D(512, (3, 3), strides=(1, 1), padding='same', activation='relu'))
model.add(BatchNormalization())
model.add(Conv2D(512, (3, 3), strides=(1, 1), padding='same', activation='relu'))
model.add(BatchNormalization())
model.add(Conv2D(512, (3, 3), strides=(1, 1), padding='same', activation='relu'))
model.add(BatchNormalization())
model.add(MaxPooling2D(pool_size=(2, 2)))
#(8,8)
#decoder
model.add(UpSampling2D(size=(2,2)))
#(16,16)
model.add(Conv2D(512, (3, 3), strides=(1, 1), padding='same', activation='relu'))
model.add(BatchNormalization())
model.add(Conv2D(512, (3, 3), strides=(1, 1), padding='same', activation='relu'))
model.add(BatchNormalization())
model.add(Conv2D(512, (3, 3), strides=(1, 1), padding='same', activation='relu'))
model.add(BatchNormalization())
model.add(UpSampling2D(size=(2, 2)))
#(32,32)
model.add(Conv2D(512, (3, 3), strides=(1, 1), padding='same', activation='relu'))
model.add(BatchNormalization())
model.add(Conv2D(512, (3, 3), strides=(1, 1), padding='same', activation='relu'))
model.add(BatchNormalization())
model.add(Conv2D(512, (3, 3), strides=(1, 1), padding='same', activation='relu'))
model.add(BatchNormalization())
model.add(UpSampling2D(size=(2, 2)))
#(64,64)
model.add(Conv2D(256, (3, 3), strides=(1, 1), padding='same', activation='relu'))
model.add(BatchNormalization())
model.add(Conv2D(256, (3, 3), strides=(1, 1), padding='same', activation='relu'))
model.add(BatchNormalization())
model.add(Conv2D(256, (3, 3), strides=(1, 1), padding='same', activation='relu'))
model.add(BatchNormalization())
model.add(UpSampling2D(size=(2, 2)))
#(128,128)
model.add(Conv2D(128, (3, 3), strides=(1, 1), padding='same', activation='relu'))
model.add(BatchNormalization())
model.add(Conv2D(128, (3, 3), strides=(1, 1), padding='same', activation='relu'))
model.add(BatchNormalization())
model.add(UpSampling2D(size=(2, 2)))
#(256,256)
model.add(Conv2D(64, (3, 3), strides=(1, 1), input_shape=(img_w, img_h,3), padding='same', activation='relu',data_format='channels_last'))
model.add(BatchNormalization())
model.add(Conv2D(64, (3, 3), strides=(1, 1), padding='same', activation='relu'))
model.add(BatchNormalization())
model.add(Conv2D(n_label, (1, 1), strides=(1, 1), padding='same'))
model.add(Activation('softmax'))
model.compile(optimizer=Adam(lr=lr_init, decay=lr_decay),
loss='categorical_crossentropy',
metrics=['categorical_accuracy'])
# model.summary()
return model
def unet(num_classes, input_shape, lr_init, lr_decay):
img_input = Input(input_shape)
# Block 1
x = Conv2D(64, (3, 3), padding='same', name='block1_conv1')(img_input)
x = BatchNormalization()(x)
x = Activation('relu')(x)
x = Conv2D(64, (3, 3), padding='same', name='block1_conv2')(x)
x = BatchNormalization()(x)
block_1_out = Activation('relu')(x)
x = MaxPooling2D()(block_1_out)
# Block 2
x = Conv2D(128, (3, 3), padding='same', name='block2_conv1')(x)
x = BatchNormalization()(x)
x = Activation('relu')(x)
x = Conv2D(128, (3, 3), padding='same', name='block2_conv2')(x)
x = BatchNormalization()(x)
block_2_out = Activation('relu')(x)
x = MaxPooling2D()(block_2_out)
# Block 3
x = Conv2D(256, (3, 3), padding='same', name='block3_conv1')(x)
x = BatchNormalization()(x)
x = Activation('relu')(x)
x = Conv2D(256, (3, 3), padding='same', name='block3_conv2')(x)
x = BatchNormalization()(x)
x = Activation('relu')(x)
x = Conv2D(256, (3, 3), padding='same', name='block3_conv3')(x)
x = BatchNormalization()(x)
block_3_out = Activation('relu')(x)
x = MaxPooling2D()(block_3_out)
# Block 4
x = Conv2D(512, (3, 3), padding='same', name='block4_conv1')(x)
x = BatchNormalization()(x)
x = Activation('relu')(x)
x = Conv2D(512, (3, 3), padding='same', name='block4_conv2')(x)
x = BatchNormalization()(x)
x = Activation('relu')(x)
x = Conv2D(512, (3, 3), padding='same', name='block4_conv3')(x)
x = BatchNormalization()(x)
block_4_out = Activation('relu')(x)
x = MaxPooling2D()(block_4_out)
# Block 5
x = Conv2D(512, (3, 3), padding='same', name='block5_conv1')(x)
x = BatchNormalization()(x)
x = Activation('relu')(x)
x = Conv2D(512, (3, 3), padding='same', name='block5_conv2')(x)
x = BatchNormalization()(x)
x = Activation('relu')(x)
x = Conv2D(512, (3, 3), padding='same', name='block5_conv3')(x)
x = BatchNormalization()(x)
x = Activation('relu')(x)
# UP 1
x = Conv2DTranspose(512, (2, 2), strides=(2, 2), padding='same')(x)
x = BatchNormalization()(x)
x = Activation('relu')(x)
x = concatenate([x, block_4_out])
x = Conv2D(512, (3, 3), padding='same')(x)
x = BatchNormalization()(x)
x = Activation('relu')(x)
x = Conv2D(512, (3, 3), padding='same')(x)
x = BatchNormalization()(x)
x = Activation('relu')(x)
# UP 2
x = Conv2DTranspose(256, (2, 2), strides=(2, 2), padding='same')(x)
x = BatchNormalization()(x)
x = Activation('relu')(x)
x = concatenate([x, block_3_out])
x = Conv2D(256, (3, 3), padding='same')(x)
x = BatchNormalization()(x)
x = Activation('relu')(x)
x = Conv2D(256, (3, 3), padding='same')(x)
x = BatchNormalization()(x)
x = Activation('relu')(x)
# UP 3
x = Conv2DTranspose(128, (2, 2), strides=(2, 2), padding='same')(x)
x = BatchNormalization()(x)
x = Activation('relu')(x)
x = concatenate([x, block_2_out])
x = Conv2D(128, (3, 3), padding='same')(x)
x = BatchNormalization()(x)
x = Activation('relu')(x)
x = Conv2D(128, (3, 3), padding='same')(x)
x = BatchNormalization()(x)
x = Activation('relu')(x)
# UP 4
x = Conv2DTranspose(64, (2, 2), strides=(2, 2), padding='same')(x)
x = BatchNormalization()(x)
x = Activation('relu')(x)
x = concatenate([x, block_1_out])
x = Conv2D(64, (3, 3), padding='same')(x)
x = BatchNormalization()(x)
x = Activation('relu')(x)
x = Conv2D(64, (3, 3), padding='same')(x)
x = BatchNormalization()(x)
x = Activation('relu')(x)
# last conv
x = Conv2D(num_classes, (3, 3), activation='softmax', padding='same')(x)
model = Model(img_input, x)
model.compile(optimizer=Adam(lr=lr_init, decay=lr_decay),
loss='categorical_crossentropy',
metrics=['categorical_accuracy'])
model.summary()
return model
if __name__ == "__main__":
img_w = 256
img_h = 256
lr_init = 0.01
lr_decay = 0.00001
model = SegNet()
model.summary()
print(1)
| 36.820833
| 142
| 0.608012
| 1,183
| 8,837
| 4.469146
| 0.077768
| 0.024589
| 0.071496
| 0.049177
| 0.88084
| 0.876111
| 0.848875
| 0.821638
| 0.821638
| 0.779459
| 0
| 0.073856
| 0.19407
| 8,837
| 239
| 143
| 36.974895
| 0.668492
| 0.022632
| 0
| 0.748603
| 0
| 0
| 0.082192
| 0.005572
| 0
| 0
| 0
| 0
| 0
| 1
| 0.011173
| false
| 0
| 0.027933
| 0
| 0.050279
| 0.005587
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
18cd4de6cc9c583a3059f9bb7f5e1bf0ee801d7a
| 5,269
|
py
|
Python
|
asv_bench/benchmarks/parser_vb.py
|
springcoil/pandas
|
945075ad78cef652039feb50d60092b0580604e6
|
[
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | 2
|
2017-05-07T02:08:12.000Z
|
2017-12-14T01:47:47.000Z
|
asv_bench/benchmarks/parser_vb.py
|
springcoil/pandas
|
945075ad78cef652039feb50d60092b0580604e6
|
[
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null |
asv_bench/benchmarks/parser_vb.py
|
springcoil/pandas
|
945075ad78cef652039feb50d60092b0580604e6
|
[
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | 1
|
2020-12-09T12:02:39.000Z
|
2020-12-09T12:02:39.000Z
|
from .pandas_vb_common import *
import os
from pandas import read_csv, read_table
try:
from cStringIO import StringIO
except ImportError:
from io import StringIO
class read_csv_comment2(object):
goal_time = 0.2
def setup(self):
self.data = ['A,B,C']
self.data = (self.data + (['1,2,3 # comment'] * 100000))
self.data = '\n'.join(self.data)
def time_read_csv_comment2(self):
read_csv(StringIO(self.data), comment='#')
class read_csv_default_converter(object):
goal_time = 0.2
def setup(self):
self.data = '0.1213700904466425978256438611,0.0525708283766902484401839501,0.4174092731488769913994474336\n 0.4096341697147408700274695547,0.1587830198973579909349496119,0.1292545832485494372576795285\n 0.8323255650024565799327547210,0.9694902427379478160318626578,0.6295047811546814475747169126\n 0.4679375305798131323697930383,0.2963942381834381301075609371,0.5268936082160610157032465394\n 0.6685382761849776311890991564,0.6721207066140679753374342908,0.6519975277021627935170045020\n '
self.data = (self.data * 200)
def time_read_csv_default_converter(self):
read_csv(StringIO(self.data), sep=',', header=None, float_precision=None)
class read_csv_precise_converter(object):
goal_time = 0.2
def setup(self):
self.data = '0.1213700904466425978256438611,0.0525708283766902484401839501,0.4174092731488769913994474336\n 0.4096341697147408700274695547,0.1587830198973579909349496119,0.1292545832485494372576795285\n 0.8323255650024565799327547210,0.9694902427379478160318626578,0.6295047811546814475747169126\n 0.4679375305798131323697930383,0.2963942381834381301075609371,0.5268936082160610157032465394\n 0.6685382761849776311890991564,0.6721207066140679753374342908,0.6519975277021627935170045020\n '
self.data = (self.data * 200)
def time_read_csv_precise_converter(self):
read_csv(StringIO(self.data), sep=',', header=None, float_precision='high')
class read_csv_roundtrip_converter(object):
goal_time = 0.2
def setup(self):
self.data = '0.1213700904466425978256438611,0.0525708283766902484401839501,0.4174092731488769913994474336\n 0.4096341697147408700274695547,0.1587830198973579909349496119,0.1292545832485494372576795285\n 0.8323255650024565799327547210,0.9694902427379478160318626578,0.6295047811546814475747169126\n 0.4679375305798131323697930383,0.2963942381834381301075609371,0.5268936082160610157032465394\n 0.6685382761849776311890991564,0.6721207066140679753374342908,0.6519975277021627935170045020\n '
self.data = (self.data * 200)
def time_read_csv_roundtrip_converter(self):
read_csv(StringIO(self.data), sep=',', header=None, float_precision='round_trip')
class read_csv_thou_vb(object):
goal_time = 0.2
def setup(self):
self.N = 10000
self.K = 8
self.format = (lambda x: '{:,}'.format(x))
self.df = DataFrame((np.random.randn(self.N, self.K) * np.random.randint(100, 10000, (self.N, self.K))))
self.df = self.df.applymap(self.format)
self.df.to_csv('test.csv', sep='|')
def time_read_csv_thou_vb(self):
read_csv('test.csv', sep='|', thousands=',')
def teardown(self):
os.remove('test.csv')
class read_csv_vb(object):
goal_time = 0.2
def setup(self):
self.N = 10000
self.K = 8
self.df = DataFrame((np.random.randn(self.N, self.K) * np.random.randint(100, 10000, (self.N, self.K))))
self.df.to_csv('test.csv', sep='|')
def time_read_csv_vb(self):
read_csv('test.csv', sep='|')
def teardown(self):
os.remove('test.csv')
class read_table_multiple_date(object):
goal_time = 0.2
def setup(self):
self.N = 10000
self.K = 8
self.data = 'KORD,19990127, 19:00:00, 18:56:00, 0.8100, 2.8100, 7.2000, 0.0000, 280.0000\n KORD,19990127, 20:00:00, 19:56:00, 0.0100, 2.2100, 7.2000, 0.0000, 260.0000\n KORD,19990127, 21:00:00, 20:56:00, -0.5900, 2.2100, 5.7000, 0.0000, 280.0000\n KORD,19990127, 21:00:00, 21:18:00, -0.9900, 2.0100, 3.6000, 0.0000, 270.0000\n KORD,19990127, 22:00:00, 21:56:00, -0.5900, 1.7100, 5.1000, 0.0000, 290.0000\n '
self.data = (self.data * 200)
def time_read_table_multiple_date(self):
read_table(StringIO(self.data), sep=',', header=None, parse_dates=[[1, 2], [1, 3]])
class read_table_multiple_date_baseline(object):
goal_time = 0.2
def setup(self):
self.N = 10000
self.K = 8
self.data = 'KORD,19990127 19:00:00, 18:56:00, 0.8100, 2.8100, 7.2000, 0.0000, 280.0000\n KORD,19990127 20:00:00, 19:56:00, 0.0100, 2.2100, 7.2000, 0.0000, 260.0000\n KORD,19990127 21:00:00, 20:56:00, -0.5900, 2.2100, 5.7000, 0.0000, 280.0000\n KORD,19990127 21:00:00, 21:18:00, -0.9900, 2.0100, 3.6000, 0.0000, 270.0000\n KORD,19990127 22:00:00, 21:56:00, -0.5900, 1.7100, 5.1000, 0.0000, 290.0000\n '
self.data = (self.data * 200)
def time_read_table_multiple_date_baseline(self):
read_table(StringIO(self.data), sep=',', header=None, parse_dates=[1])
| 47.044643
| 532
| 0.687607
| 712
| 5,269
| 4.973315
| 0.160112
| 0.05874
| 0.031629
| 0.033889
| 0.883084
| 0.866422
| 0.858797
| 0.845806
| 0.845806
| 0.823779
| 0
| 0.431118
| 0.1803
| 5,269
| 112
| 533
| 47.044643
| 0.388747
| 0
| 0
| 0.512821
| 0
| 0.064103
| 0.470588
| 0.267552
| 0
| 0
| 0
| 0
| 0
| 1
| 0.230769
| false
| 0
| 0.076923
| 0
| 0.512821
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 10
|
e1399c753cc8ce10f4e8ea269805de7fb6721c85
| 16,139
|
py
|
Python
|
sdk/python/pulumi_azure/apimanagement/group_user.py
|
henriktao/pulumi-azure
|
f1cbcf100b42b916da36d8fe28be3a159abaf022
|
[
"ECL-2.0",
"Apache-2.0"
] | 109
|
2018-06-18T00:19:44.000Z
|
2022-02-20T05:32:57.000Z
|
sdk/python/pulumi_azure/apimanagement/group_user.py
|
henriktao/pulumi-azure
|
f1cbcf100b42b916da36d8fe28be3a159abaf022
|
[
"ECL-2.0",
"Apache-2.0"
] | 663
|
2018-06-18T21:08:46.000Z
|
2022-03-31T20:10:11.000Z
|
sdk/python/pulumi_azure/apimanagement/group_user.py
|
henriktao/pulumi-azure
|
f1cbcf100b42b916da36d8fe28be3a159abaf022
|
[
"ECL-2.0",
"Apache-2.0"
] | 41
|
2018-07-19T22:37:38.000Z
|
2022-03-14T10:56:26.000Z
|
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
__all__ = ['GroupUserArgs', 'GroupUser']
@pulumi.input_type
class GroupUserArgs:
def __init__(__self__, *,
api_management_name: pulumi.Input[str],
group_name: pulumi.Input[str],
resource_group_name: pulumi.Input[str],
user_id: pulumi.Input[str]):
"""
The set of arguments for constructing a GroupUser resource.
:param pulumi.Input[str] api_management_name: The name of the API Management Service. Changing this forces a new resource to be created.
:param pulumi.Input[str] group_name: The Name of the API Management Group within the API Management Service. Changing this forces a new resource to be created.
:param pulumi.Input[str] resource_group_name: The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
:param pulumi.Input[str] user_id: The ID of the API Management User which should be assigned to this API Management Group. Changing this forces a new resource to be created.
"""
pulumi.set(__self__, "api_management_name", api_management_name)
pulumi.set(__self__, "group_name", group_name)
pulumi.set(__self__, "resource_group_name", resource_group_name)
pulumi.set(__self__, "user_id", user_id)
@property
@pulumi.getter(name="apiManagementName")
def api_management_name(self) -> pulumi.Input[str]:
"""
The name of the API Management Service. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "api_management_name")
@api_management_name.setter
def api_management_name(self, value: pulumi.Input[str]):
pulumi.set(self, "api_management_name", value)
@property
@pulumi.getter(name="groupName")
def group_name(self) -> pulumi.Input[str]:
"""
The Name of the API Management Group within the API Management Service. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "group_name")
@group_name.setter
def group_name(self, value: pulumi.Input[str]):
pulumi.set(self, "group_name", value)
@property
@pulumi.getter(name="resourceGroupName")
def resource_group_name(self) -> pulumi.Input[str]:
"""
The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "resource_group_name")
@resource_group_name.setter
def resource_group_name(self, value: pulumi.Input[str]):
pulumi.set(self, "resource_group_name", value)
@property
@pulumi.getter(name="userId")
def user_id(self) -> pulumi.Input[str]:
"""
The ID of the API Management User which should be assigned to this API Management Group. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "user_id")
@user_id.setter
def user_id(self, value: pulumi.Input[str]):
pulumi.set(self, "user_id", value)
@pulumi.input_type
class _GroupUserState:
def __init__(__self__, *,
api_management_name: Optional[pulumi.Input[str]] = None,
group_name: Optional[pulumi.Input[str]] = None,
resource_group_name: Optional[pulumi.Input[str]] = None,
user_id: Optional[pulumi.Input[str]] = None):
"""
Input properties used for looking up and filtering GroupUser resources.
:param pulumi.Input[str] api_management_name: The name of the API Management Service. Changing this forces a new resource to be created.
:param pulumi.Input[str] group_name: The Name of the API Management Group within the API Management Service. Changing this forces a new resource to be created.
:param pulumi.Input[str] resource_group_name: The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
:param pulumi.Input[str] user_id: The ID of the API Management User which should be assigned to this API Management Group. Changing this forces a new resource to be created.
"""
if api_management_name is not None:
pulumi.set(__self__, "api_management_name", api_management_name)
if group_name is not None:
pulumi.set(__self__, "group_name", group_name)
if resource_group_name is not None:
pulumi.set(__self__, "resource_group_name", resource_group_name)
if user_id is not None:
pulumi.set(__self__, "user_id", user_id)
@property
@pulumi.getter(name="apiManagementName")
def api_management_name(self) -> Optional[pulumi.Input[str]]:
"""
The name of the API Management Service. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "api_management_name")
@api_management_name.setter
def api_management_name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "api_management_name", value)
@property
@pulumi.getter(name="groupName")
def group_name(self) -> Optional[pulumi.Input[str]]:
"""
The Name of the API Management Group within the API Management Service. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "group_name")
@group_name.setter
def group_name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "group_name", value)
@property
@pulumi.getter(name="resourceGroupName")
def resource_group_name(self) -> Optional[pulumi.Input[str]]:
"""
The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "resource_group_name")
@resource_group_name.setter
def resource_group_name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "resource_group_name", value)
@property
@pulumi.getter(name="userId")
def user_id(self) -> Optional[pulumi.Input[str]]:
"""
The ID of the API Management User which should be assigned to this API Management Group. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "user_id")
@user_id.setter
def user_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "user_id", value)
class GroupUser(pulumi.CustomResource):
@overload
def __init__(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
api_management_name: Optional[pulumi.Input[str]] = None,
group_name: Optional[pulumi.Input[str]] = None,
resource_group_name: Optional[pulumi.Input[str]] = None,
user_id: Optional[pulumi.Input[str]] = None,
__props__=None):
"""
Manages an API Management User Assignment to a Group.
## Example Usage
```python
import pulumi
import pulumi_azure as azure
example_user = azure.apimanagement.get_user(user_id="my-user",
api_management_name="example-apim",
resource_group_name="search-service")
example_group_user = azure.apimanagement.GroupUser("exampleGroupUser",
user_id=example_user.id,
group_name="example-group",
resource_group_name=example_user.resource_group_name,
api_management_name=example_user.api_management_name)
```
## Import
API Management Group Users can be imported using the `resource id`, e.g.
```sh
$ pulumi import azure:apimanagement/groupUser:GroupUser example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ApiManagement/service/service1/groups/groupId/users/user123
```
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] api_management_name: The name of the API Management Service. Changing this forces a new resource to be created.
:param pulumi.Input[str] group_name: The Name of the API Management Group within the API Management Service. Changing this forces a new resource to be created.
:param pulumi.Input[str] resource_group_name: The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
:param pulumi.Input[str] user_id: The ID of the API Management User which should be assigned to this API Management Group. Changing this forces a new resource to be created.
"""
...
@overload
def __init__(__self__,
resource_name: str,
args: GroupUserArgs,
opts: Optional[pulumi.ResourceOptions] = None):
"""
Manages an API Management User Assignment to a Group.
## Example Usage
```python
import pulumi
import pulumi_azure as azure
example_user = azure.apimanagement.get_user(user_id="my-user",
api_management_name="example-apim",
resource_group_name="search-service")
example_group_user = azure.apimanagement.GroupUser("exampleGroupUser",
user_id=example_user.id,
group_name="example-group",
resource_group_name=example_user.resource_group_name,
api_management_name=example_user.api_management_name)
```
## Import
API Management Group Users can be imported using the `resource id`, e.g.
```sh
$ pulumi import azure:apimanagement/groupUser:GroupUser example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ApiManagement/service/service1/groups/groupId/users/user123
```
:param str resource_name: The name of the resource.
:param GroupUserArgs args: The arguments to use to populate this resource's properties.
:param pulumi.ResourceOptions opts: Options for the resource.
"""
...
def __init__(__self__, resource_name: str, *args, **kwargs):
resource_args, opts = _utilities.get_resource_args_opts(GroupUserArgs, pulumi.ResourceOptions, *args, **kwargs)
if resource_args is not None:
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
else:
__self__._internal_init(resource_name, *args, **kwargs)
def _internal_init(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
api_management_name: Optional[pulumi.Input[str]] = None,
group_name: Optional[pulumi.Input[str]] = None,
resource_group_name: Optional[pulumi.Input[str]] = None,
user_id: Optional[pulumi.Input[str]] = None,
__props__=None):
if opts is None:
opts = pulumi.ResourceOptions()
if not isinstance(opts, pulumi.ResourceOptions):
raise TypeError('Expected resource options to be a ResourceOptions instance')
if opts.version is None:
opts.version = _utilities.get_version()
if opts.id is None:
if __props__ is not None:
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
__props__ = GroupUserArgs.__new__(GroupUserArgs)
if api_management_name is None and not opts.urn:
raise TypeError("Missing required property 'api_management_name'")
__props__.__dict__["api_management_name"] = api_management_name
if group_name is None and not opts.urn:
raise TypeError("Missing required property 'group_name'")
__props__.__dict__["group_name"] = group_name
if resource_group_name is None and not opts.urn:
raise TypeError("Missing required property 'resource_group_name'")
__props__.__dict__["resource_group_name"] = resource_group_name
if user_id is None and not opts.urn:
raise TypeError("Missing required property 'user_id'")
__props__.__dict__["user_id"] = user_id
super(GroupUser, __self__).__init__(
'azure:apimanagement/groupUser:GroupUser',
resource_name,
__props__,
opts)
@staticmethod
def get(resource_name: str,
id: pulumi.Input[str],
opts: Optional[pulumi.ResourceOptions] = None,
api_management_name: Optional[pulumi.Input[str]] = None,
group_name: Optional[pulumi.Input[str]] = None,
resource_group_name: Optional[pulumi.Input[str]] = None,
user_id: Optional[pulumi.Input[str]] = None) -> 'GroupUser':
"""
Get an existing GroupUser resource's state with the given name, id, and optional extra
properties used to qualify the lookup.
:param str resource_name: The unique name of the resulting resource.
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] api_management_name: The name of the API Management Service. Changing this forces a new resource to be created.
:param pulumi.Input[str] group_name: The Name of the API Management Group within the API Management Service. Changing this forces a new resource to be created.
:param pulumi.Input[str] resource_group_name: The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
:param pulumi.Input[str] user_id: The ID of the API Management User which should be assigned to this API Management Group. Changing this forces a new resource to be created.
"""
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
__props__ = _GroupUserState.__new__(_GroupUserState)
__props__.__dict__["api_management_name"] = api_management_name
__props__.__dict__["group_name"] = group_name
__props__.__dict__["resource_group_name"] = resource_group_name
__props__.__dict__["user_id"] = user_id
return GroupUser(resource_name, opts=opts, __props__=__props__)
@property
@pulumi.getter(name="apiManagementName")
def api_management_name(self) -> pulumi.Output[str]:
"""
The name of the API Management Service. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "api_management_name")
@property
@pulumi.getter(name="groupName")
def group_name(self) -> pulumi.Output[str]:
"""
The Name of the API Management Group within the API Management Service. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "group_name")
@property
@pulumi.getter(name="resourceGroupName")
def resource_group_name(self) -> pulumi.Output[str]:
"""
The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "resource_group_name")
@property
@pulumi.getter(name="userId")
def user_id(self) -> pulumi.Output[str]:
"""
The ID of the API Management User which should be assigned to this API Management Group. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "user_id")
| 47.328446
| 226
| 0.671913
| 2,046
| 16,139
| 5.065982
| 0.083089
| 0.105355
| 0.072938
| 0.051327
| 0.852291
| 0.828847
| 0.816594
| 0.801737
| 0.789194
| 0.763049
| 0
| 0.006136
| 0.242704
| 16,139
| 340
| 227
| 47.467647
| 0.841924
| 0.412355
| 0
| 0.564972
| 1
| 0
| 0.120451
| 0.009418
| 0
| 0
| 0
| 0
| 0
| 1
| 0.152542
| false
| 0.00565
| 0.028249
| 0
| 0.271186
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
e1935e55123ceba264733a98587a6e94fbf3ae11
| 3,907
|
py
|
Python
|
fetch/__init__.py
|
janwithb/custom-fetch-gym-environment
|
0f5ca00d5b1f81df2c9d0b540ac1960edfd79caf
|
[
"Apache-2.0"
] | null | null | null |
fetch/__init__.py
|
janwithb/custom-fetch-gym-environment
|
0f5ca00d5b1f81df2c9d0b540ac1960edfd79caf
|
[
"Apache-2.0"
] | null | null | null |
fetch/__init__.py
|
janwithb/custom-fetch-gym-environment
|
0f5ca00d5b1f81df2c9d0b540ac1960edfd79caf
|
[
"Apache-2.0"
] | null | null | null |
from gym.envs.registration import register
register(
id='FetchReach-v2',
entry_point='fetch.reach:FetchReachEnv',
kwargs={
'reward_type': 'dense',
'randomize_light': False,
'randomize_camera': False,
'randomize_target_color': False,
'randomize_target_size': False,
'randomize_table_color': False,
'randomize_floor_color': False,
'randomize_background_color': False,
'randomize_robot_color': False
},
max_episode_steps=250,
)
register(
id='FetchReachRandom-v2',
entry_point='fetch.reach:FetchReachEnv',
kwargs={
'reward_type': 'dense',
'randomize_light': True,
'randomize_camera': True,
'randomize_target_color': True,
'randomize_target_size': True,
'randomize_table_color': True,
'randomize_floor_color': True,
'randomize_background_color': True,
'randomize_robot_color': True
},
max_episode_steps=250,
)
register(
id='FetchReachRandomLight-v2',
entry_point='fetch.reach:FetchReachEnv',
kwargs={
'reward_type': 'dense',
'randomize_light': True,
'randomize_camera': False,
'randomize_target_color': False,
'randomize_target_size': False,
'randomize_table_color': False,
'randomize_floor_color': False,
'randomize_background_color': False,
'randomize_robot_color': False
},
max_episode_steps=250,
)
register(
id='FetchReachRandomCamera-v2',
entry_point='fetch.reach:FetchReachEnv',
kwargs={
'reward_type': 'dense',
'randomize_light': False,
'randomize_camera': True,
'randomize_target_color': False,
'randomize_target_size': False,
'randomize_table_color': False,
'randomize_floor_color': False,
'randomize_background_color': False,
'randomize_robot_color': False
},
max_episode_steps=250,
)
register(
id='FetchReachRandomTarget-v2',
entry_point='fetch.reach:FetchReachEnv',
kwargs={
'reward_type': 'dense',
'randomize_light': False,
'randomize_camera': False,
'randomize_target_color': True,
'randomize_target_size': True,
'randomize_table_color': False,
'randomize_floor_color': False,
'randomize_background_color': False,
'randomize_robot_color': False
},
max_episode_steps=250,
)
register(
id='FetchReachRandomFloor-v2',
entry_point='fetch.reach:FetchReachEnv',
kwargs={
'reward_type': 'dense',
'randomize_light': False,
'randomize_camera': False,
'randomize_target_color': False,
'randomize_target_size': False,
'randomize_table_color': True,
'randomize_floor_color': True,
'randomize_background_color': False,
'randomize_robot_color': False
},
max_episode_steps=250,
)
register(
id='FetchReachRandomBackground-v2',
entry_point='fetch.reach:FetchReachEnv',
kwargs={
'reward_type': 'dense',
'randomize_light': False,
'randomize_camera': False,
'randomize_target_color': False,
'randomize_target_size': False,
'randomize_table_color': False,
'randomize_floor_color': False,
'randomize_background_color': True,
'randomize_robot_color': False
},
max_episode_steps=250,
)
register(
id='FetchReachRandomRobot-v2',
entry_point='fetch.reach:FetchReachEnv',
kwargs={
'reward_type': 'dense',
'randomize_light': False,
'randomize_camera': False,
'randomize_target_color': False,
'randomize_target_size': False,
'randomize_table_color': False,
'randomize_floor_color': False,
'randomize_background_color': False,
'randomize_robot_color': True
},
max_episode_steps=250,
)
| 28.107914
| 44
| 0.641925
| 382
| 3,907
| 6.188482
| 0.10733
| 0.248731
| 0.192893
| 0.05753
| 0.91286
| 0.91286
| 0.905245
| 0.901861
| 0.875212
| 0.875212
| 0
| 0.010818
| 0.242897
| 3,907
| 138
| 45
| 28.311594
| 0.788371
| 0
| 0
| 0.806202
| 0
| 0
| 0.464551
| 0.360123
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.007752
| 0
| 0.007752
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 10
|
e1b03d92f4f5da7c8c531370a0809db0fe9732c3
| 38,979
|
py
|
Python
|
tests/dashboard/test_permissions.py
|
probablysalty/bonsai
|
06e74acd890ac53e9332aef13a8b47b88e13723c
|
[
"BSD-3-Clause"
] | 9
|
2021-08-08T22:42:18.000Z
|
2021-11-23T06:50:14.000Z
|
tests/dashboard/test_permissions.py
|
probablysalty/bonsai
|
06e74acd890ac53e9332aef13a8b47b88e13723c
|
[
"BSD-3-Clause"
] | 5
|
2020-03-24T16:37:25.000Z
|
2021-06-10T21:24:54.000Z
|
tests/dashboard/test_permissions.py
|
probablysalty/bonsai
|
06e74acd890ac53e9332aef13a8b47b88e13723c
|
[
"BSD-3-Clause"
] | 1
|
2018-12-17T03:49:20.000Z
|
2018-12-17T03:49:20.000Z
|
from django.urls import reverse
from saleor.account.models import User
def test_staff_can_access_product_details(
staff_client, staff_user, permission_manage_products, product):
assert not staff_user.has_perm('product.manage_products')
url = reverse('dashboard:product-details', kwargs={'pk': product.pk})
response = staff_client.get(url)
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_products)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('product.manage_products')
response = staff_client.post(url)
assert response.status_code == 200
def test_staff_can_access_product_toggle_is_published(
staff_client, staff_user, permission_manage_products, product):
assert not staff_user.has_perm('product.manage_products')
url = reverse('dashboard:product-publish', kwargs={'pk': product.pk})
response = staff_client.post(url)
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_products)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('product.manage_products')
response = staff_client.post(url)
assert response.status_code == 200
def test_staff_can_access_product_select_type(
staff_client, staff_user, permission_manage_products):
assert not staff_user.has_perm('product.manage_products')
url = reverse('dashboard:product-add-select-type')
response = staff_client.get(url)
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_products)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('product.manage_products')
response = staff_client.post(url)
assert response.status_code == 200
def test_staff_can_access_product_create(
staff_client, staff_user, permission_manage_products, product_type):
assert not staff_user.has_perm('product.manage_products')
url = reverse('dashboard:product-add', kwargs={'type_pk': product_type.pk})
response = staff_client.get(url)
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_products)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('product.manage_products')
response = staff_client.post(url)
assert response.status_code == 200
def test_staff_can_access_product_edit(
staff_client, staff_user, permission_manage_products, product):
assert not staff_user.has_perm('product.manage_products')
url = reverse('dashboard:product-update', kwargs={'pk': product.pk})
response = staff_client.get(url)
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_products)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('product.manage_products')
response = staff_client.post(url)
assert response.status_code == 200
def test_staff_can_access_product_delete(
staff_client, staff_user, permission_manage_products, product):
assert not staff_user.has_perm('product.manage_products')
url = reverse('dashboard:product-delete', kwargs={'pk': product.pk})
response = staff_client.get(url)
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_products)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('product.manage_products')
response = staff_client.get(url)
assert response.status_code == 200
def test_staff_can_view_product_list(
staff_client, staff_user, permission_manage_products):
assert not staff_user.has_perm('product.manage_products')
response = staff_client.get(reverse('dashboard:product-list'))
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_products)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('product.manage_products')
response = staff_client.get(reverse('dashboard:product-list'))
assert response.status_code == 200
def test_staff_can_view_category_list(
staff_client, staff_user, permission_manage_products):
assert not staff_user.has_perm('product.manage_products')
response = staff_client.get(reverse('dashboard:category-list'))
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_products)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('product.manage_products')
response = staff_client.get(reverse('dashboard:category-list'))
assert response.status_code == 200
def test_staff_can_view_category_add_root(
staff_client, staff_user, permission_manage_products):
assert not staff_user.has_perm('product.manage_products')
response = staff_client.get(reverse('dashboard:category-add'))
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_products)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('product.manage_products')
response = staff_client.get(reverse('dashboard:category-add'))
assert response.status_code == 200
def test_staff_can_view_category_add_subcategory(
staff_client, staff_user, permission_manage_products, default_category):
assert not staff_user.has_perm('product.manage_products')
response = staff_client.get(
reverse('dashboard:category-add', args=[default_category.pk]))
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_products)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('product.manage_products')
response = staff_client.get(
reverse('dashboard:category-add', args=[default_category.pk]))
assert response.status_code == 200
def test_staff_can_view_category_edit(
staff_client, staff_user, permission_manage_products, default_category):
assert not staff_user.has_perm('product.manage_products')
response = staff_client.get(
reverse('dashboard:category-edit', args=[default_category.pk]))
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_products)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('product.manage_products')
response = staff_client.get(
reverse('dashboard:category-edit', args=[default_category.pk]))
assert response.status_code == 200
def test_staff_can_view_category_delete(
staff_client, staff_user, permission_manage_products, default_category):
assert not staff_user.has_perm('product.manage_products')
response = staff_client.get(
reverse('dashboard:category-delete', args=[default_category.pk]))
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_products)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('product.manage_products')
response = staff_client.get(
reverse('dashboard:category-delete', args=[default_category.pk]))
assert response.status_code == 200
def test_staff_can_view_sale_list(
staff_client, staff_user, permission_manage_discounts):
assert not staff_user.has_perm('discount.manage_discounts')
response = staff_client.get(reverse('dashboard:sale-list'))
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_discounts)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('discount.manage_discounts')
response = staff_client.get(reverse('dashboard:sale-list'))
assert response.status_code == 200
def test_staff_can_view_sale_update(
staff_client, staff_user, permission_manage_discounts, sale):
assert not staff_user.has_perm('discount.manage_discounts')
response = staff_client.get(
reverse('dashboard:sale-update', args=[sale.pk]))
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_discounts)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('discount.manage_discounts')
response = staff_client.get(
reverse('dashboard:sale-update', args=[sale.pk]))
assert response.status_code == 200
def test_staff_can_view_sale_add(
staff_client, staff_user, permission_manage_discounts, sale):
assert not staff_user.has_perm('discount.manage_discounts')
response = staff_client.get(reverse('dashboard:sale-add'))
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_discounts)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('discount.manage_discounts')
response = staff_client.get(reverse('dashboard:sale-add'))
assert response.status_code == 200
def test_staff_can_view_sale_delete(
staff_client, staff_user, permission_manage_discounts, sale):
assert not staff_user.has_perm('discount.manage_discounts')
response = staff_client.get(
reverse('dashboard:sale-delete', args=[sale.pk]))
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_discounts)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('discount.manage_discounts')
response = staff_client.get(
reverse('dashboard:sale-delete', args=[sale.pk]))
assert response.status_code == 200
def test_staff_can_view_voucher_list(
staff_client, staff_user, permission_manage_discounts):
assert not staff_user.has_perm('discount.manage_discounts')
response = staff_client.get(reverse('dashboard:voucher-list'))
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_discounts)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('discount.manage_discounts')
response = staff_client.get(reverse('dashboard:voucher-list'))
assert response.status_code == 200
def test_staff_can_view_voucher_update(
staff_client, staff_user, permission_manage_discounts, voucher):
assert not staff_user.has_perm('discount.manage_discounts')
response = staff_client.get(
reverse('dashboard:voucher-update', args=[voucher.pk]))
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_discounts)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('discount.manage_discounts')
response = staff_client.get(
reverse('dashboard:voucher-update', args=[voucher.pk]))
assert response.status_code == 200
def test_staff_can_view_voucher_add(
staff_client, staff_user, permission_manage_discounts):
assert not staff_user.has_perm('discount.manage_discounts')
response = staff_client.get(reverse('dashboard:voucher-add'))
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_discounts)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('discount.manage_discounts')
response = staff_client.get(reverse('dashboard:voucher-add'))
assert response.status_code == 200
def test_staff_can_view_voucher_delete(
staff_client, staff_user, permission_manage_discounts, voucher):
assert not staff_user.has_perm('discount.manage_discounts')
response = staff_client.get(
reverse('dashboard:voucher-delete', args=[voucher.pk]))
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_discounts)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('discount.manage_discounts')
response = staff_client.get(
reverse('dashboard:voucher-delete', args=[voucher.pk]))
assert response.status_code == 200
def test_staff_can_view_order_list(
staff_client, staff_user, permission_manage_orders):
assert not staff_user.has_perm('order.manage_orders')
response = staff_client.get(reverse('dashboard:orders'))
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_orders)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('order.manage_orders')
response = staff_client.get(reverse('dashboard:orders'))
assert response.status_code == 200
def test_staff_can_view_order_details(
staff_client, staff_user, permission_manage_orders, order_with_lines):
assert not staff_user.has_perm('order.manage_orders')
response = staff_client.get(
reverse('dashboard:order-details', args=[order_with_lines.pk]))
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_orders)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('order.manage_orders')
response = staff_client.get(
reverse('dashboard:order-details', args=[order_with_lines.pk]))
assert response.status_code == 200
def test_staff_can_view_order_add_note(
staff_client, staff_user, permission_manage_orders, order):
assert not staff_user.has_perm('order.manage_orders')
response = staff_client.get(
reverse('dashboard:order-add-note', args=[order.pk]))
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_orders)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('order.manage_orders')
response = staff_client.get(
reverse('dashboard:order-add-note', args=[order.pk]))
assert response.status_code == 200
def test_staff_can_view_cancel_order(
staff_client, staff_user, permission_manage_orders, order):
assert not staff_user.has_perm('order.manage_orders')
response = staff_client.get(
reverse('dashboard:order-cancel', args=[order.pk]))
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_orders)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('order.manage_orders')
response = staff_client.get(
reverse('dashboard:order-cancel', args=[order.pk]))
assert response.status_code == 200
def test_staff_can_view_billing_address_edit(
staff_client, staff_user, permission_manage_orders, order):
assert not staff_user.has_perm('order.manage_orders')
response = staff_client.get(
reverse('dashboard:address-edit', args=[order.pk, 'billing']))
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_orders)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('order.manage_orders')
response = staff_client.get(
reverse('dashboard:address-edit', args=[order.pk, 'billing']))
assert response.status_code == 200
def test_staff_can_view_customers_list(
staff_client, staff_user, permission_manage_users):
assert not staff_user.has_perm('account.manage_users')
response = staff_client.get(reverse('dashboard:customers'))
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_users)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('account.manage_users')
response = staff_client.get(reverse('dashboard:customers'))
assert response.status_code == 200
def test_staff_can_view_customer_details(
staff_client, staff_user, permission_manage_users, customer_user,
order_with_lines):
assert not staff_user.has_perm('account.manage_users')
response = staff_client.get(
reverse('dashboard:customer-details', args=[customer_user.pk]))
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_users)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('account.manage_users')
response = staff_client.get(
reverse('dashboard:customer-details', args=[customer_user.pk]))
assert response.status_code == 200
response = staff_client.get(
reverse('dashboard:order-details', args=[order_with_lines.pk]))
assert response.status_code == 302
def test_staff_can_view_staff_members_list(
staff_client, staff_user, permission_manage_staff):
assert not staff_user.has_perm('account.manage_staff')
response = staff_client.get(reverse('dashboard:staff-list'))
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_staff)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('account.manage_staff')
response = staff_client.get(reverse('dashboard:staff-list'))
assert response.status_code == 200
def test_staff_can_view_detail_create_and_delete_staff_members(
staff_client, staff_user, permission_manage_staff):
assert not staff_user.has_perm('account.manage_staff')
response = staff_client.get(reverse('dashboard:staff-create'))
assert response.status_code == 302
response = staff_client.get(
reverse('dashboard:staff-delete', args=[staff_user.pk]))
assert response.status_code == 302
response = staff_client.get(
reverse('dashboard:staff-details', args=[staff_user.pk]))
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_staff)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('account.manage_staff')
response = staff_client.get(reverse('dashboard:staff-create'))
assert response.status_code == 200
response = staff_client.get(
reverse('dashboard:staff-delete', args=[staff_user.pk]))
assert response.status_code == 200
response = staff_client.get(
reverse('dashboard:staff-details', args=[staff_user.pk]))
assert response.status_code == 200
def test_staff_with_permissions_can_view_product_types_list(
staff_client, staff_user, permission_manage_products):
assert not staff_user.has_perm('product.manage_products')
response = staff_client.get(reverse('dashboard:product-type-list'))
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_products)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('product.manage_products')
response = staff_client.get(reverse('dashboard:product-type-list'))
assert response.status_code == 200
def test_staff_with_permissions_can_edit_add_and_delete_product_types_list(
staff_client, staff_user, permission_manage_products, product_type):
assert not staff_user.has_perm('product.manage_products')
response = staff_client.get(
reverse('dashboard:product-type-update', args=[product_type.pk]))
assert response.status_code == 302
response = staff_client.get(
reverse('dashboard:product-type-delete', args=[product_type.pk]))
assert response.status_code == 302
response = staff_client.get(reverse('dashboard:product-type-add'))
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_products)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('product.manage_products')
response = staff_client.get(
reverse('dashboard:product-type-update', args=[product_type.pk]))
assert response.status_code == 200
response = staff_client.get(
reverse('dashboard:product-type-delete', args=[product_type.pk]))
assert response.status_code == 200
response = staff_client.get(reverse('dashboard:product-type-add'))
assert response.status_code == 200
def test_staff_can_access_variant_details(
staff_client, staff_user, permission_manage_products, product):
product_type = product.product_type
product_type.has_variants = True
product_type.save()
variant = product.variants.get()
assert not staff_user.has_perm('product.manage_products')
url = reverse(
'dashboard:variant-details',
kwargs={
'product_pk': product.pk,
'variant_pk': variant.pk})
response = staff_client.get(url)
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_products)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('product.manage_products')
response = staff_client.get(url)
assert response.status_code == 200
def test_staff_can_access_variant_create(
staff_client, staff_user, permission_manage_products, product):
assert not staff_user.has_perm('product.manage_products')
url = reverse('dashboard:variant-add', kwargs={'product_pk': product.pk})
response = staff_client.get(url)
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_products)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('product.manage_products')
response = staff_client.get(url)
assert response.status_code == 200
def test_staff_can_access_variant_edit(
staff_client, staff_user, permission_manage_products, product):
variant = product.variants.get()
assert not staff_user.has_perm('product.manage_products')
url = reverse(
'dashboard:variant-update',
kwargs={
'product_pk': product.pk,
'variant_pk': variant.pk})
response = staff_client.get(url)
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_products)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('product.manage_products')
response = staff_client.get(url)
assert response.status_code == 200
def test_staff_can_access_variant_delete(
staff_client, staff_user, permission_manage_products, product):
variant = product.variants.get()
assert not staff_user.has_perm('product.manage_products')
url = reverse(
'dashboard:variant-delete',
kwargs={
'product_pk': product.pk,
'variant_pk': variant.pk})
response = staff_client.get(url)
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_products)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('product.manage_products')
response = staff_client.get(url)
assert response.status_code == 200
def test_staff_can_access_variant_images(
staff_client, staff_user, permission_manage_products, product):
variant = product.variants.get()
assert not staff_user.has_perm('product.manage_products')
url = reverse(
'dashboard:variant-images',
kwargs={
'product_pk': product.pk,
'variant_pk': variant.pk})
response = staff_client.get(url)
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_products)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('product.manage_products')
response = staff_client.get(url)
assert response.status_code == 200
def test_staff_can_access_product_image_list(
staff_client, staff_user, permission_manage_products, product):
assert not staff_user.has_perm('product.manage_products')
url = reverse(
'dashboard:product-image-list', kwargs={'product_pk': product.pk})
response = staff_client.get(url)
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_products)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('product.manage_products')
response = staff_client.get(url)
assert response.status_code == 200
def test_staff_can_access_product_image_add(
staff_client, staff_user, permission_manage_products, product):
assert not staff_user.has_perm('product.manage_products')
url = reverse(
'dashboard:product-image-add', kwargs={'product_pk': product.pk})
response = staff_client.get(url)
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_products)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('product.manage_products')
response = staff_client.get(url)
assert response.status_code == 200
def test_staff_can_access_product_image_update(
staff_client, staff_user, permission_manage_products, product_with_image):
product_image = product_with_image.images.get()
assert not staff_user.has_perm('product.manage_products')
url = reverse(
'dashboard:product-image-update',
kwargs={
'product_pk': product_with_image.pk,
'img_pk': product_image.pk})
response = staff_client.get(url)
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_products)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('product.manage_products')
response = staff_client.get(url)
assert response.status_code == 200
def test_staff_can_access_product_image_delete(
staff_client, staff_user, permission_manage_products, product_with_image):
product_image = product_with_image.images.get()
assert not staff_user.has_perm('product.manage_products')
url = reverse(
'dashboard:product-image-delete',
kwargs={
'product_pk': product_with_image.pk,
'img_pk': product_image.pk})
response = staff_client.get(url)
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_products)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('product.manage_products')
response = staff_client.get(url)
assert response.status_code == 200
def test_staff_with_permissions_can_view_products_attributes_list(
staff_client, staff_user, permission_manage_products, color_attribute):
assert not staff_user.has_perm('product.manage_products')
response = staff_client.get(reverse('dashboard:product-attributes'))
assert response.status_code == 302
response = staff_client.get(
reverse(
'dashboard:product-attribute-details', args=[color_attribute.pk]))
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_products)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('product.manage_products')
response = staff_client.get(reverse('dashboard:product-attributes'))
assert response.status_code == 200
response = staff_client.get(
reverse(
'dashboard:product-attribute-details', args=[color_attribute.pk]))
assert response.status_code == 200
def test_staff_with_permissions_can_update_add_and_delete_products_attributes(
staff_client, staff_user, permission_manage_products, color_attribute):
assert not staff_user.has_perm('product.manage_products')
response = staff_client.get(
reverse(
'dashboard:product-attribute-update', args=[color_attribute.pk]))
assert response.status_code == 302
response = staff_client.get(
reverse(
'dashboard:product-attribute-delete', args=[color_attribute.pk]))
assert response.status_code == 302
response = staff_client.get(reverse('dashboard:product-attribute-add'))
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_products)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('product.manage_products')
response = staff_client.get(
reverse(
'dashboard:product-attribute-update', args=[color_attribute.pk]))
assert response.status_code == 200
response = staff_client.get(
reverse(
'dashboard:product-attribute-delete', args=[color_attribute.pk]))
assert response.status_code == 200
response = staff_client.get(reverse('dashboard:product-attribute-add'))
assert response.status_code == 200
def test_staff_can_access_attribute_create(
staff_client, staff_user, permission_manage_products, color_attribute):
assert not staff_user.has_perm('product.manage_products')
url = reverse(
'dashboard:product-attribute-value-add',
kwargs={'attribute_pk': color_attribute.pk})
response = staff_client.get(url)
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_products)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('product.manage_products')
response = staff_client.get(url)
assert response.status_code == 200
def test_staff_can_access_attribute_edit(
staff_client, staff_user, permission_manage_products, color_attribute):
value = color_attribute.values.first()
assert not staff_user.has_perm('product.manage_products')
url = reverse(
'dashboard:product-attribute-value-update',
kwargs={
'attribute_pk': color_attribute.pk,
'value_pk': value.pk})
response = staff_client.get(url)
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_products)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('product.manage_products')
response = staff_client.get(url)
assert response.status_code == 200
def test_staff_can_access_attribute_delete(
staff_client, staff_user, permission_manage_products, color_attribute):
value = color_attribute.values.first()
assert not staff_user.has_perm('product.manage_products')
url = reverse(
'dashboard:product-attribute-value-delete',
kwargs={
'attribute_pk': color_attribute.pk,
'value_pk': value.pk})
response = staff_client.get(url)
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_products)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('product.manage_products')
response = staff_client.get(url)
assert response.status_code == 200
def test_staff_with_permissions_can_view_shipping_methods_and_details(
staff_client, staff_user, permission_manage_shipping, shipping_method):
assert not staff_user.has_perm('shipping.manage_shipping')
response = staff_client.get(reverse('dashboard:shipping-methods'))
assert response.status_code == 302
response = staff_client.get(
reverse(
'dashboard:shipping-method-details', args=[shipping_method.pk]))
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_shipping)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('shipping.manage_shipping')
response = staff_client.get(reverse('dashboard:shipping-methods'))
assert response.status_code == 200
response = staff_client.get(
reverse(
'dashboard:shipping-method-details', args=[shipping_method.pk]))
assert response.status_code == 200
def test_staff_with_permissions_can_update_add_and_delete_shipping_method(
staff_client, staff_user, permission_manage_shipping, shipping_method):
assert not staff_user.has_perm('shipping.manage_shipping')
response = staff_client.get(
reverse('dashboard:shipping-method-update', args=[shipping_method.pk]))
assert response.status_code == 302
response = staff_client.get(
reverse('dashboard:shipping-method-delete', args=[shipping_method.pk]))
assert response.status_code == 302
response = staff_client.get(reverse('dashboard:shipping-method-add'))
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_shipping)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('shipping.manage_shipping')
response = staff_client.get(
reverse('dashboard:shipping-method-update', args=[shipping_method.pk]))
assert response.status_code == 200
response = staff_client.get(
reverse('dashboard:shipping-method-delete', args=[shipping_method.pk]))
assert response.status_code == 200
response = staff_client.get(reverse('dashboard:shipping-method-add'))
assert response.status_code == 200
def test_staff_with_permissions_can_edit_customer(
staff_client, customer_user, staff_user, permission_manage_users):
assert customer_user.email == 'test@example.com'
response = staff_client.get(
reverse('dashboard:customer-update', args=[customer_user.pk]))
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_users)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('account.manage_users')
response = staff_client.get(
reverse('dashboard:customer-update', args=[customer_user.pk]))
assert response.status_code == 200
url = reverse('dashboard:customer-update', args=[customer_user.pk])
data = {'email': 'newemail@example.com', 'is_active': True}
staff_client.post(url, data)
customer_user = User.objects.get(pk=customer_user.pk)
assert customer_user.email == 'newemail@example.com'
assert customer_user.is_active
def test_staff_with_permissions_can_add_customer(
staff_client, staff_user, permission_manage_users):
response = staff_client.get(reverse('dashboard:customer-create'))
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_users)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('account.manage_users')
response = staff_client.get(reverse('dashboard:customer-create'))
assert response.status_code == 200
url = reverse('dashboard:customer-create')
data = {'email': 'newcustomer@example.com', 'is_active': True}
staff_client.post(url, data)
customer = User.objects.get(email='newcustomer@example.com')
assert customer.is_active
def test_staff_can_view_and_edit_site_settings(
staff_client, staff_user, site_settings, permission_manage_settings):
assert not staff_user.has_perm('site.manage_settings')
response = staff_client.get(
reverse('dashboard:site-update', args=[site_settings.pk]))
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_settings)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('site.manage_settings')
response = staff_client.get(
reverse('dashboard:site-update', args=[site_settings.pk]))
assert response.status_code == 200
def test_staff_can_view_and_edit_taxes_settings(
staff_client, staff_user, site_settings, permission_manage_settings):
assert not staff_user.has_perm('site.manage_settings')
url = reverse('dashboard:configure-taxes')
response = staff_client.get(url)
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_settings)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('site.manage_settings')
response = staff_client.get(url)
def test_staff_can_view_menus_and_details(
staff_client, staff_user, permission_manage_menus, menu_item):
menu_list_url = reverse('dashboard:menu-list')
menu_details_url = reverse(
'dashboard:menu-details', args=[menu_item.menu.pk])
menu_item_details_url = reverse(
'dashboard:menu-item-details', args=[menu_item.menu.pk, menu_item.pk])
assert not staff_user.has_perm('menu.manage_menus')
response = staff_client.get(menu_list_url)
assert response.status_code == 302
response = staff_client.get(menu_details_url)
assert response.status_code == 302
response = staff_client.get(menu_item_details_url)
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_menus)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('menu.manage_menus')
response = staff_client.get(menu_list_url)
assert response.status_code == 200
response = staff_client.get(menu_details_url)
assert response.status_code == 200
response = staff_client.get(menu_item_details_url)
assert response.status_code == 200
def test_staff_can_manage_menuss(
staff_client, staff_user, permission_manage_menus, menu_item):
menu_add_url = reverse('dashboard:menu-add')
menu_edit_url = reverse('dashboard:menu-edit', args=[menu_item.menu.pk])
menu_delete_url = reverse(
'dashboard:menu-delete', args=[menu_item.menu.pk])
assert not staff_user.has_perm('menu.manage_menus')
response = staff_client.get(menu_add_url)
assert response.status_code == 302
response = staff_client.get(menu_edit_url)
assert response.status_code == 302
response = staff_client.get(menu_delete_url)
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_menus)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('menu.manage_menus')
response = staff_client.get(menu_add_url)
assert response.status_code == 200
response = staff_client.get(menu_edit_url)
assert response.status_code == 200
response = staff_client.get(menu_delete_url)
assert response.status_code == 200
def test_staff_can_manage_menus_items(
staff_client, staff_user, permission_manage_menus, menu_item):
menu_item_add_url = reverse(
'dashboard:menu-item-add', args=[menu_item.menu.pk, menu_item.pk])
menu_item_edit_url = reverse(
'dashboard:menu-item-edit', args=[menu_item.menu.pk, menu_item.pk])
menu_item_delete_url = reverse(
'dashboard:menu-item-delete', args=[menu_item.menu.pk, menu_item.pk])
assert not staff_user.has_perm('menu.manage_menus')
response = staff_client.get(menu_item_add_url)
assert response.status_code == 302
response = staff_client.get(menu_item_edit_url)
assert response.status_code == 302
response = staff_client.get(menu_item_delete_url)
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_menus)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm('menu.manage_menus')
response = staff_client.get(menu_item_add_url)
assert response.status_code == 200
response = staff_client.get(menu_item_edit_url)
assert response.status_code == 200
response = staff_client.get(menu_item_delete_url)
assert response.status_code == 200
def test_staff_can_remove_user(staff_client, staff_user, permission_manage_users):
url = reverse('dashboard:customer-delete', args=[staff_user.pk])
response = staff_client.get(url)
assert response.status_code == 302
staff_user.user_permissions.add(permission_manage_users)
staff_user = User.objects.get(pk=staff_user.pk)
response = staff_client.get(url)
assert response.status_code == 200
| 41.335101
| 82
| 0.74848
| 5,155
| 38,979
| 5.334821
| 0.020757
| 0.108323
| 0.098796
| 0.123923
| 0.969201
| 0.956583
| 0.95102
| 0.939602
| 0.932839
| 0.924912
| 0
| 0.012869
| 0.150773
| 38,979
| 942
| 83
| 41.378981
| 0.817926
| 0
| 0
| 0.854712
| 0
| 0
| 0.144103
| 0.115395
| 0
| 0
| 0
| 0
| 0.329843
| 1
| 0.07199
| false
| 0
| 0.002618
| 0
| 0.074607
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
beee17042d01b3c3387a19f8763f1e3748321bed
| 29,324
|
py
|
Python
|
Contents/Libraries/Shared/rebulk/test/test_pattern.py
|
jippo015/Sub-Zero.bundle
|
734e0f7128c05c0f639e11e7dfc77daa1014064b
|
[
"MIT"
] | 1,553
|
2015-11-09T02:17:06.000Z
|
2022-03-31T20:24:52.000Z
|
Contents/Libraries/Shared/rebulk/test/test_pattern.py
|
saiterlz/Sub-Zero.bundle
|
1a0bb9c3e4be84be35d46672907783363fe5a87b
|
[
"MIT"
] | 691
|
2015-11-05T21:32:26.000Z
|
2022-03-17T10:52:45.000Z
|
Contents/Libraries/Shared/rebulk/test/test_pattern.py
|
saiterlz/Sub-Zero.bundle
|
1a0bb9c3e4be84be35d46672907783363fe5a87b
|
[
"MIT"
] | 162
|
2015-11-06T19:38:55.000Z
|
2022-03-16T02:42:41.000Z
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# pylint: disable=no-self-use, pointless-statement, missing-docstring, unbalanced-tuple-unpacking, len-as-condition
import re
import pytest
from ..pattern import StringPattern, RePattern, FunctionalPattern, REGEX_AVAILABLE
from ..match import Match
class TestStringPattern(object):
"""
Tests for StringPattern matching
"""
input_string = "An Abyssinian fly playing a Celtic violin was annoyed by trashy flags on " \
"which were the Hebrew letter qoph."
def test_single(self):
pattern = StringPattern("Celtic")
matches = list(pattern.matches(self.input_string))
assert len(matches) == 1
assert isinstance(matches[0], Match)
assert matches[0].pattern == pattern
assert matches[0].span == (28, 34)
assert matches[0].value == "Celtic"
def test_repr(self):
pattern = StringPattern("Celtic")
assert repr(pattern) == '<StringPattern:(\'Celtic\',)>'
def test_ignore_case(self):
pattern = StringPattern("celtic", ignore_case=False)
matches = list(pattern.matches(self.input_string))
assert len(matches) == 0
pattern = StringPattern("celtic", ignore_case=True)
matches = list(pattern.matches(self.input_string))
assert len(matches) == 1
assert matches[0].value == "Celtic"
def test_private_names(self):
pattern = StringPattern("celtic", name="test", private_names=["test"], ignore_case=True)
matches = list(pattern.matches(self.input_string))
assert len(matches) == 1
assert matches[0].private
def test_ignore_names(self):
pattern = StringPattern("celtic", name="test", ignore_names=["test"], ignore_case=True)
matches = list(pattern.matches(self.input_string))
assert len(matches) == 0
def test_no_match(self):
pattern = StringPattern("Python")
matches = list(pattern.matches(self.input_string))
assert not matches
def test_multiple_patterns(self):
pattern = StringPattern("playing", "annoyed", "Hebrew")
matches = list(pattern.matches(self.input_string))
assert len(matches) == 3
assert isinstance(matches[0], Match)
assert matches[0].pattern == pattern
assert matches[0].span == (18, 25)
assert matches[0].value == "playing"
assert isinstance(matches[1], Match)
assert matches[1].pattern == pattern
assert matches[1].span == (46, 53)
assert matches[1].value == "annoyed"
assert isinstance(matches[2], Match)
assert matches[2].pattern == pattern
assert matches[2].span == (88, 94)
assert matches[2].value == "Hebrew"
def test_start_end_kwargs(self):
pattern = StringPattern("Abyssinian", start=20, end=40)
matches = list(pattern.matches(self.input_string))
assert len(matches) == 0
def test_matches_kwargs(self):
pattern = StringPattern("Abyssinian", name="test", value="AB")
matches = list(pattern.matches(self.input_string))
assert len(matches) == 1
assert matches[0].name == "test"
assert matches[0].value == "AB"
def test_post_processor(self):
def post_processor(matches, pattern):
assert len(matches) == 1
assert isinstance(pattern, StringPattern)
return []
pattern = StringPattern("Abyssinian", name="test", value="AB", post_processor=post_processor)
matches = list(pattern.matches(self.input_string))
assert len(matches) == 0
class TestRePattern(object):
"""
Tests for RePattern matching
"""
input_string = "An Abyssinian fly playing a Celtic violin was annoyed by trashy flags on " \
"which were the Hebrew letter qoph."
def test_single_compiled(self):
pattern = RePattern(re.compile("Celt.?c"))
matches = list(pattern.matches(self.input_string))
assert len(matches) == 1
assert isinstance(matches[0], Match)
assert matches[0].pattern == pattern
assert matches[0].span == (28, 34)
assert matches[0].value == "Celtic"
def test_single_string(self):
pattern = RePattern("Celt.?c")
matches = list(pattern.matches(self.input_string))
assert len(matches) == 1
assert isinstance(matches[0], Match)
assert matches[0].pattern == pattern
assert matches[0].span == (28, 34)
assert matches[0].value == "Celtic"
def test_single_kwargs(self):
pattern = RePattern({"pattern": "celt.?c", "flags": re.IGNORECASE})
matches = list(pattern.matches(self.input_string))
assert len(matches) == 1
assert isinstance(matches[0], Match)
assert matches[0].pattern == pattern
assert matches[0].span == (28, 34)
assert matches[0].value == "Celtic"
def test_single_vargs(self):
pattern = RePattern(("celt.?c", re.IGNORECASE))
matches = list(pattern.matches(self.input_string))
assert len(matches) == 1
assert isinstance(matches[0], Match)
assert matches[0].pattern == pattern
assert matches[0].span == (28, 34)
assert matches[0].value == "Celtic"
def test_no_match(self):
pattern = RePattern("abc.?def")
matches = list(pattern.matches(self.input_string))
assert len(matches) == 0
def test_shortcuts(self):
pattern = RePattern("Celtic-violin", abbreviations=[("-", r"[\W_]+")])
matches = list(pattern.matches(self.input_string))
assert len(matches) == 1
pattern = RePattern({"pattern": "celtic-violin", "flags": re.IGNORECASE}, abbreviations=[("-", r"[\W_]+")])
matches = list(pattern.matches(self.input_string))
assert len(matches) == 1
def test_multiple_patterns(self):
pattern = RePattern("pla.?ing", "ann.?yed", "Heb.?ew")
matches = list(pattern.matches(self.input_string))
assert len(matches) == 3
assert isinstance(matches[0], Match)
assert matches[0].pattern == pattern
assert matches[0].span == (18, 25)
assert matches[0].value == "playing"
assert isinstance(matches[1], Match)
assert matches[1].pattern == pattern
assert matches[1].span == (46, 53)
assert matches[1].value == "annoyed"
assert isinstance(matches[2], Match)
assert matches[2].pattern == pattern
assert matches[2].span == (88, 94)
assert matches[2].value == "Hebrew"
def test_unnamed_groups(self):
pattern = RePattern(r"(Celt.?c)\s+(\w+)")
matches = list(pattern.matches(self.input_string))
assert len(matches) == 1
parent = matches[0]
assert isinstance(parent, Match)
assert parent.pattern == pattern
assert parent.span == (28, 41)
assert parent.name is None
assert parent.value == "Celtic violin"
assert len(parent.children) == 2
group1, group2 = parent.children
assert isinstance(group1, Match)
assert group1.pattern == pattern
assert group1.span == (28, 34)
assert group1.name is None
assert group1.value == "Celtic"
assert group1.parent == parent
assert isinstance(group2, Match)
assert group2.pattern == pattern
assert group2.span == (35, 41)
assert group2.name is None
assert group2.value == "violin"
assert group2.parent == parent
def test_named_groups(self):
pattern = RePattern(r"(?P<param1>Celt.?c)\s+(?P<param2>\w+)")
matches = list(pattern.matches(self.input_string))
assert len(matches) == 1
parent = matches[0]
assert isinstance(parent, Match)
assert parent.pattern == pattern
assert parent.span == (28, 41)
assert parent.name is None
assert parent.value == "Celtic violin"
assert len(parent.children) == 2
group1, group2 = parent.children
assert isinstance(group1, Match)
assert group1.pattern == pattern
assert group1.span == (28, 34)
assert group1.name == "param1"
assert group1.value == "Celtic"
assert group1.parent == parent
assert isinstance(group2, Match)
assert group2.pattern == pattern
assert group2.span == (35, 41)
assert group2.name == "param2"
assert group2.value == "violin"
assert group2.parent == parent
def test_children(self):
pattern = RePattern(r"(?P<param1>Celt.?c)\s+(?P<param2>\w+)", children=True)
matches = list(pattern.matches(self.input_string))
assert len(matches) == 2
group1, group2 = matches
assert isinstance(group1, Match)
assert group1.pattern == pattern
assert group1.span == (28, 34)
assert group1.name == "param1"
assert group1.value == "Celtic"
assert isinstance(group2, Match)
assert group2.pattern == pattern
assert group2.span == (35, 41)
assert group2.name == "param2"
assert group2.value == "violin"
def test_children_parent_private(self):
pattern = RePattern(r"(?P<param1>Celt.?c)\s+(?P<param2>\w+)", children=True, private_parent=True)
matches = list(pattern.matches(self.input_string))
assert len(matches) == 3
parent, group1, group2 = matches
assert isinstance(group1, Match)
assert parent.private
assert parent.pattern == pattern
assert parent.span == (28, 41)
assert parent.name is None
assert parent.value == "Celtic violin"
assert isinstance(group1, Match)
assert not group1.private
assert group1.pattern == pattern
assert group1.span == (28, 34)
assert group1.name == "param1"
assert group1.value == "Celtic"
assert isinstance(group2, Match)
assert not group2.private
assert group2.pattern == pattern
assert group2.span == (35, 41)
assert group2.name == "param2"
assert group2.value == "violin"
def test_parent_children_private(self):
pattern = RePattern(r"(?P<param1>Celt.?c)\s+(?P<param2>\w+)", private_children=True)
matches = list(pattern.matches(self.input_string))
assert len(matches) == 3
parent, group1, group2 = matches
assert isinstance(group1, Match)
assert not parent.private
assert parent.pattern == pattern
assert parent.span == (28, 41)
assert parent.name is None
assert parent.value == "Celtic violin"
assert isinstance(group1, Match)
assert group1.private
assert group1.pattern == pattern
assert group1.span == (28, 34)
assert group1.name == "param1"
assert group1.value == "Celtic"
assert isinstance(group2, Match)
assert group2.private
assert group2.pattern == pattern
assert group2.span == (35, 41)
assert group2.name == "param2"
assert group2.value == "violin"
def test_every(self):
pattern = RePattern(r"(?P<param1>Celt.?c)\s+(?P<param2>\w+)", every=True)
matches = list(pattern.matches(self.input_string))
assert len(matches) == 3
parent, group1, group2 = matches
assert isinstance(group1, Match)
assert not parent.private
assert parent.pattern == pattern
assert parent.span == (28, 41)
assert parent.name is None
assert parent.value == "Celtic violin"
assert isinstance(group1, Match)
assert not group1.private
assert group1.pattern == pattern
assert group1.span == (28, 34)
assert group1.name == "param1"
assert group1.value == "Celtic"
assert isinstance(group2, Match)
assert not group2.private
assert group2.pattern == pattern
assert group2.span == (35, 41)
assert group2.name == "param2"
assert group2.value == "violin"
def test_private_names(self):
pattern = RePattern(r"(?P<param1>Celt.?c)\s+(?P<param2>\w+)", private_names=["param2"], children=True)
matches = list(pattern.matches(self.input_string))
assert len(matches) == 2
assert matches[0].name == "param1"
assert not matches[0].private
assert matches[1].name == "param2"
assert matches[1].private
def test_ignore_names(self):
pattern = RePattern(r"(?P<param1>Celt.?c)\s+(?P<param2>\w+)", ignore_names=["param2"], children=True)
matches = list(pattern.matches(self.input_string))
assert len(matches) == 1
assert matches[0].name == "param1"
def test_matches_kwargs(self):
pattern = RePattern("He.rew", name="test", value="HE")
matches = list(pattern.matches(self.input_string))
assert len(matches) == 1
assert matches[0].name == "test"
assert matches[0].value == "HE"
pattern = RePattern("H(e.)(rew)", name="test", value="HE")
matches = list(pattern.matches(self.input_string))
assert len(matches) == 1
assert matches[0].name == "test"
assert matches[0].value == "HE"
children = matches[0].children
assert len(children) == 2
assert children[0].name == "test"
assert children[0].value == "HE"
assert children[1].name == "test"
assert children[1].value == "HE"
pattern = RePattern("H(?P<first>e.)(?P<second>rew)", name="test", value="HE")
matches = list(pattern.matches(self.input_string))
assert len(matches) == 1
assert matches[0].name == "test"
assert matches[0].value == "HE"
children = matches[0].children
assert len(children) == 2
assert children[0].name == "first"
assert children[0].value == "HE"
assert children[1].name == "second"
assert children[1].value == "HE"
class TestFunctionalPattern(object):
"""
Tests for FunctionalPattern matching
"""
input_string = "An Abyssinian fly playing a Celtic violin was annoyed by trashy flags on " \
"which were the Hebrew letter qoph."
def test_single_vargs(self):
def func(input_string):
i = input_string.find("fly")
if i > -1:
return i, i + len("fly"), "fly", "functional"
pattern = FunctionalPattern(func)
matches = list(pattern.matches(self.input_string))
assert len(matches) == 1
assert isinstance(matches[0], Match)
assert matches[0].pattern == pattern
assert matches[0].span == (14, 17)
assert matches[0].name == "functional"
assert matches[0].value == "fly"
def test_single_kwargs(self):
def func(input_string):
i = input_string.find("fly")
if i > -1:
return {"start": i, "end": i + len("fly"), "name": "functional"}
pattern = FunctionalPattern(func)
matches = list(pattern.matches(self.input_string))
assert len(matches) == 1
assert isinstance(matches[0], Match)
assert matches[0].pattern == pattern
assert matches[0].span == (14, 17)
assert matches[0].name == "functional"
assert matches[0].value == "fly"
def test_multiple_objects(self):
def func(input_string):
i = input_string.find("fly")
matches = []
if i > -1:
matches.append((i, i + len("fly"), {'name': "functional"}))
i = input_string.find("annoyed")
if i > -1:
matches.append((i, i + len("annoyed")))
i = input_string.find("Hebrew")
if i > -1:
matches.append({"start": i, "end": i + len("Hebrew")})
return matches
pattern = FunctionalPattern(func)
matches = list(pattern.matches(self.input_string))
assert len(matches) == 3
assert isinstance(matches[0], Match)
assert matches[0].pattern == pattern
assert matches[0].span == (14, 17)
assert matches[0].name == "functional"
assert matches[0].value == "fly"
assert isinstance(matches[1], Match)
assert matches[1].pattern == pattern
assert matches[1].span == (46, 53)
assert matches[1].value == "annoyed"
assert isinstance(matches[2], Match)
assert matches[2].pattern == pattern
assert matches[2].span == (88, 94)
assert matches[2].value == "Hebrew"
def test_multiple_generator(self):
def func(input_string):
i = input_string.find("fly")
if i > -1:
yield (i, i + len("fly"), {'name': "functional"})
i = input_string.find("annoyed")
if i > -1:
yield (i, i + len("annoyed"))
i = input_string.find("Hebrew")
if i > -1:
yield (i, {"end": i + len("Hebrew")})
pattern = FunctionalPattern(func)
matches = list(pattern.matches(self.input_string))
assert len(matches) == 3
assert isinstance(matches[0], Match)
assert matches[0].pattern == pattern
assert matches[0].span == (14, 17)
assert matches[0].name == "functional"
assert matches[0].value == "fly"
assert isinstance(matches[1], Match)
assert matches[1].pattern == pattern
assert matches[1].span == (46, 53)
assert matches[1].value == "annoyed"
assert isinstance(matches[2], Match)
assert matches[2].pattern == pattern
assert matches[2].span == (88, 94)
assert matches[2].value == "Hebrew"
def test_no_match(self):
pattern = FunctionalPattern(lambda x: None)
matches = list(pattern.matches(self.input_string))
assert len(matches) == 0
def test_multiple_patterns(self):
def playing(input_string):
i = input_string.find("playing")
if i > -1:
return i, i + len("playing")
def annoyed(input_string):
i = input_string.find("annoyed")
if i > -1:
return i, i + len("annoyed")
def hebrew(input_string):
i = input_string.find("Hebrew")
if i > -1:
return i, i + len("Hebrew")
pattern = FunctionalPattern(playing, annoyed, hebrew)
matches = list(pattern.matches(self.input_string))
assert len(matches) == 3
assert isinstance(matches[0], Match)
assert matches[0].pattern == pattern
assert matches[0].span == (18, 25)
assert matches[0].value == "playing"
assert isinstance(matches[1], Match)
assert matches[1].pattern == pattern
assert matches[1].span == (46, 53)
assert matches[1].value == "annoyed"
assert isinstance(matches[2], Match)
assert matches[2].pattern == pattern
assert matches[2].span == (88, 94)
assert matches[2].value == "Hebrew"
def test_matches_kwargs(self):
def playing(input_string):
i = input_string.find("playing")
if i > -1:
return i, i + len("playing")
pattern = FunctionalPattern(playing, name="test", value="PLAY")
matches = list(pattern.matches(self.input_string))
assert len(matches) == 1
assert matches[0].name == "test"
assert matches[0].value == "PLAY"
class TestValue(object):
"""
Tests for value option
"""
input_string = "This string contains 1849 a number"
def test_str_value(self):
pattern = StringPattern("1849", name="dummy", value="test")
matches = list(pattern.matches(self.input_string))
assert len(matches) == 1
assert isinstance(matches[0], Match)
assert matches[0].pattern == pattern
assert matches[0].span == (21, 25)
assert matches[0].value == "test"
def test_dict_child_value(self):
pattern = RePattern(r"(?P<strParam>cont.?ins)\s+(?P<intParam>\d+)",
formatter={'intParam': lambda x: int(x) * 2,
'strParam': lambda x: "really " + x},
format_all=True,
value={'intParam': 'INT_PARAM_VALUE'})
matches = list(pattern.matches(self.input_string))
assert len(matches) == 1
parent = matches[0]
assert len(parent.children) == 2
group1, group2 = parent.children
assert isinstance(group1, Match)
assert group1.pattern == pattern
assert group1.span == (12, 20)
assert group1.value == "really contains"
assert isinstance(group2, Match)
assert group2.pattern == pattern
assert group2.span == (21, 25)
assert group2.value == 'INT_PARAM_VALUE'
def test_dict_default_value(self):
pattern = RePattern(r"(?P<strParam>cont.?ins)\s+(?P<intParam>\d+)",
formatter={'intParam': lambda x: int(x) * 2,
'strParam': lambda x: "really " + x},
format_all=True,
value={'__children__': 'CHILD', 'strParam': 'STR_VALUE', '__parent__': 'PARENT'})
matches = list(pattern.matches(self.input_string))
assert len(matches) == 1
parent = matches[0]
assert parent.value == "PARENT"
assert len(parent.children) == 2
group1, group2 = parent.children
assert isinstance(group1, Match)
assert group1.pattern == pattern
assert group1.span == (12, 20)
assert group1.value == "STR_VALUE"
assert isinstance(group2, Match)
assert group2.pattern == pattern
assert group2.span == (21, 25)
assert group2.value == "CHILD"
class TestFormatter(object):
"""
Tests for formatter option
"""
input_string = "This string contains 1849 a number"
def test_single_string(self):
pattern = StringPattern("1849", name="dummy", formatter=lambda x: int(x) / 2)
matches = list(pattern.matches(self.input_string))
assert len(matches) == 1
assert isinstance(matches[0], Match)
assert matches[0].pattern == pattern
assert matches[0].span == (21, 25)
assert matches[0].value == 1849 / 2
def test_single_re_no_group(self):
pattern = RePattern(r"\d+", formatter=lambda x: int(x) * 2)
matches = list(pattern.matches(self.input_string))
assert len(matches) == 1
assert isinstance(matches[0], Match)
assert matches[0].pattern == pattern
assert matches[0].span == (21, 25)
assert matches[0].value == 1849 * 2
def test_single_re_named_groups(self):
pattern = RePattern(r"(?P<strParam>cont.?ins)\s+(?P<intParam>\d+)",
formatter={'intParam': lambda x: int(x) * 2,
'strParam': lambda x: "really " + x}, format_all=True)
matches = list(pattern.matches(self.input_string))
assert len(matches) == 1
parent = matches[0]
assert len(parent.children) == 2
group1, group2 = parent.children
assert isinstance(group1, Match)
assert group1.pattern == pattern
assert group1.span == (12, 20)
assert group1.value == "really contains"
assert isinstance(group2, Match)
assert group2.pattern == pattern
assert group2.span == (21, 25)
assert group2.value == 1849 * 2
def test_repeated_captures_option(self):
pattern = RePattern(r"\[(\d+)\](?:-(\d+))*")
matches = list(pattern.matches("[02]-03-04-05-06"))
assert len(matches) == 1
match = matches[0]
if REGEX_AVAILABLE:
assert len(match.children) == 5
assert [child.value for child in match.children] == ["02", "03", "04", "05", "06"]
else:
assert len(match.children) == 2
assert [child.value for child in match.children] == ["02", "06"]
with pytest.raises(NotImplementedError):
RePattern(r"\[(\d+)\](?:-(\d+))*", repeated_captures=True)
pattern = RePattern(r"\[(\d+)\](?:-(\d+))*", repeated_captures=False)
matches = list(pattern.matches("[02]-03-04-05-06"))
assert len(matches) == 1
match = matches[0]
assert len(match.children) == 2
assert [child.value for child in match.children] == ["02", "06"]
def test_single_functional(self):
def digit(input_string):
i = input_string.find("1849")
if i > -1:
return i, i + len("1849")
pattern = FunctionalPattern(digit, formatter=lambda x: int(x) * 3)
matches = list(pattern.matches(self.input_string))
assert len(matches) == 1
assert isinstance(matches[0], Match)
assert matches[0].pattern == pattern
assert matches[0].span == (21, 25)
assert matches[0].value == 1849 * 3
class TestValidator(object):
"""
Tests for validator option
"""
input_string = "This string contains 1849 a number"
@staticmethod
def true_validator(match):
return int(match.value) < 1850
@staticmethod
def false_validator(match):
return int(match.value) >= 1850
def test_single_string(self):
pattern = StringPattern("1849", name="dummy", validator=self.false_validator)
matches = list(pattern.matches(self.input_string))
assert len(matches) == 0
pattern = StringPattern("1849", validator=self.true_validator)
matches = list(pattern.matches(self.input_string))
assert len(matches) == 1
def test_single_re_no_group(self):
pattern = RePattern(r"\d+", validator=self.false_validator)
matches = list(pattern.matches(self.input_string))
assert len(matches) == 0
pattern = RePattern(r"\d+", validator=self.true_validator)
matches = list(pattern.matches(self.input_string))
assert len(matches) == 1
def test_single_re_named_groups(self):
pattern = RePattern(r"(?P<strParam>cont.?ins)\s+(?P<intParam>\d+)",
validator={'intParam': self.false_validator}, validate_all=True)
matches = list(pattern.matches(self.input_string))
assert len(matches) == 0
pattern = RePattern(r"(?P<strParam>cont.?ins)\s+(?P<intParam>\d+)",
validator={'intParam': self.true_validator}, validate_all=True)
matches = list(pattern.matches(self.input_string))
assert len(matches) == 1
def test_validate_all(self):
pattern = RePattern(r"contains (?P<intParam>\d+)", formatter=int, validator=lambda match: match.value < 100,
children=True)
matches = list(pattern.matches(self.input_string))
assert len(matches) == 0
pattern = RePattern(r"contains (?P<intParam>\d+)", formatter=int, validator=lambda match: match.value > 100,
children=True)
matches = list(pattern.matches(self.input_string))
assert len(matches) == 1
def invalid_func(match):
if match.name == 'intParam':
return True
return match.value.startswith('abc')
pattern = RePattern(r"contains (?P<intParam>\d+)", formatter=int, validator=invalid_func, validate_all=True,
children=True)
matches = list(pattern.matches(self.input_string))
assert len(matches) == 0
def func(match):
if match.name == 'intParam':
return True
return match.value.startswith('contains')
pattern = RePattern(r"contains (?P<intParam>\d+)", formatter=int, validator=func, validate_all=True,
children=True)
matches = list(pattern.matches(self.input_string))
assert len(matches) == 1
def test_format_all(self):
pattern = RePattern(r"contains (?P<intParam>\d+)", formatter=int,
children=True)
matches = list(pattern.matches(self.input_string))
assert len(matches) == 1
for match in matches:
assert match.value is not None
with pytest.raises(ValueError):
pattern = RePattern(r"contains (?P<intParam>\d+)", formatter=int, format_all=True)
matches = list(pattern.matches(self.input_string))
for match in matches:
assert match.value is not None
def test_single_functional(self):
def digit(input_string):
i = input_string.find("1849")
if i > -1:
return i, i + len("1849")
pattern = FunctionalPattern(digit, validator=self.false_validator)
matches = list(pattern.matches(self.input_string))
assert len(matches) == 0
pattern = FunctionalPattern(digit, validator=self.true_validator)
matches = list(pattern.matches(self.input_string))
assert len(matches) == 1
| 34.137369
| 116
| 0.591052
| 3,381
| 29,324
| 5.054422
| 0.060633
| 0.048686
| 0.05407
| 0.086313
| 0.898005
| 0.867868
| 0.847797
| 0.826965
| 0.818304
| 0.805664
| 0
| 0.032707
| 0.279532
| 29,324
| 858
| 117
| 34.177156
| 0.776163
| 0.011322
| 0
| 0.771065
| 0
| 0
| 0.086231
| 0.017405
| 0
| 0
| 0
| 0
| 0.527822
| 1
| 0.098569
| false
| 0
| 0.006359
| 0.00318
| 0.149444
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
833e3291c52029d28ec008ce980b4fb1233bb6a6
| 4,400
|
py
|
Python
|
flaskr/test/unit/webapp/test_feeding_schedule.py
|
UnibucProjects/SmartAquarium
|
6f3c16fb7a45218e763b46223568f6c3e5b66bfd
|
[
"MIT"
] | 6
|
2022-02-02T19:37:57.000Z
|
2022-02-03T15:12:32.000Z
|
flaskr/test/unit/webapp/test_feeding_schedule.py
|
UnibucProjects/SmartAquarium
|
6f3c16fb7a45218e763b46223568f6c3e5b66bfd
|
[
"MIT"
] | 18
|
2022-01-29T22:47:46.000Z
|
2022-02-03T15:30:28.000Z
|
flaskr/test/unit/webapp/test_feeding_schedule.py
|
UnibucProjects/SmartAquarium
|
6f3c16fb7a45218e763b46223568f6c3e5b66bfd
|
[
"MIT"
] | null | null | null |
import pytest
import json
import random
from app import create_app
from db import get_db
@pytest.fixture
def client():
local_app = create_app()
client = local_app.test_client()
yield client
def test_get_feeding_schedule(client):
request = client.get("/feeding_schedule")
assert request.status_code == 200
def test_set_feeding_schedule(client):
with create_app().app_context():
food_ids = get_db().execute(
'SELECT id'
' FROM food'
).fetchall()
aquarium_ids = get_db().execute(
'SELECT id'
' FROM aquarium'
).fetchall()
food_id = random.randint(0, len(food_ids)-1)
aquarium_id = random.randint(0, len(aquarium_ids)-1)
payload = {'aquarium_id': aquarium_ids[aquarium_id]['id'], 'food_type_id': food_ids[food_id]['id'],
'schedule': '12:45;20:00', 'available_type_quantity': 50}
rv = client.post('/feeding_schedule', data=payload, follow_redirects=True)
res = json.loads(rv.data.decode())
assert rv.status_code == 200
assert res["status"] == "Feeding schedule successfully recorded."
def test_set_feeding_schedule_null(client):
with create_app().app_context():
food_ids = get_db().execute(
'SELECT id'
' FROM food'
).fetchall()
aquarium_ids = get_db().execute(
'SELECT id'
' FROM aquarium'
).fetchall()
food_id = random.randint(0, len(food_ids)-1)
aquarium_id = random.randint(0, len(aquarium_ids)-1)
payload = {'aquarium_id': aquarium_ids[aquarium_id]['id'], 'food_type_id': food_ids[food_id]['id'],
'schedule': '', 'available_type_quantity': 50}
rv = client.post('/feeding_schedule', data=payload, follow_redirects=True)
res = json.loads(rv.data.decode())
assert rv.status_code == 403
assert res["status"] == "Schedule is required."
def test_update_feeding_schedule(client):
with create_app().app_context():
feeding_schedule = get_db().execute(
'SELECT id'
' FROM feeding_schedule'
' ORDER BY timestamp DESC'
).fetchone()
food_ids = get_db().execute(
'SELECT id'
' FROM food'
).fetchall()
aquarium_ids = get_db().execute(
'SELECT id'
' FROM aquarium'
).fetchall()
food_id = random.randint(0, len(food_ids)-1)
aquarium_id = random.randint(0, len(aquarium_ids)-1)
payload = {'id': feeding_schedule['id'], 'aquarium_id': aquarium_ids[aquarium_id]['id'],
'food_type_id': food_ids[food_id]['id'], 'schedule': '16:15', 'available_type_quantity': 100}
rv = client.put('/feeding_schedule', data=payload, follow_redirects=True)
res = json.loads(rv.data.decode())
assert rv.status_code == 200
assert res["status"] == "Feeding schedule successfully updated."
def test_update_feeding_schedule_notfound(client):
with create_app().app_context():
feeding_schedule = get_db().execute(
'SELECT id'
' FROM feeding_schedule'
' ORDER BY id DESC'
).fetchone()
food_ids = get_db().execute(
'SELECT id'
' FROM food'
).fetchall()
aquarium_ids = get_db().execute(
'SELECT id'
' FROM aquarium'
).fetchall()
food_id = random.randint(0, len(food_ids)-1)
aquarium_id = random.randint(0, len(aquarium_ids)-1)
payload = {'id': feeding_schedule['id'] + 1, 'aquarium_id': aquarium_ids[aquarium_id]['id'],
'food_type_id': food_ids[food_id]['id'], 'schedule': '16:15', 'available_type_quantity': 100}
rv = client.put('/feeding_schedule', data=payload, follow_redirects=True)
res = json.loads(rv.data.decode())
assert rv.status_code == 404
assert res["status"] == "Feeding schedule does not exist."
def test_delete_feeding_schedule(client):
with create_app().app_context():
feeding_schedule = get_db().execute(
'SELECT id'
' FROM feeding_schedule'
' ORDER BY timestamp DESC'
).fetchone()
rv = client.delete('/feeding_schedule/' + str(feeding_schedule['id']), follow_redirects=True)
res = json.loads(rv.data.decode())
assert rv.status_code == 200
assert res["status"] == "Feeding schedule successfully deleted."
| 33.846154
| 108
| 0.622045
| 544
| 4,400
| 4.786765
| 0.145221
| 0.144009
| 0.050691
| 0.076037
| 0.849078
| 0.808372
| 0.808372
| 0.808372
| 0.802611
| 0.802611
| 0
| 0.018313
| 0.242955
| 4,400
| 130
| 109
| 33.846154
| 0.763434
| 0
| 0
| 0.707547
| 0
| 0
| 0.202227
| 0.020904
| 0
| 0
| 0
| 0
| 0.103774
| 1
| 0.066038
| false
| 0
| 0.04717
| 0
| 0.113208
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
834fd01615676b0d9af6bbf57ca1c875646ee39c
| 129,137
|
py
|
Python
|
huaweicloud-sdk-elb/huaweicloudsdkelb/v3/elb_async_client.py
|
wuchen-huawei/huaweicloud-sdk-python-v3
|
3683d703f4320edb2b8516f36f16d485cff08fc2
|
[
"Apache-2.0"
] | 64
|
2020-06-12T07:05:07.000Z
|
2022-03-30T03:32:50.000Z
|
huaweicloud-sdk-elb/huaweicloudsdkelb/v3/elb_async_client.py
|
wuchen-huawei/huaweicloud-sdk-python-v3
|
3683d703f4320edb2b8516f36f16d485cff08fc2
|
[
"Apache-2.0"
] | 11
|
2020-07-06T07:56:54.000Z
|
2022-01-11T11:14:40.000Z
|
huaweicloud-sdk-elb/huaweicloudsdkelb/v3/elb_async_client.py
|
wuchen-huawei/huaweicloud-sdk-python-v3
|
3683d703f4320edb2b8516f36f16d485cff08fc2
|
[
"Apache-2.0"
] | 24
|
2020-06-08T11:42:13.000Z
|
2022-03-04T06:44:08.000Z
|
# coding: utf-8
from __future__ import absolute_import
import datetime
import re
import importlib
import six
from huaweicloudsdkcore.client import Client, ClientBuilder
from huaweicloudsdkcore.exceptions import exceptions
from huaweicloudsdkcore.utils import http_utils
from huaweicloudsdkcore.sdk_stream_request import SdkStreamRequest
class ElbAsyncClient(Client):
"""
:param configuration: .Configuration object for this client
:param pool_threads: The number of threads to use for async requests
to the API. More threads means more concurrent API requests.
"""
PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types
NATIVE_TYPES_MAPPING = {
'int': int,
'long': int if six.PY3 else long,
'float': float,
'str': str,
'bool': bool,
'date': datetime.date,
'datetime': datetime.datetime,
'object': object,
}
def __init__(self):
super(ElbAsyncClient, self).__init__()
self.model_package = importlib.import_module("huaweicloudsdkelb.v3.model")
self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'}
@classmethod
def new_builder(cls, clazz=None):
if clazz is None:
return ClientBuilder(cls)
if clazz.__name__ != "ElbClient":
raise TypeError("client type error, support client type is ElbClient")
return ClientBuilder(clazz)
def create_certificate_async(self, request):
"""ๅๅปบ่ฏไนฆ
ๅๅปบ่ฏไนฆใ
:param CreateCertificateRequest request
:return: CreateCertificateResponse
"""
return self.create_certificate_with_http_info(request)
def create_certificate_with_http_info(self, request):
"""ๅๅปบ่ฏไนฆ
ๅๅปบ่ฏไนฆใ
:param CreateCertificateRequest request
:return: CreateCertificateResponse
"""
all_params = ['create_certificate_request_body']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
query_params = []
header_params = {}
form_params = {}
body_params = None
if 'body' in local_var_params:
body_params = local_var_params['body']
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json;charset=UTF-8'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/certificates',
method='POST',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='CreateCertificateResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def create_health_monitor_async(self, request):
"""ๅๅปบๅฅๅบทๆฃๆฅ
ๅๅปบๅฅๅบทๆฃๆฅใ
:param CreateHealthMonitorRequest request
:return: CreateHealthMonitorResponse
"""
return self.create_health_monitor_with_http_info(request)
def create_health_monitor_with_http_info(self, request):
"""ๅๅปบๅฅๅบทๆฃๆฅ
ๅๅปบๅฅๅบทๆฃๆฅใ
:param CreateHealthMonitorRequest request
:return: CreateHealthMonitorResponse
"""
all_params = ['create_health_monitor_request_body']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
query_params = []
header_params = {}
form_params = {}
body_params = None
if 'body' in local_var_params:
body_params = local_var_params['body']
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json;charset=UTF-8'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/healthmonitors',
method='POST',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='CreateHealthMonitorResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def create_l7_policy_async(self, request):
"""ๅๅปบ่ฝฌๅ็ญ็ฅ
ๅๅปบ่ฝฌๅ็ญ็ฅ.
:param CreateL7PolicyRequest request
:return: CreateL7PolicyResponse
"""
return self.create_l7_policy_with_http_info(request)
def create_l7_policy_with_http_info(self, request):
"""ๅๅปบ่ฝฌๅ็ญ็ฅ
ๅๅปบ่ฝฌๅ็ญ็ฅ.
:param CreateL7PolicyRequest request
:return: CreateL7PolicyResponse
"""
all_params = ['create_l7_policy_request_body']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
query_params = []
header_params = {}
form_params = {}
body_params = None
if 'body' in local_var_params:
body_params = local_var_params['body']
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json;charset=UTF-8'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/l7policies',
method='POST',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='CreateL7PolicyResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def create_l7_rule_async(self, request):
"""ๅๅปบ่ฝฌๅ่งๅ
ๅๅปบ่ฝฌๅ่งๅใ
:param CreateL7RuleRequest request
:return: CreateL7RuleResponse
"""
return self.create_l7_rule_with_http_info(request)
def create_l7_rule_with_http_info(self, request):
"""ๅๅปบ่ฝฌๅ่งๅ
ๅๅปบ่ฝฌๅ่งๅใ
:param CreateL7RuleRequest request
:return: CreateL7RuleResponse
"""
all_params = ['l7policy_id', 'create_l7_rule_request_body']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'l7policy_id' in local_var_params:
path_params['l7policy_id'] = local_var_params['l7policy_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if 'body' in local_var_params:
body_params = local_var_params['body']
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json;charset=UTF-8'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/l7policies/{l7policy_id}/rules',
method='POST',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='CreateL7RuleResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def create_listener_async(self, request):
"""ๅๅปบ็ๅฌๅจ
ElbV3 ๅๅปบ็ๅฌๅจใ
:param CreateListenerRequest request
:return: CreateListenerResponse
"""
return self.create_listener_with_http_info(request)
def create_listener_with_http_info(self, request):
"""ๅๅปบ็ๅฌๅจ
ElbV3 ๅๅปบ็ๅฌๅจใ
:param CreateListenerRequest request
:return: CreateListenerResponse
"""
all_params = ['create_listener_request_body']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
query_params = []
header_params = {}
form_params = {}
body_params = None
if 'body' in local_var_params:
body_params = local_var_params['body']
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json;charset=UTF-8'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/listeners',
method='POST',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='CreateListenerResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def create_load_balancer_async(self, request):
"""ๅๅปบ่ด่ฝฝๅ่กกๅจ
ๅๅปบ่ด่ฝฝๅ่กกๅจใ 1.ๅๅปบๅ
ฌ็ฝ่ด่ฝฝๅ่กกๅจ็ๅบๅ๏ผ้่ฆไผ ๅ
ฅvpc_idใ 2.ๅๅปบๅ
็ฝ่ด่ฝฝๅ่กกๅจ็ๅบๅ๏ผ้่ฆไผ ๅ
ฅvip_subnet_cidr_idใ 3.ๅๅปบๅ
็ฝๅๆ ่ด่ฝฝๅ่กกๅจ็ๅบๅ๏ผ้่ฆไผ ๅ
ฅipv6_vip_virsubnet_idใ ๅ
ณ่ๆๅทฒๆๅ
ฌ็ฝipๅฐๅ๏ผ้่ฆไผ ๅ
ฅpublicip_ids ๆฐๅปบๅ
ฌ็ฝipๅฐๅ๏ผ้่ฆไผ ๅ
ฅpublicip ๅ
ๆฌIPV4็ง็ฝ็ฑปๅ๏ผIPV4ๅ
ฌ็ฝ็ฑปๅ๏ผIPV6็ง็ฝ๏ผIPV6ๅ
ฌ็ฝ
:param CreateLoadBalancerRequest request
:return: CreateLoadBalancerResponse
"""
return self.create_load_balancer_with_http_info(request)
def create_load_balancer_with_http_info(self, request):
"""ๅๅปบ่ด่ฝฝๅ่กกๅจ
ๅๅปบ่ด่ฝฝๅ่กกๅจใ 1.ๅๅปบๅ
ฌ็ฝ่ด่ฝฝๅ่กกๅจ็ๅบๅ๏ผ้่ฆไผ ๅ
ฅvpc_idใ 2.ๅๅปบๅ
็ฝ่ด่ฝฝๅ่กกๅจ็ๅบๅ๏ผ้่ฆไผ ๅ
ฅvip_subnet_cidr_idใ 3.ๅๅปบๅ
็ฝๅๆ ่ด่ฝฝๅ่กกๅจ็ๅบๅ๏ผ้่ฆไผ ๅ
ฅipv6_vip_virsubnet_idใ ๅ
ณ่ๆๅทฒๆๅ
ฌ็ฝipๅฐๅ๏ผ้่ฆไผ ๅ
ฅpublicip_ids ๆฐๅปบๅ
ฌ็ฝipๅฐๅ๏ผ้่ฆไผ ๅ
ฅpublicip ๅ
ๆฌIPV4็ง็ฝ็ฑปๅ๏ผIPV4ๅ
ฌ็ฝ็ฑปๅ๏ผIPV6็ง็ฝ๏ผIPV6ๅ
ฌ็ฝ
:param CreateLoadBalancerRequest request
:return: CreateLoadBalancerResponse
"""
all_params = ['create_load_balancer_request_body']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
query_params = []
header_params = {}
form_params = {}
body_params = None
if 'body' in local_var_params:
body_params = local_var_params['body']
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json;charset=UTF-8'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/loadbalancers',
method='POST',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='CreateLoadBalancerResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def create_member_async(self, request):
"""ๅๅปบๅ็ซฏๆๅกๅจ
ๅๅปบๅ็ซฏๆๅกๅจใ
:param CreateMemberRequest request
:return: CreateMemberResponse
"""
return self.create_member_with_http_info(request)
def create_member_with_http_info(self, request):
"""ๅๅปบๅ็ซฏๆๅกๅจ
ๅๅปบๅ็ซฏๆๅกๅจใ
:param CreateMemberRequest request
:return: CreateMemberResponse
"""
all_params = ['pool_id', 'create_member_request_body']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'pool_id' in local_var_params:
path_params['pool_id'] = local_var_params['pool_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if 'body' in local_var_params:
body_params = local_var_params['body']
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json;charset=UTF-8'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/pools/{pool_id}/members',
method='POST',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='CreateMemberResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def create_pool_async(self, request):
"""ๅๅปบๅ็ซฏๆๅกๅจ็ป
ๅๅปบๅ็ซฏๆๅกๅจ็ปใ
:param CreatePoolRequest request
:return: CreatePoolResponse
"""
return self.create_pool_with_http_info(request)
def create_pool_with_http_info(self, request):
"""ๅๅปบๅ็ซฏๆๅกๅจ็ป
ๅๅปบๅ็ซฏๆๅกๅจ็ปใ
:param CreatePoolRequest request
:return: CreatePoolResponse
"""
all_params = ['create_pool_request_body']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
query_params = []
header_params = {}
form_params = {}
body_params = None
if 'body' in local_var_params:
body_params = local_var_params['body']
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json;charset=UTF-8'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/pools',
method='POST',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='CreatePoolResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def delete_certificate_async(self, request):
"""ๅ ้ค่ฏไนฆ
ๅ ้คSSL่ฏไนฆใ
:param DeleteCertificateRequest request
:return: DeleteCertificateResponse
"""
return self.delete_certificate_with_http_info(request)
def delete_certificate_with_http_info(self, request):
"""ๅ ้ค่ฏไนฆ
ๅ ้คSSL่ฏไนฆใ
:param DeleteCertificateRequest request
:return: DeleteCertificateResponse
"""
all_params = ['certificate_id']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'certificate_id' in local_var_params:
path_params['certificate_id'] = local_var_params['certificate_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/certificates/{certificate_id}',
method='DELETE',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='DeleteCertificateResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def delete_health_monitor_async(self, request):
"""ๅ ้คๅฅๅบทๆฃๆฅ
ๅ ้คๅฅๅบทๆฃๆฅใ
:param DeleteHealthMonitorRequest request
:return: DeleteHealthMonitorResponse
"""
return self.delete_health_monitor_with_http_info(request)
def delete_health_monitor_with_http_info(self, request):
"""ๅ ้คๅฅๅบทๆฃๆฅ
ๅ ้คๅฅๅบทๆฃๆฅใ
:param DeleteHealthMonitorRequest request
:return: DeleteHealthMonitorResponse
"""
all_params = ['healthmonitor_id']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'healthmonitor_id' in local_var_params:
path_params['healthmonitor_id'] = local_var_params['healthmonitor_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/healthmonitors/{healthmonitor_id}',
method='DELETE',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='DeleteHealthMonitorResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def delete_l7_policy_async(self, request):
"""ๅ ้ค่ฝฌๅ็ญ็ฅ
ๅ ้ค่ฝฌๅ็ญ็ฅใ
:param DeleteL7PolicyRequest request
:return: DeleteL7PolicyResponse
"""
return self.delete_l7_policy_with_http_info(request)
def delete_l7_policy_with_http_info(self, request):
"""ๅ ้ค่ฝฌๅ็ญ็ฅ
ๅ ้ค่ฝฌๅ็ญ็ฅใ
:param DeleteL7PolicyRequest request
:return: DeleteL7PolicyResponse
"""
all_params = ['l7policy_id']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'l7policy_id' in local_var_params:
path_params['l7policy_id'] = local_var_params['l7policy_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/l7policies/{l7policy_id}',
method='DELETE',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='DeleteL7PolicyResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def delete_l7_rule_async(self, request):
"""ๅ ้ค่ฝฌๅ่งๅ
ๅ ้ค่ฝฌๅ่งๅใ
:param DeleteL7RuleRequest request
:return: DeleteL7RuleResponse
"""
return self.delete_l7_rule_with_http_info(request)
def delete_l7_rule_with_http_info(self, request):
"""ๅ ้ค่ฝฌๅ่งๅ
ๅ ้ค่ฝฌๅ่งๅใ
:param DeleteL7RuleRequest request
:return: DeleteL7RuleResponse
"""
all_params = ['l7policy_id', 'l7rule_id']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'l7policy_id' in local_var_params:
path_params['l7policy_id'] = local_var_params['l7policy_id']
if 'l7rule_id' in local_var_params:
path_params['l7rule_id'] = local_var_params['l7rule_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/l7policies/{l7policy_id}/rules/{l7rule_id}',
method='DELETE',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='DeleteL7RuleResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def delete_listener_async(self, request):
"""ๅ ้ค็ๅฌๅจ
ๅ ้ค็ๅฌๅจใ
:param DeleteListenerRequest request
:return: DeleteListenerResponse
"""
return self.delete_listener_with_http_info(request)
def delete_listener_with_http_info(self, request):
"""ๅ ้ค็ๅฌๅจ
ๅ ้ค็ๅฌๅจใ
:param DeleteListenerRequest request
:return: DeleteListenerResponse
"""
all_params = ['listener_id']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'listener_id' in local_var_params:
path_params['listener_id'] = local_var_params['listener_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/listeners/{listener_id}',
method='DELETE',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='DeleteListenerResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def delete_load_balancer_async(self, request):
"""ๅ ้ค่ด่ฝฝๅ่กกๅจ
ๅ ้ค่ด่ฝฝๅ่กกๅจใ
:param DeleteLoadBalancerRequest request
:return: DeleteLoadBalancerResponse
"""
return self.delete_load_balancer_with_http_info(request)
def delete_load_balancer_with_http_info(self, request):
"""ๅ ้ค่ด่ฝฝๅ่กกๅจ
ๅ ้ค่ด่ฝฝๅ่กกๅจใ
:param DeleteLoadBalancerRequest request
:return: DeleteLoadBalancerResponse
"""
all_params = ['loadbalancer_id']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'loadbalancer_id' in local_var_params:
path_params['loadbalancer_id'] = local_var_params['loadbalancer_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/loadbalancers/{loadbalancer_id}',
method='DELETE',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='DeleteLoadBalancerResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def delete_member_async(self, request):
"""ๅ ้คๅ็ซฏๆๅกๅจ
ๅ ้คๅ็ซฏๆๅกๅจใ
:param DeleteMemberRequest request
:return: DeleteMemberResponse
"""
return self.delete_member_with_http_info(request)
def delete_member_with_http_info(self, request):
"""ๅ ้คๅ็ซฏๆๅกๅจ
ๅ ้คๅ็ซฏๆๅกๅจใ
:param DeleteMemberRequest request
:return: DeleteMemberResponse
"""
all_params = ['member_id', 'pool_id']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'member_id' in local_var_params:
path_params['member_id'] = local_var_params['member_id']
if 'pool_id' in local_var_params:
path_params['pool_id'] = local_var_params['pool_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/pools/{pool_id}/members/{member_id}',
method='DELETE',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='DeleteMemberResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def delete_pool_async(self, request):
"""ๅ ้คๅ็ซฏๆๅกๅจ็ป
ๅ ้คๅ็ซฏๆๅกๅจ็ปใ
:param DeletePoolRequest request
:return: DeletePoolResponse
"""
return self.delete_pool_with_http_info(request)
def delete_pool_with_http_info(self, request):
"""ๅ ้คๅ็ซฏๆๅกๅจ็ป
ๅ ้คๅ็ซฏๆๅกๅจ็ปใ
:param DeletePoolRequest request
:return: DeletePoolResponse
"""
all_params = ['pool_id']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'pool_id' in local_var_params:
path_params['pool_id'] = local_var_params['pool_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/pools/{pool_id}',
method='DELETE',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='DeletePoolResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def list_all_members_async(self, request):
"""ๅ็ซฏๆๅกๅจๅ
จๅฑๅ่กจ
ๆฅ่ฏขๅฝๅ็งๆทไธ็ๅ็ซฏๆๅกๅจๅ่กจใ
:param ListAllMembersRequest request
:return: ListAllMembersResponse
"""
return self.list_all_members_with_http_info(request)
def list_all_members_with_http_info(self, request):
"""ๅ็ซฏๆๅกๅจๅ
จๅฑๅ่กจ
ๆฅ่ฏขๅฝๅ็งๆทไธ็ๅ็ซฏๆๅกๅจๅ่กจใ
:param ListAllMembersRequest request
:return: ListAllMembersResponse
"""
all_params = ['address', 'admin_state_up', 'enterprise_project_id', 'id', 'ip_version', 'limit', 'loadbalancer_id', 'marker', 'name', 'operating_status', 'page_reverse', 'pool_id', 'protocol_port', 'subnet_cidr_id', 'weight']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
query_params = []
if 'address' in local_var_params:
query_params.append(('address', local_var_params['address']))
collection_formats['address'] = 'multi'
if 'admin_state_up' in local_var_params:
query_params.append(('admin_state_up', local_var_params['admin_state_up']))
if 'enterprise_project_id' in local_var_params:
query_params.append(('enterprise_project_id', local_var_params['enterprise_project_id']))
collection_formats['enterprise_project_id'] = 'multi'
if 'id' in local_var_params:
query_params.append(('id', local_var_params['id']))
collection_formats['id'] = 'multi'
if 'ip_version' in local_var_params:
query_params.append(('ip_version', local_var_params['ip_version']))
if 'limit' in local_var_params:
query_params.append(('limit', local_var_params['limit']))
if 'loadbalancer_id' in local_var_params:
query_params.append(('loadbalancer_id', local_var_params['loadbalancer_id']))
if 'marker' in local_var_params:
query_params.append(('marker', local_var_params['marker']))
if 'name' in local_var_params:
query_params.append(('name', local_var_params['name']))
collection_formats['name'] = 'multi'
if 'operating_status' in local_var_params:
query_params.append(('operating_status', local_var_params['operating_status']))
collection_formats['operating_status'] = 'multi'
if 'page_reverse' in local_var_params:
query_params.append(('page_reverse', local_var_params['page_reverse']))
if 'pool_id' in local_var_params:
query_params.append(('pool_id', local_var_params['pool_id']))
if 'protocol_port' in local_var_params:
query_params.append(('protocol_port', local_var_params['protocol_port']))
collection_formats['protocol_port'] = 'multi'
if 'subnet_cidr_id' in local_var_params:
query_params.append(('subnet_cidr_id', local_var_params['subnet_cidr_id']))
collection_formats['subnet_cidr_id'] = 'multi'
if 'weight' in local_var_params:
query_params.append(('weight', local_var_params['weight']))
collection_formats['weight'] = 'multi'
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/members',
method='GET',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='ListAllMembersResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def list_availability_zones_async(self, request):
"""ๆฅ่ฏขๅฏ็จๅบๅ่กจ
่ฟๅ็งๆทๅๅปบLBๆถๅฏไฝฟ็จ็ๅฏ็จๅบๅ่กจๆ
ๅตใ ่ฟๅ็ๆฐๆฎ็ฑปๅๆฏๅฏ็จๅบ้ๅ็ๅ่กจ๏ผๆฏๅฆๅ่กจ [ [az1,az2], [az2, az3] ] ๏ผๆไธคไธชๅฏ็จๅบ้ๅใๅจๅๅปบ่ด่ฝฝๅ่กกๅจๆถ๏ผๅฏไปฅ้ๆฉๅๅปบๅจๅคไธชๅฏ็จๅบ๏ผไฝๆ้็ๅคไธชๅฏ็จๅบๅฟ
้กปๅๅฑไบๅ
ถไธญไธไธชๅฏ็จๅบ้ๅ๏ผๅฆๅฏไปฅ้ๆฉ az2ๅaz3๏ผไฝไธ่ฝ้ๆฉ az1ๅaz3ใ
:param ListAvailabilityZonesRequest request
:return: ListAvailabilityZonesResponse
"""
return self.list_availability_zones_with_http_info(request)
def list_availability_zones_with_http_info(self, request):
"""ๆฅ่ฏขๅฏ็จๅบๅ่กจ
่ฟๅ็งๆทๅๅปบLBๆถๅฏไฝฟ็จ็ๅฏ็จๅบๅ่กจๆ
ๅตใ ่ฟๅ็ๆฐๆฎ็ฑปๅๆฏๅฏ็จๅบ้ๅ็ๅ่กจ๏ผๆฏๅฆๅ่กจ [ [az1,az2], [az2, az3] ] ๏ผๆไธคไธชๅฏ็จๅบ้ๅใๅจๅๅปบ่ด่ฝฝๅ่กกๅจๆถ๏ผๅฏไปฅ้ๆฉๅๅปบๅจๅคไธชๅฏ็จๅบ๏ผไฝๆ้็ๅคไธชๅฏ็จๅบๅฟ
้กปๅๅฑไบๅ
ถไธญไธไธชๅฏ็จๅบ้ๅ๏ผๅฆๅฏไปฅ้ๆฉ az2ๅaz3๏ผไฝไธ่ฝ้ๆฉ az1ๅaz3ใ
:param ListAvailabilityZonesRequest request
:return: ListAvailabilityZonesResponse
"""
all_params = []
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
query_params = []
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/availability-zones',
method='GET',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='ListAvailabilityZonesResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def list_certificates_async(self, request):
"""่ฏไนฆๅ่กจ
ๆฅ่ฏขSSL่ฏไนฆๅ่กจใ
:param ListCertificatesRequest request
:return: ListCertificatesResponse
"""
return self.list_certificates_with_http_info(request)
def list_certificates_with_http_info(self, request):
"""่ฏไนฆๅ่กจ
ๆฅ่ฏขSSL่ฏไนฆๅ่กจใ
:param ListCertificatesRequest request
:return: ListCertificatesResponse
"""
all_params = ['admin_state_up', 'description', 'domain', 'id', 'limit', 'marker', 'name', 'page_reverse', 'type']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
query_params = []
if 'admin_state_up' in local_var_params:
query_params.append(('admin_state_up', local_var_params['admin_state_up']))
if 'description' in local_var_params:
query_params.append(('description', local_var_params['description']))
collection_formats['description'] = 'multi'
if 'domain' in local_var_params:
query_params.append(('domain', local_var_params['domain']))
collection_formats['domain'] = 'multi'
if 'id' in local_var_params:
query_params.append(('id', local_var_params['id']))
collection_formats['id'] = 'multi'
if 'limit' in local_var_params:
query_params.append(('limit', local_var_params['limit']))
if 'marker' in local_var_params:
query_params.append(('marker', local_var_params['marker']))
if 'name' in local_var_params:
query_params.append(('name', local_var_params['name']))
collection_formats['name'] = 'multi'
if 'page_reverse' in local_var_params:
query_params.append(('page_reverse', local_var_params['page_reverse']))
if 'type' in local_var_params:
query_params.append(('type', local_var_params['type']))
collection_formats['type'] = 'multi'
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/certificates',
method='GET',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='ListCertificatesResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def list_flavors_async(self, request):
"""ๆฅ่ฏข่งๆ ผๅ่กจ
ๆฅ่ฏขๆๆ็่งๆ ผใ
:param ListFlavorsRequest request
:return: ListFlavorsResponse
"""
return self.list_flavors_with_http_info(request)
def list_flavors_with_http_info(self, request):
"""ๆฅ่ฏข่งๆ ผๅ่กจ
ๆฅ่ฏขๆๆ็่งๆ ผใ
:param ListFlavorsRequest request
:return: ListFlavorsResponse
"""
all_params = ['id', 'limit', 'marker', 'name', 'page_reverse', 'shared', 'type']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
query_params = []
if 'id' in local_var_params:
query_params.append(('id', local_var_params['id']))
collection_formats['id'] = 'multi'
if 'limit' in local_var_params:
query_params.append(('limit', local_var_params['limit']))
if 'marker' in local_var_params:
query_params.append(('marker', local_var_params['marker']))
if 'name' in local_var_params:
query_params.append(('name', local_var_params['name']))
collection_formats['name'] = 'multi'
if 'page_reverse' in local_var_params:
query_params.append(('page_reverse', local_var_params['page_reverse']))
if 'shared' in local_var_params:
query_params.append(('shared', local_var_params['shared']))
if 'type' in local_var_params:
query_params.append(('type', local_var_params['type']))
collection_formats['type'] = 'multi'
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/flavors',
method='GET',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='ListFlavorsResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def list_health_monitors_async(self, request):
"""ๆฅ่ฏขๅฅๅบทๆฃๆฅๅ่กจ
ๅฅๅบทๆฃๆฅๅ่กจใ
:param ListHealthMonitorsRequest request
:return: ListHealthMonitorsResponse
"""
return self.list_health_monitors_with_http_info(request)
def list_health_monitors_with_http_info(self, request):
"""ๆฅ่ฏขๅฅๅบทๆฃๆฅๅ่กจ
ๅฅๅบทๆฃๆฅๅ่กจใ
:param ListHealthMonitorsRequest request
:return: ListHealthMonitorsResponse
"""
all_params = ['admin_state_up', 'delay', 'domain_name', 'enterprise_project_id', 'expected_codes', 'http_method', 'id', 'limit', 'marker', 'max_retries', 'max_retries_down', 'monitor_port', 'name', 'page_reverse', 'timeout', 'type', 'url_path']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
query_params = []
if 'admin_state_up' in local_var_params:
query_params.append(('admin_state_up', local_var_params['admin_state_up']))
if 'delay' in local_var_params:
query_params.append(('delay', local_var_params['delay']))
collection_formats['delay'] = 'multi'
if 'domain_name' in local_var_params:
query_params.append(('domain_name', local_var_params['domain_name']))
collection_formats['domain_name'] = 'multi'
if 'enterprise_project_id' in local_var_params:
query_params.append(('enterprise_project_id', local_var_params['enterprise_project_id']))
collection_formats['enterprise_project_id'] = 'multi'
if 'expected_codes' in local_var_params:
query_params.append(('expected_codes', local_var_params['expected_codes']))
collection_formats['expected_codes'] = 'multi'
if 'http_method' in local_var_params:
query_params.append(('http_method', local_var_params['http_method']))
collection_formats['http_method'] = 'multi'
if 'id' in local_var_params:
query_params.append(('id', local_var_params['id']))
collection_formats['id'] = 'multi'
if 'limit' in local_var_params:
query_params.append(('limit', local_var_params['limit']))
if 'marker' in local_var_params:
query_params.append(('marker', local_var_params['marker']))
if 'max_retries' in local_var_params:
query_params.append(('max_retries', local_var_params['max_retries']))
collection_formats['max_retries'] = 'multi'
if 'max_retries_down' in local_var_params:
query_params.append(('max_retries_down', local_var_params['max_retries_down']))
collection_formats['max_retries_down'] = 'multi'
if 'monitor_port' in local_var_params:
query_params.append(('monitor_port', local_var_params['monitor_port']))
collection_formats['monitor_port'] = 'multi'
if 'name' in local_var_params:
query_params.append(('name', local_var_params['name']))
collection_formats['name'] = 'multi'
if 'page_reverse' in local_var_params:
query_params.append(('page_reverse', local_var_params['page_reverse']))
if 'timeout' in local_var_params:
query_params.append(('timeout', local_var_params['timeout']))
if 'type' in local_var_params:
query_params.append(('type', local_var_params['type']))
collection_formats['type'] = 'multi'
if 'url_path' in local_var_params:
query_params.append(('url_path', local_var_params['url_path']))
collection_formats['url_path'] = 'multi'
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/healthmonitors',
method='GET',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='ListHealthMonitorsResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def list_l7_policies_async(self, request):
"""ๆฅ่ฏข่ฝฌๅ็ญ็ฅๅ่กจ
ๆฅ่ฏข่ฝฌๅ็ญ็ฅๅ่กจใ
:param ListL7PoliciesRequest request
:return: ListL7PoliciesResponse
"""
return self.list_l7_policies_with_http_info(request)
def list_l7_policies_with_http_info(self, request):
"""ๆฅ่ฏข่ฝฌๅ็ญ็ฅๅ่กจ
ๆฅ่ฏข่ฝฌๅ็ญ็ฅๅ่กจใ
:param ListL7PoliciesRequest request
:return: ListL7PoliciesResponse
"""
all_params = ['action', 'admin_state_up', 'description', 'display_all_rules', 'enterprise_project_id', 'id', 'limit', 'listener_id', 'marker', 'name', 'page_reverse', 'position', 'provisioning_status', 'redirect_listener_id', 'redirect_pool_id', 'redirect_url']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
query_params = []
if 'action' in local_var_params:
query_params.append(('action', local_var_params['action']))
collection_formats['action'] = 'multi'
if 'admin_state_up' in local_var_params:
query_params.append(('admin_state_up', local_var_params['admin_state_up']))
if 'description' in local_var_params:
query_params.append(('description', local_var_params['description']))
collection_formats['description'] = 'multi'
if 'display_all_rules' in local_var_params:
query_params.append(('display_all_rules', local_var_params['display_all_rules']))
if 'enterprise_project_id' in local_var_params:
query_params.append(('enterprise_project_id', local_var_params['enterprise_project_id']))
collection_formats['enterprise_project_id'] = 'multi'
if 'id' in local_var_params:
query_params.append(('id', local_var_params['id']))
collection_formats['id'] = 'multi'
if 'limit' in local_var_params:
query_params.append(('limit', local_var_params['limit']))
if 'listener_id' in local_var_params:
query_params.append(('listener_id', local_var_params['listener_id']))
collection_formats['listener_id'] = 'multi'
if 'marker' in local_var_params:
query_params.append(('marker', local_var_params['marker']))
if 'name' in local_var_params:
query_params.append(('name', local_var_params['name']))
collection_formats['name'] = 'multi'
if 'page_reverse' in local_var_params:
query_params.append(('page_reverse', local_var_params['page_reverse']))
if 'position' in local_var_params:
query_params.append(('position', local_var_params['position']))
collection_formats['position'] = 'multi'
if 'provisioning_status' in local_var_params:
query_params.append(('provisioning_status', local_var_params['provisioning_status']))
collection_formats['provisioning_status'] = 'multi'
if 'redirect_listener_id' in local_var_params:
query_params.append(('redirect_listener_id', local_var_params['redirect_listener_id']))
collection_formats['redirect_listener_id'] = 'multi'
if 'redirect_pool_id' in local_var_params:
query_params.append(('redirect_pool_id', local_var_params['redirect_pool_id']))
collection_formats['redirect_pool_id'] = 'multi'
if 'redirect_url' in local_var_params:
query_params.append(('redirect_url', local_var_params['redirect_url']))
collection_formats['redirect_url'] = 'multi'
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/l7policies',
method='GET',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='ListL7PoliciesResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def list_l7_rules_async(self, request):
"""ๆฅ่ฏข่ฝฌๅ่งๅๅ่กจ
ๆฅ่ฏข่ฝฌๅ่งๅๅ่กจใ
:param ListL7RulesRequest request
:return: ListL7RulesResponse
"""
return self.list_l7_rules_with_http_info(request)
def list_l7_rules_with_http_info(self, request):
"""ๆฅ่ฏข่ฝฌๅ่งๅๅ่กจ
ๆฅ่ฏข่ฝฌๅ่งๅๅ่กจใ
:param ListL7RulesRequest request
:return: ListL7RulesResponse
"""
all_params = ['l7policy_id', 'admin_state_up', 'compare_type', 'enterprise_project_id', 'id', 'invert', 'key', 'limit', 'marker', 'page_reverse', 'provisioning_status', 'type', 'value']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'l7policy_id' in local_var_params:
path_params['l7policy_id'] = local_var_params['l7policy_id']
query_params = []
if 'admin_state_up' in local_var_params:
query_params.append(('admin_state_up', local_var_params['admin_state_up']))
if 'compare_type' in local_var_params:
query_params.append(('compare_type', local_var_params['compare_type']))
collection_formats['compare_type'] = 'multi'
if 'enterprise_project_id' in local_var_params:
query_params.append(('enterprise_project_id', local_var_params['enterprise_project_id']))
collection_formats['enterprise_project_id'] = 'multi'
if 'id' in local_var_params:
query_params.append(('id', local_var_params['id']))
collection_formats['id'] = 'multi'
if 'invert' in local_var_params:
query_params.append(('invert', local_var_params['invert']))
if 'key' in local_var_params:
query_params.append(('key', local_var_params['key']))
collection_formats['key'] = 'multi'
if 'limit' in local_var_params:
query_params.append(('limit', local_var_params['limit']))
if 'marker' in local_var_params:
query_params.append(('marker', local_var_params['marker']))
if 'page_reverse' in local_var_params:
query_params.append(('page_reverse', local_var_params['page_reverse']))
if 'provisioning_status' in local_var_params:
query_params.append(('provisioning_status', local_var_params['provisioning_status']))
collection_formats['provisioning_status'] = 'multi'
if 'type' in local_var_params:
query_params.append(('type', local_var_params['type']))
collection_formats['type'] = 'multi'
if 'value' in local_var_params:
query_params.append(('value', local_var_params['value']))
collection_formats['value'] = 'multi'
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/l7policies/{l7policy_id}/rules',
method='GET',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='ListL7RulesResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def list_listeners_async(self, request):
"""ๆฅ่ฏข็ๅฌๅจๅ่กจ
ๆฅ่ฏข็ๅฌๅจๅ่กจใ
:param ListListenersRequest request
:return: ListListenersResponse
"""
return self.list_listeners_with_http_info(request)
def list_listeners_with_http_info(self, request):
"""ๆฅ่ฏข็ๅฌๅจๅ่กจ
ๆฅ่ฏข็ๅฌๅจๅ่กจใ
:param ListListenersRequest request
:return: ListListenersResponse
"""
all_params = ['admin_state_up', 'client_ca_tls_container_ref', 'client_timeout', 'connection_limit', 'default_pool_id', 'default_tls_container_ref', 'description', 'enable_member_retry', 'enterprise_project_id', 'http2_enable', 'id', 'keepalive_timeout', 'limit', 'loadbalancer_id', 'marker', 'member_address', 'member_device_id', 'member_timeout', 'name', 'page_reverse', 'protocol', 'protocol_port', 'tls_ciphers_policy', 'transparent_client_ip_enable']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
query_params = []
if 'admin_state_up' in local_var_params:
query_params.append(('admin_state_up', local_var_params['admin_state_up']))
if 'client_ca_tls_container_ref' in local_var_params:
query_params.append(('client_ca_tls_container_ref', local_var_params['client_ca_tls_container_ref']))
collection_formats['client_ca_tls_container_ref'] = 'multi'
if 'client_timeout' in local_var_params:
query_params.append(('client_timeout', local_var_params['client_timeout']))
collection_formats['client_timeout'] = 'multi'
if 'connection_limit' in local_var_params:
query_params.append(('connection_limit', local_var_params['connection_limit']))
collection_formats['connection_limit'] = 'multi'
if 'default_pool_id' in local_var_params:
query_params.append(('default_pool_id', local_var_params['default_pool_id']))
collection_formats['default_pool_id'] = 'multi'
if 'default_tls_container_ref' in local_var_params:
query_params.append(('default_tls_container_ref', local_var_params['default_tls_container_ref']))
collection_formats['default_tls_container_ref'] = 'multi'
if 'description' in local_var_params:
query_params.append(('description', local_var_params['description']))
collection_formats['description'] = 'multi'
if 'enable_member_retry' in local_var_params:
query_params.append(('enable_member_retry', local_var_params['enable_member_retry']))
if 'enterprise_project_id' in local_var_params:
query_params.append(('enterprise_project_id', local_var_params['enterprise_project_id']))
collection_formats['enterprise_project_id'] = 'multi'
if 'http2_enable' in local_var_params:
query_params.append(('http2_enable', local_var_params['http2_enable']))
if 'id' in local_var_params:
query_params.append(('id', local_var_params['id']))
collection_formats['id'] = 'multi'
if 'keepalive_timeout' in local_var_params:
query_params.append(('keepalive_timeout', local_var_params['keepalive_timeout']))
collection_formats['keepalive_timeout'] = 'multi'
if 'limit' in local_var_params:
query_params.append(('limit', local_var_params['limit']))
if 'loadbalancer_id' in local_var_params:
query_params.append(('loadbalancer_id', local_var_params['loadbalancer_id']))
collection_formats['loadbalancer_id'] = 'multi'
if 'marker' in local_var_params:
query_params.append(('marker', local_var_params['marker']))
if 'member_address' in local_var_params:
query_params.append(('member_address', local_var_params['member_address']))
collection_formats['member_address'] = 'multi'
if 'member_device_id' in local_var_params:
query_params.append(('member_device_id', local_var_params['member_device_id']))
collection_formats['member_device_id'] = 'multi'
if 'member_timeout' in local_var_params:
query_params.append(('member_timeout', local_var_params['member_timeout']))
collection_formats['member_timeout'] = 'multi'
if 'name' in local_var_params:
query_params.append(('name', local_var_params['name']))
collection_formats['name'] = 'multi'
if 'page_reverse' in local_var_params:
query_params.append(('page_reverse', local_var_params['page_reverse']))
if 'protocol' in local_var_params:
query_params.append(('protocol', local_var_params['protocol']))
collection_formats['protocol'] = 'multi'
if 'protocol_port' in local_var_params:
query_params.append(('protocol_port', local_var_params['protocol_port']))
collection_formats['protocol_port'] = 'multi'
if 'tls_ciphers_policy' in local_var_params:
query_params.append(('tls_ciphers_policy', local_var_params['tls_ciphers_policy']))
collection_formats['tls_ciphers_policy'] = 'multi'
if 'transparent_client_ip_enable' in local_var_params:
query_params.append(('transparent_client_ip_enable', local_var_params['transparent_client_ip_enable']))
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/listeners',
method='GET',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='ListListenersResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def list_load_balancers_async(self, request):
"""ๆฅ่ฏข่ด่ฝฝๅ่กกๅจๅ่กจ
ๆฅ่ฏข่ด่ฝฝๅ่กกๅจๅ่กจ๏ผๆฏๆ่ฟๆปคๆฅ่ฏขๅๅ้กตๆฅ่ฏข
:param ListLoadBalancersRequest request
:return: ListLoadBalancersResponse
"""
return self.list_load_balancers_with_http_info(request)
def list_load_balancers_with_http_info(self, request):
"""ๆฅ่ฏข่ด่ฝฝๅ่กกๅจๅ่กจ
ๆฅ่ฏข่ด่ฝฝๅ่กกๅจๅ่กจ๏ผๆฏๆ่ฟๆปคๆฅ่ฏขๅๅ้กตๆฅ่ฏข
:param ListLoadBalancersRequest request
:return: ListLoadBalancersResponse
"""
all_params = ['admin_state_up', 'availability_zone_list', 'billing_info', 'deletion_protection_enable', 'description', 'eips', 'enterprise_project_id', 'guaranteed', 'id', 'ip_version', 'ipv6_vip_address', 'ipv6_vip_port_id', 'ipv6_vip_virsubnet_id', 'l4_flavor_id', 'l4_scale_flavor_id', 'l7_flavor_id', 'l7_scale_flavor_id', 'limit', 'marker', 'member_address', 'member_device_id', 'name', 'operating_status', 'page_reverse', 'provisioning_status', 'publicips', 'vip_address', 'vip_port_id', 'vip_subnet_cidr_id', 'vpc_id']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
query_params = []
if 'admin_state_up' in local_var_params:
query_params.append(('admin_state_up', local_var_params['admin_state_up']))
if 'availability_zone_list' in local_var_params:
query_params.append(('availability_zone_list', local_var_params['availability_zone_list']))
collection_formats['availability_zone_list'] = 'multi'
if 'billing_info' in local_var_params:
query_params.append(('billing_info', local_var_params['billing_info']))
collection_formats['billing_info'] = 'multi'
if 'deletion_protection_enable' in local_var_params:
query_params.append(('deletion_protection_enable', local_var_params['deletion_protection_enable']))
if 'description' in local_var_params:
query_params.append(('description', local_var_params['description']))
collection_formats['description'] = 'multi'
if 'eips' in local_var_params:
query_params.append(('eips', local_var_params['eips']))
collection_formats['eips'] = 'multi'
if 'enterprise_project_id' in local_var_params:
query_params.append(('enterprise_project_id', local_var_params['enterprise_project_id']))
collection_formats['enterprise_project_id'] = 'multi'
if 'guaranteed' in local_var_params:
query_params.append(('guaranteed', local_var_params['guaranteed']))
if 'id' in local_var_params:
query_params.append(('id', local_var_params['id']))
collection_formats['id'] = 'multi'
if 'ip_version' in local_var_params:
query_params.append(('ip_version', local_var_params['ip_version']))
collection_formats['ip_version'] = 'multi'
if 'ipv6_vip_address' in local_var_params:
query_params.append(('ipv6_vip_address', local_var_params['ipv6_vip_address']))
collection_formats['ipv6_vip_address'] = 'multi'
if 'ipv6_vip_port_id' in local_var_params:
query_params.append(('ipv6_vip_port_id', local_var_params['ipv6_vip_port_id']))
collection_formats['ipv6_vip_port_id'] = 'multi'
if 'ipv6_vip_virsubnet_id' in local_var_params:
query_params.append(('ipv6_vip_virsubnet_id', local_var_params['ipv6_vip_virsubnet_id']))
collection_formats['ipv6_vip_virsubnet_id'] = 'multi'
if 'l4_flavor_id' in local_var_params:
query_params.append(('l4_flavor_id', local_var_params['l4_flavor_id']))
collection_formats['l4_flavor_id'] = 'multi'
if 'l4_scale_flavor_id' in local_var_params:
query_params.append(('l4_scale_flavor_id', local_var_params['l4_scale_flavor_id']))
collection_formats['l4_scale_flavor_id'] = 'multi'
if 'l7_flavor_id' in local_var_params:
query_params.append(('l7_flavor_id', local_var_params['l7_flavor_id']))
collection_formats['l7_flavor_id'] = 'multi'
if 'l7_scale_flavor_id' in local_var_params:
query_params.append(('l7_scale_flavor_id', local_var_params['l7_scale_flavor_id']))
collection_formats['l7_scale_flavor_id'] = 'multi'
if 'limit' in local_var_params:
query_params.append(('limit', local_var_params['limit']))
if 'marker' in local_var_params:
query_params.append(('marker', local_var_params['marker']))
if 'member_address' in local_var_params:
query_params.append(('member_address', local_var_params['member_address']))
collection_formats['member_address'] = 'multi'
if 'member_device_id' in local_var_params:
query_params.append(('member_device_id', local_var_params['member_device_id']))
collection_formats['member_device_id'] = 'multi'
if 'name' in local_var_params:
query_params.append(('name', local_var_params['name']))
collection_formats['name'] = 'multi'
if 'operating_status' in local_var_params:
query_params.append(('operating_status', local_var_params['operating_status']))
collection_formats['operating_status'] = 'multi'
if 'page_reverse' in local_var_params:
query_params.append(('page_reverse', local_var_params['page_reverse']))
if 'provisioning_status' in local_var_params:
query_params.append(('provisioning_status', local_var_params['provisioning_status']))
collection_formats['provisioning_status'] = 'multi'
if 'publicips' in local_var_params:
query_params.append(('publicips', local_var_params['publicips']))
collection_formats['publicips'] = 'multi'
if 'vip_address' in local_var_params:
query_params.append(('vip_address', local_var_params['vip_address']))
collection_formats['vip_address'] = 'multi'
if 'vip_port_id' in local_var_params:
query_params.append(('vip_port_id', local_var_params['vip_port_id']))
collection_formats['vip_port_id'] = 'multi'
if 'vip_subnet_cidr_id' in local_var_params:
query_params.append(('vip_subnet_cidr_id', local_var_params['vip_subnet_cidr_id']))
collection_formats['vip_subnet_cidr_id'] = 'multi'
if 'vpc_id' in local_var_params:
query_params.append(('vpc_id', local_var_params['vpc_id']))
collection_formats['vpc_id'] = 'multi'
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/loadbalancers',
method='GET',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='ListLoadBalancersResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def list_members_async(self, request):
"""ๅ็ซฏๆๅกๅจๅ่กจ
Poolไธ็ๅ็ซฏๆๅกๅจๅ่กจใ
:param ListMembersRequest request
:return: ListMembersResponse
"""
return self.list_members_with_http_info(request)
def list_members_with_http_info(self, request):
"""ๅ็ซฏๆๅกๅจๅ่กจ
Poolไธ็ๅ็ซฏๆๅกๅจๅ่กจใ
:param ListMembersRequest request
:return: ListMembersResponse
"""
all_params = ['pool_id', 'address', 'admin_state_up', 'enterprise_project_id', 'id', 'limit', 'marker', 'name', 'operating_status', 'page_reverse', 'protocol_port', 'subnet_cidr_id', 'weight']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'pool_id' in local_var_params:
path_params['pool_id'] = local_var_params['pool_id']
query_params = []
if 'address' in local_var_params:
query_params.append(('address', local_var_params['address']))
collection_formats['address'] = 'multi'
if 'admin_state_up' in local_var_params:
query_params.append(('admin_state_up', local_var_params['admin_state_up']))
if 'enterprise_project_id' in local_var_params:
query_params.append(('enterprise_project_id', local_var_params['enterprise_project_id']))
collection_formats['enterprise_project_id'] = 'multi'
if 'id' in local_var_params:
query_params.append(('id', local_var_params['id']))
collection_formats['id'] = 'multi'
if 'limit' in local_var_params:
query_params.append(('limit', local_var_params['limit']))
if 'marker' in local_var_params:
query_params.append(('marker', local_var_params['marker']))
if 'name' in local_var_params:
query_params.append(('name', local_var_params['name']))
collection_formats['name'] = 'multi'
if 'operating_status' in local_var_params:
query_params.append(('operating_status', local_var_params['operating_status']))
collection_formats['operating_status'] = 'multi'
if 'page_reverse' in local_var_params:
query_params.append(('page_reverse', local_var_params['page_reverse']))
if 'protocol_port' in local_var_params:
query_params.append(('protocol_port', local_var_params['protocol_port']))
collection_formats['protocol_port'] = 'multi'
if 'subnet_cidr_id' in local_var_params:
query_params.append(('subnet_cidr_id', local_var_params['subnet_cidr_id']))
collection_formats['subnet_cidr_id'] = 'multi'
if 'weight' in local_var_params:
query_params.append(('weight', local_var_params['weight']))
collection_formats['weight'] = 'multi'
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/pools/{pool_id}/members',
method='GET',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='ListMembersResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def list_pools_async(self, request):
"""ๆฅ่ฏขๅ็ซฏๆๅกๅจ็ปๅ่กจ
ๅ็ซฏๆๅกๅจ็ปๅ่กจใ
:param ListPoolsRequest request
:return: ListPoolsResponse
"""
return self.list_pools_with_http_info(request)
def list_pools_with_http_info(self, request):
"""ๆฅ่ฏขๅ็ซฏๆๅกๅจ็ปๅ่กจ
ๅ็ซฏๆๅกๅจ็ปๅ่กจใ
:param ListPoolsRequest request
:return: ListPoolsResponse
"""
all_params = ['admin_state_up', 'description', 'enterprise_project_id', 'healthmonitor_id', 'id', 'ip_version', 'lb_algorithm', 'limit', 'loadbalancer_id', 'marker', 'member_address', 'member_deletion_protection_enable', 'member_device_id', 'name', 'page_reverse', 'protocol']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
query_params = []
if 'admin_state_up' in local_var_params:
query_params.append(('admin_state_up', local_var_params['admin_state_up']))
if 'description' in local_var_params:
query_params.append(('description', local_var_params['description']))
collection_formats['description'] = 'multi'
if 'enterprise_project_id' in local_var_params:
query_params.append(('enterprise_project_id', local_var_params['enterprise_project_id']))
collection_formats['enterprise_project_id'] = 'multi'
if 'healthmonitor_id' in local_var_params:
query_params.append(('healthmonitor_id', local_var_params['healthmonitor_id']))
collection_formats['healthmonitor_id'] = 'multi'
if 'id' in local_var_params:
query_params.append(('id', local_var_params['id']))
collection_formats['id'] = 'multi'
if 'ip_version' in local_var_params:
query_params.append(('ip_version', local_var_params['ip_version']))
collection_formats['ip_version'] = 'multi'
if 'lb_algorithm' in local_var_params:
query_params.append(('lb_algorithm', local_var_params['lb_algorithm']))
collection_formats['lb_algorithm'] = 'multi'
if 'limit' in local_var_params:
query_params.append(('limit', local_var_params['limit']))
if 'loadbalancer_id' in local_var_params:
query_params.append(('loadbalancer_id', local_var_params['loadbalancer_id']))
collection_formats['loadbalancer_id'] = 'multi'
if 'marker' in local_var_params:
query_params.append(('marker', local_var_params['marker']))
if 'member_address' in local_var_params:
query_params.append(('member_address', local_var_params['member_address']))
collection_formats['member_address'] = 'multi'
if 'member_deletion_protection_enable' in local_var_params:
query_params.append(('member_deletion_protection_enable', local_var_params['member_deletion_protection_enable']))
if 'member_device_id' in local_var_params:
query_params.append(('member_device_id', local_var_params['member_device_id']))
collection_formats['member_device_id'] = 'multi'
if 'name' in local_var_params:
query_params.append(('name', local_var_params['name']))
collection_formats['name'] = 'multi'
if 'page_reverse' in local_var_params:
query_params.append(('page_reverse', local_var_params['page_reverse']))
if 'protocol' in local_var_params:
query_params.append(('protocol', local_var_params['protocol']))
collection_formats['protocol'] = 'multi'
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/pools',
method='GET',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='ListPoolsResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def show_certificate_async(self, request):
"""่ฏไนฆ่ฏฆๆ
ๆฅ่ฏขSSL่ฏไนฆ่ฏฆๆ
ใ
:param ShowCertificateRequest request
:return: ShowCertificateResponse
"""
return self.show_certificate_with_http_info(request)
def show_certificate_with_http_info(self, request):
"""่ฏไนฆ่ฏฆๆ
ๆฅ่ฏขSSL่ฏไนฆ่ฏฆๆ
ใ
:param ShowCertificateRequest request
:return: ShowCertificateResponse
"""
all_params = ['certificate_id']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'certificate_id' in local_var_params:
path_params['certificate_id'] = local_var_params['certificate_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/certificates/{certificate_id}',
method='GET',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='ShowCertificateResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def show_flavor_async(self, request):
"""ๆฅ่ฏข่งๆ ผ่ฏฆๆ
ๆฅ่ฏข่งๆ ผ็่ฏฆๆ
ใ
:param ShowFlavorRequest request
:return: ShowFlavorResponse
"""
return self.show_flavor_with_http_info(request)
def show_flavor_with_http_info(self, request):
"""ๆฅ่ฏข่งๆ ผ่ฏฆๆ
ๆฅ่ฏข่งๆ ผ็่ฏฆๆ
ใ
:param ShowFlavorRequest request
:return: ShowFlavorResponse
"""
all_params = ['flavor_id']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'flavor_id' in local_var_params:
path_params['flavor_id'] = local_var_params['flavor_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/flavors/{flavor_id}',
method='GET',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='ShowFlavorResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def show_health_monitor_async(self, request):
"""ๆฅ่ฏขๅฅๅบทๆฃๆฅ่ฏฆๆ
ๆฅ่ฏขๅฅๅบทๆฃๆฅ่ฏฆๆ
ใ
:param ShowHealthMonitorRequest request
:return: ShowHealthMonitorResponse
"""
return self.show_health_monitor_with_http_info(request)
def show_health_monitor_with_http_info(self, request):
"""ๆฅ่ฏขๅฅๅบทๆฃๆฅ่ฏฆๆ
ๆฅ่ฏขๅฅๅบทๆฃๆฅ่ฏฆๆ
ใ
:param ShowHealthMonitorRequest request
:return: ShowHealthMonitorResponse
"""
all_params = ['healthmonitor_id']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'healthmonitor_id' in local_var_params:
path_params['healthmonitor_id'] = local_var_params['healthmonitor_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/healthmonitors/{healthmonitor_id}',
method='GET',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='ShowHealthMonitorResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def show_l7_policy_async(self, request):
"""ๆฅ่ฏข่ฝฌๅ็ญ็ฅ่ฏฆๆ
ๆฅ่ฏข่ฝฌๅ็ญ็ฅ่ฏฆๆ
ใ
:param ShowL7PolicyRequest request
:return: ShowL7PolicyResponse
"""
return self.show_l7_policy_with_http_info(request)
def show_l7_policy_with_http_info(self, request):
"""ๆฅ่ฏข่ฝฌๅ็ญ็ฅ่ฏฆๆ
ๆฅ่ฏข่ฝฌๅ็ญ็ฅ่ฏฆๆ
ใ
:param ShowL7PolicyRequest request
:return: ShowL7PolicyResponse
"""
all_params = ['l7policy_id']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'l7policy_id' in local_var_params:
path_params['l7policy_id'] = local_var_params['l7policy_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/l7policies/{l7policy_id}',
method='GET',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='ShowL7PolicyResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def show_l7_rule_async(self, request):
"""ๆฅ่ฏข่ฝฌๅ่งๅ่ฏฆๆ
ๆฅ่ฏข่ฝฌๅ่งๅ่ฏฆๆ
:param ShowL7RuleRequest request
:return: ShowL7RuleResponse
"""
return self.show_l7_rule_with_http_info(request)
def show_l7_rule_with_http_info(self, request):
"""ๆฅ่ฏข่ฝฌๅ่งๅ่ฏฆๆ
ๆฅ่ฏข่ฝฌๅ่งๅ่ฏฆๆ
:param ShowL7RuleRequest request
:return: ShowL7RuleResponse
"""
all_params = ['l7policy_id', 'l7rule_id']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'l7policy_id' in local_var_params:
path_params['l7policy_id'] = local_var_params['l7policy_id']
if 'l7rule_id' in local_var_params:
path_params['l7rule_id'] = local_var_params['l7rule_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/l7policies/{l7policy_id}/rules/{l7rule_id}',
method='GET',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='ShowL7RuleResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def show_listener_async(self, request):
"""ๆฅ่ฏข็ๅฌๅจ่ฏฆๆ
็ๅฌๅจ่ฏฆๆ
ใ
:param ShowListenerRequest request
:return: ShowListenerResponse
"""
return self.show_listener_with_http_info(request)
def show_listener_with_http_info(self, request):
"""ๆฅ่ฏข็ๅฌๅจ่ฏฆๆ
็ๅฌๅจ่ฏฆๆ
ใ
:param ShowListenerRequest request
:return: ShowListenerResponse
"""
all_params = ['listener_id']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'listener_id' in local_var_params:
path_params['listener_id'] = local_var_params['listener_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/listeners/{listener_id}',
method='GET',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='ShowListenerResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def show_load_balancer_async(self, request):
"""ๆฅ่ฏข่ด่ฝฝๅ่กกๅจ่ฏฆๆ
ๆฅ่ฏข่ด่ฝฝๅ่กกๅจ่ฏฆๆ
:param ShowLoadBalancerRequest request
:return: ShowLoadBalancerResponse
"""
return self.show_load_balancer_with_http_info(request)
def show_load_balancer_with_http_info(self, request):
"""ๆฅ่ฏข่ด่ฝฝๅ่กกๅจ่ฏฆๆ
ๆฅ่ฏข่ด่ฝฝๅ่กกๅจ่ฏฆๆ
:param ShowLoadBalancerRequest request
:return: ShowLoadBalancerResponse
"""
all_params = ['loadbalancer_id']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'loadbalancer_id' in local_var_params:
path_params['loadbalancer_id'] = local_var_params['loadbalancer_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/loadbalancers/{loadbalancer_id}',
method='GET',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='ShowLoadBalancerResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def show_load_balancer_status_async(self, request):
"""ๆฅ่ฏข่ด่ฝฝๅ่กกๅจ็ถๆๆ
ๆฅ่ฏข่ด่ฝฝๅ่กกๅจ็ถๆๆ ๏ผๅๅบ่ด่ฝฝๅ่กกๅจๅ
ณ่็ๅญ่ตๆบ็ไฟกๆฏ
:param ShowLoadBalancerStatusRequest request
:return: ShowLoadBalancerStatusResponse
"""
return self.show_load_balancer_status_with_http_info(request)
def show_load_balancer_status_with_http_info(self, request):
"""ๆฅ่ฏข่ด่ฝฝๅ่กกๅจ็ถๆๆ
ๆฅ่ฏข่ด่ฝฝๅ่กกๅจ็ถๆๆ ๏ผๅๅบ่ด่ฝฝๅ่กกๅจๅ
ณ่็ๅญ่ตๆบ็ไฟกๆฏ
:param ShowLoadBalancerStatusRequest request
:return: ShowLoadBalancerStatusResponse
"""
all_params = ['loadbalancer_id']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'loadbalancer_id' in local_var_params:
path_params['loadbalancer_id'] = local_var_params['loadbalancer_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/loadbalancers/{loadbalancer_id}/statuses',
method='GET',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='ShowLoadBalancerStatusResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def show_member_async(self, request):
"""ๅ็ซฏๆๅกๅจ่ฏฆๆ
ๅ็ซฏๆๅกๅจ่ฏฆๆ
:param ShowMemberRequest request
:return: ShowMemberResponse
"""
return self.show_member_with_http_info(request)
def show_member_with_http_info(self, request):
"""ๅ็ซฏๆๅกๅจ่ฏฆๆ
ๅ็ซฏๆๅกๅจ่ฏฆๆ
:param ShowMemberRequest request
:return: ShowMemberResponse
"""
all_params = ['member_id', 'pool_id']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'member_id' in local_var_params:
path_params['member_id'] = local_var_params['member_id']
if 'pool_id' in local_var_params:
path_params['pool_id'] = local_var_params['pool_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/pools/{pool_id}/members/{member_id}',
method='GET',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='ShowMemberResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def show_pool_async(self, request):
"""ๆฅ่ฏขๅ็ซฏๆๅกๅจ็ป่ฏฆๆ
ๅ็ซฏๆๅกๅจ็ป่ฏฆๆ
ใ
:param ShowPoolRequest request
:return: ShowPoolResponse
"""
return self.show_pool_with_http_info(request)
def show_pool_with_http_info(self, request):
"""ๆฅ่ฏขๅ็ซฏๆๅกๅจ็ป่ฏฆๆ
ๅ็ซฏๆๅกๅจ็ป่ฏฆๆ
ใ
:param ShowPoolRequest request
:return: ShowPoolResponse
"""
all_params = ['pool_id']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'pool_id' in local_var_params:
path_params['pool_id'] = local_var_params['pool_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/pools/{pool_id}',
method='GET',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='ShowPoolResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def show_quota_async(self, request):
"""ๆฅ่ฏข้
้ข่ฏฆๆ
ใไธๅผๆพใๆฅ่ฏข็นๅฎ้กน็ฎ็้
้ขๆฐใ
:param ShowQuotaRequest request
:return: ShowQuotaResponse
"""
return self.show_quota_with_http_info(request)
def show_quota_with_http_info(self, request):
"""ๆฅ่ฏข้
้ข่ฏฆๆ
ใไธๅผๆพใๆฅ่ฏข็นๅฎ้กน็ฎ็้
้ขๆฐใ
:param ShowQuotaRequest request
:return: ShowQuotaResponse
"""
all_params = []
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
query_params = []
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/quotas',
method='GET',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='ShowQuotaResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def show_quota_defaults_async(self, request):
"""ๆฅ่ฏข้ป่ฎค้
้ข
ใไธๅผๆพใๆฅ่ฏข้ป่ฎค้
้ขๆฐใ
:param ShowQuotaDefaultsRequest request
:return: ShowQuotaDefaultsResponse
"""
return self.show_quota_defaults_with_http_info(request)
def show_quota_defaults_with_http_info(self, request):
"""ๆฅ่ฏข้ป่ฎค้
้ข
ใไธๅผๆพใๆฅ่ฏข้ป่ฎค้
้ขๆฐใ
:param ShowQuotaDefaultsRequest request
:return: ShowQuotaDefaultsResponse
"""
all_params = []
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
query_params = []
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/quotas/defaults',
method='GET',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='ShowQuotaDefaultsResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def update_certificate_async(self, request):
"""ๆดๆฐ่ฏไนฆ
ๆดๆฐSSL่ฏไนฆใ
:param UpdateCertificateRequest request
:return: UpdateCertificateResponse
"""
return self.update_certificate_with_http_info(request)
def update_certificate_with_http_info(self, request):
"""ๆดๆฐ่ฏไนฆ
ๆดๆฐSSL่ฏไนฆใ
:param UpdateCertificateRequest request
:return: UpdateCertificateResponse
"""
all_params = ['certificate_id', 'update_certificate_request_body']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'certificate_id' in local_var_params:
path_params['certificate_id'] = local_var_params['certificate_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if 'body' in local_var_params:
body_params = local_var_params['body']
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json;charset=UTF-8'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/certificates/{certificate_id}',
method='PUT',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='UpdateCertificateResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def update_health_monitor_async(self, request):
"""ๆดๆฐๅฅๅบทๆฃๆฅ
ๆดๆฐๅฅๅบทๆฃๆฅใ
:param UpdateHealthMonitorRequest request
:return: UpdateHealthMonitorResponse
"""
return self.update_health_monitor_with_http_info(request)
def update_health_monitor_with_http_info(self, request):
"""ๆดๆฐๅฅๅบทๆฃๆฅ
ๆดๆฐๅฅๅบทๆฃๆฅใ
:param UpdateHealthMonitorRequest request
:return: UpdateHealthMonitorResponse
"""
all_params = ['healthmonitor_id', 'update_health_monitor_request_body']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'healthmonitor_id' in local_var_params:
path_params['healthmonitor_id'] = local_var_params['healthmonitor_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if 'body' in local_var_params:
body_params = local_var_params['body']
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json;charset=UTF-8'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/healthmonitors/{healthmonitor_id}',
method='PUT',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='UpdateHealthMonitorResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def update_l7_policy_async(self, request):
"""ๆดๆฐ่ฝฌๅ็ญ็ฅ
ๆดๆฐ่ฝฌๅ็ญ็ฅใ
:param UpdateL7PolicyRequest request
:return: UpdateL7PolicyResponse
"""
return self.update_l7_policy_with_http_info(request)
def update_l7_policy_with_http_info(self, request):
"""ๆดๆฐ่ฝฌๅ็ญ็ฅ
ๆดๆฐ่ฝฌๅ็ญ็ฅใ
:param UpdateL7PolicyRequest request
:return: UpdateL7PolicyResponse
"""
all_params = ['l7policy_id', 'update_l7_policy_request_body']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'l7policy_id' in local_var_params:
path_params['l7policy_id'] = local_var_params['l7policy_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if 'body' in local_var_params:
body_params = local_var_params['body']
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json;charset=UTF-8'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/l7policies/{l7policy_id}',
method='PUT',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='UpdateL7PolicyResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def update_l7_rule_async(self, request):
"""ๆดๆฐ่ฝฌๅ่งๅ
ๆดๆฐ่ฝฌๅ่งๅใ
:param UpdateL7RuleRequest request
:return: UpdateL7RuleResponse
"""
return self.update_l7_rule_with_http_info(request)
def update_l7_rule_with_http_info(self, request):
"""ๆดๆฐ่ฝฌๅ่งๅ
ๆดๆฐ่ฝฌๅ่งๅใ
:param UpdateL7RuleRequest request
:return: UpdateL7RuleResponse
"""
all_params = ['l7policy_id', 'l7rule_id', 'update_l7_rule_request_body']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'l7policy_id' in local_var_params:
path_params['l7policy_id'] = local_var_params['l7policy_id']
if 'l7rule_id' in local_var_params:
path_params['l7rule_id'] = local_var_params['l7rule_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if 'body' in local_var_params:
body_params = local_var_params['body']
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json;charset=UTF-8'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/l7policies/{l7policy_id}/rules/{l7rule_id}',
method='PUT',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='UpdateL7RuleResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def update_listener_async(self, request):
"""ๆดๆฐ็ๅฌๅจ
ๆดๆฐ็ๅฌๅจใ
:param UpdateListenerRequest request
:return: UpdateListenerResponse
"""
return self.update_listener_with_http_info(request)
def update_listener_with_http_info(self, request):
"""ๆดๆฐ็ๅฌๅจ
ๆดๆฐ็ๅฌๅจใ
:param UpdateListenerRequest request
:return: UpdateListenerResponse
"""
all_params = ['listener_id', 'update_listener_request_body']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'listener_id' in local_var_params:
path_params['listener_id'] = local_var_params['listener_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if 'body' in local_var_params:
body_params = local_var_params['body']
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json;charset=UTF-8'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/listeners/{listener_id}',
method='PUT',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='UpdateListenerResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def update_load_balancer_async(self, request):
"""ๆดๆฐ่ด่ฝฝๅ่กกๅจ
ๆดๆฐ่ด่ฝฝๅ่กกๅจใ
:param UpdateLoadBalancerRequest request
:return: UpdateLoadBalancerResponse
"""
return self.update_load_balancer_with_http_info(request)
def update_load_balancer_with_http_info(self, request):
"""ๆดๆฐ่ด่ฝฝๅ่กกๅจ
ๆดๆฐ่ด่ฝฝๅ่กกๅจใ
:param UpdateLoadBalancerRequest request
:return: UpdateLoadBalancerResponse
"""
all_params = ['loadbalancer_id', 'update_load_balancer_request_body']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'loadbalancer_id' in local_var_params:
path_params['loadbalancer_id'] = local_var_params['loadbalancer_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if 'body' in local_var_params:
body_params = local_var_params['body']
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json;charset=UTF-8'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/loadbalancers/{loadbalancer_id}',
method='PUT',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='UpdateLoadBalancerResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def update_member_async(self, request):
"""ๆดๆฐๅ็ซฏๆๅกๅจ
ๅฆๆmember็ปๅฎ็่ด่ฝฝๅ่กกๅจ็provisioning statusไธๆฏACTIVE๏ผๅไธ่ฝๆดๆฐ่ฏฅmemberใ
:param UpdateMemberRequest request
:return: UpdateMemberResponse
"""
return self.update_member_with_http_info(request)
def update_member_with_http_info(self, request):
"""ๆดๆฐๅ็ซฏๆๅกๅจ
ๅฆๆmember็ปๅฎ็่ด่ฝฝๅ่กกๅจ็provisioning statusไธๆฏACTIVE๏ผๅไธ่ฝๆดๆฐ่ฏฅmemberใ
:param UpdateMemberRequest request
:return: UpdateMemberResponse
"""
all_params = ['member_id', 'pool_id', 'update_member_request_body']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'member_id' in local_var_params:
path_params['member_id'] = local_var_params['member_id']
if 'pool_id' in local_var_params:
path_params['pool_id'] = local_var_params['pool_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if 'body' in local_var_params:
body_params = local_var_params['body']
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json;charset=UTF-8'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/pools/{pool_id}/members/{member_id}',
method='PUT',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='UpdateMemberResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def update_pool_async(self, request):
"""ๆดๆฐๅ็ซฏๆๅกๅจ็ป
ๆดๆฐๅ็ซฏๆๅกๅจ็ปใ
:param UpdatePoolRequest request
:return: UpdatePoolResponse
"""
return self.update_pool_with_http_info(request)
def update_pool_with_http_info(self, request):
"""ๆดๆฐๅ็ซฏๆๅกๅจ็ป
ๆดๆฐๅ็ซฏๆๅกๅจ็ปใ
:param UpdatePoolRequest request
:return: UpdatePoolResponse
"""
all_params = ['pool_id', 'update_pool_request_body']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'pool_id' in local_var_params:
path_params['pool_id'] = local_var_params['pool_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if 'body' in local_var_params:
body_params = local_var_params['body']
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json;charset=UTF-8'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/pools/{pool_id}',
method='PUT',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='UpdatePoolResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def count_preoccupy_ip_num_async(self, request):
"""่ฎก็ฎ้ขๅ IPๆฐ
่ฎก็ฎๅๅปบไธไธช่ด่ฝฝๅ่กกๅฎไพๅ็ฌฌไธไธชไธๅฑ็ๅฌๅจ้้ขๅ ็จ็IPๆฐ
:param CountPreoccupyIpNumRequest request
:return: CountPreoccupyIpNumResponse
"""
return self.count_preoccupy_ip_num_with_http_info(request)
def count_preoccupy_ip_num_with_http_info(self, request):
"""่ฎก็ฎ้ขๅ IPๆฐ
่ฎก็ฎๅๅปบไธไธช่ด่ฝฝๅ่กกๅฎไพๅ็ฌฌไธไธชไธๅฑ็ๅฌๅจ้้ขๅ ็จ็IPๆฐ
:param CountPreoccupyIpNumRequest request
:return: CountPreoccupyIpNumResponse
"""
all_params = ['availability_zone_id', 'ip_target_enable', 'ip_version', 'l7_flavor_id', 'loadbalancer_id']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
query_params = []
if 'availability_zone_id' in local_var_params:
query_params.append(('availability_zone_id', local_var_params['availability_zone_id']))
collection_formats['availability_zone_id'] = 'multi'
if 'ip_target_enable' in local_var_params:
query_params.append(('ip_target_enable', local_var_params['ip_target_enable']))
if 'ip_version' in local_var_params:
query_params.append(('ip_version', local_var_params['ip_version']))
if 'l7_flavor_id' in local_var_params:
query_params.append(('l7_flavor_id', local_var_params['l7_flavor_id']))
if 'loadbalancer_id' in local_var_params:
query_params.append(('loadbalancer_id', local_var_params['loadbalancer_id']))
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/preoccupy-ip-num',
method='GET',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='CountPreoccupyIpNumResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def create_ip_group_async(self, request):
"""ๅๅปบIPๅฐๅ็ป
ๅๅปบipๅฐๅ็ป
:param CreateIpGroupRequest request
:return: CreateIpGroupResponse
"""
return self.create_ip_group_with_http_info(request)
def create_ip_group_with_http_info(self, request):
"""ๅๅปบIPๅฐๅ็ป
ๅๅปบipๅฐๅ็ป
:param CreateIpGroupRequest request
:return: CreateIpGroupResponse
"""
all_params = ['create_ip_group_request_body']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
query_params = []
header_params = {}
form_params = {}
body_params = None
if 'body' in local_var_params:
body_params = local_var_params['body']
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json;charset=UTF-8'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/ipgroups',
method='POST',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='CreateIpGroupResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def delete_ip_group_async(self, request):
"""ๅ ้คIPๅฐๅ็ป
ๅ ้คipๅฐๅ็ปใ
:param DeleteIpGroupRequest request
:return: DeleteIpGroupResponse
"""
return self.delete_ip_group_with_http_info(request)
def delete_ip_group_with_http_info(self, request):
"""ๅ ้คIPๅฐๅ็ป
ๅ ้คipๅฐๅ็ปใ
:param DeleteIpGroupRequest request
:return: DeleteIpGroupResponse
"""
all_params = ['ipgroup_id']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'ipgroup_id' in local_var_params:
path_params['ipgroup_id'] = local_var_params['ipgroup_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/ipgroups/{ipgroup_id}',
method='DELETE',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='DeleteIpGroupResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def list_ip_groups_async(self, request):
"""ๆฅ่ฏขIPๅฐๅ็ปๅ่กจ
ๆฅ่ฏขIPๅฐๅ็ปๅ่กจ
:param ListIpGroupsRequest request
:return: ListIpGroupsResponse
"""
return self.list_ip_groups_with_http_info(request)
def list_ip_groups_with_http_info(self, request):
"""ๆฅ่ฏขIPๅฐๅ็ปๅ่กจ
ๆฅ่ฏขIPๅฐๅ็ปๅ่กจ
:param ListIpGroupsRequest request
:return: ListIpGroupsResponse
"""
all_params = ['description', 'id', 'ip_list', 'limit', 'marker', 'name', 'page_reverse']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
query_params = []
if 'description' in local_var_params:
query_params.append(('description', local_var_params['description']))
collection_formats['description'] = 'multi'
if 'id' in local_var_params:
query_params.append(('id', local_var_params['id']))
collection_formats['id'] = 'multi'
if 'ip_list' in local_var_params:
query_params.append(('ip_list', local_var_params['ip_list']))
collection_formats['ip_list'] = 'multi'
if 'limit' in local_var_params:
query_params.append(('limit', local_var_params['limit']))
if 'marker' in local_var_params:
query_params.append(('marker', local_var_params['marker']))
if 'name' in local_var_params:
query_params.append(('name', local_var_params['name']))
collection_formats['name'] = 'multi'
if 'page_reverse' in local_var_params:
query_params.append(('page_reverse', local_var_params['page_reverse']))
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/ipgroups',
method='GET',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='ListIpGroupsResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def show_ip_group_async(self, request):
"""ๆฅ่ฏขIPๅฐๅ็ป่ฏฆๆ
่ทๅipๅฐๅ็ป่ฏฆๆ
:param ShowIpGroupRequest request
:return: ShowIpGroupResponse
"""
return self.show_ip_group_with_http_info(request)
def show_ip_group_with_http_info(self, request):
"""ๆฅ่ฏขIPๅฐๅ็ป่ฏฆๆ
่ทๅipๅฐๅ็ป่ฏฆๆ
:param ShowIpGroupRequest request
:return: ShowIpGroupResponse
"""
all_params = ['ipgroup_id']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'ipgroup_id' in local_var_params:
path_params['ipgroup_id'] = local_var_params['ipgroup_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/ipgroups/{ipgroup_id}',
method='GET',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='ShowIpGroupResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def update_ip_group_async(self, request):
"""ๆดๆฐIPๅฐๅ็ป
ๆดๆฐipๅฐๅ็ป๏ผๅชๆฏๆๅ
จ้ๆดๆฐipใ
:param UpdateIpGroupRequest request
:return: UpdateIpGroupResponse
"""
return self.update_ip_group_with_http_info(request)
def update_ip_group_with_http_info(self, request):
"""ๆดๆฐIPๅฐๅ็ป
ๆดๆฐipๅฐๅ็ป๏ผๅชๆฏๆๅ
จ้ๆดๆฐipใ
:param UpdateIpGroupRequest request
:return: UpdateIpGroupResponse
"""
all_params = ['ipgroup_id', 'update_ip_group_request_body']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'ipgroup_id' in local_var_params:
path_params['ipgroup_id'] = local_var_params['ipgroup_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if 'body' in local_var_params:
body_params = local_var_params['body']
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json;charset=UTF-8'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/elb/ipgroups/{ipgroup_id}',
method='PUT',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='UpdateIpGroupResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def call_api(self, resource_path, method, path_params=None, query_params=None, header_params=None, body=None,
post_params=None, response_type=None, response_headers=None, auth_settings=None,
collection_formats=None, request_type=None):
"""Makes the HTTP request and returns deserialized data.
:param resource_path: Path to method endpoint.
:param method: Method to call.
:param path_params: Path parameters in the url.
:param query_params: Query parameters in the url.
:param header_params: Header parameters to be
placed in the request header.
:param body: Request body.
:param post_params dict: Request post form parameters,
for `application/x-www-form-urlencoded`, `multipart/form-data`.
:param auth_settings list: Auth Settings names for the request.
:param response_type: Response data type.
:param response_headers: Header should be added to response data.
:param collection_formats: dict of collection formats for path, query,
header, and post parameters.
:param request_type: Request data type.
:return:
Return the response directly.
"""
return self.do_http_request(
method=method,
resource_path=resource_path,
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body,
post_params=post_params,
response_type=response_type,
response_headers=response_headers,
collection_formats=collection_formats,
request_type=request_type,
async_request=True)
| 33.239897
| 533
| 0.629564
| 13,325
| 129,137
| 5.681201
| 0.035497
| 0.059179
| 0.103564
| 0.047978
| 0.891641
| 0.870955
| 0.841629
| 0.811418
| 0.800507
| 0.694011
| 0
| 0.003212
| 0.276737
| 129,137
| 3,884
| 534
| 33.248455
| 0.807302
| 0.087597
| 0
| 0.809483
| 0
| 0
| 0.151475
| 0.050791
| 0
| 0
| 0
| 0
| 0
| 1
| 0.046147
| false
| 0
| 0.004234
| 0
| 0.097798
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
8363cb7c27d973bf42b237c56b3e909d8259b4b4
| 18,556
|
py
|
Python
|
sdk/python/pulumi_ucloud/ulb/lb_rule.py
|
AaronFriel/pulumi-ucloud
|
199278786dddf46bdd370f3f805e30b279c63ff2
|
[
"ECL-2.0",
"Apache-2.0"
] | 4
|
2021-08-18T04:55:38.000Z
|
2021-09-08T07:59:24.000Z
|
sdk/python/pulumi_ucloud/ulb/lb_rule.py
|
AaronFriel/pulumi-ucloud
|
199278786dddf46bdd370f3f805e30b279c63ff2
|
[
"ECL-2.0",
"Apache-2.0"
] | 1
|
2022-01-28T17:59:37.000Z
|
2022-01-29T03:44:09.000Z
|
sdk/python/pulumi_ucloud/ulb/lb_rule.py
|
AaronFriel/pulumi-ucloud
|
199278786dddf46bdd370f3f805e30b279c63ff2
|
[
"ECL-2.0",
"Apache-2.0"
] | 2
|
2021-06-23T07:10:40.000Z
|
2021-06-23T09:25:12.000Z
|
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
__all__ = ['LBRuleArgs', 'LBRule']
@pulumi.input_type
class LBRuleArgs:
def __init__(__self__, *,
backend_ids: pulumi.Input[Sequence[pulumi.Input[str]]],
listener_id: pulumi.Input[str],
load_balancer_id: pulumi.Input[str],
domain: Optional[pulumi.Input[str]] = None,
path: Optional[pulumi.Input[str]] = None):
"""
The set of arguments for constructing a LBRule resource.
:param pulumi.Input[Sequence[pulumi.Input[str]]] backend_ids: The IDs of the backend servers where rule applies, this argument is populated base on the `backend_id` responded from `lb_attachment` create.
:param pulumi.Input[str] listener_id: The ID of a listener server.
:param pulumi.Input[str] load_balancer_id: The ID of a load balancer.
:param pulumi.Input[str] domain: The domain of content forward matching fields. `path` and `domain` cannot coexist. `path` and `domain` must be filled in one.
:param pulumi.Input[str] path: The path of Content forward matching fields. `path` and `domain` cannot coexist. `path` and `domain` must be filled in one.
"""
pulumi.set(__self__, "backend_ids", backend_ids)
pulumi.set(__self__, "listener_id", listener_id)
pulumi.set(__self__, "load_balancer_id", load_balancer_id)
if domain is not None:
pulumi.set(__self__, "domain", domain)
if path is not None:
pulumi.set(__self__, "path", path)
@property
@pulumi.getter(name="backendIds")
def backend_ids(self) -> pulumi.Input[Sequence[pulumi.Input[str]]]:
"""
The IDs of the backend servers where rule applies, this argument is populated base on the `backend_id` responded from `lb_attachment` create.
"""
return pulumi.get(self, "backend_ids")
@backend_ids.setter
def backend_ids(self, value: pulumi.Input[Sequence[pulumi.Input[str]]]):
pulumi.set(self, "backend_ids", value)
@property
@pulumi.getter(name="listenerId")
def listener_id(self) -> pulumi.Input[str]:
"""
The ID of a listener server.
"""
return pulumi.get(self, "listener_id")
@listener_id.setter
def listener_id(self, value: pulumi.Input[str]):
pulumi.set(self, "listener_id", value)
@property
@pulumi.getter(name="loadBalancerId")
def load_balancer_id(self) -> pulumi.Input[str]:
"""
The ID of a load balancer.
"""
return pulumi.get(self, "load_balancer_id")
@load_balancer_id.setter
def load_balancer_id(self, value: pulumi.Input[str]):
pulumi.set(self, "load_balancer_id", value)
@property
@pulumi.getter
def domain(self) -> Optional[pulumi.Input[str]]:
"""
The domain of content forward matching fields. `path` and `domain` cannot coexist. `path` and `domain` must be filled in one.
"""
return pulumi.get(self, "domain")
@domain.setter
def domain(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "domain", value)
@property
@pulumi.getter
def path(self) -> Optional[pulumi.Input[str]]:
"""
The path of Content forward matching fields. `path` and `domain` cannot coexist. `path` and `domain` must be filled in one.
"""
return pulumi.get(self, "path")
@path.setter
def path(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "path", value)
@pulumi.input_type
class _LBRuleState:
def __init__(__self__, *,
backend_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
domain: Optional[pulumi.Input[str]] = None,
listener_id: Optional[pulumi.Input[str]] = None,
load_balancer_id: Optional[pulumi.Input[str]] = None,
path: Optional[pulumi.Input[str]] = None):
"""
Input properties used for looking up and filtering LBRule resources.
:param pulumi.Input[Sequence[pulumi.Input[str]]] backend_ids: The IDs of the backend servers where rule applies, this argument is populated base on the `backend_id` responded from `lb_attachment` create.
:param pulumi.Input[str] domain: The domain of content forward matching fields. `path` and `domain` cannot coexist. `path` and `domain` must be filled in one.
:param pulumi.Input[str] listener_id: The ID of a listener server.
:param pulumi.Input[str] load_balancer_id: The ID of a load balancer.
:param pulumi.Input[str] path: The path of Content forward matching fields. `path` and `domain` cannot coexist. `path` and `domain` must be filled in one.
"""
if backend_ids is not None:
pulumi.set(__self__, "backend_ids", backend_ids)
if domain is not None:
pulumi.set(__self__, "domain", domain)
if listener_id is not None:
pulumi.set(__self__, "listener_id", listener_id)
if load_balancer_id is not None:
pulumi.set(__self__, "load_balancer_id", load_balancer_id)
if path is not None:
pulumi.set(__self__, "path", path)
@property
@pulumi.getter(name="backendIds")
def backend_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
"""
The IDs of the backend servers where rule applies, this argument is populated base on the `backend_id` responded from `lb_attachment` create.
"""
return pulumi.get(self, "backend_ids")
@backend_ids.setter
def backend_ids(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
pulumi.set(self, "backend_ids", value)
@property
@pulumi.getter
def domain(self) -> Optional[pulumi.Input[str]]:
"""
The domain of content forward matching fields. `path` and `domain` cannot coexist. `path` and `domain` must be filled in one.
"""
return pulumi.get(self, "domain")
@domain.setter
def domain(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "domain", value)
@property
@pulumi.getter(name="listenerId")
def listener_id(self) -> Optional[pulumi.Input[str]]:
"""
The ID of a listener server.
"""
return pulumi.get(self, "listener_id")
@listener_id.setter
def listener_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "listener_id", value)
@property
@pulumi.getter(name="loadBalancerId")
def load_balancer_id(self) -> Optional[pulumi.Input[str]]:
"""
The ID of a load balancer.
"""
return pulumi.get(self, "load_balancer_id")
@load_balancer_id.setter
def load_balancer_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "load_balancer_id", value)
@property
@pulumi.getter
def path(self) -> Optional[pulumi.Input[str]]:
"""
The path of Content forward matching fields. `path` and `domain` cannot coexist. `path` and `domain` must be filled in one.
"""
return pulumi.get(self, "path")
@path.setter
def path(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "path", value)
class LBRule(pulumi.CustomResource):
@overload
def __init__(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
backend_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
domain: Optional[pulumi.Input[str]] = None,
listener_id: Optional[pulumi.Input[str]] = None,
load_balancer_id: Optional[pulumi.Input[str]] = None,
path: Optional[pulumi.Input[str]] = None,
__props__=None):
"""
Provides a Load Balancer Rule resource to add content forwarding policies for Load Balancer backend resource.
> **Note** The Load Balancer Rule can only be define while the `protocol` of lb listener is one of HTTP and HTTPS. In addition, should set one of `domain` and `path` if defined.
## Example Usage
```python
import pulumi
import pulumi_ucloud as ucloud
default_image = ucloud.uhost.get_image(availability_zone="cn-bj2-02",
name_regex="^CentOS 6.5 64",
image_type="base")
web_lb = ucloud.ulb.LB("webLB", tag="tf-example")
default_lb_listener = ucloud.ulb.LBListener("defaultLBListener",
load_balancer_id=web_lb.id,
protocol="http")
web_instance = ucloud.uhost.Instance("webInstance",
instance_type="n-basic-2",
availability_zone="cn-bj2-02",
root_password="wA1234567",
image_id=default_image.images[0].id,
tag="tf-example")
default_lb_attachment = ucloud.ulb.LBAttachment("defaultLBAttachment",
load_balancer_id=web_lb.id,
listener_id=default_lb_listener.id,
resource_type="instance",
resource_id=web_instance.id,
port=80)
example = ucloud.ulb.LBRule("example",
load_balancer_id=web_lb.id,
listener_id=default_lb_listener.id,
backend_ids=[__item.id for __item in [default_lb_attachment]],
domain="www.ucloud.cn")
```
## Import
LB Listener can be imported using the `id`, e.g.
```sh
$ pulumi import ucloud:ulb/lBRule:LBRule example rule-abcdefg
```
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[Sequence[pulumi.Input[str]]] backend_ids: The IDs of the backend servers where rule applies, this argument is populated base on the `backend_id` responded from `lb_attachment` create.
:param pulumi.Input[str] domain: The domain of content forward matching fields. `path` and `domain` cannot coexist. `path` and `domain` must be filled in one.
:param pulumi.Input[str] listener_id: The ID of a listener server.
:param pulumi.Input[str] load_balancer_id: The ID of a load balancer.
:param pulumi.Input[str] path: The path of Content forward matching fields. `path` and `domain` cannot coexist. `path` and `domain` must be filled in one.
"""
...
@overload
def __init__(__self__,
resource_name: str,
args: LBRuleArgs,
opts: Optional[pulumi.ResourceOptions] = None):
"""
Provides a Load Balancer Rule resource to add content forwarding policies for Load Balancer backend resource.
> **Note** The Load Balancer Rule can only be define while the `protocol` of lb listener is one of HTTP and HTTPS. In addition, should set one of `domain` and `path` if defined.
## Example Usage
```python
import pulumi
import pulumi_ucloud as ucloud
default_image = ucloud.uhost.get_image(availability_zone="cn-bj2-02",
name_regex="^CentOS 6.5 64",
image_type="base")
web_lb = ucloud.ulb.LB("webLB", tag="tf-example")
default_lb_listener = ucloud.ulb.LBListener("defaultLBListener",
load_balancer_id=web_lb.id,
protocol="http")
web_instance = ucloud.uhost.Instance("webInstance",
instance_type="n-basic-2",
availability_zone="cn-bj2-02",
root_password="wA1234567",
image_id=default_image.images[0].id,
tag="tf-example")
default_lb_attachment = ucloud.ulb.LBAttachment("defaultLBAttachment",
load_balancer_id=web_lb.id,
listener_id=default_lb_listener.id,
resource_type="instance",
resource_id=web_instance.id,
port=80)
example = ucloud.ulb.LBRule("example",
load_balancer_id=web_lb.id,
listener_id=default_lb_listener.id,
backend_ids=[__item.id for __item in [default_lb_attachment]],
domain="www.ucloud.cn")
```
## Import
LB Listener can be imported using the `id`, e.g.
```sh
$ pulumi import ucloud:ulb/lBRule:LBRule example rule-abcdefg
```
:param str resource_name: The name of the resource.
:param LBRuleArgs args: The arguments to use to populate this resource's properties.
:param pulumi.ResourceOptions opts: Options for the resource.
"""
...
def __init__(__self__, resource_name: str, *args, **kwargs):
resource_args, opts = _utilities.get_resource_args_opts(LBRuleArgs, pulumi.ResourceOptions, *args, **kwargs)
if resource_args is not None:
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
else:
__self__._internal_init(resource_name, *args, **kwargs)
def _internal_init(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
backend_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
domain: Optional[pulumi.Input[str]] = None,
listener_id: Optional[pulumi.Input[str]] = None,
load_balancer_id: Optional[pulumi.Input[str]] = None,
path: Optional[pulumi.Input[str]] = None,
__props__=None):
if opts is None:
opts = pulumi.ResourceOptions()
if not isinstance(opts, pulumi.ResourceOptions):
raise TypeError('Expected resource options to be a ResourceOptions instance')
if opts.version is None:
opts.version = _utilities.get_version()
if opts.id is None:
if __props__ is not None:
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
__props__ = LBRuleArgs.__new__(LBRuleArgs)
if backend_ids is None and not opts.urn:
raise TypeError("Missing required property 'backend_ids'")
__props__.__dict__["backend_ids"] = backend_ids
__props__.__dict__["domain"] = domain
if listener_id is None and not opts.urn:
raise TypeError("Missing required property 'listener_id'")
__props__.__dict__["listener_id"] = listener_id
if load_balancer_id is None and not opts.urn:
raise TypeError("Missing required property 'load_balancer_id'")
__props__.__dict__["load_balancer_id"] = load_balancer_id
__props__.__dict__["path"] = path
super(LBRule, __self__).__init__(
'ucloud:ulb/lBRule:LBRule',
resource_name,
__props__,
opts)
@staticmethod
def get(resource_name: str,
id: pulumi.Input[str],
opts: Optional[pulumi.ResourceOptions] = None,
backend_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
domain: Optional[pulumi.Input[str]] = None,
listener_id: Optional[pulumi.Input[str]] = None,
load_balancer_id: Optional[pulumi.Input[str]] = None,
path: Optional[pulumi.Input[str]] = None) -> 'LBRule':
"""
Get an existing LBRule resource's state with the given name, id, and optional extra
properties used to qualify the lookup.
:param str resource_name: The unique name of the resulting resource.
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[Sequence[pulumi.Input[str]]] backend_ids: The IDs of the backend servers where rule applies, this argument is populated base on the `backend_id` responded from `lb_attachment` create.
:param pulumi.Input[str] domain: The domain of content forward matching fields. `path` and `domain` cannot coexist. `path` and `domain` must be filled in one.
:param pulumi.Input[str] listener_id: The ID of a listener server.
:param pulumi.Input[str] load_balancer_id: The ID of a load balancer.
:param pulumi.Input[str] path: The path of Content forward matching fields. `path` and `domain` cannot coexist. `path` and `domain` must be filled in one.
"""
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
__props__ = _LBRuleState.__new__(_LBRuleState)
__props__.__dict__["backend_ids"] = backend_ids
__props__.__dict__["domain"] = domain
__props__.__dict__["listener_id"] = listener_id
__props__.__dict__["load_balancer_id"] = load_balancer_id
__props__.__dict__["path"] = path
return LBRule(resource_name, opts=opts, __props__=__props__)
@property
@pulumi.getter(name="backendIds")
def backend_ids(self) -> pulumi.Output[Sequence[str]]:
"""
The IDs of the backend servers where rule applies, this argument is populated base on the `backend_id` responded from `lb_attachment` create.
"""
return pulumi.get(self, "backend_ids")
@property
@pulumi.getter
def domain(self) -> pulumi.Output[Optional[str]]:
"""
The domain of content forward matching fields. `path` and `domain` cannot coexist. `path` and `domain` must be filled in one.
"""
return pulumi.get(self, "domain")
@property
@pulumi.getter(name="listenerId")
def listener_id(self) -> pulumi.Output[str]:
"""
The ID of a listener server.
"""
return pulumi.get(self, "listener_id")
@property
@pulumi.getter(name="loadBalancerId")
def load_balancer_id(self) -> pulumi.Output[str]:
"""
The ID of a load balancer.
"""
return pulumi.get(self, "load_balancer_id")
@property
@pulumi.getter
def path(self) -> pulumi.Output[Optional[str]]:
"""
The path of Content forward matching fields. `path` and `domain` cannot coexist. `path` and `domain` must be filled in one.
"""
return pulumi.get(self, "path")
| 43.867612
| 211
| 0.637422
| 2,306
| 18,556
| 4.916305
| 0.092801
| 0.079562
| 0.082738
| 0.058216
| 0.864514
| 0.849872
| 0.829232
| 0.809385
| 0.804887
| 0.797477
| 0
| 0.003119
| 0.257006
| 18,556
| 422
| 212
| 43.971564
| 0.819177
| 0.419541
| 0
| 0.663415
| 1
| 0
| 0.090279
| 0.002522
| 0
| 0
| 0
| 0
| 0
| 1
| 0.156098
| false
| 0.004878
| 0.02439
| 0
| 0.273171
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
36057c92aaf6386ad44bf492305bd8341ccb3c09
| 59
|
py
|
Python
|
src/lexer/__init__.py
|
La-Tribu/cool-compiler-2021
|
abfbea9be2b278f3fb8182c7bc5072da15bb72dc
|
[
"MIT"
] | null | null | null |
src/lexer/__init__.py
|
La-Tribu/cool-compiler-2021
|
abfbea9be2b278f3fb8182c7bc5072da15bb72dc
|
[
"MIT"
] | null | null | null |
src/lexer/__init__.py
|
La-Tribu/cool-compiler-2021
|
abfbea9be2b278f3fb8182c7bc5072da15bb72dc
|
[
"MIT"
] | null | null | null |
from .lexer import lexer
from .lexer import errors_lexing
| 14.75
| 32
| 0.813559
| 9
| 59
| 5.222222
| 0.555556
| 0.382979
| 0.638298
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.152542
| 59
| 3
| 33
| 19.666667
| 0.94
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 7
|
3612cb7fe2e85af336cab3256b5d937f9f2782a1
| 108,345
|
py
|
Python
|
windc_data/windc_2_1/parse/sgf_table_sums.py
|
uw-windc/windc_datastream
|
8b6277acf943358a064f109a873852a82991ba3d
|
[
"MIT"
] | 3
|
2019-11-07T05:15:18.000Z
|
2020-06-30T15:30:10.000Z
|
windc_data/windc_2_1/parse/sgf_table_sums.py
|
uw-windc/windc_datastream
|
8b6277acf943358a064f109a873852a82991ba3d
|
[
"MIT"
] | null | null | null |
windc_data/windc_2_1/parse/sgf_table_sums.py
|
uw-windc/windc_datastream
|
8b6277acf943358a064f109a873852a82991ba3d
|
[
"MIT"
] | 4
|
2019-11-07T05:15:29.000Z
|
2021-09-01T17:01:03.000Z
|
sums_new_methodology = {
"Total revenue": {
"A01",
"A03",
"A09",
"A10",
"A12",
"A16",
"A18",
"A21",
"A36",
"A44",
"A45",
"A50",
"A54",
"A56",
"A59",
"A60",
"A61",
"A80",
"A81",
"A87",
"A89",
"A90",
"A91",
"A92",
"A93",
"A94",
"B01",
"B21",
"B22",
"B30",
"B42",
"B43",
"B46",
"B50",
"B54",
"B59",
"B79",
"B80",
"B89",
"B91",
"B92",
"B93",
"B94",
"D21",
"D30",
"D42",
"D46",
"D50",
"D79",
"D80",
"D89",
"D91",
"D92",
"D93",
"D94",
"T01",
"T09",
"T10",
"T11",
"T12",
"T13",
"T14",
"T15",
"T16",
"T19",
"T20",
"T21",
"T22",
"T23",
"T24",
"T25",
"T27",
"T28",
"T29",
"T40",
"T41",
"T50",
"T51",
"T53",
"T99",
"U01",
"U11",
"U20",
"U21",
"U30",
"U40",
"U41",
"U50",
"U95",
"U99",
"X01",
"X02",
"X05",
"X08",
"Y01",
"Y02",
"Y04",
"Y11",
"Y12",
"Y51",
"Y52",
},
"General revenue": {
"A01",
"A03",
"A09",
"A10",
"A12",
"A16",
"A18",
"A21",
"A36",
"A44",
"A45",
"A50",
"A54",
"A56",
"A59",
"A60",
"A61",
"A80",
"A81",
"A87",
"A89",
"B01",
"B21",
"B22",
"B30",
"B42",
"B43",
"B46",
"B50",
"B54",
"B59",
"B79",
"B80",
"B89",
"B91",
"B92",
"B93",
"B94",
"D21",
"D30",
"D42",
"D46",
"D50",
"D79",
"D80",
"D89",
"D91",
"D92",
"D93",
"D94",
"T01",
"T09",
"T10",
"T11",
"T12",
"T13",
"T14",
"T15",
"T16",
"T19",
"T20",
"T21",
"T22",
"T23",
"T24",
"T25",
"T27",
"T28",
"T29",
"T40",
"T41",
"T50",
"T51",
"T53",
"T99",
"U01",
"U11",
"U20",
"U21",
"U30",
"U40",
"U41",
"U50",
"U95",
"U99",
},
"Intergovernmental revenue": {
"B01",
"B21",
"B22",
"B30",
"B42",
"B43",
"B46",
"B50",
"B54",
"B59",
"B79",
"B80",
"B89",
"B91",
"B92",
"B93",
"B94",
"D21",
"D30",
"D42",
"D46",
"D50",
"D79",
"D80",
"D89",
"D91",
"D92",
"D93",
"D94",
},
"Taxes": {
"T01",
"T09",
"T10",
"T11",
"T12",
"T13",
"T14",
"T15",
"T16",
"T19",
"T20",
"T21",
"T22",
"T23",
"T24",
"T25",
"T27",
"T28",
"T29",
"T40",
"T41",
"T50",
"T51",
"T53",
"T99",
},
"General sales": {"T09"},
"Selective sales": {"T10", "T11", "T12", "T13", "T14", "T15", "T16", "T19"},
"License taxes": {"T20", "T21", "T22", "T23", "T24", "T25", "T27", "T28", "T29"},
"Individual income tax": {"T40"},
"Corporate income tax": {"T41"},
"Other taxes": {"T01", "T50", "T51", "T53", "T99"},
"Current charge": {
"A01",
"A03",
"A09",
"A10",
"A12",
"A16",
"A18",
"A21",
"A36",
"A44",
"A45",
"A50",
"A54",
"A56",
"A59",
"A60",
"A61",
"A80",
"A81",
"A87",
"A89",
},
"Miscellaneous general revenue": {
"U01",
"U11",
"U20",
"U21",
"U30",
"U40",
"U41",
"U50",
"U95",
"U99",
},
"Utility revenue": {"A91", "A92", "A93", "A94"},
"Liquor stores revenue": {"A90"},
"Insurance trust revenue": {
"X01",
"X02",
"X05",
"X08",
"Y01",
"Y02",
"Y04",
"Y11",
"Y12",
"Y50",
"Y51",
"Y52",
},
"Total expenditure": {
"E01",
"E03",
"E04",
"E05",
"E12",
"E16",
"E18",
"E21",
"E22",
"E23",
"E25",
"E26",
"E27",
"E29",
"E31",
"E32",
"E36",
"E44",
"E45",
"E50",
"E52",
"E54",
"E55",
"E56",
"E59",
"E60",
"E61",
"E62",
"E66",
"E74",
"E75",
"E77",
"E79",
"E80",
"E81",
"E85",
"E87",
"E89",
"E90",
"E91",
"E92",
"E93",
"E94",
"F01",
"F03",
"F04",
"F05",
"F12",
"F16",
"F18",
"F21",
"F22",
"F23",
"F25",
"F26",
"F27",
"F29",
"F31",
"F32",
"F36",
"F44",
"F45",
"F50",
"F52",
"F54",
"F55",
"F56",
"F59",
"F60",
"F61",
"F62",
"F66",
"F77",
"F79",
"F80",
"F81",
"F85",
"F87",
"F89",
"F90",
"F91",
"F92",
"F93",
"F94",
"G01",
"G03",
"G04",
"G05",
"G12",
"G16",
"G18",
"G21",
"G22",
"G23",
"G25",
"G26",
"G27",
"G29",
"G31",
"G32",
"G36",
"G44",
"G45",
"G50",
"G52",
"G54",
"G55",
"G56",
"G59",
"G60",
"G61",
"G62",
"G66",
"G77",
"G79",
"G80",
"G81",
"G85",
"G87",
"G89",
"G90",
"G91",
"G92",
"G93",
"G94",
"I89",
"I91",
"I92",
"I93",
"I94",
"J19",
"J67",
"J68",
"J85",
"M01",
"M04",
"M05",
"M12",
"M18",
"M21",
"M23",
"M25",
"M27",
"M29",
"M30",
"M32",
"M36",
"M44",
"M50",
"M52",
"M54",
"M55",
"M56",
"M59",
"M60",
"M61",
"M62",
"M66",
"M67",
"M68",
"M79",
"M80",
"M81",
"M87",
"M89",
"M91",
"M92",
"M93",
"M94",
"Q12",
"Q18",
"S67",
"S89",
"X11",
"X12",
"Y05",
"Y06",
"Y14",
"Y53",
},
"Intergovernmental expenditure": {
"M01",
"M04",
"M05",
"M12",
"M18",
"M21",
"M23",
"M25",
"M27",
"M29",
"M30",
"M32",
"M36",
"M44",
"M50",
"M52",
"M54",
"M55",
"M56",
"M59",
"M60",
"M61",
"M62",
"M66",
"M67",
"M68",
"M79",
"M80",
"M81",
"M87",
"M89",
"M91",
"M92",
"M93",
"M94",
"Q12",
"Q18",
"S67",
"S89",
},
"Direct expenditure": {
"E01",
"E03",
"E04",
"E05",
"E12",
"E16",
"E18",
"E21",
"E22",
"E23",
"E25",
"E26",
"E27",
"E29",
"E31",
"E32",
"E36",
"E44",
"E45",
"E50",
"E52",
"E54",
"E55",
"E56",
"E59",
"E60",
"E61",
"E62",
"E66",
"E74",
"E75",
"E77",
"E79",
"E80",
"E81",
"E85",
"E87",
"E89",
"E90",
"E91",
"E92",
"E93",
"E94",
"F01",
"F03",
"F04",
"F05",
"F12",
"F16",
"F18",
"F21",
"F22",
"F23",
"F25",
"F26",
"F27",
"F29",
"F31",
"F32",
"F36",
"F44",
"F45",
"F50",
"F52",
"F54",
"F55",
"F56",
"F59",
"F60",
"F61",
"F62",
"F66",
"F77",
"F79",
"F80",
"F81",
"F85",
"F87",
"F89",
"F90",
"F91",
"F92",
"F93",
"F94",
"G01",
"G03",
"G04",
"G05",
"G12",
"G16",
"G18",
"G21",
"G22",
"G23",
"G25",
"G26",
"G27",
"G29",
"G31",
"G32",
"G36",
"G44",
"G45",
"G50",
"G52",
"G54",
"G55",
"G56",
"G59",
"G60",
"G61",
"G62",
"G66",
"G77",
"G79",
"G80",
"G81",
"G85",
"G87",
"G89",
"G90",
"G91",
"G92",
"G93",
"G94",
"I89",
"I91",
"I92",
"I93",
"I94",
"J19",
"J67",
"J68",
"J85",
"X11",
"X12",
"Y05",
"Y06",
"Y14",
"Y53",
},
"Current operation": {
"E01",
"E03",
"E04",
"E05",
"E12",
"E16",
"E18",
"E21",
"E22",
"E23",
"E25",
"E26",
"E27",
"E29",
"E31",
"E32",
"E36",
"E44",
"E45",
"E50",
"E52",
"E54",
"E55",
"E56",
"E59",
"E60",
"E61",
"E62",
"E66",
"E74",
"E75",
"E77",
"E79",
"E80",
"E81",
"E85",
"E87",
"E89",
"E90",
"E91",
"E92",
"E93",
"E94",
},
"Capital outlay": {
"F01",
"F03",
"F04",
"F05",
"F12",
"F16",
"F18",
"F21",
"F22",
"F23",
"F25",
"F26",
"F27",
"F29",
"F31",
"F32",
"F36",
"F44",
"F45",
"F50",
"F52",
"F54",
"F55",
"F56",
"F59",
"F60",
"F61",
"F62",
"F66",
"F77",
"F79",
"F80",
"F81",
"F85",
"F87",
"F89",
"F90",
"F91",
"F92",
"F93",
"F94",
"G01",
"G03",
"G04",
"G05",
"G12",
"G16",
"G18",
"G21",
"G22",
"G23",
"G25",
"G26",
"G27",
"G29",
"G31",
"G32",
"G36",
"G44",
"G45",
"G50",
"G52",
"G54",
"G55",
"G56",
"G59",
"G60",
"G61",
"G62",
"G66",
"G77",
"G79",
"G80",
"G81",
"G85",
"G87",
"G89",
"G90",
"G91",
"G92",
"G93",
"G94",
},
"Insurance benefits and repayments": {"X11", "X12", "Y05", "Y06", "Y14", "Y53",},
"Assistance and subsidies": {"J19", "J67", "J68", "J85"},
"Interest on debt": {"I89", "I91", "I92", "I93", "I94"},
"Exhibit: Salaries and wages": {"Z00"},
"General expenditure": {
"E01",
"E03",
"E04",
"E05",
"E12",
"E16",
"E18",
"E21",
"E22",
"E23",
"E25",
"E26",
"E27",
"E29",
"E31",
"E32",
"E36",
"E44",
"E45",
"E50",
"E52",
"E54",
"E55",
"E56",
"E59",
"E60",
"E61",
"E62",
"E66",
"E74",
"E75",
"E77",
"E79",
"E80",
"E81",
"E85",
"E87",
"E89",
"F01",
"F03",
"F04",
"F05",
"F12",
"F16",
"F18",
"F21",
"F22",
"F23",
"F25",
"F26",
"F27",
"F29",
"F31",
"F32",
"F36",
"F44",
"F45",
"F50",
"F52",
"F54",
"F55",
"F56",
"F59",
"F60",
"F61",
"F62",
"F66",
"F77",
"F79",
"F80",
"F81",
"F85",
"F87",
"F89",
"G01",
"G03",
"G04",
"G05",
"G12",
"G16",
"G18",
"G21",
"G22",
"G23",
"G25",
"G26",
"G27",
"G29",
"G31",
"G32",
"G36",
"G44",
"G45",
"G50",
"G52",
"G54",
"G55",
"G56",
"G59",
"G60",
"G61",
"G62",
"G66",
"G77",
"G79",
"G80",
"G81",
"G85",
"G87",
"G89",
"I89",
"J19",
"J67",
"J68",
"J85",
"M01",
"M04",
"M05",
"M12",
"M18",
"M21",
"M23",
"M25",
"M27",
"M29",
"M30",
"M32",
"M36",
"M44",
"M50",
"M52",
"M54",
"M55",
"M56",
"M59",
"M60",
"M61",
"M62",
"M66",
"M67",
"M68",
"M79",
"M80",
"M81",
"M87",
"M89",
"M91",
"M92",
"M93",
"M94",
"Q12",
"Q18",
"S67",
"S89",
},
"Direct general expenditure": {
"E01",
"E03",
"E04",
"E05",
"E12",
"E16",
"E18",
"E21",
"E22",
"E23",
"E25",
"E26",
"E27",
"E29",
"E31",
"E32",
"E36",
"E44",
"E45",
"E50",
"E52",
"E54",
"E55",
"E56",
"E59",
"E60",
"E61",
"E62",
"E66",
"E74",
"E75",
"E77",
"E79",
"E80",
"E81",
"E85",
"E87",
"E89",
"F01",
"F03",
"F04",
"F05",
"F12",
"F16",
"F18",
"F21",
"F22",
"F23",
"F25",
"F26",
"F27",
"F29",
"F31",
"F32",
"F36",
"F44",
"F45",
"F50",
"F52",
"F54",
"F55",
"F56",
"F59",
"F60",
"F61",
"F62",
"F66",
"F77",
"F79",
"F80",
"F81",
"F85",
"F87",
"F89",
"G01",
"G03",
"G04",
"G05",
"G12",
"G16",
"G18",
"G21",
"G22",
"G23",
"G25",
"G26",
"G27",
"G29",
"G31",
"G32",
"G36",
"G44",
"G45",
"G50",
"G52",
"G54",
"G55",
"G56",
"G59",
"G60",
"G61",
"G62",
"G66",
"G77",
"G79",
"G80",
"G81",
"G85",
"G87",
"G89",
"I89",
"J19",
"J67",
"J68",
"J85",
},
"Education": {
"E12",
"E16",
"E18",
"E21",
"F12",
"F16",
"F18",
"F21",
"G12",
"G16",
"G18",
"G21",
"J19",
"M12",
"M18",
"M21",
"Q12",
"Q18",
},
"Public welfare": {
"E74",
"E75",
"E77",
"E79",
"F77",
"F79",
"G77",
"G79",
"J67",
"J68",
"M67",
"M68",
"M79",
"S67",
},
"Hospitals": {"E36", "F36", "G36", "M36"},
"Health": {"E32", "F32", "G32", "M32"},
"Highways": {"E44", "M44", "F44", "G44", "E45", "F45", "G45"},
"Police protection": {"E62", "F62", "G62", "M62"},
"Correction": {"E04", "E05", "F04", "F05", "G04", "G05", "M04", "M05",},
"Natural resources": {
"E54",
"E55",
"E56",
"E59",
"F54",
"F55",
"F56",
"F59",
"G54",
"G55",
"G56",
"G59",
"M54",
"M55",
"M56",
"M59",
},
"Parks and recreation": {"E61", "F61", "G61", "M61"},
"Governmental administration": {
"E23",
"E25",
"E26",
"E29",
"E31",
"F23",
"F25",
"F26",
"F29",
"F31",
"G23",
"G25",
"G26",
"G29",
"G31",
"M23",
"M25",
"M29",
},
"Interest on general debt": {"I89"},
"Other and unallocable": {
"E01",
"E03",
"E22",
"E50",
"E52",
"E60",
"E66",
"E80",
"E81",
"E85",
"E87",
"E89",
"F01",
"F03",
"F22",
"F50",
"F52",
"F60",
"F66",
"F80",
"F81",
"F85",
"F87",
"F89",
"G01",
"G03",
"G22",
"G50",
"G52",
"G60",
"G66",
"G80",
"G81",
"G85",
"G87",
"G89",
"M01",
"M50",
"M52",
"M60",
"M66",
"M80",
"M81",
"M87",
"M89",
"S89",
},
"Utility expenditure": {
"E91",
"E92",
"E93",
"E94",
"F91",
"F92",
"F93",
"F94",
"G91",
"G92",
"G93",
"G94",
"I91",
"I92",
"I93",
"I94",
"M91",
"M92",
"M93",
"M94",
},
"Liquor stores expenditure": {"E90", "F90", "G90"},
"Insurance trust expenditure": {"X11", "X12", "Y05", "Y06", "Y14", "Y53",},
"Debt at end of fiscal year": {"64V", "44T", "49U"},
"Cash and security holdings": {
"W01",
"W31",
"W61",
"X21",
"X30",
"X42",
"X44",
"X47",
"Y07",
"Y08",
"Y21",
"Y61",
"Z77",
"Z78",
},
}
# sums_1992_2004 = {
# "Total revenue": {
# "T01",
# "T08",
# "T09",
# "T10",
# "T11",
# "T12",
# "T13",
# "T14",
# "T15",
# "T16",
# "T19",
# "T20",
# "T21",
# "T22",
# "T23",
# "T24",
# "T25",
# "T27",
# "T28",
# "T29",
# "T40",
# "T41",
# "T50",
# "T51",
# "T53",
# "T99",
# "A01",
# "A03",
# "A06",
# "A09",
# "A10",
# "A12",
# "A14",
# "A16",
# "A18",
# "A21",
# "A36",
# "A44",
# "A45",
# "A50",
# "A54",
# "A56",
# "A59",
# "A60",
# "A61",
# "A80",
# "A81",
# "A87",
# "A89",
# "U01",
# "U10",
# "U11",
# "U20",
# "U30",
# "U40",
# "U41",
# "U50",
# "U95",
# "U99",
# "B01",
# "B21",
# "B22",
# "B27",
# "B30",
# "B42",
# "B46",
# "B47",
# "B50",
# "B54",
# "B59",
# "B79",
# "B80",
# "B89",
# "B91",
# "B92",
# "B93",
# "B94",
# "C21",
# "C28",
# "C30",
# "C42",
# "C46",
# "C47",
# "C50",
# "C67",
# "C79",
# "C80",
# "C89",
# "C91",
# "C92",
# "C93",
# "C94",
# "D11",
# "D21",
# "D30",
# "D42",
# "D46",
# "D47",
# "D50",
# "D79",
# "D80",
# "D89",
# "D91",
# "D92",
# "D93",
# "D94",
# "A91",
# "A92",
# "A93",
# "A94",
# "A90",
# "X01",
# "X02",
# "X05",
# "X08",
# "X09",
# "X03",
# "Y01",
# "Y02",
# "Y03",
# "Y04",
# "Y11",
# "Y12",
# "Y13",
# "Y51",
# "Y52",
# "Y20",
# "Y31",
# "Y41",
# "Y55",
# },
# "General revenue": {
# "T01",
# "T08",
# "T09",
# "T10",
# "T11",
# "T12",
# "T13",
# "T14",
# "T15",
# "T16",
# "T19",
# "T20",
# "T21",
# "T22",
# "T23",
# "T24",
# "T25",
# "T27",
# "T28",
# "T29",
# "T40",
# "T41",
# "T50",
# "T51",
# "T53",
# "T99",
# "A01",
# "A03",
# "A06",
# "A09",
# "A10",
# "A12",
# "A14",
# "A16",
# "A18",
# "A21",
# "A36",
# "A44",
# "A45",
# "A50",
# "A54",
# "A56",
# "A59",
# "A60",
# "A61",
# "A80",
# "A81",
# "A87",
# "A89",
# "U01",
# "U10",
# "U11",
# "U20",
# "U30",
# "U40",
# "U41",
# "U50",
# "U95",
# "U99",
# "B01",
# "B21",
# "B22",
# "B27",
# "B30",
# "B42",
# "B46",
# "B47",
# "B50",
# "B54",
# "B59",
# "B79",
# "B80",
# "B89",
# "B91",
# "B92",
# "B93",
# "B94",
# "C21",
# "C28",
# "C30",
# "C42",
# "C46",
# "C47",
# "C50",
# "C67",
# "C79",
# "C80",
# "C89",
# "C91",
# "C92",
# "C93",
# "C94",
# "D11",
# "D21",
# "D30",
# "D42",
# "D46",
# "D47",
# "D50",
# "D79",
# "D80",
# "D89",
# "D91",
# "D92",
# "D93",
# "D94",
# },
# "Intergovernmental revenue": {
# "B01",
# "B21",
# "B22",
# "B27",
# "B30",
# "B42",
# "B46",
# "B47",
# "B50",
# "B54",
# "B59",
# "B79",
# "B80",
# "B89",
# "B91",
# "B92",
# "B93",
# "B94",
# "C21",
# "C28",
# "C30",
# "C42",
# "C46",
# "C47",
# "C50",
# "C67",
# "C79",
# "C80",
# "C89",
# "C91",
# "C92",
# "C93",
# "C94",
# "D11",
# "D21",
# "D30",
# "D42",
# "D46",
# "D47",
# "D50",
# "D79",
# "D80",
# "D89",
# "D91",
# "D92",
# "D93",
# "D94",
# },
# "Taxes": {
# "T01",
# "T08",
# "T09",
# "T10",
# "T11",
# "T12",
# "T13",
# "T14",
# "T15",
# "T16",
# "T19",
# "T20",
# "T21",
# "T22",
# "T23",
# "T24",
# "T25",
# "T27",
# "T28",
# "T29",
# "T40",
# "T41",
# "T50",
# "T51",
# "T53",
# "T99",
# },
# "General sales": {"T09",},
# "Selective sales": {"T10", "T11", "T12", "T13", "T14", "T15", "T16", "T19"},
# "License taxes": {"T20", "T21", "T22", "T23", "T24", "T25", "T27", "T28", "T29",},
# "Individual income tax": {"T40"},
# "Corporate income tax": {"T41"},
# "Other taxes": {"T01", "T50", "T51", "T53", "T99"},
# "Current charge": {
# "A01",
# "A03",
# "A06",
# "A09",
# "A10",
# "A12",
# "A14",
# "A16",
# "A18",
# "A21",
# "A36",
# "A44",
# "A45",
# "A50",
# "A54",
# "A56",
# "A59",
# "A60",
# "A61",
# "A80",
# "A81",
# "A87",
# "A89",
# },
# "Miscellaneous general revenue": {
# "U01",
# "U10",
# "U11",
# "U20",
# "U30",
# "U40",
# "U41",
# "U50",
# "U95",
# "U99",
# },
# "Utility revenue": {"A91", "A92", "A93", "A94"},
# "Liquor stores revenue": {"A90"},
# "Insurance trust revenue": {
# "X01",
# "X02",
# "X05",
# "X08",
# "Y01",
# "Y02",
# "Y04",
# "Y10",
# "Y11",
# "Y12",
# "Y50",
# "Y51",
# "Y52",
# },
# "Total expenditure": {
# "E01",
# "F01",
# "G01",
# "I01",
# "L01",
# "M01",
# "N01",
# "O01",
# "P01",
# "R01",
# "E02",
# "F02",
# "G02",
# "I02",
# "L02",
# "M02",
# "E03",
# "F03",
# "G03",
# "E04",
# "F04",
# "G04",
# "I04",
# "L04",
# "M04",
# "E05",
# "F05",
# "G05",
# "L05",
# "M05",
# "N05",
# "O05",
# "P05",
# "S05",
# "E06",
# "F06",
# "G06",
# "I06",
# "L06",
# "M06",
# "E12",
# "F12",
# "G12",
# "L12",
# "M12",
# "N12",
# "O12",
# "P12",
# "Q12",
# "R12",
# "E14",
# "F14",
# "G14",
# "I14",
# "E16",
# "F16",
# "G16",
# "E18",
# "F18",
# "G18",
# "L18",
# "M18",
# "N18",
# "O18",
# "P18",
# "Q18",
# "R18",
# "E19",
# "E20",
# "F20",
# "G20",
# "I20",
# "L20",
# "M20",
# "E21",
# "F21",
# "G21",
# "I21",
# "L21",
# "M21",
# "N21",
# "O21",
# "P21",
# "Q21",
# "S21",
# "E22",
# "F22",
# "G22",
# "I22",
# "L22",
# "M22",
# "E23",
# "F23",
# "G23",
# "I23",
# "L23",
# "M23",
# "N23",
# "O23",
# "P23",
# "E24",
# "F24",
# "G24",
# "L24",
# "M24",
# "N24",
# "O24",
# "P24",
# "R24",
# "E25",
# "F25",
# "G25",
# "I25",
# "L25",
# "M25",
# "N25",
# "O25",
# "P25",
# "S25",
# "E26",
# "F26",
# "G26",
# "E28",
# "F28",
# "G28",
# "I28",
# "L28",
# "M28",
# "E29",
# "F29",
# "G29",
# "I29",
# "L29",
# "M29",
# "N29",
# "O29",
# "P29",
# "M30",
# "N30",
# "O30",
# "P30",
# "R30",
# "E31",
# "F31",
# "G31",
# "E32",
# "F32",
# "G32",
# "I32",
# "L32",
# "M32",
# "N32",
# "O32",
# "P32",
# "R32",
# "E36",
# "F36",
# "G36",
# "E37",
# "F37",
# "G37",
# "I37",
# "L37",
# "M37",
# "E38",
# "F38",
# "G38",
# "I38",
# "L38",
# "M38",
# "N38",
# "O38",
# "P38",
# "R38",
# "E39",
# "F39",
# "G39",
# "I39",
# "L39",
# "M39",
# "E44",
# "F44",
# "G44",
# "I44",
# "L44",
# "M44",
# "N44",
# "O44",
# "P44",
# "R44",
# "E45",
# "F45",
# "G45",
# "E47",
# "I47",
# "L47",
# "M47",
# "N47",
# "O47",
# "P47",
# "R47",
# "E50",
# "F50",
# "G50",
# "I50",
# "L50",
# "M50",
# "N50",
# "O50",
# "P50",
# "R50",
# "E51",
# "I51",
# "L51",
# "M51",
# "E52",
# "F52",
# "G52",
# "I52",
# "L52",
# "M52",
# "N52",
# "O52",
# "P52",
# "R52",
# "E53",
# "F53",
# "G53",
# "I53",
# "L53",
# "M53",
# "E54",
# "F54",
# "G54",
# "I54",
# "L54",
# "M54",
# "N54",
# "O54",
# "P54",
# "R54",
# "E55",
# "F55",
# "G55",
# "M55",
# "N55",
# "O55",
# "P55",
# "R55",
# "E56",
# "F56",
# "G56",
# "I56",
# "L56",
# "M56",
# "N56",
# "O56",
# "P56",
# "R56",
# "E57",
# "F57",
# "G57",
# "I57",
# "L57",
# "M57",
# "E58",
# "F58",
# "G58",
# "I58",
# "L58",
# "M58",
# "E59",
# "F59",
# "G59",
# "I59",
# "L59",
# "M59",
# "N59",
# "O59",
# "P59",
# "R59",
# "S59",
# "E60",
# "F60",
# "G60",
# "I60",
# "L60",
# "M60",
# "N60",
# "O60",
# "P60",
# "R60",
# "E61",
# "F61",
# "G61",
# "I61",
# "L61",
# "M61",
# "N61",
# "O61",
# "P61",
# "R61",
# "E62",
# "F62",
# "G62",
# "I62",
# "L62",
# "M62",
# "N62",
# "O62",
# "P62",
# "R62",
# "E66",
# "F66",
# "G66",
# "I66",
# "L66",
# "M66",
# "N66",
# "O66",
# "P66",
# "R66",
# "E67",
# "I67",
# "L67",
# "M67",
# "N67",
# "O67",
# "P67",
# "S67",
# "E68",
# "I68",
# "M68",
# "N68",
# "O68",
# "P68",
# "E74",
# "E75",
# "E77",
# "F77",
# "G77",
# "E79",
# "G79",
# "F79",
# "I79",
# "L79",
# "M79",
# "N79",
# "O79",
# "P79",
# "R79",
# "E80",
# "F80",
# "G80",
# "I80",
# "L80",
# "M80",
# "N80",
# "O80",
# "P80",
# "R80",
# "E81",
# "F81",
# "G81",
# "I81",
# "L81",
# "M81",
# "N81",
# "O81",
# "P81",
# "R81",
# "E84",
# "E85",
# "F85",
# "G85",
# "I85",
# "E87",
# "F87",
# "G87",
# "I87",
# "L87",
# "M87",
# "N87",
# "O87",
# "P87",
# "R87",
# "E89",
# "F89",
# "G89",
# "I89",
# "J89",
# "L89",
# "M89",
# "N89",
# "O89",
# "P89",
# "R89",
# "S89",
# "E90",
# "F90",
# "G90",
# "E91",
# "F91",
# "G91",
# "I91",
# "E92",
# "F92",
# "G92",
# "I92",
# "E93",
# "F93",
# "G93",
# "I93",
# "E94",
# "F94",
# "G94",
# "I94",
# "L91",
# "L92",
# "L93",
# "L94",
# "M91",
# "M92",
# "M93",
# "M94",
# "N91",
# "N92",
# "N93",
# "N94",
# "R91",
# "R92",
# "R93",
# "R94",
# "X11",
# "X12",
# "Y05",
# "Y06",
# "Y14",
# "Y53",
# "Y25",
# "Y34",
# "Y45",
# },
# "Intergovernmental expenditure": {
# "L01",
# "M01",
# "N01",
# "O01",
# "P01",
# "R01",
# "L02",
# "M02",
# "L04",
# "M04",
# "L05",
# "M05",
# "N05",
# "O05",
# "P05",
# "S05",
# "L06",
# "M06",
# "L12",
# "M12",
# "N12",
# "O12",
# "P12",
# "Q12",
# "R12",
# "L18",
# "M18",
# "N18",
# "O18",
# "P18",
# "Q18",
# "R18",
# "L20",
# "M20",
# "L21",
# "M21",
# "N21",
# "O21",
# "P21",
# "Q21",
# "S21",
# "L22",
# "M22",
# "L23",
# "M23",
# "N23",
# "O23",
# "P23",
# "L24",
# "M24",
# "N24",
# "O24",
# "P24",
# "R24",
# "L25",
# "M25",
# "N25",
# "O25",
# "P25",
# "S25",
# "L28",
# "M28",
# "L29",
# "M29",
# "N29",
# "O29",
# "P29",
# "M30",
# "N30",
# "O30",
# "P30",
# "R30",
# "L32",
# "M32",
# "N32",
# "O32",
# "P32",
# "R32",
# "L37",
# "M37",
# "L38",
# "M38",
# "N38",
# "O38",
# "P38",
# "R38",
# "L39",
# "M39",
# "L44",
# "M44",
# "N44",
# "O44",
# "P44",
# "R44",
# "L47",
# "M47",
# "N47",
# "O47",
# "P47",
# "R47",
# "L50",
# "M50",
# "N50",
# "O50",
# "P50",
# "R50",
# "L51",
# "M51",
# "L52",
# "M52",
# "N52",
# "O52",
# "P52",
# "R52",
# "L53",
# "M53",
# "L54",
# "M54",
# "N54",
# "O54",
# "P54",
# "R54",
# "M55",
# "N55",
# "O55",
# "P55",
# "R55",
# "L56",
# "M56",
# "N56",
# "O56",
# "P56",
# "R56",
# "L57",
# "M57",
# "L58",
# "M58",
# "L59",
# "M59",
# "N59",
# "O59",
# "P59",
# "R59",
# "S59",
# "L60",
# "M60",
# "N60",
# "O60",
# "P60",
# "R60",
# "L61",
# "M61",
# "N61",
# "O61",
# "P61",
# "R61",
# "L62",
# "M62",
# "N62",
# "O62",
# "P62",
# "R62",
# "L66",
# "M66",
# "N66",
# "O66",
# "P66",
# "R66",
# "L67",
# "M67",
# "N67",
# "O67",
# "P67",
# "S67",
# "M68",
# "N68",
# "O68",
# "P68",
# "L79",
# "M79",
# "N79",
# "O79",
# "P79",
# "R79",
# "L80",
# "M80",
# "N80",
# "O80",
# "P80",
# "R80",
# "L81",
# "M81",
# "N81",
# "O81",
# "P81",
# "R81",
# "L87",
# "M87",
# "N87",
# "O87",
# "P87",
# "R87",
# "L89",
# "M89",
# "N89",
# "O89",
# "P89",
# "R89",
# "S89",
# "L91",
# "L92",
# "L93",
# "L94",
# "M91",
# "M92",
# "M93",
# "M94",
# "N91",
# "N92",
# "N93",
# "N94",
# "R91",
# "R92",
# "R93",
# "R94",
# },
# "Direct expenditure": {
# "E01",
# "G01",
# "F01",
# "I01",
# "I02",
# "E02",
# "G02",
# "F02",
# "E03",
# "F03",
# "G03",
# "E04",
# "F04",
# "G04",
# "I04",
# "E05",
# "F05",
# "G05",
# "E06",
# "F06",
# "G06",
# "I06",
# "E12",
# "F12",
# "G12",
# "E14",
# "F14",
# "G14",
# "I14",
# "E16",
# "F16",
# "G16",
# "E18",
# "F18",
# "G18",
# "E19",
# "E20",
# "F20",
# "G20",
# "I20",
# "E21",
# "F21",
# "G21",
# "I21",
# "E22",
# "F22",
# "G22",
# "I22",
# "E23",
# "F23",
# "G23",
# "I23",
# "E24",
# "F24",
# "G24",
# "E25",
# "F25",
# "G25",
# "I25",
# "E26",
# "F26",
# "G26",
# "E28",
# "F28",
# "G28",
# "I28",
# "E29",
# "F29",
# "G29",
# "I29",
# "E31",
# "F31",
# "G31",
# "E32",
# "F32",
# "G32",
# "I32",
# "E36",
# "F36",
# "G36",
# "E37",
# "F37",
# "G37",
# "I37",
# "E38",
# "F38",
# "G38",
# "I38",
# "E39",
# "F39",
# "G39",
# "I39",
# "E44",
# "F44",
# "G44",
# "I44",
# "E45",
# "F45",
# "G45",
# "E47",
# "I47",
# "E50",
# "F50",
# "G50",
# "I50",
# "E51",
# "I51",
# "E52",
# "F52",
# "G52",
# "I52",
# "E53",
# "F53",
# "G53",
# "I53",
# "E54",
# "F54",
# "G54",
# "I54",
# "E55",
# "F55",
# "G55",
# "E56",
# "F56",
# "G56",
# "I56",
# "E57",
# "F57",
# "G57",
# "I57",
# "E58",
# "F58",
# "G58",
# "I58",
# "E59",
# "F59",
# "G59",
# "I59",
# "E60",
# "F60",
# "G60",
# "I60",
# "E61",
# "F61",
# "G61",
# "I61",
# "E62",
# "F62",
# "G62",
# "I62",
# "E66",
# "F66",
# "G66",
# "I66",
# "E67",
# "I67",
# "E68",
# "I68",
# "E74",
# "E75",
# "E77",
# "F77",
# "G77",
# "E79",
# "F79",
# "G79",
# "I79",
# "E80",
# "F80",
# "G80",
# "I80",
# "E81",
# "F81",
# "G81",
# "I81",
# "E84",
# "E85",
# "F85",
# "G85",
# "I85",
# "E87",
# "F87",
# "G87",
# "I87",
# "E89",
# "F89",
# "G89",
# "I89",
# "J89",
# "E90",
# "F90",
# "G90",
# "E91",
# "F91",
# "G91",
# "I91",
# "E92",
# "F92",
# "G92",
# "I92",
# "E93",
# "F93",
# "G93",
# "I93",
# "E94",
# "F94",
# "G94",
# "I94",
# "X11",
# "X12",
# "Y05",
# "Y06",
# "Y14",
# "Y53",
# "Y25",
# "Y34",
# "Y45",
# },
# "Current operation": {
# "E01",
# "E03",
# "E04",
# "E05",
# "E12",
# "E16",
# "E18",
# "E21",
# "E22",
# "E23",
# "E25",
# "E26",
# "E27",
# "E29",
# "E31",
# "E32",
# "E36",
# "E44",
# "E45",
# "E50",
# "E52",
# "E54",
# "E55",
# "E56",
# "E59",
# "E60",
# "E61",
# "E62",
# "E66",
# "E73",
# "E74",
# "E75",
# "E77",
# "E79",
# "E80",
# "E81",
# "E85",
# "E87",
# "E89",
# "E90",
# "E91",
# "E92",
# "E93",
# "E94",
# },
# "Capital outlay": {
# "F01",
# "F03",
# "F04",
# "F05",
# "F12",
# "F16",
# "F18",
# "F21",
# "F22",
# "F23",
# "F25",
# "F26",
# "F27",
# "F29",
# "F31",
# "F32",
# "F36",
# "F44",
# "F45",
# "F50",
# "F52",
# "F54",
# "F55",
# "F56",
# "F59",
# "F60",
# "F61",
# "F62",
# "F66",
# "F77",
# "F79",
# "F80",
# "F81",
# "F85",
# "F87",
# "F89",
# "F90",
# "F91",
# "F92",
# "F93",
# "F94",
# "G01",
# "G03",
# "G04",
# "G05",
# "G12",
# "G16",
# "G18",
# "G21",
# "G22",
# "G23",
# "G24",
# "G25",
# "G26",
# "G27",
# "G29",
# "G31",
# "G32",
# "G36",
# "G44",
# "G45",
# "G50",
# "G52",
# "G54",
# "G55",
# "G56",
# "G59",
# "G60",
# "G61",
# "G62",
# "G66",
# "G77",
# "G79",
# "G80",
# "G81",
# "G85",
# "G87",
# "G89",
# "G90",
# "G91",
# "G92",
# "G93",
# "G94",
# },
# "Insurance benefits and repayments": {
# "X11",
# "X12",
# "Y05",
# "Y06",
# "Y14",
# "Y15",
# "Y53",
# "Y54",
# },
# "Assistance and subsidies": {
# "I01",
# "I02",
# "I04",
# "I06",
# "I14",
# "E19",
# "I20",
# "I21",
# "I22",
# "I23",
# "I25",
# "I28",
# "I29",
# "I32",
# "I37",
# "I38",
# "I39",
# "I44",
# "I47",
# "I50",
# "I51",
# "I52",
# "I53",
# "I54",
# "I56",
# "I57",
# "I58",
# "I59",
# "I60",
# "I61",
# "I62",
# "I66",
# "E67",
# "I67",
# "E68",
# "I68",
# "I79",
# "I80",
# "I81",
# "E84",
# "I85",
# "I87",
# "J89",
# },
# "Interest on debt": {"I89", "I91", "I92", "I93", "I94"},
# "Exhibit: Salaries and wages": {"Z00"},
# "General expenditure": {
# "E01",
# "F01",
# "G01",
# "I01",
# "L01",
# "M01",
# "N01",
# "O01",
# "P01",
# "R01",
# "E02",
# "F02",
# "G02",
# "I02",
# "L02",
# "M02",
# "E03",
# "F03",
# "G03",
# "E04",
# "F04",
# "G04",
# "I04",
# "L04",
# "M04",
# "E05",
# "F05",
# "G05",
# "L05",
# "M05",
# "N05",
# "O05",
# "P05",
# "S05",
# "E06",
# "F06",
# "G06",
# "I06",
# "L06",
# "M06",
# "E12",
# "F12",
# "G12",
# "L12",
# "M12",
# "N12",
# "O12",
# "P12",
# "Q12",
# "R12",
# "E14",
# "F14",
# "G14",
# "I14",
# "E16",
# "F16",
# "G16",
# "E18",
# "F18",
# "G18",
# "L18",
# "M18",
# "N18",
# "O18",
# "P18",
# "Q18",
# "R18",
# "E19",
# "E20",
# "F20",
# "G20",
# "I20",
# "L20",
# "M20",
# "E21",
# "F21",
# "G21",
# "I21",
# "L21",
# "M21",
# "N21",
# "O21",
# "P21",
# "Q21",
# "S21",
# "E22",
# "F22",
# "G22",
# "I22",
# "L22",
# "M22",
# "E23",
# "F23",
# "G23",
# "I23",
# "L23",
# "M23",
# "N23",
# "O23",
# "P23",
# "E24",
# "F24",
# "G24",
# "L24",
# "M24",
# "N24",
# "O24",
# "P24",
# "R24",
# "E25",
# "F25",
# "G25",
# "I25",
# "L25",
# "M25",
# "N25",
# "O25",
# "P25",
# "S25",
# "E26",
# "F26",
# "G26",
# "E28",
# "F28",
# "G28",
# "I28",
# "L28",
# "M28",
# "E29",
# "F29",
# "G29",
# "I29",
# "L29",
# "M29",
# "N29",
# "O29",
# "P29",
# "M30",
# "N30",
# "O30",
# "P30",
# "R30",
# "E31",
# "F31",
# "G31",
# "E32",
# "F32",
# "G32",
# "I32",
# "L32",
# "M32",
# "N32",
# "O32",
# "P32",
# "R32",
# "E36",
# "F36",
# "G36",
# "E37",
# "F37",
# "G37",
# "I37",
# "L37",
# "M37",
# "E38",
# "F38",
# "G38",
# "I38",
# "L38",
# "M38",
# "N38",
# "O38",
# "P38",
# "R38",
# "E39",
# "F39",
# "G39",
# "I39",
# "L39",
# "M39",
# "E44",
# "F44",
# "G44",
# "I44",
# "L44",
# "M44",
# "N44",
# "O44",
# "P44",
# "R44",
# "E45",
# "F45",
# "G45",
# "E47",
# "I47",
# "L47",
# "M47",
# "N47",
# "O47",
# "P47",
# "R47",
# "E50",
# "F50",
# "G50",
# "I50",
# "L50",
# "M50",
# "N50",
# "O50",
# "P50",
# "R50",
# "E51",
# "I51",
# "L51",
# "M51",
# "E52",
# "F52",
# "G52",
# "I52",
# "L52",
# "M52",
# "N52",
# "O52",
# "P52",
# "R52",
# "E53",
# "F53",
# "G53",
# "I53",
# "L53",
# "M53",
# "E54",
# "F54",
# "G54",
# "I54",
# "L54",
# "M54",
# "N54",
# "O54",
# "P54",
# "R54",
# "E55",
# "F55",
# "G55",
# "M55",
# "N55",
# "O55",
# "P55",
# "R55",
# "E56",
# "F56",
# "G56",
# "I56",
# "L56",
# "M56",
# "N56",
# "O56",
# "P56",
# "R56",
# "E57",
# "F57",
# "G57",
# "I57",
# "L57",
# "M57",
# "E58",
# "F58",
# "G58",
# "I58",
# "L58",
# "M58",
# "E59",
# "F59",
# "G59",
# "I59",
# "L59",
# "M59",
# "N59",
# "O59",
# "P59",
# "R59",
# "S59",
# "E60",
# "F60",
# "G60",
# "I60",
# "L60",
# "M60",
# "N60",
# "O60",
# "P60",
# "R60",
# "E61",
# "F61",
# "G61",
# "I61",
# "L61",
# "M61",
# "N61",
# "O61",
# "P61",
# "R61",
# "E62",
# "F62",
# "G62",
# "I62",
# "L62",
# "M62",
# "N62",
# "O62",
# "P62",
# "R62",
# "E66",
# "F66",
# "G66",
# "I66",
# "L66",
# "M66",
# "N66",
# "O66",
# "P66",
# "R66",
# "E67",
# "I67",
# "L67",
# "M67",
# "N67",
# "O67",
# "P67",
# "S67",
# "E68",
# "I68",
# "M68",
# "N68",
# "O68",
# "P68",
# "E74",
# "E75",
# "E77",
# "F77",
# "G77",
# "E79",
# "F79",
# "G79",
# "I79",
# "L79",
# "M79",
# "N79",
# "O79",
# "P79",
# "R79",
# "E80",
# "F80",
# "G80",
# "I80",
# "L80",
# "M80",
# "N80",
# "O80",
# "P80",
# "R80",
# "E81",
# "F81",
# "G81",
# "I81",
# "L81",
# "M81",
# "N81",
# "O81",
# "P81",
# "R81",
# "E84",
# "E85",
# "F85",
# "G85",
# "I85",
# "E87",
# "F87",
# "G87",
# "I87",
# "L87",
# "M87",
# "N87",
# "O87",
# "P87",
# "R87",
# "E89",
# "F89",
# "G89",
# "I89",
# "J89",
# "L89",
# "M89",
# "N89",
# "O89",
# "P89",
# "R89",
# "S89",
# "L91",
# "M91",
# "N91",
# "R91",
# "L92",
# "M92",
# "N92",
# "R92",
# "L93",
# "M93",
# "N93",
# "R93",
# "L94",
# "M94",
# "N94",
# "R94",
# },
# "Direct general expenditure": {
# "E01",
# "G01",
# "F01",
# "I01",
# "I02",
# "E02",
# "G02",
# "F02",
# "E03",
# "F03",
# "G03",
# "E04",
# "F04",
# "G04",
# "I04",
# "E05",
# "F05",
# "G05",
# "E06",
# "F06",
# "G06",
# "I06",
# "E12",
# "F12",
# "G12",
# "E14",
# "F14",
# "G14",
# "I14",
# "E16",
# "F16",
# "G16",
# "E18",
# "F18",
# "G18",
# "E19",
# "E20",
# "F20",
# "G20",
# "I20",
# "E21",
# "F21",
# "G21",
# "I21",
# "E22",
# "F22",
# "G22",
# "I22",
# "E23",
# "F23",
# "G23",
# "I23",
# "E24",
# "F24",
# "G24",
# "E25",
# "F25",
# "G25",
# "I25",
# "E26",
# "F26",
# "G26",
# "E28",
# "F28",
# "G28",
# "I28",
# "E29",
# "F29",
# "G29",
# "I29",
# "E31",
# "F31",
# "G31",
# "E32",
# "F32",
# "G32",
# "I32",
# "E36",
# "F36",
# "G36",
# "E37",
# "F37",
# "G37",
# "I37",
# "E38",
# "F38",
# "G38",
# "I38",
# "E39",
# "F39",
# "G39",
# "I39",
# "E44",
# "F44",
# "G44",
# "I44",
# "E45",
# "F45",
# "G45",
# "E47",
# "I47",
# "E50",
# "F50",
# "G50",
# "I50",
# "E51",
# "I51",
# "E52",
# "F52",
# "G52",
# "I52",
# "E53",
# "F53",
# "G53",
# "I53",
# "E54",
# "F54",
# "G54",
# "I54",
# "E55",
# "F55",
# "G55",
# "E56",
# "F56",
# "G56",
# "I56",
# "E57",
# "F57",
# "G57",
# "I57",
# "E58",
# "F58",
# "G58",
# "I58",
# "E59",
# "F59",
# "G59",
# "I59",
# "E60",
# "F60",
# "G60",
# "I60",
# "E61",
# "F61",
# "G61",
# "I61",
# "E62",
# "F62",
# "G62",
# "I62",
# "E66",
# "F66",
# "G66",
# "I66",
# "E67",
# "I67",
# "E68",
# "I68",
# "E74",
# "E75",
# "E77",
# "F77",
# "G77",
# "E79",
# "F79",
# "G79",
# "I79",
# "E80",
# "F80",
# "G80",
# "I80",
# "E81",
# "F81",
# "G81",
# "I81",
# "E84",
# "E85",
# "F85",
# "G85",
# "I85",
# "E87",
# "F87",
# "G87",
# "I87",
# "E89",
# "F89",
# "G89",
# "I89",
# "J89",
# },
# "Education": {
# "E12",
# "F12",
# "G12",
# "L12",
# "M12",
# "N12",
# "O12",
# "P12",
# "Q12",
# "R12",
# "E16",
# "F16",
# "G16",
# "E18",
# "F18",
# "G18",
# "L18",
# "M18",
# "N18",
# "O18",
# "P18",
# "Q18",
# "R18",
# "E19",
# "E20",
# "F20",
# "G20",
# "I20",
# "L20",
# "M20",
# "E21",
# "F21",
# "G21",
# "I21",
# "L21",
# "M21",
# "N21",
# "O21",
# "P21",
# "Q21",
# "S21",
# },
# "Public welfare": {
# "E67",
# "I67",
# "L67",
# "M67",
# "N67",
# "O67",
# "P67",
# "S67",
# "E68",
# "I68",
# "M68",
# "N68",
# "O68",
# "P68",
# "E74",
# "E75",
# "E77",
# "F77",
# "G77",
# "E79",
# "F79",
# "G79",
# "I79",
# "L79",
# "M79",
# "N79",
# "O79",
# "P79",
# "R79",
# },
# "Hospitals": {
# "E36",
# "F36",
# "G36",
# "E37",
# "F37",
# "G37",
# "I37",
# "L37",
# "M37",
# "E39",
# "F39",
# "G39",
# "I39",
# "L39",
# "M39",
# "E38",
# "F38",
# "G38",
# "I38",
# "L38",
# "M38",
# "N38",
# "O38",
# "P38",
# "R38",
# },
# "Health": {"E32", "F32", "G32", "I32", "L32", "M32", "N32", "O32", "P32", "R32",},
# "Highways": {
# "E44",
# "F44",
# "G44",
# "I44",
# "L44",
# "M44",
# "N44",
# "O44",
# "P44",
# "R44",
# "E45",
# "F45",
# "G45",
# },
# "Police protection": {
# "E62",
# "F62",
# "G62",
# "I62",
# "L62",
# "M62",
# "N62",
# "O62",
# "P62",
# "R62",
# },
# "Correction": {
# "E04",
# "F04",
# "G04",
# "I04",
# "L04",
# "M04",
# "E05",
# "F05",
# "G05",
# "L05",
# "M05",
# "N05",
# "O05",
# "P05",
# "S05",
# },
# "Natural resources": {
# "E51",
# "I51",
# "L51",
# "M51",
# "E53",
# "F53",
# "G53",
# "I53",
# "L53",
# "M53",
# "E54",
# "F54",
# "G54",
# "I54",
# "L54",
# "M54",
# "N54",
# "O54",
# "P54",
# "R54",
# "E55",
# "F55",
# "G55",
# "M55",
# "N55",
# "O55",
# "P55",
# "R55",
# "E56",
# "F56",
# "G56",
# "I56",
# "L56",
# "M56",
# "N56",
# "O56",
# "P56",
# "R56",
# "E57",
# "F57",
# "G57",
# "I57",
# "L57",
# "M57",
# "E58",
# "F58",
# "G58",
# "I58",
# "L58",
# "M58",
# "E59",
# "F59",
# "G59",
# "I59",
# "L59",
# "M59",
# "N59",
# "O59",
# "P59",
# "R59",
# "S59",
# },
# "Parks and recreation": {
# "E61",
# "F61",
# "G61",
# "I61",
# "L61",
# "M61",
# "N61",
# "O61",
# "P61",
# "R61",
# },
# "Governmental administration": {
# "E23",
# "F23",
# "G23",
# "M23",
# "E25",
# "F25",
# "G25",
# "M25",
# "E26",
# "F26",
# "G26",
# "E29",
# "M29",
# "F29",
# "G29",
# "E31",
# "F31",
# "G31",
# },
# "Interest on general debt": {"I89", "I91", "I92", "I93", "I94"},
# # "Other and unallocable": {"A61", "B46", "E77", "G45", "T21", "T28", "U41"},
# "Other and unallocable": {
# "E01",
# "F01",
# "G01",
# "M01",
# "E03",
# "F03",
# "G03",
# "E22",
# "F22",
# "G22",
# "M30",
# "E50",
# "F50",
# "G50",
# "M50",
# "E52",
# "F52",
# "G52",
# "M52",
# "E66",
# "F66",
# "G66",
# "M66",
# "E80",
# "F80",
# "G80",
# "M80",
# "E81",
# "F81",
# "G81",
# "M81",
# "E85",
# "F85",
# "G85",
# "J85",
# "E87",
# "F87",
# "G87",
# "M87",
# "E89",
# "F89",
# "G89",
# "M89",
# "S89",
# "M91",
# "M92",
# "M93",
# "M94",
# },
# "Utility expenditure": {
# "E91",
# "F91",
# "G91",
# "I91",
# "E92",
# "F92",
# "G92",
# "I92",
# "E93",
# "F93",
# "G93",
# "I93",
# "E94",
# "F94",
# "G94",
# "I94",
# },
# "Liquor stores expenditure": {"E90", "F90", "G90"},
# "Insurance trust expenditure": {
# "X11",
# "X12",
# "Y05",
# "Y06",
# "Y14",
# "Y15",
# "Y53",
# "Y54",
# },
# "Debt at end of fiscal year": {
# "41A",
# "41B",
# "41C",
# "41D",
# "41E",
# "41F",
# "41G",
# "41H",
# "41J",
# "41K",
# "41M",
# "41N",
# "41P",
# "41S",
# "41X",
# "41V",
# "41Y",
# "42A",
# "42B",
# "42C",
# "42D",
# "42E",
# "42F",
# "42G",
# "42H",
# "42J",
# "42K",
# "42L",
# "42M",
# "42N",
# "42P",
# "42R",
# "42S",
# "42X",
# "43A",
# "43B",
# "43C",
# "43D",
# "43E",
# "43F",
# "43G",
# "43H",
# "43J",
# "43K",
# "43L",
# "43M",
# "43N",
# "43P",
# "43R",
# "43S",
# "43X",
# "44A",
# "44B",
# "44C",
# "44D",
# "44E",
# "44F",
# "44G",
# "44H",
# "44J",
# "44K",
# "44L",
# "44M",
# "44N",
# "44P",
# "44R",
# "44S",
# "44T",
# "44W",
# "44X",
# },
# "Cash and security holdings": {
# "W01",
# "W31",
# "W61",
# "W24",
# "W54",
# "W84",
# "W10",
# "W40",
# "W70",
# "W15",
# "W45",
# "W75",
# "W13",
# "W43",
# "W73",
# "Y44",
# "Y84",
# "Y61",
# "Y70",
# "Y73",
# "Y75",
# "Y07",
# "Y08",
# "Y21",
# "Y30",
# "Y33",
# "Y35",
# "X21",
# "X30",
# "X40",
# "X41",
# "X42",
# "X44",
# "X47",
# },
# }
#
# sums_methods_pdf = {
# "Total revenue": {
# "B01",
# "B21",
# "B22",
# "B30",
# "B42",
# "B43",
# "B46",
# "B50",
# "B54",
# "B59",
# "B79",
# "B80",
# "B89",
# "B91",
# "B92",
# "B93",
# "B94",
# "D21",
# "D30",
# "D42",
# "D46",
# "D50",
# "D79",
# "D80",
# "D89",
# "D91",
# "D92",
# "D93",
# "D94",
# "T01",
# "T09",
# "T10",
# "T11",
# "T12",
# "T13",
# "T14",
# "T15",
# "T16",
# "T19",
# "T20",
# "T21",
# "T22",
# "T23",
# "T24",
# "T25",
# "T27",
# "T28",
# "T29",
# "T40",
# "T41",
# "T50",
# "T51",
# "T53",
# "T99",
# "A01",
# "A03",
# "A09",
# "A10",
# "A12",
# "A16",
# "A18",
# "A21",
# "A36",
# "A44",
# "A45",
# "A50",
# "A54",
# "A56",
# "A59",
# "A60",
# "A61",
# "A80",
# "A81",
# "A87",
# "A89",
# "U01",
# "U11",
# "U20",
# "U21",
# "U30",
# "U40",
# "U41",
# "U50",
# "U95",
# "U99",
# "A90",
# "A91",
# "A92",
# "A93",
# "A94",
# "X01",
# "X02",
# "X05",
# "X08",
# "Y01",
# "Y02",
# "Y04",
# "Y10",
# "Y11",
# "Y12",
# "Y50",
# "Y51",
# "Y52",
# },
# "General revenue": {
# "B01",
# "B21",
# "B22",
# "B30",
# "B42",
# "B43",
# "B46",
# "B50",
# "B54",
# "B59",
# "B79",
# "B80",
# "B89",
# "D21",
# "D30",
# "D42",
# "D46",
# "D50",
# "D79",
# "D80",
# "D89",
# "D94",
# "T09",
# "T10",
# "T11",
# "T12",
# "T13",
# "T14",
# "T15",
# "T16",
# "T19",
# "T20",
# "T21",
# "T22",
# "T23",
# "T24",
# "T25",
# "T27",
# "T28",
# "T29",
# "T40",
# "T41",
# "T01",
# "T50",
# "T51",
# "T53",
# "T99",
# "A01",
# "A03",
# "A09",
# "A10",
# "A12",
# "A16",
# "A18",
# "A21",
# "A36",
# "A44",
# "A45",
# "A50",
# "A54",
# "A56",
# "A59",
# "A60",
# "A61",
# "A80",
# "A81",
# "A87",
# "A89",
# "U01",
# "U11",
# "U20",
# "U21",
# "U30",
# "U40",
# "U41",
# "U50",
# "U95",
# "U99",
# },
# "Intergovernmental revenue": {
# "B01",
# "B21",
# "B22",
# "B30",
# "B42",
# "B43",
# "B46",
# "B50",
# "B54",
# "B59",
# "B79",
# "B80",
# "B89",
# "B91",
# "B92",
# "B93",
# "B94",
# "D21",
# "D30",
# "D42",
# "D46",
# "D50",
# "D79",
# "D80",
# "D89",
# "D91",
# "D92",
# "D93",
# "D94",
# "S74",
# },
# "Taxes": {
# "T01",
# "T09",
# "T10",
# "T11",
# "T12",
# "T13",
# "T14",
# "T15",
# "T16",
# "T19",
# "T20",
# "T21",
# "T22",
# "T23",
# "T24",
# "T25",
# "T27",
# "T28",
# "T29",
# "T40",
# "T41",
# "T50",
# "T51",
# "T53",
# "T99",
# },
# "General sales": {"T09"},
# "Selective sales": {"T10", "T11", "T12", "T13", "T14", "T15", "T16", "T19"},
# "License taxes": {"T20", "T21", "T22", "T23", "T24", "T25", "T27", "T28", "T29"},
# "Individual income tax": {"T40"},
# "Corporate income tax": {"T41"},
# "Other taxes": {"T01", "T50", "T51", "T53", "T99"},
# "Current charge": {
# "A01",
# "A03",
# "A09",
# "A10",
# "A12",
# "A16",
# "A18",
# "A21",
# "A36",
# "A44",
# "A45",
# "A50",
# "A54",
# "A56",
# "A59",
# "A60",
# "A61",
# "A80",
# "A81",
# "A87",
# "A89",
# },
# "Miscellaneous general revenue": {
# "U01",
# "U11",
# "U20",
# "U21",
# "U30",
# "U40",
# "U41",
# "U50",
# "U95",
# "U99",
# },
# "Utility revenue": {"A91", "A92", "A93", "A94"},
# "Liquor stores revenue": {"A90"},
# "Insurance trust revenue": {
# "X01",
# "X02",
# "X05",
# "X08",
# "Y01",
# "Y02",
# "Y04",
# "Y10",
# "Y11",
# "Y12",
# "Y50",
# "Y51",
# "Y52",
# },
# "Total expenditure": {
# "E01",
# "E03",
# "E04",
# "E05",
# "E12",
# "E16",
# "E18",
# "E21",
# "E22",
# "E23",
# "E25",
# "E26",
# "E27",
# "E29",
# "E31",
# "E32",
# "E36",
# "E44",
# "E45",
# "E50",
# "E52",
# "E54",
# "E55",
# "E56",
# "E59",
# "E60",
# "E61",
# "E62",
# "E66",
# "E73",
# "E74",
# "E75",
# "E77",
# "E79",
# "E80",
# "E81",
# "E85",
# "E87",
# "E89",
# "E90",
# "E91",
# "E92",
# "E93",
# "E94",
# "I89",
# "I91",
# "I92",
# "I93",
# "I94",
# "J19",
# "J67",
# "J68",
# "J85",
# "X11",
# "X12",
# "Y05",
# "Y06",
# "Y15",
# "Y14",
# "Y53",
# "Y54",
# "F01",
# "F03",
# "F04",
# "F05",
# "F12",
# "F16",
# "F18",
# "F21",
# "F22",
# "F23",
# "F25",
# "F26",
# "F27",
# "F29",
# "F31",
# "F32",
# "F36",
# "F44",
# "F45",
# "F50",
# "F52",
# "F54",
# "F55",
# "F56",
# "F59",
# "F60",
# "F61",
# "F62",
# "F66",
# "F77",
# "F79",
# "F80",
# "F81",
# "F85",
# "F87",
# "F89",
# "F90",
# "F91",
# "F92",
# "F93",
# "F94",
# "G01",
# "G03",
# "G04",
# "G05",
# "G12",
# "G16",
# "G18",
# "G21",
# "G22",
# "G23",
# "G24",
# "G25",
# "G26",
# "G27",
# "G29",
# "G31",
# "G32",
# "G36",
# "G44",
# "G45",
# "G50",
# "G52",
# "G54",
# "G55",
# "G56",
# "G59",
# "G60",
# "G61",
# "G62",
# "G66",
# "G77",
# "G79",
# "G80",
# "G81",
# "G85",
# "G87",
# "G89",
# "G90",
# "G91",
# "G92",
# "G93",
# "G94",
# "M01",
# "M04",
# "M05",
# "M12",
# "M18",
# "M21",
# "M23",
# "M25",
# "M27",
# "M29",
# "M30",
# "M32",
# "M36",
# "M44",
# "M50",
# "M52",
# "M54",
# "M55",
# "M56",
# "M59",
# "M60",
# "M61",
# "M62",
# "M66",
# "M67",
# "M68",
# "M79",
# "M80",
# "M81",
# "M87",
# "M89",
# "M91",
# "M92",
# "M93",
# "M94",
# "Q12",
# "Q18",
# "S67",
# "S74",
# "S89",
# },
# "Intergovernmental expenditure": {
# "M01",
# "M04",
# "M05",
# "M12",
# "M18",
# "M21",
# "M23",
# "M25",
# "M27",
# "M29",
# "M30",
# "M32",
# "M36",
# "M44",
# "M50",
# "M52",
# "M54",
# "M55",
# "M56",
# "M59",
# "M60",
# "M61",
# "M62",
# "M66",
# "M67",
# "M68",
# "M79",
# "M80",
# "M81",
# "M87",
# "M89",
# "M91",
# "M92",
# "M93",
# "M94",
# "Q12",
# "Q18",
# "S67",
# "S68",
# "S89",
# },
# "Direct expenditure": {
# "E01",
# "E03",
# "E04",
# "E05",
# "E12",
# "E16",
# "E18",
# "E21",
# "E22",
# "E23",
# "E25",
# "E26",
# "E27",
# "E29",
# "E31",
# "E32",
# "E36",
# "E44",
# "E45",
# "E50",
# "E52",
# "E54",
# "E55",
# "E56",
# "E59",
# "E60",
# "E61",
# "E62",
# "E66",
# "E73",
# "E74",
# "E75",
# "E77",
# "E79",
# "E80",
# "E81",
# "E85",
# "E87",
# "E89",
# "E90",
# "E91",
# "E92",
# "E93",
# "E94",
# "F01",
# "F03",
# "F04",
# "F05",
# "F12",
# "F16",
# "F18",
# "F21",
# "F22",
# "F23",
# "F25",
# "F26",
# "F27",
# "F29",
# "F31",
# "F32",
# "F36",
# "F44",
# "F45",
# "F50",
# "F52",
# "F54",
# "F55",
# "F56",
# "F59",
# "F60",
# "F61",
# "F62",
# "F66",
# "F77",
# "F79",
# "F80",
# "F81",
# "F85",
# "F87",
# "F89",
# "F90",
# "F91",
# "F92",
# "F93",
# "F94",
# "G01",
# "G03",
# "G04",
# "G05",
# "G12",
# "G16",
# "G18",
# "G21",
# "G22",
# "G23",
# "G24",
# "G25",
# "G26",
# "G29",
# "G31",
# "G32",
# "G36",
# "G44",
# "G45",
# "G50",
# "G52",
# "G54",
# "G55",
# "G56",
# "G59",
# "G60",
# "G61",
# "G62",
# "G66",
# "G77",
# "G79",
# "G80",
# "G81",
# "G85",
# "G87",
# "G89",
# "G90",
# "G91",
# "G92",
# "G93",
# "G94",
# "X11",
# "X12",
# "Y05",
# "Y06",
# "Y14",
# "Y15",
# "Y53",
# "Y54",
# "J19",
# "J67",
# "J68",
# "J85",
# "I89",
# "I91",
# "I92",
# "I93",
# "I94",
# },
# "Current operation": {
# "E01",
# "E03",
# "E04",
# "E05",
# "E12",
# "E16",
# "E18",
# "E21",
# "E22",
# "E23",
# "E25",
# "E26",
# "E27",
# "E29",
# "E31",
# "E32",
# "E36",
# "E44",
# "E45",
# "E50",
# "E52",
# "E54",
# "E55",
# "E56",
# "E59",
# "E60",
# "E61",
# "E62",
# "E66",
# "E73",
# "E74",
# "E75",
# "E77",
# "E79",
# "E80",
# "E81",
# "E85",
# "E87",
# "E89",
# "E90",
# "E91",
# "E92",
# "E93",
# "E94",
# },
# "Capital outlay": {
# "F01",
# "F03",
# "F04",
# "F05",
# "F12",
# "F16",
# "F18",
# "F21",
# "F22",
# "F23",
# "F25",
# "F26",
# "F27",
# "F29",
# "F31",
# "F32",
# "F36",
# "F44",
# "F45",
# "F50",
# "F52",
# "F54",
# "F55",
# "F56",
# "F59",
# "F60",
# "F61",
# "F62",
# "F66",
# "F77",
# "F79",
# "F80",
# "F81",
# "F85",
# "F87",
# "F89",
# "F90",
# "F91",
# "F92",
# "F93",
# "F94",
# "G01",
# "G03",
# "G04",
# "G05",
# "G12",
# "G16",
# "G18",
# "G21",
# "G22",
# "G23",
# "G24",
# "G25",
# "G26",
# "G27",
# "G29",
# "G31",
# "G32",
# "G36",
# "G44",
# "G45",
# "G50",
# "G52",
# "G54",
# "G55",
# "G56",
# "G59",
# "G60",
# "G61",
# "G62",
# "G66",
# "G77",
# "G79",
# "G80",
# "G81",
# "G85",
# "G87",
# "G89",
# "G90",
# "G91",
# "G92",
# "G93",
# "G94",
# },
# "Insurance benefits and repayments": {
# "X11",
# "X12",
# "Y05",
# "Y06",
# "Y14",
# "Y15",
# "Y53",
# "Y54",
# },
# "Assistance and subsidies": {"J19", "J67", "J68", "J85"},
# "Interest on debt": {"I89", "I91", "I92", "I93", "I94"},
# "Exhibit: Salaries and wages": {"Z00"},
# "General expenditure": {
# "M01",
# "M04",
# "M05",
# "M12",
# "M18",
# "M21",
# "M23",
# "M25",
# "M27",
# "M29",
# "M30",
# "M32",
# "M36",
# "M44",
# "M50",
# "M52",
# "M54",
# "M55",
# "M56",
# "M59",
# "M60",
# "M61",
# "M62",
# "M66",
# "M67",
# "M68",
# "M79",
# "M80",
# "M81",
# "M87",
# "M89",
# "M91",
# "M92",
# "M93",
# "M94",
# "Q12",
# "Q18",
# "S67",
# "S89",
# "E01",
# "E03",
# "E04",
# "E05",
# "E12",
# "E16",
# "E18",
# "E21",
# "E22",
# "E23",
# "E25",
# "E26",
# "E27",
# "E29",
# "E31",
# "E32",
# "E36",
# "E44",
# "E45",
# "E50",
# "E52",
# "E54",
# "E55",
# "E56",
# "E59",
# "E60",
# "E61",
# "E62",
# "E66",
# "E73",
# "E74",
# "E75",
# "E77",
# "E79",
# "E80",
# "E81",
# "E85",
# "E87",
# "E89",
# "F01",
# "F03",
# "F04",
# "F05",
# "F12",
# "F16",
# "F18",
# "F21",
# "F22",
# "F23",
# "F25",
# "F26",
# "F27",
# "F29",
# "F31",
# "F32",
# "F36",
# "F44",
# "F45",
# "F50",
# "F52",
# "F54",
# "F55",
# "F56",
# "F59",
# "F60",
# "F61",
# "F62",
# "F66",
# "F77",
# "F79",
# "F80",
# "F81",
# "F85",
# "F87",
# "F89",
# "G01",
# "G03",
# "G04",
# "G05",
# "G12",
# "G16",
# "G18",
# "G21",
# "G22",
# "G23",
# "G24",
# "G25",
# "G26",
# "G27",
# "G29",
# "G31",
# "G32",
# "G36",
# "G44",
# "G45",
# "G50",
# "G52",
# "G54",
# "G55",
# "G56",
# "G59",
# "G60",
# "G61",
# "G62",
# "G66",
# "G77",
# "G79",
# "G80",
# "G81",
# "G85",
# "G87",
# "G89",
# "I89",
# "J19",
# "J67",
# "J68",
# "J85",
# },
# "Direct general expenditure": {
# "E01",
# "E03",
# "E04",
# "E05",
# "E12",
# "E16",
# "E18",
# "E21",
# "E22",
# "E23",
# "E25",
# "E26",
# "E27",
# "E29",
# "E31",
# "E32",
# "E36",
# "E44",
# "E45",
# "E50",
# "E52",
# "E54",
# "E55",
# "E56",
# "E59",
# "E60",
# "E61",
# "E62",
# "E66",
# "E73",
# "E74",
# "E75",
# "E77",
# "E79",
# "E80",
# "E81",
# "E85",
# "E87",
# "E89",
# "F01",
# "F03",
# "F04",
# "F05",
# "F12",
# "F16",
# "F18",
# "F21",
# "F22",
# "F23",
# "F25",
# "F26",
# "F27",
# "F29",
# "F31",
# "F32",
# "F36",
# "F44",
# "F45",
# "F50",
# "F52",
# "F54",
# "F55",
# "F56",
# "F59",
# "F60",
# "F61",
# "F62",
# "F66",
# "F77",
# "F79",
# "F80",
# "F81",
# "F85",
# "F87",
# "F89",
# "G01",
# "G03",
# "G04",
# "G05",
# "G12",
# "G16",
# "G18",
# "G21",
# "G22",
# "G23",
# "G25",
# "G26",
# "G27",
# "G29",
# "G31",
# "G32",
# "G36",
# "G44",
# "G45",
# "G50",
# "G52",
# "G54",
# "G55",
# "G56",
# "G59",
# "G60",
# "G61",
# "G62",
# "G66",
# "G77",
# "G79",
# "G80",
# "G81",
# "G85",
# "G87",
# "G89",
# "I89",
# "J19",
# "J67",
# "J68",
# "J85",
# },
# "Education": {
# "E12",
# "F12",
# "G12",
# "M12",
# "Q12",
# "E16",
# "F16",
# "G16",
# "E18",
# "F18",
# "G18",
# "M18",
# "Q18",
# "J19",
# "E21",
# "F21",
# "G21",
# "M21",
# },
# "Public welfare": {
# "J67",
# "M67",
# "S67",
# "S74",
# "J68",
# "M68",
# "E73",
# "E74",
# "E75",
# "E77",
# "F77",
# "G77",
# "E79",
# "M79",
# "F79",
# "G79",
# },
# "Hospitals": {"E36", "F36", "G36", "M36"},
# # "Health": {"E27", "E32", "F27", "F32", "G27", "G32", "M27", "M32"},
# "Health": {"E32", "F32", "G32", "M32"},
# "Highways": {"E44", "M44", "F44", "G44", "E45", "F45", "G45"},
# "Police protection": {"E62", "F62", "G62", "M62"},
# "Correction": {"E04", "M04", "F04", "G04", "E05", "F05", "G05", "M05"},
# "Natural resources": {
# "E54",
# "E55",
# "M54",
# "M55",
# "E56",
# "M56",
# "E59",
# "M59",
# "F54",
# "F55",
# "F56",
# "F59",
# "G54",
# "G55",
# "G56",
# "G59",
# },
# "Parks and recreation": {"E61", "F61", "G61", "M61"},
# "Governmental administration": {
# "E23",
# "F23",
# "G23",
# "M23",
# "E25",
# "F25",
# "G25",
# "M25",
# "E26",
# "F26",
# "G26",
# "E29",
# "M29",
# "F29",
# "G29",
# "E31",
# "F31",
# "G31",
# },
# "Interest on general debt": {"I89"},
# "Other and unallocable": {
# "E01",
# "F01",
# "G01",
# "M01",
# "E03",
# "F03",
# "G03",
# "E22",
# "F22",
# "G22",
# "M30",
# "E50",
# "F50",
# "G50",
# "M50",
# "E52",
# "F52",
# "G52",
# "M52",
# "E66",
# "F66",
# "G66",
# "M66",
# "E80",
# "F80",
# "G80",
# "M80",
# "E81",
# "F81",
# "G81",
# "M81",
# "E85",
# "F85",
# "G85",
# "J85",
# "E87",
# "F87",
# "G87",
# "M87",
# "E89",
# "F89",
# "G89",
# "M89",
# "S89",
# "M91",
# "M92",
# "M93",
# "M94",
# },
# "Utility expenditure": {
# "E91",
# "F91",
# "G91",
# "I91",
# "E92",
# "F92",
# "G92",
# "I92",
# "E93",
# "F93",
# "G93",
# "I93",
# "E94",
# "F94",
# "G94",
# "I94",
# },
# "Liquor stores expenditure": {"E90", "F90", "G90"},
# "Insurance trust expenditure": {
# "X11",
# "X12",
# "Y05",
# "Y06",
# "Y14",
# "Y15",
# "Y53",
# "Y54",
# },
# "Debt at end of fiscal year": {"64V", "44T", "49U"},
# "Cash and security holdings": {
# "W01",
# "W31",
# "W61",
# "X21",
# "X30",
# "Z77",
# "Z78",
# "X42",
# "X44",
# "X47",
# "Y07",
# "Y08",
# "Y21",
# "Y61",
# },
# }
#
# sums_2005_2011 = {
# "Total revenue": {
# "B01",
# "B21",
# "B22",
# "B30",
# "B42",
# "B43",
# "B46",
# "B50",
# "B54",
# "B59",
# "B79",
# "B80",
# "B89",
# "B91",
# "B92",
# "B93",
# "B94",
# "D21",
# "D30",
# "D42",
# "D46",
# "D50",
# "D79",
# "D80",
# "D89",
# "D91",
# "D92",
# "D93",
# "D94",
# "T01",
# "T09",
# "T10",
# "T11",
# "T12",
# "T13",
# "T14",
# "T15",
# "T16",
# "T19",
# "T20",
# "T21",
# "T22",
# "T23",
# "T24",
# "T25",
# "T27",
# "T28",
# "T29",
# "T40",
# "T41",
# "T50",
# "T51",
# "T53",
# "T99",
# "A01",
# "A03",
# "A09",
# "A10",
# "A12",
# "A16",
# "A18",
# "A21",
# "A36",
# "A44",
# "A45",
# "A50",
# "A54",
# "A56",
# "A59",
# "A60",
# "A61",
# "A80",
# "A81",
# "A87",
# "A89",
# "U01",
# "U11",
# "U20",
# "U21",
# "U30",
# "U40",
# "U41",
# "U50",
# "U95",
# "U99",
# "A90",
# "A91",
# "A92",
# "A93",
# "A94",
# "X01",
# "X02",
# "X05",
# "X08",
# "Y01",
# "Y02",
# "Y04",
# "Y10",
# "Y11",
# "Y12",
# "Y50",
# "Y51",
# "Y52",
# },
# "General revenue": {
# "B01",
# "B21",
# "B22",
# "B30",
# "B42",
# "B43",
# "B46",
# "B50",
# "B54",
# "B59",
# "B79",
# "B80",
# "B89",
# "D21",
# "D30",
# "D42",
# "D46",
# "D50",
# "D79",
# "D80",
# "D89",
# "D94",
# "T09",
# "T10",
# "T11",
# "T12",
# "T13",
# "T14",
# "T15",
# "T16",
# "T19",
# "T20",
# "T21",
# "T22",
# "T23",
# "T24",
# "T25",
# "T27",
# "T28",
# "T29",
# "T40",
# "T41",
# "T01",
# "T50",
# "T51",
# "T53",
# "T99",
# "A01",
# "A03",
# "A09",
# "A10",
# "A12",
# "A16",
# "A18",
# "A21",
# "A36",
# "A44",
# "A45",
# "A50",
# "A54",
# "A56",
# "A59",
# "A60",
# "A61",
# "A80",
# "A81",
# "A87",
# "A89",
# "U01",
# "U11",
# "U20",
# "U21",
# "U30",
# "U40",
# "U41",
# "U50",
# "U95",
# "U99",
# },
# "Intergovernmental revenue": {
# "B01",
# "B21",
# "B22",
# "B30",
# "B42",
# "B43",
# "B46",
# "B50",
# "B54",
# "B59",
# "B79",
# "B80",
# "B89",
# "B91",
# "B92",
# "B93",
# "B94",
# "D21",
# "D30",
# "D42",
# "D46",
# "D50",
# "D79",
# "D80",
# "D89",
# "D91",
# "D92",
# "D93",
# "D94",
# "S74",
# },
# "Taxes": {
# "T01",
# "T09",
# "T10",
# "T11",
# "T12",
# "T13",
# "T14",
# "T15",
# "T16",
# "T19",
# "T20",
# "T21",
# "T22",
# "T23",
# "T24",
# "T25",
# "T27",
# "T28",
# "T29",
# "T40",
# "T41",
# "T50",
# "T51",
# "T53",
# "T99",
# },
# "General sales": {"T09"},
# "Selective sales": {"T10", "T11", "T12", "T13", "T14", "T15", "T16", "T19"},
# "License taxes": {"T20", "T21", "T22", "T23", "T24", "T25", "T27", "T28", "T29"},
# "Individual income tax": {"T40"},
# "Corporate income tax": {"T41"},
# "Other taxes": {"T01", "T50", "T51", "T53", "T99"},
# "Current charge": {
# "A01",
# "A03",
# "A09",
# "A10",
# "A12",
# "A16",
# "A18",
# "A21",
# "A36",
# "A44",
# "A45",
# "A50",
# "A54",
# "A56",
# "A59",
# "A60",
# "A61",
# "A80",
# "A81",
# "A87",
# "A89",
# },
# "Miscellaneous general revenue": {
# "U01",
# "U11",
# "U20",
# "U21",
# "U30",
# "U40",
# "U41",
# "U50",
# "U95",
# "U99",
# },
# "Utility revenue": {"A91", "A92", "A93", "A94"},
# "Liquor stores revenue": {"A90"},
# "Insurance trust revenue": {
# "X01",
# "X02",
# "X05",
# "X08",
# "Y01",
# "Y02",
# "Y04",
# "Y10",
# "Y11",
# "Y12",
# "Y50",
# "Y51",
# "Y52",
# },
# "Total expenditure": {
# "E01",
# "E03",
# "E04",
# "E05",
# "E12",
# "E16",
# "E18",
# "E21",
# "E22",
# "E23",
# "E25",
# "E26",
# "E27",
# "E29",
# "E31",
# "E32",
# "E36",
# "E44",
# "E45",
# "E50",
# "E52",
# "E54",
# "E55",
# "E56",
# "E59",
# "E60",
# "E61",
# "E62",
# "E66",
# "E73",
# "E74",
# "E75",
# "E77",
# "E79",
# "E80",
# "E81",
# "E85",
# "E87",
# "E89",
# "E90",
# "E91",
# "E92",
# "E93",
# "E94",
# "I89",
# "I91",
# "I92",
# "I93",
# "I94",
# "J19",
# "J67",
# "J68",
# "J85",
# "X11",
# "X12",
# "Y05",
# "Y06",
# "Y15",
# "Y14",
# "Y53",
# "Y54",
# "F01",
# "F03",
# "F04",
# "F05",
# "F12",
# "F16",
# "F18",
# "F21",
# "F22",
# "F23",
# "F25",
# "F26",
# "F27",
# "F29",
# "F31",
# "F32",
# "F36",
# "F44",
# "F45",
# "F50",
# "F52",
# "F54",
# "F55",
# "F56",
# "F59",
# "F60",
# "F61",
# "F62",
# "F66",
# "F77",
# "F79",
# "F80",
# "F81",
# "F85",
# "F87",
# "F89",
# "F90",
# "F91",
# "F92",
# "F93",
# "F94",
# "G01",
# "G03",
# "G04",
# "G05",
# "G12",
# "G16",
# "G18",
# "G21",
# "G22",
# "G23",
# "G24",
# "G25",
# "G26",
# "G27",
# "G29",
# "G31",
# "G32",
# "G36",
# "G44",
# "G45",
# "G50",
# "G52",
# "G54",
# "G55",
# "G56",
# "G59",
# "G60",
# "G61",
# "G62",
# "G66",
# "G77",
# "G79",
# "G80",
# "G81",
# "G85",
# "G87",
# "G89",
# "G90",
# "G91",
# "G92",
# "G93",
# "G94",
# "M01",
# "M04",
# "M05",
# "M12",
# "M18",
# "M21",
# "M23",
# "M25",
# "M27",
# "M29",
# "M30",
# "M32",
# "M36",
# "M44",
# "M50",
# "M52",
# "M54",
# "M55",
# "M56",
# "M59",
# "M60",
# "M61",
# "M62",
# "M66",
# "M67",
# "M68",
# "M79",
# "M80",
# "M81",
# "M87",
# "M89",
# "M91",
# "M92",
# "M93",
# "M94",
# "Q12",
# "Q18",
# "S67",
# "S74",
# "S89",
# },
# "Intergovernmental expenditure": {
# "M01",
# "M04",
# "M05",
# "M12",
# "M18",
# "M21",
# "M23",
# "M25",
# "M27",
# "M29",
# "M30",
# "M32",
# "M36",
# "M44",
# "M50",
# "M52",
# "M54",
# "M55",
# "M56",
# "M59",
# "M60",
# "M61",
# "M62",
# "M66",
# "M67",
# "M68",
# "M79",
# "M80",
# "M81",
# "M87",
# "M89",
# "M91",
# "M92",
# "M93",
# "M94",
# "Q12",
# "Q18",
# "S67",
# "S68",
# "S89",
# },
# "Direct expenditure": {
# "E01",
# "E03",
# "E04",
# "E05",
# "E12",
# "E16",
# "E18",
# "E21",
# "E22",
# "E23",
# "E25",
# "E26",
# "E27",
# "E29",
# "E31",
# "E32",
# "E36",
# "E44",
# "E45",
# "E50",
# "E52",
# "E54",
# "E55",
# "E56",
# "E59",
# "E60",
# "E61",
# "E62",
# "E66",
# "E73",
# "E74",
# "E75",
# "E77",
# "E79",
# "E80",
# "E81",
# "E85",
# "E87",
# "E89",
# "E90",
# "E91",
# "E92",
# "E93",
# "E94",
# "F01",
# "F03",
# "F04",
# "F05",
# "F12",
# "F16",
# "F18",
# "F21",
# "F22",
# "F23",
# "F25",
# "F26",
# "F27",
# "F29",
# "F31",
# "F32",
# "F36",
# "F44",
# "F45",
# "F50",
# "F52",
# "F54",
# "F55",
# "F56",
# "F59",
# "F60",
# "F61",
# "F62",
# "F66",
# "F77",
# "F79",
# "F80",
# "F81",
# "F85",
# "F87",
# "F89",
# "F90",
# "F91",
# "F92",
# "F93",
# "F94",
# "G01",
# "G03",
# "G04",
# "G05",
# "G12",
# "G16",
# "G18",
# "G21",
# "G22",
# "G23",
# "G24",
# "G25",
# "G26",
# "G29",
# "G31",
# "G32",
# "G36",
# "G44",
# "G45",
# "G50",
# "G52",
# "G54",
# "G55",
# "G56",
# "G59",
# "G60",
# "G61",
# "G62",
# "G66",
# "G77",
# "G79",
# "G80",
# "G81",
# "G85",
# "G87",
# "G89",
# "G90",
# "G91",
# "G92",
# "G93",
# "G94",
# "X11",
# "X12",
# "Y05",
# "Y06",
# "Y14",
# "Y15",
# "Y53",
# "Y54",
# "J19",
# "J67",
# "J68",
# "J85",
# "I89",
# "I91",
# "I92",
# "I93",
# "I94",
# },
# "Current operation": {
# "E01",
# "E03",
# "E04",
# "E05",
# "E12",
# "E16",
# "E18",
# "E21",
# "E22",
# "E23",
# "E25",
# "E26",
# "E27",
# "E29",
# "E31",
# "E32",
# "E36",
# "E44",
# "E45",
# "E50",
# "E52",
# "E54",
# "E55",
# "E56",
# "E59",
# "E60",
# "E61",
# "E62",
# "E66",
# "E73",
# "E74",
# "E75",
# "E77",
# "E79",
# "E80",
# "E81",
# "E85",
# "E87",
# "E89",
# "E90",
# "E91",
# "E92",
# "E93",
# "E94",
# },
# "Capital outlay": {
# "F01",
# "F03",
# "F04",
# "F05",
# "F12",
# "F16",
# "F18",
# "F21",
# "F22",
# "F23",
# "F25",
# "F26",
# "F27",
# "F29",
# "F31",
# "F32",
# "F36",
# "F44",
# "F45",
# "F50",
# "F52",
# "F54",
# "F55",
# "F56",
# "F59",
# "F60",
# "F61",
# "F62",
# "F66",
# "F77",
# "F79",
# "F80",
# "F81",
# "F85",
# "F87",
# "F89",
# "F90",
# "F91",
# "F92",
# "F93",
# "F94",
# "G01",
# "G03",
# "G04",
# "G05",
# "G12",
# "G16",
# "G18",
# "G21",
# "G22",
# "G23",
# "G24",
# "G25",
# "G26",
# "G27",
# "G29",
# "G31",
# "G32",
# "G36",
# "G44",
# "G45",
# "G50",
# "G52",
# "G54",
# "G55",
# "G56",
# "G59",
# "G60",
# "G61",
# "G62",
# "G66",
# "G77",
# "G79",
# "G80",
# "G81",
# "G85",
# "G87",
# "G89",
# "G90",
# "G91",
# "G92",
# "G93",
# "G94",
# },
# "Insurance benefits and repayments": {
# "X11",
# "X12",
# "Y05",
# "Y06",
# "Y14",
# "Y15",
# "Y53",
# "Y54",
# },
# "Assistance and subsidies": {"J19", "J67", "J68", "J85"},
# "Interest on debt": {"I89", "I91", "I92", "I93", "I94"},
# "Exhibit: Salaries and wages": {"Z00"},
# "General expenditure": {
# "M01",
# "M04",
# "M05",
# "M12",
# "M18",
# "M21",
# "M23",
# "M25",
# "M27",
# "M29",
# "M30",
# "M32",
# "M36",
# "M44",
# "M50",
# "M52",
# "M54",
# "M55",
# "M56",
# "M59",
# "M60",
# "M61",
# "M62",
# "M66",
# "M67",
# "M68",
# "M79",
# "M80",
# "M81",
# "M87",
# "M89",
# "M91",
# "M92",
# "M93",
# "M94",
# "Q12",
# "Q18",
# "S67",
# "S89",
# "E01",
# "E03",
# "E04",
# "E05",
# "E12",
# "E16",
# "E18",
# "E21",
# "E22",
# "E23",
# "E25",
# "E26",
# "E27",
# "E29",
# "E31",
# "E32",
# "E36",
# "E44",
# "E45",
# "E50",
# "E52",
# "E54",
# "E55",
# "E56",
# "E59",
# "E60",
# "E61",
# "E62",
# "E66",
# "E73",
# "E74",
# "E75",
# "E77",
# "E79",
# "E80",
# "E81",
# "E85",
# "E87",
# "E89",
# "F01",
# "F03",
# "F04",
# "F05",
# "F12",
# "F16",
# "F18",
# "F21",
# "F22",
# "F23",
# "F25",
# "F26",
# "F27",
# "F29",
# "F31",
# "F32",
# "F36",
# "F44",
# "F45",
# "F50",
# "F52",
# "F54",
# "F55",
# "F56",
# "F59",
# "F60",
# "F61",
# "F62",
# "F66",
# "F77",
# "F79",
# "F80",
# "F81",
# "F85",
# "F87",
# "F89",
# "G01",
# "G03",
# "G04",
# "G05",
# "G12",
# "G16",
# "G18",
# "G21",
# "G22",
# "G23",
# "G24",
# "G25",
# "G26",
# "G27",
# "G29",
# "G31",
# "G32",
# "G36",
# "G44",
# "G45",
# "G50",
# "G52",
# "G54",
# "G55",
# "G56",
# "G59",
# "G60",
# "G61",
# "G62",
# "G66",
# "G77",
# "G79",
# "G80",
# "G81",
# "G85",
# "G87",
# "G89",
# "I89",
# "J19",
# "J67",
# "J68",
# "J85",
# },
# "Direct general expenditure": {
# "E01",
# "E03",
# "E04",
# "E05",
# "E12",
# "E16",
# "E18",
# "E21",
# "E22",
# "E23",
# "E25",
# "E26",
# "E27",
# "E29",
# "E31",
# "E32",
# "E36",
# "E44",
# "E45",
# "E50",
# "E52",
# "E54",
# "E55",
# "E56",
# "E59",
# "E60",
# "E61",
# "E62",
# "E66",
# "E73",
# "E74",
# "E75",
# "E77",
# "E79",
# "E80",
# "E81",
# "E85",
# "E87",
# "E89",
# "F01",
# "F03",
# "F04",
# "F05",
# "F12",
# "F16",
# "F18",
# "F21",
# "F22",
# "F23",
# "F25",
# "F26",
# "F27",
# "F29",
# "F31",
# "F32",
# "F36",
# "F44",
# "F45",
# "F50",
# "F52",
# "F54",
# "F55",
# "F56",
# "F59",
# "F60",
# "F61",
# "F62",
# "F66",
# "F77",
# "F79",
# "F80",
# "F81",
# "F85",
# "F87",
# "F89",
# "G01",
# "G03",
# "G04",
# "G05",
# "G12",
# "G16",
# "G18",
# "G21",
# "G22",
# "G23",
# "G25",
# "G26",
# "G27",
# "G29",
# "G31",
# "G32",
# "G36",
# "G44",
# "G45",
# "G50",
# "G52",
# "G54",
# "G55",
# "G56",
# "G59",
# "G60",
# "G61",
# "G62",
# "G66",
# "G77",
# "G79",
# "G80",
# "G81",
# "G85",
# "G87",
# "G89",
# "I89",
# "J19",
# "J67",
# "J68",
# "J85",
# },
# "Education": {
# "E12",
# "F12",
# "G12",
# "M12",
# "Q12",
# "E16",
# "F16",
# "G16",
# "E18",
# "F18",
# "G18",
# "M18",
# "Q18",
# "J19",
# "E21",
# "F21",
# "G21",
# "M21",
# },
# "Public welfare": {
# "J67",
# "M67",
# "S67",
# "S74",
# "J68",
# "M68",
# "E73",
# "E74",
# "E75",
# "E77",
# "F77",
# "G77",
# "E79",
# "M79",
# "F79",
# "G79",
# },
# "Hospitals": {"E36", "F36", "G36", "M36"},
# "Health": {"E27", "E32", "F27", "F32", "G27", "G32", "M27", "M32"},
# # "Health": {"E32", "F32", "G32", "M32"},
# "Highways": {"E44", "M44", "F44", "G44", "E45", "F45", "G45"},
# "Police protection": {"E62", "F62", "G62", "M62"},
# "Correction": {"E04", "M04", "F04", "G04", "E05", "F05", "G05", "M05"},
# "Natural resources": {
# "E54",
# "E55",
# "M54",
# "M55",
# "E56",
# "M56",
# "E59",
# "M59",
# "F54",
# "F55",
# "F56",
# "F59",
# "G54",
# "G55",
# "G56",
# "G59",
# },
# "Parks and recreation": {"E61", "F61", "G61", "M61"},
# "Governmental administration": {
# "E23",
# "F23",
# "G23",
# "M23",
# "E25",
# "F25",
# "G25",
# "M25",
# "E26",
# "F26",
# "G26",
# "E29",
# "M29",
# "F29",
# "G29",
# "E31",
# "F31",
# "G31",
# },
# "Interest on general debt": {"I89"},
# "Other and unallocable": {
# "E01",
# "F01",
# "G01",
# "M01",
# "E03",
# "F03",
# "G03",
# "E22",
# "F22",
# "G22",
# "M30",
# "E50",
# "F50",
# "G50",
# "M50",
# "E52",
# "F52",
# "G52",
# "M52",
# "E66",
# "F66",
# "G66",
# "M66",
# "E80",
# "F80",
# "G80",
# "M80",
# "E81",
# "F81",
# "G81",
# "M81",
# "E85",
# "F85",
# "G85",
# "J85",
# "E87",
# "F87",
# "G87",
# "M87",
# "E89",
# "F89",
# "G89",
# "M89",
# "S89",
# "M91",
# "M92",
# "M93",
# "M94",
# },
# "Utility expenditure": {
# "E91",
# "F91",
# "G91",
# "I91",
# "E92",
# "F92",
# "G92",
# "I92",
# "E93",
# "F93",
# "G93",
# "I93",
# "E94",
# "F94",
# "G94",
# "I94",
# },
# "Liquor stores expenditure": {"E90", "F90", "G90"},
# "Insurance trust expenditure": {
# "X11",
# "X12",
# "Y05",
# "Y06",
# "Y14",
# "Y15",
# "Y53",
# "Y54",
# },
# "Debt at end of fiscal year": {"64V", "44T", "49U"},
# "Cash and security holdings": {
# "W01",
# "W31",
# "W61",
# "X21",
# "X30",
# "Z77",
# "Z78",
# "X42",
# "X44",
# "X47",
# "Y07",
# "Y08",
# "Y21",
# "Y61",
# },
# }
| 17.200349
| 88
| 0.203544
| 6,771
| 108,345
| 3.255797
| 0.113573
| 0.006532
| 0.009798
| 0.010342
| 0.943978
| 0.938353
| 0.916716
| 0.908596
| 0.905693
| 0.898707
| 0
| 0.269389
| 0.565148
| 108,345
| 6,298
| 89
| 17.20308
| 0.198518
| 0.724445
| 0
| 0.931034
| 0
| 0
| 0.18592
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 10
|
3635c5f0a97391f7eab4b031324762b8006124cf
| 6,505
|
py
|
Python
|
telegram_bot/test/test_main.py
|
diego-hermida/ClimateChangeApp
|
576d49ec5b76f709cc86874ffb03f4a38dbbbbfd
|
[
"MIT"
] | 2
|
2018-07-01T20:36:46.000Z
|
2019-11-01T22:47:06.000Z
|
telegram_bot/test/test_main.py
|
diego-hermida/ClimateChangeApp
|
576d49ec5b76f709cc86874ffb03f4a38dbbbbfd
|
[
"MIT"
] | 1
|
2021-06-10T20:28:53.000Z
|
2021-06-10T20:28:53.000Z
|
telegram_bot/test/test_main.py
|
diego-hermida/ClimateChangeApp
|
576d49ec5b76f709cc86874ffb03f4a38dbbbbfd
|
[
"MIT"
] | null | null | null |
import datetime
import telegram
from telegram_bot import main as main
from unittest import TestCase, mock
from unittest.mock import Mock
@mock.patch('builtins.print', Mock())
class TestMain(TestCase):
@mock.patch('builtins.input', Mock())
@mock.patch('telegram.Bot')
def test_no_valid_messages(self, mock_bot):
mock_bot.return_value.get_updates.return_value = []
with self.assertRaises(SystemExit) as ex:
main.main()
self.assertEqual(1, ex.exception.code)
self.assertEqual(1, mock_bot.return_value.get_updates.call_count)
@mock.patch('builtins.input', Mock(side_effect=KeyboardInterrupt('Test Ctrl+C')))
@mock.patch('telegram.Bot')
def test_ctrl_c(self, mock_bot):
mock_bot.return_value.get_updates.return_value = []
with self.assertRaises(SystemExit) as ex:
main.main()
self.assertEqual(2, ex.exception.code)
@mock.patch('builtins.input', Mock())
@mock.patch('telegram.Bot')
def test_valid_messages_single_user_bot_not_blocked(self, mock_bot):
message = Mock()
message.message = Mock()
message.message.date = datetime.datetime.now()
message.message.text = '/start'
message.message.chat_id = 318448214
message.message.chat.first_name = 'John'
message.message.chat.last_name = 'Doe'
mock_bot.return_value.get_updates.return_value = [message]
main.main()
self.assertEqual(1, mock_bot.return_value.get_updates.call_count)
self.assertEqual(1, mock_bot.return_value.send_message.call_count)
@mock.patch('builtins.input', Mock())
@mock.patch('telegram.Bot')
def test_valid_messages_single_user_bot_not_blocked_multiple_messages(self, mock_bot):
message = Mock()
message.message = Mock()
message.message.date = datetime.datetime.now()
message.message.text = '/start'
message.message.chat_id = 318448214
message.message.chat.first_name = 'John'
message.message.chat.last_name = 'Doe'
mock_bot.return_value.get_updates.return_value = [message, message, message]
main.main()
self.assertEqual(1, mock_bot.return_value.get_updates.call_count)
self.assertEqual(1, mock_bot.return_value.send_message.call_count)
@mock.patch('builtins.input', Mock())
@mock.patch('telegram.Bot')
def test_valid_messages_single_user_bot_blocked(self, mock_bot):
message = Mock()
message.message = Mock()
message.message.date = datetime.datetime.now()
message.message.text = '/start'
message.message.chat_id = 318448214
message.message.chat.first_name = 'John'
message.message.chat.last_name = 'Doe'
mock_bot.return_value.get_updates.return_value = [message]
mock_bot.return_value.send_message.side_effect = telegram.error.Unauthorized('Test error.')
with self.assertRaises(SystemExit) as ex:
main.main()
self.assertEqual(1, ex.exception.code)
self.assertEqual(1, mock_bot.return_value.get_updates.call_count)
self.assertEqual(1, mock_bot.return_value.send_message.call_count)
@mock.patch('builtins.input', Mock())
@mock.patch('telegram.Bot')
def test_valid_messages_multiple_users_bot_not_blocked(self, mock_bot):
message = Mock()
message.message = Mock()
message.message.date = datetime.datetime.now()
message.message.text = '/start'
message.message.chat_id = 318448214
message.message.chat.first_name = 'John'
message.message.chat.last_name = 'Doe'
message2 = Mock()
message2.message = Mock()
message2.message.date = datetime.datetime.now()
message2.message.text = '/start'
message2.message.chat_id = 492444223
message2.message.chat.first_name = 'Johnny'
message2.message.chat.last_name = 'Appleseed'
mock_bot.return_value.get_updates.return_value = [message, message2]
main.main()
self.assertEqual(1, mock_bot.return_value.get_updates.call_count)
self.assertEqual(2, mock_bot.return_value.send_message.call_count)
@mock.patch('builtins.input', Mock())
@mock.patch('telegram.Bot')
def test_valid_messages_multiple_users_bot_blocked_for_all_users(self, mock_bot):
message = Mock()
message.message = Mock()
message.message.date = datetime.datetime.now()
message.message.text = '/start'
message.message.chat_id = 318448214
message.message.chat.first_name = 'John'
message.message.chat.last_name = 'Doe'
message2 = Mock()
message2.message = Mock()
message2.message.date = datetime.datetime.now()
message2.message.text = '/start'
message2.message.chat_id = 492444223
message2.message.chat.first_name = 'Johnny'
message2.message.chat.last_name = 'Appleseed'
mock_bot.return_value.get_updates.return_value = [message, message2]
mock_bot.return_value.send_message.side_effect = telegram.error.Unauthorized('Test error.')
with self.assertRaises(SystemExit) as ex:
main.main()
self.assertEqual(1, ex.exception.code)
self.assertEqual(1, mock_bot.return_value.get_updates.call_count)
self.assertEqual(2, mock_bot.return_value.send_message.call_count)
@mock.patch('builtins.input', Mock())
@mock.patch('telegram.Bot')
def test_valid_messages_multiple_users_bot_blocked_for_some_users(self, mock_bot):
message = Mock()
message.message = Mock()
message.message.date = datetime.datetime.now()
message.message.text = '/start'
message.message.chat_id = 318448214
message.message.chat.first_name = 'John'
message.message.chat.last_name = 'Doe'
message2 = Mock()
message2.message = Mock()
message2.message.date = datetime.datetime.now()
message2.message.text = '/start'
message2.message.chat_id = 492444223
message2.message.chat.first_name = 'Johnny'
message2.message.chat.last_name = 'Appleseed'
mock_bot.return_value.get_updates.return_value = [message, message2]
mock_bot.return_value.send_message.side_effect = [telegram.error.Unauthorized('Test error.'), None]
main.main()
self.assertEqual(1, mock_bot.return_value.get_updates.call_count)
self.assertEqual(2, mock_bot.return_value.send_message.call_count)
| 45.173611
| 107
| 0.684243
| 809
| 6,505
| 5.273177
| 0.088999
| 0.124707
| 0.073136
| 0.101266
| 0.937178
| 0.937178
| 0.930849
| 0.924754
| 0.924754
| 0.924754
| 0
| 0.023466
| 0.200769
| 6,505
| 144
| 108
| 45.173611
| 0.797076
| 0
| 0
| 0.858209
| 0
| 0
| 0.062558
| 0
| 0
| 0
| 0
| 0
| 0.156716
| 1
| 0.059701
| false
| 0
| 0.037313
| 0
| 0.104478
| 0.007463
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
36362d4a5bc3cd6b5df65d80381ff4daa0fb2403
| 292,091
|
py
|
Python
|
Squeezed/src/krotov/Integrals.py
|
mcditoos/krotov
|
6a70cc791fa21186997ad2ca5a72f6d30574e7a0
|
[
"BSD-3-Clause"
] | null | null | null |
Squeezed/src/krotov/Integrals.py
|
mcditoos/krotov
|
6a70cc791fa21186997ad2ca5a72f6d30574e7a0
|
[
"BSD-3-Clause"
] | null | null | null |
Squeezed/src/krotov/Integrals.py
|
mcditoos/krotov
|
6a70cc791fa21186997ad2ca5a72f6d30574e7a0
|
[
"BSD-3-Clause"
] | 1
|
2021-11-26T17:01:29.000Z
|
2021-11-26T17:01:29.000Z
|
import numpy as np
from IPython.display import display, Markdown
__all__ =['gaussiano_norm','overlap2','coherent_overlap','coherent_update']
def separate(V,row):
return V[row][0],V[row][1],V[row][2],V[row][3]
def coeffscuadraticos11(V,B):
v11,v12,v13,v14=separate(V,0)
v21,v22,v23,v24=separate(V,1)
v31,v32,v33,v34=separate(V,2)
v41,v42,v43,v44=separate(V,3)
b11,b12,b13,b14=separate(B,0)
b21,b22,b23,b24=separate(B,1)
b31,b32,b33,b34=separate(B,2)
b41,b42,b43,b44=separate(B,3)
aux0=(v13*(v24**2))+((0.5*(v14*v34))+((v14*(v22*v34))+((-0.5*(v13*v44))+(v12*(v23*v44)))));
aux1=((-0.25*v13)+((-0.5*(v13*v22))+((0.5*(v12*v23))+aux0)))-(v13*(v22*v44));
aux2=(0.25*(v33*v44))+((0.5*(v11*(v33*v44)))+((0.5*(v22*(v33*v44)))+(v11*(v22*(v33*v44)))));
aux3=(0.5*(v11*(v22*v44)))+((2.*(v12*(v13*(v23*v44))))+((-0.5*((v23**2)*v44))+aux2));
aux4=(0.25*(v11*v44))+((-0.5*((v12**2)*v44))+((-0.5*((v13**2)*v44))+((0.25*(v22*v44))+aux3)));
aux5=(-0.5*(v11*(v34**2)))+(((v12**2)*(v34**2))+((-0.5*(v22*(v34**2)))+((0.125*v44)+aux4)));
aux6=(-2.*(v12*(v13*(v24*v34))))+((v23*(v24*v34))+((2.*(v11*(v23*(v24*v34))))+((-0.25*(v34**2))+aux5)));
aux7=(v13*(v14*v34))+((2.*(v13*(v14*(v22*v34))))+((-2.*(v12*(v14*(v23*v34))))+aux6));
aux8=(0.5*(v11*(v22*v33)))+((2.*(v12*(v14*(v24*v33))))+((-0.5*((v24**2)*v33))+aux7));
aux9=(0.25*(v11*v33))+((-0.5*((v12**2)*v33))+((-0.5*((v14**2)*v33))+((0.25*(v22*v33))+aux8)));
aux10=(-0.25*(v24**2))+((-0.5*(v11*(v24**2)))+(((v13**2)*(v24**2))+((0.125*v33)+aux9)));
aux11=((v14**2)*(v23**2))+((v12*(v14*v24))+((-2.*(v13*(v14*(v23*v24))))+aux10));
aux12=(-0.5*((v14**2)*v22))+((v12*(v13*v23))+((-0.25*(v23**2))+((-0.5*(v11*(v23**2)))+aux11)));
aux13=(-0.25*(v14**2))+((0.125*v22)+((0.25*(v11*v22))+((-0.5*((v13**2)*v22))+aux12)));
aux14=(0.0625+((0.125*v11)+((-0.25*(v12**2))+((-0.25*(v13**2))+aux13))))-((v12**2)*(v33*v44));
aux15=((aux14-(v11*((v23**2)*v44)))-((v13**2)*(v22*v44)))-(v11*(v22*(v34**2)));
aux16=((0.+-1.j)*((aux1-(v12*(v24*v34)))-(v14*(v23*v24))))/((aux15-(v11*((v24**2)*v33)))-((v14**2)*(v22*v33)));
aux17=(-0.5*(v34**2))+((0.25*v44)+((0.5*(v22*v44))+((0.5*(v33*v44))+(v22*(v33*v44)))));
aux18=(-0.5*(v24**2))+((0.25*v33)+((0.5*(v22*v33))+((2.*(v23*(v24*v34)))+aux17)));
aux19=((0.125+((0.25*v22)+((-0.5*(v23**2))+aux18)))-((v23**2)*v44))-(v22*(v34**2));
aux20=(0.25*(v33*v44))+((0.5*(v11*(v33*v44)))+((0.5*(v22*(v33*v44)))+(v11*(v22*(v33*v44)))));
aux21=(0.5*(v11*(v22*v44)))+((2.*(v12*(v13*(v23*v44))))+((-0.5*((v23**2)*v44))+aux20));
aux22=(0.25*(v11*v44))+((-0.5*((v12**2)*v44))+((-0.5*((v13**2)*v44))+((0.25*(v22*v44))+aux21)));
aux23=(-0.5*(v11*(v34**2)))+(((v12**2)*(v34**2))+((-0.5*(v22*(v34**2)))+((0.125*v44)+aux22)));
aux24=(-2.*(v12*(v13*(v24*v34))))+((v23*(v24*v34))+((2.*(v11*(v23*(v24*v34))))+((-0.25*(v34**2))+aux23)));
aux25=(v13*(v14*v34))+((2.*(v13*(v14*(v22*v34))))+((-2.*(v12*(v14*(v23*v34))))+aux24));
aux26=(0.5*(v11*(v22*v33)))+((2.*(v12*(v14*(v24*v33))))+((-0.5*((v24**2)*v33))+aux25));
aux27=(0.25*(v11*v33))+((-0.5*((v12**2)*v33))+((-0.5*((v14**2)*v33))+((0.25*(v22*v33))+aux26)));
aux28=(-0.25*(v24**2))+((-0.5*(v11*(v24**2)))+(((v13**2)*(v24**2))+((0.125*v33)+aux27)));
aux29=((v14**2)*(v23**2))+((v12*(v14*v24))+((-2.*(v13*(v14*(v23*v24))))+aux28));
aux30=(-0.5*((v14**2)*v22))+((v12*(v13*v23))+((-0.25*(v23**2))+((-0.5*(v11*(v23**2)))+aux29)));
aux31=(-0.25*(v14**2))+((0.125*v22)+((0.25*(v11*v22))+((-0.5*((v13**2)*v22))+aux30)));
aux32=(0.0625+((0.125*v11)+((-0.25*(v12**2))+((-0.25*(v13**2))+aux31))))-((v12**2)*(v33*v44));
aux33=((aux32-(v11*((v23**2)*v44)))-((v13**2)*(v22*v44)))-(v11*(v22*(v34**2)));
aux34=(aux19-((v24**2)*v33))/((aux33-(v11*((v24**2)*v33)))-((v14**2)*(v22*v33)));
aux35=(b13*(b24**2))+((0.5*(b14*b34))+((b14*(b22*b34))+((-0.5*(b13*b44))+(b12*(b23*b44)))));
aux36=((-0.25*b13)+((-0.5*(b13*b22))+((0.5*(b12*b23))+aux35)))-(b13*(b22*b44));
aux37=(0.25*(b33*b44))+((0.5*(b11*(b33*b44)))+((0.5*(b22*(b33*b44)))+(b11*(b22*(b33*b44)))));
aux38=(0.5*(b11*(b22*b44)))+((2.*(b12*(b13*(b23*b44))))+((-0.5*((b23**2)*b44))+aux37));
aux39=(0.25*(b11*b44))+((-0.5*((b12**2)*b44))+((-0.5*((b13**2)*b44))+((0.25*(b22*b44))+aux38)));
aux40=(-0.5*(b11*(b34**2)))+(((b12**2)*(b34**2))+((-0.5*(b22*(b34**2)))+((0.125*b44)+aux39)));
aux41=(-2.*(b12*(b13*(b24*b34))))+((b23*(b24*b34))+((2.*(b11*(b23*(b24*b34))))+((-0.25*(b34**2))+aux40)));
aux42=(b13*(b14*b34))+((2.*(b13*(b14*(b22*b34))))+((-2.*(b12*(b14*(b23*b34))))+aux41));
aux43=(0.5*(b11*(b22*b33)))+((2.*(b12*(b14*(b24*b33))))+((-0.5*((b24**2)*b33))+aux42));
aux44=(0.25*(b11*b33))+((-0.5*((b12**2)*b33))+((-0.5*((b14**2)*b33))+((0.25*(b22*b33))+aux43)));
aux45=(-0.25*(b24**2))+((-0.5*(b11*(b24**2)))+(((b13**2)*(b24**2))+((0.125*b33)+aux44)));
aux46=((b14**2)*(b23**2))+((b12*(b14*b24))+((-2.*(b13*(b14*(b23*b24))))+aux45));
aux47=(-0.5*((b14**2)*b22))+((b12*(b13*b23))+((-0.25*(b23**2))+((-0.5*(b11*(b23**2)))+aux46)));
aux48=(-0.25*(b14**2))+((0.125*b22)+((0.25*(b11*b22))+((-0.5*((b13**2)*b22))+aux47)));
aux49=(0.0625+((0.125*b11)+((-0.25*(b12**2))+((-0.25*(b13**2))+aux48))))-((b12**2)*(b33*b44));
aux50=((aux49-(b11*((b23**2)*b44)))-((b13**2)*(b22*b44)))-(b11*(b22*(b34**2)));
aux51=((0.+1.j)*((aux36-(b12*(b24*b34)))-(b14*(b23*b24))))/((aux50-(b11*((b24**2)*b33)))-((b14**2)*(b22*b33)));
aux52=(-0.5*(b34**2))+((0.25*b44)+((0.5*(b22*b44))+((0.5*(b33*b44))+(b22*(b33*b44)))));
aux53=(-0.5*(b24**2))+((0.25*b33)+((0.5*(b22*b33))+((2.*(b23*(b24*b34)))+aux52)));
aux54=((0.125+((0.25*b22)+((-0.5*(b23**2))+aux53)))-((b23**2)*b44))-(b22*(b34**2));
aux55=(0.25*(b33*b44))+((0.5*(b11*(b33*b44)))+((0.5*(b22*(b33*b44)))+(b11*(b22*(b33*b44)))));
aux56=(0.5*(b11*(b22*b44)))+((2.*(b12*(b13*(b23*b44))))+((-0.5*((b23**2)*b44))+aux55));
aux57=(0.25*(b11*b44))+((-0.5*((b12**2)*b44))+((-0.5*((b13**2)*b44))+((0.25*(b22*b44))+aux56)));
aux58=(-0.5*(b11*(b34**2)))+(((b12**2)*(b34**2))+((-0.5*(b22*(b34**2)))+((0.125*b44)+aux57)));
aux59=(-2.*(b12*(b13*(b24*b34))))+((b23*(b24*b34))+((2.*(b11*(b23*(b24*b34))))+((-0.25*(b34**2))+aux58)));
aux60=(b13*(b14*b34))+((2.*(b13*(b14*(b22*b34))))+((-2.*(b12*(b14*(b23*b34))))+aux59));
aux61=(0.5*(b11*(b22*b33)))+((2.*(b12*(b14*(b24*b33))))+((-0.5*((b24**2)*b33))+aux60));
aux62=(0.25*(b11*b33))+((-0.5*((b12**2)*b33))+((-0.5*((b14**2)*b33))+((0.25*(b22*b33))+aux61)));
aux63=(-0.25*(b24**2))+((-0.5*(b11*(b24**2)))+(((b13**2)*(b24**2))+((0.125*b33)+aux62)));
aux64=((b14**2)*(b23**2))+((b12*(b14*b24))+((-2.*(b13*(b14*(b23*b24))))+aux63));
aux65=(-0.5*((b14**2)*b22))+((b12*(b13*b23))+((-0.25*(b23**2))+((-0.5*(b11*(b23**2)))+aux64)));
aux66=(-0.25*(b14**2))+((0.125*b22)+((0.25*(b11*b22))+((-0.5*((b13**2)*b22))+aux65)));
aux67=(0.0625+((0.125*b11)+((-0.25*(b12**2))+((-0.25*(b13**2))+aux66))))-((b12**2)*(b33*b44));
aux68=((aux67-(b11*((b23**2)*b44)))-((b13**2)*(b22*b44)))-(b11*(b22*(b34**2)));
aux69=(aux54-((b24**2)*b33))/((aux68-(b11*((b24**2)*b33)))-((b14**2)*(b22*b33)));
output=(0.25*(aux16-aux34))+(-0.25*(np.conjugate((aux51+aux69))));
return output
def coeffscuadraticos12(V,B):
v11,v12,v13,v14=separate(V,0)
v21,v22,v23,v24=separate(V,1)
v31,v32,v33,v34=separate(V,2)
v41,v42,v43,v44=separate(V,3)
b11,b12,b13,b14=separate(B,0)
b21,b22,b23,b24=separate(B,1)
b31,b32,b33,b34=separate(B,2)
b41,b42,b43,b44=separate(B,3)
aux0=(0.5*(b12*b24))+((-0.5*(b14*b33))+((b12*(b24*b33))+((0.5*(b13*b34))+(b13*(b22*b34)))));
aux1=(((-0.25*b14)+((-0.5*(b14*b22))+((b14*(b23**2))+aux0)))-(b12*(b23*b34)))-(b14*(b22*b33));
aux2=(0.25*(b33*b44))+((0.5*(b11*(b33*b44)))+((0.5*(b22*(b33*b44)))+(b11*(b22*(b33*b44)))));
aux3=(0.5*(b11*(b22*b44)))+((2.*(b12*(b13*(b23*b44))))+((-0.5*((b23**2)*b44))+aux2));
aux4=(0.25*(b11*b44))+((-0.5*((b12**2)*b44))+((-0.5*((b13**2)*b44))+((0.25*(b22*b44))+aux3)));
aux5=(-0.5*(b11*(b34**2)))+(((b12**2)*(b34**2))+((-0.5*(b22*(b34**2)))+((0.125*b44)+aux4)));
aux6=(-2.*(b12*(b13*(b24*b34))))+((b23*(b24*b34))+((2.*(b11*(b23*(b24*b34))))+((-0.25*(b34**2))+aux5)));
aux7=(b13*(b14*b34))+((2.*(b13*(b14*(b22*b34))))+((-2.*(b12*(b14*(b23*b34))))+aux6));
aux8=(0.5*(b11*(b22*b33)))+((2.*(b12*(b14*(b24*b33))))+((-0.5*((b24**2)*b33))+aux7));
aux9=(0.25*(b11*b33))+((-0.5*((b12**2)*b33))+((-0.5*((b14**2)*b33))+((0.25*(b22*b33))+aux8)));
aux10=(-0.25*(b24**2))+((-0.5*(b11*(b24**2)))+(((b13**2)*(b24**2))+((0.125*b33)+aux9)));
aux11=((b14**2)*(b23**2))+((b12*(b14*b24))+((-2.*(b13*(b14*(b23*b24))))+aux10));
aux12=(-0.5*((b14**2)*b22))+((b12*(b13*b23))+((-0.25*(b23**2))+((-0.5*(b11*(b23**2)))+aux11)));
aux13=(-0.25*(b14**2))+((0.125*b22)+((0.25*(b11*b22))+((-0.5*((b13**2)*b22))+aux12)));
aux14=(0.0625+((0.125*b11)+((-0.25*(b12**2))+((-0.25*(b13**2))+aux13))))-((b12**2)*(b33*b44));
aux15=((aux14-(b11*((b23**2)*b44)))-((b13**2)*(b22*b44)))-(b11*(b22*(b34**2)));
aux16=(aux1-(b13*(b23*b24)))/((aux15-(b11*((b24**2)*b33)))-((b14**2)*(b22*b33)));
aux17=((b14**2)*b23)+((0.5*(b24*b34))+((b11*(b24*b34))+((b12*(b13*b44))+(-0.5*(b23*b44)))));
aux18=((0.5*(b12*b13))+((-0.25*b23)+((-0.5*(b11*b23))+aux17)))-(b11*(b23*b44));
aux19=(0.25*(b33*b44))+((0.5*(b11*(b33*b44)))+((0.5*(b22*(b33*b44)))+(b11*(b22*(b33*b44)))));
aux20=(0.5*(b11*(b22*b44)))+((2.*(b12*(b13*(b23*b44))))+((-0.5*((b23**2)*b44))+aux19));
aux21=(0.25*(b11*b44))+((-0.5*((b12**2)*b44))+((-0.5*((b13**2)*b44))+((0.25*(b22*b44))+aux20)));
aux22=(-0.5*(b11*(b34**2)))+(((b12**2)*(b34**2))+((-0.5*(b22*(b34**2)))+((0.125*b44)+aux21)));
aux23=(-2.*(b12*(b13*(b24*b34))))+((b23*(b24*b34))+((2.*(b11*(b23*(b24*b34))))+((-0.25*(b34**2))+aux22)));
aux24=(b13*(b14*b34))+((2.*(b13*(b14*(b22*b34))))+((-2.*(b12*(b14*(b23*b34))))+aux23));
aux25=(0.5*(b11*(b22*b33)))+((2.*(b12*(b14*(b24*b33))))+((-0.5*((b24**2)*b33))+aux24));
aux26=(0.25*(b11*b33))+((-0.5*((b12**2)*b33))+((-0.5*((b14**2)*b33))+((0.25*(b22*b33))+aux25)));
aux27=(-0.25*(b24**2))+((-0.5*(b11*(b24**2)))+(((b13**2)*(b24**2))+((0.125*b33)+aux26)));
aux28=((b14**2)*(b23**2))+((b12*(b14*b24))+((-2.*(b13*(b14*(b23*b24))))+aux27));
aux29=(-0.5*((b14**2)*b22))+((b12*(b13*b23))+((-0.25*(b23**2))+((-0.5*(b11*(b23**2)))+aux28)));
aux30=(-0.25*(b14**2))+((0.125*b22)+((0.25*(b11*b22))+((-0.5*((b13**2)*b22))+aux29)));
aux31=(0.0625+((0.125*b11)+((-0.25*(b12**2))+((-0.25*(b13**2))+aux30))))-((b12**2)*(b33*b44));
aux32=((aux31-(b11*((b23**2)*b44)))-((b13**2)*(b22*b44)))-(b11*(b22*(b34**2)));
aux33=((aux18-(b12*(b14*b34)))-(b13*(b14*b24)))/((aux32-(b11*((b24**2)*b33)))-((b14**2)*(b22*b33)));
aux34=(-0.5*(b12*b33))+((b14*(b24*b33))+((b12*(b34**2))+((-0.5*(b12*b44))+(b13*(b23*b44)))));
aux35=((-0.25*b12)+((0.5*(b13*b23))+((0.5*(b14*b24))+aux34)))-(b12*(b33*b44));
aux36=(0.25*(b33*b44))+((0.5*(b11*(b33*b44)))+((0.5*(b22*(b33*b44)))+(b11*(b22*(b33*b44)))));
aux37=(0.5*(b11*(b22*b44)))+((2.*(b12*(b13*(b23*b44))))+((-0.5*((b23**2)*b44))+aux36));
aux38=(0.25*(b11*b44))+((-0.5*((b12**2)*b44))+((-0.5*((b13**2)*b44))+((0.25*(b22*b44))+aux37)));
aux39=(-0.5*(b11*(b34**2)))+(((b12**2)*(b34**2))+((-0.5*(b22*(b34**2)))+((0.125*b44)+aux38)));
aux40=(-2.*(b12*(b13*(b24*b34))))+((b23*(b24*b34))+((2.*(b11*(b23*(b24*b34))))+((-0.25*(b34**2))+aux39)));
aux41=(b13*(b14*b34))+((2.*(b13*(b14*(b22*b34))))+((-2.*(b12*(b14*(b23*b34))))+aux40));
aux42=(0.5*(b11*(b22*b33)))+((2.*(b12*(b14*(b24*b33))))+((-0.5*((b24**2)*b33))+aux41));
aux43=(0.25*(b11*b33))+((-0.5*((b12**2)*b33))+((-0.5*((b14**2)*b33))+((0.25*(b22*b33))+aux42)));
aux44=(-0.25*(b24**2))+((-0.5*(b11*(b24**2)))+(((b13**2)*(b24**2))+((0.125*b33)+aux43)));
aux45=((b14**2)*(b23**2))+((b12*(b14*b24))+((-2.*(b13*(b14*(b23*b24))))+aux44));
aux46=(-0.5*((b14**2)*b22))+((b12*(b13*b23))+((-0.25*(b23**2))+((-0.5*(b11*(b23**2)))+aux45)));
aux47=(-0.25*(b14**2))+((0.125*b22)+((0.25*(b11*b22))+((-0.5*((b13**2)*b22))+aux46)));
aux48=(0.0625+((0.125*b11)+((-0.25*(b12**2))+((-0.25*(b13**2))+aux47))))-((b12**2)*(b33*b44));
aux49=((aux48-(b11*((b23**2)*b44)))-((b13**2)*(b22*b44)))-(b11*(b22*(b34**2)));
aux50=((aux35-(b13*(b24*b34)))-(b14*(b23*b34)))/((aux49-(b11*((b24**2)*b33)))-((b14**2)*(b22*b33)));
aux51=(0.5*(v12*v24))+((-0.5*(v14*v33))+((v12*(v24*v33))+((0.5*(v13*v34))+(v13*(v22*v34)))));
aux52=((-0.25*v14)+((-0.5*(v14*v22))+((v14*(v23**2))+aux51)))-(v12*(v23*v34));
aux53=(0.25*(v33*v44))+((0.5*(v11*(v33*v44)))+((0.5*(v22*(v33*v44)))+(v11*(v22*(v33*v44)))));
aux54=(0.5*(v11*(v22*v44)))+((2.*(v12*(v13*(v23*v44))))+((-0.5*((v23**2)*v44))+aux53));
aux55=(0.25*(v11*v44))+((-0.5*((v12**2)*v44))+((-0.5*((v13**2)*v44))+((0.25*(v22*v44))+aux54)));
aux56=(-0.5*(v11*(v34**2)))+(((v12**2)*(v34**2))+((-0.5*(v22*(v34**2)))+((0.125*v44)+aux55)));
aux57=(-2.*(v12*(v13*(v24*v34))))+((v23*(v24*v34))+((2.*(v11*(v23*(v24*v34))))+((-0.25*(v34**2))+aux56)));
aux58=(v13*(v14*v34))+((2.*(v13*(v14*(v22*v34))))+((-2.*(v12*(v14*(v23*v34))))+aux57));
aux59=(0.5*(v11*(v22*v33)))+((2.*(v12*(v14*(v24*v33))))+((-0.5*((v24**2)*v33))+aux58));
aux60=(0.25*(v11*v33))+((-0.5*((v12**2)*v33))+((-0.5*((v14**2)*v33))+((0.25*(v22*v33))+aux59)));
aux61=(-0.25*(v24**2))+((-0.5*(v11*(v24**2)))+(((v13**2)*(v24**2))+((0.125*v33)+aux60)));
aux62=((v14**2)*(v23**2))+((v12*(v14*v24))+((-2.*(v13*(v14*(v23*v24))))+aux61));
aux63=(-0.5*((v14**2)*v22))+((v12*(v13*v23))+((-0.25*(v23**2))+((-0.5*(v11*(v23**2)))+aux62)));
aux64=(-0.25*(v14**2))+((0.125*v22)+((0.25*(v11*v22))+((-0.5*((v13**2)*v22))+aux63)));
aux65=(0.0625+((0.125*v11)+((-0.25*(v12**2))+((-0.25*(v13**2))+aux64))))-((v12**2)*(v33*v44));
aux66=((aux65-(v11*((v23**2)*v44)))-((v13**2)*(v22*v44)))-(v11*(v22*(v34**2)));
aux67=((aux52-(v14*(v22*v33)))-(v13*(v23*v24)))/((aux66-(v11*((v24**2)*v33)))-((v14**2)*(v22*v33)));
aux68=((v14**2)*v23)+((0.5*(v24*v34))+((v11*(v24*v34))+((v12*(v13*v44))+(-0.5*(v23*v44)))));
aux69=((0.5*(v12*v13))+((-0.25*v23)+((-0.5*(v11*v23))+aux68)))-(v11*(v23*v44));
aux70=(0.25*(v33*v44))+((0.5*(v11*(v33*v44)))+((0.5*(v22*(v33*v44)))+(v11*(v22*(v33*v44)))));
aux71=(0.5*(v11*(v22*v44)))+((2.*(v12*(v13*(v23*v44))))+((-0.5*((v23**2)*v44))+aux70));
aux72=(0.25*(v11*v44))+((-0.5*((v12**2)*v44))+((-0.5*((v13**2)*v44))+((0.25*(v22*v44))+aux71)));
aux73=(-0.5*(v11*(v34**2)))+(((v12**2)*(v34**2))+((-0.5*(v22*(v34**2)))+((0.125*v44)+aux72)));
aux74=(-2.*(v12*(v13*(v24*v34))))+((v23*(v24*v34))+((2.*(v11*(v23*(v24*v34))))+((-0.25*(v34**2))+aux73)));
aux75=(v13*(v14*v34))+((2.*(v13*(v14*(v22*v34))))+((-2.*(v12*(v14*(v23*v34))))+aux74));
aux76=(0.5*(v11*(v22*v33)))+((2.*(v12*(v14*(v24*v33))))+((-0.5*((v24**2)*v33))+aux75));
aux77=(0.25*(v11*v33))+((-0.5*((v12**2)*v33))+((-0.5*((v14**2)*v33))+((0.25*(v22*v33))+aux76)));
aux78=(-0.25*(v24**2))+((-0.5*(v11*(v24**2)))+(((v13**2)*(v24**2))+((0.125*v33)+aux77)));
aux79=((v14**2)*(v23**2))+((v12*(v14*v24))+((-2.*(v13*(v14*(v23*v24))))+aux78));
aux80=(-0.5*((v14**2)*v22))+((v12*(v13*v23))+((-0.25*(v23**2))+((-0.5*(v11*(v23**2)))+aux79)));
aux81=(-0.25*(v14**2))+((0.125*v22)+((0.25*(v11*v22))+((-0.5*((v13**2)*v22))+aux80)));
aux82=(0.0625+((0.125*v11)+((-0.25*(v12**2))+((-0.25*(v13**2))+aux81))))-((v12**2)*(v33*v44));
aux83=((aux82-(v11*((v23**2)*v44)))-((v13**2)*(v22*v44)))-(v11*(v22*(v34**2)));
aux84=((aux69-(v12*(v14*v34)))-(v13*(v14*v24)))/((aux83-(v11*((v24**2)*v33)))-((v14**2)*(v22*v33)));
aux85=(-0.5*(v12*v33))+((v14*(v24*v33))+((v12*(v34**2))+((-0.5*(v12*v44))+(v13*(v23*v44)))));
aux86=((-0.25*v12)+((0.5*(v13*v23))+((0.5*(v14*v24))+aux85)))-(v12*(v33*v44));
aux87=(0.25*(v33*v44))+((0.5*(v11*(v33*v44)))+((0.5*(v22*(v33*v44)))+(v11*(v22*(v33*v44)))));
aux88=(0.5*(v11*(v22*v44)))+((2.*(v12*(v13*(v23*v44))))+((-0.5*((v23**2)*v44))+aux87));
aux89=(0.25*(v11*v44))+((-0.5*((v12**2)*v44))+((-0.5*((v13**2)*v44))+((0.25*(v22*v44))+aux88)));
aux90=(-0.5*(v11*(v34**2)))+(((v12**2)*(v34**2))+((-0.5*(v22*(v34**2)))+((0.125*v44)+aux89)));
aux91=(-2.*(v12*(v13*(v24*v34))))+((v23*(v24*v34))+((2.*(v11*(v23*(v24*v34))))+((-0.25*(v34**2))+aux90)));
aux92=(v13*(v14*v34))+((2.*(v13*(v14*(v22*v34))))+((-2.*(v12*(v14*(v23*v34))))+aux91));
aux93=(0.5*(v11*(v22*v33)))+((2.*(v12*(v14*(v24*v33))))+((-0.5*((v24**2)*v33))+aux92));
aux94=(0.25*(v11*v33))+((-0.5*((v12**2)*v33))+((-0.5*((v14**2)*v33))+((0.25*(v22*v33))+aux93)));
aux95=(-0.25*(v24**2))+((-0.5*(v11*(v24**2)))+(((v13**2)*(v24**2))+((0.125*v33)+aux94)));
aux96=((v14**2)*(v23**2))+((v12*(v14*v24))+((-2.*(v13*(v14*(v23*v24))))+aux95));
aux97=(-0.5*((v14**2)*v22))+((v12*(v13*v23))+((-0.25*(v23**2))+((-0.5*(v11*(v23**2)))+aux96)));
aux98=(-0.25*(v14**2))+((0.125*v22)+((0.25*(v11*v22))+((-0.5*((v13**2)*v22))+aux97)));
aux99=(0.0625+((0.125*v11)+((-0.25*(v12**2))+((-0.25*(v13**2))+aux98))))-((v12**2)*(v33*v44));
aux100=((aux99-(v11*((v23**2)*v44)))-((v13**2)*(v22*v44)))-(v11*(v22*(v34**2)));
aux101=((aux86-(v13*(v24*v34)))-(v14*(v23*v34)))/((aux100-(v11*((v24**2)*v33)))-((v14**2)*(v22*v33)));
output=(0.5*(((0.+0.5j)*(aux16+aux33))-aux50))+(0.5*(((0.+-0.5j)*(aux67+aux84))-aux101));
return output
def coeffscuadraticos13(V,B):
v11,v12,v13,v14=separate(V,0)
v21,v22,v23,v24=separate(V,1)
v31,v32,v33,v34=separate(V,2)
v41,v42,v43,v44=separate(V,3)
b11,b12,b13,b14=separate(B,0)
b21,b22,b23,b24=separate(B,1)
b31,b32,b33,b34=separate(B,2)
b41,b42,b43,b44=separate(B,3)
aux0=(-0.5*(b34**2))+((0.25*b44)+((0.5*(b22*b44))+((0.5*(b33*b44))+(b22*(b33*b44)))));
aux1=(-0.5*(b24**2))+((0.25*b33)+((0.5*(b22*b33))+((2.*(b23*(b24*b34)))+aux0)));
aux2=((0.125+((0.25*b22)+((-0.5*(b23**2))+aux1)))-((b23**2)*b44))-(b22*(b34**2));
aux3=(0.25*(b33*b44))+((0.5*(b11*(b33*b44)))+((0.5*(b22*(b33*b44)))+(b11*(b22*(b33*b44)))));
aux4=(0.5*(b11*(b22*b44)))+((2.*(b12*(b13*(b23*b44))))+((-0.5*((b23**2)*b44))+aux3));
aux5=(0.25*(b11*b44))+((-0.5*((b12**2)*b44))+((-0.5*((b13**2)*b44))+((0.25*(b22*b44))+aux4)));
aux6=(-0.5*(b11*(b34**2)))+(((b12**2)*(b34**2))+((-0.5*(b22*(b34**2)))+((0.125*b44)+aux5)));
aux7=(-2.*(b12*(b13*(b24*b34))))+((b23*(b24*b34))+((2.*(b11*(b23*(b24*b34))))+((-0.25*(b34**2))+aux6)));
aux8=(b13*(b14*b34))+((2.*(b13*(b14*(b22*b34))))+((-2.*(b12*(b14*(b23*b34))))+aux7));
aux9=(0.5*(b11*(b22*b33)))+((2.*(b12*(b14*(b24*b33))))+((-0.5*((b24**2)*b33))+aux8));
aux10=(0.25*(b11*b33))+((-0.5*((b12**2)*b33))+((-0.5*((b14**2)*b33))+((0.25*(b22*b33))+aux9)));
aux11=(-0.25*(b24**2))+((-0.5*(b11*(b24**2)))+(((b13**2)*(b24**2))+((0.125*b33)+aux10)));
aux12=((b14**2)*(b23**2))+((b12*(b14*b24))+((-2.*(b13*(b14*(b23*b24))))+aux11));
aux13=(-0.5*((b14**2)*b22))+((b12*(b13*b23))+((-0.25*(b23**2))+((-0.5*(b11*(b23**2)))+aux12)));
aux14=(-0.25*(b14**2))+((0.125*b22)+((0.25*(b11*b22))+((-0.5*((b13**2)*b22))+aux13)));
aux15=(0.0625+((0.125*b11)+((-0.25*(b12**2))+((-0.25*(b13**2))+aux14))))-((b12**2)*(b33*b44));
aux16=((aux15-(b11*((b23**2)*b44)))-((b13**2)*(b22*b44)))-(b11*(b22*(b34**2)));
aux17=(aux2-((b24**2)*b33))/((aux16-(b11*((b24**2)*b33)))-((b14**2)*(b22*b33)));
aux18=(-0.5*(b24**2))+((0.25*b44)+((0.5*(b11*b44))+((0.5*(b22*b44))+(b11*(b22*b44)))));
aux19=(-0.5*(b14**2))+((0.25*b22)+((0.5*(b11*b22))+((2.*(b12*(b14*b24)))+aux18)));
aux20=((0.125+((0.25*b11)+((-0.5*(b12**2))+aux19)))-((b12**2)*b44))-(b11*(b24**2));
aux21=(0.25*(b33*b44))+((0.5*(b11*(b33*b44)))+((0.5*(b22*(b33*b44)))+(b11*(b22*(b33*b44)))));
aux22=(0.5*(b11*(b22*b44)))+((2.*(b12*(b13*(b23*b44))))+((-0.5*((b23**2)*b44))+aux21));
aux23=(0.25*(b11*b44))+((-0.5*((b12**2)*b44))+((-0.5*((b13**2)*b44))+((0.25*(b22*b44))+aux22)));
aux24=(-0.5*(b11*(b34**2)))+(((b12**2)*(b34**2))+((-0.5*(b22*(b34**2)))+((0.125*b44)+aux23)));
aux25=(-2.*(b12*(b13*(b24*b34))))+((b23*(b24*b34))+((2.*(b11*(b23*(b24*b34))))+((-0.25*(b34**2))+aux24)));
aux26=(b13*(b14*b34))+((2.*(b13*(b14*(b22*b34))))+((-2.*(b12*(b14*(b23*b34))))+aux25));
aux27=(0.5*(b11*(b22*b33)))+((2.*(b12*(b14*(b24*b33))))+((-0.5*((b24**2)*b33))+aux26));
aux28=(0.25*(b11*b33))+((-0.5*((b12**2)*b33))+((-0.5*((b14**2)*b33))+((0.25*(b22*b33))+aux27)));
aux29=(-0.25*(b24**2))+((-0.5*(b11*(b24**2)))+(((b13**2)*(b24**2))+((0.125*b33)+aux28)));
aux30=((b14**2)*(b23**2))+((b12*(b14*b24))+((-2.*(b13*(b14*(b23*b24))))+aux29));
aux31=(-0.5*((b14**2)*b22))+((b12*(b13*b23))+((-0.25*(b23**2))+((-0.5*(b11*(b23**2)))+aux30)));
aux32=(-0.25*(b14**2))+((0.125*b22)+((0.25*(b11*b22))+((-0.5*((b13**2)*b22))+aux31)));
aux33=(0.0625+((0.125*b11)+((-0.25*(b12**2))+((-0.25*(b13**2))+aux32))))-((b12**2)*(b33*b44));
aux34=((aux33-(b11*((b23**2)*b44)))-((b13**2)*(b22*b44)))-(b11*(b22*(b34**2)));
aux35=(aux20-((b14**2)*b22))/((aux34-(b11*((b24**2)*b33)))-((b14**2)*(b22*b33)));
aux36=(b13*(b24**2))+((0.5*(b14*b34))+((b14*(b22*b34))+((-0.5*(b13*b44))+(b12*(b23*b44)))));
aux37=((-0.25*b13)+((-0.5*(b13*b22))+((0.5*(b12*b23))+aux36)))-(b13*(b22*b44));
aux38=(0.25*(b33*b44))+((0.5*(b11*(b33*b44)))+((0.5*(b22*(b33*b44)))+(b11*(b22*(b33*b44)))));
aux39=(0.5*(b11*(b22*b44)))+((2.*(b12*(b13*(b23*b44))))+((-0.5*((b23**2)*b44))+aux38));
aux40=(0.25*(b11*b44))+((-0.5*((b12**2)*b44))+((-0.5*((b13**2)*b44))+((0.25*(b22*b44))+aux39)));
aux41=(-0.5*(b11*(b34**2)))+(((b12**2)*(b34**2))+((-0.5*(b22*(b34**2)))+((0.125*b44)+aux40)));
aux42=(-2.*(b12*(b13*(b24*b34))))+((b23*(b24*b34))+((2.*(b11*(b23*(b24*b34))))+((-0.25*(b34**2))+aux41)));
aux43=(b13*(b14*b34))+((2.*(b13*(b14*(b22*b34))))+((-2.*(b12*(b14*(b23*b34))))+aux42));
aux44=(0.5*(b11*(b22*b33)))+((2.*(b12*(b14*(b24*b33))))+((-0.5*((b24**2)*b33))+aux43));
aux45=(0.25*(b11*b33))+((-0.5*((b12**2)*b33))+((-0.5*((b14**2)*b33))+((0.25*(b22*b33))+aux44)));
aux46=(-0.25*(b24**2))+((-0.5*(b11*(b24**2)))+(((b13**2)*(b24**2))+((0.125*b33)+aux45)));
aux47=((b14**2)*(b23**2))+((b12*(b14*b24))+((-2.*(b13*(b14*(b23*b24))))+aux46));
aux48=(-0.5*((b14**2)*b22))+((b12*(b13*b23))+((-0.25*(b23**2))+((-0.5*(b11*(b23**2)))+aux47)));
aux49=(-0.25*(b14**2))+((0.125*b22)+((0.25*(b11*b22))+((-0.5*((b13**2)*b22))+aux48)));
aux50=(0.0625+((0.125*b11)+((-0.25*(b12**2))+((-0.25*(b13**2))+aux49))))-((b12**2)*(b33*b44));
aux51=((aux50-(b11*((b23**2)*b44)))-((b13**2)*(b22*b44)))-(b11*(b22*(b34**2)));
aux52=((aux37-(b12*(b24*b34)))-(b14*(b23*b24)))/((aux51-(b11*((b24**2)*b33)))-((b14**2)*(b22*b33)));
aux53=(-0.5*(v34**2))+((0.25*v44)+((0.5*(v22*v44))+((0.5*(v33*v44))+(v22*(v33*v44)))));
aux54=(-0.5*(v24**2))+((0.25*v33)+((0.5*(v22*v33))+((2.*(v23*(v24*v34)))+aux53)));
aux55=((0.125+((0.25*v22)+((-0.5*(v23**2))+aux54)))-((v23**2)*v44))-(v22*(v34**2));
aux56=(0.25*(v33*v44))+((0.5*(v11*(v33*v44)))+((0.5*(v22*(v33*v44)))+(v11*(v22*(v33*v44)))));
aux57=(0.5*(v11*(v22*v44)))+((2.*(v12*(v13*(v23*v44))))+((-0.5*((v23**2)*v44))+aux56));
aux58=(0.25*(v11*v44))+((-0.5*((v12**2)*v44))+((-0.5*((v13**2)*v44))+((0.25*(v22*v44))+aux57)));
aux59=(-0.5*(v11*(v34**2)))+(((v12**2)*(v34**2))+((-0.5*(v22*(v34**2)))+((0.125*v44)+aux58)));
aux60=(-2.*(v12*(v13*(v24*v34))))+((v23*(v24*v34))+((2.*(v11*(v23*(v24*v34))))+((-0.25*(v34**2))+aux59)));
aux61=(v13*(v14*v34))+((2.*(v13*(v14*(v22*v34))))+((-2.*(v12*(v14*(v23*v34))))+aux60));
aux62=(0.5*(v11*(v22*v33)))+((2.*(v12*(v14*(v24*v33))))+((-0.5*((v24**2)*v33))+aux61));
aux63=(0.25*(v11*v33))+((-0.5*((v12**2)*v33))+((-0.5*((v14**2)*v33))+((0.25*(v22*v33))+aux62)));
aux64=(-0.25*(v24**2))+((-0.5*(v11*(v24**2)))+(((v13**2)*(v24**2))+((0.125*v33)+aux63)));
aux65=((v14**2)*(v23**2))+((v12*(v14*v24))+((-2.*(v13*(v14*(v23*v24))))+aux64));
aux66=(-0.5*((v14**2)*v22))+((v12*(v13*v23))+((-0.25*(v23**2))+((-0.5*(v11*(v23**2)))+aux65)));
aux67=(-0.25*(v14**2))+((0.125*v22)+((0.25*(v11*v22))+((-0.5*((v13**2)*v22))+aux66)));
aux68=(0.0625+((0.125*v11)+((-0.25*(v12**2))+((-0.25*(v13**2))+aux67))))-((v12**2)*(v33*v44));
aux69=((aux68-(v11*((v23**2)*v44)))-((v13**2)*(v22*v44)))-(v11*(v22*(v34**2)));
aux70=(aux55-((v24**2)*v33))/((aux69-(v11*((v24**2)*v33)))-((v14**2)*(v22*v33)));
aux71=(-0.5*(v24**2))+((0.25*v44)+((0.5*(v11*v44))+((0.5*(v22*v44))+(v11*(v22*v44)))));
aux72=(-0.5*(v14**2))+((0.25*v22)+((0.5*(v11*v22))+((2.*(v12*(v14*v24)))+aux71)));
aux73=((0.125+((0.25*v11)+((-0.5*(v12**2))+aux72)))-((v12**2)*v44))-(v11*(v24**2));
aux74=(0.25*(v33*v44))+((0.5*(v11*(v33*v44)))+((0.5*(v22*(v33*v44)))+(v11*(v22*(v33*v44)))));
aux75=(0.5*(v11*(v22*v44)))+((2.*(v12*(v13*(v23*v44))))+((-0.5*((v23**2)*v44))+aux74));
aux76=(0.25*(v11*v44))+((-0.5*((v12**2)*v44))+((-0.5*((v13**2)*v44))+((0.25*(v22*v44))+aux75)));
aux77=(-0.5*(v11*(v34**2)))+(((v12**2)*(v34**2))+((-0.5*(v22*(v34**2)))+((0.125*v44)+aux76)));
aux78=(-2.*(v12*(v13*(v24*v34))))+((v23*(v24*v34))+((2.*(v11*(v23*(v24*v34))))+((-0.25*(v34**2))+aux77)));
aux79=(v13*(v14*v34))+((2.*(v13*(v14*(v22*v34))))+((-2.*(v12*(v14*(v23*v34))))+aux78));
aux80=(0.5*(v11*(v22*v33)))+((2.*(v12*(v14*(v24*v33))))+((-0.5*((v24**2)*v33))+aux79));
aux81=(0.25*(v11*v33))+((-0.5*((v12**2)*v33))+((-0.5*((v14**2)*v33))+((0.25*(v22*v33))+aux80)));
aux82=(-0.25*(v24**2))+((-0.5*(v11*(v24**2)))+(((v13**2)*(v24**2))+((0.125*v33)+aux81)));
aux83=((v14**2)*(v23**2))+((v12*(v14*v24))+((-2.*(v13*(v14*(v23*v24))))+aux82));
aux84=(-0.5*((v14**2)*v22))+((v12*(v13*v23))+((-0.25*(v23**2))+((-0.5*(v11*(v23**2)))+aux83)));
aux85=(-0.25*(v14**2))+((0.125*v22)+((0.25*(v11*v22))+((-0.5*((v13**2)*v22))+aux84)));
aux86=(0.0625+((0.125*v11)+((-0.25*(v12**2))+((-0.25*(v13**2))+aux85))))-((v12**2)*(v33*v44));
aux87=((aux86-(v11*((v23**2)*v44)))-((v13**2)*(v22*v44)))-(v11*(v22*(v34**2)));
aux88=(aux73-((v14**2)*v22))/((aux87-(v11*((v24**2)*v33)))-((v14**2)*(v22*v33)));
aux89=(v13*(v24**2))+((0.5*(v14*v34))+((v14*(v22*v34))+((-0.5*(v13*v44))+(v12*(v23*v44)))));
aux90=((-0.25*v13)+((-0.5*(v13*v22))+((0.5*(v12*v23))+aux89)))-(v13*(v22*v44));
aux91=(0.25*(v33*v44))+((0.5*(v11*(v33*v44)))+((0.5*(v22*(v33*v44)))+(v11*(v22*(v33*v44)))));
aux92=(0.5*(v11*(v22*v44)))+((2.*(v12*(v13*(v23*v44))))+((-0.5*((v23**2)*v44))+aux91));
aux93=(0.25*(v11*v44))+((-0.5*((v12**2)*v44))+((-0.5*((v13**2)*v44))+((0.25*(v22*v44))+aux92)));
aux94=(-0.5*(v11*(v34**2)))+(((v12**2)*(v34**2))+((-0.5*(v22*(v34**2)))+((0.125*v44)+aux93)));
aux95=(-2.*(v12*(v13*(v24*v34))))+((v23*(v24*v34))+((2.*(v11*(v23*(v24*v34))))+((-0.25*(v34**2))+aux94)));
aux96=(v13*(v14*v34))+((2.*(v13*(v14*(v22*v34))))+((-2.*(v12*(v14*(v23*v34))))+aux95));
aux97=(0.5*(v11*(v22*v33)))+((2.*(v12*(v14*(v24*v33))))+((-0.5*((v24**2)*v33))+aux96));
aux98=(0.25*(v11*v33))+((-0.5*((v12**2)*v33))+((-0.5*((v14**2)*v33))+((0.25*(v22*v33))+aux97)));
aux99=(-0.25*(v24**2))+((-0.5*(v11*(v24**2)))+(((v13**2)*(v24**2))+((0.125*v33)+aux98)));
aux100=((v14**2)*(v23**2))+((v12*(v14*v24))+((-2.*(v13*(v14*(v23*v24))))+aux99));
aux101=(-0.5*((v14**2)*v22))+((v12*(v13*v23))+((-0.25*(v23**2))+((-0.5*(v11*(v23**2)))+aux100)));
aux102=(-0.25*(v14**2))+((0.125*v22)+((0.25*(v11*v22))+((-0.5*((v13**2)*v22))+aux101)));
aux103=(0.0625+((0.125*v11)+((-0.25*(v12**2))+((-0.25*(v13**2))+aux102))))-((v12**2)*(v33*v44));
aux104=((aux103-(v11*((v23**2)*v44)))-((v13**2)*(v22*v44)))-(v11*(v22*(v34**2)));
aux105=((aux90-(v12*(v24*v34)))-(v14*(v23*v24)))/((aux104-(v11*((v24**2)*v33)))-((v14**2)*(v22*v33)));
output=(0.5*(((0.+-0.5j)*(aux17-aux35))-aux52))+(0.5*(((0.+0.5j)*(aux70-aux88))-aux105));
return output
def coeffscuadraticos14(V,B):
v11,v12,v13,v14=separate(V,0)
v21,v22,v23,v24=separate(V,1)
v31,v32,v33,v34=separate(V,2)
v41,v42,v43,v44=separate(V,3)
b11,b12,b13,b14=separate(B,0)
b21,b22,b23,b24=separate(B,1)
b31,b32,b33,b34=separate(B,2)
b41,b42,b43,b44=separate(B,3)
aux0=(-0.5*(b12*b33))+((b14*(b24*b33))+((b12*(b34**2))+((-0.5*(b12*b44))+(b13*(b23*b44)))));
aux1=(((-0.25*b12)+((0.5*(b13*b23))+((0.5*(b14*b24))+aux0)))-(b12*(b33*b44)))-(b13*(b24*b34));
aux2=(0.25*(b33*b44))+((0.5*(b11*(b33*b44)))+((0.5*(b22*(b33*b44)))+(b11*(b22*(b33*b44)))));
aux3=(0.5*(b11*(b22*b44)))+((2.*(b12*(b13*(b23*b44))))+((-0.5*((b23**2)*b44))+aux2));
aux4=(0.25*(b11*b44))+((-0.5*((b12**2)*b44))+((-0.5*((b13**2)*b44))+((0.25*(b22*b44))+aux3)));
aux5=(-0.5*(b11*(b34**2)))+(((b12**2)*(b34**2))+((-0.5*(b22*(b34**2)))+((0.125*b44)+aux4)));
aux6=(-2.*(b12*(b13*(b24*b34))))+((b23*(b24*b34))+((2.*(b11*(b23*(b24*b34))))+((-0.25*(b34**2))+aux5)));
aux7=(b13*(b14*b34))+((2.*(b13*(b14*(b22*b34))))+((-2.*(b12*(b14*(b23*b34))))+aux6));
aux8=(0.5*(b11*(b22*b33)))+((2.*(b12*(b14*(b24*b33))))+((-0.5*((b24**2)*b33))+aux7));
aux9=(0.25*(b11*b33))+((-0.5*((b12**2)*b33))+((-0.5*((b14**2)*b33))+((0.25*(b22*b33))+aux8)));
aux10=(-0.25*(b24**2))+((-0.5*(b11*(b24**2)))+(((b13**2)*(b24**2))+((0.125*b33)+aux9)));
aux11=((b14**2)*(b23**2))+((b12*(b14*b24))+((-2.*(b13*(b14*(b23*b24))))+aux10));
aux12=(-0.5*((b14**2)*b22))+((b12*(b13*b23))+((-0.25*(b23**2))+((-0.5*(b11*(b23**2)))+aux11)));
aux13=(-0.25*(b14**2))+((0.125*b22)+((0.25*(b11*b22))+((-0.5*((b13**2)*b22))+aux12)));
aux14=(0.0625+((0.125*b11)+((-0.25*(b12**2))+((-0.25*(b13**2))+aux13))))-((b12**2)*(b33*b44));
aux15=((aux14-(b11*((b23**2)*b44)))-((b13**2)*(b22*b44)))-(b11*(b22*(b34**2)));
aux16=(aux1-(b14*(b23*b34)))/((aux15-(b11*((b24**2)*b33)))-((b14**2)*(b22*b33)));
aux17=(b11*(b23*b24))+((-0.25*b34)+((-0.5*(b11*b34))+(((b12**2)*b34)+(-0.5*(b22*b34)))));
aux18=((0.5*(b13*b14))+((b13*(b14*b22))+((0.5*(b23*b24))+aux17)))-(b11*(b22*b34));
aux19=(0.25*(b33*b44))+((0.5*(b11*(b33*b44)))+((0.5*(b22*(b33*b44)))+(b11*(b22*(b33*b44)))));
aux20=(0.5*(b11*(b22*b44)))+((2.*(b12*(b13*(b23*b44))))+((-0.5*((b23**2)*b44))+aux19));
aux21=(0.25*(b11*b44))+((-0.5*((b12**2)*b44))+((-0.5*((b13**2)*b44))+((0.25*(b22*b44))+aux20)));
aux22=(-0.5*(b11*(b34**2)))+(((b12**2)*(b34**2))+((-0.5*(b22*(b34**2)))+((0.125*b44)+aux21)));
aux23=(-2.*(b12*(b13*(b24*b34))))+((b23*(b24*b34))+((2.*(b11*(b23*(b24*b34))))+((-0.25*(b34**2))+aux22)));
aux24=(b13*(b14*b34))+((2.*(b13*(b14*(b22*b34))))+((-2.*(b12*(b14*(b23*b34))))+aux23));
aux25=(0.5*(b11*(b22*b33)))+((2.*(b12*(b14*(b24*b33))))+((-0.5*((b24**2)*b33))+aux24));
aux26=(0.25*(b11*b33))+((-0.5*((b12**2)*b33))+((-0.5*((b14**2)*b33))+((0.25*(b22*b33))+aux25)));
aux27=(-0.25*(b24**2))+((-0.5*(b11*(b24**2)))+(((b13**2)*(b24**2))+((0.125*b33)+aux26)));
aux28=((b14**2)*(b23**2))+((b12*(b14*b24))+((-2.*(b13*(b14*(b23*b24))))+aux27));
aux29=(-0.5*((b14**2)*b22))+((b12*(b13*b23))+((-0.25*(b23**2))+((-0.5*(b11*(b23**2)))+aux28)));
aux30=(-0.25*(b14**2))+((0.125*b22)+((0.25*(b11*b22))+((-0.5*((b13**2)*b22))+aux29)));
aux31=(0.0625+((0.125*b11)+((-0.25*(b12**2))+((-0.25*(b13**2))+aux30))))-((b12**2)*(b33*b44));
aux32=((aux31-(b11*((b23**2)*b44)))-((b13**2)*(b22*b44)))-(b11*(b22*(b34**2)));
aux33=((aux18-(b12*(b13*b24)))-(b12*(b14*b23)))/((aux32-(b11*((b24**2)*b33)))-((b14**2)*(b22*b33)));
aux34=(0.5*(b12*b24))+((-0.5*(b14*b33))+((b12*(b24*b33))+((0.5*(b13*b34))+(b13*(b22*b34)))));
aux35=((-0.25*b14)+((-0.5*(b14*b22))+((b14*(b23**2))+aux34)))-(b12*(b23*b34));
aux36=(0.25*(b33*b44))+((0.5*(b11*(b33*b44)))+((0.5*(b22*(b33*b44)))+(b11*(b22*(b33*b44)))));
aux37=(0.5*(b11*(b22*b44)))+((2.*(b12*(b13*(b23*b44))))+((-0.5*((b23**2)*b44))+aux36));
aux38=(0.25*(b11*b44))+((-0.5*((b12**2)*b44))+((-0.5*((b13**2)*b44))+((0.25*(b22*b44))+aux37)));
aux39=(-0.5*(b11*(b34**2)))+(((b12**2)*(b34**2))+((-0.5*(b22*(b34**2)))+((0.125*b44)+aux38)));
aux40=(-2.*(b12*(b13*(b24*b34))))+((b23*(b24*b34))+((2.*(b11*(b23*(b24*b34))))+((-0.25*(b34**2))+aux39)));
aux41=(b13*(b14*b34))+((2.*(b13*(b14*(b22*b34))))+((-2.*(b12*(b14*(b23*b34))))+aux40));
aux42=(0.5*(b11*(b22*b33)))+((2.*(b12*(b14*(b24*b33))))+((-0.5*((b24**2)*b33))+aux41));
aux43=(0.25*(b11*b33))+((-0.5*((b12**2)*b33))+((-0.5*((b14**2)*b33))+((0.25*(b22*b33))+aux42)));
aux44=(-0.25*(b24**2))+((-0.5*(b11*(b24**2)))+(((b13**2)*(b24**2))+((0.125*b33)+aux43)));
aux45=((b14**2)*(b23**2))+((b12*(b14*b24))+((-2.*(b13*(b14*(b23*b24))))+aux44));
aux46=(-0.5*((b14**2)*b22))+((b12*(b13*b23))+((-0.25*(b23**2))+((-0.5*(b11*(b23**2)))+aux45)));
aux47=(-0.25*(b14**2))+((0.125*b22)+((0.25*(b11*b22))+((-0.5*((b13**2)*b22))+aux46)));
aux48=(0.0625+((0.125*b11)+((-0.25*(b12**2))+((-0.25*(b13**2))+aux47))))-((b12**2)*(b33*b44));
aux49=((aux48-(b11*((b23**2)*b44)))-((b13**2)*(b22*b44)))-(b11*(b22*(b34**2)));
aux50=((aux35-(b14*(b22*b33)))-(b13*(b23*b24)))/((aux49-(b11*((b24**2)*b33)))-((b14**2)*(b22*b33)));
aux51=(-0.5*(v12*v33))+((v14*(v24*v33))+((v12*(v34**2))+((-0.5*(v12*v44))+(v13*(v23*v44)))));
aux52=((-0.25*v12)+((0.5*(v13*v23))+((0.5*(v14*v24))+aux51)))-(v12*(v33*v44));
aux53=(0.25*(v33*v44))+((0.5*(v11*(v33*v44)))+((0.5*(v22*(v33*v44)))+(v11*(v22*(v33*v44)))));
aux54=(0.5*(v11*(v22*v44)))+((2.*(v12*(v13*(v23*v44))))+((-0.5*((v23**2)*v44))+aux53));
aux55=(0.25*(v11*v44))+((-0.5*((v12**2)*v44))+((-0.5*((v13**2)*v44))+((0.25*(v22*v44))+aux54)));
aux56=(-0.5*(v11*(v34**2)))+(((v12**2)*(v34**2))+((-0.5*(v22*(v34**2)))+((0.125*v44)+aux55)));
aux57=(-2.*(v12*(v13*(v24*v34))))+((v23*(v24*v34))+((2.*(v11*(v23*(v24*v34))))+((-0.25*(v34**2))+aux56)));
aux58=(v13*(v14*v34))+((2.*(v13*(v14*(v22*v34))))+((-2.*(v12*(v14*(v23*v34))))+aux57));
aux59=(0.5*(v11*(v22*v33)))+((2.*(v12*(v14*(v24*v33))))+((-0.5*((v24**2)*v33))+aux58));
aux60=(0.25*(v11*v33))+((-0.5*((v12**2)*v33))+((-0.5*((v14**2)*v33))+((0.25*(v22*v33))+aux59)));
aux61=(-0.25*(v24**2))+((-0.5*(v11*(v24**2)))+(((v13**2)*(v24**2))+((0.125*v33)+aux60)));
aux62=((v14**2)*(v23**2))+((v12*(v14*v24))+((-2.*(v13*(v14*(v23*v24))))+aux61));
aux63=(-0.5*((v14**2)*v22))+((v12*(v13*v23))+((-0.25*(v23**2))+((-0.5*(v11*(v23**2)))+aux62)));
aux64=(-0.25*(v14**2))+((0.125*v22)+((0.25*(v11*v22))+((-0.5*((v13**2)*v22))+aux63)));
aux65=(0.0625+((0.125*v11)+((-0.25*(v12**2))+((-0.25*(v13**2))+aux64))))-((v12**2)*(v33*v44));
aux66=((aux65-(v11*((v23**2)*v44)))-((v13**2)*(v22*v44)))-(v11*(v22*(v34**2)));
aux67=((aux52-(v13*(v24*v34)))-(v14*(v23*v34)))/((aux66-(v11*((v24**2)*v33)))-((v14**2)*(v22*v33)));
aux68=(v11*(v23*v24))+((-0.25*v34)+((-0.5*(v11*v34))+(((v12**2)*v34)+(-0.5*(v22*v34)))));
aux69=((0.5*(v13*v14))+((v13*(v14*v22))+((0.5*(v23*v24))+aux68)))-(v11*(v22*v34));
aux70=(0.25*(v33*v44))+((0.5*(v11*(v33*v44)))+((0.5*(v22*(v33*v44)))+(v11*(v22*(v33*v44)))));
aux71=(0.5*(v11*(v22*v44)))+((2.*(v12*(v13*(v23*v44))))+((-0.5*((v23**2)*v44))+aux70));
aux72=(0.25*(v11*v44))+((-0.5*((v12**2)*v44))+((-0.5*((v13**2)*v44))+((0.25*(v22*v44))+aux71)));
aux73=(-0.5*(v11*(v34**2)))+(((v12**2)*(v34**2))+((-0.5*(v22*(v34**2)))+((0.125*v44)+aux72)));
aux74=(-2.*(v12*(v13*(v24*v34))))+((v23*(v24*v34))+((2.*(v11*(v23*(v24*v34))))+((-0.25*(v34**2))+aux73)));
aux75=(v13*(v14*v34))+((2.*(v13*(v14*(v22*v34))))+((-2.*(v12*(v14*(v23*v34))))+aux74));
aux76=(0.5*(v11*(v22*v33)))+((2.*(v12*(v14*(v24*v33))))+((-0.5*((v24**2)*v33))+aux75));
aux77=(0.25*(v11*v33))+((-0.5*((v12**2)*v33))+((-0.5*((v14**2)*v33))+((0.25*(v22*v33))+aux76)));
aux78=(-0.25*(v24**2))+((-0.5*(v11*(v24**2)))+(((v13**2)*(v24**2))+((0.125*v33)+aux77)));
aux79=((v14**2)*(v23**2))+((v12*(v14*v24))+((-2.*(v13*(v14*(v23*v24))))+aux78));
aux80=(-0.5*((v14**2)*v22))+((v12*(v13*v23))+((-0.25*(v23**2))+((-0.5*(v11*(v23**2)))+aux79)));
aux81=(-0.25*(v14**2))+((0.125*v22)+((0.25*(v11*v22))+((-0.5*((v13**2)*v22))+aux80)));
aux82=(0.0625+((0.125*v11)+((-0.25*(v12**2))+((-0.25*(v13**2))+aux81))))-((v12**2)*(v33*v44));
aux83=((aux82-(v11*((v23**2)*v44)))-((v13**2)*(v22*v44)))-(v11*(v22*(v34**2)));
aux84=((aux69-(v12*(v13*v24)))-(v12*(v14*v23)))/((aux83-(v11*((v24**2)*v33)))-((v14**2)*(v22*v33)));
aux85=(0.5*(v12*v24))+((-0.5*(v14*v33))+((v12*(v24*v33))+((0.5*(v13*v34))+(v13*(v22*v34)))));
aux86=((-0.25*v14)+((-0.5*(v14*v22))+((v14*(v23**2))+aux85)))-(v12*(v23*v34));
aux87=(0.25*(v33*v44))+((0.5*(v11*(v33*v44)))+((0.5*(v22*(v33*v44)))+(v11*(v22*(v33*v44)))));
aux88=(0.5*(v11*(v22*v44)))+((2.*(v12*(v13*(v23*v44))))+((-0.5*((v23**2)*v44))+aux87));
aux89=(0.25*(v11*v44))+((-0.5*((v12**2)*v44))+((-0.5*((v13**2)*v44))+((0.25*(v22*v44))+aux88)));
aux90=(-0.5*(v11*(v34**2)))+(((v12**2)*(v34**2))+((-0.5*(v22*(v34**2)))+((0.125*v44)+aux89)));
aux91=(-2.*(v12*(v13*(v24*v34))))+((v23*(v24*v34))+((2.*(v11*(v23*(v24*v34))))+((-0.25*(v34**2))+aux90)));
aux92=(v13*(v14*v34))+((2.*(v13*(v14*(v22*v34))))+((-2.*(v12*(v14*(v23*v34))))+aux91));
aux93=(0.5*(v11*(v22*v33)))+((2.*(v12*(v14*(v24*v33))))+((-0.5*((v24**2)*v33))+aux92));
aux94=(0.25*(v11*v33))+((-0.5*((v12**2)*v33))+((-0.5*((v14**2)*v33))+((0.25*(v22*v33))+aux93)));
aux95=(-0.25*(v24**2))+((-0.5*(v11*(v24**2)))+(((v13**2)*(v24**2))+((0.125*v33)+aux94)));
aux96=((v14**2)*(v23**2))+((v12*(v14*v24))+((-2.*(v13*(v14*(v23*v24))))+aux95));
aux97=(-0.5*((v14**2)*v22))+((v12*(v13*v23))+((-0.25*(v23**2))+((-0.5*(v11*(v23**2)))+aux96)));
aux98=(-0.25*(v14**2))+((0.125*v22)+((0.25*(v11*v22))+((-0.5*((v13**2)*v22))+aux97)));
aux99=(0.0625+((0.125*v11)+((-0.25*(v12**2))+((-0.25*(v13**2))+aux98))))-((v12**2)*(v33*v44));
aux100=((aux99-(v11*((v23**2)*v44)))-((v13**2)*(v22*v44)))-(v11*(v22*(v34**2)));
aux101=((aux86-(v14*(v22*v33)))-(v13*(v23*v24)))/((aux100-(v11*((v24**2)*v33)))-((v14**2)*(v22*v33)));
output=(0.5*(((0.+-0.5j)*(aux16-aux33))-aux50))+(0.5*(((0.+0.5j)*(aux67-aux84))-aux101));
return output
def coeffscuadraticos22(V,B):
v11,v12,v13,v14=separate(V,0)
v21,v22,v23,v24=separate(V,1)
v31,v32,v33,v34=separate(V,2)
v41,v42,v43,v44=separate(V,3)
b11,b12,b13,b14=separate(B,0)
b21,b22,b23,b24=separate(B,1)
b31,b32,b33,b34=separate(B,2)
b41,b42,b43,b44=separate(B,3)
aux0=((v13**2)*v24)+((v12*(v14*v33))+((-0.5*(v24*v33))+((0.5*(v23*v34))+(v11*(v23*v34)))));
aux1=((0.5*(v12*v14))+((-0.25*v24)+((-0.5*(v11*v24))+aux0)))-(v12*(v13*v34));
aux2=(0.25*(v33*v44))+((0.5*(v11*(v33*v44)))+((0.5*(v22*(v33*v44)))+(v11*(v22*(v33*v44)))));
aux3=(0.5*(v11*(v22*v44)))+((2.*(v12*(v13*(v23*v44))))+((-0.5*((v23**2)*v44))+aux2));
aux4=(0.25*(v11*v44))+((-0.5*((v12**2)*v44))+((-0.5*((v13**2)*v44))+((0.25*(v22*v44))+aux3)));
aux5=(-0.5*(v11*(v34**2)))+(((v12**2)*(v34**2))+((-0.5*(v22*(v34**2)))+((0.125*v44)+aux4)));
aux6=(-2.*(v12*(v13*(v24*v34))))+((v23*(v24*v34))+((2.*(v11*(v23*(v24*v34))))+((-0.25*(v34**2))+aux5)));
aux7=(v13*(v14*v34))+((2.*(v13*(v14*(v22*v34))))+((-2.*(v12*(v14*(v23*v34))))+aux6));
aux8=(0.5*(v11*(v22*v33)))+((2.*(v12*(v14*(v24*v33))))+((-0.5*((v24**2)*v33))+aux7));
aux9=(0.25*(v11*v33))+((-0.5*((v12**2)*v33))+((-0.5*((v14**2)*v33))+((0.25*(v22*v33))+aux8)));
aux10=(-0.25*(v24**2))+((-0.5*(v11*(v24**2)))+(((v13**2)*(v24**2))+((0.125*v33)+aux9)));
aux11=((v14**2)*(v23**2))+((v12*(v14*v24))+((-2.*(v13*(v14*(v23*v24))))+aux10));
aux12=(-0.5*((v14**2)*v22))+((v12*(v13*v23))+((-0.25*(v23**2))+((-0.5*(v11*(v23**2)))+aux11)));
aux13=(-0.25*(v14**2))+((0.125*v22)+((0.25*(v11*v22))+((-0.5*((v13**2)*v22))+aux12)));
aux14=(0.0625+((0.125*v11)+((-0.25*(v12**2))+((-0.25*(v13**2))+aux13))))-((v12**2)*(v33*v44));
aux15=((aux14-(v11*((v23**2)*v44)))-((v13**2)*(v22*v44)))-(v11*(v22*(v34**2)));
aux16=((0.+-1.j)*((aux1-(v11*(v24*v33)))-(v13*(v14*v23))))/((aux15-(v11*((v24**2)*v33)))-((v14**2)*(v22*v33)));
aux17=(-0.5*(v34**2))+((0.25*v44)+((0.5*(v11*v44))+((0.5*(v33*v44))+(v11*(v33*v44)))));
aux18=(-0.5*(v14**2))+((0.25*v33)+((0.5*(v11*v33))+((2.*(v13*(v14*v34)))+aux17)));
aux19=((0.125+((0.25*v11)+((-0.5*(v13**2))+aux18)))-((v13**2)*v44))-(v11*(v34**2));
aux20=(0.25*(v33*v44))+((0.5*(v11*(v33*v44)))+((0.5*(v22*(v33*v44)))+(v11*(v22*(v33*v44)))));
aux21=(0.5*(v11*(v22*v44)))+((2.*(v12*(v13*(v23*v44))))+((-0.5*((v23**2)*v44))+aux20));
aux22=(0.25*(v11*v44))+((-0.5*((v12**2)*v44))+((-0.5*((v13**2)*v44))+((0.25*(v22*v44))+aux21)));
aux23=(-0.5*(v11*(v34**2)))+(((v12**2)*(v34**2))+((-0.5*(v22*(v34**2)))+((0.125*v44)+aux22)));
aux24=(-2.*(v12*(v13*(v24*v34))))+((v23*(v24*v34))+((2.*(v11*(v23*(v24*v34))))+((-0.25*(v34**2))+aux23)));
aux25=(v13*(v14*v34))+((2.*(v13*(v14*(v22*v34))))+((-2.*(v12*(v14*(v23*v34))))+aux24));
aux26=(0.5*(v11*(v22*v33)))+((2.*(v12*(v14*(v24*v33))))+((-0.5*((v24**2)*v33))+aux25));
aux27=(0.25*(v11*v33))+((-0.5*((v12**2)*v33))+((-0.5*((v14**2)*v33))+((0.25*(v22*v33))+aux26)));
aux28=(-0.25*(v24**2))+((-0.5*(v11*(v24**2)))+(((v13**2)*(v24**2))+((0.125*v33)+aux27)));
aux29=((v14**2)*(v23**2))+((v12*(v14*v24))+((-2.*(v13*(v14*(v23*v24))))+aux28));
aux30=(-0.5*((v14**2)*v22))+((v12*(v13*v23))+((-0.25*(v23**2))+((-0.5*(v11*(v23**2)))+aux29)));
aux31=(-0.25*(v14**2))+((0.125*v22)+((0.25*(v11*v22))+((-0.5*((v13**2)*v22))+aux30)));
aux32=(0.0625+((0.125*v11)+((-0.25*(v12**2))+((-0.25*(v13**2))+aux31))))-((v12**2)*(v33*v44));
aux33=((aux32-(v11*((v23**2)*v44)))-((v13**2)*(v22*v44)))-(v11*(v22*(v34**2)));
aux34=(aux19-((v14**2)*v33))/((aux33-(v11*((v24**2)*v33)))-((v14**2)*(v22*v33)));
aux35=((b13**2)*b24)+((b12*(b14*b33))+((-0.5*(b24*b33))+((0.5*(b23*b34))+(b11*(b23*b34)))));
aux36=((0.5*(b12*b14))+((-0.25*b24)+((-0.5*(b11*b24))+aux35)))-(b12*(b13*b34));
aux37=(0.25*(b33*b44))+((0.5*(b11*(b33*b44)))+((0.5*(b22*(b33*b44)))+(b11*(b22*(b33*b44)))));
aux38=(0.5*(b11*(b22*b44)))+((2.*(b12*(b13*(b23*b44))))+((-0.5*((b23**2)*b44))+aux37));
aux39=(0.25*(b11*b44))+((-0.5*((b12**2)*b44))+((-0.5*((b13**2)*b44))+((0.25*(b22*b44))+aux38)));
aux40=(-0.5*(b11*(b34**2)))+(((b12**2)*(b34**2))+((-0.5*(b22*(b34**2)))+((0.125*b44)+aux39)));
aux41=(-2.*(b12*(b13*(b24*b34))))+((b23*(b24*b34))+((2.*(b11*(b23*(b24*b34))))+((-0.25*(b34**2))+aux40)));
aux42=(b13*(b14*b34))+((2.*(b13*(b14*(b22*b34))))+((-2.*(b12*(b14*(b23*b34))))+aux41));
aux43=(0.5*(b11*(b22*b33)))+((2.*(b12*(b14*(b24*b33))))+((-0.5*((b24**2)*b33))+aux42));
aux44=(0.25*(b11*b33))+((-0.5*((b12**2)*b33))+((-0.5*((b14**2)*b33))+((0.25*(b22*b33))+aux43)));
aux45=(-0.25*(b24**2))+((-0.5*(b11*(b24**2)))+(((b13**2)*(b24**2))+((0.125*b33)+aux44)));
aux46=((b14**2)*(b23**2))+((b12*(b14*b24))+((-2.*(b13*(b14*(b23*b24))))+aux45));
aux47=(-0.5*((b14**2)*b22))+((b12*(b13*b23))+((-0.25*(b23**2))+((-0.5*(b11*(b23**2)))+aux46)));
aux48=(-0.25*(b14**2))+((0.125*b22)+((0.25*(b11*b22))+((-0.5*((b13**2)*b22))+aux47)));
aux49=(0.0625+((0.125*b11)+((-0.25*(b12**2))+((-0.25*(b13**2))+aux48))))-((b12**2)*(b33*b44));
aux50=((aux49-(b11*((b23**2)*b44)))-((b13**2)*(b22*b44)))-(b11*(b22*(b34**2)));
aux51=((0.+1.j)*((aux36-(b11*(b24*b33)))-(b13*(b14*b23))))/((aux50-(b11*((b24**2)*b33)))-((b14**2)*(b22*b33)));
aux52=(-0.5*(b34**2))+((0.25*b44)+((0.5*(b11*b44))+((0.5*(b33*b44))+(b11*(b33*b44)))));
aux53=(-0.5*(b14**2))+((0.25*b33)+((0.5*(b11*b33))+((2.*(b13*(b14*b34)))+aux52)));
aux54=((0.125+((0.25*b11)+((-0.5*(b13**2))+aux53)))-((b13**2)*b44))-(b11*(b34**2));
aux55=(0.25*(b33*b44))+((0.5*(b11*(b33*b44)))+((0.5*(b22*(b33*b44)))+(b11*(b22*(b33*b44)))));
aux56=(0.5*(b11*(b22*b44)))+((2.*(b12*(b13*(b23*b44))))+((-0.5*((b23**2)*b44))+aux55));
aux57=(0.25*(b11*b44))+((-0.5*((b12**2)*b44))+((-0.5*((b13**2)*b44))+((0.25*(b22*b44))+aux56)));
aux58=(-0.5*(b11*(b34**2)))+(((b12**2)*(b34**2))+((-0.5*(b22*(b34**2)))+((0.125*b44)+aux57)));
aux59=(-2.*(b12*(b13*(b24*b34))))+((b23*(b24*b34))+((2.*(b11*(b23*(b24*b34))))+((-0.25*(b34**2))+aux58)));
aux60=(b13*(b14*b34))+((2.*(b13*(b14*(b22*b34))))+((-2.*(b12*(b14*(b23*b34))))+aux59));
aux61=(0.5*(b11*(b22*b33)))+((2.*(b12*(b14*(b24*b33))))+((-0.5*((b24**2)*b33))+aux60));
aux62=(0.25*(b11*b33))+((-0.5*((b12**2)*b33))+((-0.5*((b14**2)*b33))+((0.25*(b22*b33))+aux61)));
aux63=(-0.25*(b24**2))+((-0.5*(b11*(b24**2)))+(((b13**2)*(b24**2))+((0.125*b33)+aux62)));
aux64=((b14**2)*(b23**2))+((b12*(b14*b24))+((-2.*(b13*(b14*(b23*b24))))+aux63));
aux65=(-0.5*((b14**2)*b22))+((b12*(b13*b23))+((-0.25*(b23**2))+((-0.5*(b11*(b23**2)))+aux64)));
aux66=(-0.25*(b14**2))+((0.125*b22)+((0.25*(b11*b22))+((-0.5*((b13**2)*b22))+aux65)));
aux67=(0.0625+((0.125*b11)+((-0.25*(b12**2))+((-0.25*(b13**2))+aux66))))-((b12**2)*(b33*b44));
aux68=((aux67-(b11*((b23**2)*b44)))-((b13**2)*(b22*b44)))-(b11*(b22*(b34**2)));
aux69=(aux54-((b14**2)*b33))/((aux68-(b11*((b24**2)*b33)))-((b14**2)*(b22*b33)));
output=(0.25*(aux16-aux34))+(-0.25*(np.conjugate((aux51+aux69))));
return output
def coeffscuadraticos23(V,B):
v11,v12,v13,v14=separate(V,0)
v21,v22,v23,v24=separate(V,1)
v31,v32,v33,v34=separate(V,2)
v41,v42,v43,v44=separate(V,3)
b11,b12,b13,b14=separate(B,0)
b21,b22,b23,b24=separate(B,1)
b31,b32,b33,b34=separate(B,2)
b41,b42,b43,b44=separate(B,3)
aux0=(-0.5*(b12*b33))+((b14*(b24*b33))+((b12*(b34**2))+((-0.5*(b12*b44))+(b13*(b23*b44)))));
aux1=(((-0.25*b12)+((0.5*(b13*b23))+((0.5*(b14*b24))+aux0)))-(b12*(b33*b44)))-(b13*(b24*b34));
aux2=(0.25*(b33*b44))+((0.5*(b11*(b33*b44)))+((0.5*(b22*(b33*b44)))+(b11*(b22*(b33*b44)))));
aux3=(0.5*(b11*(b22*b44)))+((2.*(b12*(b13*(b23*b44))))+((-0.5*((b23**2)*b44))+aux2));
aux4=(0.25*(b11*b44))+((-0.5*((b12**2)*b44))+((-0.5*((b13**2)*b44))+((0.25*(b22*b44))+aux3)));
aux5=(-0.5*(b11*(b34**2)))+(((b12**2)*(b34**2))+((-0.5*(b22*(b34**2)))+((0.125*b44)+aux4)));
aux6=(-2.*(b12*(b13*(b24*b34))))+((b23*(b24*b34))+((2.*(b11*(b23*(b24*b34))))+((-0.25*(b34**2))+aux5)));
aux7=(b13*(b14*b34))+((2.*(b13*(b14*(b22*b34))))+((-2.*(b12*(b14*(b23*b34))))+aux6));
aux8=(0.5*(b11*(b22*b33)))+((2.*(b12*(b14*(b24*b33))))+((-0.5*((b24**2)*b33))+aux7));
aux9=(0.25*(b11*b33))+((-0.5*((b12**2)*b33))+((-0.5*((b14**2)*b33))+((0.25*(b22*b33))+aux8)));
aux10=(-0.25*(b24**2))+((-0.5*(b11*(b24**2)))+(((b13**2)*(b24**2))+((0.125*b33)+aux9)));
aux11=((b14**2)*(b23**2))+((b12*(b14*b24))+((-2.*(b13*(b14*(b23*b24))))+aux10));
aux12=(-0.5*((b14**2)*b22))+((b12*(b13*b23))+((-0.25*(b23**2))+((-0.5*(b11*(b23**2)))+aux11)));
aux13=(-0.25*(b14**2))+((0.125*b22)+((0.25*(b11*b22))+((-0.5*((b13**2)*b22))+aux12)));
aux14=(0.0625+((0.125*b11)+((-0.25*(b12**2))+((-0.25*(b13**2))+aux13))))-((b12**2)*(b33*b44));
aux15=((aux14-(b11*((b23**2)*b44)))-((b13**2)*(b22*b44)))-(b11*(b22*(b34**2)));
aux16=(aux1-(b14*(b23*b34)))/((aux15-(b11*((b24**2)*b33)))-((b14**2)*(b22*b33)));
aux17=(b11*(b23*b24))+((-0.25*b34)+((-0.5*(b11*b34))+(((b12**2)*b34)+(-0.5*(b22*b34)))));
aux18=((0.5*(b13*b14))+((b13*(b14*b22))+((0.5*(b23*b24))+aux17)))-(b11*(b22*b34));
aux19=(0.25*(b33*b44))+((0.5*(b11*(b33*b44)))+((0.5*(b22*(b33*b44)))+(b11*(b22*(b33*b44)))));
aux20=(0.5*(b11*(b22*b44)))+((2.*(b12*(b13*(b23*b44))))+((-0.5*((b23**2)*b44))+aux19));
aux21=(0.25*(b11*b44))+((-0.5*((b12**2)*b44))+((-0.5*((b13**2)*b44))+((0.25*(b22*b44))+aux20)));
aux22=(-0.5*(b11*(b34**2)))+(((b12**2)*(b34**2))+((-0.5*(b22*(b34**2)))+((0.125*b44)+aux21)));
aux23=(-2.*(b12*(b13*(b24*b34))))+((b23*(b24*b34))+((2.*(b11*(b23*(b24*b34))))+((-0.25*(b34**2))+aux22)));
aux24=(b13*(b14*b34))+((2.*(b13*(b14*(b22*b34))))+((-2.*(b12*(b14*(b23*b34))))+aux23));
aux25=(0.5*(b11*(b22*b33)))+((2.*(b12*(b14*(b24*b33))))+((-0.5*((b24**2)*b33))+aux24));
aux26=(0.25*(b11*b33))+((-0.5*((b12**2)*b33))+((-0.5*((b14**2)*b33))+((0.25*(b22*b33))+aux25)));
aux27=(-0.25*(b24**2))+((-0.5*(b11*(b24**2)))+(((b13**2)*(b24**2))+((0.125*b33)+aux26)));
aux28=((b14**2)*(b23**2))+((b12*(b14*b24))+((-2.*(b13*(b14*(b23*b24))))+aux27));
aux29=(-0.5*((b14**2)*b22))+((b12*(b13*b23))+((-0.25*(b23**2))+((-0.5*(b11*(b23**2)))+aux28)));
aux30=(-0.25*(b14**2))+((0.125*b22)+((0.25*(b11*b22))+((-0.5*((b13**2)*b22))+aux29)));
aux31=(0.0625+((0.125*b11)+((-0.25*(b12**2))+((-0.25*(b13**2))+aux30))))-((b12**2)*(b33*b44));
aux32=((aux31-(b11*((b23**2)*b44)))-((b13**2)*(b22*b44)))-(b11*(b22*(b34**2)));
aux33=((aux18-(b12*(b13*b24)))-(b12*(b14*b23)))/((aux32-(b11*((b24**2)*b33)))-((b14**2)*(b22*b33)));
aux34=((b14**2)*b23)+((0.5*(b24*b34))+((b11*(b24*b34))+((b12*(b13*b44))+(-0.5*(b23*b44)))));
aux35=((0.5*(b12*b13))+((-0.25*b23)+((-0.5*(b11*b23))+aux34)))-(b11*(b23*b44));
aux36=(0.25*(b33*b44))+((0.5*(b11*(b33*b44)))+((0.5*(b22*(b33*b44)))+(b11*(b22*(b33*b44)))));
aux37=(0.5*(b11*(b22*b44)))+((2.*(b12*(b13*(b23*b44))))+((-0.5*((b23**2)*b44))+aux36));
aux38=(0.25*(b11*b44))+((-0.5*((b12**2)*b44))+((-0.5*((b13**2)*b44))+((0.25*(b22*b44))+aux37)));
aux39=(-0.5*(b11*(b34**2)))+(((b12**2)*(b34**2))+((-0.5*(b22*(b34**2)))+((0.125*b44)+aux38)));
aux40=(-2.*(b12*(b13*(b24*b34))))+((b23*(b24*b34))+((2.*(b11*(b23*(b24*b34))))+((-0.25*(b34**2))+aux39)));
aux41=(b13*(b14*b34))+((2.*(b13*(b14*(b22*b34))))+((-2.*(b12*(b14*(b23*b34))))+aux40));
aux42=(0.5*(b11*(b22*b33)))+((2.*(b12*(b14*(b24*b33))))+((-0.5*((b24**2)*b33))+aux41));
aux43=(0.25*(b11*b33))+((-0.5*((b12**2)*b33))+((-0.5*((b14**2)*b33))+((0.25*(b22*b33))+aux42)));
aux44=(-0.25*(b24**2))+((-0.5*(b11*(b24**2)))+(((b13**2)*(b24**2))+((0.125*b33)+aux43)));
aux45=((b14**2)*(b23**2))+((b12*(b14*b24))+((-2.*(b13*(b14*(b23*b24))))+aux44));
aux46=(-0.5*((b14**2)*b22))+((b12*(b13*b23))+((-0.25*(b23**2))+((-0.5*(b11*(b23**2)))+aux45)));
aux47=(-0.25*(b14**2))+((0.125*b22)+((0.25*(b11*b22))+((-0.5*((b13**2)*b22))+aux46)));
aux48=(0.0625+((0.125*b11)+((-0.25*(b12**2))+((-0.25*(b13**2))+aux47))))-((b12**2)*(b33*b44));
aux49=((aux48-(b11*((b23**2)*b44)))-((b13**2)*(b22*b44)))-(b11*(b22*(b34**2)));
aux50=((aux35-(b12*(b14*b34)))-(b13*(b14*b24)))/((aux49-(b11*((b24**2)*b33)))-((b14**2)*(b22*b33)));
aux51=(-0.5*(v12*v33))+((v14*(v24*v33))+((v12*(v34**2))+((-0.5*(v12*v44))+(v13*(v23*v44)))));
aux52=((-0.25*v12)+((0.5*(v13*v23))+((0.5*(v14*v24))+aux51)))-(v12*(v33*v44));
aux53=(0.25*(v33*v44))+((0.5*(v11*(v33*v44)))+((0.5*(v22*(v33*v44)))+(v11*(v22*(v33*v44)))));
aux54=(0.5*(v11*(v22*v44)))+((2.*(v12*(v13*(v23*v44))))+((-0.5*((v23**2)*v44))+aux53));
aux55=(0.25*(v11*v44))+((-0.5*((v12**2)*v44))+((-0.5*((v13**2)*v44))+((0.25*(v22*v44))+aux54)));
aux56=(-0.5*(v11*(v34**2)))+(((v12**2)*(v34**2))+((-0.5*(v22*(v34**2)))+((0.125*v44)+aux55)));
aux57=(-2.*(v12*(v13*(v24*v34))))+((v23*(v24*v34))+((2.*(v11*(v23*(v24*v34))))+((-0.25*(v34**2))+aux56)));
aux58=(v13*(v14*v34))+((2.*(v13*(v14*(v22*v34))))+((-2.*(v12*(v14*(v23*v34))))+aux57));
aux59=(0.5*(v11*(v22*v33)))+((2.*(v12*(v14*(v24*v33))))+((-0.5*((v24**2)*v33))+aux58));
aux60=(0.25*(v11*v33))+((-0.5*((v12**2)*v33))+((-0.5*((v14**2)*v33))+((0.25*(v22*v33))+aux59)));
aux61=(-0.25*(v24**2))+((-0.5*(v11*(v24**2)))+(((v13**2)*(v24**2))+((0.125*v33)+aux60)));
aux62=((v14**2)*(v23**2))+((v12*(v14*v24))+((-2.*(v13*(v14*(v23*v24))))+aux61));
aux63=(-0.5*((v14**2)*v22))+((v12*(v13*v23))+((-0.25*(v23**2))+((-0.5*(v11*(v23**2)))+aux62)));
aux64=(-0.25*(v14**2))+((0.125*v22)+((0.25*(v11*v22))+((-0.5*((v13**2)*v22))+aux63)));
aux65=(0.0625+((0.125*v11)+((-0.25*(v12**2))+((-0.25*(v13**2))+aux64))))-((v12**2)*(v33*v44));
aux66=((aux65-(v11*((v23**2)*v44)))-((v13**2)*(v22*v44)))-(v11*(v22*(v34**2)));
aux67=((aux52-(v13*(v24*v34)))-(v14*(v23*v34)))/((aux66-(v11*((v24**2)*v33)))-((v14**2)*(v22*v33)));
aux68=(v11*(v23*v24))+((-0.25*v34)+((-0.5*(v11*v34))+(((v12**2)*v34)+(-0.5*(v22*v34)))));
aux69=((0.5*(v13*v14))+((v13*(v14*v22))+((0.5*(v23*v24))+aux68)))-(v11*(v22*v34));
aux70=(0.25*(v33*v44))+((0.5*(v11*(v33*v44)))+((0.5*(v22*(v33*v44)))+(v11*(v22*(v33*v44)))));
aux71=(0.5*(v11*(v22*v44)))+((2.*(v12*(v13*(v23*v44))))+((-0.5*((v23**2)*v44))+aux70));
aux72=(0.25*(v11*v44))+((-0.5*((v12**2)*v44))+((-0.5*((v13**2)*v44))+((0.25*(v22*v44))+aux71)));
aux73=(-0.5*(v11*(v34**2)))+(((v12**2)*(v34**2))+((-0.5*(v22*(v34**2)))+((0.125*v44)+aux72)));
aux74=(-2.*(v12*(v13*(v24*v34))))+((v23*(v24*v34))+((2.*(v11*(v23*(v24*v34))))+((-0.25*(v34**2))+aux73)));
aux75=(v13*(v14*v34))+((2.*(v13*(v14*(v22*v34))))+((-2.*(v12*(v14*(v23*v34))))+aux74));
aux76=(0.5*(v11*(v22*v33)))+((2.*(v12*(v14*(v24*v33))))+((-0.5*((v24**2)*v33))+aux75));
aux77=(0.25*(v11*v33))+((-0.5*((v12**2)*v33))+((-0.5*((v14**2)*v33))+((0.25*(v22*v33))+aux76)));
aux78=(-0.25*(v24**2))+((-0.5*(v11*(v24**2)))+(((v13**2)*(v24**2))+((0.125*v33)+aux77)));
aux79=((v14**2)*(v23**2))+((v12*(v14*v24))+((-2.*(v13*(v14*(v23*v24))))+aux78));
aux80=(-0.5*((v14**2)*v22))+((v12*(v13*v23))+((-0.25*(v23**2))+((-0.5*(v11*(v23**2)))+aux79)));
aux81=(-0.25*(v14**2))+((0.125*v22)+((0.25*(v11*v22))+((-0.5*((v13**2)*v22))+aux80)));
aux82=(0.0625+((0.125*v11)+((-0.25*(v12**2))+((-0.25*(v13**2))+aux81))))-((v12**2)*(v33*v44));
aux83=((aux82-(v11*((v23**2)*v44)))-((v13**2)*(v22*v44)))-(v11*(v22*(v34**2)));
aux84=((aux69-(v12*(v13*v24)))-(v12*(v14*v23)))/((aux83-(v11*((v24**2)*v33)))-((v14**2)*(v22*v33)));
aux85=((v14**2)*v23)+((0.5*(v24*v34))+((v11*(v24*v34))+((v12*(v13*v44))+(-0.5*(v23*v44)))));
aux86=((0.5*(v12*v13))+((-0.25*v23)+((-0.5*(v11*v23))+aux85)))-(v11*(v23*v44));
aux87=(0.25*(v33*v44))+((0.5*(v11*(v33*v44)))+((0.5*(v22*(v33*v44)))+(v11*(v22*(v33*v44)))));
aux88=(0.5*(v11*(v22*v44)))+((2.*(v12*(v13*(v23*v44))))+((-0.5*((v23**2)*v44))+aux87));
aux89=(0.25*(v11*v44))+((-0.5*((v12**2)*v44))+((-0.5*((v13**2)*v44))+((0.25*(v22*v44))+aux88)));
aux90=(-0.5*(v11*(v34**2)))+(((v12**2)*(v34**2))+((-0.5*(v22*(v34**2)))+((0.125*v44)+aux89)));
aux91=(-2.*(v12*(v13*(v24*v34))))+((v23*(v24*v34))+((2.*(v11*(v23*(v24*v34))))+((-0.25*(v34**2))+aux90)));
aux92=(v13*(v14*v34))+((2.*(v13*(v14*(v22*v34))))+((-2.*(v12*(v14*(v23*v34))))+aux91));
aux93=(0.5*(v11*(v22*v33)))+((2.*(v12*(v14*(v24*v33))))+((-0.5*((v24**2)*v33))+aux92));
aux94=(0.25*(v11*v33))+((-0.5*((v12**2)*v33))+((-0.5*((v14**2)*v33))+((0.25*(v22*v33))+aux93)));
aux95=(-0.25*(v24**2))+((-0.5*(v11*(v24**2)))+(((v13**2)*(v24**2))+((0.125*v33)+aux94)));
aux96=((v14**2)*(v23**2))+((v12*(v14*v24))+((-2.*(v13*(v14*(v23*v24))))+aux95));
aux97=(-0.5*((v14**2)*v22))+((v12*(v13*v23))+((-0.25*(v23**2))+((-0.5*(v11*(v23**2)))+aux96)));
aux98=(-0.25*(v14**2))+((0.125*v22)+((0.25*(v11*v22))+((-0.5*((v13**2)*v22))+aux97)));
aux99=(0.0625+((0.125*v11)+((-0.25*(v12**2))+((-0.25*(v13**2))+aux98))))-((v12**2)*(v33*v44));
aux100=((aux99-(v11*((v23**2)*v44)))-((v13**2)*(v22*v44)))-(v11*(v22*(v34**2)));
aux101=((aux86-(v12*(v14*v34)))-(v13*(v14*v24)))/((aux100-(v11*((v24**2)*v33)))-((v14**2)*(v22*v33)));
output=(0.5*(((0.+-0.5j)*(aux16-aux33))-aux50))+(0.5*(((0.+0.5j)*(aux67-aux84))-aux101));
return output
def coeffscuadraticos24(V,B):
v11,v12,v13,v14=separate(V,0)
v21,v22,v23,v24=separate(V,1)
v31,v32,v33,v34=separate(V,2)
v41,v42,v43,v44=separate(V,3)
b11,b12,b13,b14=separate(B,0)
b21,b22,b23,b24=separate(B,1)
b31,b32,b33,b34=separate(B,2)
b41,b42,b43,b44=separate(B,3)
aux0=(-0.5*(b34**2))+((0.25*b44)+((0.5*(b11*b44))+((0.5*(b33*b44))+(b11*(b33*b44)))));
aux1=(-0.5*(b14**2))+((0.25*b33)+((0.5*(b11*b33))+((2.*(b13*(b14*b34)))+aux0)));
aux2=((0.125+((0.25*b11)+((-0.5*(b13**2))+aux1)))-((b13**2)*b44))-(b11*(b34**2));
aux3=(0.25*(b33*b44))+((0.5*(b11*(b33*b44)))+((0.5*(b22*(b33*b44)))+(b11*(b22*(b33*b44)))));
aux4=(0.5*(b11*(b22*b44)))+((2.*(b12*(b13*(b23*b44))))+((-0.5*((b23**2)*b44))+aux3));
aux5=(0.25*(b11*b44))+((-0.5*((b12**2)*b44))+((-0.5*((b13**2)*b44))+((0.25*(b22*b44))+aux4)));
aux6=(-0.5*(b11*(b34**2)))+(((b12**2)*(b34**2))+((-0.5*(b22*(b34**2)))+((0.125*b44)+aux5)));
aux7=(-2.*(b12*(b13*(b24*b34))))+((b23*(b24*b34))+((2.*(b11*(b23*(b24*b34))))+((-0.25*(b34**2))+aux6)));
aux8=(b13*(b14*b34))+((2.*(b13*(b14*(b22*b34))))+((-2.*(b12*(b14*(b23*b34))))+aux7));
aux9=(0.5*(b11*(b22*b33)))+((2.*(b12*(b14*(b24*b33))))+((-0.5*((b24**2)*b33))+aux8));
aux10=(0.25*(b11*b33))+((-0.5*((b12**2)*b33))+((-0.5*((b14**2)*b33))+((0.25*(b22*b33))+aux9)));
aux11=(-0.25*(b24**2))+((-0.5*(b11*(b24**2)))+(((b13**2)*(b24**2))+((0.125*b33)+aux10)));
aux12=((b14**2)*(b23**2))+((b12*(b14*b24))+((-2.*(b13*(b14*(b23*b24))))+aux11));
aux13=(-0.5*((b14**2)*b22))+((b12*(b13*b23))+((-0.25*(b23**2))+((-0.5*(b11*(b23**2)))+aux12)));
aux14=(-0.25*(b14**2))+((0.125*b22)+((0.25*(b11*b22))+((-0.5*((b13**2)*b22))+aux13)));
aux15=(0.0625+((0.125*b11)+((-0.25*(b12**2))+((-0.25*(b13**2))+aux14))))-((b12**2)*(b33*b44));
aux16=((aux15-(b11*((b23**2)*b44)))-((b13**2)*(b22*b44)))-(b11*(b22*(b34**2)));
aux17=(aux2-((b14**2)*b33))/((aux16-(b11*((b24**2)*b33)))-((b14**2)*(b22*b33)));
aux18=(-0.5*(b23**2))+((0.25*b33)+((0.5*(b11*b33))+((0.5*(b22*b33))+(b11*(b22*b33)))));
aux19=(-0.5*(b13**2))+((0.25*b22)+((0.5*(b11*b22))+((2.*(b12*(b13*b23)))+aux18)));
aux20=((0.125+((0.25*b11)+((-0.5*(b12**2))+aux19)))-((b12**2)*b33))-(b11*(b23**2));
aux21=(0.25*(b33*b44))+((0.5*(b11*(b33*b44)))+((0.5*(b22*(b33*b44)))+(b11*(b22*(b33*b44)))));
aux22=(0.5*(b11*(b22*b44)))+((2.*(b12*(b13*(b23*b44))))+((-0.5*((b23**2)*b44))+aux21));
aux23=(0.25*(b11*b44))+((-0.5*((b12**2)*b44))+((-0.5*((b13**2)*b44))+((0.25*(b22*b44))+aux22)));
aux24=(-0.5*(b11*(b34**2)))+(((b12**2)*(b34**2))+((-0.5*(b22*(b34**2)))+((0.125*b44)+aux23)));
aux25=(-2.*(b12*(b13*(b24*b34))))+((b23*(b24*b34))+((2.*(b11*(b23*(b24*b34))))+((-0.25*(b34**2))+aux24)));
aux26=(b13*(b14*b34))+((2.*(b13*(b14*(b22*b34))))+((-2.*(b12*(b14*(b23*b34))))+aux25));
aux27=(0.5*(b11*(b22*b33)))+((2.*(b12*(b14*(b24*b33))))+((-0.5*((b24**2)*b33))+aux26));
aux28=(0.25*(b11*b33))+((-0.5*((b12**2)*b33))+((-0.5*((b14**2)*b33))+((0.25*(b22*b33))+aux27)));
aux29=(-0.25*(b24**2))+((-0.5*(b11*(b24**2)))+(((b13**2)*(b24**2))+((0.125*b33)+aux28)));
aux30=((b14**2)*(b23**2))+((b12*(b14*b24))+((-2.*(b13*(b14*(b23*b24))))+aux29));
aux31=(-0.5*((b14**2)*b22))+((b12*(b13*b23))+((-0.25*(b23**2))+((-0.5*(b11*(b23**2)))+aux30)));
aux32=(-0.25*(b14**2))+((0.125*b22)+((0.25*(b11*b22))+((-0.5*((b13**2)*b22))+aux31)));
aux33=(0.0625+((0.125*b11)+((-0.25*(b12**2))+((-0.25*(b13**2))+aux32))))-((b12**2)*(b33*b44));
aux34=((aux33-(b11*((b23**2)*b44)))-((b13**2)*(b22*b44)))-(b11*(b22*(b34**2)));
aux35=(aux20-((b13**2)*b22))/((aux34-(b11*((b24**2)*b33)))-((b14**2)*(b22*b33)));
aux36=((b13**2)*b24)+((b12*(b14*b33))+((-0.5*(b24*b33))+((0.5*(b23*b34))+(b11*(b23*b34)))));
aux37=((0.5*(b12*b14))+((-0.25*b24)+((-0.5*(b11*b24))+aux36)))-(b12*(b13*b34));
aux38=(0.25*(b33*b44))+((0.5*(b11*(b33*b44)))+((0.5*(b22*(b33*b44)))+(b11*(b22*(b33*b44)))));
aux39=(0.5*(b11*(b22*b44)))+((2.*(b12*(b13*(b23*b44))))+((-0.5*((b23**2)*b44))+aux38));
aux40=(0.25*(b11*b44))+((-0.5*((b12**2)*b44))+((-0.5*((b13**2)*b44))+((0.25*(b22*b44))+aux39)));
aux41=(-0.5*(b11*(b34**2)))+(((b12**2)*(b34**2))+((-0.5*(b22*(b34**2)))+((0.125*b44)+aux40)));
aux42=(-2.*(b12*(b13*(b24*b34))))+((b23*(b24*b34))+((2.*(b11*(b23*(b24*b34))))+((-0.25*(b34**2))+aux41)));
aux43=(b13*(b14*b34))+((2.*(b13*(b14*(b22*b34))))+((-2.*(b12*(b14*(b23*b34))))+aux42));
aux44=(0.5*(b11*(b22*b33)))+((2.*(b12*(b14*(b24*b33))))+((-0.5*((b24**2)*b33))+aux43));
aux45=(0.25*(b11*b33))+((-0.5*((b12**2)*b33))+((-0.5*((b14**2)*b33))+((0.25*(b22*b33))+aux44)));
aux46=(-0.25*(b24**2))+((-0.5*(b11*(b24**2)))+(((b13**2)*(b24**2))+((0.125*b33)+aux45)));
aux47=((b14**2)*(b23**2))+((b12*(b14*b24))+((-2.*(b13*(b14*(b23*b24))))+aux46));
aux48=(-0.5*((b14**2)*b22))+((b12*(b13*b23))+((-0.25*(b23**2))+((-0.5*(b11*(b23**2)))+aux47)));
aux49=(-0.25*(b14**2))+((0.125*b22)+((0.25*(b11*b22))+((-0.5*((b13**2)*b22))+aux48)));
aux50=(0.0625+((0.125*b11)+((-0.25*(b12**2))+((-0.25*(b13**2))+aux49))))-((b12**2)*(b33*b44));
aux51=((aux50-(b11*((b23**2)*b44)))-((b13**2)*(b22*b44)))-(b11*(b22*(b34**2)));
aux52=((aux37-(b11*(b24*b33)))-(b13*(b14*b23)))/((aux51-(b11*((b24**2)*b33)))-((b14**2)*(b22*b33)));
aux53=(-0.5*(v34**2))+((0.25*v44)+((0.5*(v11*v44))+((0.5*(v33*v44))+(v11*(v33*v44)))));
aux54=(-0.5*(v14**2))+((0.25*v33)+((0.5*(v11*v33))+((2.*(v13*(v14*v34)))+aux53)));
aux55=((0.125+((0.25*v11)+((-0.5*(v13**2))+aux54)))-((v13**2)*v44))-(v11*(v34**2));
aux56=(0.25*(v33*v44))+((0.5*(v11*(v33*v44)))+((0.5*(v22*(v33*v44)))+(v11*(v22*(v33*v44)))));
aux57=(0.5*(v11*(v22*v44)))+((2.*(v12*(v13*(v23*v44))))+((-0.5*((v23**2)*v44))+aux56));
aux58=(0.25*(v11*v44))+((-0.5*((v12**2)*v44))+((-0.5*((v13**2)*v44))+((0.25*(v22*v44))+aux57)));
aux59=(-0.5*(v11*(v34**2)))+(((v12**2)*(v34**2))+((-0.5*(v22*(v34**2)))+((0.125*v44)+aux58)));
aux60=(-2.*(v12*(v13*(v24*v34))))+((v23*(v24*v34))+((2.*(v11*(v23*(v24*v34))))+((-0.25*(v34**2))+aux59)));
aux61=(v13*(v14*v34))+((2.*(v13*(v14*(v22*v34))))+((-2.*(v12*(v14*(v23*v34))))+aux60));
aux62=(0.5*(v11*(v22*v33)))+((2.*(v12*(v14*(v24*v33))))+((-0.5*((v24**2)*v33))+aux61));
aux63=(0.25*(v11*v33))+((-0.5*((v12**2)*v33))+((-0.5*((v14**2)*v33))+((0.25*(v22*v33))+aux62)));
aux64=(-0.25*(v24**2))+((-0.5*(v11*(v24**2)))+(((v13**2)*(v24**2))+((0.125*v33)+aux63)));
aux65=((v14**2)*(v23**2))+((v12*(v14*v24))+((-2.*(v13*(v14*(v23*v24))))+aux64));
aux66=(-0.5*((v14**2)*v22))+((v12*(v13*v23))+((-0.25*(v23**2))+((-0.5*(v11*(v23**2)))+aux65)));
aux67=(-0.25*(v14**2))+((0.125*v22)+((0.25*(v11*v22))+((-0.5*((v13**2)*v22))+aux66)));
aux68=(0.0625+((0.125*v11)+((-0.25*(v12**2))+((-0.25*(v13**2))+aux67))))-((v12**2)*(v33*v44));
aux69=((aux68-(v11*((v23**2)*v44)))-((v13**2)*(v22*v44)))-(v11*(v22*(v34**2)));
aux70=(aux55-((v14**2)*v33))/((aux69-(v11*((v24**2)*v33)))-((v14**2)*(v22*v33)));
aux71=(-0.5*(v23**2))+((0.25*v33)+((0.5*(v11*v33))+((0.5*(v22*v33))+(v11*(v22*v33)))));
aux72=(-0.5*(v13**2))+((0.25*v22)+((0.5*(v11*v22))+((2.*(v12*(v13*v23)))+aux71)));
aux73=((0.125+((0.25*v11)+((-0.5*(v12**2))+aux72)))-((v12**2)*v33))-(v11*(v23**2));
aux74=(0.25*(v33*v44))+((0.5*(v11*(v33*v44)))+((0.5*(v22*(v33*v44)))+(v11*(v22*(v33*v44)))));
aux75=(0.5*(v11*(v22*v44)))+((2.*(v12*(v13*(v23*v44))))+((-0.5*((v23**2)*v44))+aux74));
aux76=(0.25*(v11*v44))+((-0.5*((v12**2)*v44))+((-0.5*((v13**2)*v44))+((0.25*(v22*v44))+aux75)));
aux77=(-0.5*(v11*(v34**2)))+(((v12**2)*(v34**2))+((-0.5*(v22*(v34**2)))+((0.125*v44)+aux76)));
aux78=(-2.*(v12*(v13*(v24*v34))))+((v23*(v24*v34))+((2.*(v11*(v23*(v24*v34))))+((-0.25*(v34**2))+aux77)));
aux79=(v13*(v14*v34))+((2.*(v13*(v14*(v22*v34))))+((-2.*(v12*(v14*(v23*v34))))+aux78));
aux80=(0.5*(v11*(v22*v33)))+((2.*(v12*(v14*(v24*v33))))+((-0.5*((v24**2)*v33))+aux79));
aux81=(0.25*(v11*v33))+((-0.5*((v12**2)*v33))+((-0.5*((v14**2)*v33))+((0.25*(v22*v33))+aux80)));
aux82=(-0.25*(v24**2))+((-0.5*(v11*(v24**2)))+(((v13**2)*(v24**2))+((0.125*v33)+aux81)));
aux83=((v14**2)*(v23**2))+((v12*(v14*v24))+((-2.*(v13*(v14*(v23*v24))))+aux82));
aux84=(-0.5*((v14**2)*v22))+((v12*(v13*v23))+((-0.25*(v23**2))+((-0.5*(v11*(v23**2)))+aux83)));
aux85=(-0.25*(v14**2))+((0.125*v22)+((0.25*(v11*v22))+((-0.5*((v13**2)*v22))+aux84)));
aux86=(0.0625+((0.125*v11)+((-0.25*(v12**2))+((-0.25*(v13**2))+aux85))))-((v12**2)*(v33*v44));
aux87=((aux86-(v11*((v23**2)*v44)))-((v13**2)*(v22*v44)))-(v11*(v22*(v34**2)));
aux88=(aux73-((v13**2)*v22))/((aux87-(v11*((v24**2)*v33)))-((v14**2)*(v22*v33)));
aux89=((v13**2)*v24)+((v12*(v14*v33))+((-0.5*(v24*v33))+((0.5*(v23*v34))+(v11*(v23*v34)))));
aux90=((0.5*(v12*v14))+((-0.25*v24)+((-0.5*(v11*v24))+aux89)))-(v12*(v13*v34));
aux91=(0.25*(v33*v44))+((0.5*(v11*(v33*v44)))+((0.5*(v22*(v33*v44)))+(v11*(v22*(v33*v44)))));
aux92=(0.5*(v11*(v22*v44)))+((2.*(v12*(v13*(v23*v44))))+((-0.5*((v23**2)*v44))+aux91));
aux93=(0.25*(v11*v44))+((-0.5*((v12**2)*v44))+((-0.5*((v13**2)*v44))+((0.25*(v22*v44))+aux92)));
aux94=(-0.5*(v11*(v34**2)))+(((v12**2)*(v34**2))+((-0.5*(v22*(v34**2)))+((0.125*v44)+aux93)));
aux95=(-2.*(v12*(v13*(v24*v34))))+((v23*(v24*v34))+((2.*(v11*(v23*(v24*v34))))+((-0.25*(v34**2))+aux94)));
aux96=(v13*(v14*v34))+((2.*(v13*(v14*(v22*v34))))+((-2.*(v12*(v14*(v23*v34))))+aux95));
aux97=(0.5*(v11*(v22*v33)))+((2.*(v12*(v14*(v24*v33))))+((-0.5*((v24**2)*v33))+aux96));
aux98=(0.25*(v11*v33))+((-0.5*((v12**2)*v33))+((-0.5*((v14**2)*v33))+((0.25*(v22*v33))+aux97)));
aux99=(-0.25*(v24**2))+((-0.5*(v11*(v24**2)))+(((v13**2)*(v24**2))+((0.125*v33)+aux98)));
aux100=((v14**2)*(v23**2))+((v12*(v14*v24))+((-2.*(v13*(v14*(v23*v24))))+aux99));
aux101=(-0.5*((v14**2)*v22))+((v12*(v13*v23))+((-0.25*(v23**2))+((-0.5*(v11*(v23**2)))+aux100)));
aux102=(-0.25*(v14**2))+((0.125*v22)+((0.25*(v11*v22))+((-0.5*((v13**2)*v22))+aux101)));
aux103=(0.0625+((0.125*v11)+((-0.25*(v12**2))+((-0.25*(v13**2))+aux102))))-((v12**2)*(v33*v44));
aux104=((aux103-(v11*((v23**2)*v44)))-((v13**2)*(v22*v44)))-(v11*(v22*(v34**2)));
aux105=((aux90-(v11*(v24*v33)))-(v13*(v14*v23)))/((aux104-(v11*((v24**2)*v33)))-((v14**2)*(v22*v33)));
output=(0.5*(((0.+-0.5j)*(aux17-aux35))-aux52))+(0.5*(((0.+0.5j)*(aux70-aux88))-aux105));
return output
def coeffscuadraticos33(V,B):
v11,v12,v13,v14=separate(V,0)
v21,v22,v23,v24=separate(V,1)
v31,v32,v33,v34=separate(V,2)
v41,v42,v43,v44=separate(V,3)
b11,b12,b13,b14=separate(B,0)
b21,b22,b23,b24=separate(B,1)
b31,b32,b33,b34=separate(B,2)
b41,b42,b43,b44=separate(B,3)
aux0=(v13*(v24**2))+((0.5*(v14*v34))+((v14*(v22*v34))+((-0.5*(v13*v44))+(v12*(v23*v44)))));
aux1=((-0.25*v13)+((-0.5*(v13*v22))+((0.5*(v12*v23))+aux0)))-(v13*(v22*v44));
aux2=(0.25*(v33*v44))+((0.5*(v11*(v33*v44)))+((0.5*(v22*(v33*v44)))+(v11*(v22*(v33*v44)))));
aux3=(0.5*(v11*(v22*v44)))+((2.*(v12*(v13*(v23*v44))))+((-0.5*((v23**2)*v44))+aux2));
aux4=(0.25*(v11*v44))+((-0.5*((v12**2)*v44))+((-0.5*((v13**2)*v44))+((0.25*(v22*v44))+aux3)));
aux5=(-0.5*(v11*(v34**2)))+(((v12**2)*(v34**2))+((-0.5*(v22*(v34**2)))+((0.125*v44)+aux4)));
aux6=(-2.*(v12*(v13*(v24*v34))))+((v23*(v24*v34))+((2.*(v11*(v23*(v24*v34))))+((-0.25*(v34**2))+aux5)));
aux7=(v13*(v14*v34))+((2.*(v13*(v14*(v22*v34))))+((-2.*(v12*(v14*(v23*v34))))+aux6));
aux8=(0.5*(v11*(v22*v33)))+((2.*(v12*(v14*(v24*v33))))+((-0.5*((v24**2)*v33))+aux7));
aux9=(0.25*(v11*v33))+((-0.5*((v12**2)*v33))+((-0.5*((v14**2)*v33))+((0.25*(v22*v33))+aux8)));
aux10=(-0.25*(v24**2))+((-0.5*(v11*(v24**2)))+(((v13**2)*(v24**2))+((0.125*v33)+aux9)));
aux11=((v14**2)*(v23**2))+((v12*(v14*v24))+((-2.*(v13*(v14*(v23*v24))))+aux10));
aux12=(-0.5*((v14**2)*v22))+((v12*(v13*v23))+((-0.25*(v23**2))+((-0.5*(v11*(v23**2)))+aux11)));
aux13=(-0.25*(v14**2))+((0.125*v22)+((0.25*(v11*v22))+((-0.5*((v13**2)*v22))+aux12)));
aux14=(0.0625+((0.125*v11)+((-0.25*(v12**2))+((-0.25*(v13**2))+aux13))))-((v12**2)*(v33*v44));
aux15=((aux14-(v11*((v23**2)*v44)))-((v13**2)*(v22*v44)))-(v11*(v22*(v34**2)));
aux16=((0.+1.j)*((aux1-(v12*(v24*v34)))-(v14*(v23*v24))))/((aux15-(v11*((v24**2)*v33)))-((v14**2)*(v22*v33)));
aux17=(-0.5*(v24**2))+((0.25*v44)+((0.5*(v11*v44))+((0.5*(v22*v44))+(v11*(v22*v44)))));
aux18=(-0.5*(v14**2))+((0.25*v22)+((0.5*(v11*v22))+((2.*(v12*(v14*v24)))+aux17)));
aux19=((0.125+((0.25*v11)+((-0.5*(v12**2))+aux18)))-((v12**2)*v44))-(v11*(v24**2));
aux20=(0.25*(v33*v44))+((0.5*(v11*(v33*v44)))+((0.5*(v22*(v33*v44)))+(v11*(v22*(v33*v44)))));
aux21=(0.5*(v11*(v22*v44)))+((2.*(v12*(v13*(v23*v44))))+((-0.5*((v23**2)*v44))+aux20));
aux22=(0.25*(v11*v44))+((-0.5*((v12**2)*v44))+((-0.5*((v13**2)*v44))+((0.25*(v22*v44))+aux21)));
aux23=(-0.5*(v11*(v34**2)))+(((v12**2)*(v34**2))+((-0.5*(v22*(v34**2)))+((0.125*v44)+aux22)));
aux24=(-2.*(v12*(v13*(v24*v34))))+((v23*(v24*v34))+((2.*(v11*(v23*(v24*v34))))+((-0.25*(v34**2))+aux23)));
aux25=(v13*(v14*v34))+((2.*(v13*(v14*(v22*v34))))+((-2.*(v12*(v14*(v23*v34))))+aux24));
aux26=(0.5*(v11*(v22*v33)))+((2.*(v12*(v14*(v24*v33))))+((-0.5*((v24**2)*v33))+aux25));
aux27=(0.25*(v11*v33))+((-0.5*((v12**2)*v33))+((-0.5*((v14**2)*v33))+((0.25*(v22*v33))+aux26)));
aux28=(-0.25*(v24**2))+((-0.5*(v11*(v24**2)))+(((v13**2)*(v24**2))+((0.125*v33)+aux27)));
aux29=((v14**2)*(v23**2))+((v12*(v14*v24))+((-2.*(v13*(v14*(v23*v24))))+aux28));
aux30=(-0.5*((v14**2)*v22))+((v12*(v13*v23))+((-0.25*(v23**2))+((-0.5*(v11*(v23**2)))+aux29)));
aux31=(-0.25*(v14**2))+((0.125*v22)+((0.25*(v11*v22))+((-0.5*((v13**2)*v22))+aux30)));
aux32=(0.0625+((0.125*v11)+((-0.25*(v12**2))+((-0.25*(v13**2))+aux31))))-((v12**2)*(v33*v44));
aux33=((aux32-(v11*((v23**2)*v44)))-((v13**2)*(v22*v44)))-(v11*(v22*(v34**2)));
aux34=(aux19-((v14**2)*v22))/((aux33-(v11*((v24**2)*v33)))-((v14**2)*(v22*v33)));
aux35=(-0.5*(b24**2))+((0.25*b44)+((0.5*(b11*b44))+((0.5*(b22*b44))+(b11*(b22*b44)))));
aux36=(-0.5*(b14**2))+((0.25*b22)+((0.5*(b11*b22))+((2.*(b12*(b14*b24)))+aux35)));
aux37=((0.125+((0.25*b11)+((-0.5*(b12**2))+aux36)))-((b12**2)*b44))-(b11*(b24**2));
aux38=(0.25*(b33*b44))+((0.5*(b11*(b33*b44)))+((0.5*(b22*(b33*b44)))+(b11*(b22*(b33*b44)))));
aux39=(0.5*(b11*(b22*b44)))+((2.*(b12*(b13*(b23*b44))))+((-0.5*((b23**2)*b44))+aux38));
aux40=(0.25*(b11*b44))+((-0.5*((b12**2)*b44))+((-0.5*((b13**2)*b44))+((0.25*(b22*b44))+aux39)));
aux41=(-0.5*(b11*(b34**2)))+(((b12**2)*(b34**2))+((-0.5*(b22*(b34**2)))+((0.125*b44)+aux40)));
aux42=(-2.*(b12*(b13*(b24*b34))))+((b23*(b24*b34))+((2.*(b11*(b23*(b24*b34))))+((-0.25*(b34**2))+aux41)));
aux43=(b13*(b14*b34))+((2.*(b13*(b14*(b22*b34))))+((-2.*(b12*(b14*(b23*b34))))+aux42));
aux44=(0.5*(b11*(b22*b33)))+((2.*(b12*(b14*(b24*b33))))+((-0.5*((b24**2)*b33))+aux43));
aux45=(0.25*(b11*b33))+((-0.5*((b12**2)*b33))+((-0.5*((b14**2)*b33))+((0.25*(b22*b33))+aux44)));
aux46=(-0.25*(b24**2))+((-0.5*(b11*(b24**2)))+(((b13**2)*(b24**2))+((0.125*b33)+aux45)));
aux47=((b14**2)*(b23**2))+((b12*(b14*b24))+((-2.*(b13*(b14*(b23*b24))))+aux46));
aux48=(-0.5*((b14**2)*b22))+((b12*(b13*b23))+((-0.25*(b23**2))+((-0.5*(b11*(b23**2)))+aux47)));
aux49=(-0.25*(b14**2))+((0.125*b22)+((0.25*(b11*b22))+((-0.5*((b13**2)*b22))+aux48)));
aux50=(0.0625+((0.125*b11)+((-0.25*(b12**2))+((-0.25*(b13**2))+aux49))))-((b12**2)*(b33*b44));
aux51=((aux50-(b11*((b23**2)*b44)))-((b13**2)*(b22*b44)))-(b11*(b22*(b34**2)));
aux52=(aux37-((b14**2)*b22))/((aux51-(b11*((b24**2)*b33)))-((b14**2)*(b22*b33)));
aux53=(b13*(b24**2))+((0.5*(b14*b34))+((b14*(b22*b34))+((-0.5*(b13*b44))+(b12*(b23*b44)))));
aux54=((-0.25*b13)+((-0.5*(b13*b22))+((0.5*(b12*b23))+aux53)))-(b13*(b22*b44));
aux55=(0.25*(b33*b44))+((0.5*(b11*(b33*b44)))+((0.5*(b22*(b33*b44)))+(b11*(b22*(b33*b44)))));
aux56=(0.5*(b11*(b22*b44)))+((2.*(b12*(b13*(b23*b44))))+((-0.5*((b23**2)*b44))+aux55));
aux57=(0.25*(b11*b44))+((-0.5*((b12**2)*b44))+((-0.5*((b13**2)*b44))+((0.25*(b22*b44))+aux56)));
aux58=(-0.5*(b11*(b34**2)))+(((b12**2)*(b34**2))+((-0.5*(b22*(b34**2)))+((0.125*b44)+aux57)));
aux59=(-2.*(b12*(b13*(b24*b34))))+((b23*(b24*b34))+((2.*(b11*(b23*(b24*b34))))+((-0.25*(b34**2))+aux58)));
aux60=(b13*(b14*b34))+((2.*(b13*(b14*(b22*b34))))+((-2.*(b12*(b14*(b23*b34))))+aux59));
aux61=(0.5*(b11*(b22*b33)))+((2.*(b12*(b14*(b24*b33))))+((-0.5*((b24**2)*b33))+aux60));
aux62=(0.25*(b11*b33))+((-0.5*((b12**2)*b33))+((-0.5*((b14**2)*b33))+((0.25*(b22*b33))+aux61)));
aux63=(-0.25*(b24**2))+((-0.5*(b11*(b24**2)))+(((b13**2)*(b24**2))+((0.125*b33)+aux62)));
aux64=((b14**2)*(b23**2))+((b12*(b14*b24))+((-2.*(b13*(b14*(b23*b24))))+aux63));
aux65=(-0.5*((b14**2)*b22))+((b12*(b13*b23))+((-0.25*(b23**2))+((-0.5*(b11*(b23**2)))+aux64)));
aux66=(-0.25*(b14**2))+((0.125*b22)+((0.25*(b11*b22))+((-0.5*((b13**2)*b22))+aux65)));
aux67=(0.0625+((0.125*b11)+((-0.25*(b12**2))+((-0.25*(b13**2))+aux66))))-((b12**2)*(b33*b44));
aux68=((aux67-(b11*((b23**2)*b44)))-((b13**2)*(b22*b44)))-(b11*(b22*(b34**2)));
aux69=((0.+-1.j)*((aux54-(b12*(b24*b34)))-(b14*(b23*b24))))/((aux68-(b11*((b24**2)*b33)))-((b14**2)*(b22*b33)));
output=(0.25*(aux16-aux34))+(-0.25*(np.conjugate((aux52+aux69))));
return output
def coeffscuadraticos44(V,B):
v11,v12,v13,v14=separate(V,0)
v21,v22,v23,v24=separate(V,1)
v31,v32,v33,v34=separate(V,2)
v41,v42,v43,v44=separate(V,3)
b11,b12,b13,b14=separate(B,0)
b21,b22,b23,b24=separate(B,1)
b31,b32,b33,b34=separate(B,2)
b41,b42,b43,b44=separate(B,3)
aux0=((v13**2)*v24)+((v12*(v14*v33))+((-0.5*(v24*v33))+((0.5*(v23*v34))+(v11*(v23*v34)))));
aux1=((0.5*(v12*v14))+((-0.25*v24)+((-0.5*(v11*v24))+aux0)))-(v12*(v13*v34));
aux2=(0.25*(v33*v44))+((0.5*(v11*(v33*v44)))+((0.5*(v22*(v33*v44)))+(v11*(v22*(v33*v44)))));
aux3=(0.5*(v11*(v22*v44)))+((2.*(v12*(v13*(v23*v44))))+((-0.5*((v23**2)*v44))+aux2));
aux4=(0.25*(v11*v44))+((-0.5*((v12**2)*v44))+((-0.5*((v13**2)*v44))+((0.25*(v22*v44))+aux3)));
aux5=(-0.5*(v11*(v34**2)))+(((v12**2)*(v34**2))+((-0.5*(v22*(v34**2)))+((0.125*v44)+aux4)));
aux6=(-2.*(v12*(v13*(v24*v34))))+((v23*(v24*v34))+((2.*(v11*(v23*(v24*v34))))+((-0.25*(v34**2))+aux5)));
aux7=(v13*(v14*v34))+((2.*(v13*(v14*(v22*v34))))+((-2.*(v12*(v14*(v23*v34))))+aux6));
aux8=(0.5*(v11*(v22*v33)))+((2.*(v12*(v14*(v24*v33))))+((-0.5*((v24**2)*v33))+aux7));
aux9=(0.25*(v11*v33))+((-0.5*((v12**2)*v33))+((-0.5*((v14**2)*v33))+((0.25*(v22*v33))+aux8)));
aux10=(-0.25*(v24**2))+((-0.5*(v11*(v24**2)))+(((v13**2)*(v24**2))+((0.125*v33)+aux9)));
aux11=((v14**2)*(v23**2))+((v12*(v14*v24))+((-2.*(v13*(v14*(v23*v24))))+aux10));
aux12=(-0.5*((v14**2)*v22))+((v12*(v13*v23))+((-0.25*(v23**2))+((-0.5*(v11*(v23**2)))+aux11)));
aux13=(-0.25*(v14**2))+((0.125*v22)+((0.25*(v11*v22))+((-0.5*((v13**2)*v22))+aux12)));
aux14=(0.0625+((0.125*v11)+((-0.25*(v12**2))+((-0.25*(v13**2))+aux13))))-((v12**2)*(v33*v44));
aux15=((aux14-(v11*((v23**2)*v44)))-((v13**2)*(v22*v44)))-(v11*(v22*(v34**2)));
aux16=((0.+1.j)*((aux1-(v11*(v24*v33)))-(v13*(v14*v23))))/((aux15-(v11*((v24**2)*v33)))-((v14**2)*(v22*v33)));
aux17=(-0.5*(v23**2))+((0.25*v33)+((0.5*(v11*v33))+((0.5*(v22*v33))+(v11*(v22*v33)))));
aux18=(-0.5*(v13**2))+((0.25*v22)+((0.5*(v11*v22))+((2.*(v12*(v13*v23)))+aux17)));
aux19=((0.125+((0.25*v11)+((-0.5*(v12**2))+aux18)))-((v12**2)*v33))-(v11*(v23**2));
aux20=(0.25*(v33*v44))+((0.5*(v11*(v33*v44)))+((0.5*(v22*(v33*v44)))+(v11*(v22*(v33*v44)))));
aux21=(0.5*(v11*(v22*v44)))+((2.*(v12*(v13*(v23*v44))))+((-0.5*((v23**2)*v44))+aux20));
aux22=(0.25*(v11*v44))+((-0.5*((v12**2)*v44))+((-0.5*((v13**2)*v44))+((0.25*(v22*v44))+aux21)));
aux23=(-0.5*(v11*(v34**2)))+(((v12**2)*(v34**2))+((-0.5*(v22*(v34**2)))+((0.125*v44)+aux22)));
aux24=(-2.*(v12*(v13*(v24*v34))))+((v23*(v24*v34))+((2.*(v11*(v23*(v24*v34))))+((-0.25*(v34**2))+aux23)));
aux25=(v13*(v14*v34))+((2.*(v13*(v14*(v22*v34))))+((-2.*(v12*(v14*(v23*v34))))+aux24));
aux26=(0.5*(v11*(v22*v33)))+((2.*(v12*(v14*(v24*v33))))+((-0.5*((v24**2)*v33))+aux25));
aux27=(0.25*(v11*v33))+((-0.5*((v12**2)*v33))+((-0.5*((v14**2)*v33))+((0.25*(v22*v33))+aux26)));
aux28=(-0.25*(v24**2))+((-0.5*(v11*(v24**2)))+(((v13**2)*(v24**2))+((0.125*v33)+aux27)));
aux29=((v14**2)*(v23**2))+((v12*(v14*v24))+((-2.*(v13*(v14*(v23*v24))))+aux28));
aux30=(-0.5*((v14**2)*v22))+((v12*(v13*v23))+((-0.25*(v23**2))+((-0.5*(v11*(v23**2)))+aux29)));
aux31=(-0.25*(v14**2))+((0.125*v22)+((0.25*(v11*v22))+((-0.5*((v13**2)*v22))+aux30)));
aux32=(0.0625+((0.125*v11)+((-0.25*(v12**2))+((-0.25*(v13**2))+aux31))))-((v12**2)*(v33*v44));
aux33=((aux32-(v11*((v23**2)*v44)))-((v13**2)*(v22*v44)))-(v11*(v22*(v34**2)));
aux34=(aux19-((v13**2)*v22))/((aux33-(v11*((v24**2)*v33)))-((v14**2)*(v22*v33)));
aux35=(-0.5*(b23**2))+((0.25*b33)+((0.5*(b11*b33))+((0.5*(b22*b33))+(b11*(b22*b33)))));
aux36=(-0.5*(b13**2))+((0.25*b22)+((0.5*(b11*b22))+((2.*(b12*(b13*b23)))+aux35)));
aux37=((0.125+((0.25*b11)+((-0.5*(b12**2))+aux36)))-((b12**2)*b33))-(b11*(b23**2));
aux38=(0.25*(b33*b44))+((0.5*(b11*(b33*b44)))+((0.5*(b22*(b33*b44)))+(b11*(b22*(b33*b44)))));
aux39=(0.5*(b11*(b22*b44)))+((2.*(b12*(b13*(b23*b44))))+((-0.5*((b23**2)*b44))+aux38));
aux40=(0.25*(b11*b44))+((-0.5*((b12**2)*b44))+((-0.5*((b13**2)*b44))+((0.25*(b22*b44))+aux39)));
aux41=(-0.5*(b11*(b34**2)))+(((b12**2)*(b34**2))+((-0.5*(b22*(b34**2)))+((0.125*b44)+aux40)));
aux42=(-2.*(b12*(b13*(b24*b34))))+((b23*(b24*b34))+((2.*(b11*(b23*(b24*b34))))+((-0.25*(b34**2))+aux41)));
aux43=(b13*(b14*b34))+((2.*(b13*(b14*(b22*b34))))+((-2.*(b12*(b14*(b23*b34))))+aux42));
aux44=(0.5*(b11*(b22*b33)))+((2.*(b12*(b14*(b24*b33))))+((-0.5*((b24**2)*b33))+aux43));
aux45=(0.25*(b11*b33))+((-0.5*((b12**2)*b33))+((-0.5*((b14**2)*b33))+((0.25*(b22*b33))+aux44)));
aux46=(-0.25*(b24**2))+((-0.5*(b11*(b24**2)))+(((b13**2)*(b24**2))+((0.125*b33)+aux45)));
aux47=((b14**2)*(b23**2))+((b12*(b14*b24))+((-2.*(b13*(b14*(b23*b24))))+aux46));
aux48=(-0.5*((b14**2)*b22))+((b12*(b13*b23))+((-0.25*(b23**2))+((-0.5*(b11*(b23**2)))+aux47)));
aux49=(-0.25*(b14**2))+((0.125*b22)+((0.25*(b11*b22))+((-0.5*((b13**2)*b22))+aux48)));
aux50=(0.0625+((0.125*b11)+((-0.25*(b12**2))+((-0.25*(b13**2))+aux49))))-((b12**2)*(b33*b44));
aux51=((aux50-(b11*((b23**2)*b44)))-((b13**2)*(b22*b44)))-(b11*(b22*(b34**2)));
aux52=(aux37-((b13**2)*b22))/((aux51-(b11*((b24**2)*b33)))-((b14**2)*(b22*b33)));
aux53=((b13**2)*b24)+((b12*(b14*b33))+((-0.5*(b24*b33))+((0.5*(b23*b34))+(b11*(b23*b34)))));
aux54=((0.5*(b12*b14))+((-0.25*b24)+((-0.5*(b11*b24))+aux53)))-(b12*(b13*b34));
aux55=(0.25*(b33*b44))+((0.5*(b11*(b33*b44)))+((0.5*(b22*(b33*b44)))+(b11*(b22*(b33*b44)))));
aux56=(0.5*(b11*(b22*b44)))+((2.*(b12*(b13*(b23*b44))))+((-0.5*((b23**2)*b44))+aux55));
aux57=(0.25*(b11*b44))+((-0.5*((b12**2)*b44))+((-0.5*((b13**2)*b44))+((0.25*(b22*b44))+aux56)));
aux58=(-0.5*(b11*(b34**2)))+(((b12**2)*(b34**2))+((-0.5*(b22*(b34**2)))+((0.125*b44)+aux57)));
aux59=(-2.*(b12*(b13*(b24*b34))))+((b23*(b24*b34))+((2.*(b11*(b23*(b24*b34))))+((-0.25*(b34**2))+aux58)));
aux60=(b13*(b14*b34))+((2.*(b13*(b14*(b22*b34))))+((-2.*(b12*(b14*(b23*b34))))+aux59));
aux61=(0.5*(b11*(b22*b33)))+((2.*(b12*(b14*(b24*b33))))+((-0.5*((b24**2)*b33))+aux60));
aux62=(0.25*(b11*b33))+((-0.5*((b12**2)*b33))+((-0.5*((b14**2)*b33))+((0.25*(b22*b33))+aux61)));
aux63=(-0.25*(b24**2))+((-0.5*(b11*(b24**2)))+(((b13**2)*(b24**2))+((0.125*b33)+aux62)));
aux64=((b14**2)*(b23**2))+((b12*(b14*b24))+((-2.*(b13*(b14*(b23*b24))))+aux63));
aux65=(-0.5*((b14**2)*b22))+((b12*(b13*b23))+((-0.25*(b23**2))+((-0.5*(b11*(b23**2)))+aux64)));
aux66=(-0.25*(b14**2))+((0.125*b22)+((0.25*(b11*b22))+((-0.5*((b13**2)*b22))+aux65)));
aux67=(0.0625+((0.125*b11)+((-0.25*(b12**2))+((-0.25*(b13**2))+aux66))))-((b12**2)*(b33*b44));
aux68=((aux67-(b11*((b23**2)*b44)))-((b13**2)*(b22*b44)))-(b11*(b22*(b34**2)));
aux69=((0.+-1.j)*((aux54-(b11*(b24*b33)))-(b13*(b14*b23))))/((aux68-(b11*((b24**2)*b33)))-((b14**2)*(b22*b33)));
output=(0.25*(aux16-aux34))+(-0.25*(np.conjugate((aux52+aux69))));
return output
def lineal1(V,B,R,S):
v11,v12,v13,v14=separate(V,0)
v21,v22,v23,v24=separate(V,1)
v31,v32,v33,v34=separate(V,2)
v41,v42,v43,v44=separate(V,3)
b11,b12,b13,b14=separate(B,0)
b21,b22,b23,b24=separate(B,1)
b31,b32,b33,b34=separate(B,2)
b41,b42,b43,b44=separate(B,3)
r1,r2,r3,r4=R[0],R[1],R[2],R[3]
s1,s2,s3,s4=S[0],S[1],S[2],S[3]
aux0=(2.*b33)+(((0.+-8.j)*(b24*b33))+((b22*(2.+(4.*b33)))+((0.+8.j)*(b23*b34))));
aux1=((0.+-2.j)*(b14*b34))+(((0.+-2.j)*(b23*b34))+((-4.*(b34**2))+((2.*b44)+(4.*(b33*b44)))));
aux2=b13+(b24+((2.*(b24*b33))+((2.*(b13*b44))+((0.+-1.j)*(1.+((2.*b33)+aux1))))));
aux3=(2.*(b23*b44))+((4.*(b11*(b23*b44)))+(((0.+-8.j)*(b13*(b23*b44)))+(-2.*(b12*aux2))));
aux4=(b14*(1.+((-4.*(b23**2))+(((0.+-4.j)*b24)+((4.*(b13*b24))+aux0)))))+aux3;
aux5=(-2.*(b24*b34))+((-4.*(b11*(b24*b34)))+(((0.+8.j)*(b13*(b24*b34)))+aux4));
aux6=(-4.*((b14**2)*b23))+((4.*(b13*(b23*b24)))+((-2.*(b13*b34))+((-4.*(b13*(b22*b34)))+aux5)));
aux7=(b14*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))))+(b13*(b23+((-2.*(b24*b34))+(2.*(b23*b44)))));
aux8=(-4.*((b23**2)*(1.+(2.*b44))))+(b22*(2.+((-8.*(b34**2))+((4.*b44)+(b33*(4.+(8.*b44)))))));
aux9=(16.*(b23*(b24*b34)))+((-4.*(b34**2))+((2.*b44)+((4.*(b33*b44))+aux8)));
aux10=(16.*(b12*aux7))+(2.*(b11*(1.+((-4.*(b24**2))+((2.*b33)+((-8.*((b24**2)*b33))+aux9))))));
aux11=(-4.*((b12**2)*(1.+((-4.*(b34**2))+((2.*b44)+(b33*(2.+(4.*b44))))))))+aux10;
aux12=(-16.*((b13**2)*(b22*b44)))+((-8.*((b23**2)*b44))+((4.*(b33*b44))+((8.*(b22*(b33*b44)))+aux11)));
aux13=(-8.*(b22*(b34**2)))+((2.*b44)+((-8.*((b13**2)*b44))+((4.*(b22*b44))+aux12)));
aux14=(32.*(b13*(b14*(b22*b34))))+((16.*(b23*(b24*b34)))+((-4.*(b34**2))+aux13));
aux15=(-16.*((b14**2)*(b22*b33)))+((-8.*((b24**2)*b33))+((16.*(b13*(b14*b34)))+aux14));
aux16=(16.*((b13**2)*(b24**2)))+((2.*b33)+((-8.*((b14**2)*b33))+((4.*(b22*b33))+aux15)));
aux17=(16.*((b14**2)*(b23**2)))+((-32.*(b13*(b14*(b23*b24))))+((-4.*(b24**2))+aux16));
aux18=(2.*b22)+((-8.*((b13**2)*b22))+((-8.*((b14**2)*b22))+((-4.*(b23**2))+aux17)));
aux19=((0.+2.j)*((b23+((2.*(b11*b23))+(((0.+-4.j)*(b13*b23))+aux6)))*s2))/(1.+((-4.*(b13**2))+((-4.*(b14**2))+aux18)));
aux20=(b14*((-2.*(b23*b24))+(b34+(2.*(b22*b34)))))+(b12*(b23+((-2.*(b24*b34))+(2.*(b23*b44)))));
aux21=(-4.*((b23**2)*b44))+((2.*(b33*b44))+((4.*(b22*(b33*b44)))+((b12**2)*(2.+(4.*b44)))));
aux22=(-4.*((b24**2)*b33))+((8.*(b23*(b24*b34)))+((-2.*(b34**2))+((-4.*(b22*(b34**2)))+aux21)));
aux23=(4.*((b14**2)*b22))+((-2.*(b23**2))+((-8.*(b12*(b14*b24)))+(b33+((2.*(b22*b33))+aux22))));
aux24=((2.*(b14**2))+aux23)-(b11*(1.+((-4.*(b24**2))+((2.*b44)+(b22*(2.+(4.*b44)))))));
aux25=(b14*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))))+(b13*(b23+((-2.*(b24*b34))+(2.*(b23*b44)))));
aux26=(-4.*((b23**2)*(1.+(2.*b44))))+(b22*(2.+((-8.*(b34**2))+((4.*b44)+(b33*(4.+(8.*b44)))))));
aux27=(16.*(b23*(b24*b34)))+((-4.*(b34**2))+((2.*b44)+((4.*(b33*b44))+aux26)));
aux28=-2.*(b11*(1.+((-4.*(b24**2))+((2.*b33)+((-8.*((b24**2)*b33))+aux27)))));
aux29=(4.*((b12**2)*(1.+((-4.*(b34**2))+((2.*b44)+(b33*(2.+(4.*b44))))))))+((-16.*(b12*aux25))+aux28);
aux30=(16.*((b13**2)*(b22*b44)))+((8.*((b23**2)*b44))+((-4.*(b33*b44))+((-8.*(b22*(b33*b44)))+aux29)));
aux31=(8.*(b22*(b34**2)))+((-2.*b44)+((8.*((b13**2)*b44))+((-4.*(b22*b44))+aux30)));
aux32=(-32.*(b13*(b14*(b22*b34))))+((-16.*(b23*(b24*b34)))+((4.*(b34**2))+aux31));
aux33=(16.*((b14**2)*(b22*b33)))+((8.*((b24**2)*b33))+((-16.*(b13*(b14*b34)))+aux32));
aux34=(-16.*((b13**2)*(b24**2)))+((-2.*b33)+((8.*((b14**2)*b33))+((-4.*(b22*b33))+aux33)));
aux35=(-16.*((b14**2)*(b23**2)))+((32.*(b13*(b14*(b23*b24))))+((4.*(b24**2))+aux34));
aux36=(-2.*b22)+((8.*((b13**2)*b22))+((8.*((b14**2)*b22))+((4.*(b23**2))+aux35)));
aux37=((0.+2.j)*aux24)+((0.+1.j)*(-1.+((4.*(b13**2))+((4.*(b14**2))+aux36))));
aux38=(-4.*(b13*(1.+((-4.*(b24**2))+((2.*b44)+(b22*(2.+(4.*b44))))))))+((8.*aux20)+aux37);
aux39=(b14*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))))+(b13*(b23+((-2.*(b24*b34))+(2.*(b23*b44)))));
aux40=(-4.*((b23**2)*(1.+(2.*b44))))+(b22*(2.+((-8.*(b34**2))+((4.*b44)+(b33*(4.+(8.*b44)))))));
aux41=(16.*(b23*(b24*b34)))+((-4.*(b34**2))+((2.*b44)+((4.*(b33*b44))+aux40)));
aux42=(16.*(b12*aux39))+(2.*(b11*(1.+((-4.*(b24**2))+((2.*b33)+((-8.*((b24**2)*b33))+aux41))))));
aux43=(-4.*((b12**2)*(1.+((-4.*(b34**2))+((2.*b44)+(b33*(2.+(4.*b44))))))))+aux42;
aux44=(-16.*((b13**2)*(b22*b44)))+((-8.*((b23**2)*b44))+((4.*(b33*b44))+((8.*(b22*(b33*b44)))+aux43)));
aux45=(-8.*(b22*(b34**2)))+((2.*b44)+((-8.*((b13**2)*b44))+((4.*(b22*b44))+aux44)));
aux46=(32.*(b13*(b14*(b22*b34))))+((16.*(b23*(b24*b34)))+((-4.*(b34**2))+aux45));
aux47=(-16.*((b14**2)*(b22*b33)))+((-8.*((b24**2)*b33))+((16.*(b13*(b14*b34)))+aux46));
aux48=(16.*((b13**2)*(b24**2)))+((2.*b33)+((-8.*((b14**2)*b33))+((4.*(b22*b33))+aux47)));
aux49=(16.*((b14**2)*(b23**2)))+((-32.*(b13*(b14*(b23*b24))))+((-4.*(b24**2))+aux48));
aux50=(2.*b22)+((-8.*((b13**2)*b22))+((-8.*((b14**2)*b22))+((-4.*(b23**2))+aux49)));
aux51=(b13*((-2.*(b23*b24))+(b34+(2.*(b22*b34)))))+(b12*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))));
aux52=-2.*(b13*((b14+((2.*(b14*b22))+((2.*(b24*b34))+(-2.*(b23*b44)))))-b23));
aux53=(4.*(b14*b23))+((4.*(b13*b24))+((-2.*b33)+((4.*(b34**2))+((-2.*b44)+(-4.*(b33*b44))))));
aux54=(2.*(b22*b34))+((4.*(b11*(b22*b34)))+((-4.*(b14*(b23*b34)))+(aux52+(b12*(-1.+aux53)))));
aux55=(4.*(b14*(b24*b33)))+(b34+((2.*(b11*b34))+((-4.*((b12**2)*b34))+aux54)));
aux56=(0.+2.j)*((2.*(b14*b24))+((-2.*(b23*b24))+((-4.*(b11*(b23*b24)))+aux55)));
aux57=(-4.*(b14*(1.+((-4.*(b23**2))+((2.*b33)+(b22*(2.+(4.*b33))))))))+((8.*aux51)+aux56);
aux58=(b14*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))))+(b13*(b23+((-2.*(b24*b34))+(2.*(b23*b44)))));
aux59=(-4.*((b23**2)*(1.+(2.*b44))))+(b22*(2.+((-8.*(b34**2))+((4.*b44)+(b33*(4.+(8.*b44)))))));
aux60=(16.*(b23*(b24*b34)))+((-4.*(b34**2))+((2.*b44)+((4.*(b33*b44))+aux59)));
aux61=(16.*(b12*aux58))+(2.*(b11*(1.+((-4.*(b24**2))+((2.*b33)+((-8.*((b24**2)*b33))+aux60))))));
aux62=(-4.*((b12**2)*(1.+((-4.*(b34**2))+((2.*b44)+(b33*(2.+(4.*b44))))))))+aux61;
aux63=(-16.*((b13**2)*(b22*b44)))+((-8.*((b23**2)*b44))+((4.*(b33*b44))+((8.*(b22*(b33*b44)))+aux62)));
aux64=(-8.*(b22*(b34**2)))+((2.*b44)+((-8.*((b13**2)*b44))+((4.*(b22*b44))+aux63)));
aux65=(32.*(b13*(b14*(b22*b34))))+((16.*(b23*(b24*b34)))+((-4.*(b34**2))+aux64));
aux66=(-16.*((b14**2)*(b22*b33)))+((-8.*((b24**2)*b33))+((16.*(b13*(b14*b34)))+aux65));
aux67=(16.*((b13**2)*(b24**2)))+((2.*b33)+((-8.*((b14**2)*b33))+((4.*(b22*b33))+aux66)));
aux68=(16.*((b14**2)*(b23**2)))+((-32.*(b13*(b14*(b23*b24))))+((-4.*(b24**2))+aux67));
aux69=(2.*b22)+((-8.*((b13**2)*b22))+((-8.*((b14**2)*b22))+((-4.*(b23**2))+aux68)));
aux70=(-8.*(v11*(v33*v44)))+((16.*((v12**2)*(v33*v44)))+(-16.*(v11*(v22*(v33*v44)))));
aux71=((0.+16.j)*(v12*(v23*v44)))+((-32.*(v12*(v13*(v23*v44))))+((16.*(v11*((v23**2)*v44)))+aux70));
aux72=(-16.*(v11*(v22*v44)))+(((0.+-16.j)*(v13*(v22*v44)))+((16.*((v13**2)*(v22*v44)))+aux71));
aux73=(16.*((v12**2)*v44))+(((0.+-8.j)*(v13*v44))+((8.*((v13**2)*v44))+((-4.*(v22*v44))+aux72)));
aux74=(-16.*((v12**2)*(v34**2)))+((16.*(v11*(v22*(v34**2))))+((-2.*v44)+((-8.*(v11*v44))+aux73)));
aux75=(32.*(v12*(v13*(v24*v34))))+((-32.*(v11*(v23*(v24*v34))))+((8.*(v11*(v34**2)))+aux74));
aux76=(-32.*(v13*(v14*(v22*v34))))+((32.*(v12*(v14*(v23*v34))))+(((0.+-16.j)*(v12*(v24*v34)))+aux75));
aux77=((0.+8.j)*(v14*v34))+((-16.*(v13*(v14*v34)))+(((0.+16.j)*(v14*(v22*v34)))+aux76));
aux78=(16.*((v14**2)*(v22*v33)))+((-32.*(v12*(v14*(v24*v33))))+((16.*(v11*((v24**2)*v33)))+aux77));
aux79=(8.*((v12**2)*v33))+((8.*((v14**2)*v33))+((-8.*(v11*(v22*v33)))+aux78));
aux80=((0.+16.j)*(v13*(v24**2)))+((-16.*((v13**2)*(v24**2)))+((-4.*(v11*v33))+aux79));
aux81=(32.*(v13*(v14*(v23*v24))))+((4.*(v24**2))+((16.*(v11*(v24**2)))+aux80));
aux82=(-16.*((v14**2)*(v23**2)))+((-32.*(v12*(v14*v24)))+(((0.+-16.j)*(v14*(v23*v24)))+aux81));
aux83=((0.+8.j)*(v12*v23))+((-16.*(v12*(v13*v23)))+((8.*(v11*(v23**2)))+aux82));
aux84=((0.+-8.j)*(v13*v22))+((8.*((v13**2)*v22))+((16.*((v14**2)*v22))+aux83));
aux85=((0.+-4.j)*v13)+((4.*(v13**2))+((8.*(v14**2))+((-2.*v22)+((-8.*(v11*v22))+aux84))));
aux86=(v14*(v24+((2.*(v24*v33))+(-2.*(v23*v34)))))+(v13*(v23+((-2.*(v24*v34))+(2.*(v23*v44)))));
aux87=(-4.*((v23**2)*(1.+(2.*v44))))+(v22*(2.+((-8.*(v34**2))+((4.*v44)+(v33*(4.+(8.*v44)))))));
aux88=(16.*(v23*(v24*v34)))+((-4.*(v34**2))+((2.*v44)+((4.*(v33*v44))+aux87)));
aux89=-2.*(v11*(1.+((-4.*(v24**2))+((2.*v33)+((-8.*((v24**2)*v33))+aux88)))));
aux90=(4.*((v12**2)*(1.+((-4.*(v34**2))+((2.*v44)+(v33*(2.+(4.*v44))))))))+((-16.*(v12*aux86))+aux89);
aux91=(16.*((v13**2)*(v22*v44)))+((8.*((v23**2)*v44))+((-4.*(v33*v44))+((-8.*(v22*(v33*v44)))+aux90)));
aux92=(8.*(v22*(v34**2)))+((-2.*v44)+((8.*((v13**2)*v44))+((-4.*(v22*v44))+aux91)));
aux93=(-32.*(v13*(v14*(v22*v34))))+((-16.*(v23*(v24*v34)))+((4.*(v34**2))+aux92));
aux94=(16.*((v14**2)*(v22*v33)))+((8.*((v24**2)*v33))+((-16.*(v13*(v14*v34)))+aux93));
aux95=(-16.*((v13**2)*(v24**2)))+((-2.*v33)+((8.*((v14**2)*v33))+((-4.*(v22*v33))+aux94)));
aux96=(-16.*((v14**2)*(v23**2)))+((32.*(v13*(v14*(v23*v24))))+((4.*(v24**2))+aux95));
aux97=(-2.*v22)+((8.*((v13**2)*v22))+((8.*((v14**2)*v22))+((4.*(v23**2))+aux96)));
aux98=((0.+1.j)*(r3*(-1.+((-4.*v11)+((8.*(v12**2))+aux85)))))/(-1.+((4.*(v13**2))+((4.*(v14**2))+aux97)));
aux99=((0.+-16.j)*((v12**2)*(v33*v44)))+(((0.+24.j)*(v22*(v33*v44)))+((0.+16.j)*(v11*(v22*(v33*v44)))));
aux100=((0.+-16.j)*(v11*((v23**2)*v44)))+(((0.+12.j)*(v33*v44))+(((0.+8.j)*(v11*(v33*v44)))+aux99));
aux101=(-16.*(v12*(v23*v44)))+(((0.+32.j)*(v12*(v13*(v23*v44))))+(((0.+-24.j)*((v23**2)*v44))+aux100));
aux102=((0.+8.j)*(v11*(v22*v44)))+((16.*(v13*(v22*v44)))+(((0.+-16.j)*((v13**2)*(v22*v44)))+aux101));
aux103=(8.*(v13*v44))+(((0.+-8.j)*((v13**2)*v44))+(((0.+12.j)*(v22*v44))+aux102));
aux104=((0.+6.j)*v44)+(((0.+4.j)*(v11*v44))+(((0.+-8.j)*((v12**2)*v44))+aux103));
aux105=((0.+16.j)*((v12**2)*(v34**2)))+(((0.+-24.j)*(v22*(v34**2)))+(((0.+-16.j)*(v11*(v22*(v34**2))))+aux104));
aux106=((0.+32.j)*(v11*(v23*(v24*v34))))+(((0.+-12.j)*(v34**2))+(((0.+-8.j)*(v11*(v34**2)))+aux105));
aux107=((0.+-32.j)*(v12*(v13*(v24*v34))))+(((0.+48.j)*(v23*(v24*v34)))+aux106);
aux108=((0.+32.j)*(v13*(v14*(v22*v34))))+(((0.+-32.j)*(v12*(v14*(v23*v34))))+((16.*(v12*(v24*v34)))+aux107));
aux109=(-8.*(v14*v34))+(((0.+16.j)*(v13*(v14*v34)))+((-16.*(v14*(v22*v34)))+aux108));
aux110=((0.+32.j)*(v12*(v14*(v24*v33))))+(((0.+-24.j)*((v24**2)*v33))+(((0.+-16.j)*(v11*((v24**2)*v33)))+aux109));
aux111=((0.+12.j)*(v22*v33))+(((0.+8.j)*(v11*(v22*v33)))+(((0.+-16.j)*((v14**2)*(v22*v33)))+aux110));
aux112=((0.+4.j)*(v11*v33))+(((0.+-8.j)*((v12**2)*v33))+(((0.+-8.j)*((v14**2)*v33))+aux111));
aux113=(-16.*(v13*(v24**2)))+(((0.+16.j)*((v13**2)*(v24**2)))+(((0.+6.j)*v33)+aux112));
aux114=((0.+-32.j)*(v13*(v14*(v23*v24))))+(((0.+-12.j)*(v24**2))+(((0.+-8.j)*(v11*(v24**2)))+aux113));
aux115=((0.+16.j)*((v14**2)*(v23**2)))+(((0.+16.j)*(v12*(v14*v24)))+((16.*(v14*(v23*v24)))+aux114));
aux116=((0.+16.j)*(v12*(v13*v23)))+(((0.+-12.j)*(v23**2))+(((0.+-8.j)*(v11*(v23**2)))+aux115));
aux117=((0.+-8.j)*((v13**2)*v22))+(((0.+-8.j)*((v14**2)*v22))+((-8.*(v12*v23))+aux116));
aux118=((0.+-4.j)*(v14**2))+(((0.+6.j)*v22)+(((0.+4.j)*(v11*v22))+((8.*(v13*v22))+aux117)));
aux119=((0.+2.j)*v11)+(((0.+-4.j)*(v12**2))+((4.*v13)+(((0.+-4.j)*(v13**2))+aux118)));
aux120=(v14*(v24+((2.*(v24*v33))+(-2.*(v23*v34)))))+(v13*(v23+((-2.*(v24*v34))+(2.*(v23*v44)))));
aux121=(-4.*((v23**2)*(1.+(2.*v44))))+(v22*(2.+((-8.*(v34**2))+((4.*v44)+(v33*(4.+(8.*v44)))))));
aux122=(16.*(v23*(v24*v34)))+((-4.*(v34**2))+((2.*v44)+((4.*(v33*v44))+aux121)));
aux123=-2.*(v11*(1.+((-4.*(v24**2))+((2.*v33)+((-8.*((v24**2)*v33))+aux122)))));
aux124=(4.*((v12**2)*(1.+((-4.*(v34**2))+((2.*v44)+(v33*(2.+(4.*v44))))))))+((-16.*(v12*aux120))+aux123);
aux125=(16.*((v13**2)*(v22*v44)))+((8.*((v23**2)*v44))+((-4.*(v33*v44))+((-8.*(v22*(v33*v44)))+aux124)));
aux126=(8.*(v22*(v34**2)))+((-2.*v44)+((8.*((v13**2)*v44))+((-4.*(v22*v44))+aux125)));
aux127=(-32.*(v13*(v14*(v22*v34))))+((-16.*(v23*(v24*v34)))+((4.*(v34**2))+aux126));
aux128=(16.*((v14**2)*(v22*v33)))+((8.*((v24**2)*v33))+((-16.*(v13*(v14*v34)))+aux127));
aux129=(-16.*((v13**2)*(v24**2)))+((-2.*v33)+((8.*((v14**2)*v33))+((-4.*(v22*v33))+aux128)));
aux130=(-16.*((v14**2)*(v23**2)))+((32.*(v13*(v14*(v23*v24))))+((4.*(v24**2))+aux129));
aux131=(-2.*v22)+((8.*((v13**2)*v22))+((8.*((v14**2)*v22))+((4.*(v23**2))+aux130)));
aux132=((0.+1.j)*(r1*((0.+3.j)+aux119)))/(-1.+((4.*(v13**2))+((4.*(v14**2))+aux131)));
aux133=(-8.*(v11*(v23*v44)))+(((0.+-16.j)*(v13*(v23*v44)))+((0.+16.j)*(v12*(v33*v44))));
aux134=((0.+-16.j)*(v12*(v34**2)))+(((0.+8.j)*(v12*v44))+((8.*(v12*(v13*v44)))+((-4.*(v23*v44))+aux133)));
aux135=(4.*(v24*v34))+((8.*(v11*(v24*v34)))+(((0.+16.j)*(v13*(v24*v34)))+aux134));
aux136=(8.*(v13*(v22*v34)))+((-8.*(v12*(v23*v34)))+(((0.+16.j)*(v14*(v23*v34)))+aux135));
aux137=((0.+-16.j)*(v14*(v24*v33)))+((4.*(v13*v34))+((-8.*(v12*(v14*v34)))+aux136));
aux138=((0.+8.j)*(v12*v33))+((-4.*(v14*v33))+((-8.*(v14*(v22*v33)))+((8.*(v12*(v24*v33)))+aux137)));
aux139=((0.+-8.j)*(v14*v24))+((-8.*(v13*(v14*v24)))+((-8.*(v13*(v23*v24)))+aux138));
aux140=((0.+-8.j)*(v13*v23))+((8.*((v14**2)*v23))+((8.*(v14*(v23**2)))+((4.*(v12*v24))+aux139)));
aux141=(4.*(v12*v13))+((-2.*v14)+((-4.*(v14*v22))+((-2.*v23)+((-4.*(v11*v23))+aux140))));
aux142=(v14*(v24+((2.*(v24*v33))+(-2.*(v23*v34)))))+(v13*(v23+((-2.*(v24*v34))+(2.*(v23*v44)))));
aux143=(-4.*((v23**2)*(1.+(2.*v44))))+(v22*(2.+((-8.*(v34**2))+((4.*v44)+(v33*(4.+(8.*v44)))))));
aux144=(16.*(v23*(v24*v34)))+((-4.*(v34**2))+((2.*v44)+((4.*(v33*v44))+aux143)));
aux145=2.*(v11*(1.+((-4.*(v24**2))+((2.*v33)+((-8.*((v24**2)*v33))+aux144)))));
aux146=(-4.*((v12**2)*(1.+((-4.*(v34**2))+((2.*v44)+(v33*(2.+(4.*v44))))))))+((16.*(v12*aux142))+aux145);
aux147=(-16.*((v13**2)*(v22*v44)))+((-8.*((v23**2)*v44))+((4.*(v33*v44))+((8.*(v22*(v33*v44)))+aux146)));
aux148=(-8.*(v22*(v34**2)))+((2.*v44)+((-8.*((v13**2)*v44))+((4.*(v22*v44))+aux147)));
aux149=(32.*(v13*(v14*(v22*v34))))+((16.*(v23*(v24*v34)))+((-4.*(v34**2))+aux148));
aux150=(-16.*((v14**2)*(v22*v33)))+((-8.*((v24**2)*v33))+((16.*(v13*(v14*v34)))+aux149));
aux151=(16.*((v13**2)*(v24**2)))+((2.*v33)+((-8.*((v14**2)*v33))+((4.*(v22*v33))+aux150)));
aux152=(16.*((v14**2)*(v23**2)))+((-32.*(v13*(v14*(v23*v24))))+((-4.*(v24**2))+aux151));
aux153=(2.*v22)+((-8.*((v13**2)*v22))+((-8.*((v14**2)*v22))+((-4.*(v23**2))+aux152)));
aux154=((0.+1.j)*(r2*(((0.+4.j)*v12)+aux141)))/(1.+((-4.*(v13**2))+((-4.*(v14**2))+aux153)));
aux155=(-8.*(v12*(v34**2)))+((4.*(v12*v44))+((-8.*(v13*(v23*v44)))+(8.*(v12*(v33*v44)))));
aux156=((0.+16.j)*(v12*(v23*v34)))+((8.*(v14*(v23*v34)))+((8.*(v13*(v24*v34)))+aux155));
aux157=(-4.*(v22*v34))+((-8.*(v11*(v22*v34)))+(((0.+-16.j)*(v13*(v22*v34)))+aux156));
aux158=(-2.*v34)+((-4.*(v11*v34))+((8.*((v12**2)*v34))+(((0.+-8.j)*(v13*v34))+aux157)));
aux159=((0.+16.j)*(v14*(v22*v33)))+(((0.+-16.j)*(v12*(v24*v33)))+((-8.*(v14*(v24*v33)))+aux158));
aux160=((0.+16.j)*(v13*(v23*v24)))+((4.*(v12*v33))+(((0.+8.j)*(v14*v33))+aux159));
aux161=(-8.*(v12*(v13*v24)))+((-4.*(v14*v24))+((4.*(v23*v24))+((8.*(v11*(v23*v24)))+aux160)));
aux162=(-8.*(v12*(v14*v23)))+(((0.+-16.j)*(v14*(v23**2)))+(((0.+-8.j)*(v12*v24))+aux161));
aux163=(4.*(v13*v14))+(((0.+8.j)*(v14*v22))+((8.*(v13*(v14*v22)))+((-4.*(v13*v23))+aux162)));
aux164=(v14*(v24+((2.*(v24*v33))+(-2.*(v23*v34)))))+(v13*(v23+((-2.*(v24*v34))+(2.*(v23*v44)))));
aux165=(-4.*((v23**2)*(1.+(2.*v44))))+(v22*(2.+((-8.*(v34**2))+((4.*v44)+(v33*(4.+(8.*v44)))))));
aux166=(16.*(v23*(v24*v34)))+((-4.*(v34**2))+((2.*v44)+((4.*(v33*v44))+aux165)));
aux167=2.*(v11*(1.+((-4.*(v24**2))+((2.*v33)+((-8.*((v24**2)*v33))+aux166)))));
aux168=(-4.*((v12**2)*(1.+((-4.*(v34**2))+((2.*v44)+(v33*(2.+(4.*v44))))))))+((16.*(v12*aux164))+aux167);
aux169=(-16.*((v13**2)*(v22*v44)))+((-8.*((v23**2)*v44))+((4.*(v33*v44))+((8.*(v22*(v33*v44)))+aux168)));
aux170=(-8.*(v22*(v34**2)))+((2.*v44)+((-8.*((v13**2)*v44))+((4.*(v22*v44))+aux169)));
aux171=(32.*(v13*(v14*(v22*v34))))+((16.*(v23*(v24*v34)))+((-4.*(v34**2))+aux170));
aux172=(-16.*((v14**2)*(v22*v33)))+((-8.*((v24**2)*v33))+((16.*(v13*(v14*v34)))+aux171));
aux173=(16.*((v13**2)*(v24**2)))+((2.*v33)+((-8.*((v14**2)*v33))+((4.*(v22*v33))+aux172)));
aux174=(16.*((v14**2)*(v23**2)))+((-32.*(v13*(v14*(v23*v24))))+((-4.*(v24**2))+aux173));
aux175=(2.*v22)+((-8.*((v13**2)*v22))+((-8.*((v14**2)*v22))+((-4.*(v23**2))+aux174)));
aux176=((0.+1.j)*(r4*((2.*v12)+(((0.+4.j)*v14)+aux163))))/(1.+((-4.*(v13**2))+((-4.*(v14**2))+aux175)));
aux177=v23*((0.+-1.j)+((-4.*(v14*v34))+(((0.+-2.j)*v44)+(v13*(2.+(4.*v44))))));
aux178=v12*((2.*(v24*(v14+((2.*(v14*v33))+(((0.+1.j)+(-2.*v13))*v34)))))+aux177);
aux179=(-4.*((v23**2)*(1.+(2.*v44))))+(v22*(2.+((-8.*(v34**2))+((4.*v44)+(v33*(4.+(8.*v44)))))));
aux180=(16.*(v23*(v24*v34)))+((-4.*(v34**2))+((2.*v44)+((4.*(v33*v44))+aux179)));
aux181=2.*(v11*(1.+((-4.*(v24**2))+((2.*v33)+((-8.*((v24**2)*v33))+aux180)))));
aux182=(-4.*((v12**2)*(1.+((-4.*(v34**2))+((2.*v44)+(v33*(2.+(4.*v44))))))))+((8.*aux178)+aux181);
aux183=(-16.*((v13**2)*(v22*v44)))+((8.*((v23**2)*v44))+((-4.*(v33*v44))+((-8.*(v22*(v33*v44)))+aux182)));
aux184=(-8.*((v13**2)*v44))+((-4.*(v22*v44))+(((0.+16.j)*(v13*(v22*v44)))+aux183));
aux185=(4.*(v34**2))+((8.*(v22*(v34**2)))+((-2.*v44)+(((0.+8.j)*(v13*v44))+aux184)));
aux186=((0.+-16.j)*(v14*(v22*v34)))+((32.*(v13*(v14*(v22*v34))))+((-16.*(v23*(v24*v34)))+aux185));
aux187=(8.*((v24**2)*v33))+(((0.+-8.j)*(v14*v34))+((16.*(v13*(v14*v34)))+aux186));
aux188=(-8.*((v14**2)*v33))+((-4.*(v22*v33))+((-16.*((v14**2)*(v22*v33)))+aux187));
aux189=((0.+-16.j)*(v13*(v24**2)))+((16.*((v13**2)*(v24**2)))+((-2.*v33)+aux188));
aux190=((0.+16.j)*(v14*(v23*v24)))+((-32.*(v13*(v14*(v23*v24))))+((4.*(v24**2))+aux189));
aux191=(-8.*((v14**2)*v22))+((4.*(v23**2))+((16.*((v14**2)*(v23**2)))+aux190));
aux192=(-4.*(v14**2))+((-2.*v22)+(((0.+8.j)*(v13*v22))+((-8.*((v13**2)*v22))+aux191)));
aux193=(-2.*((v23**2)*(1.+(2.*v44))))+(2.*(v22*(1.+(v33+((-2.*(v34**2))+((2.*v44)+(2.*(v33*v44))))))));
aux194=(8.*(v23*(v24*v34)))+((-2.*(v34**2))+((2.*v44)+((2.*(v33*v44))+aux193)));
aux195=v23*((0.+-1.j)+((-4.*(v14*v34))+(((0.+-2.j)*v44)+(v13*(2.+(4.*v44))))));
aux196=v12*((2.*(v24*((2.*(v14*(1.+v33)))+(((0.+1.j)+(-2.*v13))*v34))))+aux195);
aux197=(-4.*(v11*(1.+((-4.*(v24**2))+(v33+((-4.*((v24**2)*v33))+aux194))))))+(-8.*aux196);
aux198=(8.*((v12**2)*(1.+(v33+((-2.*(v34**2))+((2.*v44)+(2.*(v33*v44))))))))+aux197;
aux199=(-4.*(v22*v44))+(((0.+-16.j)*(v13*(v22*v44)))+((16.*((v13**2)*(v22*v44)))+aux198));
aux200=(-32.*(v13*(v14*(v22*v34))))+((-2.*v44)+(((0.+-8.j)*(v13*v44))+((8.*((v13**2)*v44))+aux199)));
aux201=((0.+8.j)*(v14*v34))+((-16.*(v13*(v14*v34)))+(((0.+16.j)*(v14*(v22*v34)))+aux200));
aux202=(-16.*((v13**2)*(v24**2)))+((8.*((v14**2)*v33))+((16.*((v14**2)*(v22*v33)))+aux201));
aux203=(32.*(v13*(v14*(v23*v24))))+((4.*(v24**2))+(((0.+16.j)*(v13*(v24**2)))+aux202));
aux204=(16.*((v14**2)*v22))+((-16.*((v14**2)*(v23**2)))+(((0.+-16.j)*(v14*(v23*v24)))+aux203));
aux205=(8.*(v14**2))+((-2.*v22)+(((0.+-8.j)*(v13*v22))+((8.*((v13**2)*v22))+aux204)));
aux206=((0.+2.j)*v33)+((-2.*(v24*v33))+(((0.+2.j)*(v22*(1.+(2.*v33))))+(2.*(v23*v34))));
aux207=v14*(((0.+1.j)+(v13+((2.*(v13*v22))+(((0.+-4.j)*(v23**2))+aux206))))-v24);
aux208=(-2.*v33)+(((0.+-8.j)*(v23*v34))+((4.*(v34**2))+((-2.*v44)+(-4.*(v33*v44)))));
aux209=-1.+((4.*(v14*v23))+((4.*(v24*((0.+1.j)+(v13+((0.+2.j)*v33)))))+aux208));
aux210=(-4.*(v13*(v24*v34)))+((-2.*aux207)+((4.*(v13*(v23*v44)))+(v12*aux209)));
aux211=(2.*(v22*v34))+((4.*(v11*(v22*v34)))+(((0.+8.j)*(v13*(v22*v34)))+aux210));
aux212=v34+((2.*(v11*v34))+((-4.*((v12**2)*v34))+(((0.+4.j)*(v13*v34))+aux211)));
aux213=(-2.*(v23*v24))+((-4.*(v11*(v23*v24)))+(((0.+-8.j)*(v13*(v23*v24)))+aux212));
aux214=(2.*v33)+(((0.+8.j)*(v24*v33))+((v22*(2.+(4.*v33)))+((0.+-8.j)*(v23*v34))));
aux215=((0.+2.j)*(v14*v34))+(((0.+2.j)*(v23*v34))+((-4.*(v34**2))+((2.*v44)+(4.*(v33*v44)))));
aux216=v24+((2.*(v24*v33))+((2.*(v13*v44))+((0.+1.j)*(1.+((2.*v33)+aux215)))));
aux217=(4.*(v11*(v23*v44)))+(((0.+8.j)*(v13*(v23*v44)))+(-2.*(v12*(v13+aux216))));
aux218=(v14*(1.+((-4.*(v23**2))+(((0.+4.j)*v24)+((4.*(v13*v24))+aux214)))))+((2.*(v23*v44))+aux217);
aux219=(-2.*(v24*v34))+((-4.*(v11*(v24*v34)))+(((0.+-8.j)*(v13*(v24*v34)))+aux218));
aux220=(-4.*((v14**2)*v23))+((4.*(v13*(v23*v24)))+((-2.*(v13*v34))+((-4.*(v13*(v22*v34)))+aux219)));
aux221=(r4*((2.*(v13*v23))+aux213))+(r2*(v23+((2.*(v11*v23))+(((0.+4.j)*(v13*v23))+aux220))));
aux222=(0.+1.j)*((r3*(-1.+(((0.+-4.j)*v13)+((4.*(v13**2))+aux205))))+(2.*aux221));
aux223=(v14*(v24+((2.*(v24*v33))+(-2.*(v23*v34)))))+(v13*(v23+((-2.*(v24*v34))+(2.*(v23*v44)))));
aux224=(-4.*((v23**2)*(1.+(2.*v44))))+(v22*(2.+((-8.*(v34**2))+((4.*v44)+(v33*(4.+(8.*v44)))))));
aux225=(16.*(v23*(v24*v34)))+((-4.*(v34**2))+((2.*v44)+((4.*(v33*v44))+aux224)));
aux226=-2.*(v11*(1.+((-4.*(v24**2))+((2.*v33)+((-8.*((v24**2)*v33))+aux225)))));
aux227=(4.*((v12**2)*(1.+((-4.*(v34**2))+((2.*v44)+(v33*(2.+(4.*v44))))))))+((-16.*(v12*aux223))+aux226);
aux228=(16.*((v13**2)*(v22*v44)))+((8.*((v23**2)*v44))+((-4.*(v33*v44))+((-8.*(v22*(v33*v44)))+aux227)));
aux229=(8.*(v22*(v34**2)))+((-2.*v44)+((8.*((v13**2)*v44))+((-4.*(v22*v44))+aux228)));
aux230=(-32.*(v13*(v14*(v22*v34))))+((-16.*(v23*(v24*v34)))+((4.*(v34**2))+aux229));
aux231=(16.*((v14**2)*(v22*v33)))+((8.*((v24**2)*v33))+((-16.*(v13*(v14*v34)))+aux230));
aux232=(-16.*((v13**2)*(v24**2)))+((-2.*v33)+((8.*((v14**2)*v33))+((-4.*(v22*v33))+aux231)));
aux233=(-16.*((v14**2)*(v23**2)))+((32.*(v13*(v14*(v23*v24))))+((4.*(v24**2))+aux232));
aux234=(-2.*v22)+((8.*((v13**2)*v22))+((8.*((v14**2)*v22))+((4.*(v23**2))+aux233)));
aux235=((r1*(-1.+(((0.+4.j)*v13)+((-4.*(v13**2))+aux192))))+aux222)/(-1.+((4.*(v13**2))+((4.*(v14**2))+aux234)));
aux236=1.+(((0.+4.j)*(b14*b34))+((-4.*(b34**2))+((2.*b44)+(b33*(2.+(4.*b44))))));
aux237=((0.+-1.j)*(b13*(1.+((-4.*(b24**2))+((2.*b44)+(b22*(2.+(4.*b44))))))))+(b22*aux236);
aux238=((0.+2.j)*(b14*b34))+(((0.+2.j)*(b12*(b23+((-2.*(b24*b34))+(2.*(b23*b44))))))+aux237);
aux239=(-4.*((b23**2)*b44))+((2.*(b33*b44))+(np.conjugate((((0.+-4.j)*(b14*(b23*b24)))+aux238))));
aux240=(8.*(b34**2))+((-4.*b44)+(-4.*((-4.*((b24**2)*b33))+((8.*(b23*(b24*b34)))+aux239))));
aux241=-2.*((b12**2)*(1.+((2.*b33)+((-4.*(b34**2))+((2.*b44)+(4.*(b33*b44)))))));
aux242=(b14*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))))+(b13*(b23+((-2.*(b24*b34))+(2.*(b23*b44)))));
aux243=(-4.*((b23**2)*(1.+(2.*b44))))+(b22*(2.+((-8.*(b34**2))+((4.*b44)+(b33*(4.+(8.*b44)))))));
aux244=(16.*(b23*(b24*b34)))+((-4.*(b34**2))+((2.*b44)+((4.*(b33*b44))+aux243)));
aux245=(8.*(b12*aux242))+(b11*(1.+((-4.*(b24**2))+((2.*b33)+((-8.*((b24**2)*b33))+aux244)))));
aux246=(-4.*((b23**2)*b44))+((2.*(b33*b44))+((4.*(b22*(b33*b44)))+(aux241+aux245)));
aux247=(-4.*((b13**2)*b44))+((2.*(b22*b44))+((-8.*((b13**2)*(b22*b44)))+aux246));
aux248=(16.*(b13*(b14*(b22*b34))))+((8.*(b23*(b24*b34)))+((-4.*(b22*(b34**2)))+aux247));
aux249=(-8.*((b14**2)*(b22*b33)))+((-4.*((b24**2)*b33))+((8.*(b13*(b14*b34)))+aux248));
aux250=(8.*((b13**2)*(b24**2)))+((-4.*((b14**2)*b33))+((2.*(b22*b33))+aux249));
aux251=(-4.*((b14**2)*b22))+((8.*((b14**2)*(b23**2)))+((-16.*(b13*(b14*(b23*b24))))+aux250));
aux252=(-2.*b33)+((4.*(b34**2))+((-2.*b44)+(-2.*((-4.*((b13**2)*b22))+aux251))));
aux253=(4.*(b13**2))+((4.*(b14**2))+((-2.*b22)+((4.*(b23**2))+((4.*(b24**2))+aux252))));
aux254=1.+((-2.+((8.*(b23**2))+((8.*(b24**2))+((-4.*b33)+aux240))))/(-1.+aux253));
aux255=(2.*b33)+(((0.+-8.j)*(b24*b33))+((b22*(2.+(4.*b33)))+((0.+8.j)*(b23*b34))));
aux256=((0.+-2.j)*(b14*b34))+(((0.+-2.j)*(b23*b34))+((-4.*(b34**2))+((2.*b44)+(4.*(b33*b44)))));
aux257=b24+((2.*(b24*b33))+((2.*(b13*b44))+((0.+-1.j)*(1.+((2.*b33)+aux256)))));
aux258=(4.*(b11*(b23*b44)))+(((0.+-8.j)*(b13*(b23*b44)))+(-2.*(b12*(b13+aux257))));
aux259=(b14*(1.+((-4.*(b23**2))+(((0.+-4.j)*b24)+((4.*(b13*b24))+aux255)))))+((2.*(b23*b44))+aux258);
aux260=(-2.*(b24*b34))+((-4.*(b11*(b24*b34)))+(((0.+8.j)*(b13*(b24*b34)))+aux259));
aux261=(-4.*((b14**2)*b23))+((4.*(b13*(b23*b24)))+((-2.*(b13*b34))+((-4.*(b13*(b22*b34)))+aux260)));
aux262=(-2.*((b23**2)*(1.+(2.*b44))))+(2.*(b22*(1.+(b33+((-2.*(b34**2))+((2.*b44)+(2.*(b33*b44))))))));
aux263=(8.*(b23*(b24*b34)))+((-2.*(b34**2))+((2.*b44)+((2.*(b33*b44))+aux262)));
aux264=(-2.*(((0.+1.j)+(2.*b13))*(b24*b34)))+(b23*((0.+1.j)+((-4.*(b14*b34))+(((0.+2.j)*b44)+(b13*(2.+(4.*b44)))))));
aux265=(4.*(b11*(1.+((-4.*(b24**2))+(b33+((-4.*((b24**2)*b33))+aux263))))))+(8.*(b12*((4.*(b14*(b24*(1.+b33))))+aux264)));
aux266=(-8.*((b12**2)*(1.+(b33+((-2.*(b34**2))+((2.*b44)+(2.*(b33*b44))))))))+aux265;
aux267=(4.*(b22*b44))+(((0.+-16.j)*(b13*(b22*b44)))+((-16.*((b13**2)*(b22*b44)))+aux266));
aux268=(32.*(b13*(b14*(b22*b34))))+((2.*b44)+(((0.+-8.j)*(b13*b44))+((-8.*((b13**2)*b44))+aux267)));
aux269=((0.+8.j)*(b14*b34))+((16.*(b13*(b14*b34)))+(((0.+16.j)*(b14*(b22*b34)))+aux268));
aux270=(16.*((b13**2)*(b24**2)))+((-8.*((b14**2)*b33))+((-16.*((b14**2)*(b22*b33)))+aux269));
aux271=(-32.*(b13*(b14*(b23*b24))))+((-4.*(b24**2))+(((0.+16.j)*(b13*(b24**2)))+aux270));
aux272=(-16.*((b14**2)*b22))+((16.*((b14**2)*(b23**2)))+(((0.+-16.j)*(b14*(b23*b24)))+aux271));
aux273=(-8.*(b14**2))+((2.*b22)+(((0.+-8.j)*(b13*b22))+((-8.*((b13**2)*b22))+aux272)));
aux274=((0.+2.j)*b33)+((2.*(b24*b33))+(((0.+2.j)*(b22*(1.+(2.*b33))))+(-2.*(b23*b34))));
aux275=b14*(((0.+1.j)+(((0.+-4.j)*(b23**2))+(b24+aux274)))-(b13*(1.+(2.*b22))));
aux276=(-2.*b33)+(((0.+8.j)*(b23*b34))+((4.*(b34**2))+((-2.*b44)+(-4.*(b33*b44)))));
aux277=-1.+((4.*(b14*b23))+((4.*(b24*((0.+-1.j)+(b13+((0.+-2.j)*b33)))))+aux276));
aux278=(-4.*(b13*(b24*b34)))+((2.*aux275)+((4.*(b13*(b23*b44)))+(b12*aux277)));
aux279=(2.*(b22*b34))+((4.*(b11*(b22*b34)))+(((0.+-8.j)*(b13*(b22*b34)))+aux278));
aux280=b34+((2.*(b11*b34))+((-4.*((b12**2)*b34))+(((0.+-4.j)*(b13*b34))+aux279)));
aux281=(-2.*(b23*b24))+((-4.*(b11*(b23*b24)))+(((0.+8.j)*(b13*(b23*b24)))+aux280));
aux282=(b14*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))))+(b13*(b23+((-2.*(b24*b34))+(2.*(b23*b44)))));
aux283=(-4.*((b23**2)*(1.+(2.*b44))))+(b22*(2.+((-8.*(b34**2))+((4.*b44)+(b33*(4.+(8.*b44)))))));
aux284=(16.*(b23*(b24*b34)))+((-4.*(b34**2))+((2.*b44)+((4.*(b33*b44))+aux283)));
aux285=2.*(b11*(1.+((-4.*(b24**2))+((2.*b33)+((-8.*((b24**2)*b33))+aux284)))));
aux286=(-4.*((b12**2)*(1.+((-4.*(b34**2))+((2.*b44)+(b33*(2.+(4.*b44))))))))+((16.*(b12*aux282))+aux285);
aux287=(-16.*((b13**2)*(b22*b44)))+((-8.*((b23**2)*b44))+((4.*(b33*b44))+((8.*(b22*(b33*b44)))+aux286)));
aux288=(-8.*(b22*(b34**2)))+((2.*b44)+((-8.*((b13**2)*b44))+((4.*(b22*b44))+aux287)));
aux289=(32.*(b13*(b14*(b22*b34))))+((16.*(b23*(b24*b34)))+((-4.*(b34**2))+aux288));
aux290=(-16.*((b14**2)*(b22*b33)))+((-8.*((b24**2)*b33))+((16.*(b13*(b14*b34)))+aux289));
aux291=(16.*((b13**2)*(b24**2)))+((2.*b33)+((-8.*((b14**2)*b33))+((4.*(b22*b33))+aux290)));
aux292=(16.*((b14**2)*(b23**2)))+((-32.*(b13*(b14*(b23*b24))))+((-4.*(b24**2))+aux291));
aux293=(2.*b22)+((-8.*((b13**2)*b22))+((-8.*((b14**2)*b22))+((-4.*(b23**2))+aux292)));
aux294=1.+(((0.+4.j)*(b14*b34))+((-4.*(b34**2))+((2.*b44)+(b33*(2.+(4.*b44))))));
aux295=((0.+-1.j)*(b13*(1.+((-4.*(b24**2))+((2.*b44)+(b22*(2.+(4.*b44))))))))+(b22*aux294);
aux296=((0.+2.j)*(b14*b34))+(((0.+2.j)*(b12*(b23+((-2.*(b24*b34))+(2.*(b23*b44))))))+aux295);
aux297=(-4.*((b23**2)*b44))+((2.*(b33*b44))+(np.conjugate((((0.+-4.j)*(b14*(b23*b24)))+aux296))));
aux298=(8.*(b34**2))+((-4.*b44)+(-4.*((-4.*((b24**2)*b33))+((8.*(b23*(b24*b34)))+aux297))));
aux299=-2.*((b12**2)*(1.+((2.*b33)+((-4.*(b34**2))+((2.*b44)+(4.*(b33*b44)))))));
aux300=(b14*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))))+(b13*(b23+((-2.*(b24*b34))+(2.*(b23*b44)))));
aux301=(-4.*((b23**2)*(1.+(2.*b44))))+(b22*(2.+((-8.*(b34**2))+((4.*b44)+(b33*(4.+(8.*b44)))))));
aux302=(16.*(b23*(b24*b34)))+((-4.*(b34**2))+((2.*b44)+((4.*(b33*b44))+aux301)));
aux303=(8.*(b12*aux300))+(b11*(1.+((-4.*(b24**2))+((2.*b33)+((-8.*((b24**2)*b33))+aux302)))));
aux304=(-4.*((b23**2)*b44))+((2.*(b33*b44))+((4.*(b22*(b33*b44)))+(aux299+aux303)));
aux305=(-4.*((b13**2)*b44))+((2.*(b22*b44))+((-8.*((b13**2)*(b22*b44)))+aux304));
aux306=(16.*(b13*(b14*(b22*b34))))+((8.*(b23*(b24*b34)))+((-4.*(b22*(b34**2)))+aux305));
aux307=(-8.*((b14**2)*(b22*b33)))+((-4.*((b24**2)*b33))+((8.*(b13*(b14*b34)))+aux306));
aux308=(8.*((b13**2)*(b24**2)))+((-4.*((b14**2)*b33))+((2.*(b22*b33))+aux307));
aux309=(-4.*((b14**2)*b22))+((8.*((b14**2)*(b23**2)))+((-16.*(b13*(b14*(b23*b24))))+aux308));
aux310=(-2.*b33)+((4.*(b34**2))+((-2.*b44)+(-2.*((-4.*((b13**2)*b22))+aux309))));
aux311=(4.*(b13**2))+((4.*(b14**2))+((-2.*b22)+((4.*(b23**2))+((4.*(b24**2))+aux310))));
aux312=-1.+((-2.+((8.*(b23**2))+((8.*(b24**2))+((-4.*b33)+aux298))))/(-1.+aux311));
aux313=((0.+2.j)*(((2.*(b13*b23))+aux281)*s4))+((1.+((-4.*(b13**2))+((-4.*(b14**2))+aux293)))*(s1*aux312));
aux314=((0.+2.j)*((b23+((2.*(b11*b23))+(((0.+-4.j)*(b13*b23))+aux261)))*s2))+(((0.+-1.j)*((1.+(((0.+-4.j)*b13)+((-4.*(b13**2))+aux273)))*s3))+aux313);
aux315=(b14*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))))+(b13*(b23+((-2.*(b24*b34))+(2.*(b23*b44)))));
aux316=(-4.*((b23**2)*(1.+(2.*b44))))+(b22*(2.+((-8.*(b34**2))+((4.*b44)+(b33*(4.+(8.*b44)))))));
aux317=(16.*(b23*(b24*b34)))+((-4.*(b34**2))+((2.*b44)+((4.*(b33*b44))+aux316)));
aux318=2.*(b11*(1.+((-4.*(b24**2))+((2.*b33)+((-8.*((b24**2)*b33))+aux317)))));
aux319=(-4.*((b12**2)*(1.+((-4.*(b34**2))+((2.*b44)+(b33*(2.+(4.*b44))))))))+((16.*(b12*aux315))+aux318);
aux320=(-16.*((b13**2)*(b22*b44)))+((-8.*((b23**2)*b44))+((4.*(b33*b44))+((8.*(b22*(b33*b44)))+aux319)));
aux321=(-8.*(b22*(b34**2)))+((2.*b44)+((-8.*((b13**2)*b44))+((4.*(b22*b44))+aux320)));
aux322=(32.*(b13*(b14*(b22*b34))))+((16.*(b23*(b24*b34)))+((-4.*(b34**2))+aux321));
aux323=(-16.*((b14**2)*(b22*b33)))+((-8.*((b24**2)*b33))+((16.*(b13*(b14*b34)))+aux322));
aux324=(16.*((b13**2)*(b24**2)))+((2.*b33)+((-8.*((b14**2)*b33))+((4.*(b22*b33))+aux323)));
aux325=(16.*((b14**2)*(b23**2)))+((-32.*(b13*(b14*(b23*b24))))+((-4.*(b24**2))+aux324));
aux326=(2.*b22)+((-8.*((b13**2)*b22))+((-8.*((b14**2)*b22))+((-4.*(b23**2))+aux325)));
aux327=aux235+((s1*aux254)+(aux314/(1.+((-4.*(b13**2))+((-4.*(b14**2))+aux326)))));
aux328=((aux57*s4)/(1.+((-4.*(b13**2))+((-4.*(b14**2))+aux69))))+(aux98+(aux132+(aux154+(aux176+aux327))));
aux329=aux19+(((aux38*s3)/(1.+((-4.*(b13**2))+((-4.*(b14**2))+aux50))))+aux328);
output=0.25*aux329;
return output
def lineal2(V,B,R,S):
v11,v12,v13,v14=separate(V,0)
v21,v22,v23,v24=separate(V,1)
v31,v32,v33,v34=separate(V,2)
v41,v42,v43,v44=separate(V,3)
b11,b12,b13,b14=separate(B,0)
b21,b22,b23,b24=separate(B,1)
b31,b32,b33,b34=separate(B,2)
b41,b42,b43,b44=separate(B,3)
r1,r2,r3,r4=R[0],R[1],R[2],R[3]
s1,s2,s3,s4=S[0],S[1],S[2],S[3]
aux0=(2.*b33)+(((0.+-8.j)*(b24*b33))+((b22*(2.+(4.*b33)))+((0.+8.j)*(b23*b34))));
aux1=((0.+-2.j)*(b14*b34))+(((0.+-2.j)*(b23*b34))+((-4.*(b34**2))+((2.*b44)+(4.*(b33*b44)))));
aux2=b13+(b24+((2.*(b24*b33))+((2.*(b13*b44))+((0.+-1.j)*(1.+((2.*b33)+aux1))))));
aux3=(2.*(b23*b44))+((4.*(b11*(b23*b44)))+(((0.+-8.j)*(b13*(b23*b44)))+(-2.*(b12*aux2))));
aux4=(b14*(1.+((-4.*(b23**2))+(((0.+-4.j)*b24)+((4.*(b13*b24))+aux0)))))+aux3;
aux5=(-2.*(b24*b34))+((-4.*(b11*(b24*b34)))+(((0.+8.j)*(b13*(b24*b34)))+aux4));
aux6=(-4.*((b14**2)*b23))+((4.*(b13*(b23*b24)))+((-2.*(b13*b34))+((-4.*(b13*(b22*b34)))+aux5)));
aux7=(b14*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))))+(b13*(b23+((-2.*(b24*b34))+(2.*(b23*b44)))));
aux8=(-4.*((b23**2)*(1.+(2.*b44))))+(b22*(2.+((-8.*(b34**2))+((4.*b44)+(b33*(4.+(8.*b44)))))));
aux9=(16.*(b23*(b24*b34)))+((-4.*(b34**2))+((2.*b44)+((4.*(b33*b44))+aux8)));
aux10=(16.*(b12*aux7))+(2.*(b11*(1.+((-4.*(b24**2))+((2.*b33)+((-8.*((b24**2)*b33))+aux9))))));
aux11=(-4.*((b12**2)*(1.+((-4.*(b34**2))+((2.*b44)+(b33*(2.+(4.*b44))))))))+aux10;
aux12=(-16.*((b13**2)*(b22*b44)))+((-8.*((b23**2)*b44))+((4.*(b33*b44))+((8.*(b22*(b33*b44)))+aux11)));
aux13=(-8.*(b22*(b34**2)))+((2.*b44)+((-8.*((b13**2)*b44))+((4.*(b22*b44))+aux12)));
aux14=(32.*(b13*(b14*(b22*b34))))+((16.*(b23*(b24*b34)))+((-4.*(b34**2))+aux13));
aux15=(-16.*((b14**2)*(b22*b33)))+((-8.*((b24**2)*b33))+((16.*(b13*(b14*b34)))+aux14));
aux16=(16.*((b13**2)*(b24**2)))+((2.*b33)+((-8.*((b14**2)*b33))+((4.*(b22*b33))+aux15)));
aux17=(16.*((b14**2)*(b23**2)))+((-32.*(b13*(b14*(b23*b24))))+((-4.*(b24**2))+aux16));
aux18=(2.*b22)+((-8.*((b13**2)*b22))+((-8.*((b14**2)*b22))+((-4.*(b23**2))+aux17)));
aux19=((0.+2.j)*((b23+((2.*(b11*b23))+(((0.+-4.j)*(b13*b23))+aux6)))*s1))/(1.+((-4.*(b13**2))+((-4.*(b14**2))+aux18)));
aux20=-2.*(b13*((b14+((2.*(b14*b22))+((2.*(b24*b34))+(-2.*(b23*b44)))))-b23));
aux21=(4.*(b14*b23))+((4.*(b13*b24))+((-2.*b33)+((4.*(b34**2))+((-2.*b44)+(-4.*(b33*b44))))));
aux22=(2.*(b22*b34))+((4.*(b11*(b22*b34)))+((-4.*(b14*(b23*b34)))+(aux20+(b12*(-1.+aux21)))));
aux23=(4.*(b14*(b24*b33)))+(b34+((2.*(b11*b34))+((-4.*((b12**2)*b34))+aux22)));
aux24=(0.+2.j)*((2.*(b14*b24))+((-2.*(b23*b24))+((-4.*(b11*(b23*b24)))+aux23)));
aux25=(8.*(b12*(b13+((-2.*(b14*b34))+(2.*(b13*b44))))))+((-4.*(b23*(1.+((-4.*(b14**2))+((2.*b44)+(b11*(2.+(4.*b44))))))))+aux24);
aux26=(b14*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))))+(b13*(b23+((-2.*(b24*b34))+(2.*(b23*b44)))));
aux27=(-4.*((b23**2)*(1.+(2.*b44))))+(b22*(2.+((-8.*(b34**2))+((4.*b44)+(b33*(4.+(8.*b44)))))));
aux28=(16.*(b23*(b24*b34)))+((-4.*(b34**2))+((2.*b44)+((4.*(b33*b44))+aux27)));
aux29=(16.*(b12*aux26))+(2.*(b11*(1.+((-4.*(b24**2))+((2.*b33)+((-8.*((b24**2)*b33))+aux28))))));
aux30=(-4.*((b12**2)*(1.+((-4.*(b34**2))+((2.*b44)+(b33*(2.+(4.*b44))))))))+aux29;
aux31=(-16.*((b13**2)*(b22*b44)))+((-8.*((b23**2)*b44))+((4.*(b33*b44))+((8.*(b22*(b33*b44)))+aux30)));
aux32=(-8.*(b22*(b34**2)))+((2.*b44)+((-8.*((b13**2)*b44))+((4.*(b22*b44))+aux31)));
aux33=(32.*(b13*(b14*(b22*b34))))+((16.*(b23*(b24*b34)))+((-4.*(b34**2))+aux32));
aux34=(-16.*((b14**2)*(b22*b33)))+((-8.*((b24**2)*b33))+((16.*(b13*(b14*b34)))+aux33));
aux35=(16.*((b13**2)*(b24**2)))+((2.*b33)+((-8.*((b14**2)*b33))+((4.*(b22*b33))+aux34)));
aux36=(16.*((b14**2)*(b23**2)))+((-32.*(b13*(b14*(b23*b24))))+((-4.*(b24**2))+aux35));
aux37=(2.*b22)+((-8.*((b13**2)*b22))+((-8.*((b14**2)*b22))+((-4.*(b23**2))+aux36)));
aux38=(((8.*(b24*((-2.*(b13*b14))+(b34+(2.*(b11*b34))))))+aux25)*s3)/(1.+((-4.*(b13**2))+((-4.*(b14**2))+aux37)));
aux39=(-4.*(b13*(b14*b23)))+((4.*((b13**2)*b24))+(2.*(b12*(b14+((2.*(b14*b33))+(-2.*(b13*b34)))))));
aux40=(2.*(b11*b44))+((-4.*((b13**2)*b44))+((2.*(b33*b44))+(4.*(b11*(b33*b44)))));
aux41=(8.*(b13*(b14*b34)))+((-2.*(b34**2))+((-4.*(b11*(b34**2)))+(b44+aux40)));
aux42=(-4.*(b11*(b22*b33)))+((-2.*((b14**2)*(1.+(2.*b33))))+(((b12**2)*(2.+(4.*b33)))+aux41));
aux43=(-8.*(b12*(b13*b23)))+((2.*(b23**2))+((4.*(b11*(b23**2)))+((-2.*(b22*b33))+aux42)));
aux44=(b14*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))))+(b13*(b23+((-2.*(b24*b34))+(2.*(b23*b44)))));
aux45=(-4.*((b23**2)*(1.+(2.*b44))))+(b22*(2.+((-8.*(b34**2))+((4.*b44)+(b33*(4.+(8.*b44)))))));
aux46=(16.*(b23*(b24*b34)))+((-4.*(b34**2))+((2.*b44)+((4.*(b33*b44))+aux45)));
aux47=-2.*(b11*(1.+((-4.*(b24**2))+((2.*b33)+((-8.*((b24**2)*b33))+aux46)))));
aux48=(4.*((b12**2)*(1.+((-4.*(b34**2))+((2.*b44)+(b33*(2.+(4.*b44))))))))+((-16.*(b12*aux44))+aux47);
aux49=(16.*((b13**2)*(b22*b44)))+((8.*((b23**2)*b44))+((-4.*(b33*b44))+((-8.*(b22*(b33*b44)))+aux48)));
aux50=(8.*(b22*(b34**2)))+((-2.*b44)+((8.*((b13**2)*b44))+((-4.*(b22*b44))+aux49)));
aux51=(-32.*(b13*(b14*(b22*b34))))+((-16.*(b23*(b24*b34)))+((4.*(b34**2))+aux50));
aux52=(16.*((b14**2)*(b22*b33)))+((8.*((b24**2)*b33))+((-16.*(b13*(b14*b34)))+aux51));
aux53=(-16.*((b13**2)*(b24**2)))+((-2.*b33)+((8.*((b14**2)*b33))+((-4.*(b22*b33))+aux52)));
aux54=(-16.*((b14**2)*(b23**2)))+((32.*(b13*(b14*(b23*b24))))+((4.*(b24**2))+aux53));
aux55=(-2.*b22)+((8.*((b13**2)*b22))+((8.*((b14**2)*b22))+((4.*(b23**2))+aux54)));
aux56=((0.+2.j)*(((-2.*(b11*b22))+((4.*((b13**2)*b22))+aux43))-b22))+((0.+1.j)*(-1.+((4.*(b13**2))+((4.*(b14**2))+aux55))));
aux57=(4.*(aux39-((1.+(2.*b11))*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))))))+aux56;
aux58=(b14*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))))+(b13*(b23+((-2.*(b24*b34))+(2.*(b23*b44)))));
aux59=(-4.*((b23**2)*(1.+(2.*b44))))+(b22*(2.+((-8.*(b34**2))+((4.*b44)+(b33*(4.+(8.*b44)))))));
aux60=(16.*(b23*(b24*b34)))+((-4.*(b34**2))+((2.*b44)+((4.*(b33*b44))+aux59)));
aux61=(16.*(b12*aux58))+(2.*(b11*(1.+((-4.*(b24**2))+((2.*b33)+((-8.*((b24**2)*b33))+aux60))))));
aux62=(-4.*((b12**2)*(1.+((-4.*(b34**2))+((2.*b44)+(b33*(2.+(4.*b44))))))))+aux61;
aux63=(-16.*((b13**2)*(b22*b44)))+((-8.*((b23**2)*b44))+((4.*(b33*b44))+((8.*(b22*(b33*b44)))+aux62)));
aux64=(-8.*(b22*(b34**2)))+((2.*b44)+((-8.*((b13**2)*b44))+((4.*(b22*b44))+aux63)));
aux65=(32.*(b13*(b14*(b22*b34))))+((16.*(b23*(b24*b34)))+((-4.*(b34**2))+aux64));
aux66=(-16.*((b14**2)*(b22*b33)))+((-8.*((b24**2)*b33))+((16.*(b13*(b14*b34)))+aux65));
aux67=(16.*((b13**2)*(b24**2)))+((2.*b33)+((-8.*((b14**2)*b33))+((4.*(b22*b33))+aux66)));
aux68=(16.*((b14**2)*(b23**2)))+((-32.*(b13*(b14*(b23*b24))))+((-4.*(b24**2))+aux67));
aux69=(2.*b22)+((-8.*((b13**2)*b22))+((-8.*((b14**2)*b22))+((-4.*(b23**2))+aux68)));
aux70=((0.+-16.j)*(v11*(v23*v44)))+((8.*(v13*(v23*v44)))+(-8.*(v12*(v33*v44))));
aux71=(-4.*(v12*v44))+(((0.+16.j)*(v12*(v13*v44)))+(((0.+-8.j)*(v23*v44))+aux70));
aux72=((0.+16.j)*(v11*(v24*v34)))+((-8.*(v13*(v24*v34)))+((8.*(v12*(v34**2)))+aux71));
aux73=(8.*(v11*(v22*v34)))+((-8.*(v14*(v23*v34)))+(((0.+8.j)*(v24*v34))+aux72));
aux74=(-8.*((v12**2)*v34))+(((0.+-16.j)*(v12*(v14*v34)))+((4.*(v22*v34))+aux73));
aux75=(-4.*(v12*v33))+((8.*(v14*(v24*v33)))+((2.*v34)+((4.*(v11*v34))+aux74)));
aux76=((0.+-16.j)*(v13*(v14*v24)))+((-4.*(v23*v24))+((-8.*(v11*(v23*v24)))+aux75));
aux77=((0.+16.j)*((v14**2)*v23))+((8.*(v12*(v13*v24)))+((4.*(v14*v24))+aux76));
aux78=((0.+-4.j)*v23)+(((0.+-8.j)*(v11*v23))+((4.*(v13*v23))+((8.*(v12*(v14*v23)))+aux77)));
aux79=(-2.*v12)+(((0.+8.j)*(v12*v13))+((-4.*(v13*v14))+((-8.*(v13*(v14*v22)))+aux78)));
aux80=(v14*(v24+((2.*(v24*v33))+(-2.*(v23*v34)))))+(v13*(v23+((-2.*(v24*v34))+(2.*(v23*v44)))));
aux81=(-4.*((v23**2)*(1.+(2.*v44))))+(v22*(2.+((-8.*(v34**2))+((4.*v44)+(v33*(4.+(8.*v44)))))));
aux82=(16.*(v23*(v24*v34)))+((-4.*(v34**2))+((2.*v44)+((4.*(v33*v44))+aux81)));
aux83=-2.*(v11*(1.+((-4.*(v24**2))+((2.*v33)+((-8.*((v24**2)*v33))+aux82)))));
aux84=(4.*((v12**2)*(1.+((-4.*(v34**2))+((2.*v44)+(v33*(2.+(4.*v44))))))))+((-16.*(v12*aux80))+aux83);
aux85=(16.*((v13**2)*(v22*v44)))+((8.*((v23**2)*v44))+((-4.*(v33*v44))+((-8.*(v22*(v33*v44)))+aux84)));
aux86=(8.*(v22*(v34**2)))+((-2.*v44)+((8.*((v13**2)*v44))+((-4.*(v22*v44))+aux85)));
aux87=(-32.*(v13*(v14*(v22*v34))))+((-16.*(v23*(v24*v34)))+((4.*(v34**2))+aux86));
aux88=(16.*((v14**2)*(v22*v33)))+((8.*((v24**2)*v33))+((-16.*(v13*(v14*v34)))+aux87));
aux89=(-16.*((v13**2)*(v24**2)))+((-2.*v33)+((8.*((v14**2)*v33))+((-4.*(v22*v33))+aux88)));
aux90=(-16.*((v14**2)*(v23**2)))+((32.*(v13*(v14*(v23*v24))))+((4.*(v24**2))+aux89));
aux91=(-2.*v22)+((8.*((v13**2)*v22))+((8.*((v14**2)*v22))+((4.*(v23**2))+aux90)));
aux92=(8.*(v11*(v23*v44)))+(((0.+16.j)*(v13*(v23*v44)))+((0.+-16.j)*(v12*(v33*v44))));
aux93=((0.+16.j)*(v12*(v34**2)))+(((0.+-8.j)*(v12*v44))+((-8.*(v12*(v13*v44)))+((4.*(v23*v44))+aux92)));
aux94=(-4.*(v24*v34))+((-8.*(v11*(v24*v34)))+(((0.+-16.j)*(v13*(v24*v34)))+aux93));
aux95=(-8.*(v13*(v22*v34)))+((8.*(v12*(v23*v34)))+(((0.+-16.j)*(v14*(v23*v34)))+aux94));
aux96=((0.+16.j)*(v14*(v24*v33)))+((-4.*(v13*v34))+((8.*(v12*(v14*v34)))+aux95));
aux97=((0.+-8.j)*(v12*v33))+((4.*(v14*v33))+((8.*(v14*(v22*v33)))+((-8.*(v12*(v24*v33)))+aux96)));
aux98=((0.+8.j)*(v14*v24))+((8.*(v13*(v14*v24)))+((8.*(v13*(v23*v24)))+aux97));
aux99=((0.+8.j)*(v13*v23))+((-8.*((v14**2)*v23))+((-8.*(v14*(v23**2)))+((-4.*(v12*v24))+aux98)));
aux100=(-4.*(v12*v13))+((2.*v14)+((4.*(v14*v22))+((2.*v23)+((4.*(v11*v23))+aux99))));
aux101=(v14*(v24+((2.*(v24*v33))+(-2.*(v23*v34)))))+(v13*(v23+((-2.*(v24*v34))+(2.*(v23*v44)))));
aux102=(-4.*((v23**2)*(1.+(2.*v44))))+(v22*(2.+((-8.*(v34**2))+((4.*v44)+(v33*(4.+(8.*v44)))))));
aux103=(16.*(v23*(v24*v34)))+((-4.*(v34**2))+((2.*v44)+((4.*(v33*v44))+aux102)));
aux104=-2.*(v11*(1.+((-4.*(v24**2))+((2.*v33)+((-8.*((v24**2)*v33))+aux103)))));
aux105=(4.*((v12**2)*(1.+((-4.*(v34**2))+((2.*v44)+(v33*(2.+(4.*v44))))))))+((-16.*(v12*aux101))+aux104);
aux106=(16.*((v13**2)*(v22*v44)))+((8.*((v23**2)*v44))+((-4.*(v33*v44))+((-8.*(v22*(v33*v44)))+aux105)));
aux107=(8.*(v22*(v34**2)))+((-2.*v44)+((8.*((v13**2)*v44))+((-4.*(v22*v44))+aux106)));
aux108=(-32.*(v13*(v14*(v22*v34))))+((-16.*(v23*(v24*v34)))+((4.*(v34**2))+aux107));
aux109=(16.*((v14**2)*(v22*v33)))+((8.*((v24**2)*v33))+((-16.*(v13*(v14*v34)))+aux108));
aux110=(-16.*((v13**2)*(v24**2)))+((-2.*v33)+((8.*((v14**2)*v33))+((-4.*(v22*v33))+aux109)));
aux111=(-16.*((v14**2)*(v23**2)))+((32.*(v13*(v14*(v23*v24))))+((4.*(v24**2))+aux110));
aux112=(-2.*v22)+((8.*((v13**2)*v22))+((8.*((v14**2)*v22))+((4.*(v23**2))+aux111)));
aux113=((0.+1.j)*(r1*(((0.+-4.j)*v12)+aux100)))/(-1.+((4.*(v13**2))+((4.*(v14**2))+aux112)));
aux114=((0.+16.j)*((v12**2)*(v33*v44)))+(((0.+-8.j)*(v22*(v33*v44)))+((0.+-16.j)*(v11*(v22*(v33*v44)))));
aux115=((0.+16.j)*(v11*((v23**2)*v44)))+(((0.+-12.j)*(v33*v44))+(((0.+-24.j)*(v11*(v33*v44)))+aux114));
aux116=((0.+16.j)*((v13**2)*(v22*v44)))+(((0.+-32.j)*(v12*(v13*(v23*v44))))+(((0.+8.j)*((v23**2)*v44))+aux115));
aux117=((0.+24.j)*((v13**2)*v44))+(((0.+-4.j)*(v22*v44))+(((0.+-8.j)*(v11*(v22*v44)))+aux116));
aux118=((0.+-6.j)*v44)+(((0.+-12.j)*(v11*v44))+(((0.+8.j)*((v12**2)*v44))+aux117));
aux119=((0.+-16.j)*((v12**2)*(v34**2)))+(((0.+8.j)*(v22*(v34**2)))+(((0.+16.j)*(v11*(v22*(v34**2))))+aux118));
aux120=((0.+-32.j)*(v11*(v23*(v24*v34))))+(((0.+12.j)*(v34**2))+(((0.+24.j)*(v11*(v34**2)))+aux119));
aux121=((0.+32.j)*(v12*(v13*(v24*v34))))+(((0.+-16.j)*(v23*(v24*v34)))+aux120);
aux122=(8.*(v23*v34))+((16.*(v11*(v23*v34)))+(((0.+32.j)*(v12*(v14*(v23*v34))))+aux121));
aux123=((0.+-48.j)*(v13*(v14*v34)))+(((0.+-32.j)*(v13*(v14*(v22*v34))))+aux122);
aux124=((0.+8.j)*((v24**2)*v33))+(((0.+16.j)*(v11*((v24**2)*v33)))+((-16.*(v12*(v13*v34)))+aux123));
aux125=(-8.*(v24*v33))+((-16.*(v11*(v24*v33)))+(((0.+-32.j)*(v12*(v14*(v24*v33))))+aux124));
aux126=((0.+-4.j)*(v22*v33))+(((0.+-8.j)*(v11*(v22*v33)))+(((0.+16.j)*((v14**2)*(v22*v33)))+aux125));
aux127=((0.+8.j)*((v12**2)*v33))+((16.*(v12*(v14*v33)))+(((0.+24.j)*((v14**2)*v33))+aux126));
aux128=((0.+-16.j)*((v13**2)*(v24**2)))+(((0.+-6.j)*v33)+(((0.+-12.j)*(v11*v33))+aux127));
aux129=((0.+32.j)*(v13*(v14*(v23*v24))))+(((0.+4.j)*(v24**2))+(((0.+8.j)*(v11*(v24**2)))+aux128));
aux130=(-8.*(v11*v24))+((16.*((v13**2)*v24))+(((0.+-16.j)*(v12*(v14*v24)))+aux129));
aux131=((0.+8.j)*(v11*(v23**2)))+(((0.+-16.j)*((v14**2)*(v23**2)))+((-4.*v24)+aux130));
aux132=((0.+-16.j)*(v12*(v13*v23)))+((-16.*(v13*(v14*v23)))+(((0.+4.j)*(v23**2))+aux131));
aux133=((0.+-4.j)*(v11*v22))+(((0.+8.j)*((v13**2)*v22))+(((0.+8.j)*((v14**2)*v22))+aux132));
aux134=((0.+12.j)*(v13**2))+((8.*(v12*v14))+(((0.+12.j)*(v14**2))+(((0.+-2.j)*v22)+aux133)));
aux135=(0.+1.j)*(r2*((0.+-3.j)+(((0.+-6.j)*v11)+(((0.+4.j)*(v12**2))+aux134))));
aux136=(v14*(v24+((2.*(v24*v33))+(-2.*(v23*v34)))))+(v13*(v23+((-2.*(v24*v34))+(2.*(v23*v44)))));
aux137=(-4.*((v23**2)*(1.+(2.*v44))))+(v22*(2.+((-8.*(v34**2))+((4.*v44)+(v33*(4.+(8.*v44)))))));
aux138=(16.*(v23*(v24*v34)))+((-4.*(v34**2))+((2.*v44)+((4.*(v33*v44))+aux137)));
aux139=2.*(v11*(1.+((-4.*(v24**2))+((2.*v33)+((-8.*((v24**2)*v33))+aux138)))));
aux140=(-4.*((v12**2)*(1.+((-4.*(v34**2))+((2.*v44)+(v33*(2.+(4.*v44))))))))+((16.*(v12*aux136))+aux139);
aux141=(-16.*((v13**2)*(v22*v44)))+((-8.*((v23**2)*v44))+((4.*(v33*v44))+((8.*(v22*(v33*v44)))+aux140)));
aux142=(-8.*(v22*(v34**2)))+((2.*v44)+((-8.*((v13**2)*v44))+((4.*(v22*v44))+aux141)));
aux143=(32.*(v13*(v14*(v22*v34))))+((16.*(v23*(v24*v34)))+((-4.*(v34**2))+aux142));
aux144=(-16.*((v14**2)*(v22*v33)))+((-8.*((v24**2)*v33))+((16.*(v13*(v14*v34)))+aux143));
aux145=(16.*((v13**2)*(v24**2)))+((2.*v33)+((-8.*((v14**2)*v33))+((4.*(v22*v33))+aux144)));
aux146=(16.*((v14**2)*(v23**2)))+((-32.*(v13*(v14*(v23*v24))))+((-4.*(v24**2))+aux145));
aux147=(2.*v22)+((-8.*((v13**2)*v22))+((-8.*((v14**2)*v22))+((-4.*(v23**2))+aux146)));
aux148=(-16.*((v12**2)*(v33*v44)))+((8.*(v22*(v33*v44)))+(16.*(v11*(v22*(v33*v44)))));
aux149=(32.*(v12*(v13*(v23*v44))))+((-8.*((v23**2)*v44))+((-16.*(v11*((v23**2)*v44)))+aux148));
aux150=(4.*(v22*v44))+((8.*(v11*(v22*v44)))+((-16.*((v13**2)*(v22*v44)))+aux149));
aux151=(-8.*(v22*(v34**2)))+((-16.*(v11*(v22*(v34**2))))+((-8.*((v12**2)*v44))+aux150));
aux152=(16.*(v23*(v24*v34)))+((32.*(v11*(v23*(v24*v34))))+((16.*((v12**2)*(v34**2)))+aux151));
aux153=((0.+-16.j)*(v11*(v23*v34)))+((-32.*(v12*(v14*(v23*v34))))+((-32.*(v12*(v13*(v24*v34))))+aux152));
aux154=((0.+16.j)*(v12*(v13*v34)))+((32.*(v13*(v14*(v22*v34))))+(((0.+-8.j)*(v23*v34))+aux153));
aux155=(32.*(v12*(v14*(v24*v33))))+((-8.*((v24**2)*v33))+((-16.*(v11*((v24**2)*v33)))+aux154));
aux156=(-16.*((v14**2)*(v22*v33)))+(((0.+8.j)*(v24*v33))+(((0.+16.j)*(v11*(v24*v33)))+aux155));
aux157=((0.+-16.j)*(v12*(v14*v33)))+((8.*(v22*v33))+((16.*(v11*(v22*v33)))+aux156));
aux158=(16.*((v13**2)*(v24**2)))+((2.*v33)+((4.*(v11*v33))+((-16.*((v12**2)*v33))+aux157)));
aux159=(-32.*(v13*(v14*(v23*v24))))+((-4.*(v24**2))+((-8.*(v11*(v24**2)))+aux158));
aux160=((0.+8.j)*(v11*v24))+(((0.+-16.j)*((v13**2)*v24))+((16.*(v12*(v14*v24)))+aux159));
aux161=(-16.*(v11*(v23**2)))+((16.*((v14**2)*(v23**2)))+(((0.+4.j)*v24)+aux160));
aux162=(32.*(v12*(v13*v23)))+(((0.+16.j)*(v13*(v14*v23)))+((-8.*(v23**2))+aux161));
aux163=(4.*v22)+((8.*(v11*v22))+((-16.*((v13**2)*v22))+((-8.*((v14**2)*v22))+aux162)));
aux164=(2.*v11)+((-8.*(v12**2))+((-4.*(v13**2))+(((0.+-8.j)*(v12*v14))+aux163)));
aux165=(v14*(v24+((2.*(v24*v33))+(-2.*(v23*v34)))))+(v13*(v23+((-2.*(v24*v34))+(2.*(v23*v44)))));
aux166=(-4.*((v23**2)*(1.+(2.*v44))))+(v22*(2.+((-8.*(v34**2))+((4.*v44)+(v33*(4.+(8.*v44)))))));
aux167=(16.*(v23*(v24*v34)))+((-4.*(v34**2))+((2.*v44)+((4.*(v33*v44))+aux166)));
aux168=2.*(v11*(1.+((-4.*(v24**2))+((2.*v33)+((-8.*((v24**2)*v33))+aux167)))));
aux169=(-4.*((v12**2)*(1.+((-4.*(v34**2))+((2.*v44)+(v33*(2.+(4.*v44))))))))+((16.*(v12*aux165))+aux168);
aux170=(-16.*((v13**2)*(v22*v44)))+((-8.*((v23**2)*v44))+((4.*(v33*v44))+((8.*(v22*(v33*v44)))+aux169)));
aux171=(-8.*(v22*(v34**2)))+((2.*v44)+((-8.*((v13**2)*v44))+((4.*(v22*v44))+aux170)));
aux172=(32.*(v13*(v14*(v22*v34))))+((16.*(v23*(v24*v34)))+((-4.*(v34**2))+aux171));
aux173=(-16.*((v14**2)*(v22*v33)))+((-8.*((v24**2)*v33))+((16.*(v13*(v14*v34)))+aux172));
aux174=(16.*((v13**2)*(v24**2)))+((2.*v33)+((-8.*((v14**2)*v33))+((4.*(v22*v33))+aux173)));
aux175=(16.*((v14**2)*(v23**2)))+((-32.*(v13*(v14*(v23*v24))))+((-4.*(v24**2))+aux174));
aux176=(2.*v22)+((-8.*((v13**2)*v22))+((-8.*((v14**2)*v22))+((-4.*(v23**2))+aux175)));
aux177=((0.+1.j)*(r4*(1.+aux164)))/(1.+((-4.*(v13**2))+((-4.*(v14**2))+aux176)));
aux178=v14*((0.+1.j)+(((0.+2.j)*v33)+((-2.*(v24*(1.+(2.*v33))))+(4.*(v23*v34)))));
aux179=v12*(aux178+(-2.*(v13*((((0.+1.j)+(-2.*v24))*v34)+(2.*(v23*(1.+v44)))))));
aux180=(-8.*((v23**2)*(1.+v44)))+(4.*(v22*(1.+((-2.*(v34**2))+(v44+(2.*(v33*(1.+v44))))))));
aux181=((8.*(v23*(((0.+-1.j)+(2.*v24))*v34)))+aux180)-(((((0.+1.j)+(-2.*v24))**2))*(1.+(2.*v33)));
aux182=(8.*((v12**2)*(1.+((-2.*(v34**2))+(v44+(2.*(v33*(1.+v44))))))))+((8.*aux179)+(-2.*(v11*aux181)));
aux183=(16.*((v13**2)*(v22*v44)))+((8.*((v23**2)*v44))+((-8.*(v22*(v33*v44)))+aux182));
aux184=((0.+8.j)*(v23*v34))+((-16.*(v23*(v24*v34)))+((8.*(v22*(v34**2)))+((-4.*(v22*v44))+aux183)));
aux185=((0.+-8.j)*(v24*v33))+((8.*((v24**2)*v33))+((-32.*(v13*(v14*(v22*v34))))+aux184));
aux186=(-16.*((v13**2)*(v24**2)))+((-2.*v33)+((-8.*(v22*v33))+((16.*((v14**2)*(v22*v33)))+aux185)));
aux187=((0.+16.j)*((v13**2)*v24))+((32.*(v13*(v14*(v23*v24))))+((4.*(v24**2))+aux186));
aux188=((0.+-16.j)*(v13*(v14*v23)))+((8.*(v23**2))+((-16.*((v14**2)*(v23**2)))+(((0.+-4.j)*v24)+aux187)));
aux189=(4.*(v13**2))+((-4.*v22)+((16.*((v13**2)*v22))+((8.*((v14**2)*v22))+aux188)));
aux190=v14*((0.+1.j)+(((0.+2.j)*v33)+((-2.*(v24*(1.+(2.*v33))))+(4.*(v23*v34)))));
aux191=v12*(aux190+(-2.*(v13*(v23+((((0.+1.j)+(-2.*v24))*v34)+(2.*(v23*v44)))))));
aux192=(-4.*((v23**2)*(1.+(2.*v44))))+(v22*(2.+((-8.*(v34**2))+((4.*v44)+(v33*(4.+(8.*v44)))))));
aux193=(8.*(v23*(((0.+-1.j)+(2.*v24))*v34)))+((4.*(v34**2))+((-2.*v44)+((-4.*(v33*v44))+aux192)));
aux194=(-4.*(v24**2))+((-2.*v33)+(((0.+8.j)*(v24*v33))+((-8.*((v24**2)*v33))+aux193)));
aux195=(-4.*((v12**2)*(1.+((-4.*(v34**2))+((2.*v44)+(v33*(2.+(4.*v44))))))))+((-8.*aux191)+(2.*(v11*(-1.+(((0.+4.j)*v24)+aux194)))));
aux196=(-16.*((v13**2)*(v22*v44)))+((-8.*((v23**2)*v44))+((-4.*(v33*v44))+((8.*(v22*(v33*v44)))+aux195)));
aux197=(-8.*(v22*(v34**2)))+((-2.*v44)+((8.*((v13**2)*v44))+((4.*(v22*v44))+aux196)));
aux198=(32.*(v13*(v14*(v22*v34))))+(((0.+-8.j)*(v23*v34))+((16.*(v23*(v24*v34)))+((4.*(v34**2))+aux197)));
aux199=((0.+8.j)*(v24*v33))+((-8.*((v24**2)*v33))+((-16.*(v13*(v14*v34)))+aux198));
aux200=(8.*((v14**2)*v33))+((4.*(v22*v33))+((-16.*((v14**2)*(v22*v33)))+aux199));
aux201=(-32.*(v13*(v14*(v23*v24))))+((-4.*(v24**2))+((16.*((v13**2)*(v24**2)))+((-2.*v33)+aux200)));
aux202=(16.*((v14**2)*(v23**2)))+(((0.+4.j)*v24)+(((0.+-16.j)*((v13**2)*v24))+aux201));
aux203=(-8.*((v14**2)*v22))+(((0.+16.j)*(v13*(v14*v23)))+((-4.*(v23**2))+aux202));
aux204=-1.+((4.*(v13**2))+((4.*(v14**2))+((2.*v22)+((-8.*((v13**2)*v22))+aux203))));
aux205=v14+((2.*(v14*v22))+(((0.+4.j)*(v14*v24))+((2.*(v24*v34))+(-2.*(v23*v44)))));
aux206=(4.*(v34**2))+((4.*(v13*((0.+1.j)+(v24+((0.+2.j)*v44)))))+((-2.*v44)+(-4.*(v33*v44))));
aux207=(-2.*(v13*(aux205-v23)))+(v12*(-1.+((4.*(v14*v23))+((-2.*v33)+(((0.+-8.j)*(v14*v34))+aux206)))));
aux208=((0.+8.j)*(v11*(v24*v34)))+(((0.+-4.j)*(v23*v44))+(((0.+-8.j)*(v11*(v23*v44)))+aux207));
aux209=(4.*(v11*(v22*v34)))+((-4.*(v14*(v23*v34)))+(((0.+4.j)*(v24*v34))+aux208));
aux210=(4.*(v14*(v24*v33)))+(v34+((2.*(v11*v34))+((-4.*((v12**2)*v34))+((2.*(v22*v34))+aux209))));
aux211=((0.+8.j)*((v14**2)*v23))+((2.*(v14*v24))+((-2.*(v23*v24))+((-4.*(v11*(v23*v24)))+aux210)));
aux212=(2.*v33)+(((0.+8.j)*(v24*v33))+((v22*(2.+(4.*v33)))+((0.+-8.j)*(v23*v34))));
aux213=((0.+2.j)*(v14*v34))+(((0.+2.j)*(v23*v34))+((-4.*(v34**2))+((2.*v44)+(4.*(v33*v44)))));
aux214=v24+((2.*(v24*v33))+((2.*(v13*v44))+((0.+1.j)*(1.+((2.*v33)+aux213)))));
aux215=(4.*(v11*(v23*v44)))+(((0.+8.j)*(v13*(v23*v44)))+(-2.*(v12*(v13+aux214))));
aux216=(v14*(1.+((-4.*(v23**2))+(((0.+4.j)*v24)+((4.*(v13*v24))+aux212)))))+((2.*(v23*v44))+aux215);
aux217=(-2.*(v24*v34))+((-4.*(v11*(v24*v34)))+(((0.+-8.j)*(v13*(v24*v34)))+aux216));
aux218=(-4.*((v14**2)*v23))+((4.*(v13*(v23*v24)))+((-2.*(v13*v34))+((-4.*(v13*(v22*v34)))+aux217)));
aux219=(r3*(((0.+-2.j)*v23)+(((0.+-4.j)*(v11*v23))+aux211)))+(r1*(v23+((2.*(v11*v23))+(((0.+4.j)*(v13*v23))+aux218))));
aux220=(v14*(v24+((2.*(v24*v33))+(-2.*(v23*v34)))))+(v13*(v23+((-2.*(v24*v34))+(2.*(v23*v44)))));
aux221=(-4.*((v23**2)*(1.+(2.*v44))))+(v22*(2.+((-8.*(v34**2))+((4.*v44)+(v33*(4.+(8.*v44)))))));
aux222=(16.*(v23*(v24*v34)))+((-4.*(v34**2))+((2.*v44)+((4.*(v33*v44))+aux221)));
aux223=-2.*(v11*(1.+((-4.*(v24**2))+((2.*v33)+((-8.*((v24**2)*v33))+aux222)))));
aux224=(4.*((v12**2)*(1.+((-4.*(v34**2))+((2.*v44)+(v33*(2.+(4.*v44))))))))+((-16.*(v12*aux220))+aux223);
aux225=(16.*((v13**2)*(v22*v44)))+((8.*((v23**2)*v44))+((-4.*(v33*v44))+((-8.*(v22*(v33*v44)))+aux224)));
aux226=(8.*(v22*(v34**2)))+((-2.*v44)+((8.*((v13**2)*v44))+((-4.*(v22*v44))+aux225)));
aux227=(-32.*(v13*(v14*(v22*v34))))+((-16.*(v23*(v24*v34)))+((4.*(v34**2))+aux226));
aux228=(16.*((v14**2)*(v22*v33)))+((8.*((v24**2)*v33))+((-16.*(v13*(v14*v34)))+aux227));
aux229=(-16.*((v13**2)*(v24**2)))+((-2.*v33)+((8.*((v14**2)*v33))+((-4.*(v22*v33))+aux228)));
aux230=(-16.*((v14**2)*(v23**2)))+((32.*(v13*(v14*(v23*v24))))+((4.*(v24**2))+aux229));
aux231=(-2.*v22)+((8.*((v13**2)*v22))+((8.*((v14**2)*v22))+((4.*(v23**2))+aux230)));
aux232=(((0.+1.j)*(r4*(-1.+aux189)))+((r2*aux204)+((0.+2.j)*aux219)))/(-1.+((4.*(v13**2))+((4.*(v14**2))+aux231)));
aux233=((0.+-4.j)*(b24*(1.+(2.*b33))))+(((0.+8.j)*(b23*b34))+((-8.*(b34**2))+((4.*b44)+(8.*(b33*b44)))));
aux234=((b13**2)*(-4.+(((0.+8.j)*b24)+(-8.*b44))))+(b11*(2.+((4.*b33)+aux233)));
aux235=((0.+4.j)*(b23*b34))+(((0.+-8.j)*(b13*((b14*b23)+((b12*b34)+((0.+2.j)*(b14*b34))))))+aux234);
aux236=((0.+4.j)*(b12*b14))+(((0.+8.j)*(b12*(b14*b33)))+(((0.+-4.j)*(b24*b33))+aux235));
aux237=(-8.*((b14**2)*b33))+((-4.*(b34**2))+((2.*b44)+((4.*(b33*b44))+(np.conjugate(aux236)))));
aux238=-2.*((b12**2)*(1.+((2.*b33)+((-4.*(b34**2))+((2.*b44)+(4.*(b33*b44)))))));
aux239=(b14*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))))+(b13*(b23+((-2.*(b24*b34))+(2.*(b23*b44)))));
aux240=(-4.*((b23**2)*(1.+(2.*b44))))+(b22*(2.+((-8.*(b34**2))+((4.*b44)+(b33*(4.+(8.*b44)))))));
aux241=(16.*(b23*(b24*b34)))+((-4.*(b34**2))+((2.*b44)+((4.*(b33*b44))+aux240)));
aux242=(8.*(b12*aux239))+(b11*(1.+((-4.*(b24**2))+((2.*b33)+((-8.*((b24**2)*b33))+aux241)))));
aux243=(-4.*((b23**2)*b44))+((2.*(b33*b44))+((4.*(b22*(b33*b44)))+(aux238+aux242)));
aux244=(-4.*((b13**2)*b44))+((2.*(b22*b44))+((-8.*((b13**2)*(b22*b44)))+aux243));
aux245=(16.*(b13*(b14*(b22*b34))))+((8.*(b23*(b24*b34)))+((-4.*(b22*(b34**2)))+aux244));
aux246=(-8.*((b14**2)*(b22*b33)))+((-4.*((b24**2)*b33))+((8.*(b13*(b14*b34)))+aux245));
aux247=(8.*((b13**2)*(b24**2)))+((-4.*((b14**2)*b33))+((2.*(b22*b33))+aux246));
aux248=(-4.*((b14**2)*b22))+((8.*((b14**2)*(b23**2)))+((-16.*(b13*(b14*(b23*b24))))+aux247));
aux249=(-2.*b33)+((4.*(b34**2))+((-2.*b44)+(-2.*((-4.*((b13**2)*b22))+aux248))));
aux250=(4.*(b13**2))+((4.*(b14**2))+((-2.*b22)+((4.*(b23**2))+((4.*(b24**2))+aux249))));
aux251=((8.*(b14**2))+(((0.+-4.j)*b24)+(-2.*(1.+((2.*b33)+aux237)))))/(-1.+aux250);
aux252=(2.*b33)+(((0.+-8.j)*(b24*b33))+((b22*(2.+(4.*b33)))+((0.+8.j)*(b23*b34))));
aux253=((0.+-2.j)*(b14*b34))+(((0.+-2.j)*(b23*b34))+((-4.*(b34**2))+((2.*b44)+(4.*(b33*b44)))));
aux254=b24+((2.*(b24*b33))+((2.*(b13*b44))+((0.+-1.j)*(1.+((2.*b33)+aux253)))));
aux255=(4.*(b11*(b23*b44)))+(((0.+-8.j)*(b13*(b23*b44)))+(-2.*(b12*(b13+aux254))));
aux256=(b14*(1.+((-4.*(b23**2))+(((0.+-4.j)*b24)+((4.*(b13*b24))+aux252)))))+((2.*(b23*b44))+aux255);
aux257=(-2.*(b24*b34))+((-4.*(b11*(b24*b34)))+(((0.+8.j)*(b13*(b24*b34)))+aux256));
aux258=(-4.*((b14**2)*b23))+((4.*(b13*(b23*b24)))+((-2.*(b13*b34))+((-4.*(b13*(b22*b34)))+aux257)));
aux259=(2.*(b14*b22))+(((0.+-4.j)*(b14*b24))+((2.*(b24*b34))+(-2.*(b23*b44))));
aux260=(4.*(b13*((0.+-1.j)+(b24+((0.+-2.j)*b44)))))+((-2.*b44)+(-4.*(b33*b44)));
aux261=(4.*(b14*b23))+((-2.*b33)+(((0.+8.j)*(b14*b34))+((4.*(b34**2))+aux260)));
aux262=((0.+8.j)*(b11*(b23*b44)))+((-2.*(b13*((b14+aux259)-b23)))+(b12*(-1.+aux261)));
aux263=((0.+-4.j)*(b24*b34))+(((0.+-8.j)*(b11*(b24*b34)))+(((0.+4.j)*(b23*b44))+aux262));
aux264=(-4.*((b12**2)*b34))+((2.*(b22*b34))+((4.*(b11*(b22*b34)))+((-4.*(b14*(b23*b34)))+aux263)));
aux265=(-4.*(b11*(b23*b24)))+((4.*(b14*(b24*b33)))+(b34+((2.*(b11*b34))+aux264)));
aux266=((0.+4.j)*(b11*b23))+(((0.+-8.j)*((b14**2)*b23))+((2.*(b14*b24))+((-2.*(b23*b24))+aux265)));
aux267=(b14*((0.+1.j)+(((0.+2.j)*b33)+((b24*(2.+(4.*b33)))+(-4.*(b23*b34))))))+(4.*(b13*(b23*(1.+b44))));
aux268=(-8.*((b23**2)*(1.+b44)))+(4.*(b22*(1.+((-2.*(b34**2))+(b44+(2.*(b33*(1.+b44))))))));
aux269=((8.*(b23*(((0.+1.j)+(2.*b24))*b34)))+aux268)-(((((0.+1.j)+(2.*b24))**2))*(1.+(2.*b33)));
aux270=(-8.*((b12**2)*(1.+((-2.*(b34**2))+(b44+(2.*(b33*(1.+b44))))))))+(2.*(b11*aux269));
aux271=(8.*(b22*(b33*b44)))+((8.*(b12*((-2.*(b13*(((0.+1.j)+(2.*b24))*b34)))+aux267)))+aux270);
aux272=(4.*(b22*b44))+((-16.*((b13**2)*(b22*b44)))+((-8.*((b23**2)*b44))+aux271));
aux273=((0.+8.j)*(b23*b34))+((16.*(b23*(b24*b34)))+((-8.*(b22*(b34**2)))+aux272));
aux274=((0.+-8.j)*(b24*b33))+((-8.*((b24**2)*b33))+((32.*(b13*(b14*(b22*b34))))+aux273));
aux275=(16.*((b13**2)*(b24**2)))+((2.*b33)+((8.*(b22*b33))+((-16.*((b14**2)*(b22*b33)))+aux274)));
aux276=((0.+16.j)*((b13**2)*b24))+((-32.*(b13*(b14*(b23*b24))))+((-4.*(b24**2))+aux275));
aux277=((0.+-16.j)*(b13*(b14*b23)))+((-8.*(b23**2))+((16.*((b14**2)*(b23**2)))+(((0.+-4.j)*b24)+aux276)));
aux278=(-4.*(b13**2))+((4.*b22)+((-16.*((b13**2)*b22))+((-8.*((b14**2)*b22))+aux277)));
aux279=(b14*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))))+(b13*(b23+((-2.*(b24*b34))+(2.*(b23*b44)))));
aux280=(-4.*((b23**2)*(1.+(2.*b44))))+(b22*(2.+((-8.*(b34**2))+((4.*b44)+(b33*(4.+(8.*b44)))))));
aux281=(16.*(b23*(b24*b34)))+((-4.*(b34**2))+((2.*b44)+((4.*(b33*b44))+aux280)));
aux282=2.*(b11*(1.+((-4.*(b24**2))+((2.*b33)+((-8.*((b24**2)*b33))+aux281)))));
aux283=(-4.*((b12**2)*(1.+((-4.*(b34**2))+((2.*b44)+(b33*(2.+(4.*b44))))))))+((16.*(b12*aux279))+aux282);
aux284=(-16.*((b13**2)*(b22*b44)))+((-8.*((b23**2)*b44))+((4.*(b33*b44))+((8.*(b22*(b33*b44)))+aux283)));
aux285=(-8.*(b22*(b34**2)))+((2.*b44)+((-8.*((b13**2)*b44))+((4.*(b22*b44))+aux284)));
aux286=(32.*(b13*(b14*(b22*b34))))+((16.*(b23*(b24*b34)))+((-4.*(b34**2))+aux285));
aux287=(-16.*((b14**2)*(b22*b33)))+((-8.*((b24**2)*b33))+((16.*(b13*(b14*b34)))+aux286));
aux288=(16.*((b13**2)*(b24**2)))+((2.*b33)+((-8.*((b14**2)*b33))+((4.*(b22*b33))+aux287)));
aux289=(16.*((b14**2)*(b23**2)))+((-32.*(b13*(b14*(b23*b24))))+((-4.*(b24**2))+aux288));
aux290=(2.*b22)+((-8.*((b13**2)*b22))+((-8.*((b14**2)*b22))+((-4.*(b23**2))+aux289)));
aux291=((0.+-4.j)*(b24*(1.+(2.*b33))))+(((0.+8.j)*(b23*b34))+((-8.*(b34**2))+((4.*b44)+(8.*(b33*b44)))));
aux292=((b13**2)*(-4.+(((0.+8.j)*b24)+(-8.*b44))))+(b11*(2.+((4.*b33)+aux291)));
aux293=((0.+4.j)*(b23*b34))+(((0.+-8.j)*(b13*((b14*b23)+((b12*b34)+((0.+2.j)*(b14*b34))))))+aux292);
aux294=((0.+4.j)*(b12*b14))+(((0.+8.j)*(b12*(b14*b33)))+(((0.+-4.j)*(b24*b33))+aux293));
aux295=(-8.*((b14**2)*b33))+((-4.*(b34**2))+((2.*b44)+((4.*(b33*b44))+(np.conjugate(aux294)))));
aux296=-2.*((b12**2)*(1.+((2.*b33)+((-4.*(b34**2))+((2.*b44)+(4.*(b33*b44)))))));
aux297=(b14*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))))+(b13*(b23+((-2.*(b24*b34))+(2.*(b23*b44)))));
aux298=(-4.*((b23**2)*(1.+(2.*b44))))+(b22*(2.+((-8.*(b34**2))+((4.*b44)+(b33*(4.+(8.*b44)))))));
aux299=(16.*(b23*(b24*b34)))+((-4.*(b34**2))+((2.*b44)+((4.*(b33*b44))+aux298)));
aux300=(8.*(b12*aux297))+(b11*(1.+((-4.*(b24**2))+((2.*b33)+((-8.*((b24**2)*b33))+aux299)))));
aux301=(-4.*((b23**2)*b44))+((2.*(b33*b44))+((4.*(b22*(b33*b44)))+(aux296+aux300)));
aux302=(-4.*((b13**2)*b44))+((2.*(b22*b44))+((-8.*((b13**2)*(b22*b44)))+aux301));
aux303=(16.*(b13*(b14*(b22*b34))))+((8.*(b23*(b24*b34)))+((-4.*(b22*(b34**2)))+aux302));
aux304=(-8.*((b14**2)*(b22*b33)))+((-4.*((b24**2)*b33))+((8.*(b13*(b14*b34)))+aux303));
aux305=(8.*((b13**2)*(b24**2)))+((-4.*((b14**2)*b33))+((2.*(b22*b33))+aux304));
aux306=(-4.*((b14**2)*b22))+((8.*((b14**2)*(b23**2)))+((-16.*(b13*(b14*(b23*b24))))+aux305));
aux307=(-2.*b33)+((4.*(b34**2))+((-2.*b44)+(-2.*((-4.*((b13**2)*b22))+aux306))));
aux308=(4.*(b13**2))+((4.*(b14**2))+((-2.*b22)+((4.*(b23**2))+((4.*(b24**2))+aux307))));
aux309=((8.*(b14**2))+(((0.+-4.j)*b24)+(-2.*(1.+((2.*b33)+aux295)))))/(-1.+aux308);
aux310=((0.+-1.j)*((1.+aux278)*s4))+((1.+((-4.*(b13**2))+((-4.*(b14**2))+aux290)))*(s2*(-1.+aux309)));
aux311=((0.+2.j)*((b23+((2.*(b11*b23))+(((0.+-4.j)*(b13*b23))+aux258)))*s1))+(((0.+2.j)*((((0.+2.j)*b23)+aux266)*s3))+aux310);
aux312=(b14*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))))+(b13*(b23+((-2.*(b24*b34))+(2.*(b23*b44)))));
aux313=(-4.*((b23**2)*(1.+(2.*b44))))+(b22*(2.+((-8.*(b34**2))+((4.*b44)+(b33*(4.+(8.*b44)))))));
aux314=(16.*(b23*(b24*b34)))+((-4.*(b34**2))+((2.*b44)+((4.*(b33*b44))+aux313)));
aux315=2.*(b11*(1.+((-4.*(b24**2))+((2.*b33)+((-8.*((b24**2)*b33))+aux314)))));
aux316=(-4.*((b12**2)*(1.+((-4.*(b34**2))+((2.*b44)+(b33*(2.+(4.*b44))))))))+((16.*(b12*aux312))+aux315);
aux317=(-16.*((b13**2)*(b22*b44)))+((-8.*((b23**2)*b44))+((4.*(b33*b44))+((8.*(b22*(b33*b44)))+aux316)));
aux318=(-8.*(b22*(b34**2)))+((2.*b44)+((-8.*((b13**2)*b44))+((4.*(b22*b44))+aux317)));
aux319=(32.*(b13*(b14*(b22*b34))))+((16.*(b23*(b24*b34)))+((-4.*(b34**2))+aux318));
aux320=(-16.*((b14**2)*(b22*b33)))+((-8.*((b24**2)*b33))+((16.*(b13*(b14*b34)))+aux319));
aux321=(16.*((b13**2)*(b24**2)))+((2.*b33)+((-8.*((b14**2)*b33))+((4.*(b22*b33))+aux320)));
aux322=(16.*((b14**2)*(b23**2)))+((-32.*(b13*(b14*(b23*b24))))+((-4.*(b24**2))+aux321));
aux323=(2.*b22)+((-8.*((b13**2)*b22))+((-8.*((b14**2)*b22))+((-4.*(b23**2))+aux322)));
aux324=(s2*(1.+aux251))+(aux311/(1.+((-4.*(b13**2))+((-4.*(b14**2))+aux323))));
aux325=(aux135/(1.+((-4.*(v13**2))+((-4.*(v14**2))+aux147))))+(aux177+(aux232+aux324));
aux326=(((0.+1.j)*(r3*aux79))/(-1.+((4.*(v13**2))+((4.*(v14**2))+aux91))))+(aux113+aux325);
aux327=aux38+(((aux57*s4)/(1.+((-4.*(b13**2))+((-4.*(b14**2))+aux69))))+aux326);
output=0.25*(aux19+aux327);
return output
def lineal3(V,B,R,S):
v11,v12,v13,v14=separate(V,0)
v21,v22,v23,v24=separate(V,1)
v31,v32,v33,v34=separate(V,2)
v41,v42,v43,v44=separate(V,3)
b11,b12,b13,b14=separate(B,0)
b21,b22,b23,b24=separate(B,1)
b31,b32,b33,b34=separate(B,2)
b41,b42,b43,b44=separate(B,3)
r1,r2,r3,r4=R[0],R[1],R[2],R[3]
s1,s2,s3,s4=S[0],S[1],S[2],S[3]
aux0=(2.*b44)+(4.*(b33*(1.+(b11+((-2.*(b14**2))+((2.*b44)+(2.*(b11*b44))))))));
aux1=1.+(((0.+-8.j)*(b14*b34))+((-8.*(b34**2))+((-8.*(b11*(b34**2)))+aux0)));
aux2=(b22*((0.+2.j)+((8.*(b14*b34))+((0.+4.j)*b44))))+(((0.+2.j)*b44)+(4.*(b12*(b23+((-2.*(b24*b34))+(2.*(b23*b44)))))));
aux3=(0.+1.j)+((-8.*(b14*(b23*b24)))+(((0.+-4.j)*(b24**2))+((4.*(b14*b34))+aux2)));
aux4=(-4.*((b13**2)*(1.+((-4.*(b24**2))+((2.*b44)+(b22*(2.+(4.*b44))))))))+((2.*(b22*aux1))+(4.*(b13*aux3)));
aux5=(8.*(b33*b44))+((8.*(b11*(b33*b44)))+((-16.*((b12**2)*(b33*b44)))+aux4));
aux6=((0.+-16.j)*(b12*(b23*b44)))+((-16.*((b23**2)*b44))+((-16.*(b11*((b23**2)*b44)))+aux5));
aux7=(-8.*(b34**2))+((-8.*(b11*(b34**2)))+((16.*((b12**2)*(b34**2)))+((2.*b44)+aux6)));
aux8=((0.+16.j)*(b12*(b24*b34)))+((32.*(b23*(b24*b34)))+((32.*(b11*(b23*(b24*b34))))+aux7));
aux9=(-16.*(b11*((b24**2)*b33)))+(((0.+-8.j)*(b14*b34))+((-32.*(b12*(b14*(b23*b34))))+aux8));
aux10=(-8.*((b14**2)*b33))+((32.*(b12*(b14*(b24*b33))))+((-16.*((b24**2)*b33))+aux9));
aux11=(-4.*(b24**2))+((4.*b33)+((4.*(b11*b33))+((-8.*((b12**2)*b33))+aux10)));
aux12=(-8.*(b11*(b23**2)))+((16.*((b14**2)*(b23**2)))+(((0.+16.j)*(b14*(b23*b24)))+aux11));
aux13=(b14*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))))+(b13*(b23+((-2.*(b24*b34))+(2.*(b23*b44)))));
aux14=(-4.*((b23**2)*(1.+(2.*b44))))+(b22*(2.+((-8.*(b34**2))+((4.*b44)+(b33*(4.+(8.*b44)))))));
aux15=(16.*(b23*(b24*b34)))+((-4.*(b34**2))+((2.*b44)+((4.*(b33*b44))+aux14)));
aux16=(16.*(b12*aux13))+(2.*(b11*(1.+((-4.*(b24**2))+((2.*b33)+((-8.*((b24**2)*b33))+aux15))))));
aux17=(-4.*((b12**2)*(1.+((-4.*(b34**2))+((2.*b44)+(b33*(2.+(4.*b44))))))))+aux16;
aux18=(-16.*((b13**2)*(b22*b44)))+((-8.*((b23**2)*b44))+((4.*(b33*b44))+((8.*(b22*(b33*b44)))+aux17)));
aux19=(-8.*(b22*(b34**2)))+((2.*b44)+((-8.*((b13**2)*b44))+((4.*(b22*b44))+aux18)));
aux20=(32.*(b13*(b14*(b22*b34))))+((16.*(b23*(b24*b34)))+((-4.*(b34**2))+aux19));
aux21=(-16.*((b14**2)*(b22*b33)))+((-8.*((b24**2)*b33))+((16.*(b13*(b14*b34)))+aux20));
aux22=(16.*((b13**2)*(b24**2)))+((2.*b33)+((-8.*((b14**2)*b33))+((4.*(b22*b33))+aux21)));
aux23=(16.*((b14**2)*(b23**2)))+((-32.*(b13*(b14*(b23*b24))))+((-4.*(b24**2))+aux22));
aux24=(2.*b22)+((-8.*((b13**2)*b22))+((-8.*((b14**2)*b22))+((-4.*(b23**2))+aux23)));
aux25=((0.+1.j)*((1.+(((0.+-8.j)*(b12*b23))+((-8.*(b23**2))+aux12)))*s1))/(1.+((-4.*(b13**2))+((-4.*(b14**2))+aux24)));
aux26=(2.*(b14*b22))+(((0.+-4.j)*(b14*b24))+((2.*(b24*b34))+(-2.*(b23*b44))));
aux27=(4.*(b13*((0.+-1.j)+(b24+((0.+-2.j)*b44)))))+((-2.*b44)+(-4.*(b33*b44)));
aux28=(4.*(b14*b23))+((-2.*b33)+(((0.+8.j)*(b14*b34))+((4.*(b34**2))+aux27)));
aux29=((0.+8.j)*(b11*(b23*b44)))+((-2.*(b13*((b14+aux26)-b23)))+(b12*(-1.+aux28)));
aux30=((0.+-4.j)*(b24*b34))+(((0.+-8.j)*(b11*(b24*b34)))+(((0.+4.j)*(b23*b44))+aux29));
aux31=(-4.*((b12**2)*b34))+((2.*(b22*b34))+((4.*(b11*(b22*b34)))+((-4.*(b14*(b23*b34)))+aux30)));
aux32=(-4.*(b11*(b23*b24)))+((4.*(b14*(b24*b33)))+(b34+((2.*(b11*b34))+aux31)));
aux33=((0.+4.j)*(b11*b23))+(((0.+-8.j)*((b14**2)*b23))+((2.*(b14*b24))+((-2.*(b23*b24))+aux32)));
aux34=(b14*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))))+(b13*(b23+((-2.*(b24*b34))+(2.*(b23*b44)))));
aux35=(-4.*((b23**2)*(1.+(2.*b44))))+(b22*(2.+((-8.*(b34**2))+((4.*b44)+(b33*(4.+(8.*b44)))))));
aux36=(16.*(b23*(b24*b34)))+((-4.*(b34**2))+((2.*b44)+((4.*(b33*b44))+aux35)));
aux37=(16.*(b12*aux34))+(2.*(b11*(1.+((-4.*(b24**2))+((2.*b33)+((-8.*((b24**2)*b33))+aux36))))));
aux38=(-4.*((b12**2)*(1.+((-4.*(b34**2))+((2.*b44)+(b33*(2.+(4.*b44))))))))+aux37;
aux39=(-16.*((b13**2)*(b22*b44)))+((-8.*((b23**2)*b44))+((4.*(b33*b44))+((8.*(b22*(b33*b44)))+aux38)));
aux40=(-8.*(b22*(b34**2)))+((2.*b44)+((-8.*((b13**2)*b44))+((4.*(b22*b44))+aux39)));
aux41=(32.*(b13*(b14*(b22*b34))))+((16.*(b23*(b24*b34)))+((-4.*(b34**2))+aux40));
aux42=(-16.*((b14**2)*(b22*b33)))+((-8.*((b24**2)*b33))+((16.*(b13*(b14*b34)))+aux41));
aux43=(16.*((b13**2)*(b24**2)))+((2.*b33)+((-8.*((b14**2)*b33))+((4.*(b22*b33))+aux42)));
aux44=(16.*((b14**2)*(b23**2)))+((-32.*(b13*(b14*(b23*b24))))+((-4.*(b24**2))+aux43));
aux45=(2.*b22)+((-8.*((b13**2)*b22))+((-8.*((b14**2)*b22))+((-4.*(b23**2))+aux44)));
aux46=((0.+2.j)*((((0.+2.j)*b23)+aux33)*s2))/(1.+((-4.*(b13**2))+((-4.*(b14**2))+aux45)));
aux47=(4.*((b12**2)*b34))+((1.+(2.*b11))*(((2.*(b23*b24))+(-2.*(b22*b34)))-b34));
aux48=(-4.*(b12*(b14*b23)))+((2.*(b13*(b14+((2.*(b14*b22))+(-2.*(b12*b24))))))+aux47);
aux49=b12*(b13+(b24+((2.*(b24*b33))+((-2.*((b14+b23)*b34))+(2.*(b13*b44))))));
aux50=(4.*(b11*(b24*b34)))+((-2.*(b23*b44))+((-4.*(b11*(b23*b44)))+(2.*aux49)));
aux51=(-4.*(b13*(b23*b24)))+((2.*(b13*b34))+((4.*(b13*(b22*b34)))+((2.*(b24*b34))+aux50)));
aux52=b14*(1.+((-4.*(b23**2))+((4.*(b13*b24))+((2.*b33)+(b22*(2.+(4.*b33)))))));
aux53=(4.*aux48)+((0.+2.j)*((((-2.*(b11*b23))+((4.*((b14**2)*b23))+aux51))-aux52)-b23));
aux54=(b14*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))))+(b13*(b23+((-2.*(b24*b34))+(2.*(b23*b44)))));
aux55=(-4.*((b23**2)*(1.+(2.*b44))))+(b22*(2.+((-8.*(b34**2))+((4.*b44)+(b33*(4.+(8.*b44)))))));
aux56=(16.*(b23*(b24*b34)))+((-4.*(b34**2))+((2.*b44)+((4.*(b33*b44))+aux55)));
aux57=(16.*(b12*aux54))+(2.*(b11*(1.+((-4.*(b24**2))+((2.*b33)+((-8.*((b24**2)*b33))+aux56))))));
aux58=(-4.*((b12**2)*(1.+((-4.*(b34**2))+((2.*b44)+(b33*(2.+(4.*b44))))))))+aux57;
aux59=(-16.*((b13**2)*(b22*b44)))+((-8.*((b23**2)*b44))+((4.*(b33*b44))+((8.*(b22*(b33*b44)))+aux58)));
aux60=(-8.*(b22*(b34**2)))+((2.*b44)+((-8.*((b13**2)*b44))+((4.*(b22*b44))+aux59)));
aux61=(32.*(b13*(b14*(b22*b34))))+((16.*(b23*(b24*b34)))+((-4.*(b34**2))+aux60));
aux62=(-16.*((b14**2)*(b22*b33)))+((-8.*((b24**2)*b33))+((16.*(b13*(b14*b34)))+aux61));
aux63=(16.*((b13**2)*(b24**2)))+((2.*b33)+((-8.*((b14**2)*b33))+((4.*(b22*b33))+aux62)));
aux64=(16.*((b14**2)*(b23**2)))+((-32.*(b13*(b14*(b23*b24))))+((-4.*(b24**2))+aux63));
aux65=(2.*b22)+((-8.*((b13**2)*b22))+((-8.*((b14**2)*b22))+((-4.*(b23**2))+aux64)));
aux66=((0.+-16.j)*((v12**2)*(v33*v44)))+(((0.+8.j)*(v22*(v33*v44)))+((0.+16.j)*(v11*(v22*(v33*v44)))));
aux67=((0.+-16.j)*(v11*((v23**2)*v44)))+(((0.+4.j)*(v33*v44))+(((0.+8.j)*(v11*(v33*v44)))+aux66));
aux68=(16.*(v12*(v23*v44)))+(((0.+32.j)*(v12*(v13*(v23*v44))))+(((0.+-8.j)*((v23**2)*v44))+aux67));
aux69=((0.+24.j)*(v11*(v22*v44)))+((-16.*(v13*(v22*v44)))+(((0.+-16.j)*((v13**2)*(v22*v44)))+aux68));
aux70=(-8.*(v13*v44))+(((0.+-8.j)*((v13**2)*v44))+(((0.+12.j)*(v22*v44))+aux69));
aux71=((0.+6.j)*v44)+(((0.+12.j)*(v11*v44))+(((0.+-24.j)*((v12**2)*v44))+aux70));
aux72=((0.+16.j)*((v12**2)*(v34**2)))+(((0.+-8.j)*(v22*(v34**2)))+(((0.+-16.j)*(v11*(v22*(v34**2))))+aux71));
aux73=((0.+32.j)*(v11*(v23*(v24*v34))))+(((0.+-4.j)*(v34**2))+(((0.+-8.j)*(v11*(v34**2)))+aux72));
aux74=(-16.*(v12*(v24*v34)))+(((0.+-32.j)*(v12*(v13*(v24*v34))))+(((0.+16.j)*(v23*(v24*v34)))+aux73));
aux75=((0.+32.j)*(v13*(v14*(v22*v34))))+(((0.+-32.j)*(v12*(v14*(v23*v34))))+aux74);
aux76=(8.*(v14*v34))+(((0.+16.j)*(v13*(v14*v34)))+((16.*(v14*(v22*v34)))+aux75));
aux77=((0.+32.j)*(v12*(v14*(v24*v33))))+(((0.+-8.j)*((v24**2)*v33))+(((0.+-16.j)*(v11*((v24**2)*v33)))+aux76));
aux78=((0.+4.j)*(v22*v33))+(((0.+8.j)*(v11*(v22*v33)))+(((0.+-16.j)*((v14**2)*(v22*v33)))+aux77));
aux79=((0.+4.j)*(v11*v33))+(((0.+-8.j)*((v12**2)*v33))+(((0.+-8.j)*((v14**2)*v33))+aux78));
aux80=(16.*(v13*(v24**2)))+(((0.+16.j)*((v13**2)*(v24**2)))+(((0.+2.j)*v33)+aux79));
aux81=((0.+-32.j)*(v13*(v14*(v23*v24))))+(((0.+-12.j)*(v24**2))+(((0.+-24.j)*(v11*(v24**2)))+aux80));
aux82=((0.+16.j)*((v14**2)*(v23**2)))+(((0.+48.j)*(v12*(v14*v24)))+((-16.*(v14*(v23*v24)))+aux81));
aux83=((0.+16.j)*(v12*(v13*v23)))+(((0.+-4.j)*(v23**2))+(((0.+-8.j)*(v11*(v23**2)))+aux82));
aux84=((0.+-8.j)*((v13**2)*v22))+(((0.+-24.j)*((v14**2)*v22))+((8.*(v12*v23))+aux83));
aux85=((0.+-12.j)*(v14**2))+(((0.+6.j)*v22)+(((0.+12.j)*(v11*v22))+((-8.*(v13*v22))+aux84)));
aux86=((0.+6.j)*v11)+(((0.+-12.j)*(v12**2))+((-4.*v13)+(((0.+-4.j)*(v13**2))+aux85)));
aux87=(v14*(v24+((2.*(v24*v33))+(-2.*(v23*v34)))))+(v13*(v23+((-2.*(v24*v34))+(2.*(v23*v44)))));
aux88=(-4.*((v23**2)*(1.+(2.*v44))))+(v22*(2.+((-8.*(v34**2))+((4.*v44)+(v33*(4.+(8.*v44)))))));
aux89=(16.*(v23*(v24*v34)))+((-4.*(v34**2))+((2.*v44)+((4.*(v33*v44))+aux88)));
aux90=-2.*(v11*(1.+((-4.*(v24**2))+((2.*v33)+((-8.*((v24**2)*v33))+aux89)))));
aux91=(4.*((v12**2)*(1.+((-4.*(v34**2))+((2.*v44)+(v33*(2.+(4.*v44))))))))+((-16.*(v12*aux87))+aux90);
aux92=(16.*((v13**2)*(v22*v44)))+((8.*((v23**2)*v44))+((-4.*(v33*v44))+((-8.*(v22*(v33*v44)))+aux91)));
aux93=(8.*(v22*(v34**2)))+((-2.*v44)+((8.*((v13**2)*v44))+((-4.*(v22*v44))+aux92)));
aux94=(-32.*(v13*(v14*(v22*v34))))+((-16.*(v23*(v24*v34)))+((4.*(v34**2))+aux93));
aux95=(16.*((v14**2)*(v22*v33)))+((8.*((v24**2)*v33))+((-16.*(v13*(v14*v34)))+aux94));
aux96=(-16.*((v13**2)*(v24**2)))+((-2.*v33)+((8.*((v14**2)*v33))+((-4.*(v22*v33))+aux95)));
aux97=(-16.*((v14**2)*(v23**2)))+((32.*(v13*(v14*(v23*v24))))+((4.*(v24**2))+aux96));
aux98=(-2.*v22)+((8.*((v13**2)*v22))+((8.*((v14**2)*v22))+((4.*(v23**2))+aux97)));
aux99=((0.+1.j)*(r3*((0.+3.j)+aux86)))/(-1.+((4.*(v13**2))+((4.*(v14**2))+aux98)));
aux100=(-16.*((v12**2)*(v33*v44)))+((16.*(v22*(v33*v44)))+(16.*(v11*(v22*(v33*v44)))));
aux101=(-16.*(v11*((v23**2)*v44)))+((8.*(v33*v44))+((8.*(v11*(v33*v44)))+aux100));
aux102=((0.+16.j)*(v12*(v23*v44)))+((32.*(v12*(v13*(v23*v44))))+((-16.*((v23**2)*v44))+aux101));
aux103=(4.*(v22*v44))+(((0.+-16.j)*(v13*(v22*v44)))+((-16.*((v13**2)*(v22*v44)))+aux102));
aux104=(-16.*(v11*(v22*(v34**2))))+((2.*v44)+(((0.+-8.j)*(v13*v44))+((-8.*((v13**2)*v44))+aux103)));
aux105=(-8.*(v11*(v34**2)))+((16.*((v12**2)*(v34**2)))+((-16.*(v22*(v34**2)))+aux104));
aux106=(32.*(v23*(v24*v34)))+((32.*(v11*(v23*(v24*v34))))+((-8.*(v34**2))+aux105));
aux107=(-32.*(v12*(v14*(v23*v34))))+(((0.+-16.j)*(v12*(v24*v34)))+((-32.*(v12*(v13*(v24*v34))))+aux106));
aux108=(16.*(v13*(v14*v34)))+(((0.+16.j)*(v14*(v22*v34)))+((32.*(v13*(v14*(v22*v34))))+aux107));
aux109=(-16.*((v24**2)*v33))+((-16.*(v11*((v24**2)*v33)))+(((0.+8.j)*(v14*v34))+aux108));
aux110=(8.*(v11*(v22*v33)))+((-16.*((v14**2)*(v22*v33)))+((32.*(v12*(v14*(v24*v33))))+aux109));
aux111=(4.*(v11*v33))+((-8.*((v12**2)*v33))+((-8.*((v14**2)*v33))+((8.*(v22*v33))+aux110)));
aux112=((0.+16.j)*(v13*(v24**2)))+((16.*((v13**2)*(v24**2)))+((4.*v33)+aux111));
aux113=((0.+-16.j)*(v14*(v23*v24)))+((-32.*(v13*(v14*(v23*v24))))+((-4.*(v24**2))+aux112));
aux114=(-8.*(v23**2))+((-8.*(v11*(v23**2)))+((16.*((v14**2)*(v23**2)))+aux113));
aux115=(-8.*((v13**2)*v22))+(((0.+8.j)*(v12*v23))+((16.*(v12*(v13*v23)))+aux114));
aux116=((0.+-4.j)*v13)+((-4.*(v13**2))+((2.*v22)+(((0.+-8.j)*(v13*v22))+aux115)));
aux117=(v14*(v24+((2.*(v24*v33))+(-2.*(v23*v34)))))+(v13*(v23+((-2.*(v24*v34))+(2.*(v23*v44)))));
aux118=(-4.*((v23**2)*(1.+(2.*v44))))+(v22*(2.+((-8.*(v34**2))+((4.*v44)+(v33*(4.+(8.*v44)))))));
aux119=(16.*(v23*(v24*v34)))+((-4.*(v34**2))+((2.*v44)+((4.*(v33*v44))+aux118)));
aux120=-2.*(v11*(1.+((-4.*(v24**2))+((2.*v33)+((-8.*((v24**2)*v33))+aux119)))));
aux121=(4.*((v12**2)*(1.+((-4.*(v34**2))+((2.*v44)+(v33*(2.+(4.*v44))))))))+((-16.*(v12*aux117))+aux120);
aux122=(16.*((v13**2)*(v22*v44)))+((8.*((v23**2)*v44))+((-4.*(v33*v44))+((-8.*(v22*(v33*v44)))+aux121)));
aux123=(8.*(v22*(v34**2)))+((-2.*v44)+((8.*((v13**2)*v44))+((-4.*(v22*v44))+aux122)));
aux124=(-32.*(v13*(v14*(v22*v34))))+((-16.*(v23*(v24*v34)))+((4.*(v34**2))+aux123));
aux125=(16.*((v14**2)*(v22*v33)))+((8.*((v24**2)*v33))+((-16.*(v13*(v14*v34)))+aux124));
aux126=(-16.*((v13**2)*(v24**2)))+((-2.*v33)+((8.*((v14**2)*v33))+((-4.*(v22*v33))+aux125)));
aux127=(-16.*((v14**2)*(v23**2)))+((32.*(v13*(v14*(v23*v24))))+((4.*(v24**2))+aux126));
aux128=(-2.*v22)+((8.*((v13**2)*v22))+((8.*((v14**2)*v22))+((4.*(v23**2))+aux127)));
aux129=((0.+1.j)*(r1*(1.+aux116)))/(-1.+((4.*(v13**2))+((4.*(v14**2))+aux128)));
aux130=(-8.*(v11*(v24*v34)))+((-8.*(v12*(v13*v44)))+((4.*(v23*v44))+(8.*(v11*(v23*v44)))));
aux131=((0.+16.j)*(v11*(v22*v34)))+((-8.*(v13*(v22*v34)))+((8.*(v12*(v23*v34)))+((-4.*(v24*v34))+aux130)));
aux132=((0.+-16.j)*((v12**2)*v34))+((-4.*(v13*v34))+((8.*(v12*(v14*v34)))+(((0.+8.j)*(v22*v34))+aux131)));
aux133=(8.*(v14*(v22*v33)))+((-8.*(v12*(v24*v33)))+(((0.+4.j)*v34)+(((0.+8.j)*(v11*v34))+aux132)));
aux134=((0.+-16.j)*(v11*(v23*v24)))+((8.*(v13*(v23*v24)))+((4.*(v14*v33))+aux133));
aux135=((0.+16.j)*(v12*(v13*v24)))+((8.*(v13*(v14*v24)))+(((0.+-8.j)*(v23*v24))+aux134));
aux136=((0.+16.j)*(v12*(v14*v23)))+((-8.*((v14**2)*v23))+((-8.*(v14*(v23**2)))+((-4.*(v12*v24))+aux135)));
aux137=(4.*(v14*v22))+(((0.+-16.j)*(v13*(v14*v22)))+((2.*v23)+((4.*(v11*v23))+aux136)));
aux138=(0.+1.j)*(r4*((-4.*(v12*v13))+((2.*v14)+(((0.+-8.j)*(v13*v14))+aux137))));
aux139=(v14*(v24+((2.*(v24*v33))+(-2.*(v23*v34)))))+(v13*(v23+((-2.*(v24*v34))+(2.*(v23*v44)))));
aux140=(-4.*((v23**2)*(1.+(2.*v44))))+(v22*(2.+((-8.*(v34**2))+((4.*v44)+(v33*(4.+(8.*v44)))))));
aux141=(16.*(v23*(v24*v34)))+((-4.*(v34**2))+((2.*v44)+((4.*(v33*v44))+aux140)));
aux142=2.*(v11*(1.+((-4.*(v24**2))+((2.*v33)+((-8.*((v24**2)*v33))+aux141)))));
aux143=(-4.*((v12**2)*(1.+((-4.*(v34**2))+((2.*v44)+(v33*(2.+(4.*v44))))))))+((16.*(v12*aux139))+aux142);
aux144=(-16.*((v13**2)*(v22*v44)))+((-8.*((v23**2)*v44))+((4.*(v33*v44))+((8.*(v22*(v33*v44)))+aux143)));
aux145=(-8.*(v22*(v34**2)))+((2.*v44)+((-8.*((v13**2)*v44))+((4.*(v22*v44))+aux144)));
aux146=(32.*(v13*(v14*(v22*v34))))+((16.*(v23*(v24*v34)))+((-4.*(v34**2))+aux145));
aux147=(-16.*((v14**2)*(v22*v33)))+((-8.*((v24**2)*v33))+((16.*(v13*(v14*v34)))+aux146));
aux148=(16.*((v13**2)*(v24**2)))+((2.*v33)+((-8.*((v14**2)*v33))+((4.*(v22*v33))+aux147)));
aux149=(16.*((v14**2)*(v23**2)))+((-32.*(v13*(v14*(v23*v24))))+((-4.*(v24**2))+aux148));
aux150=(2.*v22)+((-8.*((v13**2)*v22))+((-8.*((v14**2)*v22))+((-4.*(v23**2))+aux149)));
aux151=((0.+16.j)*(v11*(v23*v44)))+((-8.*(v13*(v23*v44)))+(8.*(v12*(v33*v44))));
aux152=(4.*(v12*v44))+(((0.+-16.j)*(v12*(v13*v44)))+(((0.+8.j)*(v23*v44))+aux151));
aux153=((0.+-16.j)*(v11*(v24*v34)))+((8.*(v13*(v24*v34)))+((-8.*(v12*(v34**2)))+aux152));
aux154=(-8.*(v11*(v22*v34)))+((8.*(v14*(v23*v34)))+(((0.+-8.j)*(v24*v34))+aux153));
aux155=(8.*((v12**2)*v34))+(((0.+16.j)*(v12*(v14*v34)))+((-4.*(v22*v34))+aux154));
aux156=(4.*(v12*v33))+((-8.*(v14*(v24*v33)))+((-2.*v34)+((-4.*(v11*v34))+aux155)));
aux157=((0.+16.j)*(v13*(v14*v24)))+((4.*(v23*v24))+((8.*(v11*(v23*v24)))+aux156));
aux158=((0.+-16.j)*((v14**2)*v23))+((-8.*(v12*(v13*v24)))+((-4.*(v14*v24))+aux157));
aux159=((0.+4.j)*v23)+(((0.+8.j)*(v11*v23))+((-4.*(v13*v23))+((-8.*(v12*(v14*v23)))+aux158)));
aux160=(2.*v12)+(((0.+-8.j)*(v12*v13))+((4.*(v13*v14))+((8.*(v13*(v14*v22)))+aux159)));
aux161=(v14*(v24+((2.*(v24*v33))+(-2.*(v23*v34)))))+(v13*(v23+((-2.*(v24*v34))+(2.*(v23*v44)))));
aux162=(-4.*((v23**2)*(1.+(2.*v44))))+(v22*(2.+((-8.*(v34**2))+((4.*v44)+(v33*(4.+(8.*v44)))))));
aux163=(16.*(v23*(v24*v34)))+((-4.*(v34**2))+((2.*v44)+((4.*(v33*v44))+aux162)));
aux164=2.*(v11*(1.+((-4.*(v24**2))+((2.*v33)+((-8.*((v24**2)*v33))+aux163)))));
aux165=(-4.*((v12**2)*(1.+((-4.*(v34**2))+((2.*v44)+(v33*(2.+(4.*v44))))))))+((16.*(v12*aux161))+aux164);
aux166=(-16.*((v13**2)*(v22*v44)))+((-8.*((v23**2)*v44))+((4.*(v33*v44))+((8.*(v22*(v33*v44)))+aux165)));
aux167=(-8.*(v22*(v34**2)))+((2.*v44)+((-8.*((v13**2)*v44))+((4.*(v22*v44))+aux166)));
aux168=(32.*(v13*(v14*(v22*v34))))+((16.*(v23*(v24*v34)))+((-4.*(v34**2))+aux167));
aux169=(-16.*((v14**2)*(v22*v33)))+((-8.*((v24**2)*v33))+((16.*(v13*(v14*v34)))+aux168));
aux170=(16.*((v13**2)*(v24**2)))+((2.*v33)+((-8.*((v14**2)*v33))+((4.*(v22*v33))+aux169)));
aux171=(16.*((v14**2)*(v23**2)))+((-32.*(v13*(v14*(v23*v24))))+((-4.*(v24**2))+aux170));
aux172=(2.*v22)+((-8.*((v13**2)*v22))+((-8.*((v14**2)*v22))+((-4.*(v23**2))+aux171)));
aux173=(2.*v44)+(4.*(v33*(1.+(v11+((-2.*(v14**2))+((2.*v44)+(2.*(v11*v44))))))));
aux174=1.+(((0.+8.j)*(v14*v34))+((-8.*(v34**2))+((-8.*(v11*(v34**2)))+aux173)));
aux175=((0.+-2.j)*(v22*(1.+(2.*v44))))+(4.*(v12*(v23+((-2.*(v24*v34))+(2.*(v23*v44))))));
aux176=((0.+4.j)*(v24**2))+((4.*(v14*v34))+((8.*(v14*(v22*v34)))+(((0.+-2.j)*v44)+aux175)));
aux177=(2.*(v22*aux174))+(4.*(v13*((0.+-1.j)+((-8.*(v14*(v23*v24)))+aux176))));
aux178=(-4.*((v13**2)*(1.+((-4.*(v24**2))+((2.*v44)+(v22*(2.+(4.*v44))))))))+aux177;
aux179=(8.*(v33*v44))+((8.*(v11*(v33*v44)))+((-16.*((v12**2)*(v33*v44)))+aux178));
aux180=((0.+16.j)*(v12*(v23*v44)))+((-16.*((v23**2)*v44))+((-16.*(v11*((v23**2)*v44)))+aux179));
aux181=(-8.*(v34**2))+((-8.*(v11*(v34**2)))+((16.*((v12**2)*(v34**2)))+((2.*v44)+aux180)));
aux182=((0.+-16.j)*(v12*(v24*v34)))+((32.*(v23*(v24*v34)))+((32.*(v11*(v23*(v24*v34))))+aux181));
aux183=(-16.*(v11*((v24**2)*v33)))+(((0.+8.j)*(v14*v34))+((-32.*(v12*(v14*(v23*v34))))+aux182));
aux184=(-8.*((v14**2)*v33))+((32.*(v12*(v14*(v24*v33))))+((-16.*((v24**2)*v33))+aux183));
aux185=(-4.*(v24**2))+((4.*v33)+((4.*(v11*v33))+((-8.*((v12**2)*v33))+aux184)));
aux186=(-8.*(v11*(v23**2)))+((16.*((v14**2)*(v23**2)))+(((0.+-16.j)*(v14*(v23*v24)))+aux185));
aux187=(-4.*(v23**2))+((4.*(v13*((0.+-1.j)+(((0.+-2.j)*v22)+v24))))+((2.*v33)+(4.*(v22*v33))));
aux188=(-4.*(v24*v33))+((4.*(v14*v34))+((4.*(v23*v34))+(v13*(-2.+(((0.+8.j)*v24)+(-4.*v44))))));
aux189=(v12*(((0.+8.j)*(v14*v23))+((-2.*v24)+aux188)))+((2.*(v23*v44))+(4.*(v11*(v23*v44))));
aux190=((0.+8.j)*(v11*(v22*v34)))+((-4.*(v13*(v22*v34)))+((-2.*(v24*v34))+((-4.*(v11*(v24*v34)))+aux189)));
aux191=((0.+-8.j)*((v12**2)*v34))+((-2.*(v13*v34))+(((0.+4.j)*(v22*v34))+aux190));
aux192=(v14*(1.+((2.*v22)+aux187)))+(((0.+2.j)*v34)+(((0.+4.j)*(v11*v34))+aux191));
aux193=((0.+-4.j)*(v23*v24))+(((0.+-8.j)*(v11*(v23*v24)))+((4.*(v13*(v23*v24)))+aux192));
aux194=v14+((2.*(v14*v22))+(((0.+4.j)*(v14*v24))+((2.*(v24*v34))+(-2.*(v23*v44)))));
aux195=(-4.*(v34**2))+((-4.*(v13*((0.+1.j)+(v24+((0.+2.j)*v44)))))+((2.*v44)+(4.*(v33*v44))));
aux196=(2.*(v13*(aux194-v23)))+(v12*(1.+((-4.*(v14*v23))+((2.*v33)+(((0.+8.j)*(v14*v34))+aux195)))));
aux197=((0.+-8.j)*(v11*(v24*v34)))+(((0.+4.j)*(v23*v44))+(((0.+8.j)*(v11*(v23*v44)))+aux196));
aux198=(-4.*(v11*(v22*v34)))+((4.*(v14*(v23*v34)))+(((0.+-4.j)*(v24*v34))+aux197));
aux199=(-4.*(v14*(v24*v33)))+((-2.*(v11*v34))+((4.*((v12**2)*v34))+((-2.*(v22*v34))+aux198)));
aux200=((0.+-8.j)*((v14**2)*v23))+((-2.*(v14*v24))+((2.*(v23*v24))+((4.*(v11*(v23*v24)))+aux199)));
aux201=(r4*(v23+((2.*(v11*v23))+((-4.*((v14**2)*v23))+aux193))))+(r2*((((0.+2.j)*v23)+(((0.+4.j)*(v11*v23))+aux200))-v34));
aux202=4.*((v12**2)*(1.+((4.*(v34**2))+((2.*v44)+(-2.*(v33*(1.+(2.*v44))))))));
aux203=(-4.*((v23**2)*(1.+(2.*v44))))+(v22*(-2.+((4.*v33)+((-8.*(v34**2))+((-4.*v44)+(8.*(v33*v44)))))));
aux204=(16.*(v23*(v24*v34)))+((-4.*(v34**2))+((-2.*v44)+((4.*(v33*v44))+aux203)));
aux205=2.*(v11*(-1.+((4.*(v24**2))+((2.*v33)+((-8.*((v24**2)*v33))+aux204)))));
aux206=(2.*(v24*((v14*(-1.+(2.*v33)))-(((0.+1.j)+(2.*v13))*v34))))+(v23*((0.+1.j)+((-4.*(v14*v34))+(((0.+2.j)*v44)+(v13*(2.+(4.*v44)))))));
aux207=(4.*(v33*v44))+((8.*(v22*(v33*v44)))+(aux202+(aux205+(8.*(v12*aux206)))));
aux208=((0.+-16.j)*(v13*(v22*v44)))+((-16.*((v13**2)*(v22*v44)))+((-8.*((v23**2)*v44))+aux207));
aux209=(-2.*v44)+(((0.+-8.j)*(v13*v44))+((-8.*((v13**2)*v44))+((-4.*(v22*v44))+aux208)));
aux210=(32.*(v13*(v14*(v22*v34))))+((16.*(v23*(v24*v34)))+((-4.*(v34**2))+((-8.*(v22*(v34**2)))+aux209)));
aux211=((0.+8.j)*(v14*v34))+((16.*(v13*(v14*v34)))+(((0.+16.j)*(v14*(v22*v34)))+aux210));
aux212=(4.*(v22*v33))+((-16.*((v14**2)*(v22*v33)))+((-8.*((v24**2)*v33))+aux211));
aux213=((0.+16.j)*(v13*(v24**2)))+((16.*((v13**2)*(v24**2)))+((2.*v33)+((-8.*((v14**2)*v33))+aux212)));
aux214=((0.+-16.j)*(v14*(v23*v24)))+((-32.*(v13*(v14*(v23*v24))))+((4.*(v24**2))+aux213));
aux215=(8.*((v14**2)*v22))+((-4.*(v23**2))+((16.*((v14**2)*(v23**2)))+aux214));
aux216=(4.*(v14**2))+((-2.*v22)+(((0.+-8.j)*(v13*v22))+((-8.*((v13**2)*v22))+aux215)));
aux217=((0.+-2.j)*aux201)+(r3*(-1.+(((0.+-4.j)*v13)+((-4.*(v13**2))+aux216))));
aux218=((0.+1.j)*(r1*(1.+(((0.+8.j)*(v12*v23))+((-8.*(v23**2))+aux186)))))+aux217;
aux219=(v14*(v24+((2.*(v24*v33))+(-2.*(v23*v34)))))+(v13*(v23+((-2.*(v24*v34))+(2.*(v23*v44)))));
aux220=(-4.*((v23**2)*(1.+(2.*v44))))+(v22*(2.+((-8.*(v34**2))+((4.*v44)+(v33*(4.+(8.*v44)))))));
aux221=(16.*(v23*(v24*v34)))+((-4.*(v34**2))+((2.*v44)+((4.*(v33*v44))+aux220)));
aux222=-2.*(v11*(1.+((-4.*(v24**2))+((2.*v33)+((-8.*((v24**2)*v33))+aux221)))));
aux223=(4.*((v12**2)*(1.+((-4.*(v34**2))+((2.*v44)+(v33*(2.+(4.*v44))))))))+((-16.*(v12*aux219))+aux222);
aux224=(16.*((v13**2)*(v22*v44)))+((8.*((v23**2)*v44))+((-4.*(v33*v44))+((-8.*(v22*(v33*v44)))+aux223)));
aux225=(8.*(v22*(v34**2)))+((-2.*v44)+((8.*((v13**2)*v44))+((-4.*(v22*v44))+aux224)));
aux226=(-32.*(v13*(v14*(v22*v34))))+((-16.*(v23*(v24*v34)))+((4.*(v34**2))+aux225));
aux227=(16.*((v14**2)*(v22*v33)))+((8.*((v24**2)*v33))+((-16.*(v13*(v14*v34)))+aux226));
aux228=(-16.*((v13**2)*(v24**2)))+((-2.*v33)+((8.*((v14**2)*v33))+((-4.*(v22*v33))+aux227)));
aux229=(-16.*((v14**2)*(v23**2)))+((32.*(v13*(v14*(v23*v24))))+((4.*(v24**2))+aux228));
aux230=(-2.*v22)+((8.*((v13**2)*v22))+((8.*((v14**2)*v22))+((4.*(v23**2))+aux229)));
aux231=(0.+1.j)*(b12*(b23+(((0.+4.j)*(b14*b24))+((-2.*(b24*b34))+(2.*(b23*b44))))));
aux232=((0.+2.j)*(b14*(b22*b34)))+(((0.+-1.j)*(b13*(b22+((-2.*(b24**2))+(b44+(2.*(b22*b44)))))))+aux231);
aux233=np.conjugate((((0.+-2.j)*(b14*(b23*b24)))+(((0.+1.j)*(b14*b34))+aux232)));
aux234=(-4.*(b11*(1.+((-4.*(b24**2))+((2.*b44)+(b22*(2.+(4.*b44))))))))+(8.*(((2.*((b14**2)*b22))+(((b12**2)*(1.+(2.*b44)))+aux233))-(b22*b44)));
aux235=((0.+4.j)*b13)+((8.*(b14**2))+((-4.*b22)+((8.*(b24**2))+((-4.*b44)+aux234))));
aux236=-2.*((b12**2)*(1.+((2.*b33)+((-4.*(b34**2))+((2.*b44)+(4.*(b33*b44)))))));
aux237=(b14*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))))+(b13*(b23+((-2.*(b24*b34))+(2.*(b23*b44)))));
aux238=(-4.*((b23**2)*(1.+(2.*b44))))+(b22*(2.+((-8.*(b34**2))+((4.*b44)+(b33*(4.+(8.*b44)))))));
aux239=(16.*(b23*(b24*b34)))+((-4.*(b34**2))+((2.*b44)+((4.*(b33*b44))+aux238)));
aux240=(8.*(b12*aux237))+(b11*(1.+((-4.*(b24**2))+((2.*b33)+((-8.*((b24**2)*b33))+aux239)))));
aux241=(-4.*((b23**2)*b44))+((2.*(b33*b44))+((4.*(b22*(b33*b44)))+(aux236+aux240)));
aux242=(-4.*((b13**2)*b44))+((2.*(b22*b44))+((-8.*((b13**2)*(b22*b44)))+aux241));
aux243=(16.*(b13*(b14*(b22*b34))))+((8.*(b23*(b24*b34)))+((-4.*(b22*(b34**2)))+aux242));
aux244=(-8.*((b14**2)*(b22*b33)))+((-4.*((b24**2)*b33))+((8.*(b13*(b14*b34)))+aux243));
aux245=(8.*((b13**2)*(b24**2)))+((-4.*((b14**2)*b33))+((2.*(b22*b33))+aux244));
aux246=(-4.*((b14**2)*b22))+((8.*((b14**2)*(b23**2)))+((-16.*(b13*(b14*(b23*b24))))+aux245));
aux247=(-2.*b33)+((4.*(b34**2))+((-2.*b44)+(-2.*((-4.*((b13**2)*b22))+aux246))));
aux248=(4.*(b13**2))+((4.*(b14**2))+((-2.*b22)+((4.*(b23**2))+((4.*(b24**2))+aux247))));
aux249=(b14*((-2.*(b23*b24))+(b34+(2.*(b22*b34)))))+(b12*(b23+((-2.*(b24*b34))+(2.*(b23*b44)))));
aux250=(-4.*((b23**2)*b44))+((2.*(b33*b44))+((4.*(b22*(b33*b44)))+((b12**2)*(2.+(4.*b44)))));
aux251=(-4.*((b24**2)*b33))+((8.*(b23*(b24*b34)))+((-2.*(b34**2))+((-4.*(b22*(b34**2)))+aux250)));
aux252=(4.*((b14**2)*b22))+((-2.*(b23**2))+((-8.*(b12*(b14*b24)))+(b33+((2.*(b22*b33))+aux251))));
aux253=((2.*(b14**2))+aux252)-(b11*(1.+((-4.*(b24**2))+((2.*b44)+(b22*(2.+(4.*b44)))))));
aux254=(b14*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))))+(b13*(b23+((-2.*(b24*b34))+(2.*(b23*b44)))));
aux255=(-4.*((b23**2)*(1.+(2.*b44))))+(b22*(2.+((-8.*(b34**2))+((4.*b44)+(b33*(4.+(8.*b44)))))));
aux256=(16.*(b23*(b24*b34)))+((-4.*(b34**2))+((2.*b44)+((4.*(b33*b44))+aux255)));
aux257=2.*(b11*(1.+((-4.*(b24**2))+((2.*b33)+((-8.*((b24**2)*b33))+aux256)))));
aux258=(-4.*((b12**2)*(1.+((-4.*(b34**2))+((2.*b44)+(b33*(2.+(4.*b44))))))))+((16.*(b12*aux254))+aux257);
aux259=(-16.*((b13**2)*(b22*b44)))+((-8.*((b23**2)*b44))+((4.*(b33*b44))+((8.*(b22*(b33*b44)))+aux258)));
aux260=(-8.*(b22*(b34**2)))+((2.*b44)+((-8.*((b13**2)*b44))+((4.*(b22*b44))+aux259)));
aux261=(32.*(b13*(b14*(b22*b34))))+((16.*(b23*(b24*b34)))+((-4.*(b34**2))+aux260));
aux262=(-16.*((b14**2)*(b22*b33)))+((-8.*((b24**2)*b33))+((16.*(b13*(b14*b34)))+aux261));
aux263=(16.*((b13**2)*(b24**2)))+((2.*b33)+((-8.*((b14**2)*b33))+((4.*(b22*b33))+aux262)));
aux264=(16.*((b14**2)*(b23**2)))+((-32.*(b13*(b14*(b23*b24))))+((-4.*(b24**2))+aux263));
aux265=(2.*b22)+((-8.*((b13**2)*b22))+((-8.*((b14**2)*b22))+((-4.*(b23**2))+aux264)));
aux266=-2.*(b13*((b14+((2.*(b14*b22))+((2.*(b24*b34))+(-2.*(b23*b44)))))-b23));
aux267=(4.*(b14*b23))+((4.*(b13*b24))+((-2.*b33)+((4.*(b34**2))+((-2.*b44)+(-4.*(b33*b44))))));
aux268=(4.*(b11*(b22*b34)))+((-4.*(b14*(b23*b34)))+(aux266+(b12*(-1.+aux267))));
aux269=(4.*(b14*(b24*b33)))+(b34+((2.*(b11*b34))+((-4.*((b12**2)*b34))+((2.*(b22*b34))+aux268))));
aux270=(0.+2.j)*(((2.*(b14*b24))+((-2.*(b23*b24))+((-4.*(b11*(b23*b24)))+aux269)))*s2);
aux271=(4.*((b12**2)*b34))+((1.+(2.*b11))*(((2.*(b23*b24))+(-2.*(b22*b34)))-b34));
aux272=(-4.*(b12*(b14*b23)))+((2.*(b13*(b14+((2.*(b14*b22))+(-2.*(b12*b24))))))+aux271);
aux273=b12*(b13+(b24+((2.*(b24*b33))+((-2.*((b14+b23)*b34))+(2.*(b13*b44))))));
aux274=(4.*(b11*(b24*b34)))+((-2.*(b23*b44))+((-4.*(b11*(b23*b44)))+(2.*aux273)));
aux275=(-4.*(b13*(b23*b24)))+((2.*(b13*b34))+((4.*(b13*(b22*b34)))+((2.*(b24*b34))+aux274)));
aux276=b14*(1.+((-4.*(b23**2))+((4.*(b13*b24))+((2.*b33)+(b22*(2.+(4.*b33)))))));
aux277=(0.+2.j)*(((((-2.*(b11*b23))+((4.*((b14**2)*b23))+aux275))-aux276)-b23)*s4);
aux278=(b14*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))))+(b13*(b23+((-2.*(b24*b34))+(2.*(b23*b44)))));
aux279=(-4.*((b23**2)*(1.+(2.*b44))))+(b22*(2.+((-8.*(b34**2))+((4.*b44)+(b33*(4.+(8.*b44)))))));
aux280=(16.*(b23*(b24*b34)))+((-4.*(b34**2))+((2.*b44)+((4.*(b33*b44))+aux279)));
aux281=2.*(b11*(1.+((-4.*(b24**2))+((2.*b33)+((-8.*((b24**2)*b33))+aux280)))));
aux282=(-4.*((b12**2)*(1.+((-4.*(b34**2))+((2.*b44)+(b33*(2.+(4.*b44))))))))+((16.*(b12*aux278))+aux281);
aux283=(-16.*((b13**2)*(b22*b44)))+((-8.*((b23**2)*b44))+((4.*(b33*b44))+((8.*(b22*(b33*b44)))+aux282)));
aux284=(-8.*(b22*(b34**2)))+((2.*b44)+((-8.*((b13**2)*b44))+((4.*(b22*b44))+aux283)));
aux285=(32.*(b13*(b14*(b22*b34))))+((16.*(b23*(b24*b34)))+((-4.*(b34**2))+aux284));
aux286=(-16.*((b14**2)*(b22*b33)))+((-8.*((b24**2)*b33))+((16.*(b13*(b14*b34)))+aux285));
aux287=(16.*((b13**2)*(b24**2)))+((2.*b33)+((-8.*((b14**2)*b33))+((4.*(b22*b33))+aux286)));
aux288=(16.*((b14**2)*(b23**2)))+((-32.*(b13*(b14*(b23*b24))))+((-4.*(b24**2))+aux287));
aux289=(2.*b22)+((-8.*((b13**2)*b22))+((-8.*((b14**2)*b22))+((-4.*(b23**2))+aux288)));
aux290=(0.+1.j)*(b12*(b23+(((0.+4.j)*(b14*b24))+((-2.*(b24*b34))+(2.*(b23*b44))))));
aux291=((0.+2.j)*(b14*(b22*b34)))+(((0.+-1.j)*(b13*(b22+((-2.*(b24**2))+(b44+(2.*(b22*b44)))))))+aux290);
aux292=np.conjugate((((0.+-2.j)*(b14*(b23*b24)))+(((0.+1.j)*(b14*b34))+aux291)));
aux293=(-4.*(b11*(1.+((-4.*(b24**2))+((2.*b44)+(b22*(2.+(4.*b44))))))))+(8.*(((2.*((b14**2)*b22))+(((b12**2)*(1.+(2.*b44)))+aux292))-(b22*b44)));
aux294=((0.+4.j)*b13)+((8.*(b14**2))+((-4.*b22)+((8.*(b24**2))+((-4.*b44)+aux293))));
aux295=-2.*((b12**2)*(1.+((2.*b33)+((-4.*(b34**2))+((2.*b44)+(4.*(b33*b44)))))));
aux296=(b14*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))))+(b13*(b23+((-2.*(b24*b34))+(2.*(b23*b44)))));
aux297=(-4.*((b23**2)*(1.+(2.*b44))))+(b22*(2.+((-8.*(b34**2))+((4.*b44)+(b33*(4.+(8.*b44)))))));
aux298=(16.*(b23*(b24*b34)))+((-4.*(b34**2))+((2.*b44)+((4.*(b33*b44))+aux297)));
aux299=(8.*(b12*aux296))+(b11*(1.+((-4.*(b24**2))+((2.*b33)+((-8.*((b24**2)*b33))+aux298)))));
aux300=(-4.*((b23**2)*b44))+((2.*(b33*b44))+((4.*(b22*(b33*b44)))+(aux295+aux299)));
aux301=(-4.*((b13**2)*b44))+((2.*(b22*b44))+((-8.*((b13**2)*(b22*b44)))+aux300));
aux302=(16.*(b13*(b14*(b22*b34))))+((8.*(b23*(b24*b34)))+((-4.*(b22*(b34**2)))+aux301));
aux303=(-8.*((b14**2)*(b22*b33)))+((-4.*((b24**2)*b33))+((8.*(b13*(b14*b34)))+aux302));
aux304=(8.*((b13**2)*(b24**2)))+((-4.*((b14**2)*b33))+((2.*(b22*b33))+aux303));
aux305=(-4.*((b14**2)*b22))+((8.*((b14**2)*(b23**2)))+((-16.*(b13*(b14*(b23*b24))))+aux304));
aux306=(-2.*b33)+((4.*(b34**2))+((-2.*b44)+(-2.*((-4.*((b13**2)*b22))+aux305))));
aux307=(4.*(b13**2))+((4.*(b14**2))+((-2.*b22)+((4.*(b23**2))+((4.*(b24**2))+aux306))));
aux308=(1.+((-4.*(b13**2))+((-4.*(b14**2))+aux289)))*(s3*(-1.+((-2.+aux294)/(-1.+aux307))));
aux309=(-4.*(b23*((1.+((-4.*(b14**2))+((2.*b44)+(b11*(2.+(4.*b44))))))*s2)))+(aux270+((4.*(aux272*s4))+(aux277+aux308)));
aux310=(8.*(b24*(((-2.*(b13*b14))+(b34+(2.*(b11*b34))))*s2)))+((8.*(b12*((b13+((-2.*(b14*b34))+(2.*(b13*b44))))*s2)))+aux309);
aux311=((0.+2.j)*(aux253*s1))+(((0.+1.j)*((1.+((-4.*(b13**2))+((-4.*(b14**2))+aux265)))*s1))+aux310);
aux312=(-4.*(b13*((1.+((-4.*(b24**2))+((2.*b44)+(b22*(2.+(4.*b44))))))*s1)))+((8.*(aux249*s1))+aux311);
aux313=(b14*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))))+(b13*(b23+((-2.*(b24*b34))+(2.*(b23*b44)))));
aux314=(-4.*((b23**2)*(1.+(2.*b44))))+(b22*(2.+((-8.*(b34**2))+((4.*b44)+(b33*(4.+(8.*b44)))))));
aux315=(16.*(b23*(b24*b34)))+((-4.*(b34**2))+((2.*b44)+((4.*(b33*b44))+aux314)));
aux316=2.*(b11*(1.+((-4.*(b24**2))+((2.*b33)+((-8.*((b24**2)*b33))+aux315)))));
aux317=(-4.*((b12**2)*(1.+((-4.*(b34**2))+((2.*b44)+(b33*(2.+(4.*b44))))))))+((16.*(b12*aux313))+aux316);
aux318=(-16.*((b13**2)*(b22*b44)))+((-8.*((b23**2)*b44))+((4.*(b33*b44))+((8.*(b22*(b33*b44)))+aux317)));
aux319=(-8.*(b22*(b34**2)))+((2.*b44)+((-8.*((b13**2)*b44))+((4.*(b22*b44))+aux318)));
aux320=(32.*(b13*(b14*(b22*b34))))+((16.*(b23*(b24*b34)))+((-4.*(b34**2))+aux319));
aux321=(-16.*((b14**2)*(b22*b33)))+((-8.*((b24**2)*b33))+((16.*(b13*(b14*b34)))+aux320));
aux322=(16.*((b13**2)*(b24**2)))+((2.*b33)+((-8.*((b14**2)*b33))+((4.*(b22*b33))+aux321)));
aux323=(16.*((b14**2)*(b23**2)))+((-32.*(b13*(b14*(b23*b24))))+((-4.*(b24**2))+aux322));
aux324=(2.*b22)+((-8.*((b13**2)*b22))+((-8.*((b14**2)*b22))+((-4.*(b23**2))+aux323)));
aux325=(s3*(1.+((-2.+aux235)/(-1.+aux248))))+(aux312/(1.+((-4.*(b13**2))+((-4.*(b14**2))+aux324))));
aux326=(((0.+1.j)*(r2*aux160))/(1.+((-4.*(v13**2))+((-4.*(v14**2))+aux172))))+((aux218/(-1.+((4.*(v13**2))+((4.*(v14**2))+aux230))))+aux325);
aux327=aux99+(aux129+((aux138/(1.+((-4.*(v13**2))+((-4.*(v14**2))+aux150))))+aux326));
aux328=aux46+(((aux53*s4)/(1.+((-4.*(b13**2))+((-4.*(b14**2))+aux65))))+aux327);
output=0.25*(aux25+aux328);
return output
def lineal4(V,B,R,S):
v11,v12,v13,v14=separate(V,0)
v21,v22,v23,v24=separate(V,1)
v31,v32,v33,v34=separate(V,2)
v41,v42,v43,v44=separate(V,3)
b11,b12,b13,b14=separate(B,0)
b21,b22,b23,b24=separate(B,1)
b31,b32,b33,b34=separate(B,2)
b41,b42,b43,b44=separate(B,3)
r1,r2,r3,r4=R[0],R[1],R[2],R[3]
s1,s2,s3,s4=S[0],S[1],S[2],S[3]
aux0=((0.+2.j)*b33)+((2.*(b24*b33))+(((0.+2.j)*(b22*(1.+(2.*b33))))+(-2.*(b23*b34))));
aux1=2.*(b14*(((0.+1.j)+(((0.+-4.j)*(b23**2))+(b24+aux0)))-(b13*(1.+(2.*b22)))));
aux2=(-2.*b33)+(((0.+8.j)*(b23*b34))+((4.*(b34**2))+((-2.*b44)+(-4.*(b33*b44)))));
aux3=-1.+((4.*(b14*b23))+((4.*(b24*((0.+-1.j)+(b13+((0.+-2.j)*b33)))))+aux2));
aux4=((0.+-8.j)*(b13*(b22*b34)))+((-4.*(b13*(b24*b34)))+(aux1+((4.*(b13*(b23*b44)))+(b12*aux3))));
aux5=(-4.*((b12**2)*b34))+(((0.+-4.j)*(b13*b34))+((2.*(b22*b34))+((4.*(b11*(b22*b34)))+aux4)));
aux6=(-4.*(b11*(b23*b24)))+(((0.+8.j)*(b13*(b23*b24)))+(b34+((2.*(b11*b34))+aux5)));
aux7=(b14*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))))+(b13*(b23+((-2.*(b24*b34))+(2.*(b23*b44)))));
aux8=(-4.*((b23**2)*(1.+(2.*b44))))+(b22*(2.+((-8.*(b34**2))+((4.*b44)+(b33*(4.+(8.*b44)))))));
aux9=(16.*(b23*(b24*b34)))+((-4.*(b34**2))+((2.*b44)+((4.*(b33*b44))+aux8)));
aux10=(16.*(b12*aux7))+(2.*(b11*(1.+((-4.*(b24**2))+((2.*b33)+((-8.*((b24**2)*b33))+aux9))))));
aux11=(-4.*((b12**2)*(1.+((-4.*(b34**2))+((2.*b44)+(b33*(2.+(4.*b44))))))))+aux10;
aux12=(-16.*((b13**2)*(b22*b44)))+((-8.*((b23**2)*b44))+((4.*(b33*b44))+((8.*(b22*(b33*b44)))+aux11)));
aux13=(-8.*(b22*(b34**2)))+((2.*b44)+((-8.*((b13**2)*b44))+((4.*(b22*b44))+aux12)));
aux14=(32.*(b13*(b14*(b22*b34))))+((16.*(b23*(b24*b34)))+((-4.*(b34**2))+aux13));
aux15=(-16.*((b14**2)*(b22*b33)))+((-8.*((b24**2)*b33))+((16.*(b13*(b14*b34)))+aux14));
aux16=(16.*((b13**2)*(b24**2)))+((2.*b33)+((-8.*((b14**2)*b33))+((4.*(b22*b33))+aux15)));
aux17=(16.*((b14**2)*(b23**2)))+((-32.*(b13*(b14*(b23*b24))))+((-4.*(b24**2))+aux16));
aux18=(2.*b22)+((-8.*((b13**2)*b22))+((-8.*((b14**2)*b22))+((-4.*(b23**2))+aux17)));
aux19=((0.+2.j)*(((2.*(b13*b23))+((-2.*(b23*b24))+aux6))*s1))/(1.+((-4.*(b13**2))+((-4.*(b14**2))+aux18)));
aux20=4.*((b13**2)*(-1.+(((0.+-4.j)*b24)+((4.*(b24**2))+(-4.*((1.+b22)*b44))))));
aux21=(-2.*(b14*((1.+b22)*b34)))+((b12*(((0.+-1.j)+(2.*b24))*b34))+(-2.*(b12*(b23*b44))));
aux22=(-4.*(b22*b44))+((8.*((b23**2)*b44))+(-2.*(b33*(1.+(4.*((1.+b22)*b44))))));
aux23=((0.+-4.j)*(b24*(1.+((2.*b33)+((0.+-4.j)*(b23*b34))))))+((-4.*b44)+aux22);
aux24=((b24**2)*(4.+(8.*b33)))+(((0.+8.j)*(b23*b34))+((8.*(b34**2))+((8.*(b22*(b34**2)))+aux23)));
aux25=(-16.*(b13*((b14*(b23*((0.+-1.j)+(2.*b24))))+aux21)))+(-2.*(b11*(-1.+aux24)));
aux26=(8.*(b33*b44))+((-16.*((b12**2)*(b33*b44)))+((8.*(b22*(b33*b44)))+(aux20+aux25)));
aux27=(4.*b44)+((-8.*((b12**2)*b44))+((4.*(b22*b44))+((-8.*((b23**2)*b44))+aux26)));
aux28=(-8.*(b34**2))+((16.*((b12**2)*(b34**2)))+((-8.*(b22*(b34**2)))+aux27));
aux29=((0.+-8.j)*(b23*b34))+((-32.*(b12*(b14*(b23*b34))))+((16.*(b23*(b24*b34)))+aux28));
aux30=((0.+8.j)*(b24*b33))+((32.*(b12*(b14*(b24*b33))))+((-8.*((b24**2)*b33))+aux29));
aux31=((0.+-16.j)*(b12*(b14*b33)))+((-16.*((b14**2)*b33))+((-16.*((b14**2)*(b22*b33)))+aux30));
aux32=((0.+4.j)*b24)+((16.*(b12*(b14*b24)))+((-4.*(b24**2))+((2.*b33)+aux31)));
aux33=(-8.*(b14**2))+((-8.*((b14**2)*b22))+((16.*((b14**2)*(b23**2)))+aux32));
aux34=(b14*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))))+(b13*(b23+((-2.*(b24*b34))+(2.*(b23*b44)))));
aux35=(-4.*((b23**2)*(1.+(2.*b44))))+(b22*(2.+((-8.*(b34**2))+((4.*b44)+(b33*(4.+(8.*b44)))))));
aux36=(16.*(b23*(b24*b34)))+((-4.*(b34**2))+((2.*b44)+((4.*(b33*b44))+aux35)));
aux37=(16.*(b12*aux34))+(2.*(b11*(1.+((-4.*(b24**2))+((2.*b33)+((-8.*((b24**2)*b33))+aux36))))));
aux38=(-4.*((b12**2)*(1.+((-4.*(b34**2))+((2.*b44)+(b33*(2.+(4.*b44))))))))+aux37;
aux39=(-16.*((b13**2)*(b22*b44)))+((-8.*((b23**2)*b44))+((4.*(b33*b44))+((8.*(b22*(b33*b44)))+aux38)));
aux40=(-8.*(b22*(b34**2)))+((2.*b44)+((-8.*((b13**2)*b44))+((4.*(b22*b44))+aux39)));
aux41=(32.*(b13*(b14*(b22*b34))))+((16.*(b23*(b24*b34)))+((-4.*(b34**2))+aux40));
aux42=(-16.*((b14**2)*(b22*b33)))+((-8.*((b24**2)*b33))+((16.*(b13*(b14*b34)))+aux41));
aux43=(16.*((b13**2)*(b24**2)))+((2.*b33)+((-8.*((b14**2)*b33))+((4.*(b22*b33))+aux42)));
aux44=(16.*((b14**2)*(b23**2)))+((-32.*(b13*(b14*(b23*b24))))+((-4.*(b24**2))+aux43));
aux45=(2.*b22)+((-8.*((b13**2)*b22))+((-8.*((b14**2)*b22))+((-4.*(b23**2))+aux44)));
aux46=((0.+1.j)*((1.+(((0.+-8.j)*(b12*b14))+aux33))*s2))/(1.+((-4.*(b13**2))+((-4.*(b14**2))+aux45)));
aux47=(4.*((b12**2)*b34))+((1.+(2.*b11))*(((2.*(b23*b24))+(-2.*(b22*b34)))-b34));
aux48=(-4.*(b12*(b14*b23)))+((2.*(b13*(b14+((2.*(b14*b22))+(-2.*(b12*b24))))))+aux47);
aux49=b12*(b13+(b24+((2.*(b24*b33))+((-2.*((b14+b23)*b34))+(2.*(b13*b44))))));
aux50=(4.*(b11*(b24*b34)))+((-2.*(b23*b44))+((-4.*(b11*(b23*b44)))+(2.*aux49)));
aux51=(-4.*(b13*(b23*b24)))+((2.*(b13*b34))+((4.*(b13*(b22*b34)))+((2.*(b24*b34))+aux50)));
aux52=b14*(1.+((-4.*(b23**2))+((4.*(b13*b24))+((2.*b33)+(b22*(2.+(4.*b33)))))));
aux53=(4.*aux48)+((0.+2.j)*((((-2.*(b11*b23))+((4.*((b14**2)*b23))+aux51))-aux52)-b23));
aux54=(b14*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))))+(b13*(b23+((-2.*(b24*b34))+(2.*(b23*b44)))));
aux55=(-4.*((b23**2)*(1.+(2.*b44))))+(b22*(2.+((-8.*(b34**2))+((4.*b44)+(b33*(4.+(8.*b44)))))));
aux56=(16.*(b23*(b24*b34)))+((-4.*(b34**2))+((2.*b44)+((4.*(b33*b44))+aux55)));
aux57=(16.*(b12*aux54))+(2.*(b11*(1.+((-4.*(b24**2))+((2.*b33)+((-8.*((b24**2)*b33))+aux56))))));
aux58=(-4.*((b12**2)*(1.+((-4.*(b34**2))+((2.*b44)+(b33*(2.+(4.*b44))))))))+aux57;
aux59=(-16.*((b13**2)*(b22*b44)))+((-8.*((b23**2)*b44))+((4.*(b33*b44))+((8.*(b22*(b33*b44)))+aux58)));
aux60=(-8.*(b22*(b34**2)))+((2.*b44)+((-8.*((b13**2)*b44))+((4.*(b22*b44))+aux59)));
aux61=(32.*(b13*(b14*(b22*b34))))+((16.*(b23*(b24*b34)))+((-4.*(b34**2))+aux60));
aux62=(-16.*((b14**2)*(b22*b33)))+((-8.*((b24**2)*b33))+((16.*(b13*(b14*b34)))+aux61));
aux63=(16.*((b13**2)*(b24**2)))+((2.*b33)+((-8.*((b14**2)*b33))+((4.*(b22*b33))+aux62)));
aux64=(16.*((b14**2)*(b23**2)))+((-32.*(b13*(b14*(b23*b24))))+((-4.*(b24**2))+aux63));
aux65=(2.*b22)+((-8.*((b13**2)*b22))+((-8.*((b14**2)*b22))+((-4.*(b23**2))+aux64)));
aux66=(8.*(v11*(v24*v34)))+((8.*(v12*(v13*v44)))+((-4.*(v23*v44))+(-8.*(v11*(v23*v44)))));
aux67=((0.+-16.j)*(v11*(v22*v34)))+((8.*(v13*(v22*v34)))+((-8.*(v12*(v23*v34)))+((4.*(v24*v34))+aux66)));
aux68=((0.+16.j)*((v12**2)*v34))+((4.*(v13*v34))+((-8.*(v12*(v14*v34)))+(((0.+-8.j)*(v22*v34))+aux67)));
aux69=(-8.*(v14*(v22*v33)))+((8.*(v12*(v24*v33)))+(((0.+-4.j)*v34)+(((0.+-8.j)*(v11*v34))+aux68)));
aux70=((0.+16.j)*(v11*(v23*v24)))+((-8.*(v13*(v23*v24)))+((-4.*(v14*v33))+aux69));
aux71=((0.+-16.j)*(v12*(v13*v24)))+((-8.*(v13*(v14*v24)))+(((0.+8.j)*(v23*v24))+aux70));
aux72=((0.+-16.j)*(v12*(v14*v23)))+((8.*((v14**2)*v23))+((8.*(v14*(v23**2)))+((4.*(v12*v24))+aux71)));
aux73=(-4.*(v14*v22))+(((0.+16.j)*(v13*(v14*v22)))+((-2.*v23)+((-4.*(v11*v23))+aux72)));
aux74=(0.+1.j)*(r3*((4.*(v12*v13))+((-2.*v14)+(((0.+8.j)*(v13*v14))+aux73))));
aux75=(v14*(v24+((2.*(v24*v33))+(-2.*(v23*v34)))))+(v13*(v23+((-2.*(v24*v34))+(2.*(v23*v44)))));
aux76=(-4.*((v23**2)*(1.+(2.*v44))))+(v22*(2.+((-8.*(v34**2))+((4.*v44)+(v33*(4.+(8.*v44)))))));
aux77=(16.*(v23*(v24*v34)))+((-4.*(v34**2))+((2.*v44)+((4.*(v33*v44))+aux76)));
aux78=-2.*(v11*(1.+((-4.*(v24**2))+((2.*v33)+((-8.*((v24**2)*v33))+aux77)))));
aux79=(4.*((v12**2)*(1.+((-4.*(v34**2))+((2.*v44)+(v33*(2.+(4.*v44))))))))+((-16.*(v12*aux75))+aux78);
aux80=(16.*((v13**2)*(v22*v44)))+((8.*((v23**2)*v44))+((-4.*(v33*v44))+((-8.*(v22*(v33*v44)))+aux79)));
aux81=(8.*(v22*(v34**2)))+((-2.*v44)+((8.*((v13**2)*v44))+((-4.*(v22*v44))+aux80)));
aux82=(-32.*(v13*(v14*(v22*v34))))+((-16.*(v23*(v24*v34)))+((4.*(v34**2))+aux81));
aux83=(16.*((v14**2)*(v22*v33)))+((8.*((v24**2)*v33))+((-16.*(v13*(v14*v34)))+aux82));
aux84=(-16.*((v13**2)*(v24**2)))+((-2.*v33)+((8.*((v14**2)*v33))+((-4.*(v22*v33))+aux83)));
aux85=(-16.*((v14**2)*(v23**2)))+((32.*(v13*(v14*(v23*v24))))+((4.*(v24**2))+aux84));
aux86=(-2.*v22)+((8.*((v13**2)*v22))+((8.*((v14**2)*v22))+((4.*(v23**2))+aux85)));
aux87=(8.*(v12*(v34**2)))+((-4.*(v12*v44))+((8.*(v13*(v23*v44)))+(-8.*(v12*(v33*v44)))));
aux88=((0.+-16.j)*(v12*(v23*v34)))+((-8.*(v14*(v23*v34)))+((-8.*(v13*(v24*v34)))+aux87));
aux89=(4.*(v22*v34))+((8.*(v11*(v22*v34)))+(((0.+16.j)*(v13*(v22*v34)))+aux88));
aux90=(2.*v34)+((4.*(v11*v34))+((-8.*((v12**2)*v34))+(((0.+8.j)*(v13*v34))+aux89)));
aux91=((0.+-16.j)*(v14*(v22*v33)))+(((0.+16.j)*(v12*(v24*v33)))+((8.*(v14*(v24*v33)))+aux90));
aux92=((0.+-16.j)*(v13*(v23*v24)))+((-4.*(v12*v33))+(((0.+-8.j)*(v14*v33))+aux91));
aux93=(8.*(v12*(v13*v24)))+((4.*(v14*v24))+((-4.*(v23*v24))+((-8.*(v11*(v23*v24)))+aux92)));
aux94=(8.*(v12*(v14*v23)))+(((0.+16.j)*(v14*(v23**2)))+(((0.+8.j)*(v12*v24))+aux93));
aux95=(-4.*(v13*v14))+(((0.+-8.j)*(v14*v22))+((-8.*(v13*(v14*v22)))+((4.*(v13*v23))+aux94)));
aux96=(v14*(v24+((2.*(v24*v33))+(-2.*(v23*v34)))))+(v13*(v23+((-2.*(v24*v34))+(2.*(v23*v44)))));
aux97=(-4.*((v23**2)*(1.+(2.*v44))))+(v22*(2.+((-8.*(v34**2))+((4.*v44)+(v33*(4.+(8.*v44)))))));
aux98=(16.*(v23*(v24*v34)))+((-4.*(v34**2))+((2.*v44)+((4.*(v33*v44))+aux97)));
aux99=-2.*(v11*(1.+((-4.*(v24**2))+((2.*v33)+((-8.*((v24**2)*v33))+aux98)))));
aux100=(4.*((v12**2)*(1.+((-4.*(v34**2))+((2.*v44)+(v33*(2.+(4.*v44))))))))+((-16.*(v12*aux96))+aux99);
aux101=(16.*((v13**2)*(v22*v44)))+((8.*((v23**2)*v44))+((-4.*(v33*v44))+((-8.*(v22*(v33*v44)))+aux100)));
aux102=(8.*(v22*(v34**2)))+((-2.*v44)+((8.*((v13**2)*v44))+((-4.*(v22*v44))+aux101)));
aux103=(-32.*(v13*(v14*(v22*v34))))+((-16.*(v23*(v24*v34)))+((4.*(v34**2))+aux102));
aux104=(16.*((v14**2)*(v22*v33)))+((8.*((v24**2)*v33))+((-16.*(v13*(v14*v34)))+aux103));
aux105=(-16.*((v13**2)*(v24**2)))+((-2.*v33)+((8.*((v14**2)*v33))+((-4.*(v22*v33))+aux104)));
aux106=(-16.*((v14**2)*(v23**2)))+((32.*(v13*(v14*(v23*v24))))+((4.*(v24**2))+aux105));
aux107=(-2.*v22)+((8.*((v13**2)*v22))+((8.*((v14**2)*v22))+((4.*(v23**2))+aux106)));
aux108=((0.+1.j)*(r1*((-2.*v12)+(((0.+-4.j)*v14)+aux95))))/(-1.+((4.*(v13**2))+((4.*(v14**2))+aux107)));
aux109=(16.*((v12**2)*(v33*v44)))+((-8.*(v22*(v33*v44)))+(-16.*(v11*(v22*(v33*v44)))));
aux110=(16.*(v11*((v23**2)*v44)))+((-8.*(v33*v44))+((-16.*(v11*(v33*v44)))+aux109));
aux111=(16.*((v13**2)*(v22*v44)))+((-32.*(v12*(v13*(v23*v44))))+((8.*((v23**2)*v44))+aux110));
aux112=(8.*((v12**2)*v44))+((16.*((v13**2)*v44))+((-4.*(v22*v44))+((-8.*(v11*(v22*v44)))+aux111)));
aux113=(8.*(v22*(v34**2)))+((16.*(v11*(v22*(v34**2))))+((-4.*v44)+((-8.*(v11*v44))+aux112)));
aux114=(8.*(v34**2))+((16.*(v11*(v34**2)))+((-16.*((v12**2)*(v34**2)))+aux113));
aux115=(32.*(v12*(v13*(v24*v34))))+((-16.*(v23*(v24*v34)))+((-32.*(v11*(v23*(v24*v34))))+aux114));
aux116=((0.+-8.j)*(v23*v34))+(((0.+-16.j)*(v11*(v23*v34)))+((32.*(v12*(v14*(v23*v34))))+aux115));
aux117=((0.+16.j)*(v12*(v13*v34)))+((-32.*(v13*(v14*v34)))+((-32.*(v13*(v14*(v22*v34))))+aux116));
aux118=(-32.*(v12*(v14*(v24*v33))))+((8.*((v24**2)*v33))+((16.*(v11*((v24**2)*v33)))+aux117));
aux119=(16.*((v14**2)*(v22*v33)))+(((0.+8.j)*(v24*v33))+(((0.+16.j)*(v11*(v24*v33)))+aux118));
aux120=(-4.*(v11*v33))+(((0.+-16.j)*(v12*(v14*v33)))+((16.*((v14**2)*v33))+aux119));
aux121=(4.*(v24**2))+((8.*(v11*(v24**2)))+((-16.*((v13**2)*(v24**2)))+((-2.*v33)+aux120)));
aux122=((0.+-16.j)*((v13**2)*v24))+((-16.*(v12*(v14*v24)))+((32.*(v13*(v14*(v23*v24))))+aux121));
aux123=(-16.*((v14**2)*(v23**2)))+(((0.+4.j)*v24)+(((0.+8.j)*(v11*v24))+aux122));
aux124=(8.*(v14**2))+((8.*((v14**2)*v22))+(((0.+16.j)*(v13*(v14*v23)))+aux123));
aux125=(0.+1.j)*(r2*(-1.+((-2.*v11)+((4.*(v13**2))+(((0.+-8.j)*(v12*v14))+aux124)))));
aux126=(v14*(v24+((2.*(v24*v33))+(-2.*(v23*v34)))))+(v13*(v23+((-2.*(v24*v34))+(2.*(v23*v44)))));
aux127=(-4.*((v23**2)*(1.+(2.*v44))))+(v22*(2.+((-8.*(v34**2))+((4.*v44)+(v33*(4.+(8.*v44)))))));
aux128=(16.*(v23*(v24*v34)))+((-4.*(v34**2))+((2.*v44)+((4.*(v33*v44))+aux127)));
aux129=2.*(v11*(1.+((-4.*(v24**2))+((2.*v33)+((-8.*((v24**2)*v33))+aux128)))));
aux130=(-4.*((v12**2)*(1.+((-4.*(v34**2))+((2.*v44)+(v33*(2.+(4.*v44))))))))+((16.*(v12*aux126))+aux129);
aux131=(-16.*((v13**2)*(v22*v44)))+((-8.*((v23**2)*v44))+((4.*(v33*v44))+((8.*(v22*(v33*v44)))+aux130)));
aux132=(-8.*(v22*(v34**2)))+((2.*v44)+((-8.*((v13**2)*v44))+((4.*(v22*v44))+aux131)));
aux133=(32.*(v13*(v14*(v22*v34))))+((16.*(v23*(v24*v34)))+((-4.*(v34**2))+aux132));
aux134=(-16.*((v14**2)*(v22*v33)))+((-8.*((v24**2)*v33))+((16.*(v13*(v14*v34)))+aux133));
aux135=(16.*((v13**2)*(v24**2)))+((2.*v33)+((-8.*((v14**2)*v33))+((4.*(v22*v33))+aux134)));
aux136=(16.*((v14**2)*(v23**2)))+((-32.*(v13*(v14*(v23*v24))))+((-4.*(v24**2))+aux135));
aux137=(2.*v22)+((-8.*((v13**2)*v22))+((-8.*((v14**2)*v22))+((-4.*(v23**2))+aux136)));
aux138=((0.+16.j)*((v12**2)*(v33*v44)))+(((0.+-8.j)*(v22*(v33*v44)))+((0.+-16.j)*(v11*(v22*(v33*v44)))));
aux139=((0.+16.j)*(v11*((v23**2)*v44)))+(((0.+-4.j)*(v33*v44))+(((0.+-8.j)*(v11*(v33*v44)))+aux138));
aux140=((0.+16.j)*((v13**2)*(v22*v44)))+(((0.+-32.j)*(v12*(v13*(v23*v44))))+(((0.+8.j)*((v23**2)*v44))+aux139));
aux141=((0.+8.j)*((v13**2)*v44))+(((0.+-4.j)*(v22*v44))+(((0.+-8.j)*(v11*(v22*v44)))+aux140));
aux142=((0.+-2.j)*v44)+(((0.+-4.j)*(v11*v44))+(((0.+8.j)*((v12**2)*v44))+aux141));
aux143=((0.+-16.j)*((v12**2)*(v34**2)))+(((0.+8.j)*(v22*(v34**2)))+(((0.+16.j)*(v11*(v22*(v34**2))))+aux142));
aux144=((0.+-32.j)*(v11*(v23*(v24*v34))))+(((0.+4.j)*(v34**2))+(((0.+8.j)*(v11*(v34**2)))+aux143));
aux145=((0.+32.j)*(v12*(v13*(v24*v34))))+(((0.+-16.j)*(v23*(v24*v34)))+aux144);
aux146=(-8.*(v23*v34))+((-16.*(v11*(v23*v34)))+(((0.+32.j)*(v12*(v14*(v23*v34))))+aux145));
aux147=((0.+-16.j)*(v13*(v14*v34)))+(((0.+-32.j)*(v13*(v14*(v22*v34))))+aux146);
aux148=((0.+8.j)*((v24**2)*v33))+(((0.+16.j)*(v11*((v24**2)*v33)))+((16.*(v12*(v13*v34)))+aux147));
aux149=(8.*(v24*v33))+((16.*(v11*(v24*v33)))+(((0.+-32.j)*(v12*(v14*(v24*v33))))+aux148));
aux150=((0.+-12.j)*(v22*v33))+(((0.+-24.j)*(v11*(v22*v33)))+(((0.+16.j)*((v14**2)*(v22*v33)))+aux149));
aux151=((0.+24.j)*((v12**2)*v33))+((-16.*(v12*(v14*v33)))+(((0.+8.j)*((v14**2)*v33))+aux150));
aux152=((0.+-16.j)*((v13**2)*(v24**2)))+(((0.+-6.j)*v33)+(((0.+-12.j)*(v11*v33))+aux151));
aux153=((0.+32.j)*(v13*(v14*(v23*v24))))+(((0.+4.j)*(v24**2))+(((0.+8.j)*(v11*(v24**2)))+aux152));
aux154=(8.*(v11*v24))+((-16.*((v13**2)*v24))+(((0.+-16.j)*(v12*(v14*v24)))+aux153));
aux155=((0.+24.j)*(v11*(v23**2)))+(((0.+-16.j)*((v14**2)*(v23**2)))+((4.*v24)+aux154));
aux156=((0.+-48.j)*(v12*(v13*v23)))+((16.*(v13*(v14*v23)))+(((0.+12.j)*(v23**2))+aux155));
aux157=((0.+-12.j)*(v11*v22))+(((0.+24.j)*((v13**2)*v22))+(((0.+8.j)*((v14**2)*v22))+aux156));
aux158=((0.+12.j)*(v13**2))+((-8.*(v12*v14))+(((0.+4.j)*(v14**2))+(((0.+-6.j)*v22)+aux157)));
aux159=(0.+1.j)*(r4*((0.+-3.j)+(((0.+-6.j)*v11)+(((0.+12.j)*(v12**2))+aux158))));
aux160=(v14*(v24+((2.*(v24*v33))+(-2.*(v23*v34)))))+(v13*(v23+((-2.*(v24*v34))+(2.*(v23*v44)))));
aux161=(-4.*((v23**2)*(1.+(2.*v44))))+(v22*(2.+((-8.*(v34**2))+((4.*v44)+(v33*(4.+(8.*v44)))))));
aux162=(16.*(v23*(v24*v34)))+((-4.*(v34**2))+((2.*v44)+((4.*(v33*v44))+aux161)));
aux163=2.*(v11*(1.+((-4.*(v24**2))+((2.*v33)+((-8.*((v24**2)*v33))+aux162)))));
aux164=(-4.*((v12**2)*(1.+((-4.*(v34**2))+((2.*v44)+(v33*(2.+(4.*v44))))))))+((16.*(v12*aux160))+aux163);
aux165=(-16.*((v13**2)*(v22*v44)))+((-8.*((v23**2)*v44))+((4.*(v33*v44))+((8.*(v22*(v33*v44)))+aux164)));
aux166=(-8.*(v22*(v34**2)))+((2.*v44)+((-8.*((v13**2)*v44))+((4.*(v22*v44))+aux165)));
aux167=(32.*(v13*(v14*(v22*v34))))+((16.*(v23*(v24*v34)))+((-4.*(v34**2))+aux166));
aux168=(-16.*((v14**2)*(v22*v33)))+((-8.*((v24**2)*v33))+((16.*(v13*(v14*v34)))+aux167));
aux169=(16.*((v13**2)*(v24**2)))+((2.*v33)+((-8.*((v14**2)*v33))+((4.*(v22*v33))+aux168)));
aux170=(16.*((v14**2)*(v23**2)))+((-32.*(v13*(v14*(v23*v24))))+((-4.*(v24**2))+aux169));
aux171=(2.*v22)+((-8.*((v13**2)*v22))+((-8.*((v14**2)*v22))+((-4.*(v23**2))+aux170)));
aux172=4.*((v13**2)*(-1.+(((0.+4.j)*v24)+((4.*(v24**2))+(-4.*((1.+v22)*v44))))));
aux173=(-2.*(v14*((1.+v22)*v34)))+((v12*(((0.+1.j)+(2.*v24))*v34))+(-2.*(v12*(v23*v44))));
aux174=(-4.*(v22*v44))+((8.*((v23**2)*v44))+(-2.*(v33*(1.+(4.*((1.+v22)*v44))))));
aux175=((0.+4.j)*(v24*(1.+((2.*v33)+((0.+4.j)*(v23*v34))))))+((-4.*v44)+aux174);
aux176=((v24**2)*(4.+(8.*v33)))+(((0.+-8.j)*(v23*v34))+((8.*(v34**2))+((8.*(v22*(v34**2)))+aux175)));
aux177=(-16.*(v13*((v14*(v23*((0.+1.j)+(2.*v24))))+aux173)))+(-2.*(v11*(-1.+aux176)));
aux178=(8.*(v33*v44))+((-16.*((v12**2)*(v33*v44)))+((8.*(v22*(v33*v44)))+(aux172+aux177)));
aux179=(4.*v44)+((-8.*((v12**2)*v44))+((4.*(v22*v44))+((-8.*((v23**2)*v44))+aux178)));
aux180=(-8.*(v34**2))+((16.*((v12**2)*(v34**2)))+((-8.*(v22*(v34**2)))+aux179));
aux181=((0.+8.j)*(v23*v34))+((-32.*(v12*(v14*(v23*v34))))+((16.*(v23*(v24*v34)))+aux180));
aux182=((0.+-8.j)*(v24*v33))+((32.*(v12*(v14*(v24*v33))))+((-8.*((v24**2)*v33))+aux181));
aux183=((0.+16.j)*(v12*(v14*v33)))+((-16.*((v14**2)*v33))+((-16.*((v14**2)*(v22*v33)))+aux182));
aux184=((0.+-4.j)*v24)+((16.*(v12*(v14*v24)))+((-4.*(v24**2))+((2.*v33)+aux183)));
aux185=(-8.*(v14**2))+((-8.*((v14**2)*v22))+((16.*((v14**2)*(v23**2)))+aux184));
aux186=(v22*(2.+((8.*(v34**2))+((v33*(4.+(-8.*v44)))+(-4.*v44)))))+((-2.*v44)+((-4.*(v33*v44))+((v23**2)*(-4.+(8.*v44)))));
aux187=(8.*((v24**2)*v33))+((-8.*(v23*(((0.+1.j)+(2.*v24))*v34)))+((4.*(v34**2))+aux186));
aux188=((0.+4.j)*v24)+((4.*(v24**2))+((2.*v33)+(((0.+8.j)*(v24*v33))+aux187)));
aux189=(v14*((0.+1.j)+(((0.+2.j)*v33)+((v24*(2.+(4.*v33)))+(-4.*(v23*v34))))))+(-2.*(v13*(v23+((((0.+1.j)+(2.*v24))*v34)+(-2.*(v23*v44))))));
aux190=(4.*(v33*v44))+((8.*(v22*(v33*v44)))+((-2.*(v11*(1.+aux188)))+(8.*(v12*aux189))));
aux191=(4.*(v22*v44))+((-16.*((v13**2)*(v22*v44)))+((-8.*((v23**2)*v44))+aux190));
aux192=(4.*((v12**2)*(1.+((4.*(v34**2))+((v33*(2.+(-4.*v44)))+(-2.*v44))))))+((2.*v44)+((-8.*((v13**2)*v44))+aux191));
aux193=((0.+8.j)*(v23*v34))+((16.*(v23*(v24*v34)))+((-4.*(v34**2))+((-8.*(v22*(v34**2)))+aux192)));
aux194=(-8.*((v24**2)*v33))+((16.*(v13*(v14*v34)))+((32.*(v13*(v14*(v22*v34))))+aux193));
aux195=(-4.*(v22*v33))+((-16.*((v14**2)*(v22*v33)))+(((0.+-8.j)*(v24*v33))+aux194));
aux196=(-4.*(v24**2))+((16.*((v13**2)*(v24**2)))+((-2.*v33)+((-8.*((v14**2)*v33))+aux195)));
aux197=((0.+-4.j)*v24)+(((0.+16.j)*((v13**2)*v24))+((-32.*(v13*(v14*(v23*v24))))+aux196));
aux198=((0.+-16.j)*(v13*(v14*v23)))+((4.*(v23**2))+((16.*((v14**2)*(v23**2)))+aux197));
aux199=(-4.*(v14**2))+((-2.*v22)+((8.*((v13**2)*v22))+((-8.*((v14**2)*v22))+aux198)));
aux200=(-4.*(v23**2))+((4.*(v13*((0.+-1.j)+(((0.+-2.j)*v22)+v24))))+((2.*v33)+(4.*(v22*v33))));
aux201=(-4.*(v24*v33))+((4.*(v14*v34))+((4.*(v23*v34))+(v13*(-2.+(((0.+8.j)*v24)+(-4.*v44))))));
aux202=(v12*(((0.+8.j)*(v14*v23))+((-2.*v24)+aux201)))+((2.*(v23*v44))+(4.*(v11*(v23*v44))));
aux203=((0.+8.j)*(v11*(v22*v34)))+((-4.*(v13*(v22*v34)))+((-2.*(v24*v34))+((-4.*(v11*(v24*v34)))+aux202)));
aux204=((0.+-8.j)*((v12**2)*v34))+((-2.*(v13*v34))+(((0.+4.j)*(v22*v34))+aux203));
aux205=(v14*(1.+((2.*v22)+aux200)))+(((0.+2.j)*v34)+(((0.+4.j)*(v11*v34))+aux204));
aux206=((0.+-4.j)*(v23*v24))+(((0.+-8.j)*(v11*(v23*v24)))+((4.*(v13*(v23*v24)))+aux205));
aux207=((0.+2.j)*v33)+((-2.*(v24*v33))+(((0.+2.j)*(v22*(1.+(2.*v33))))+(2.*(v23*v34))));
aux208=v14*(((0.+1.j)+(v13+((2.*(v13*v22))+(((0.+-4.j)*(v23**2))+aux207))))-v24);
aux209=(2.*v33)+(((0.+8.j)*(v23*v34))+((-4.*(v34**2))+((2.*v44)+(4.*(v33*v44)))));
aux210=1.+((-4.*(v14*v23))+((-4.*(v24*((0.+1.j)+(v13+((0.+2.j)*v33)))))+aux209));
aux211=(4.*(v13*(v24*v34)))+((2.*aux208)+((-4.*(v13*(v23*v44)))+(v12*aux210)));
aux212=(-2.*(v22*v34))+((-4.*(v11*(v22*v34)))+(((0.+-8.j)*(v13*(v22*v34)))+aux211));
aux213=((0.+8.j)*(v13*(v23*v24)))+((-2.*(v11*v34))+((4.*((v12**2)*v34))+(((0.+-4.j)*(v13*v34))+aux212)));
aux214=r1*(((-2.*(v13*v23))+((2.*(v23*v24))+((4.*(v11*(v23*v24)))+aux213)))-v34);
aux215=(0.+-2.j)*((r3*(v23+((2.*(v11*v23))+((-4.*((v14**2)*v23))+aux206))))+aux214);
aux216=((0.+1.j)*(r2*(1.+(((0.+8.j)*(v12*v14))+aux185))))+((r4*(-1.+((4.*(v13**2))+aux199)))+aux215);
aux217=(v14*(v24+((2.*(v24*v33))+(-2.*(v23*v34)))))+(v13*(v23+((-2.*(v24*v34))+(2.*(v23*v44)))));
aux218=(-4.*((v23**2)*(1.+(2.*v44))))+(v22*(2.+((-8.*(v34**2))+((4.*v44)+(v33*(4.+(8.*v44)))))));
aux219=(16.*(v23*(v24*v34)))+((-4.*(v34**2))+((2.*v44)+((4.*(v33*v44))+aux218)));
aux220=-2.*(v11*(1.+((-4.*(v24**2))+((2.*v33)+((-8.*((v24**2)*v33))+aux219)))));
aux221=(4.*((v12**2)*(1.+((-4.*(v34**2))+((2.*v44)+(v33*(2.+(4.*v44))))))))+((-16.*(v12*aux217))+aux220);
aux222=(16.*((v13**2)*(v22*v44)))+((8.*((v23**2)*v44))+((-4.*(v33*v44))+((-8.*(v22*(v33*v44)))+aux221)));
aux223=(8.*(v22*(v34**2)))+((-2.*v44)+((8.*((v13**2)*v44))+((-4.*(v22*v44))+aux222)));
aux224=(-32.*(v13*(v14*(v22*v34))))+((-16.*(v23*(v24*v34)))+((4.*(v34**2))+aux223));
aux225=(16.*((v14**2)*(v22*v33)))+((8.*((v24**2)*v33))+((-16.*(v13*(v14*v34)))+aux224));
aux226=(-16.*((v13**2)*(v24**2)))+((-2.*v33)+((8.*((v14**2)*v33))+((-4.*(v22*v33))+aux225)));
aux227=(-16.*((v14**2)*(v23**2)))+((32.*(v13*(v14*(v23*v24))))+((4.*(v24**2))+aux226));
aux228=(-2.*v22)+((8.*((v13**2)*v22))+((8.*((v14**2)*v22))+((4.*(v23**2))+aux227)));
aux229=(0.+-4.j)*(b12*(b14+(((0.+4.j)*(b13*b23))+((2.*(b14*b33))+(-2.*(b13*b34))))));
aux230=(2.*((1.+((0.+2.j)*b24))*(1.+(2.*b33))))+((b22*(4.+(8.*b33)))+((0.+-8.j)*(b23*b34)));
aux231=((0.+4.j)*(b24*b33))+(((0.+-4.j)*(b23*b34))+(aux229+(b11*((-8.*(b23**2))+aux230))));
aux232=np.conjugate((((0.+8.j)*(b13*(b14*b23)))+(((0.+-8.j)*((b13**2)*b24))+aux231)));
aux233=((0.+-2.j)*b24)+((2.*b33)+((4.*(b22*b33))+((-4.*((b12**2)*(1.+(2.*b33))))+aux232)));
aux234=(8.*(b13**2))+(-2.*(1.+((2.*b22)+((-8.*((b13**2)*b22))+((-4.*(b23**2))+aux233)))));
aux235=-2.*((b12**2)*(1.+((2.*b33)+((-4.*(b34**2))+((2.*b44)+(4.*(b33*b44)))))));
aux236=(b14*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))))+(b13*(b23+((-2.*(b24*b34))+(2.*(b23*b44)))));
aux237=(-4.*((b23**2)*(1.+(2.*b44))))+(b22*(2.+((-8.*(b34**2))+((4.*b44)+(b33*(4.+(8.*b44)))))));
aux238=(16.*(b23*(b24*b34)))+((-4.*(b34**2))+((2.*b44)+((4.*(b33*b44))+aux237)));
aux239=(8.*(b12*aux236))+(b11*(1.+((-4.*(b24**2))+((2.*b33)+((-8.*((b24**2)*b33))+aux238)))));
aux240=(-4.*((b23**2)*b44))+((2.*(b33*b44))+((4.*(b22*(b33*b44)))+(aux235+aux239)));
aux241=(-4.*((b13**2)*b44))+((2.*(b22*b44))+((-8.*((b13**2)*(b22*b44)))+aux240));
aux242=(16.*(b13*(b14*(b22*b34))))+((8.*(b23*(b24*b34)))+((-4.*(b22*(b34**2)))+aux241));
aux243=(-8.*((b14**2)*(b22*b33)))+((-4.*((b24**2)*b33))+((8.*(b13*(b14*b34)))+aux242));
aux244=(8.*((b13**2)*(b24**2)))+((-4.*((b14**2)*b33))+((2.*(b22*b33))+aux243));
aux245=(-4.*((b14**2)*b22))+((8.*((b14**2)*(b23**2)))+((-16.*(b13*(b14*(b23*b24))))+aux244));
aux246=(-2.*b33)+((4.*(b34**2))+((-2.*b44)+(-2.*((-4.*((b13**2)*b22))+aux245))));
aux247=(4.*(b13**2))+((4.*(b14**2))+((-2.*b22)+((4.*(b23**2))+((4.*(b24**2))+aux246))));
aux248=(b13*((-2.*(b23*b24))+(b34+(2.*(b22*b34)))))+(b12*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))));
aux249=-2.*(b13*((b14+((2.*(b14*b22))+((2.*(b24*b34))+(-2.*(b23*b44)))))-b23));
aux250=(4.*(b14*b23))+((4.*(b13*b24))+((-2.*b33)+((4.*(b34**2))+((-2.*b44)+(-4.*(b33*b44))))));
aux251=(4.*(b11*(b22*b34)))+((-4.*(b14*(b23*b34)))+(aux249+(b12*(-1.+aux250))));
aux252=(4.*(b14*(b24*b33)))+(b34+((2.*(b11*b34))+((-4.*((b12**2)*b34))+((2.*(b22*b34))+aux251))));
aux253=(0.+2.j)*(((2.*(b14*b24))+((-2.*(b23*b24))+((-4.*(b11*(b23*b24)))+aux252)))*s1);
aux254=(-4.*(b13*(b14*b23)))+((4.*((b13**2)*b24))+(2.*(b12*(b14+((2.*(b14*b33))+(-2.*(b13*b34)))))));
aux255=4.*((aux254-((1.+(2.*b11))*(b24+((2.*(b24*b33))+(-2.*(b23*b34))))))*s2);
aux256=(2.*(b11*b44))+((-4.*((b13**2)*b44))+((2.*(b33*b44))+(4.*(b11*(b33*b44)))));
aux257=(8.*(b13*(b14*b34)))+((-2.*(b34**2))+((-4.*(b11*(b34**2)))+(b44+aux256)));
aux258=(-4.*(b11*(b22*b33)))+((-2.*((b14**2)*(1.+(2.*b33))))+(((b12**2)*(2.+(4.*b33)))+aux257));
aux259=(-8.*(b12*(b13*b23)))+((2.*(b23**2))+((4.*(b11*(b23**2)))+((-2.*(b22*b33))+aux258)));
aux260=(b14*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))))+(b13*(b23+((-2.*(b24*b34))+(2.*(b23*b44)))));
aux261=(-4.*((b23**2)*(1.+(2.*b44))))+(b22*(2.+((-8.*(b34**2))+((4.*b44)+(b33*(4.+(8.*b44)))))));
aux262=(16.*(b23*(b24*b34)))+((-4.*(b34**2))+((2.*b44)+((4.*(b33*b44))+aux261)));
aux263=2.*(b11*(1.+((-4.*(b24**2))+((2.*b33)+((-8.*((b24**2)*b33))+aux262)))));
aux264=(-4.*((b12**2)*(1.+((-4.*(b34**2))+((2.*b44)+(b33*(2.+(4.*b44))))))))+((16.*(b12*aux260))+aux263);
aux265=(-16.*((b13**2)*(b22*b44)))+((-8.*((b23**2)*b44))+((4.*(b33*b44))+((8.*(b22*(b33*b44)))+aux264)));
aux266=(-8.*(b22*(b34**2)))+((2.*b44)+((-8.*((b13**2)*b44))+((4.*(b22*b44))+aux265)));
aux267=(32.*(b13*(b14*(b22*b34))))+((16.*(b23*(b24*b34)))+((-4.*(b34**2))+aux266));
aux268=(-16.*((b14**2)*(b22*b33)))+((-8.*((b24**2)*b33))+((16.*(b13*(b14*b34)))+aux267));
aux269=(16.*((b13**2)*(b24**2)))+((2.*b33)+((-8.*((b14**2)*b33))+((4.*(b22*b33))+aux268)));
aux270=(16.*((b14**2)*(b23**2)))+((-32.*(b13*(b14*(b23*b24))))+((-4.*(b24**2))+aux269));
aux271=(2.*b22)+((-8.*((b13**2)*b22))+((-8.*((b14**2)*b22))+((-4.*(b23**2))+aux270)));
aux272=(4.*((b12**2)*b34))+((1.+(2.*b11))*(((2.*(b23*b24))+(-2.*(b22*b34)))-b34));
aux273=(-4.*(b12*(b14*b23)))+((2.*(b13*(b14+((2.*(b14*b22))+(-2.*(b12*b24))))))+aux272);
aux274=b12*(b13+(b24+((2.*(b24*b33))+((-2.*((b14+b23)*b34))+(2.*(b13*b44))))));
aux275=(4.*(b11*(b24*b34)))+((-2.*(b23*b44))+((-4.*(b11*(b23*b44)))+(2.*aux274)));
aux276=(-4.*(b13*(b23*b24)))+((2.*(b13*b34))+((4.*(b13*(b22*b34)))+((2.*(b24*b34))+aux275)));
aux277=b14*(1.+((-4.*(b23**2))+((4.*(b13*b24))+((2.*b33)+(b22*(2.+(4.*b33)))))));
aux278=(0.+2.j)*(((((-2.*(b11*b23))+((4.*((b14**2)*b23))+aux276))-aux277)-b23)*s3);
aux279=(b14*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))))+(b13*(b23+((-2.*(b24*b34))+(2.*(b23*b44)))));
aux280=(-4.*((b23**2)*(1.+(2.*b44))))+(b22*(2.+((-8.*(b34**2))+((4.*b44)+(b33*(4.+(8.*b44)))))));
aux281=(16.*(b23*(b24*b34)))+((-4.*(b34**2))+((2.*b44)+((4.*(b33*b44))+aux280)));
aux282=2.*(b11*(1.+((-4.*(b24**2))+((2.*b33)+((-8.*((b24**2)*b33))+aux281)))));
aux283=(-4.*((b12**2)*(1.+((-4.*(b34**2))+((2.*b44)+(b33*(2.+(4.*b44))))))))+((16.*(b12*aux279))+aux282);
aux284=(-16.*((b13**2)*(b22*b44)))+((-8.*((b23**2)*b44))+((4.*(b33*b44))+((8.*(b22*(b33*b44)))+aux283)));
aux285=(-8.*(b22*(b34**2)))+((2.*b44)+((-8.*((b13**2)*b44))+((4.*(b22*b44))+aux284)));
aux286=(32.*(b13*(b14*(b22*b34))))+((16.*(b23*(b24*b34)))+((-4.*(b34**2))+aux285));
aux287=(-16.*((b14**2)*(b22*b33)))+((-8.*((b24**2)*b33))+((16.*(b13*(b14*b34)))+aux286));
aux288=(16.*((b13**2)*(b24**2)))+((2.*b33)+((-8.*((b14**2)*b33))+((4.*(b22*b33))+aux287)));
aux289=(16.*((b14**2)*(b23**2)))+((-32.*(b13*(b14*(b23*b24))))+((-4.*(b24**2))+aux288));
aux290=(2.*b22)+((-8.*((b13**2)*b22))+((-8.*((b14**2)*b22))+((-4.*(b23**2))+aux289)));
aux291=(0.+-4.j)*(b12*(b14+(((0.+4.j)*(b13*b23))+((2.*(b14*b33))+(-2.*(b13*b34))))));
aux292=(2.*((1.+((0.+2.j)*b24))*(1.+(2.*b33))))+((b22*(4.+(8.*b33)))+((0.+-8.j)*(b23*b34)));
aux293=((0.+4.j)*(b24*b33))+(((0.+-4.j)*(b23*b34))+(aux291+(b11*((-8.*(b23**2))+aux292))));
aux294=np.conjugate((((0.+8.j)*(b13*(b14*b23)))+(((0.+-8.j)*((b13**2)*b24))+aux293)));
aux295=((0.+-2.j)*b24)+((2.*b33)+((4.*(b22*b33))+((-4.*((b12**2)*(1.+(2.*b33))))+aux294)));
aux296=(8.*(b13**2))+(-2.*(1.+((2.*b22)+((-8.*((b13**2)*b22))+((-4.*(b23**2))+aux295)))));
aux297=-2.*((b12**2)*(1.+((2.*b33)+((-4.*(b34**2))+((2.*b44)+(4.*(b33*b44)))))));
aux298=(b14*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))))+(b13*(b23+((-2.*(b24*b34))+(2.*(b23*b44)))));
aux299=(-4.*((b23**2)*(1.+(2.*b44))))+(b22*(2.+((-8.*(b34**2))+((4.*b44)+(b33*(4.+(8.*b44)))))));
aux300=(16.*(b23*(b24*b34)))+((-4.*(b34**2))+((2.*b44)+((4.*(b33*b44))+aux299)));
aux301=(8.*(b12*aux298))+(b11*(1.+((-4.*(b24**2))+((2.*b33)+((-8.*((b24**2)*b33))+aux300)))));
aux302=(-4.*((b23**2)*b44))+((2.*(b33*b44))+((4.*(b22*(b33*b44)))+(aux297+aux301)));
aux303=(-4.*((b13**2)*b44))+((2.*(b22*b44))+((-8.*((b13**2)*(b22*b44)))+aux302));
aux304=(16.*(b13*(b14*(b22*b34))))+((8.*(b23*(b24*b34)))+((-4.*(b22*(b34**2)))+aux303));
aux305=(-8.*((b14**2)*(b22*b33)))+((-4.*((b24**2)*b33))+((8.*(b13*(b14*b34)))+aux304));
aux306=(8.*((b13**2)*(b24**2)))+((-4.*((b14**2)*b33))+((2.*(b22*b33))+aux305));
aux307=(-4.*((b14**2)*b22))+((8.*((b14**2)*(b23**2)))+((-16.*(b13*(b14*(b23*b24))))+aux306));
aux308=(-2.*b33)+((4.*(b34**2))+((-2.*b44)+(-2.*((-4.*((b13**2)*b22))+aux307))));
aux309=(4.*(b13**2))+((4.*(b14**2))+((-2.*b22)+((4.*(b23**2))+((4.*(b24**2))+aux308))));
aux310=(1.+((-4.*(b13**2))+((-4.*(b14**2))+aux290)))*(s4*(-1.+(aux296/(-1.+aux309))));
aux311=((0.+1.j)*((1.+((-4.*(b13**2))+((-4.*(b14**2))+aux271)))*s2))+((4.*(aux273*s3))+(aux278+aux310));
aux312=((0.+2.j)*((((-2.*(b11*b22))+((4.*((b13**2)*b22))+aux259))-b22)*s2))+aux311;
aux313=(-4.*(b14*((1.+((-4.*(b23**2))+((2.*b33)+(b22*(2.+(4.*b33))))))*s1)))+((8.*(aux248*s1))+(aux253+(aux255+aux312)));
aux314=(b14*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))))+(b13*(b23+((-2.*(b24*b34))+(2.*(b23*b44)))));
aux315=(-4.*((b23**2)*(1.+(2.*b44))))+(b22*(2.+((-8.*(b34**2))+((4.*b44)+(b33*(4.+(8.*b44)))))));
aux316=(16.*(b23*(b24*b34)))+((-4.*(b34**2))+((2.*b44)+((4.*(b33*b44))+aux315)));
aux317=2.*(b11*(1.+((-4.*(b24**2))+((2.*b33)+((-8.*((b24**2)*b33))+aux316)))));
aux318=(-4.*((b12**2)*(1.+((-4.*(b34**2))+((2.*b44)+(b33*(2.+(4.*b44))))))))+((16.*(b12*aux314))+aux317);
aux319=(-16.*((b13**2)*(b22*b44)))+((-8.*((b23**2)*b44))+((4.*(b33*b44))+((8.*(b22*(b33*b44)))+aux318)));
aux320=(-8.*(b22*(b34**2)))+((2.*b44)+((-8.*((b13**2)*b44))+((4.*(b22*b44))+aux319)));
aux321=(32.*(b13*(b14*(b22*b34))))+((16.*(b23*(b24*b34)))+((-4.*(b34**2))+aux320));
aux322=(-16.*((b14**2)*(b22*b33)))+((-8.*((b24**2)*b33))+((16.*(b13*(b14*b34)))+aux321));
aux323=(16.*((b13**2)*(b24**2)))+((2.*b33)+((-8.*((b14**2)*b33))+((4.*(b22*b33))+aux322)));
aux324=(16.*((b14**2)*(b23**2)))+((-32.*(b13*(b14*(b23*b24))))+((-4.*(b24**2))+aux323));
aux325=(2.*b22)+((-8.*((b13**2)*b22))+((-8.*((b14**2)*b22))+((-4.*(b23**2))+aux324)));
aux326=(s4*(1.+(aux234/(-1.+aux247))))+(aux313/(1.+((-4.*(b13**2))+((-4.*(b14**2))+aux325))));
aux327=(aux159/(1.+((-4.*(v13**2))+((-4.*(v14**2))+aux171))))+((aux216/(-1.+((4.*(v13**2))+((4.*(v14**2))+aux228))))+aux326);
aux328=(aux74/(-1.+((4.*(v13**2))+((4.*(v14**2))+aux86))))+(aux108+((aux125/(1.+((-4.*(v13**2))+((-4.*(v14**2))+aux137))))+aux327));
aux329=aux46+(((aux53*s3)/(1.+((-4.*(b13**2))+((-4.*(b14**2))+aux65))))+aux328);
output=0.25*(aux19+aux329);
return output
def independiente(V,B,R,S):
v11,v12,v13,v14=separate(V,0)
v21,v22,v23,v24=separate(V,1)
v31,v32,v33,v34=separate(V,2)
v41,v42,v43,v44=separate(V,3)
b11,b12,b13,b14=separate(B,0)
b21,b22,b23,b24=separate(B,1)
b31,b32,b33,b34=separate(B,2)
b41,b42,b43,b44=separate(B,3)
r1,r2,r3,r4=R[0],R[1],R[2],R[3]
s1,s2,s3,s4=S[0],S[1],S[2],S[3]
aux0=-4.*(v12*(v23+(((0.+4.j)*(v14*v24))+((-2.*(v24*v34))+(2.*(v23*v44))))));
aux1=aux0+((0.+-2.j)*(v11*(1.+((-4.*(v24**2))+((2.*v44)+(v22*(2.+(4.*v44))))))));
aux2=((0.+-4.j)*(v22*v44))+((8.*(v13*(v22*v44)))+(((0.+4.j)*((v12**2)*(1.+(2.*v44))))+aux1));
aux3=(-4.*(v14*v34))+((-8.*(v14*(v22*v34)))+(((0.+-2.j)*v44)+((4.*(v13*v44))+aux2)));
aux4=((0.+8.j)*((v14**2)*v22))+((8.*(v14*(v23*v24)))+(((0.+4.j)*(v24**2))+((-8.*(v13*(v24**2)))+aux3)));
aux5=(0.+-1.j)+((2.*v13)+(((0.+4.j)*(v14**2))+(((0.+-2.j)*v22)+((4.*(v13*v22))+aux4))));
aux6=(0.+-4.j)*(v12*(v23+(((0.+2.j)*(v14*v24))+((-2.*(v24*v34))+(2.*(v23*v44))))));
aux7=(-2.*((v12**2)*(1.+(2.*v44))))+(aux6+(v11*(1.+((-4.*(v24**2))+((2.*v44)+(v22*(2.+(4.*v44))))))));
aux8=((0.+8.j)*(v13*(v22*v44)))+((4.*((v23**2)*v44))+((-2.*(v33*v44))+((-4.*(v22*(v33*v44)))+aux7)));
aux9=(-8.*(v23*(v24*v34)))+((2.*(v34**2))+((4.*(v22*(v34**2)))+(((0.+4.j)*(v13*v44))+aux8)));
aux10=(4.*((v24**2)*v33))+(((0.+-4.j)*(v14*v34))+(((0.+-8.j)*(v14*(v22*v34)))+aux9));
aux11=((0.+8.j)*(v14*(v23*v24)))+(((0.+-8.j)*(v13*(v24**2)))+((-2.*(v22*v33))+aux10));
aux12=(-2.*(v14**2))+(((0.+4.j)*(v13*v22))+((-4.*((v14**2)*v22))+((2.*(v23**2))+aux11)));
aux13=(8.*(r2*(v12*(v33*v44))))+((2.*(r3*aux5))+(2.*(r1*((((0.+2.j)*v13)+aux12)-v33))));
aux14=((0.+16.j)*(r2*(v11*(v23*v44))))+((8.*(r4*(v11*(v23*v44))))+((-8.*(r2*(v13*(v23*v44))))+aux13));
aux15=(-8.*(r4*(v12*(v13*v44))))+(((0.+8.j)*(r2*(v23*v44)))+((4.*(r4*(v23*v44)))+aux14));
aux16=(-8.*(r2*(v12*(v34**2))))+((4.*(r2*(v12*v44)))+(((0.+-16.j)*(r2*(v12*(v13*v44))))+aux15));
aux17=((0.+-16.j)*(r2*(v11*(v24*v34))))+((-8.*(r4*(v11*(v24*v34))))+((8.*(r2*(v13*(v24*v34))))+aux16));
aux18=(8.*(r2*(v14*(v23*v34))))+(((0.+-8.j)*(r2*(v24*v34)))+((-4.*(r4*(v24*v34)))+aux17));
aux19=((0.+16.j)*(r4*(v11*(v22*v34))))+((-8.*(r4*(v13*(v22*v34))))+((8.*(r4*(v12*(v23*v34))))+aux18));
aux20=(-4.*(r2*(v22*v34)))+(((0.+8.j)*(r4*(v22*v34)))+((-8.*(r2*(v11*(v22*v34))))+aux19));
aux21=(-4.*(r4*(v13*v34)))+(((0.+16.j)*(r2*(v12*(v14*v34))))+((8.*(r4*(v12*(v14*v34))))+aux20));
aux22=((0.+8.j)*(r4*(v11*v34)))+((8.*(r2*((v12**2)*v34)))+(((0.+-16.j)*(r4*((v12**2)*v34)))+aux21));
aux23=(-8.*(r2*(v14*(v24*v33))))+((-2.*(r2*v34))+(((0.+4.j)*(r4*v34))+((-4.*(r2*(v11*v34)))+aux22)));
aux24=(4.*(r4*(v14*v33)))+((8.*(r4*(v14*(v22*v33))))+((-8.*(r4*(v12*(v24*v33))))+aux23));
aux25=((0.+-16.j)*(r4*(v11*(v23*v24))))+((8.*(r4*(v13*(v23*v24))))+((4.*(r2*(v12*v33)))+aux24));
aux26=(4.*(r2*(v23*v24)))+(((0.+-8.j)*(r4*(v23*v24)))+((8.*(r2*(v11*(v23*v24))))+aux25));
aux27=(-4.*(r2*(v14*v24)))+(((0.+16.j)*(r2*(v13*(v14*v24))))+((8.*(r4*(v13*(v14*v24))))+aux26));
aux28=(-4.*(r4*(v12*v24)))+((-8.*(r2*(v12*(v13*v24))))+(((0.+16.j)*(r4*(v12*(v13*v24))))+aux27));
aux29=((0.+-16.j)*(r2*((v14**2)*v23)))+((-8.*(r4*((v14**2)*v23)))+((-8.*(r4*(v14*(v23**2))))+aux28));
aux30=(-4.*(r2*(v13*v23)))+((-8.*(r2*(v12*(v14*v23))))+(((0.+16.j)*(r4*(v12*(v14*v23))))+aux29));
aux31=((0.+4.j)*(r2*v23))+((2.*(r4*v23))+(((0.+8.j)*(r2*(v11*v23)))+((4.*(r4*(v11*v23)))+aux30)));
aux32=(4.*(r4*(v14*v22)))+((8.*(r2*(v13*(v14*v22))))+(((0.+-16.j)*(r4*(v13*(v14*v22))))+aux31));
aux33=(-4.*(r4*(v12*v13)))+((2.*(r4*v14))+((4.*(r2*(v13*v14)))+(((0.+-8.j)*(r4*(v13*v14)))+aux32)));
aux34=(v14*(v24+((2.*(v24*v33))+(-2.*(v23*v34)))))+(v13*(v23+((-2.*(v24*v34))+(2.*(v23*v44)))));
aux35=(-4.*((v23**2)*(1.+(2.*v44))))+(v22*(2.+((-8.*(v34**2))+((4.*v44)+(v33*(4.+(8.*v44)))))));
aux36=(16.*(v23*(v24*v34)))+((-4.*(v34**2))+((2.*v44)+((4.*(v33*v44))+aux35)));
aux37=-2.*(v11*(1.+((-4.*(v24**2))+((2.*v33)+((-8.*((v24**2)*v33))+aux36)))));
aux38=(4.*((v12**2)*(1.+((-4.*(v34**2))+((2.*v44)+(v33*(2.+(4.*v44))))))))+((-16.*(v12*aux34))+aux37);
aux39=(16.*((v13**2)*(v22*v44)))+((8.*((v23**2)*v44))+((-4.*(v33*v44))+((-8.*(v22*(v33*v44)))+aux38)));
aux40=(8.*(v22*(v34**2)))+((-2.*v44)+((8.*((v13**2)*v44))+((-4.*(v22*v44))+aux39)));
aux41=(-32.*(v13*(v14*(v22*v34))))+((-16.*(v23*(v24*v34)))+((4.*(v34**2))+aux40));
aux42=(16.*((v14**2)*(v22*v33)))+((8.*((v24**2)*v33))+((-16.*(v13*(v14*v34)))+aux41));
aux43=(-16.*((v13**2)*(v24**2)))+((-2.*v33)+((8.*((v14**2)*v33))+((-4.*(v22*v33))+aux42)));
aux44=(-16.*((v14**2)*(v23**2)))+((32.*(v13*(v14*(v23*v24))))+((4.*(v24**2))+aux43));
aux45=(-2.*v22)+((8.*((v13**2)*v22))+((8.*((v14**2)*v22))+((4.*(v23**2))+aux44)));
aux46=((0.+1.j)*(r3*((2.*(r2*v12))+(((0.+-8.j)*(r2*(v12*v13)))+aux33))))/(-1.+((4.*(v13**2))+((4.*(v14**2))+aux45)));
aux47=(0.+-4.j)*(v12*(v23+(((0.+2.j)*(v14*v24))+((-2.*(v24*v34))+(2.*(v23*v44))))));
aux48=(-2.*((v12**2)*(1.+(2.*v44))))+(aux47+(v11*(1.+((-4.*(v24**2))+((2.*v44)+(v22*(2.+(4.*v44))))))));
aux49=((0.+8.j)*(v13*(v22*v44)))+((4.*((v23**2)*v44))+((-2.*(v33*v44))+((-4.*(v22*(v33*v44)))+aux48)));
aux50=(-8.*(v23*(v24*v34)))+((2.*(v34**2))+((4.*(v22*(v34**2)))+(((0.+4.j)*(v13*v44))+aux49)));
aux51=(4.*((v24**2)*v33))+(((0.+-4.j)*(v14*v34))+(((0.+-8.j)*(v14*(v22*v34)))+aux50));
aux52=((0.+8.j)*(v14*(v23*v24)))+(((0.+-8.j)*(v13*(v24**2)))+((-2.*(v22*v33))+aux51));
aux53=(-2.*(v14**2))+(((0.+4.j)*(v13*v22))+((-4.*((v14**2)*v22))+((2.*(v23**2))+aux52)));
aux54=(2.*v33)+(((0.+4.j)*(v14*v34))+((-4.*(v34**2))+((2.*v44)+(4.*(v33*v44)))));
aux55=((0.+2.j)*(v22*(1.+aux54)))+(v13*(2.+((-8.*(v24**2))+((4.*v44)+(v22*(4.+(8.*v44)))))));
aux56=(-8.*(v12*(v23*v44)))+(((0.+-8.j)*((v23**2)*v44))+(((0.+4.j)*(v33*v44))+aux55));
aux57=((0.+16.j)*(v23*(v24*v34)))+(((0.+-4.j)*(v34**2))+(((0.+2.j)*v44)+aux56));
aux58=((0.+-8.j)*((v24**2)*v33))+((-4.*(v14*v34))+((8.*(v12*(v24*v34)))+aux57));
aux59=((0.+-4.j)*(v23**2))+((8.*(v14*(v23*v24)))+(((0.+-4.j)*(v24**2))+(((0.+2.j)*v33)+aux58)));
aux60=(2.*(r3*((((0.+2.j)*v13)+aux53)-v33)))+(-2.*(r1*((0.+1.j)+((-4.*(v12*v23))+aux59))));
aux61=(-8.*(r4*(v13*(v23*v44))))+(((0.+16.j)*(r2*(v12*(v33*v44))))+((8.*(r4*(v12*(v33*v44))))+aux60));
aux62=(-4.*(r2*(v23*v44)))+((-8.*(r2*(v11*(v23*v44))))+(((0.+-16.j)*(r2*(v13*(v23*v44))))+aux61));
aux63=((0.+8.j)*(r2*(v12*v44)))+((4.*(r4*(v12*v44)))+((8.*(r2*(v12*(v13*v44))))+aux62));
aux64=(8.*(r4*(v13*(v24*v34))))+(((0.+-16.j)*(r2*(v12*(v34**2))))+((-8.*(r4*(v12*(v34**2))))+aux63));
aux65=(4.*(r2*(v24*v34)))+((8.*(r2*(v11*(v24*v34))))+(((0.+16.j)*(r2*(v13*(v24*v34))))+aux64));
aux66=((0.+16.j)*(r4*(v12*(v23*v34))))+(((0.+16.j)*(r2*(v14*(v23*v34))))+((8.*(r4*(v14*(v23*v34))))+aux65));
aux67=(8.*(r2*(v13*(v22*v34))))+(((0.+-16.j)*(r4*(v13*(v22*v34))))+((-8.*(r2*(v12*(v23*v34))))+aux66));
aux68=(-8.*(r2*(v12*(v14*v34))))+((-4.*(r4*(v22*v34)))+((-8.*(r4*(v11*(v22*v34))))+aux67));
aux69=(8.*(r4*((v12**2)*v34)))+((4.*(r2*(v13*v34)))+(((0.+-8.j)*(r4*(v13*v34)))+aux68));
aux70=(-8.*(r4*(v14*(v24*v33))))+((-2.*(r4*v34))+((-4.*(r4*(v11*v34)))+aux69));
aux71=((0.+-16.j)*(r4*(v12*(v24*v33))))+(((0.+-16.j)*(r2*(v14*(v24*v33))))+aux70);
aux72=(-8.*(r2*(v14*(v22*v33))))+(((0.+16.j)*(r4*(v14*(v22*v33))))+((8.*(r2*(v12*(v24*v33))))+aux71));
aux73=(4.*(r4*(v12*v33)))+((-4.*(r2*(v14*v33)))+(((0.+8.j)*(r4*(v14*v33)))+aux72));
aux74=(-8.*(r2*(v13*(v23*v24))))+(((0.+16.j)*(r4*(v13*(v23*v24))))+(((0.+8.j)*(r2*(v12*v33)))+aux73));
aux75=(-8.*(r2*(v13*(v14*v24))))+((4.*(r4*(v23*v24)))+((8.*(r4*(v11*(v23*v24))))+aux74));
aux76=(-8.*(r4*(v12*(v13*v24))))+(((0.+-8.j)*(r2*(v14*v24)))+((-4.*(r4*(v14*v24)))+aux75));
aux77=((0.+-16.j)*(r4*(v14*(v23**2))))+((4.*(r2*(v12*v24)))+(((0.+-8.j)*(r4*(v12*v24)))+aux76));
aux78=(-8.*(r4*(v12*(v14*v23))))+((8.*(r2*((v14**2)*v23)))+((8.*(r2*(v14*(v23**2))))+aux77));
aux79=(-4.*(r2*(v11*v23)))+(((0.+-8.j)*(r2*(v13*v23)))+((-4.*(r4*(v13*v23)))+aux78));
aux80=((0.+8.j)*(r4*(v14*v22)))+((8.*(r4*(v13*(v14*v22))))+((-2.*(r2*v23))+aux79));
aux81=(-2.*(r2*v14))+(((0.+4.j)*(r4*v14))+((4.*(r4*(v13*v14)))+((-4.*(r2*(v14*v22)))+aux80)));
aux82=(0.+1.j)*(r1*(((0.+4.j)*(r2*v12))+((2.*(r4*v12))+((4.*(r2*(v12*v13)))+aux81))));
aux83=(v14*(v24+((2.*(v24*v33))+(-2.*(v23*v34)))))+(v13*(v23+((-2.*(v24*v34))+(2.*(v23*v44)))));
aux84=(-4.*((v23**2)*(1.+(2.*v44))))+(v22*(2.+((-8.*(v34**2))+((4.*v44)+(v33*(4.+(8.*v44)))))));
aux85=(16.*(v23*(v24*v34)))+((-4.*(v34**2))+((2.*v44)+((4.*(v33*v44))+aux84)));
aux86=-2.*(v11*(1.+((-4.*(v24**2))+((2.*v33)+((-8.*((v24**2)*v33))+aux85)))));
aux87=(4.*((v12**2)*(1.+((-4.*(v34**2))+((2.*v44)+(v33*(2.+(4.*v44))))))))+((-16.*(v12*aux83))+aux86);
aux88=(16.*((v13**2)*(v22*v44)))+((8.*((v23**2)*v44))+((-4.*(v33*v44))+((-8.*(v22*(v33*v44)))+aux87)));
aux89=(8.*(v22*(v34**2)))+((-2.*v44)+((8.*((v13**2)*v44))+((-4.*(v22*v44))+aux88)));
aux90=(-32.*(v13*(v14*(v22*v34))))+((-16.*(v23*(v24*v34)))+((4.*(v34**2))+aux89));
aux91=(16.*((v14**2)*(v22*v33)))+((8.*((v24**2)*v33))+((-16.*(v13*(v14*v34)))+aux90));
aux92=(-16.*((v13**2)*(v24**2)))+((-2.*v33)+((8.*((v14**2)*v33))+((-4.*(v22*v33))+aux91)));
aux93=(-16.*((v14**2)*(v23**2)))+((32.*(v13*(v14*(v23*v24))))+((4.*(v24**2))+aux92));
aux94=(-2.*v22)+((8.*((v13**2)*v22))+((8.*((v14**2)*v22))+((4.*(v23**2))+aux93)));
aux95=(0.+-4.j)*(v12*(v14+(((0.+4.j)*(v13*v23))+((2.*(v14*v33))+(-2.*(v13*v34))))));
aux96=(2.*((1.+((0.+2.j)*v24))*(1.+(2.*v33))))+((v22*(4.+(8.*v33)))+((0.+-8.j)*(v23*v34)));
aux97=(-4.*((v12**2)*(1.+(2.*v33))))+(((0.+-4.j)*(v23*v34))+(aux95+(v11*((-8.*(v23**2))+aux96))));
aux98=((0.+-8.j)*((v13**2)*v24))+((2.*v33)+((4.*(v22*v33))+(((0.+4.j)*(v24*v33))+aux97)));
aux99=(-8.*((v13**2)*v22))+(((0.+8.j)*(v13*(v14*v23)))+((-4.*(v23**2))+(((0.+2.j)*v24)+aux98)));
aux100=((0.+2.j)*v33)+((-2.*(v24*v33))+(((0.+2.j)*(v22*(1.+(2.*v33))))+(2.*(v23*v34))));
aux101=v14*(((0.+1.j)+(v13+((2.*(v13*v22))+(((0.+-4.j)*(v23**2))+aux100))))-v24);
aux102=(2.*v33)+(((0.+8.j)*(v23*v34))+((-4.*(v34**2))+((2.*v44)+(4.*(v33*v44)))));
aux103=1.+((-4.*(v14*v23))+((-4.*(v24*((0.+1.j)+(v13+((0.+2.j)*v33)))))+aux102));
aux104=(4.*(v13*(v24*v34)))+((2.*aux101)+((-4.*(v13*(v23*v44)))+(v12*aux103)));
aux105=(-2.*(v22*v34))+((-4.*(v11*(v22*v34)))+(((0.+-8.j)*(v13*(v22*v34)))+aux104));
aux106=((0.+8.j)*(v13*(v23*v24)))+((-2.*(v11*v34))+((4.*((v12**2)*v34))+(((0.+-4.j)*(v13*v34))+aux105)));
aux107=r1*(((-2.*(v13*v23))+((2.*(v23*v24))+((4.*(v11*(v23*v24)))+aux106)))-v34);
aux108=(-8.*(r3*(v11*(v23*v44))))+((4.*(r2*(v33*v44)))+((8.*(r2*(v11*(v33*v44))))+(-2.*aux107)));
aux109=(8.*(r3*(v12*(v13*v44))))+((-8.*(r2*((v13**2)*v44)))+((-4.*(r3*(v23*v44)))+aux108));
aux110=((0.+2.j)*(r4*(1.+((-4.*(v13**2))+((2.*v22)+aux99)))))+((2.*(r2*v44))+((4.*(r2*(v11*v44)))+aux109));
aux111=(8.*(r3*(v11*(v24*v34))))+((-4.*(r2*(v34**2)))+((-8.*(r2*(v11*(v34**2))))+aux110));
aux112=((0.+16.j)*(r2*(v11*(v23*v34))))+((-8.*(r3*(v12*(v23*v34))))+((4.*(r3*(v24*v34)))+aux111));
aux113=((0.+-16.j)*(r3*(v11*(v22*v34))))+((8.*(r3*(v13*(v22*v34))))+(((0.+8.j)*(r2*(v23*v34)))+aux112));
aux114=(-8.*(r3*(v12*(v14*v34))))+((16.*(r2*(v13*(v14*v34))))+(((0.+-8.j)*(r3*(v22*v34)))+aux113));
aux115=((0.+16.j)*(r3*((v12**2)*v34)))+((4.*(r3*(v13*v34)))+(((0.+-16.j)*(r2*(v12*(v13*v34))))+aux114));
aux116=(8.*(r3*(v12*(v24*v33))))+(((0.+-4.j)*(r3*v34))+(((0.+-8.j)*(r3*(v11*v34)))+aux115));
aux117=(-8.*(r3*(v14*(v22*v33))))+(((0.+-8.j)*(r2*(v24*v33)))+(((0.+-16.j)*(r2*(v11*(v24*v33))))+aux116));
aux118=(-8.*(r2*((v14**2)*v33)))+((-4.*(r2*(v22*v33)))+((-8.*(r2*(v11*(v22*v33))))+aux117));
aux119=(8.*(r2*((v12**2)*v33)))+((-4.*(r3*(v14*v33)))+(((0.+16.j)*(r2*(v12*(v14*v33))))+aux118));
aux120=((0.+8.j)*(r3*(v23*v24)))+(((0.+16.j)*(r3*(v11*(v23*v24))))+((-8.*(r3*(v13*(v23*v24))))+aux119));
aux121=((0.+-16.j)*(r3*(v12*(v13*v24))))+(((0.+16.j)*(r2*((v13**2)*v24)))+((-8.*(r3*(v13*(v14*v24))))+aux120));
aux122=((0.+-4.j)*(r2*v24))+(((0.+-8.j)*(r2*(v11*v24)))+((4.*(r3*(v12*v24)))+aux121));
aux123=(4.*(r2*(v23**2)))+((8.*(r2*(v11*(v23**2))))+((8.*(r3*(v14*(v23**2))))+aux122));
aux124=((0.+-16.j)*(r3*(v12*(v14*v23))))+(((0.+-16.j)*(r2*(v13*(v14*v23))))+((8.*(r3*((v14**2)*v23)))+aux123));
aux125=(-2.*(r3*v23))+((-4.*(r3*(v11*v23)))+((-16.*(r2*(v12*(v13*v23))))+aux124));
aux126=(8.*(r2*((v13**2)*v22)))+((-4.*(r3*(v14*v22)))+(((0.+16.j)*(r3*(v13*(v14*v22))))+aux125));
aux127=((0.+8.j)*(r3*(v13*v14)))+((-4.*(r2*(v14**2)))+((-2.*(r2*v22))+((-4.*(r2*(v11*v22)))+aux126)));
aux128=(4.*(r3*(v12*v13)))+((-2.*(r3*v14))+(((0.+8.j)*(r2*(v12*v14)))+aux127));
aux129=(v14*(v24+((2.*(v24*v33))+(-2.*(v23*v34)))))+(v13*(v23+((-2.*(v24*v34))+(2.*(v23*v44)))));
aux130=(-4.*((v23**2)*(1.+(2.*v44))))+(v22*(2.+((-8.*(v34**2))+((4.*v44)+(v33*(4.+(8.*v44)))))));
aux131=(16.*(v23*(v24*v34)))+((-4.*(v34**2))+((2.*v44)+((4.*(v33*v44))+aux130)));
aux132=2.*(v11*(1.+((-4.*(v24**2))+((2.*v33)+((-8.*((v24**2)*v33))+aux131)))));
aux133=(-4.*((v12**2)*(1.+((-4.*(v34**2))+((2.*v44)+(v33*(2.+(4.*v44))))))))+((16.*(v12*aux129))+aux132);
aux134=(-16.*((v13**2)*(v22*v44)))+((-8.*((v23**2)*v44))+((4.*(v33*v44))+((8.*(v22*(v33*v44)))+aux133)));
aux135=(-8.*(v22*(v34**2)))+((2.*v44)+((-8.*((v13**2)*v44))+((4.*(v22*v44))+aux134)));
aux136=(32.*(v13*(v14*(v22*v34))))+((16.*(v23*(v24*v34)))+((-4.*(v34**2))+aux135));
aux137=(-16.*((v14**2)*(v22*v33)))+((-8.*((v24**2)*v33))+((16.*(v13*(v14*v34)))+aux136));
aux138=(16.*((v13**2)*(v24**2)))+((2.*v33)+((-8.*((v14**2)*v33))+((4.*(v22*v33))+aux137)));
aux139=(16.*((v14**2)*(v23**2)))+((-32.*(v13*(v14*(v23*v24))))+((-4.*(v24**2))+aux138));
aux140=(2.*v22)+((-8.*((v13**2)*v22))+((-8.*((v14**2)*v22))+((-4.*(v23**2))+aux139)));
aux141=((0.+1.j)*(r4*((4.*(r2*(v12**2)))+aux128)))/(1.+((-4.*(v13**2))+((-4.*(v14**2))+aux140)));
aux142=((0.+2.j)*(v14*v34))+(((0.+2.j)*(v23*v34))+((-4.*(v34**2))+((2.*v44)+(4.*(v33*v44)))));
aux143=v24+((2.*(v24*v33))+((2.*(v13*v44))+((0.+1.j)*(1.+((2.*v33)+aux142)))));
aux144=(-4.*(v11*(v23*v44)))+(((0.+-8.j)*(v13*(v23*v44)))+(2.*(v12*(v13+aux143))));
aux145=(4.*(v11*(v24*v34)))+(((0.+8.j)*(v13*(v24*v34)))+((-2.*(v23*v44))+aux144));
aux146=(-4.*(v13*(v23*v24)))+((2.*(v13*v34))+((4.*(v13*(v22*v34)))+((2.*(v24*v34))+aux145)));
aux147=(2.*v33)+(((0.+8.j)*(v24*v33))+((v22*(2.+(4.*v33)))+((0.+-8.j)*(v23*v34))));
aux148=((-2.*(v11*v23))+(((0.+-4.j)*(v13*v23))+((4.*((v14**2)*v23))+aux146)))-(v14*(1.+((-4.*(v23**2))+(((0.+4.j)*v24)+((4.*(v13*v24))+aux147)))));
aux149=(2.*v33)+(((0.+4.j)*(v23*v34))+((-4.*(v34**2))+((2.*v44)+(4.*(v33*v44)))));
aux150=((0.+-4.j)*(v33*v44))+(-2.*(v11*((v24*(2.+(4.*v33)))+((0.+1.j)*(1.+aux149)))));
aux151=((v13**2)*((0.+4.j)+((8.*v24)+((0.+8.j)*v44))))+(((0.+-2.j)*v44)+aux150);
aux152=((0.+4.j)*(v34**2))+((-8.*(v13*((v14*v23)+((v12*v34)+((0.+2.j)*(v14*v34))))))+aux151);
aux153=(8.*(v12*(v14*v33)))+(((0.+8.j)*((v14**2)*v33))+((-4.*(v24*v33))+((4.*(v23*v34))+aux152)));
aux154=(4.*(v12*v14))+(((0.+4.j)*(v14**2))+((-2.*v24)+(((0.+-2.j)*v33)+aux153)));
aux155=(-8.*(r3*(v12*(v33*v44))))+((-2.*(r1*(aux148-v23)))+(-2.*(r2*((0.+-1.j)+aux154))));
aux156=(8.*(r3*(v13*(v23*v44))))+((4.*(r4*(v33*v44)))+((8.*(r4*(v11*(v33*v44))))+aux155));
aux157=(-8.*(r4*((v13**2)*v44)))+(((0.+-8.j)*(r3*(v23*v44)))+(((0.+-16.j)*(r3*(v11*(v23*v44))))+aux156));
aux158=(4.*(r4*(v11*v44)))+((-4.*(r3*(v12*v44)))+(((0.+16.j)*(r3*(v12*(v13*v44))))+aux157));
aux159=(-8.*(r4*(v11*(v34**2))))+((8.*(r3*(v12*(v34**2))))+((2.*(r4*v44))+aux158));
aux160=((0.+16.j)*(r3*(v11*(v24*v34))))+((-8.*(r3*(v13*(v24*v34))))+((-4.*(r4*(v34**2)))+aux159));
aux161=((0.+16.j)*(r4*(v11*(v23*v34))))+((-8.*(r3*(v14*(v23*v34))))+(((0.+8.j)*(r3*(v24*v34)))+aux160));
aux162=(4.*(r3*(v22*v34)))+((8.*(r3*(v11*(v22*v34))))+(((0.+8.j)*(r4*(v23*v34)))+aux161));
aux163=((0.+-16.j)*(r4*(v12*(v13*v34))))+(((0.+-16.j)*(r3*(v12*(v14*v34))))+((16.*(r4*(v13*(v14*v34))))+aux162));
aux164=(8.*(r3*(v14*(v24*v33))))+((2.*(r3*v34))+((4.*(r3*(v11*v34)))+((-8.*(r3*((v12**2)*v34)))+aux163)));
aux165=(-8.*(r4*(v11*(v22*v33))))+(((0.+-8.j)*(r4*(v24*v33)))+(((0.+-16.j)*(r4*(v11*(v24*v33))))+aux164));
aux166=((0.+16.j)*(r4*(v12*(v14*v33))))+((-8.*(r4*((v14**2)*v33)))+((-4.*(r4*(v22*v33)))+aux165));
aux167=(-8.*(r3*(v11*(v23*v24))))+((-4.*(r3*(v12*v33)))+((8.*(r4*((v12**2)*v33)))+aux166));
aux168=(4.*(r3*(v14*v24)))+(((0.+-16.j)*(r3*(v13*(v14*v24))))+((-4.*(r3*(v23*v24)))+aux167));
aux169=((0.+-8.j)*(r4*(v11*v24)))+((8.*(r3*(v12*(v13*v24))))+(((0.+16.j)*(r4*((v13**2)*v24)))+aux168));
aux170=(4.*(r4*(v23**2)))+((8.*(r4*(v11*(v23**2))))+(((0.+-4.j)*(r4*v24))+aux169));
aux171=((0.+-16.j)*(r4*(v13*(v14*v23))))+(((0.+16.j)*(r3*((v14**2)*v23)))+aux170);
aux172=(4.*(r3*(v13*v23)))+((-16.*(r4*(v12*(v13*v23))))+((8.*(r3*(v12*(v14*v23))))+aux171));
aux173=(-8.*(r3*(v13*(v14*v22))))+(((0.+-4.j)*(r3*v23))+(((0.+-8.j)*(r3*(v11*v23)))+aux172));
aux174=(-2.*(r4*v22))+((-4.*(r4*(v11*v22)))+((8.*(r4*((v13**2)*v22)))+aux173));
aux175=((0.+8.j)*(r4*(v12*v14)))+((-4.*(r3*(v13*v14)))+((-4.*(r4*(v14**2)))+aux174));
aux176=r2*((-2.*(r3*v12))+((4.*(r4*(v12**2)))+(((0.+8.j)*(r3*(v12*v13)))+aux175)));
aux177=(v14*(v24+((2.*(v24*v33))+(-2.*(v23*v34)))))+(v13*(v23+((-2.*(v24*v34))+(2.*(v23*v44)))));
aux178=(-4.*((v23**2)*(1.+(2.*v44))))+(v22*(2.+((-8.*(v34**2))+((4.*v44)+(v33*(4.+(8.*v44)))))));
aux179=(16.*(v23*(v24*v34)))+((-4.*(v34**2))+((2.*v44)+((4.*(v33*v44))+aux178)));
aux180=2.*(v11*(1.+((-4.*(v24**2))+((2.*v33)+((-8.*((v24**2)*v33))+aux179)))));
aux181=(-4.*((v12**2)*(1.+((-4.*(v34**2))+((2.*v44)+(v33*(2.+(4.*v44))))))))+((16.*(v12*aux177))+aux180);
aux182=(-16.*((v13**2)*(v22*v44)))+((-8.*((v23**2)*v44))+((4.*(v33*v44))+((8.*(v22*(v33*v44)))+aux181)));
aux183=(-8.*(v22*(v34**2)))+((2.*v44)+((-8.*((v13**2)*v44))+((4.*(v22*v44))+aux182)));
aux184=(32.*(v13*(v14*(v22*v34))))+((16.*(v23*(v24*v34)))+((-4.*(v34**2))+aux183));
aux185=(-16.*((v14**2)*(v22*v33)))+((-8.*((v24**2)*v33))+((16.*(v13*(v14*v34)))+aux184));
aux186=(16.*((v13**2)*(v24**2)))+((2.*v33)+((-8.*((v14**2)*v33))+((4.*(v22*v33))+aux185)));
aux187=(16.*((v14**2)*(v23**2)))+((-32.*(v13*(v14*(v23*v24))))+((-4.*(v24**2))+aux186));
aux188=(2.*v22)+((-8.*((v13**2)*v22))+((-8.*((v14**2)*v22))+((-4.*(v23**2))+aux187)));
aux189=(b13*((-2.*(b23*b24))+(b34+(2.*(b22*b34)))))+(b12*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))));
aux190=(b14*(1.+((-4.*(b23**2))+((2.*b33)+(b22*(2.+(4.*b33)))))))+(-2.*aux189);
aux191=(-4.*(b14*b23))+((-4.*(b13*b24))+((2.*b33)+((-4.*(b34**2))+((2.*b44)+(4.*(b33*b44))))));
aux192=(2.*(b13*((b14+((2.*(b14*b22))+((2.*(b24*b34))+(-2.*(b23*b44)))))-b23)))+(b12*(1.+aux191));
aux193=(4.*((b12**2)*b34))+((-2.*(b22*b34))+((-4.*(b11*(b22*b34)))+((4.*(b14*(b23*b34)))+aux192)));
aux194=(2.*(b23*b24))+((4.*(b11*(b23*b24)))+((-4.*(b14*(b24*b33)))+((-2.*(b11*b34))+aux193)));
aux195=(-2.*(b12*(b14+((2.*(b14*b33))+(-2.*(b13*b34))))))+((1.+(2.*b11))*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))));
aux196=(-2.*(b11*b44))+((4.*((b13**2)*b44))+((-2.*(b33*b44))+(-4.*(b11*(b33*b44)))));
aux197=((b14**2)*(2.+(4.*b33)))+((-8.*(b13*(b14*b34)))+((2.*(b34**2))+((4.*(b11*(b34**2)))+aux196)));
aux198=(2.*(b22*b33))+((4.*(b11*(b22*b33)))+((-2.*((b12**2)*(1.+(2.*b33))))+aux197));
aux199=(-4.*((b13**2)*b22))+((8.*(b12*(b13*b23)))+((-2.*(b23**2))+((-4.*(b11*(b23**2)))+aux198)));
aux200=(4.*((b12**2)*b34))+((1.+(2.*b11))*(((2.*(b23*b24))+(-2.*(b22*b34)))-b34));
aux201=(-4.*(b12*(b14*b23)))+((2.*(b13*(b14+((2.*(b14*b22))+(-2.*(b12*b24))))))+aux200);
aux202=b12*(b13+(b24+((2.*(b24*b33))+((-2.*((b14+b23)*b34))+(2.*(b13*b44))))));
aux203=(4.*(b11*(b24*b34)))+((-2.*(b23*b44))+((-4.*(b11*(b23*b44)))+(2.*aux202)));
aux204=(-4.*(b13*(b23*b24)))+((2.*(b13*b34))+((4.*(b13*(b22*b34)))+((2.*(b24*b34))+aux203)));
aux205=b14*(1.+((-4.*(b23**2))+((4.*(b13*b24))+((2.*b33)+(b22*(2.+(4.*b33)))))));
aux206=(0.+-2.j)*(((((-2.*(b11*b23))+((4.*((b14**2)*b23))+aux204))-aux205)-b23)*s3);
aux207=(b14*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))))+(b13*(b23+((-2.*(b24*b34))+(2.*(b23*b44)))));
aux208=(-4.*((b23**2)*(1.+(2.*b44))))+(b22*(2.+((-8.*(b34**2))+((4.*b44)+(b33*(4.+(8.*b44)))))));
aux209=(16.*(b23*(b24*b34)))+((-4.*(b34**2))+((2.*b44)+((4.*(b33*b44))+aux208)));
aux210=2.*(b11*(1.+((-4.*(b24**2))+((2.*b33)+((-8.*((b24**2)*b33))+aux209)))));
aux211=(-4.*((b12**2)*(1.+((-4.*(b34**2))+((2.*b44)+(b33*(2.+(4.*b44))))))))+((16.*(b12*aux207))+aux210);
aux212=(-16.*((b13**2)*(b22*b44)))+((-8.*((b23**2)*b44))+((4.*(b33*b44))+((8.*(b22*(b33*b44)))+aux211)));
aux213=(-8.*(b22*(b34**2)))+((2.*b44)+((-8.*((b13**2)*b44))+((4.*(b22*b44))+aux212)));
aux214=(32.*(b13*(b14*(b22*b34))))+((16.*(b23*(b24*b34)))+((-4.*(b34**2))+aux213));
aux215=(-16.*((b14**2)*(b22*b33)))+((-8.*((b24**2)*b33))+((16.*(b13*(b14*b34)))+aux214));
aux216=(16.*((b13**2)*(b24**2)))+((2.*b33)+((-8.*((b14**2)*b33))+((4.*(b22*b33))+aux215)));
aux217=(16.*((b14**2)*(b23**2)))+((-32.*(b13*(b14*(b23*b24))))+((-4.*(b24**2))+aux216));
aux218=(2.*b22)+((-8.*((b13**2)*b22))+((-8.*((b14**2)*b22))+((-4.*(b23**2))+aux217)));
aux219=(0.+-4.j)*(b12*(b14+(((0.+4.j)*(b13*b23))+((2.*(b14*b33))+(-2.*(b13*b34))))));
aux220=(2.*((1.+((0.+2.j)*b24))*(1.+(2.*b33))))+((b22*(4.+(8.*b33)))+((0.+-8.j)*(b23*b34)));
aux221=((0.+4.j)*(b24*b33))+(((0.+-4.j)*(b23*b34))+(aux219+(b11*((-8.*(b23**2))+aux220))));
aux222=np.conjugate((((0.+8.j)*(b13*(b14*b23)))+(((0.+-8.j)*((b13**2)*b24))+aux221)));
aux223=(-8.*((b13**2)*b22))+((4.*(b22*b33))+((-4.*((b12**2)*(1.+(2.*b33))))+aux222));
aux224=(-8.*(b13**2))+((4.*b22)+((-8.*(b23**2))+(((0.+-4.j)*b24)+((4.*b33)+(2.*aux223)))));
aux225=2.*((b12**2)*(1.+((2.*b33)+((-4.*(b34**2))+((2.*b44)+(4.*(b33*b44)))))));
aux226=(b14*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))))+(b13*(b23+((-2.*(b24*b34))+(2.*(b23*b44)))));
aux227=(4.*((b23**2)*b44))+((-2.*(b33*b44))+((-4.*(b22*(b33*b44)))+(aux225+(-8.*(b12*aux226)))));
aux228=(4.*((b13**2)*b44))+((-2.*(b22*b44))+((8.*((b13**2)*(b22*b44)))+aux227));
aux229=(-16.*(b13*(b14*(b22*b34))))+((-8.*(b23*(b24*b34)))+((4.*(b22*(b34**2)))+aux228));
aux230=(8.*((b14**2)*(b22*b33)))+((4.*((b24**2)*b33))+((-8.*(b13*(b14*b34)))+aux229));
aux231=(-8.*((b13**2)*(b24**2)))+((4.*((b14**2)*b33))+((-2.*(b22*b33))+aux230));
aux232=(4.*((b14**2)*b22))+((-8.*((b14**2)*(b23**2)))+((16.*(b13*(b14*(b23*b24))))+aux231));
aux233=(-4.*((b23**2)*(1.+(2.*b44))))+(b22*(2.+((-8.*(b34**2))+((4.*b44)+(b33*(4.+(8.*b44)))))));
aux234=(16.*(b23*(b24*b34)))+((-4.*(b34**2))+((2.*b44)+((4.*(b33*b44))+aux233)));
aux235=((4.*((b13**2)*b22))+aux232)-(b11*(1.+((-4.*(b24**2))+((2.*b33)+((-8.*((b24**2)*b33))+aux234)))));
aux236=(4.*(b23**2))+((4.*(b24**2))+((-2.*b33)+((4.*(b34**2))+((-2.*b44)+(2.*aux235)))));
aux237=((1.+((-4.*(b13**2))+((-4.*(b14**2))+aux218)))*(s4*(2.+aux224)))/(-1.+((4.*(b13**2))+((4.*(b14**2))+((-2.*b22)+aux236))));
aux238=((0.+2.j)*(((b22+((2.*(b11*b22))+aux199))-b44)*s2))+((-4.*(aux201*s3))+(aux206+aux237));
aux239=((0.+2.j)*((((-2.*(b14*b24))+aux194)-b34)*s1))+((4.*(((4.*(b13*(b14*b23)))+((-4.*((b13**2)*b24))+aux195))*s2))+aux238);
aux240=(b14*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))))+(b13*(b23+((-2.*(b24*b34))+(2.*(b23*b44)))));
aux241=(-4.*((b23**2)*(1.+(2.*b44))))+(b22*(2.+((-8.*(b34**2))+((4.*b44)+(b33*(4.+(8.*b44)))))));
aux242=(16.*(b23*(b24*b34)))+((-4.*(b34**2))+((2.*b44)+((4.*(b33*b44))+aux241)));
aux243=2.*(b11*(1.+((-4.*(b24**2))+((2.*b33)+((-8.*((b24**2)*b33))+aux242)))));
aux244=(-4.*((b12**2)*(1.+((-4.*(b34**2))+((2.*b44)+(b33*(2.+(4.*b44))))))))+((16.*(b12*aux240))+aux243);
aux245=(-16.*((b13**2)*(b22*b44)))+((-8.*((b23**2)*b44))+((4.*(b33*b44))+((8.*(b22*(b33*b44)))+aux244)));
aux246=(-8.*(b22*(b34**2)))+((2.*b44)+((-8.*((b13**2)*b44))+((4.*(b22*b44))+aux245)));
aux247=(32.*(b13*(b14*(b22*b34))))+((16.*(b23*(b24*b34)))+((-4.*(b34**2))+aux246));
aux248=(-16.*((b14**2)*(b22*b33)))+((-8.*((b24**2)*b33))+((16.*(b13*(b14*b34)))+aux247));
aux249=(16.*((b13**2)*(b24**2)))+((2.*b33)+((-8.*((b14**2)*b33))+((4.*(b22*b33))+aux248)));
aux250=(16.*((b14**2)*(b23**2)))+((-32.*(b13*(b14*(b23*b24))))+((-4.*(b24**2))+aux249));
aux251=(2.*b22)+((-8.*((b13**2)*b22))+((-8.*((b14**2)*b22))+((-4.*(b23**2))+aux250)));
aux252=(s4*((4.*(aux190*s1))+aux239))/(1.+((-4.*(b13**2))+((-4.*(b14**2))+aux251)));
aux253=(-2.*((b12**2)*(1.+(2.*b44))))+(b11*(1.+((-4.*(b24**2))+((2.*b44)+(b22*(2.+(4.*b44)))))));
aux254=(4.*(b22*(b34**2)))+((4.*((b23**2)*b44))+((-2.*(b33*b44))+((-4.*(b22*(b33*b44)))+aux253)));
aux255=(-2.*(b22*b33))+((4.*((b24**2)*b33))+((-8.*(b23*(b24*b34)))+((2.*(b34**2))+aux254)));
aux256=(-2.*(b14**2))+((-4.*((b14**2)*b22))+((2.*(b23**2))+((8.*(b12*(b14*b24)))+aux255)));
aux257=(b14*((-2.*(b23*b24))+(b34+(2.*(b22*b34)))))+(b12*(b23+((-2.*(b24*b34))+(2.*(b23*b44)))));
aux258=(b13*(1.+((-4.*(b24**2))+((2.*b44)+(b22*(2.+(4.*b44)))))))+(-2.*aux257);
aux259=(-4.*(b14*b23))+((-4.*(b13*b24))+((2.*b33)+((-4.*(b34**2))+((2.*b44)+(4.*(b33*b44))))));
aux260=(2.*(b13*((b14+((2.*(b14*b22))+((2.*(b24*b34))+(-2.*(b23*b44)))))-b23)))+(b12*(1.+aux259));
aux261=(4.*((b12**2)*b34))+((-2.*(b22*b34))+((-4.*(b11*(b22*b34)))+((4.*(b14*(b23*b34)))+aux260)));
aux262=(2.*(b23*b24))+((4.*(b11*(b23*b24)))+((-4.*(b14*(b24*b33)))+((-2.*(b11*b34))+aux261)));
aux263=(-2.*(b12*(b13+((-2.*(b14*b34))+(2.*(b13*b44))))))+(b23*(1.+((-4.*(b14**2))+((2.*b44)+(b11*(2.+(4.*b44)))))));
aux264=4.*(((4.*(b13*(b14*b24)))+((-2.*((1.+(2.*b11))*(b24*b34)))+aux263))*s2);
aux265=(4.*((b12**2)*b34))+((1.+(2.*b11))*(((2.*(b23*b24))+(-2.*(b22*b34)))-b34));
aux266=(-4.*(b12*(b14*b23)))+((2.*(b13*(b14+((2.*(b14*b22))+(-2.*(b12*b24))))))+aux265);
aux267=b12*(b13+(b24+((2.*(b24*b33))+((-2.*((b14+b23)*b34))+(2.*(b13*b44))))));
aux268=(4.*(b11*(b24*b34)))+((-2.*(b23*b44))+((-4.*(b11*(b23*b44)))+(2.*aux267)));
aux269=(-4.*(b13*(b23*b24)))+((2.*(b13*b34))+((4.*(b13*(b22*b34)))+((2.*(b24*b34))+aux268)));
aux270=b14*(1.+((-4.*(b23**2))+((4.*(b13*b24))+((2.*b33)+(b22*(2.+(4.*b33)))))));
aux271=(0.+-2.j)*(((((-2.*(b11*b23))+((4.*((b14**2)*b23))+aux269))-aux270)-b23)*s4);
aux272=(b14*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))))+(b13*(b23+((-2.*(b24*b34))+(2.*(b23*b44)))));
aux273=(-4.*((b23**2)*(1.+(2.*b44))))+(b22*(2.+((-8.*(b34**2))+((4.*b44)+(b33*(4.+(8.*b44)))))));
aux274=(16.*(b23*(b24*b34)))+((-4.*(b34**2))+((2.*b44)+((4.*(b33*b44))+aux273)));
aux275=2.*(b11*(1.+((-4.*(b24**2))+((2.*b33)+((-8.*((b24**2)*b33))+aux274)))));
aux276=(-4.*((b12**2)*(1.+((-4.*(b34**2))+((2.*b44)+(b33*(2.+(4.*b44))))))))+((16.*(b12*aux272))+aux275);
aux277=(-16.*((b13**2)*(b22*b44)))+((-8.*((b23**2)*b44))+((4.*(b33*b44))+((8.*(b22*(b33*b44)))+aux276)));
aux278=(-8.*(b22*(b34**2)))+((2.*b44)+((-8.*((b13**2)*b44))+((4.*(b22*b44))+aux277)));
aux279=(32.*(b13*(b14*(b22*b34))))+((16.*(b23*(b24*b34)))+((-4.*(b34**2))+aux278));
aux280=(-16.*((b14**2)*(b22*b33)))+((-8.*((b24**2)*b33))+((16.*(b13*(b14*b34)))+aux279));
aux281=(16.*((b13**2)*(b24**2)))+((2.*b33)+((-8.*((b14**2)*b33))+((4.*(b22*b33))+aux280)));
aux282=(16.*((b14**2)*(b23**2)))+((-32.*(b13*(b14*(b23*b24))))+((-4.*(b24**2))+aux281));
aux283=(2.*b22)+((-8.*((b13**2)*b22))+((-8.*((b14**2)*b22))+((-4.*(b23**2))+aux282)));
aux284=(0.+1.j)*(b12*(b23+(((0.+4.j)*(b14*b24))+((-2.*(b24*b34))+(2.*(b23*b44))))));
aux285=((0.+2.j)*(b14*(b22*b34)))+(((0.+-1.j)*(b13*(b22+((-2.*(b24**2))+(b44+(2.*(b22*b44)))))))+aux284);
aux286=np.conjugate((((0.+-2.j)*(b14*(b23*b24)))+(((0.+1.j)*(b14*b34))+aux285)));
aux287=-4.*(((2.*((b14**2)*b22))+(((b12**2)*(1.+(2.*b44)))+aux286))-(b22*b44));
aux288=(2.*b44)+((b11*(2.+((-8.*(b24**2))+((4.*b44)+(b22*(4.+(8.*b44)))))))+aux287);
aux289=1.+(((0.+-2.j)*b13)+((-4.*(b14**2))+((2.*b22)+((-4.*(b24**2))+aux288))));
aux290=2.*((b12**2)*(1.+((2.*b33)+((-4.*(b34**2))+((2.*b44)+(4.*(b33*b44)))))));
aux291=(b14*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))))+(b13*(b23+((-2.*(b24*b34))+(2.*(b23*b44)))));
aux292=(4.*((b23**2)*b44))+((-2.*(b33*b44))+((-4.*(b22*(b33*b44)))+(aux290+(-8.*(b12*aux291)))));
aux293=(4.*((b13**2)*b44))+((-2.*(b22*b44))+((8.*((b13**2)*(b22*b44)))+aux292));
aux294=(-16.*(b13*(b14*(b22*b34))))+((-8.*(b23*(b24*b34)))+((4.*(b22*(b34**2)))+aux293));
aux295=(8.*((b14**2)*(b22*b33)))+((4.*((b24**2)*b33))+((-8.*(b13*(b14*b34)))+aux294));
aux296=(-8.*((b13**2)*(b24**2)))+((4.*((b14**2)*b33))+((-2.*(b22*b33))+aux295));
aux297=(4.*((b14**2)*b22))+((-8.*((b14**2)*(b23**2)))+((16.*(b13*(b14*(b23*b24))))+aux296));
aux298=(-4.*((b23**2)*(1.+(2.*b44))))+(b22*(2.+((-8.*(b34**2))+((4.*b44)+(b33*(4.+(8.*b44)))))));
aux299=(16.*(b23*(b24*b34)))+((-4.*(b34**2))+((2.*b44)+((4.*(b33*b44))+aux298)));
aux300=((4.*((b13**2)*b22))+aux297)-(b11*(1.+((-4.*(b24**2))+((2.*b33)+((-8.*((b24**2)*b33))+aux299)))));
aux301=(4.*(b23**2))+((4.*(b24**2))+((-2.*b33)+((4.*(b34**2))+((-2.*b44)+(2.*aux300)))));
aux302=(2.*((1.+((-4.*(b13**2))+((-4.*(b14**2))+aux283)))*(s3*aux289)))/(-1.+((4.*(b13**2))+((4.*(b14**2))+((-2.*b22)+aux301))));
aux303=((0.+2.j)*((((-2.*(b14*b24))+aux262)-b34)*s2))+(aux264+((-4.*(aux266*s4))+(aux271+aux302)));
aux304=(b14*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))))+(b13*(b23+((-2.*(b24*b34))+(2.*(b23*b44)))));
aux305=(-4.*((b23**2)*(1.+(2.*b44))))+(b22*(2.+((-8.*(b34**2))+((4.*b44)+(b33*(4.+(8.*b44)))))));
aux306=(16.*(b23*(b24*b34)))+((-4.*(b34**2))+((2.*b44)+((4.*(b33*b44))+aux305)));
aux307=2.*(b11*(1.+((-4.*(b24**2))+((2.*b33)+((-8.*((b24**2)*b33))+aux306)))));
aux308=(-4.*((b12**2)*(1.+((-4.*(b34**2))+((2.*b44)+(b33*(2.+(4.*b44))))))))+((16.*(b12*aux304))+aux307);
aux309=(-16.*((b13**2)*(b22*b44)))+((-8.*((b23**2)*b44))+((4.*(b33*b44))+((8.*(b22*(b33*b44)))+aux308)));
aux310=(-8.*(b22*(b34**2)))+((2.*b44)+((-8.*((b13**2)*b44))+((4.*(b22*b44))+aux309)));
aux311=(32.*(b13*(b14*(b22*b34))))+((16.*(b23*(b24*b34)))+((-4.*(b34**2))+aux310));
aux312=(-16.*((b14**2)*(b22*b33)))+((-8.*((b24**2)*b33))+((16.*(b13*(b14*b34)))+aux311));
aux313=(16.*((b13**2)*(b24**2)))+((2.*b33)+((-8.*((b14**2)*b33))+((4.*(b22*b33))+aux312)));
aux314=(16.*((b14**2)*(b23**2)))+((-32.*(b13*(b14*(b23*b24))))+((-4.*(b24**2))+aux313));
aux315=(2.*b22)+((-8.*((b13**2)*b22))+((-8.*((b14**2)*b22))+((-4.*(b23**2))+aux314)));
aux316=(s3*(((0.+2.j)*((aux256-b33)*s1))+((4.*(aux258*s1))+aux303)))/(1.+((-4.*(b13**2))+((-4.*(b14**2))+aux315)));
aux317=(2.*b33)+(((0.+-8.j)*(b24*b33))+((b22*(2.+(4.*b33)))+((0.+8.j)*(b23*b34))));
aux318=((0.+-2.j)*(b14*b34))+(((0.+-2.j)*(b23*b34))+((-4.*(b34**2))+((2.*b44)+(4.*(b33*b44)))));
aux319=b24+((2.*(b24*b33))+((2.*(b13*b44))+((0.+-1.j)*(1.+((2.*b33)+aux318)))));
aux320=(4.*(b11*(b23*b44)))+(((0.+-8.j)*(b13*(b23*b44)))+(-2.*(b12*(b13+aux319))));
aux321=(b14*(1.+((-4.*(b23**2))+(((0.+-4.j)*b24)+((4.*(b13*b24))+aux317)))))+((2.*(b23*b44))+aux320);
aux322=(-2.*(b24*b34))+((-4.*(b11*(b24*b34)))+(((0.+8.j)*(b13*(b24*b34)))+aux321));
aux323=(-4.*((b14**2)*b23))+((4.*(b13*(b23*b24)))+((-2.*(b13*b34))+((-4.*(b13*(b22*b34)))+aux322)));
aux324=(0.+4.j)*(b12*(b23+(((0.+-2.j)*(b14*b24))+((-2.*(b24*b34))+(2.*(b23*b44))))));
aux325=(-2.*((b12**2)*(1.+(2.*b44))))+(aux324+(b11*(1.+((-4.*(b24**2))+((2.*b44)+(b22*(2.+(4.*b44))))))));
aux326=((0.+-8.j)*(b13*(b22*b44)))+((4.*((b23**2)*b44))+((-2.*(b33*b44))+((-4.*(b22*(b33*b44)))+aux325)));
aux327=(-8.*(b23*(b24*b34)))+((2.*(b34**2))+((4.*(b22*(b34**2)))+(((0.+-4.j)*(b13*b44))+aux326)));
aux328=(4.*((b24**2)*b33))+(((0.+4.j)*(b14*b34))+(((0.+8.j)*(b14*(b22*b34)))+aux327));
aux329=((0.+-8.j)*(b14*(b23*b24)))+(((0.+8.j)*(b13*(b24**2)))+((-2.*(b22*b33))+aux328));
aux330=(-2.*(b14**2))+(((0.+-4.j)*(b13*b22))+((-4.*((b14**2)*b22))+((2.*(b23**2))+aux329)));
aux331=((0.+2.j)*b33)+((2.*(b24*b33))+(((0.+2.j)*(b22*(1.+(2.*b33))))+(-2.*(b23*b34))));
aux332=b14*(((0.+1.j)+(((0.+-4.j)*(b23**2))+(b24+aux331)))-(b13*(1.+(2.*b22))));
aux333=(-2.*b33)+(((0.+8.j)*(b23*b34))+((4.*(b34**2))+((-2.*b44)+(-4.*(b33*b44)))));
aux334=-1.+((4.*(b14*b23))+((4.*(b24*((0.+-1.j)+(b13+((0.+-2.j)*b33)))))+aux333));
aux335=(-4.*(b13*(b24*b34)))+((2.*aux332)+((4.*(b13*(b23*b44)))+(b12*aux334)));
aux336=(2.*(b22*b34))+((4.*(b11*(b22*b34)))+(((0.+-8.j)*(b13*(b22*b34)))+aux335));
aux337=b34+((2.*(b11*b34))+((-4.*((b12**2)*b34))+(((0.+-4.j)*(b13*b34))+aux336)));
aux338=(-2.*(b23*b24))+((-4.*(b11*(b23*b24)))+(((0.+8.j)*(b13*(b23*b24)))+aux337));
aux339=(b14*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))))+(b13*(b23+((-2.*(b24*b34))+(2.*(b23*b44)))));
aux340=(-4.*((b23**2)*(1.+(2.*b44))))+(b22*(2.+((-8.*(b34**2))+((4.*b44)+(b33*(4.+(8.*b44)))))));
aux341=(16.*(b23*(b24*b34)))+((-4.*(b34**2))+((2.*b44)+((4.*(b33*b44))+aux340)));
aux342=2.*(b11*(1.+((-4.*(b24**2))+((2.*b33)+((-8.*((b24**2)*b33))+aux341)))));
aux343=(-4.*((b12**2)*(1.+((-4.*(b34**2))+((2.*b44)+(b33*(2.+(4.*b44))))))))+((16.*(b12*aux339))+aux342);
aux344=(-16.*((b13**2)*(b22*b44)))+((-8.*((b23**2)*b44))+((4.*(b33*b44))+((8.*(b22*(b33*b44)))+aux343)));
aux345=(-8.*(b22*(b34**2)))+((2.*b44)+((-8.*((b13**2)*b44))+((4.*(b22*b44))+aux344)));
aux346=(32.*(b13*(b14*(b22*b34))))+((16.*(b23*(b24*b34)))+((-4.*(b34**2))+aux345));
aux347=(-16.*((b14**2)*(b22*b33)))+((-8.*((b24**2)*b33))+((16.*(b13*(b14*b34)))+aux346));
aux348=(16.*((b13**2)*(b24**2)))+((2.*b33)+((-8.*((b14**2)*b33))+((4.*(b22*b33))+aux347)));
aux349=(16.*((b14**2)*(b23**2)))+((-32.*(b13*(b14*(b23*b24))))+((-4.*(b24**2))+aux348));
aux350=(2.*b22)+((-8.*((b13**2)*b22))+((-8.*((b14**2)*b22))+((-4.*(b23**2))+aux349)));
aux351=(0.+-1.j)*(b13*(1.+((2.*b22)+((-4.*(b24**2))+((2.*b44)+(4.*(b22*b44)))))));
aux352=(2.*b33)+(((0.+4.j)*(b14*b34))+((-4.*(b34**2))+((2.*b44)+(4.*(b33*b44)))));
aux353=((0.+2.j)*(b12*(b23+((-2.*(b24*b34))+(2.*(b23*b44))))))+(b22*(1.+aux352));
aux354=np.conjugate((((0.+-4.j)*(b14*(b23*b24)))+(((0.+2.j)*(b14*b34))+(aux351+aux353))));
aux355=(-4.*((b24**2)*b33))+((8.*(b23*(b24*b34)))+((-4.*((b23**2)*b44))+((2.*(b33*b44))+aux354)));
aux356=(-8.*(b23**2))+((-8.*(b24**2))+((4.*b33)+((-8.*(b34**2))+((4.*b44)+(4.*aux355)))));
aux357=2.*((b12**2)*(1.+((2.*b33)+((-4.*(b34**2))+((2.*b44)+(4.*(b33*b44)))))));
aux358=(b14*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))))+(b13*(b23+((-2.*(b24*b34))+(2.*(b23*b44)))));
aux359=(4.*((b23**2)*b44))+((-2.*(b33*b44))+((-4.*(b22*(b33*b44)))+(aux357+(-8.*(b12*aux358)))));
aux360=(4.*((b13**2)*b44))+((-2.*(b22*b44))+((8.*((b13**2)*(b22*b44)))+aux359));
aux361=(-16.*(b13*(b14*(b22*b34))))+((-8.*(b23*(b24*b34)))+((4.*(b22*(b34**2)))+aux360));
aux362=(8.*((b14**2)*(b22*b33)))+((4.*((b24**2)*b33))+((-8.*(b13*(b14*b34)))+aux361));
aux363=(-8.*((b13**2)*(b24**2)))+((4.*((b14**2)*b33))+((-2.*(b22*b33))+aux362));
aux364=(4.*((b14**2)*b22))+((-8.*((b14**2)*(b23**2)))+((16.*(b13*(b14*(b23*b24))))+aux363));
aux365=(-4.*((b23**2)*(1.+(2.*b44))))+(b22*(2.+((-8.*(b34**2))+((4.*b44)+(b33*(4.+(8.*b44)))))));
aux366=(16.*(b23*(b24*b34)))+((-4.*(b34**2))+((2.*b44)+((4.*(b33*b44))+aux365)));
aux367=((4.*((b13**2)*b22))+aux364)-(b11*(1.+((-4.*(b24**2))+((2.*b33)+((-8.*((b24**2)*b33))+aux366)))));
aux368=(4.*(b23**2))+((4.*(b24**2))+((-2.*b33)+((4.*(b34**2))+((-2.*b44)+(2.*aux367)))));
aux369=((1.+((-4.*(b13**2))+((-4.*(b14**2))+aux350)))*(s1*(2.+aux356)))/(-1.+((4.*(b13**2))+((4.*(b14**2))+((-2.*b22)+aux368))));
aux370=((0.+2.j)*(((((0.+-2.j)*b13)+aux330)-b33)*s3))+(((0.+-2.j)*(((2.*(b13*b23))+aux338)*s4))+aux369);
aux371=((0.+-2.j)*((b23+((2.*(b11*b23))+(((0.+-4.j)*(b13*b23))+aux323)))*s2))+aux370;
aux372=(b14*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))))+(b13*(b23+((-2.*(b24*b34))+(2.*(b23*b44)))));
aux373=(-4.*((b23**2)*(1.+(2.*b44))))+(b22*(2.+((-8.*(b34**2))+((4.*b44)+(b33*(4.+(8.*b44)))))));
aux374=(16.*(b23*(b24*b34)))+((-4.*(b34**2))+((2.*b44)+((4.*(b33*b44))+aux373)));
aux375=2.*(b11*(1.+((-4.*(b24**2))+((2.*b33)+((-8.*((b24**2)*b33))+aux374)))));
aux376=(-4.*((b12**2)*(1.+((-4.*(b34**2))+((2.*b44)+(b33*(2.+(4.*b44))))))))+((16.*(b12*aux372))+aux375);
aux377=(-16.*((b13**2)*(b22*b44)))+((-8.*((b23**2)*b44))+((4.*(b33*b44))+((8.*(b22*(b33*b44)))+aux376)));
aux378=(-8.*(b22*(b34**2)))+((2.*b44)+((-8.*((b13**2)*b44))+((4.*(b22*b44))+aux377)));
aux379=(32.*(b13*(b14*(b22*b34))))+((16.*(b23*(b24*b34)))+((-4.*(b34**2))+aux378));
aux380=(-16.*((b14**2)*(b22*b33)))+((-8.*((b24**2)*b33))+((16.*(b13*(b14*b34)))+aux379));
aux381=(16.*((b13**2)*(b24**2)))+((2.*b33)+((-8.*((b14**2)*b33))+((4.*(b22*b33))+aux380)));
aux382=(16.*((b14**2)*(b23**2)))+((-32.*(b13*(b14*(b23*b24))))+((-4.*(b24**2))+aux381));
aux383=(2.*b22)+((-8.*((b13**2)*b22))+((-8.*((b14**2)*b22))+((-4.*(b23**2))+aux382)));
aux384=(2.*b33)+(((0.+-8.j)*(b24*b33))+((b22*(2.+(4.*b33)))+((0.+8.j)*(b23*b34))));
aux385=((0.+-2.j)*(b14*b34))+(((0.+-2.j)*(b23*b34))+((-4.*(b34**2))+((2.*b44)+(4.*(b33*b44)))));
aux386=b24+((2.*(b24*b33))+((2.*(b13*b44))+((0.+-1.j)*(1.+((2.*b33)+aux385)))));
aux387=(4.*(b11*(b23*b44)))+(((0.+-8.j)*(b13*(b23*b44)))+(-2.*(b12*(b13+aux386))));
aux388=(b14*(1.+((-4.*(b23**2))+(((0.+-4.j)*b24)+((4.*(b13*b24))+aux384)))))+((2.*(b23*b44))+aux387);
aux389=(-2.*(b24*b34))+((-4.*(b11*(b24*b34)))+(((0.+8.j)*(b13*(b24*b34)))+aux388));
aux390=(-4.*((b14**2)*b23))+((4.*(b13*(b23*b24)))+((-2.*(b13*b34))+((-4.*(b13*(b22*b34)))+aux389)));
aux391=(2.*(b14*b22))+(((0.+-4.j)*(b14*b24))+((2.*(b24*b34))+(-2.*(b23*b44))));
aux392=(4.*(b13*((0.+-1.j)+(b24+((0.+-2.j)*b44)))))+((-2.*b44)+(-4.*(b33*b44)));
aux393=(4.*(b14*b23))+((-2.*b33)+(((0.+8.j)*(b14*b34))+((4.*(b34**2))+aux392)));
aux394=((0.+8.j)*(b11*(b23*b44)))+((-2.*(b13*((b14+aux391)-b23)))+(b12*(-1.+aux393)));
aux395=((0.+-4.j)*(b24*b34))+(((0.+-8.j)*(b11*(b24*b34)))+(((0.+4.j)*(b23*b44))+aux394));
aux396=(-4.*((b12**2)*b34))+((2.*(b22*b34))+((4.*(b11*(b22*b34)))+((-4.*(b14*(b23*b34)))+aux395)));
aux397=(-4.*(b11*(b23*b24)))+((4.*(b14*(b24*b33)))+(b34+((2.*(b11*b34))+aux396)));
aux398=((0.+4.j)*(b11*b23))+(((0.+-8.j)*((b14**2)*b23))+((2.*(b14*b24))+((-2.*(b23*b24))+aux397)));
aux399=(0.+4.j)*(b12*(b14+(((0.+-2.j)*(b13*b23))+((2.*(b14*b33))+(-2.*(b13*b34))))));
aux400=(-2.*(b11*b44))+((4.*((b13**2)*b44))+((-2.*(b33*b44))+(-4.*(b11*(b33*b44)))));
aux401=((0.+8.j)*(b11*(b23*b34)))+((2.*(b34**2))+((4.*(b11*(b34**2)))+(aux399+aux400)));
aux402=((b14**2)*(2.+(4.*b33)))+((b13*(b14*(((0.+-8.j)*b23)+(-8.*b34))))+(((0.+4.j)*(b23*b34))+aux401));
aux403=((0.+-4.j)*(b24*b33))+(((0.+-8.j)*(b11*(b24*b33)))+((-2.*((b12**2)*(1.+(2.*b33))))+aux402));
aux404=((0.+8.j)*((b13**2)*b24))+((2.*(b22*b33))+((4.*(b11*(b22*b33)))+aux403));
aux405=(-2.*(b23**2))+((-4.*(b11*(b23**2)))+(((0.+-2.j)*b24)+(((0.+-4.j)*(b11*b24))+aux404)));
aux406=(0.+2.j)*(((b22+((2.*(b11*b22))+((-4.*((b13**2)*b22))+aux405)))-b44)*s4);
aux407=(b14*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))))+(b13*(b23+((-2.*(b24*b34))+(2.*(b23*b44)))));
aux408=(-4.*((b23**2)*(1.+(2.*b44))))+(b22*(2.+((-8.*(b34**2))+((4.*b44)+(b33*(4.+(8.*b44)))))));
aux409=(16.*(b23*(b24*b34)))+((-4.*(b34**2))+((2.*b44)+((4.*(b33*b44))+aux408)));
aux410=2.*(b11*(1.+((-4.*(b24**2))+((2.*b33)+((-8.*((b24**2)*b33))+aux409)))));
aux411=(-4.*((b12**2)*(1.+((-4.*(b34**2))+((2.*b44)+(b33*(2.+(4.*b44))))))))+((16.*(b12*aux407))+aux410);
aux412=(-16.*((b13**2)*(b22*b44)))+((-8.*((b23**2)*b44))+((4.*(b33*b44))+((8.*(b22*(b33*b44)))+aux411)));
aux413=(-8.*(b22*(b34**2)))+((2.*b44)+((-8.*((b13**2)*b44))+((4.*(b22*b44))+aux412)));
aux414=(32.*(b13*(b14*(b22*b34))))+((16.*(b23*(b24*b34)))+((-4.*(b34**2))+aux413));
aux415=(-16.*((b14**2)*(b22*b33)))+((-8.*((b24**2)*b33))+((16.*(b13*(b14*b34)))+aux414));
aux416=(16.*((b13**2)*(b24**2)))+((2.*b33)+((-8.*((b14**2)*b33))+((4.*(b22*b33))+aux415)));
aux417=(16.*((b14**2)*(b23**2)))+((-32.*(b13*(b14*(b23*b24))))+((-4.*(b24**2))+aux416));
aux418=(2.*b22)+((-8.*((b13**2)*b22))+((-8.*((b14**2)*b22))+((-4.*(b23**2))+aux417)));
aux419=((0.+-4.j)*(b24*(1.+(2.*b33))))+(((0.+8.j)*(b23*b34))+((-8.*(b34**2))+((4.*b44)+(8.*(b33*b44)))));
aux420=((b13**2)*(-4.+(((0.+8.j)*b24)+(-8.*b44))))+(b11*(2.+((4.*b33)+aux419)));
aux421=((0.+4.j)*(b23*b34))+(((0.+-8.j)*(b13*((b14*b23)+((b12*b34)+((0.+2.j)*(b14*b34))))))+aux420);
aux422=((0.+4.j)*(b12*b14))+(((0.+8.j)*(b12*(b14*b33)))+(((0.+-4.j)*(b24*b33))+aux421));
aux423=(4.*b44)+(2.*((-8.*((b14**2)*b33))+((4.*(b33*b44))+(np.conjugate(aux422)))));
aux424=2.+((-8.*(b14**2))+(((0.+4.j)*b24)+((4.*b33)+((-8.*(b34**2))+aux423))));
aux425=2.*((b12**2)*(1.+((2.*b33)+((-4.*(b34**2))+((2.*b44)+(4.*(b33*b44)))))));
aux426=(b14*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))))+(b13*(b23+((-2.*(b24*b34))+(2.*(b23*b44)))));
aux427=(4.*((b23**2)*b44))+((-2.*(b33*b44))+((-4.*(b22*(b33*b44)))+(aux425+(-8.*(b12*aux426)))));
aux428=(4.*((b13**2)*b44))+((-2.*(b22*b44))+((8.*((b13**2)*(b22*b44)))+aux427));
aux429=(-16.*(b13*(b14*(b22*b34))))+((-8.*(b23*(b24*b34)))+((4.*(b22*(b34**2)))+aux428));
aux430=(8.*((b14**2)*(b22*b33)))+((4.*((b24**2)*b33))+((-8.*(b13*(b14*b34)))+aux429));
aux431=(-8.*((b13**2)*(b24**2)))+((4.*((b14**2)*b33))+((-2.*(b22*b33))+aux430));
aux432=(4.*((b14**2)*b22))+((-8.*((b14**2)*(b23**2)))+((16.*(b13*(b14*(b23*b24))))+aux431));
aux433=(-4.*((b23**2)*(1.+(2.*b44))))+(b22*(2.+((-8.*(b34**2))+((4.*b44)+(b33*(4.+(8.*b44)))))));
aux434=(16.*(b23*(b24*b34)))+((-4.*(b34**2))+((2.*b44)+((4.*(b33*b44))+aux433)));
aux435=((4.*((b13**2)*b22))+aux432)-(b11*(1.+((-4.*(b24**2))+((2.*b33)+((-8.*((b24**2)*b33))+aux434)))));
aux436=(4.*(b23**2))+((4.*(b24**2))+((-2.*b33)+((4.*(b34**2))+((-2.*b44)+(2.*aux435)))));
aux437=((1.+((-4.*(b13**2))+((-4.*(b14**2))+aux418)))*(s2*aux424))/(-1.+((4.*(b13**2))+((4.*(b14**2))+((-2.*b22)+aux436))));
aux438=((0.+-2.j)*((b23+((2.*(b11*b23))+(((0.+-4.j)*(b13*b23))+aux390)))*s1))+(((0.+-2.j)*((((0.+2.j)*b23)+aux398)*s3))+(aux406+aux437));
aux439=(b14*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))))+(b13*(b23+((-2.*(b24*b34))+(2.*(b23*b44)))));
aux440=(-4.*((b23**2)*(1.+(2.*b44))))+(b22*(2.+((-8.*(b34**2))+((4.*b44)+(b33*(4.+(8.*b44)))))));
aux441=(16.*(b23*(b24*b34)))+((-4.*(b34**2))+((2.*b44)+((4.*(b33*b44))+aux440)));
aux442=2.*(b11*(1.+((-4.*(b24**2))+((2.*b33)+((-8.*((b24**2)*b33))+aux441)))));
aux443=(-4.*((b12**2)*(1.+((-4.*(b34**2))+((2.*b44)+(b33*(2.+(4.*b44))))))))+((16.*(b12*aux439))+aux442);
aux444=(-16.*((b13**2)*(b22*b44)))+((-8.*((b23**2)*b44))+((4.*(b33*b44))+((8.*(b22*(b33*b44)))+aux443)));
aux445=(-8.*(b22*(b34**2)))+((2.*b44)+((-8.*((b13**2)*b44))+((4.*(b22*b44))+aux444)));
aux446=(32.*(b13*(b14*(b22*b34))))+((16.*(b23*(b24*b34)))+((-4.*(b34**2))+aux445));
aux447=(-16.*((b14**2)*(b22*b33)))+((-8.*((b24**2)*b33))+((16.*(b13*(b14*b34)))+aux446));
aux448=(16.*((b13**2)*(b24**2)))+((2.*b33)+((-8.*((b14**2)*b33))+((4.*(b22*b33))+aux447)));
aux449=(16.*((b14**2)*(b23**2)))+((-32.*(b13*(b14*(b23*b24))))+((-4.*(b24**2))+aux448));
aux450=(2.*b22)+((-8.*((b13**2)*b22))+((-8.*((b14**2)*b22))+((-4.*(b23**2))+aux449)));
aux451=((s1*aux371)/(1.+((-4.*(b13**2))+((-4.*(b14**2))+aux383))))+((s2*aux438)/(1.+((-4.*(b13**2))+((-4.*(b14**2))+aux450))));
aux452=(((0.+1.j)*aux176)/(1.+((-4.*(v13**2))+((-4.*(v14**2))+aux188))))+(aux252+(aux316+aux451));
aux453=aux46+((aux82/(-1.+((4.*(v13**2))+((4.*(v14**2))+aux94))))+(aux141+aux452));
output=0.25*aux453;
return output
def coeffscuadraticos34(V,B):
v11,v12,v13,v14=separate(V,0)
v21,v22,v23,v24=separate(V,1)
v31,v32,v33,v34=separate(V,2)
v41,v42,v43,v44=separate(V,3)
b11,b12,b13,b14=separate(B,0)
b21,b22,b23,b24=separate(B,1)
b31,b32,b33,b34=separate(B,2)
b41,b42,b43,b44=separate(B,3)
aux0=((0.+2.j)*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))))+(b13*((0.+2.j)+((-8.*b24)+((0.+4.j)*b44))));
aux1=((0.+-4.j)*(b13*(1.+((2.*b22)+((0.+-1.j)*b24)))))+((-2.*b33)+(-2.*(b22*(1.+(2.*b33)))));
aux2=((0.+2.j)*b22)+((2.*(b13*b22))+(b24+(2.*(b11*((0.+1.j)+(((0.+2.j)*b22)+b24))))));
aux3=(4.*((b14**2)*b23))+((b14*(-1.+((4.*(b23**2))+aux1)))+(2.*(((0.+1.j)+(b13+aux2))*b34)));
aux4=(4.*(((0.+1.j)+b13)*b24))+((2.*b44)+(b11*(2.+(((0.+8.j)*b24)+(4.*b44)))));
aux5=(b12*((-4.*(b14*((2.*b23)+((0.+1.j)*b34))))+aux0))+((0.+1.j)*(aux3-(b23*(1.+aux4))));
aux6=(b14*(b24+((2.*(b24*b33))+(-2.*(b23*b34)))))+(b13*(b23+((-2.*(b24*b34))+(2.*(b23*b44)))));
aux7=(-4.*((b23**2)*(1.+(2.*b44))))+(b22*(2.+((-8.*(b34**2))+((4.*b44)+(b33*(4.+(8.*b44)))))));
aux8=(16.*(b23*(b24*b34)))+((-4.*(b34**2))+((2.*b44)+((4.*(b33*b44))+aux7)));
aux9=(16.*(b12*aux6))+(2.*(b11*(1.+((-4.*(b24**2))+((2.*b33)+((-8.*((b24**2)*b33))+aux8))))));
aux10=(-4.*((b12**2)*(1.+((-4.*(b34**2))+((2.*b44)+(b33*(2.+(4.*b44))))))))+aux9;
aux11=(-16.*((b13**2)*(b22*b44)))+((-8.*((b23**2)*b44))+((4.*(b33*b44))+((8.*(b22*(b33*b44)))+aux10)));
aux12=(-8.*(b22*(b34**2)))+((2.*b44)+((-8.*((b13**2)*b44))+((4.*(b22*b44))+aux11)));
aux13=(32.*(b13*(b14*(b22*b34))))+((16.*(b23*(b24*b34)))+((-4.*(b34**2))+aux12));
aux14=(-16.*((b14**2)*(b22*b33)))+((-8.*((b24**2)*b33))+((16.*(b13*(b14*b34)))+aux13));
aux15=(16.*((b13**2)*(b24**2)))+((2.*b33)+((-8.*((b14**2)*b33))+((4.*(b22*b33))+aux14)));
aux16=(16.*((b14**2)*(b23**2)))+((-32.*(b13*(b14*(b23*b24))))+((-4.*(b24**2))+aux15));
aux17=(2.*b22)+((-8.*((b13**2)*b22))+((-8.*((b14**2)*b22))+((-4.*(b23**2))+aux16)));
aux18=(-4.*((8.*((b12**2)*b34))+aux5))/(1.+((-4.*(b13**2))+((-4.*(b14**2))+aux17)));
aux19=(-8.*(v11*(v24*v34)))+((-8.*(v12*(v13*v44)))+((4.*(v23*v44))+(8.*(v11*(v23*v44)))));
aux20=((0.+16.j)*(v11*(v22*v34)))+((-8.*(v13*(v22*v34)))+((8.*(v12*(v23*v34)))+((-4.*(v24*v34))+aux19)));
aux21=((0.+-16.j)*((v12**2)*v34))+((-4.*(v13*v34))+((8.*(v12*(v14*v34)))+(((0.+8.j)*(v22*v34))+aux20)));
aux22=(8.*(v14*(v22*v33)))+((-8.*(v12*(v24*v33)))+(((0.+4.j)*v34)+(((0.+8.j)*(v11*v34))+aux21)));
aux23=((0.+-16.j)*(v11*(v23*v24)))+((8.*(v13*(v23*v24)))+((4.*(v14*v33))+aux22));
aux24=((0.+16.j)*(v12*(v13*v24)))+((8.*(v13*(v14*v24)))+(((0.+-8.j)*(v23*v24))+aux23));
aux25=((0.+16.j)*(v12*(v14*v23)))+((-8.*((v14**2)*v23))+((-8.*(v14*(v23**2)))+((-4.*(v12*v24))+aux24)));
aux26=(4.*(v14*v22))+(((0.+-16.j)*(v13*(v14*v22)))+((2.*v23)+((4.*(v11*v23))+aux25)));
aux27=(v14*(v24+((2.*(v24*v33))+(-2.*(v23*v34)))))+(v13*(v23+((-2.*(v24*v34))+(2.*(v23*v44)))));
aux28=(-4.*((v23**2)*(1.+(2.*v44))))+(v22*(2.+((-8.*(v34**2))+((4.*v44)+(v33*(4.+(8.*v44)))))));
aux29=(16.*(v23*(v24*v34)))+((-4.*(v34**2))+((2.*v44)+((4.*(v33*v44))+aux28)));
aux30=-2.*(v11*(1.+((-4.*(v24**2))+((2.*v33)+((-8.*((v24**2)*v33))+aux29)))));
aux31=(4.*((v12**2)*(1.+((-4.*(v34**2))+((2.*v44)+(v33*(2.+(4.*v44))))))))+((-16.*(v12*aux27))+aux30);
aux32=(16.*((v13**2)*(v22*v44)))+((8.*((v23**2)*v44))+((-4.*(v33*v44))+((-8.*(v22*(v33*v44)))+aux31)));
aux33=(8.*(v22*(v34**2)))+((-2.*v44)+((8.*((v13**2)*v44))+((-4.*(v22*v44))+aux32)));
aux34=(-32.*(v13*(v14*(v22*v34))))+((-16.*(v23*(v24*v34)))+((4.*(v34**2))+aux33));
aux35=(16.*((v14**2)*(v22*v33)))+((8.*((v24**2)*v33))+((-16.*(v13*(v14*v34)))+aux34));
aux36=(-16.*((v13**2)*(v24**2)))+((-2.*v33)+((8.*((v14**2)*v33))+((-4.*(v22*v33))+aux35)));
aux37=(-16.*((v14**2)*(v23**2)))+((32.*(v13*(v14*(v23*v24))))+((4.*(v24**2))+aux36));
aux38=(-2.*v22)+((8.*((v13**2)*v22))+((8.*((v14**2)*v22))+((4.*(v23**2))+aux37)));
aux39=((0.+2.j)*((-4.*(v12*v13))+((2.*v14)+(((0.+-8.j)*(v13*v14))+aux26))))/(-1.+((4.*(v13**2))+((4.*(v14**2))+aux38)));
output=0.25*(aux18+aux39);
return output
def a1(V,B,R,S):
c1=lineal1(V,B,R,S)
c2=lineal2(V,B,R,S)
c3=lineal3(V,B,R,S)
c4=lineal4(V,B,R,S)
c11=coeffscuadraticos11(V,B)
c12=coeffscuadraticos12(V,B)
c13=coeffscuadraticos13(V,B)
c14=coeffscuadraticos14(V,B)
c22=coeffscuadraticos22(V,B)
c23=coeffscuadraticos23(V,B)
c24=coeffscuadraticos24(V,B)
c33=coeffscuadraticos33(V,B)
c34=coeffscuadraticos34(V,B)
c44=coeffscuadraticos44(V,B)
aux0=((2.*(c13*(c3*c44)))/((c34**2)+(-4.*(c33*c44))))+((-4.*(c1*(c33*\
c44)))/((c34**2)+(-4.*(c33*c44))));
aux1=((c1*(c34**2))/((c34**2)+(-4.*(c33*c44))))+(((2.*(c14*(c33*c4)))/\
((c34**2)+(-4.*(c33*c44))))+aux0);
output=(aux1-((c13*(c34*c4))/((c34**2)+(-4.*(c33*c44)))))-((c14*(c3*\
c34))/((c34**2)+(-4.*(c33*c44))));
return output
def a2(V,B,R,S):
c1=lineal1(V,B,R,S)
c2=lineal2(V,B,R,S)
c3=lineal3(V,B,R,S)
c4=lineal4(V,B,R,S)
c11=coeffscuadraticos11(V,B)
c12=coeffscuadraticos12(V,B)
c13=coeffscuadraticos13(V,B)
c14=coeffscuadraticos14(V,B)
c22=coeffscuadraticos22(V,B)
c23=coeffscuadraticos23(V,B)
c24=coeffscuadraticos24(V,B)
c33=coeffscuadraticos33(V,B)
c34=coeffscuadraticos34(V,B)
c44=coeffscuadraticos44(V,B)
aux0=((2.*(c23*(c3*c44)))/((c34**2)+(-4.*(c33*c44))))+((-4.*(c2*(c33*\
c44)))/((c34**2)+(-4.*(c33*c44))));
aux1=((c2*(c34**2))/((c34**2)+(-4.*(c33*c44))))+(((2.*(c24*(c33*c4)))/\
((c34**2)+(-4.*(c33*c44))))+aux0);
output=(aux1-((c23*(c34*c4))/((c34**2)+(-4.*(c33*c44)))))-((c24*(c3*\
c34))/((c34**2)+(-4.*(c33*c44))));
return output
def a12(V,B,R,S):
c1=lineal1(V,B,R,S)
c2=lineal2(V,B,R,S)
c3=lineal3(V,B,R,S)
c4=lineal4(V,B,R,S)
c11=coeffscuadraticos11(V,B)
c12=coeffscuadraticos12(V,B)
c13=coeffscuadraticos13(V,B)
c14=coeffscuadraticos14(V,B)
c22=coeffscuadraticos22(V,B)
c23=coeffscuadraticos23(V,B)
c24=coeffscuadraticos24(V,B)
c33=coeffscuadraticos33(V,B)
c34=coeffscuadraticos34(V,B)
c44=coeffscuadraticos44(V,B)
aux0=((2.*(c13*(c23*c44)))/((c34**2)+(-4.*(c33*c44))))+((c33*((2.*(\
c14*c24))+(-4.*(c12*c44))))/((c34**2)+(-4.*(c33*c44))));
aux1=(((c12*(c34**2))/((c34**2)+(-4.*(c33*c44))))+aux0)-((c13*(c24*\
c34))/((c34**2)+(-4.*(c33*c44))));
output=aux1-((c14*(c23*c34))/((c34**2)+(-4.*(c33*c44))));
return output
def a11(V,B,R,S):
c1=lineal1(V,B,R,S)
c2=lineal2(V,B,R,S)
c3=lineal3(V,B,R,S)
c4=lineal4(V,B,R,S)
c11=coeffscuadraticos11(V,B)
c12=coeffscuadraticos12(V,B)
c13=coeffscuadraticos13(V,B)
c14=coeffscuadraticos14(V,B)
c22=coeffscuadraticos22(V,B)
c23=coeffscuadraticos23(V,B)
c24=coeffscuadraticos24(V,B)
c33=coeffscuadraticos33(V,B)
c34=coeffscuadraticos34(V,B)
c44=coeffscuadraticos44(V,B)
aux0=(((c13**2)*c44)/((c34**2)+(-4.*(c33*c44))))+((-4.*(c11*(c33*c44))\
)/((c34**2)+(-4.*(c33*c44))));
aux1=(((c14**2)*c33)/((c34**2)+(-4.*(c33*c44))))+(((c11*(c34**2))/((\
c34**2)+(-4.*(c33*c44))))+aux0);
output=aux1-((c13*(c14*c34))/((c34**2)+(-4.*(c33*c44))));
return output
def a22(V,B,R,S):
c1=lineal1(V,B,R,S)
c2=lineal2(V,B,R,S)
c3=lineal3(V,B,R,S)
c4=lineal4(V,B,R,S)
c11=coeffscuadraticos11(V,B)
c12=coeffscuadraticos12(V,B)
c13=coeffscuadraticos13(V,B)
c14=coeffscuadraticos14(V,B)
c22=coeffscuadraticos22(V,B)
c23=coeffscuadraticos23(V,B)
c24=coeffscuadraticos24(V,B)
c33=coeffscuadraticos33(V,B)
c34=coeffscuadraticos34(V,B)
c44=coeffscuadraticos44(V,B)
aux0=(((c23**2)*c44)/((c34**2)+(-4.*(c33*c44))))+((-4.*(c22*(c33*c44))\
)/((c34**2)+(-4.*(c33*c44))));
aux1=(((c24**2)*c33)/((c34**2)+(-4.*(c33*c44))))+(((c22*(c34**2))/((\
c34**2)+(-4.*(c33*c44))))+aux0);
output=aux1-((c23*(c24*c34))/((c34**2)+(-4.*(c33*c44))));
return output
def independiente_transformado(c3,c4,c34,c33,c44):
return (((c33*(c4**2))+((c3**2)*c44))-(c3*(c34*c4)))/((c34**2)+(-4.*(c33*c44)));
def integral_aux(a1,a2,a12,a11,a22,c33,c34,c44,c3,c4,V,B,R,S):
aux0=(((a11*(a2**2))+((a1**2)*a22))-(a1*(a12*a2)))/((a12**2)+(-4.*(a11*a22)));
aux1=(((-4.*c33)+((c34**2)/c44))**-0.5)*(((-c44)**-0.5)*((np.exp(aux0))*(np.pi**2)));
aux2=a22*(((2.*(a1*a22))-(a12*a2))*((((a12**2)+(-4.*(a11*a22)))**-2.)*aux1));
output=8.*((np.sqrt(((-4.*a11)+((a12**2)/a22))))*(((-a22)**-0.5)*aux2));
independientes=np.exp(independiente_transformado(c3,c4,c34,c33,c44))*np.exp(independiente(V,B,R,S))
det1=(np.linalg.det(np.array(V)+(1/2)*np.eye(4)))**(1/4)
det2=(np.linalg.det(np.array(B)+(1/2)*np.eye(4)))**(1/4)
cons= 1/(2*np.pi)*1/(2*np.pi)
return (independientes*output*cons)/(det1*det2*np.sqrt(2))
def fidelidad_aux(a1,a2,a12,a11,a22,c33,c34,c44,c3,c4,V,B,R,S):
aux0 = (((a11 * (a2 ** 2)) + ((a1 ** 2) * a22)) - (a1 * (a12 * a2))) / ((a12 ** 2) + (-4. * (a11 * a22)));
aux1 = (((-4. * c33) + ((c34 ** 2) / c44)) ** -0.5) * (((-c44) ** -0.5) * ((np.exp(aux0)) * (np.pi ** 2)));
output = 4. * ((((-4. * a11) + ((a12 ** 2) / a22)) ** -0.5) * (((-a22) ** -0.5) * aux1));
independientes = np.exp(independiente_transformado(c3, c4, c34, c33, c44)) * np.exp(independiente(V, B, R, S))
det1 = (np.linalg.det(np.array(V) + (1 / 2) * np.eye(4))) ** (1 / 4)
det2 = (np.linalg.det(np.array(B) + (1 / 2) * np.eye(4))) ** (1 / 4)
cons= 1/(4*np.pi**2)
fid=(independientes*output*cons)/(det1*det2)
return fid*np.conjugate(fid)
def overlap_aux(a1,a2,a12,a11,a22,c33,c34,c44,c3,c4,V,B,R,S):
aux0 = (((a11 * (a2 ** 2)) + ((a1 ** 2) * a22)) - (a1 * (a12 * a2))) / ((a12 ** 2) + (-4. * (a11 * a22)));
aux1 = (((-4. * c33) + ((c34 ** 2) / c44)) ** -0.5) * (((-c44) ** -0.5) * ((np.exp(aux0)) * (np.pi ** 2)));
output = 4. * ((((-4. * a11) + ((a12 ** 2) / a22)) ** -0.5) * (((-a22) ** -0.5) * aux1));
independientes = np.exp(independiente_transformado(c3, c4, c34, c33, c44)) * np.exp(independiente(V, B, R, S))
det1 = (np.linalg.det(np.array(V) + (1 / 2) * np.eye(4))) ** (1 / 4)
det2 = (np.linalg.det(np.array(B) + (1 / 2) * np.eye(4))) ** (1 / 4)
cons= 1/(4*np.pi**2)
fid=(independientes*output*cons)/(det1*det2)
return fid
def condiciones(V,B,R,S):
if np.real(coeffscuadraticos44(V,B)) < 0:
if np.real(coeffscuadraticos33(V,B)- (coeffscuadraticos34(V,B)**2)/(4*coeffscuadraticos44(V,B)))<=0:
if (np.real(a22(V,B,R,S))<0):
if np.real(-4*a11(V,B,R,S)+(a12(V,B,R,S)**2 /a22(V,B,R,S)))>0:
return 1
else:
print(display(Markdown('Integral in $\\alpha_{4}$ is divergent, integrand does not fulfill $Re(C_{44})<0$')))
#print(R,V,S,B)
raise NameError("Divergencia en la integral 1")
else:
#print(R,V,S,B)
raise NameError(display(Markdown('Integral in $\\alpha_{4}$ is divergent, integrand does not fulfill $Re(C_{44})<0$')))
else:
#print(R,V,S,B)
raise NameError(display(Markdown('Integral in $\\alpha_{4}$ is divergent, integrand does not fulfill $Re(C_{44})<0$')))
else:
print(display(Markdown('Integral in $\\alpha_{4}$ is divergent, integrand does not fulfill $Re(C_{44})<0$')))
#print(R,V,S,B)
raise NameError("Divergencia en la integral 1")
'''def integral(V,B,R,S):
condiciones(V,B,R,S)
a=a1(V,B,R,S)
b=a2(V,B,R,S)
c=a12(V,B,R,S)
d=a11(V,B,R,S)
e=a22(V,B,R,S)
f=coeffscuadraticos33(V,B)
g=coeffscuadraticos34(V,B)
h=coeffscuadraticos44(V,B)
i=lineal3(V,B,R,S)
j=lineal4(V,B,R,S)
return integral_aux(a,b,c,d,e,f,g,h,i,j,V,B,R,S)'''
def integral(vector1,vector2):
V=[[vector1[5,0],vector1[6,0],vector1[7,0],vector1[8,0]],[vector1[6,0],vector1[9,0],vector1[10,0],vector1[11,0]],[vector1[7,0],vector1[10,0],vector1[12,0],vector1[13,0]],[vector1[8,0],vector1[11,0],vector1[13,0],vector1[14,0]]]
R=[vector1[i,0] for i in range(1,5)]
B=[[vector2[5,0],vector2[6,0],vector2[7,0],vector2[8,0]],[vector2[6,0],vector2[9,0],vector2[10,0],vector2[11,0]],[vector2[7,0],vector2[10,0],vector2[12,0],vector2[13,0]],[vector2[8,0],vector2[11,0],vector2[13,0],vector2[14,0]]]
S=[vector2[i,0] for i in range(1,5)]
#condiciones(V,B,R,S)
a=a1(V,B,R,S)
b=a2(V,B,R,S)
c=a12(V,B,R,S)
d=a11(V,B,R,S)
e=a22(V,B,R,S)
f=coeffscuadraticos33(V,B)
g=coeffscuadraticos34(V,B)
h=coeffscuadraticos44(V,B)
i=lineal3(V,B,R,S)
j=lineal4(V,B,R,S)
return integral_aux(a,b,c,d,e,f,g,h,i,j,V,B,R,S)
def fidelity(V,B,R,S):
condiciones(V,B,R,S)
a=a1(V,B,R,S)
b=a2(V,B,R,S)
c=a12(V,B,R,S)
d=a11(V,B,R,S)
e=a22(V,B,R,S)
f=coeffscuadraticos33(V,B)
g=coeffscuadraticos34(V,B)
h=coeffscuadraticos44(V,B)
i=lineal3(V,B,R,S)
j=lineal4(V,B,R,S)
return fidelidad_aux(a,b,c,d,e,f,g,h,i,j,V,B,R,S)
def overlap2(vector1,vector2):
V=[[vector1[5,0],vector1[6,0],vector1[7,0],vector1[8,0]],[vector1[6,0],vector1[9,0],vector1[10,0],vector1[11,0]],[vector1[7,0],vector1[10,0],vector1[12,0],vector1[13,0]],[vector1[8,0],vector1[11,0],vector1[13,0],vector1[14,0]]]
R=[vector1[i,0] for i in range(1,5)]
B=[[vector2[5,0],vector2[6,0],vector2[7,0],vector2[8,0]],[vector2[6,0],vector2[9,0],vector2[10,0],vector2[11,0]],[vector2[7,0],vector2[10,0],vector2[12,0],vector2[13,0]],[vector2[8,0],vector2[11,0],vector2[13,0],vector2[14,0]]]
S=[vector2[i,0] for i in range(1,5)]
#condiciones(V,B,R,S)
a=a1(V,B,R,S)
b=a2(V,B,R,S)
c=a12(V,B,R,S)
d=a11(V,B,R,S)
e=a22(V,B,R,S)
f=coeffscuadraticos33(V,B)
g=coeffscuadraticos34(V,B)
h=coeffscuadraticos44(V,B)
i=lineal3(V,B,R,S)
j=lineal4(V,B,R,S)
return np.round(overlap_aux(a,b,c,d,e,f,g,h,i,j,V,B,R,S),9)
def gaussiano_norm(z):
#return np.sqrt(overlap2(z,z))
return 1
def coherent_overlap(vector1,vector2):
R=[vector1[i,0] for i in range(1,5)]
S=[vector2[i,0] for i in range(1,5)]
a=1/2*(R[0]**2+R[2]**2)+1/2*(R[1]**2+R[3]**2)
b=1/2*(S[0]**2+S[2]**2)+1/2*(S[1]**2+S[3]**2)
c=1/2*(R[0]+1j*R[2])*(S[0]-1j*S[2])+1/2*(R[1]+1j*R[3])*(S[1]-1j*S[3])
return np.exp(-1/2*(a+b)+c)
def coherent_update(vector1,vector2):
R=[vector1[i,0] for i in range(1,5)]
S=[vector2[i,0] for i in range(1,5)]
return (1/np.sqrt(2)*(R[0]+1j*R[2])+1/np.sqrt(2)*(S[0]-1j*S[2]))*coherent_overlap(vector1,vector2)
def overlap_density(vector1,vector2):
V = [[vector1[5, 0], vector1[6, 0], vector1[7, 0], vector1[8, 0]],
[vector1[6, 0], vector1[9, 0], vector1[10, 0], vector1[11, 0]],
[vector1[7, 0], vector1[10, 0], vector1[12, 0], vector1[13, 0]],
[vector1[8, 0], vector1[11, 0], vector1[13, 0], vector1[14, 0]]]
R = [vector1[i, 0] for i in range(1, 5)]
B = [[vector2[5, 0], vector2[6, 0], vector2[7, 0], vector2[8, 0]],
[vector2[6, 0], vector2[9, 0], vector2[10, 0], vector2[11, 0]],
[vector2[7, 0], vector2[10, 0], vector2[12, 0], vector2[13, 0]],
[vector2[8, 0], vector2[11, 0], vector2[13, 0], vector2[14, 0]]]
S = [vector2[i, 0] for i in range(1, 5)]
v11, v12, v13, v14 = separate(V, 0)
v21, v22, v23, v24 = separate(V, 1)
v31, v32, v33, v34 = separate(V, 2)
v41, v42, v43, v44 = separate(V, 3)
w11, w12, w13, w14 = separate(B, 0)
w21, w22, w23, w24 = separate(B, 1)
w31, w32, w33, w34 = separate(B, 2)
w41, w42, w43, w44 = separate(B, 3)
r1, r2, r3, r4 = R[0], R[1], R[2], R[3]
s1, s2, s3, s4 = S[0], S[1], S[2], S[3]
aux0 = ((v24 + w24) * ((-2. * (v23 * (v13 + w13))) + ((v12 + w12) * (v33 + w33)))) - (
(((v12 + w12) * (v23 + w23)) - ((v13 + w13) * (v22 + w22))) * (v34 + w34));
aux1 = (r4 - s4) * (aux0 - ((v14 + w14) * ((-2. * (v23 * (v23 + w23))) + ((v22 + w22) * (v33 + w33)))));
aux2 = ((v13 + w13) * ((-2. * (v23 * (v14 + w14))) + ((v13 + w13) * (v24 + w24)))) + (
((2. * (v23 * (v11 + w11))) - ((v12 + w12) * (v13 + w13))) * (v34 + w34));
aux3 = (v24 + w24) * (aux2 - ((((v11 + w11) * (v24 + w24)) - ((v12 + w12) * (v14 + w14))) * (v33 + w33)));
aux4 = ((v13 + w13) * ((2. * (v23 * (v12 + w12))) - ((v13 + w13) * (v22 + w22)))) + (
(((v11 + w11) * (v22 + w22)) - (((v12 + w12) ** 2))) * (v33 + w33));
aux5 = (aux4 - (((2. * (v23 * (v11 + w11))) - ((v12 + w12) * (v13 + w13))) * (v23 + w23))) * (v44 + w44);
aux6 = ((v23 + w23) * ((-2. * (v23 * (v14 + w14))) + ((v13 + w13) * (v24 + w24)))) + (
((2. * (v23 * (v12 + w12))) - ((v13 + w13) * (v22 + w22))) * (v34 + w34));
aux7 = (v14 + w14) * (aux6 - ((((v12 + w12) * (v24 + w24)) - ((v14 + w14) * (v22 + w22))) * (v33 + w33)));
aux8 = ((v13 + w13) * (((v12 + w12) * (v24 + w24)) - ((v14 + w14) * (v22 + w22)))) + (
(((v11 + w11) * (v22 + w22)) - (((v12 + w12) ** 2))) * (v34 + w34));
aux9 = (v34 + w34) * (aux8 - ((v23 + w23) * (((v11 + w11) * (v24 + w24)) - ((v12 + w12) * (v14 + w14)))));
aux10 = ((v14 + w14) * (((v22 + w22) * (v34 + w34)) - ((v23 + w23) * (v24 + w24)))) + (
(((v12 + w12) * (v23 + w23)) - ((v13 + w13) * (v22 + w22))) * (v44 + w44));
aux11 = (r3 - s3) * (aux10 - ((v24 + w24) * (((v12 + w12) * (v34 + w34)) - ((v13 + w13) * (v24 + w24)))));
aux12 = ((v13 + w13) * ((-2. * (v23 * (v14 + w14))) + ((v13 + w13) * (v24 + w24)))) + (
((2. * (v23 * (v11 + w11))) - ((v12 + w12) * (v13 + w13))) * (v34 + w34));
aux13 = (v24 + w24) * (aux12 - ((((v11 + w11) * (v24 + w24)) - ((v12 + w12) * (v14 + w14))) * (v33 + w33)));
aux14 = ((v13 + w13) * ((2. * (v23 * (v12 + w12))) - ((v13 + w13) * (v22 + w22)))) + (
(((v11 + w11) * (v22 + w22)) - (((v12 + w12) ** 2))) * (v33 + w33));
aux15 = (aux14 - (((2. * (v23 * (v11 + w11))) - ((v12 + w12) * (v13 + w13))) * (v23 + w23))) * (v44 + w44);
aux16 = ((v23 + w23) * ((-2. * (v23 * (v14 + w14))) + ((v13 + w13) * (v24 + w24)))) + (
((2. * (v23 * (v12 + w12))) - ((v13 + w13) * (v22 + w22))) * (v34 + w34));
aux17 = (v14 + w14) * (aux16 - ((((v12 + w12) * (v24 + w24)) - ((v14 + w14) * (v22 + w22))) * (v33 + w33)));
aux18 = ((v13 + w13) * (((v12 + w12) * (v24 + w24)) - ((v14 + w14) * (v22 + w22)))) + (
(((v11 + w11) * (v22 + w22)) - (((v12 + w12) ** 2))) * (v34 + w34));
aux19 = (v34 + w34) * (aux18 - ((v23 + w23) * (((v11 + w11) * (v24 + w24)) - ((v12 + w12) * (v14 + w14)))));
aux20 = ((v34 + w34) * (((v12 + w12) * (v34 + w34)) - ((v13 + w13) * (v24 + w24)))) - (
((-2. * (v23 * (v13 + w13))) + ((v12 + w12) * (v33 + w33))) * (v44 + w44));
aux21 = (r2 - s2) * (aux20 - ((v14 + w14) * ((2. * (v23 * (v34 + w34))) - ((v24 + w24) * (v33 + w33)))));
aux22 = ((v13 + w13) * ((-2. * (v23 * (v14 + w14))) + ((v13 + w13) * (v24 + w24)))) + (
((2. * (v23 * (v11 + w11))) - ((v12 + w12) * (v13 + w13))) * (v34 + w34));
aux23 = (v24 + w24) * (aux22 - ((((v11 + w11) * (v24 + w24)) - ((v12 + w12) * (v14 + w14))) * (v33 + w33)));
aux24 = ((v13 + w13) * ((2. * (v23 * (v12 + w12))) - ((v13 + w13) * (v22 + w22)))) + (
(((v11 + w11) * (v22 + w22)) - (((v12 + w12) ** 2))) * (v33 + w33));
aux25 = (aux24 - (((2. * (v23 * (v11 + w11))) - ((v12 + w12) * (v13 + w13))) * (v23 + w23))) * (v44 + w44);
aux26 = ((v23 + w23) * ((-2. * (v23 * (v14 + w14))) + ((v13 + w13) * (v24 + w24)))) + (
((2. * (v23 * (v12 + w12))) - ((v13 + w13) * (v22 + w22))) * (v34 + w34));
aux27 = (v14 + w14) * (aux26 - ((((v12 + w12) * (v24 + w24)) - ((v14 + w14) * (v22 + w22))) * (v33 + w33)));
aux28 = ((v13 + w13) * (((v12 + w12) * (v24 + w24)) - ((v14 + w14) * (v22 + w22)))) + (
(((v11 + w11) * (v22 + w22)) - (((v12 + w12) ** 2))) * (v34 + w34));
aux29 = (v34 + w34) * (aux28 - ((v23 + w23) * (((v11 + w11) * (v24 + w24)) - ((v12 + w12) * (v14 + w14)))));
aux30 = ((v24 + w24) * ((2. * (v23 * (v34 + w34))) - ((v24 + w24) * (v33 + w33)))) + (
((-2. * (v23 * (v23 + w23))) + ((v22 + w22) * (v33 + w33))) * (v44 + w44));
aux31 = (r1 - s1) * (aux30 - ((v34 + w34) * (((v22 + w22) * (v34 + w34)) - ((v23 + w23) * (v24 + w24)))));
aux32 = ((v13 + w13) * ((-2. * (v23 * (v14 + w14))) + ((v13 + w13) * (v24 + w24)))) + (
((2. * (v23 * (v11 + w11))) - ((v12 + w12) * (v13 + w13))) * (v34 + w34));
aux33 = (v24 + w24) * (aux32 - ((((v11 + w11) * (v24 + w24)) - ((v12 + w12) * (v14 + w14))) * (v33 + w33)));
aux34 = ((v13 + w13) * ((2. * (v23 * (v12 + w12))) - ((v13 + w13) * (v22 + w22)))) + (
(((v11 + w11) * (v22 + w22)) - (((v12 + w12) ** 2))) * (v33 + w33));
aux35 = (aux34 - (((2. * (v23 * (v11 + w11))) - ((v12 + w12) * (v13 + w13))) * (v23 + w23))) * (v44 + w44);
aux36 = ((v23 + w23) * ((-2. * (v23 * (v14 + w14))) + ((v13 + w13) * (v24 + w24)))) + (
((2. * (v23 * (v12 + w12))) - ((v13 + w13) * (v22 + w22))) * (v34 + w34));
aux37 = (v14 + w14) * (aux36 - ((((v12 + w12) * (v24 + w24)) - ((v14 + w14) * (v22 + w22))) * (v33 + w33)));
aux38 = ((v13 + w13) * (((v12 + w12) * (v24 + w24)) - ((v14 + w14) * (v22 + w22)))) + (
(((v11 + w11) * (v22 + w22)) - (((v12 + w12) ** 2))) * (v34 + w34));
aux39 = (v34 + w34) * (aux38 - ((v23 + w23) * (((v11 + w11) * (v24 + w24)) - ((v12 + w12) * (v14 + w14)))));
aux40 = (aux21 / (((aux23 + aux25) - aux27) - aux29)) + (aux31 / (((aux33 + aux35) - aux37) - aux39));
aux41 = (aux1 / (((aux3 + aux5) - aux7) - aux9)) + ((aux11 / (((aux13 + aux15) - aux17) - aux19)) + aux40);
aux42 = ((v14 + w14) * (((v12 + w12) * (v33 + w33)) - ((v13 + w13) * (v23 + w23)))) + (
(((v11 + w11) * (v23 + w23)) - ((v12 + w12) * (v13 + w13))) * (v34 + w34));
aux43 = ((v13 + w13) * ((-2. * (v23 * (v14 + w14))) + ((v13 + w13) * (v24 + w24)))) + (
((2. * (v23 * (v11 + w11))) - ((v12 + w12) * (v13 + w13))) * (v34 + w34));
aux44 = (v24 + w24) * (aux43 - ((((v11 + w11) * (v24 + w24)) - ((v12 + w12) * (v14 + w14))) * (v33 + w33)));
aux45 = ((v13 + w13) * ((2. * (v23 * (v12 + w12))) - ((v13 + w13) * (v22 + w22)))) + (
(((v11 + w11) * (v22 + w22)) - (((v12 + w12) ** 2))) * (v33 + w33));
aux46 = (aux45 - (((2. * (v23 * (v11 + w11))) - ((v12 + w12) * (v13 + w13))) * (v23 + w23))) * (v44 + w44);
aux47 = ((v23 + w23) * ((-2. * (v23 * (v14 + w14))) + ((v13 + w13) * (v24 + w24)))) + (
((2. * (v23 * (v12 + w12))) - ((v13 + w13) * (v22 + w22))) * (v34 + w34));
aux48 = (v14 + w14) * (aux47 - ((((v12 + w12) * (v24 + w24)) - ((v14 + w14) * (v22 + w22))) * (v33 + w33)));
aux49 = ((v13 + w13) * (((v12 + w12) * (v24 + w24)) - ((v14 + w14) * (v22 + w22)))) + (
(((v11 + w11) * (v22 + w22)) - (((v12 + w12) ** 2))) * (v34 + w34));
aux50 = (v34 + w34) * (aux49 - ((v23 + w23) * (((v11 + w11) * (v24 + w24)) - ((v12 + w12) * (v14 + w14)))));
aux51 = ((r4 - s4) * (aux42 - ((v24 + w24) * (((v11 + w11) * (v33 + w33)) - (((v13 + w13) ** 2)))))) / (
((aux44 + aux46) - aux48) - aux50);
aux52 = ((v24 + w24) * (((v11 + w11) * (v34 + w34)) - ((v13 + w13) * (v14 + w14)))) - (
(((v11 + w11) * (v23 + w23)) - ((v12 + w12) * (v13 + w13))) * (v44 + w44));
aux53 = (r3 - s3) * (aux52 - ((v14 + w14) * (((v12 + w12) * (v34 + w34)) - ((v14 + w14) * (v23 + w23)))));
aux54 = ((v13 + w13) * ((-2. * (v23 * (v14 + w14))) + ((v13 + w13) * (v24 + w24)))) + (
((2. * (v23 * (v11 + w11))) - ((v12 + w12) * (v13 + w13))) * (v34 + w34));
aux55 = (v24 + w24) * (aux54 - ((((v11 + w11) * (v24 + w24)) - ((v12 + w12) * (v14 + w14))) * (v33 + w33)));
aux56 = ((v13 + w13) * ((2. * (v23 * (v12 + w12))) - ((v13 + w13) * (v22 + w22)))) + (
(((v11 + w11) * (v22 + w22)) - (((v12 + w12) ** 2))) * (v33 + w33));
aux57 = (aux56 - (((2. * (v23 * (v11 + w11))) - ((v12 + w12) * (v13 + w13))) * (v23 + w23))) * (v44 + w44);
aux58 = ((v23 + w23) * ((-2. * (v23 * (v14 + w14))) + ((v13 + w13) * (v24 + w24)))) + (
((2. * (v23 * (v12 + w12))) - ((v13 + w13) * (v22 + w22))) * (v34 + w34));
aux59 = (v14 + w14) * (aux58 - ((((v12 + w12) * (v24 + w24)) - ((v14 + w14) * (v22 + w22))) * (v33 + w33)));
aux60 = ((v13 + w13) * (((v12 + w12) * (v24 + w24)) - ((v14 + w14) * (v22 + w22)))) + (
(((v11 + w11) * (v22 + w22)) - (((v12 + w12) ** 2))) * (v34 + w34));
aux61 = (v34 + w34) * (aux60 - ((v23 + w23) * (((v11 + w11) * (v24 + w24)) - ((v12 + w12) * (v14 + w14)))));
aux62 = ((v14 + w14) * (((v13 + w13) * (v34 + w34)) - ((v14 + w14) * (v33 + w33)))) + (
(((v11 + w11) * (v33 + w33)) - (((v13 + w13) ** 2))) * (v44 + w44));
aux63 = (r2 - s2) * (aux62 - ((v34 + w34) * (((v11 + w11) * (v34 + w34)) - ((v13 + w13) * (v14 + w14)))));
aux64 = ((v13 + w13) * ((-2. * (v23 * (v14 + w14))) + ((v13 + w13) * (v24 + w24)))) + (
((2. * (v23 * (v11 + w11))) - ((v12 + w12) * (v13 + w13))) * (v34 + w34));
aux65 = (v24 + w24) * (aux64 - ((((v11 + w11) * (v24 + w24)) - ((v12 + w12) * (v14 + w14))) * (v33 + w33)));
aux66 = ((v13 + w13) * ((2. * (v23 * (v12 + w12))) - ((v13 + w13) * (v22 + w22)))) + (
(((v11 + w11) * (v22 + w22)) - (((v12 + w12) ** 2))) * (v33 + w33));
aux67 = (aux66 - (((2. * (v23 * (v11 + w11))) - ((v12 + w12) * (v13 + w13))) * (v23 + w23))) * (v44 + w44);
aux68 = ((v23 + w23) * ((-2. * (v23 * (v14 + w14))) + ((v13 + w13) * (v24 + w24)))) + (
((2. * (v23 * (v12 + w12))) - ((v13 + w13) * (v22 + w22))) * (v34 + w34));
aux69 = (v14 + w14) * (aux68 - ((((v12 + w12) * (v24 + w24)) - ((v14 + w14) * (v22 + w22))) * (v33 + w33)));
aux70 = ((v13 + w13) * (((v12 + w12) * (v24 + w24)) - ((v14 + w14) * (v22 + w22)))) + (
(((v11 + w11) * (v22 + w22)) - (((v12 + w12) ** 2))) * (v34 + w34));
aux71 = (v34 + w34) * (aux70 - ((v23 + w23) * (((v11 + w11) * (v24 + w24)) - ((v12 + w12) * (v14 + w14)))));
aux72 = ((v34 + w34) * (((v12 + w12) * (v34 + w34)) - ((v14 + w14) * (v23 + w23)))) - (
(((v12 + w12) * (v33 + w33)) - ((v13 + w13) * (v23 + w23))) * (v44 + w44));
aux73 = (r1 - s1) * (aux72 - ((v24 + w24) * (((v13 + w13) * (v34 + w34)) - ((v14 + w14) * (v33 + w33)))));
aux74 = ((v13 + w13) * ((-2. * (v23 * (v14 + w14))) + ((v13 + w13) * (v24 + w24)))) + (
((2. * (v23 * (v11 + w11))) - ((v12 + w12) * (v13 + w13))) * (v34 + w34));
aux75 = (v24 + w24) * (aux74 - ((((v11 + w11) * (v24 + w24)) - ((v12 + w12) * (v14 + w14))) * (v33 + w33)));
aux76 = ((v13 + w13) * ((2. * (v23 * (v12 + w12))) - ((v13 + w13) * (v22 + w22)))) + (
(((v11 + w11) * (v22 + w22)) - (((v12 + w12) ** 2))) * (v33 + w33));
aux77 = (aux76 - (((2. * (v23 * (v11 + w11))) - ((v12 + w12) * (v13 + w13))) * (v23 + w23))) * (v44 + w44);
aux78 = ((v23 + w23) * ((-2. * (v23 * (v14 + w14))) + ((v13 + w13) * (v24 + w24)))) + (
((2. * (v23 * (v12 + w12))) - ((v13 + w13) * (v22 + w22))) * (v34 + w34));
aux79 = (v14 + w14) * (aux78 - ((((v12 + w12) * (v24 + w24)) - ((v14 + w14) * (v22 + w22))) * (v33 + w33)));
aux80 = ((v13 + w13) * (((v12 + w12) * (v24 + w24)) - ((v14 + w14) * (v22 + w22)))) + (
(((v11 + w11) * (v22 + w22)) - (((v12 + w12) ** 2))) * (v34 + w34));
aux81 = (v34 + w34) * (aux80 - ((v23 + w23) * (((v11 + w11) * (v24 + w24)) - ((v12 + w12) * (v14 + w14)))));
aux82 = (aux63 / (((aux65 + aux67) - aux69) - aux71)) + (aux73 / (((aux75 + aux77) - aux79) - aux81));
aux83 = ((-(r1 - s1) * aux41)) - ((r2 - s2) * (aux51 + ((aux53 / (((aux55 + aux57) - aux59) - aux61)) + aux82)));
aux84 = (((2. * (v23 * (v11 + w11))) - ((v12 + w12) * (v13 + w13))) * (v24 + w24)) - (
(((v11 + w11) * (v22 + w22)) - (((v12 + w12) ** 2))) * (v34 + w34));
aux85 = (r4 - s4) * (aux84 - ((v14 + w14) * ((2. * (v23 * (v12 + w12))) - ((v13 + w13) * (v22 + w22)))));
aux86 = ((v13 + w13) * ((-2. * (v23 * (v14 + w14))) + ((v13 + w13) * (v24 + w24)))) + (
((2. * (v23 * (v11 + w11))) - ((v12 + w12) * (v13 + w13))) * (v34 + w34));
aux87 = (v24 + w24) * (aux86 - ((((v11 + w11) * (v24 + w24)) - ((v12 + w12) * (v14 + w14))) * (v33 + w33)));
aux88 = ((v13 + w13) * ((2. * (v23 * (v12 + w12))) - ((v13 + w13) * (v22 + w22)))) + (
(((v11 + w11) * (v22 + w22)) - (((v12 + w12) ** 2))) * (v33 + w33));
aux89 = (aux88 - (((2. * (v23 * (v11 + w11))) - ((v12 + w12) * (v13 + w13))) * (v23 + w23))) * (v44 + w44);
aux90 = ((v23 + w23) * ((-2. * (v23 * (v14 + w14))) + ((v13 + w13) * (v24 + w24)))) + (
((2. * (v23 * (v12 + w12))) - ((v13 + w13) * (v22 + w22))) * (v34 + w34));
aux91 = (v14 + w14) * (aux90 - ((((v12 + w12) * (v24 + w24)) - ((v14 + w14) * (v22 + w22))) * (v33 + w33)));
aux92 = ((v13 + w13) * (((v12 + w12) * (v24 + w24)) - ((v14 + w14) * (v22 + w22)))) + (
(((v11 + w11) * (v22 + w22)) - (((v12 + w12) ** 2))) * (v34 + w34));
aux93 = (v34 + w34) * (aux92 - ((v23 + w23) * (((v11 + w11) * (v24 + w24)) - ((v12 + w12) * (v14 + w14)))));
aux94 = ((((v11 + w11) * (v24 + w24)) - ((v12 + w12) * (v14 + w14))) * (v34 + w34)) - (
((2. * (v23 * (v11 + w11))) - ((v12 + w12) * (v13 + w13))) * (v44 + w44));
aux95 = (r2 - s2) * (aux94 - ((v14 + w14) * ((-2. * (v23 * (v14 + w14))) + ((v13 + w13) * (v24 + w24)))));
aux96 = ((v13 + w13) * ((-2. * (v23 * (v14 + w14))) + ((v13 + w13) * (v24 + w24)))) + (
((2. * (v23 * (v11 + w11))) - ((v12 + w12) * (v13 + w13))) * (v34 + w34));
aux97 = (v24 + w24) * (aux96 - ((((v11 + w11) * (v24 + w24)) - ((v12 + w12) * (v14 + w14))) * (v33 + w33)));
aux98 = ((v13 + w13) * ((2. * (v23 * (v12 + w12))) - ((v13 + w13) * (v22 + w22)))) + (
(((v11 + w11) * (v22 + w22)) - (((v12 + w12) ** 2))) * (v33 + w33));
aux99 = (aux98 - (((2. * (v23 * (v11 + w11))) - ((v12 + w12) * (v13 + w13))) * (v23 + w23))) * (v44 + w44);
aux100 = ((v23 + w23) * ((-2. * (v23 * (v14 + w14))) + ((v13 + w13) * (v24 + w24)))) + (
((2. * (v23 * (v12 + w12))) - ((v13 + w13) * (v22 + w22))) * (v34 + w34));
aux101 = (v14 + w14) * (aux100 - ((((v12 + w12) * (v24 + w24)) - ((v14 + w14) * (v22 + w22))) * (v33 + w33)));
aux102 = ((v13 + w13) * (((v12 + w12) * (v24 + w24)) - ((v14 + w14) * (v22 + w22)))) + (
(((v11 + w11) * (v22 + w22)) - (((v12 + w12) ** 2))) * (v34 + w34));
aux103 = (v34 + w34) * (aux102 - ((v23 + w23) * (((v11 + w11) * (v24 + w24)) - ((v12 + w12) * (v14 + w14)))));
aux104 = ((v14 + w14) * (((v12 + w12) * (v24 + w24)) - ((v14 + w14) * (v22 + w22)))) + (
(((v11 + w11) * (v22 + w22)) - (((v12 + w12) ** 2))) * (v44 + w44));
aux105 = (r3 - s3) * (aux104 - ((v24 + w24) * (((v11 + w11) * (v24 + w24)) - ((v12 + w12) * (v14 + w14)))));
aux106 = ((v13 + w13) * ((-2. * (v23 * (v14 + w14))) + ((v13 + w13) * (v24 + w24)))) + (
((2. * (v23 * (v11 + w11))) - ((v12 + w12) * (v13 + w13))) * (v34 + w34));
aux107 = (v24 + w24) * (aux106 - ((((v11 + w11) * (v24 + w24)) - ((v12 + w12) * (v14 + w14))) * (v33 + w33)));
aux108 = ((v13 + w13) * ((2. * (v23 * (v12 + w12))) - ((v13 + w13) * (v22 + w22)))) + (
(((v11 + w11) * (v22 + w22)) - (((v12 + w12) ** 2))) * (v33 + w33));
aux109 = (aux108 - (((2. * (v23 * (v11 + w11))) - ((v12 + w12) * (v13 + w13))) * (v23 + w23))) * (v44 + w44);
aux110 = ((v23 + w23) * ((-2. * (v23 * (v14 + w14))) + ((v13 + w13) * (v24 + w24)))) + (
((2. * (v23 * (v12 + w12))) - ((v13 + w13) * (v22 + w22))) * (v34 + w34));
aux111 = (v14 + w14) * (aux110 - ((((v12 + w12) * (v24 + w24)) - ((v14 + w14) * (v22 + w22))) * (v33 + w33)));
aux112 = ((v13 + w13) * (((v12 + w12) * (v24 + w24)) - ((v14 + w14) * (v22 + w22)))) + (
(((v11 + w11) * (v22 + w22)) - (((v12 + w12) ** 2))) * (v34 + w34));
aux113 = (v34 + w34) * (aux112 - ((v23 + w23) * (((v11 + w11) * (v24 + w24)) - ((v12 + w12) * (v14 + w14)))));
aux114 = ((v24 + w24) * ((-2. * (v23 * (v14 + w14))) + ((v13 + w13) * (v24 + w24)))) + (
((2. * (v23 * (v12 + w12))) - ((v13 + w13) * (v22 + w22))) * (v44 + w44));
aux115 = (r1 - s1) * (aux114 - ((((v12 + w12) * (v24 + w24)) - ((v14 + w14) * (v22 + w22))) * (v34 + w34)));
aux116 = ((v13 + w13) * ((-2. * (v23 * (v14 + w14))) + ((v13 + w13) * (v24 + w24)))) + (
((2. * (v23 * (v11 + w11))) - ((v12 + w12) * (v13 + w13))) * (v34 + w34));
aux117 = (v24 + w24) * (aux116 - ((((v11 + w11) * (v24 + w24)) - ((v12 + w12) * (v14 + w14))) * (v33 + w33)));
aux118 = ((v13 + w13) * ((2. * (v23 * (v12 + w12))) - ((v13 + w13) * (v22 + w22)))) + (
(((v11 + w11) * (v22 + w22)) - (((v12 + w12) ** 2))) * (v33 + w33));
aux119 = (aux118 - (((2. * (v23 * (v11 + w11))) - ((v12 + w12) * (v13 + w13))) * (v23 + w23))) * (v44 + w44);
aux120 = ((v23 + w23) * ((-2. * (v23 * (v14 + w14))) + ((v13 + w13) * (v24 + w24)))) + (
((2. * (v23 * (v12 + w12))) - ((v13 + w13) * (v22 + w22))) * (v34 + w34));
aux121 = (v14 + w14) * (aux120 - ((((v12 + w12) * (v24 + w24)) - ((v14 + w14) * (v22 + w22))) * (v33 + w33)));
aux122 = ((v13 + w13) * (((v12 + w12) * (v24 + w24)) - ((v14 + w14) * (v22 + w22)))) + (
(((v11 + w11) * (v22 + w22)) - (((v12 + w12) ** 2))) * (v34 + w34));
aux123 = (v34 + w34) * (aux122 - ((v23 + w23) * (((v11 + w11) * (v24 + w24)) - ((v12 + w12) * (v14 + w14)))));
aux124 = (aux105 / (((aux107 + aux109) - aux111) - aux113)) + (aux115 / (((aux117 + aux119) - aux121) - aux123));
aux125 = (aux85 / (((aux87 + aux89) - aux91) - aux93)) + ((aux95 / (((aux97 + aux99) - aux101) - aux103)) + aux124);
aux126 = ((v13 + w13) * ((2. * (v23 * (v12 + w12))) - ((v13 + w13) * (v22 + w22)))) + (
(((v11 + w11) * (v22 + w22)) - (((v12 + w12) ** 2))) * (v33 + w33));
aux127 = (r4 - s4) * (aux126 - (((2. * (v23 * (v11 + w11))) - ((v12 + w12) * (v13 + w13))) * (v23 + w23)));
aux128 = ((v13 + w13) * ((-2. * (v23 * (v14 + w14))) + ((v13 + w13) * (v24 + w24)))) + (
((2. * (v23 * (v11 + w11))) - ((v12 + w12) * (v13 + w13))) * (v34 + w34));
aux129 = (v24 + w24) * (aux128 - ((((v11 + w11) * (v24 + w24)) - ((v12 + w12) * (v14 + w14))) * (v33 + w33)));
aux130 = ((v13 + w13) * ((2. * (v23 * (v12 + w12))) - ((v13 + w13) * (v22 + w22)))) + (
(((v11 + w11) * (v22 + w22)) - (((v12 + w12) ** 2))) * (v33 + w33));
aux131 = (aux130 - (((2. * (v23 * (v11 + w11))) - ((v12 + w12) * (v13 + w13))) * (v23 + w23))) * (v44 + w44);
aux132 = ((v23 + w23) * ((-2. * (v23 * (v14 + w14))) + ((v13 + w13) * (v24 + w24)))) + (
((2. * (v23 * (v12 + w12))) - ((v13 + w13) * (v22 + w22))) * (v34 + w34));
aux133 = (v14 + w14) * (aux132 - ((((v12 + w12) * (v24 + w24)) - ((v14 + w14) * (v22 + w22))) * (v33 + w33)));
aux134 = ((v13 + w13) * (((v12 + w12) * (v24 + w24)) - ((v14 + w14) * (v22 + w22)))) + (
(((v11 + w11) * (v22 + w22)) - (((v12 + w12) ** 2))) * (v34 + w34));
aux135 = (v34 + w34) * (aux134 - ((v23 + w23) * (((v11 + w11) * (v24 + w24)) - ((v12 + w12) * (v14 + w14)))));
aux136 = ((v13 + w13) * ((-2. * (v23 * (v14 + w14))) + ((v13 + w13) * (v24 + w24)))) + (
((2. * (v23 * (v11 + w11))) - ((v12 + w12) * (v13 + w13))) * (v34 + w34));
aux137 = (r2 - s2) * (aux136 - ((((v11 + w11) * (v24 + w24)) - ((v12 + w12) * (v14 + w14))) * (v33 + w33)));
aux138 = ((v13 + w13) * ((-2. * (v23 * (v14 + w14))) + ((v13 + w13) * (v24 + w24)))) + (
((2. * (v23 * (v11 + w11))) - ((v12 + w12) * (v13 + w13))) * (v34 + w34));
aux139 = (v24 + w24) * (aux138 - ((((v11 + w11) * (v24 + w24)) - ((v12 + w12) * (v14 + w14))) * (v33 + w33)));
aux140 = ((v13 + w13) * ((2. * (v23 * (v12 + w12))) - ((v13 + w13) * (v22 + w22)))) + (
(((v11 + w11) * (v22 + w22)) - (((v12 + w12) ** 2))) * (v33 + w33));
aux141 = (aux140 - (((2. * (v23 * (v11 + w11))) - ((v12 + w12) * (v13 + w13))) * (v23 + w23))) * (v44 + w44);
aux142 = ((v23 + w23) * ((-2. * (v23 * (v14 + w14))) + ((v13 + w13) * (v24 + w24)))) + (
((2. * (v23 * (v12 + w12))) - ((v13 + w13) * (v22 + w22))) * (v34 + w34));
aux143 = (v14 + w14) * (aux142 - ((((v12 + w12) * (v24 + w24)) - ((v14 + w14) * (v22 + w22))) * (v33 + w33)));
aux144 = ((v13 + w13) * (((v12 + w12) * (v24 + w24)) - ((v14 + w14) * (v22 + w22)))) + (
(((v11 + w11) * (v22 + w22)) - (((v12 + w12) ** 2))) * (v34 + w34));
aux145 = (v34 + w34) * (aux144 - ((v23 + w23) * (((v11 + w11) * (v24 + w24)) - ((v12 + w12) * (v14 + w14)))));
aux146 = ((v23 + w23) * (((v11 + w11) * (v24 + w24)) - ((v12 + w12) * (v14 + w14)))) - (
(((v11 + w11) * (v22 + w22)) - (((v12 + w12) ** 2))) * (v34 + w34));
aux147 = (r3 - s3) * (aux146 - ((v13 + w13) * (((v12 + w12) * (v24 + w24)) - ((v14 + w14) * (v22 + w22)))));
aux148 = ((v13 + w13) * ((-2. * (v23 * (v14 + w14))) + ((v13 + w13) * (v24 + w24)))) + (
((2. * (v23 * (v11 + w11))) - ((v12 + w12) * (v13 + w13))) * (v34 + w34));
aux149 = (v24 + w24) * (aux148 - ((((v11 + w11) * (v24 + w24)) - ((v12 + w12) * (v14 + w14))) * (v33 + w33)));
aux150 = ((v13 + w13) * ((2. * (v23 * (v12 + w12))) - ((v13 + w13) * (v22 + w22)))) + (
(((v11 + w11) * (v22 + w22)) - (((v12 + w12) ** 2))) * (v33 + w33));
aux151 = (aux150 - (((2. * (v23 * (v11 + w11))) - ((v12 + w12) * (v13 + w13))) * (v23 + w23))) * (v44 + w44);
aux152 = ((v23 + w23) * ((-2. * (v23 * (v14 + w14))) + ((v13 + w13) * (v24 + w24)))) + (
((2. * (v23 * (v12 + w12))) - ((v13 + w13) * (v22 + w22))) * (v34 + w34));
aux153 = (v14 + w14) * (aux152 - ((((v12 + w12) * (v24 + w24)) - ((v14 + w14) * (v22 + w22))) * (v33 + w33)));
aux154 = ((v13 + w13) * (((v12 + w12) * (v24 + w24)) - ((v14 + w14) * (v22 + w22)))) + (
(((v11 + w11) * (v22 + w22)) - (((v12 + w12) ** 2))) * (v34 + w34));
aux155 = (v34 + w34) * (aux154 - ((v23 + w23) * (((v11 + w11) * (v24 + w24)) - ((v12 + w12) * (v14 + w14)))));
aux156 = ((((v12 + w12) * (v24 + w24)) - ((v14 + w14) * (v22 + w22))) * (v33 + w33)) - (
((2. * (v23 * (v12 + w12))) - ((v13 + w13) * (v22 + w22))) * (v34 + w34));
aux157 = (r1 - s1) * (aux156 - ((v23 + w23) * ((-2. * (v23 * (v14 + w14))) + ((v13 + w13) * (v24 + w24)))));
aux158 = ((v13 + w13) * ((-2. * (v23 * (v14 + w14))) + ((v13 + w13) * (v24 + w24)))) + (
((2. * (v23 * (v11 + w11))) - ((v12 + w12) * (v13 + w13))) * (v34 + w34));
aux159 = (v24 + w24) * (aux158 - ((((v11 + w11) * (v24 + w24)) - ((v12 + w12) * (v14 + w14))) * (v33 + w33)));
aux160 = ((v13 + w13) * ((2. * (v23 * (v12 + w12))) - ((v13 + w13) * (v22 + w22)))) + (
(((v11 + w11) * (v22 + w22)) - (((v12 + w12) ** 2))) * (v33 + w33));
aux161 = (aux160 - (((2. * (v23 * (v11 + w11))) - ((v12 + w12) * (v13 + w13))) * (v23 + w23))) * (v44 + w44);
aux162 = ((v23 + w23) * ((-2. * (v23 * (v14 + w14))) + ((v13 + w13) * (v24 + w24)))) + (
((2. * (v23 * (v12 + w12))) - ((v13 + w13) * (v22 + w22))) * (v34 + w34));
aux163 = (v14 + w14) * (aux162 - ((((v12 + w12) * (v24 + w24)) - ((v14 + w14) * (v22 + w22))) * (v33 + w33)));
aux164 = ((v13 + w13) * (((v12 + w12) * (v24 + w24)) - ((v14 + w14) * (v22 + w22)))) + (
(((v11 + w11) * (v22 + w22)) - (((v12 + w12) ** 2))) * (v34 + w34));
aux165 = (v34 + w34) * (aux164 - ((v23 + w23) * (((v11 + w11) * (v24 + w24)) - ((v12 + w12) * (v14 + w14)))));
aux166 = (aux147 / (((aux149 + aux151) - aux153) - aux155)) + (aux157 / (((aux159 + aux161) - aux163) - aux165));
aux167 = (aux127 / (((aux129 + aux131) - aux133) - aux135)) + (
(aux137 / (((aux139 + aux141) - aux143) - aux145)) + aux166);
aux168 = ((v13 + w13) * ((-2. * (v23 * (v14 + w14))) + ((v13 + w13) * (v24 + w24)))) + (
((2. * (v23 * (v11 + w11))) - ((v12 + w12) * (v13 + w13))) * (v34 + w34));
aux169 = (v24 + w24) * (aux168 - ((((v11 + w11) * (v24 + w24)) - ((v12 + w12) * (v14 + w14))) * (v33 + w33)));
aux170 = ((v13 + w13) * ((2. * (v23 * (v12 + w12))) - ((v13 + w13) * (v22 + w22)))) + (
(((v11 + w11) * (v22 + w22)) - (((v12 + w12) ** 2))) * (v33 + w33));
aux171 = (aux170 - (((2. * (v23 * (v11 + w11))) - ((v12 + w12) * (v13 + w13))) * (v23 + w23))) * (v44 + w44);
aux172 = ((v23 + w23) * ((-2. * (v23 * (v14 + w14))) + ((v13 + w13) * (v24 + w24)))) + (
((2. * (v23 * (v12 + w12))) - ((v13 + w13) * (v22 + w22))) * (v34 + w34));
aux173 = (v14 + w14) * (aux172 - ((((v12 + w12) * (v24 + w24)) - ((v14 + w14) * (v22 + w22))) * (v33 + w33)));
aux174 = ((v13 + w13) * (((v12 + w12) * (v24 + w24)) - ((v14 + w14) * (v22 + w22)))) + (
(((v11 + w11) * (v22 + w22)) - (((v12 + w12) ** 2))) * (v34 + w34));
aux175 = (v34 + w34) * (aux174 - ((v23 + w23) * (((v11 + w11) * (v24 + w24)) - ((v12 + w12) * (v14 + w14)))));
aux176 = (np.exp(((aux83 - ((r3 - s3) * aux125)) - ((r4 - s4) * aux167)))) * (
(((aux169 + aux171) - aux173) - aux175) ** -0.5);
output = 4. * aux176;
return np.round(output,9)
| 86.648176
| 231
| 0.443981
| 50,011
| 292,091
| 2.59247
| 0.012917
| 0.015025
| 0.006895
| 0.009811
| 0.805441
| 0.782788
| 0.765665
| 0.750255
| 0.733317
| 0.717536
| 0
| 0.303287
| 0.080636
| 292,091
| 3,370
| 232
| 86.673887
| 0.17952
| 0.000428
| 0
| 0.375494
| 0
| 0.001216
| 0.001499
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.010033
| false
| 0
| 0.000608
| 0.000912
| 0.020675
| 0.000608
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
366055dbcf6408a58e9b261e54052482072fa576
| 6,185
|
py
|
Python
|
notes/migrations/0012_auto_20220126_1914.py
|
ianshulx/egiportal
|
3a147a4a61e58f2a6229e08a5a4c256d7b674b81
|
[
"MIT"
] | 1
|
2022-02-17T10:34:21.000Z
|
2022-02-17T10:34:21.000Z
|
notes/migrations/0012_auto_20220126_1914.py
|
ianshulx/egiportal
|
3a147a4a61e58f2a6229e08a5a4c256d7b674b81
|
[
"MIT"
] | null | null | null |
notes/migrations/0012_auto_20220126_1914.py
|
ianshulx/egiportal
|
3a147a4a61e58f2a6229e08a5a4c256d7b674b81
|
[
"MIT"
] | null | null | null |
# Generated by Django 3.1.14 on 2022-01-26 13:44
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('notes', '0011_mba_sem1_notes_mba_sem2_notes_mba_sem3_notes_mba_sem4_notes'),
]
operations = [
migrations.RenameField(
model_name='bca_sem1_notes',
old_name='Drive_link',
new_name='google_drive_link',
),
migrations.RenameField(
model_name='bca_sem2_notes',
old_name='Drive_link',
new_name='google_drive_link',
),
migrations.RenameField(
model_name='bca_sem3_notes',
old_name='Drive_link',
new_name='google_drive_link',
),
migrations.RenameField(
model_name='bca_sem4_notes',
old_name='Drive_link',
new_name='google_drive_link',
),
migrations.RenameField(
model_name='bca_sem5_notes',
old_name='Drive_link',
new_name='google_drive_link',
),
migrations.RenameField(
model_name='bca_sem6_notes',
old_name='Drive_link',
new_name='google_drive_link',
),
migrations.RenameField(
model_name='btech_ce_sem3_notes',
old_name='Drive_link',
new_name='google_drive_link',
),
migrations.RenameField(
model_name='btech_ce_sem4_notes',
old_name='Drive_link',
new_name='google_drive_link',
),
migrations.RenameField(
model_name='btech_ce_sem5_notes',
old_name='Drive_link',
new_name='google_drive_link',
),
migrations.RenameField(
model_name='btech_ce_sem6_notes',
old_name='Drive_link',
new_name='google_drive_link',
),
migrations.RenameField(
model_name='btech_ce_sem7_notes',
old_name='Drive_link',
new_name='google_drive_link',
),
migrations.RenameField(
model_name='btech_ce_sem8_notes',
old_name='Drive_link',
new_name='google_drive_link',
),
migrations.RenameField(
model_name='btech_cs_sem3_notes',
old_name='Drive_link',
new_name='google_drive_link',
),
migrations.RenameField(
model_name='btech_cs_sem4_notes',
old_name='Drive_link',
new_name='google_drive_link',
),
migrations.RenameField(
model_name='btech_cs_sem5_notes',
old_name='Drive_link',
new_name='google_drive_link',
),
migrations.RenameField(
model_name='btech_cs_sem6_notes',
old_name='Drive_link',
new_name='google_drive_link',
),
migrations.RenameField(
model_name='btech_cs_sem7_notes',
old_name='Drive_link',
new_name='google_drive_link',
),
migrations.RenameField(
model_name='btech_cs_sem8_notes',
old_name='Drive_link',
new_name='google_drive_link',
),
migrations.RenameField(
model_name='btech_ee_sem3_notes',
old_name='Drive_link',
new_name='google_drive_link',
),
migrations.RenameField(
model_name='btech_ee_sem4_notes',
old_name='Drive_link',
new_name='google_drive_link',
),
migrations.RenameField(
model_name='btech_ee_sem5_notes',
old_name='Drive_link',
new_name='google_drive_link',
),
migrations.RenameField(
model_name='btech_ee_sem6_notes',
old_name='Drive_link',
new_name='google_drive_link',
),
migrations.RenameField(
model_name='btech_ee_sem7_notes',
old_name='Drive_link',
new_name='google_drive_link',
),
migrations.RenameField(
model_name='btech_ee_sem8_notes',
old_name='Drive_link',
new_name='google_drive_link',
),
migrations.RenameField(
model_name='btech_me_sem3_notes',
old_name='Drive_link',
new_name='google_drive_link',
),
migrations.RenameField(
model_name='btech_me_sem4_notes',
old_name='Drive_link',
new_name='google_drive_link',
),
migrations.RenameField(
model_name='btech_me_sem5_notes',
old_name='Drive_link',
new_name='google_drive_link',
),
migrations.RenameField(
model_name='btech_me_sem6_notes',
old_name='Drive_link',
new_name='google_drive_link',
),
migrations.RenameField(
model_name='btech_me_sem7_notes',
old_name='Drive_link',
new_name='google_drive_link',
),
migrations.RenameField(
model_name='btech_me_sem8_notes',
old_name='Drive_link',
new_name='google_drive_link',
),
migrations.RenameField(
model_name='btech_sem1_notes',
old_name='Drive_link',
new_name='google_drive_link',
),
migrations.RenameField(
model_name='btech_sem2_notes',
old_name='Drive_link',
new_name='google_drive_link',
),
migrations.RenameField(
model_name='mba_sem1_notes',
old_name='Drive_link',
new_name='google_drive_link',
),
migrations.RenameField(
model_name='mba_sem2_notes',
old_name='Drive_link',
new_name='google_drive_link',
),
migrations.RenameField(
model_name='mba_sem3_notes',
old_name='Drive_link',
new_name='google_drive_link',
),
migrations.RenameField(
model_name='mba_sem4_notes',
old_name='Drive_link',
new_name='google_drive_link',
),
]
| 31.881443
| 86
| 0.56249
| 637
| 6,185
| 4.952904
| 0.070644
| 0.205388
| 0.296672
| 0.342314
| 0.944532
| 0.934073
| 0.934073
| 0.934073
| 0.934073
| 0.934073
| 0
| 0.014706
| 0.34034
| 6,185
| 193
| 87
| 32.046632
| 0.758578
| 0.007437
| 0
| 0.770053
| 1
| 0
| 0.271957
| 0.010429
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.005348
| 0
| 0.02139
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 11
|
3d3a3533c99f3d474b8c1864f1bc1ebdcc92a60f
| 64,974
|
py
|
Python
|
sdk/python/pulumi_google_native/appengine/v1beta/version.py
|
AaronFriel/pulumi-google-native
|
75d1cda425e33d4610348972cd70bddf35f1770d
|
[
"Apache-2.0"
] | 44
|
2021-04-18T23:00:48.000Z
|
2022-02-14T17:43:15.000Z
|
sdk/python/pulumi_google_native/appengine/v1beta/version.py
|
AaronFriel/pulumi-google-native
|
75d1cda425e33d4610348972cd70bddf35f1770d
|
[
"Apache-2.0"
] | 354
|
2021-04-16T16:48:39.000Z
|
2022-03-31T17:16:39.000Z
|
sdk/python/pulumi_google_native/appengine/v1beta/version.py
|
AaronFriel/pulumi-google-native
|
75d1cda425e33d4610348972cd70bddf35f1770d
|
[
"Apache-2.0"
] | 8
|
2021-04-24T17:46:51.000Z
|
2022-01-05T10:40:21.000Z
|
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
from . import outputs
from ._enums import *
from ._inputs import *
__all__ = ['VersionArgs', 'Version']
@pulumi.input_type
class VersionArgs:
def __init__(__self__, *,
app_id: pulumi.Input[str],
service_id: pulumi.Input[str],
api_config: Optional[pulumi.Input['ApiConfigHandlerArgs']] = None,
app_engine_apis: Optional[pulumi.Input[bool]] = None,
automatic_scaling: Optional[pulumi.Input['AutomaticScalingArgs']] = None,
basic_scaling: Optional[pulumi.Input['BasicScalingArgs']] = None,
beta_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
build_env_variables: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
default_expiration: Optional[pulumi.Input[str]] = None,
deployment: Optional[pulumi.Input['DeploymentArgs']] = None,
endpoints_api_service: Optional[pulumi.Input['EndpointsApiServiceArgs']] = None,
entrypoint: Optional[pulumi.Input['EntrypointArgs']] = None,
env: Optional[pulumi.Input[str]] = None,
env_variables: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
error_handlers: Optional[pulumi.Input[Sequence[pulumi.Input['ErrorHandlerArgs']]]] = None,
handlers: Optional[pulumi.Input[Sequence[pulumi.Input['UrlMapArgs']]]] = None,
health_check: Optional[pulumi.Input['HealthCheckArgs']] = None,
id: Optional[pulumi.Input[str]] = None,
inbound_services: Optional[pulumi.Input[Sequence[pulumi.Input['VersionInboundServicesItem']]]] = None,
instance_class: Optional[pulumi.Input[str]] = None,
libraries: Optional[pulumi.Input[Sequence[pulumi.Input['LibraryArgs']]]] = None,
liveness_check: Optional[pulumi.Input['LivenessCheckArgs']] = None,
manual_scaling: Optional[pulumi.Input['ManualScalingArgs']] = None,
network: Optional[pulumi.Input['NetworkArgs']] = None,
nobuild_files_regex: Optional[pulumi.Input[str]] = None,
readiness_check: Optional[pulumi.Input['ReadinessCheckArgs']] = None,
resources: Optional[pulumi.Input['ResourcesArgs']] = None,
runtime: Optional[pulumi.Input[str]] = None,
runtime_api_version: Optional[pulumi.Input[str]] = None,
runtime_channel: Optional[pulumi.Input[str]] = None,
runtime_main_executable_path: Optional[pulumi.Input[str]] = None,
service_account: Optional[pulumi.Input[str]] = None,
serving_status: Optional[pulumi.Input['VersionServingStatus']] = None,
threadsafe: Optional[pulumi.Input[bool]] = None,
vm: Optional[pulumi.Input[bool]] = None,
vpc_access_connector: Optional[pulumi.Input['VpcAccessConnectorArgs']] = None):
"""
The set of arguments for constructing a Version resource.
:param pulumi.Input['ApiConfigHandlerArgs'] api_config: Serving configuration for Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/).Only returned in GET requests if view=FULL is set.
:param pulumi.Input[bool] app_engine_apis: app_engine_apis allows second generation runtimes to access the App Engine APIs.
:param pulumi.Input['AutomaticScalingArgs'] automatic_scaling: Automatic scaling is based on request rate, response latencies, and other application metrics. Instances are dynamically created and destroyed as needed in order to handle traffic.
:param pulumi.Input['BasicScalingArgs'] basic_scaling: A service with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity.
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] beta_settings: Metadata settings that are supplied to this version to enable beta runtime features.
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] build_env_variables: Environment variables available to the build environment.Only returned in GET requests if view=FULL is set.
:param pulumi.Input[str] default_expiration: Duration that static files should be cached by web proxies and browsers. Only applicable if the corresponding StaticFilesHandler (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#StaticFilesHandler) does not specify its own expiration time.Only returned in GET requests if view=FULL is set.
:param pulumi.Input['DeploymentArgs'] deployment: Code and application artifacts that make up this version.Only returned in GET requests if view=FULL is set.
:param pulumi.Input['EndpointsApiServiceArgs'] endpoints_api_service: Cloud Endpoints configuration.If endpoints_api_service is set, the Cloud Endpoints Extensible Service Proxy will be provided to serve the API implemented by the app.
:param pulumi.Input['EntrypointArgs'] entrypoint: The entrypoint for the application.
:param pulumi.Input[str] env: App Engine execution environment for this version.Defaults to standard.
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] env_variables: Environment variables available to the application.Only returned in GET requests if view=FULL is set.
:param pulumi.Input[Sequence[pulumi.Input['ErrorHandlerArgs']]] error_handlers: Custom static error pages. Limited to 10KB per page.Only returned in GET requests if view=FULL is set.
:param pulumi.Input[Sequence[pulumi.Input['UrlMapArgs']]] handlers: An ordered list of URL-matching patterns that should be applied to incoming requests. The first matching URL handles the request and other request handlers are not attempted.Only returned in GET requests if view=FULL is set.
:param pulumi.Input['HealthCheckArgs'] health_check: Configures health checking for instances. Unhealthy instances are stopped and replaced with new instances. Only applicable in the App Engine flexible environment.Only returned in GET requests if view=FULL is set.
:param pulumi.Input[str] id: Relative name of the version within the service. Example: v1. Version names can contain only lowercase letters, numbers, or hyphens. Reserved names: "default", "latest", and any name with the prefix "ah-".
:param pulumi.Input[Sequence[pulumi.Input['VersionInboundServicesItem']]] inbound_services: Before an application can receive email or XMPP messages, the application must be configured to enable the service.
:param pulumi.Input[str] instance_class: Instance class that is used to run this version. Valid values are: AutomaticScaling: F1, F2, F4, F4_1G ManualScaling or BasicScaling: B1, B2, B4, B8, B4_1GDefaults to F1 for AutomaticScaling and B1 for ManualScaling or BasicScaling.
:param pulumi.Input[Sequence[pulumi.Input['LibraryArgs']]] libraries: Configuration for third-party Python runtime libraries that are required by the application.Only returned in GET requests if view=FULL is set.
:param pulumi.Input['LivenessCheckArgs'] liveness_check: Configures liveness health checking for instances. Unhealthy instances are stopped and replaced with new instancesOnly returned in GET requests if view=FULL is set.
:param pulumi.Input['ManualScalingArgs'] manual_scaling: A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time. Manually scaled versions are sometimes referred to as "backends".
:param pulumi.Input['NetworkArgs'] network: Extra network settings. Only applicable in the App Engine flexible environment.
:param pulumi.Input[str] nobuild_files_regex: Files that match this pattern will not be built into this version. Only applicable for Go runtimes.Only returned in GET requests if view=FULL is set.
:param pulumi.Input['ReadinessCheckArgs'] readiness_check: Configures readiness health checking for instances. Unhealthy instances are not put into the backend traffic rotation.Only returned in GET requests if view=FULL is set.
:param pulumi.Input['ResourcesArgs'] resources: Machine resources for this version. Only applicable in the App Engine flexible environment.
:param pulumi.Input[str] runtime: Desired runtime. Example: python27.
:param pulumi.Input[str] runtime_api_version: The version of the API in the given runtime environment. Please see the app.yaml reference for valid values at https://cloud.google.com/appengine/docs/standard//config/appref
:param pulumi.Input[str] runtime_channel: The channel of the runtime to use. Only available for some runtimes. Defaults to the default channel.
:param pulumi.Input[str] runtime_main_executable_path: The path or name of the app's main executable.
:param pulumi.Input[str] service_account: The identity that the deployed version will run as. Admin API will use the App Engine Appspot service account as default if this field is neither provided in app.yaml file nor through CLI flag.
:param pulumi.Input['VersionServingStatus'] serving_status: Current serving status of this version. Only the versions with a SERVING status create instances and can be billed.SERVING_STATUS_UNSPECIFIED is an invalid value. Defaults to SERVING.
:param pulumi.Input[bool] threadsafe: Whether multiple requests can be dispatched to this version at once.
:param pulumi.Input[bool] vm: Whether to deploy this version in a container on a virtual machine.
:param pulumi.Input['VpcAccessConnectorArgs'] vpc_access_connector: Enables VPC connectivity for standard apps.
"""
pulumi.set(__self__, "app_id", app_id)
pulumi.set(__self__, "service_id", service_id)
if api_config is not None:
pulumi.set(__self__, "api_config", api_config)
if app_engine_apis is not None:
pulumi.set(__self__, "app_engine_apis", app_engine_apis)
if automatic_scaling is not None:
pulumi.set(__self__, "automatic_scaling", automatic_scaling)
if basic_scaling is not None:
pulumi.set(__self__, "basic_scaling", basic_scaling)
if beta_settings is not None:
pulumi.set(__self__, "beta_settings", beta_settings)
if build_env_variables is not None:
pulumi.set(__self__, "build_env_variables", build_env_variables)
if default_expiration is not None:
pulumi.set(__self__, "default_expiration", default_expiration)
if deployment is not None:
pulumi.set(__self__, "deployment", deployment)
if endpoints_api_service is not None:
pulumi.set(__self__, "endpoints_api_service", endpoints_api_service)
if entrypoint is not None:
pulumi.set(__self__, "entrypoint", entrypoint)
if env is not None:
pulumi.set(__self__, "env", env)
if env_variables is not None:
pulumi.set(__self__, "env_variables", env_variables)
if error_handlers is not None:
pulumi.set(__self__, "error_handlers", error_handlers)
if handlers is not None:
pulumi.set(__self__, "handlers", handlers)
if health_check is not None:
pulumi.set(__self__, "health_check", health_check)
if id is not None:
pulumi.set(__self__, "id", id)
if inbound_services is not None:
pulumi.set(__self__, "inbound_services", inbound_services)
if instance_class is not None:
pulumi.set(__self__, "instance_class", instance_class)
if libraries is not None:
pulumi.set(__self__, "libraries", libraries)
if liveness_check is not None:
pulumi.set(__self__, "liveness_check", liveness_check)
if manual_scaling is not None:
pulumi.set(__self__, "manual_scaling", manual_scaling)
if network is not None:
pulumi.set(__self__, "network", network)
if nobuild_files_regex is not None:
pulumi.set(__self__, "nobuild_files_regex", nobuild_files_regex)
if readiness_check is not None:
pulumi.set(__self__, "readiness_check", readiness_check)
if resources is not None:
pulumi.set(__self__, "resources", resources)
if runtime is not None:
pulumi.set(__self__, "runtime", runtime)
if runtime_api_version is not None:
pulumi.set(__self__, "runtime_api_version", runtime_api_version)
if runtime_channel is not None:
pulumi.set(__self__, "runtime_channel", runtime_channel)
if runtime_main_executable_path is not None:
pulumi.set(__self__, "runtime_main_executable_path", runtime_main_executable_path)
if service_account is not None:
pulumi.set(__self__, "service_account", service_account)
if serving_status is not None:
pulumi.set(__self__, "serving_status", serving_status)
if threadsafe is not None:
pulumi.set(__self__, "threadsafe", threadsafe)
if vm is not None:
pulumi.set(__self__, "vm", vm)
if vpc_access_connector is not None:
pulumi.set(__self__, "vpc_access_connector", vpc_access_connector)
@property
@pulumi.getter(name="appId")
def app_id(self) -> pulumi.Input[str]:
return pulumi.get(self, "app_id")
@app_id.setter
def app_id(self, value: pulumi.Input[str]):
pulumi.set(self, "app_id", value)
@property
@pulumi.getter(name="serviceId")
def service_id(self) -> pulumi.Input[str]:
return pulumi.get(self, "service_id")
@service_id.setter
def service_id(self, value: pulumi.Input[str]):
pulumi.set(self, "service_id", value)
@property
@pulumi.getter(name="apiConfig")
def api_config(self) -> Optional[pulumi.Input['ApiConfigHandlerArgs']]:
"""
Serving configuration for Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/).Only returned in GET requests if view=FULL is set.
"""
return pulumi.get(self, "api_config")
@api_config.setter
def api_config(self, value: Optional[pulumi.Input['ApiConfigHandlerArgs']]):
pulumi.set(self, "api_config", value)
@property
@pulumi.getter(name="appEngineApis")
def app_engine_apis(self) -> Optional[pulumi.Input[bool]]:
"""
app_engine_apis allows second generation runtimes to access the App Engine APIs.
"""
return pulumi.get(self, "app_engine_apis")
@app_engine_apis.setter
def app_engine_apis(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "app_engine_apis", value)
@property
@pulumi.getter(name="automaticScaling")
def automatic_scaling(self) -> Optional[pulumi.Input['AutomaticScalingArgs']]:
"""
Automatic scaling is based on request rate, response latencies, and other application metrics. Instances are dynamically created and destroyed as needed in order to handle traffic.
"""
return pulumi.get(self, "automatic_scaling")
@automatic_scaling.setter
def automatic_scaling(self, value: Optional[pulumi.Input['AutomaticScalingArgs']]):
pulumi.set(self, "automatic_scaling", value)
@property
@pulumi.getter(name="basicScaling")
def basic_scaling(self) -> Optional[pulumi.Input['BasicScalingArgs']]:
"""
A service with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity.
"""
return pulumi.get(self, "basic_scaling")
@basic_scaling.setter
def basic_scaling(self, value: Optional[pulumi.Input['BasicScalingArgs']]):
pulumi.set(self, "basic_scaling", value)
@property
@pulumi.getter(name="betaSettings")
def beta_settings(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
"""
Metadata settings that are supplied to this version to enable beta runtime features.
"""
return pulumi.get(self, "beta_settings")
@beta_settings.setter
def beta_settings(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
pulumi.set(self, "beta_settings", value)
@property
@pulumi.getter(name="buildEnvVariables")
def build_env_variables(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
"""
Environment variables available to the build environment.Only returned in GET requests if view=FULL is set.
"""
return pulumi.get(self, "build_env_variables")
@build_env_variables.setter
def build_env_variables(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
pulumi.set(self, "build_env_variables", value)
@property
@pulumi.getter(name="defaultExpiration")
def default_expiration(self) -> Optional[pulumi.Input[str]]:
"""
Duration that static files should be cached by web proxies and browsers. Only applicable if the corresponding StaticFilesHandler (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#StaticFilesHandler) does not specify its own expiration time.Only returned in GET requests if view=FULL is set.
"""
return pulumi.get(self, "default_expiration")
@default_expiration.setter
def default_expiration(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "default_expiration", value)
@property
@pulumi.getter
def deployment(self) -> Optional[pulumi.Input['DeploymentArgs']]:
"""
Code and application artifacts that make up this version.Only returned in GET requests if view=FULL is set.
"""
return pulumi.get(self, "deployment")
@deployment.setter
def deployment(self, value: Optional[pulumi.Input['DeploymentArgs']]):
pulumi.set(self, "deployment", value)
@property
@pulumi.getter(name="endpointsApiService")
def endpoints_api_service(self) -> Optional[pulumi.Input['EndpointsApiServiceArgs']]:
"""
Cloud Endpoints configuration.If endpoints_api_service is set, the Cloud Endpoints Extensible Service Proxy will be provided to serve the API implemented by the app.
"""
return pulumi.get(self, "endpoints_api_service")
@endpoints_api_service.setter
def endpoints_api_service(self, value: Optional[pulumi.Input['EndpointsApiServiceArgs']]):
pulumi.set(self, "endpoints_api_service", value)
@property
@pulumi.getter
def entrypoint(self) -> Optional[pulumi.Input['EntrypointArgs']]:
"""
The entrypoint for the application.
"""
return pulumi.get(self, "entrypoint")
@entrypoint.setter
def entrypoint(self, value: Optional[pulumi.Input['EntrypointArgs']]):
pulumi.set(self, "entrypoint", value)
@property
@pulumi.getter
def env(self) -> Optional[pulumi.Input[str]]:
"""
App Engine execution environment for this version.Defaults to standard.
"""
return pulumi.get(self, "env")
@env.setter
def env(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "env", value)
@property
@pulumi.getter(name="envVariables")
def env_variables(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
"""
Environment variables available to the application.Only returned in GET requests if view=FULL is set.
"""
return pulumi.get(self, "env_variables")
@env_variables.setter
def env_variables(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
pulumi.set(self, "env_variables", value)
@property
@pulumi.getter(name="errorHandlers")
def error_handlers(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ErrorHandlerArgs']]]]:
"""
Custom static error pages. Limited to 10KB per page.Only returned in GET requests if view=FULL is set.
"""
return pulumi.get(self, "error_handlers")
@error_handlers.setter
def error_handlers(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ErrorHandlerArgs']]]]):
pulumi.set(self, "error_handlers", value)
@property
@pulumi.getter
def handlers(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['UrlMapArgs']]]]:
"""
An ordered list of URL-matching patterns that should be applied to incoming requests. The first matching URL handles the request and other request handlers are not attempted.Only returned in GET requests if view=FULL is set.
"""
return pulumi.get(self, "handlers")
@handlers.setter
def handlers(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['UrlMapArgs']]]]):
pulumi.set(self, "handlers", value)
@property
@pulumi.getter(name="healthCheck")
def health_check(self) -> Optional[pulumi.Input['HealthCheckArgs']]:
"""
Configures health checking for instances. Unhealthy instances are stopped and replaced with new instances. Only applicable in the App Engine flexible environment.Only returned in GET requests if view=FULL is set.
"""
return pulumi.get(self, "health_check")
@health_check.setter
def health_check(self, value: Optional[pulumi.Input['HealthCheckArgs']]):
pulumi.set(self, "health_check", value)
@property
@pulumi.getter
def id(self) -> Optional[pulumi.Input[str]]:
"""
Relative name of the version within the service. Example: v1. Version names can contain only lowercase letters, numbers, or hyphens. Reserved names: "default", "latest", and any name with the prefix "ah-".
"""
return pulumi.get(self, "id")
@id.setter
def id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "id", value)
@property
@pulumi.getter(name="inboundServices")
def inbound_services(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['VersionInboundServicesItem']]]]:
"""
Before an application can receive email or XMPP messages, the application must be configured to enable the service.
"""
return pulumi.get(self, "inbound_services")
@inbound_services.setter
def inbound_services(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['VersionInboundServicesItem']]]]):
pulumi.set(self, "inbound_services", value)
@property
@pulumi.getter(name="instanceClass")
def instance_class(self) -> Optional[pulumi.Input[str]]:
"""
Instance class that is used to run this version. Valid values are: AutomaticScaling: F1, F2, F4, F4_1G ManualScaling or BasicScaling: B1, B2, B4, B8, B4_1GDefaults to F1 for AutomaticScaling and B1 for ManualScaling or BasicScaling.
"""
return pulumi.get(self, "instance_class")
@instance_class.setter
def instance_class(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "instance_class", value)
@property
@pulumi.getter
def libraries(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['LibraryArgs']]]]:
"""
Configuration for third-party Python runtime libraries that are required by the application.Only returned in GET requests if view=FULL is set.
"""
return pulumi.get(self, "libraries")
@libraries.setter
def libraries(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['LibraryArgs']]]]):
pulumi.set(self, "libraries", value)
@property
@pulumi.getter(name="livenessCheck")
def liveness_check(self) -> Optional[pulumi.Input['LivenessCheckArgs']]:
"""
Configures liveness health checking for instances. Unhealthy instances are stopped and replaced with new instancesOnly returned in GET requests if view=FULL is set.
"""
return pulumi.get(self, "liveness_check")
@liveness_check.setter
def liveness_check(self, value: Optional[pulumi.Input['LivenessCheckArgs']]):
pulumi.set(self, "liveness_check", value)
@property
@pulumi.getter(name="manualScaling")
def manual_scaling(self) -> Optional[pulumi.Input['ManualScalingArgs']]:
"""
A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time. Manually scaled versions are sometimes referred to as "backends".
"""
return pulumi.get(self, "manual_scaling")
@manual_scaling.setter
def manual_scaling(self, value: Optional[pulumi.Input['ManualScalingArgs']]):
pulumi.set(self, "manual_scaling", value)
@property
@pulumi.getter
def network(self) -> Optional[pulumi.Input['NetworkArgs']]:
"""
Extra network settings. Only applicable in the App Engine flexible environment.
"""
return pulumi.get(self, "network")
@network.setter
def network(self, value: Optional[pulumi.Input['NetworkArgs']]):
pulumi.set(self, "network", value)
@property
@pulumi.getter(name="nobuildFilesRegex")
def nobuild_files_regex(self) -> Optional[pulumi.Input[str]]:
"""
Files that match this pattern will not be built into this version. Only applicable for Go runtimes.Only returned in GET requests if view=FULL is set.
"""
return pulumi.get(self, "nobuild_files_regex")
@nobuild_files_regex.setter
def nobuild_files_regex(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "nobuild_files_regex", value)
@property
@pulumi.getter(name="readinessCheck")
def readiness_check(self) -> Optional[pulumi.Input['ReadinessCheckArgs']]:
"""
Configures readiness health checking for instances. Unhealthy instances are not put into the backend traffic rotation.Only returned in GET requests if view=FULL is set.
"""
return pulumi.get(self, "readiness_check")
@readiness_check.setter
def readiness_check(self, value: Optional[pulumi.Input['ReadinessCheckArgs']]):
pulumi.set(self, "readiness_check", value)
@property
@pulumi.getter
def resources(self) -> Optional[pulumi.Input['ResourcesArgs']]:
"""
Machine resources for this version. Only applicable in the App Engine flexible environment.
"""
return pulumi.get(self, "resources")
@resources.setter
def resources(self, value: Optional[pulumi.Input['ResourcesArgs']]):
pulumi.set(self, "resources", value)
@property
@pulumi.getter
def runtime(self) -> Optional[pulumi.Input[str]]:
"""
Desired runtime. Example: python27.
"""
return pulumi.get(self, "runtime")
@runtime.setter
def runtime(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "runtime", value)
@property
@pulumi.getter(name="runtimeApiVersion")
def runtime_api_version(self) -> Optional[pulumi.Input[str]]:
"""
The version of the API in the given runtime environment. Please see the app.yaml reference for valid values at https://cloud.google.com/appengine/docs/standard//config/appref
"""
return pulumi.get(self, "runtime_api_version")
@runtime_api_version.setter
def runtime_api_version(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "runtime_api_version", value)
@property
@pulumi.getter(name="runtimeChannel")
def runtime_channel(self) -> Optional[pulumi.Input[str]]:
"""
The channel of the runtime to use. Only available for some runtimes. Defaults to the default channel.
"""
return pulumi.get(self, "runtime_channel")
@runtime_channel.setter
def runtime_channel(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "runtime_channel", value)
@property
@pulumi.getter(name="runtimeMainExecutablePath")
def runtime_main_executable_path(self) -> Optional[pulumi.Input[str]]:
"""
The path or name of the app's main executable.
"""
return pulumi.get(self, "runtime_main_executable_path")
@runtime_main_executable_path.setter
def runtime_main_executable_path(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "runtime_main_executable_path", value)
@property
@pulumi.getter(name="serviceAccount")
def service_account(self) -> Optional[pulumi.Input[str]]:
"""
The identity that the deployed version will run as. Admin API will use the App Engine Appspot service account as default if this field is neither provided in app.yaml file nor through CLI flag.
"""
return pulumi.get(self, "service_account")
@service_account.setter
def service_account(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "service_account", value)
@property
@pulumi.getter(name="servingStatus")
def serving_status(self) -> Optional[pulumi.Input['VersionServingStatus']]:
"""
Current serving status of this version. Only the versions with a SERVING status create instances and can be billed.SERVING_STATUS_UNSPECIFIED is an invalid value. Defaults to SERVING.
"""
return pulumi.get(self, "serving_status")
@serving_status.setter
def serving_status(self, value: Optional[pulumi.Input['VersionServingStatus']]):
pulumi.set(self, "serving_status", value)
@property
@pulumi.getter
def threadsafe(self) -> Optional[pulumi.Input[bool]]:
"""
Whether multiple requests can be dispatched to this version at once.
"""
return pulumi.get(self, "threadsafe")
@threadsafe.setter
def threadsafe(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "threadsafe", value)
@property
@pulumi.getter
def vm(self) -> Optional[pulumi.Input[bool]]:
"""
Whether to deploy this version in a container on a virtual machine.
"""
return pulumi.get(self, "vm")
@vm.setter
def vm(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "vm", value)
@property
@pulumi.getter(name="vpcAccessConnector")
def vpc_access_connector(self) -> Optional[pulumi.Input['VpcAccessConnectorArgs']]:
"""
Enables VPC connectivity for standard apps.
"""
return pulumi.get(self, "vpc_access_connector")
@vpc_access_connector.setter
def vpc_access_connector(self, value: Optional[pulumi.Input['VpcAccessConnectorArgs']]):
pulumi.set(self, "vpc_access_connector", value)
class Version(pulumi.CustomResource):
@overload
def __init__(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
api_config: Optional[pulumi.Input[pulumi.InputType['ApiConfigHandlerArgs']]] = None,
app_engine_apis: Optional[pulumi.Input[bool]] = None,
app_id: Optional[pulumi.Input[str]] = None,
automatic_scaling: Optional[pulumi.Input[pulumi.InputType['AutomaticScalingArgs']]] = None,
basic_scaling: Optional[pulumi.Input[pulumi.InputType['BasicScalingArgs']]] = None,
beta_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
build_env_variables: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
default_expiration: Optional[pulumi.Input[str]] = None,
deployment: Optional[pulumi.Input[pulumi.InputType['DeploymentArgs']]] = None,
endpoints_api_service: Optional[pulumi.Input[pulumi.InputType['EndpointsApiServiceArgs']]] = None,
entrypoint: Optional[pulumi.Input[pulumi.InputType['EntrypointArgs']]] = None,
env: Optional[pulumi.Input[str]] = None,
env_variables: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
error_handlers: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ErrorHandlerArgs']]]]] = None,
handlers: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['UrlMapArgs']]]]] = None,
health_check: Optional[pulumi.Input[pulumi.InputType['HealthCheckArgs']]] = None,
id: Optional[pulumi.Input[str]] = None,
inbound_services: Optional[pulumi.Input[Sequence[pulumi.Input['VersionInboundServicesItem']]]] = None,
instance_class: Optional[pulumi.Input[str]] = None,
libraries: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['LibraryArgs']]]]] = None,
liveness_check: Optional[pulumi.Input[pulumi.InputType['LivenessCheckArgs']]] = None,
manual_scaling: Optional[pulumi.Input[pulumi.InputType['ManualScalingArgs']]] = None,
network: Optional[pulumi.Input[pulumi.InputType['NetworkArgs']]] = None,
nobuild_files_regex: Optional[pulumi.Input[str]] = None,
readiness_check: Optional[pulumi.Input[pulumi.InputType['ReadinessCheckArgs']]] = None,
resources: Optional[pulumi.Input[pulumi.InputType['ResourcesArgs']]] = None,
runtime: Optional[pulumi.Input[str]] = None,
runtime_api_version: Optional[pulumi.Input[str]] = None,
runtime_channel: Optional[pulumi.Input[str]] = None,
runtime_main_executable_path: Optional[pulumi.Input[str]] = None,
service_account: Optional[pulumi.Input[str]] = None,
service_id: Optional[pulumi.Input[str]] = None,
serving_status: Optional[pulumi.Input['VersionServingStatus']] = None,
threadsafe: Optional[pulumi.Input[bool]] = None,
vm: Optional[pulumi.Input[bool]] = None,
vpc_access_connector: Optional[pulumi.Input[pulumi.InputType['VpcAccessConnectorArgs']]] = None,
__props__=None):
"""
Deploys code and resource files to a new version.
Auto-naming is currently not supported for this resource.
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[pulumi.InputType['ApiConfigHandlerArgs']] api_config: Serving configuration for Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/).Only returned in GET requests if view=FULL is set.
:param pulumi.Input[bool] app_engine_apis: app_engine_apis allows second generation runtimes to access the App Engine APIs.
:param pulumi.Input[pulumi.InputType['AutomaticScalingArgs']] automatic_scaling: Automatic scaling is based on request rate, response latencies, and other application metrics. Instances are dynamically created and destroyed as needed in order to handle traffic.
:param pulumi.Input[pulumi.InputType['BasicScalingArgs']] basic_scaling: A service with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity.
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] beta_settings: Metadata settings that are supplied to this version to enable beta runtime features.
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] build_env_variables: Environment variables available to the build environment.Only returned in GET requests if view=FULL is set.
:param pulumi.Input[str] default_expiration: Duration that static files should be cached by web proxies and browsers. Only applicable if the corresponding StaticFilesHandler (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#StaticFilesHandler) does not specify its own expiration time.Only returned in GET requests if view=FULL is set.
:param pulumi.Input[pulumi.InputType['DeploymentArgs']] deployment: Code and application artifacts that make up this version.Only returned in GET requests if view=FULL is set.
:param pulumi.Input[pulumi.InputType['EndpointsApiServiceArgs']] endpoints_api_service: Cloud Endpoints configuration.If endpoints_api_service is set, the Cloud Endpoints Extensible Service Proxy will be provided to serve the API implemented by the app.
:param pulumi.Input[pulumi.InputType['EntrypointArgs']] entrypoint: The entrypoint for the application.
:param pulumi.Input[str] env: App Engine execution environment for this version.Defaults to standard.
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] env_variables: Environment variables available to the application.Only returned in GET requests if view=FULL is set.
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ErrorHandlerArgs']]]] error_handlers: Custom static error pages. Limited to 10KB per page.Only returned in GET requests if view=FULL is set.
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['UrlMapArgs']]]] handlers: An ordered list of URL-matching patterns that should be applied to incoming requests. The first matching URL handles the request and other request handlers are not attempted.Only returned in GET requests if view=FULL is set.
:param pulumi.Input[pulumi.InputType['HealthCheckArgs']] health_check: Configures health checking for instances. Unhealthy instances are stopped and replaced with new instances. Only applicable in the App Engine flexible environment.Only returned in GET requests if view=FULL is set.
:param pulumi.Input[str] id: Relative name of the version within the service. Example: v1. Version names can contain only lowercase letters, numbers, or hyphens. Reserved names: "default", "latest", and any name with the prefix "ah-".
:param pulumi.Input[Sequence[pulumi.Input['VersionInboundServicesItem']]] inbound_services: Before an application can receive email or XMPP messages, the application must be configured to enable the service.
:param pulumi.Input[str] instance_class: Instance class that is used to run this version. Valid values are: AutomaticScaling: F1, F2, F4, F4_1G ManualScaling or BasicScaling: B1, B2, B4, B8, B4_1GDefaults to F1 for AutomaticScaling and B1 for ManualScaling or BasicScaling.
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['LibraryArgs']]]] libraries: Configuration for third-party Python runtime libraries that are required by the application.Only returned in GET requests if view=FULL is set.
:param pulumi.Input[pulumi.InputType['LivenessCheckArgs']] liveness_check: Configures liveness health checking for instances. Unhealthy instances are stopped and replaced with new instancesOnly returned in GET requests if view=FULL is set.
:param pulumi.Input[pulumi.InputType['ManualScalingArgs']] manual_scaling: A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time. Manually scaled versions are sometimes referred to as "backends".
:param pulumi.Input[pulumi.InputType['NetworkArgs']] network: Extra network settings. Only applicable in the App Engine flexible environment.
:param pulumi.Input[str] nobuild_files_regex: Files that match this pattern will not be built into this version. Only applicable for Go runtimes.Only returned in GET requests if view=FULL is set.
:param pulumi.Input[pulumi.InputType['ReadinessCheckArgs']] readiness_check: Configures readiness health checking for instances. Unhealthy instances are not put into the backend traffic rotation.Only returned in GET requests if view=FULL is set.
:param pulumi.Input[pulumi.InputType['ResourcesArgs']] resources: Machine resources for this version. Only applicable in the App Engine flexible environment.
:param pulumi.Input[str] runtime: Desired runtime. Example: python27.
:param pulumi.Input[str] runtime_api_version: The version of the API in the given runtime environment. Please see the app.yaml reference for valid values at https://cloud.google.com/appengine/docs/standard//config/appref
:param pulumi.Input[str] runtime_channel: The channel of the runtime to use. Only available for some runtimes. Defaults to the default channel.
:param pulumi.Input[str] runtime_main_executable_path: The path or name of the app's main executable.
:param pulumi.Input[str] service_account: The identity that the deployed version will run as. Admin API will use the App Engine Appspot service account as default if this field is neither provided in app.yaml file nor through CLI flag.
:param pulumi.Input['VersionServingStatus'] serving_status: Current serving status of this version. Only the versions with a SERVING status create instances and can be billed.SERVING_STATUS_UNSPECIFIED is an invalid value. Defaults to SERVING.
:param pulumi.Input[bool] threadsafe: Whether multiple requests can be dispatched to this version at once.
:param pulumi.Input[bool] vm: Whether to deploy this version in a container on a virtual machine.
:param pulumi.Input[pulumi.InputType['VpcAccessConnectorArgs']] vpc_access_connector: Enables VPC connectivity for standard apps.
"""
...
@overload
def __init__(__self__,
resource_name: str,
args: VersionArgs,
opts: Optional[pulumi.ResourceOptions] = None):
"""
Deploys code and resource files to a new version.
Auto-naming is currently not supported for this resource.
:param str resource_name: The name of the resource.
:param VersionArgs args: The arguments to use to populate this resource's properties.
:param pulumi.ResourceOptions opts: Options for the resource.
"""
...
def __init__(__self__, resource_name: str, *args, **kwargs):
resource_args, opts = _utilities.get_resource_args_opts(VersionArgs, pulumi.ResourceOptions, *args, **kwargs)
if resource_args is not None:
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
else:
__self__._internal_init(resource_name, *args, **kwargs)
def _internal_init(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
api_config: Optional[pulumi.Input[pulumi.InputType['ApiConfigHandlerArgs']]] = None,
app_engine_apis: Optional[pulumi.Input[bool]] = None,
app_id: Optional[pulumi.Input[str]] = None,
automatic_scaling: Optional[pulumi.Input[pulumi.InputType['AutomaticScalingArgs']]] = None,
basic_scaling: Optional[pulumi.Input[pulumi.InputType['BasicScalingArgs']]] = None,
beta_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
build_env_variables: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
default_expiration: Optional[pulumi.Input[str]] = None,
deployment: Optional[pulumi.Input[pulumi.InputType['DeploymentArgs']]] = None,
endpoints_api_service: Optional[pulumi.Input[pulumi.InputType['EndpointsApiServiceArgs']]] = None,
entrypoint: Optional[pulumi.Input[pulumi.InputType['EntrypointArgs']]] = None,
env: Optional[pulumi.Input[str]] = None,
env_variables: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
error_handlers: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ErrorHandlerArgs']]]]] = None,
handlers: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['UrlMapArgs']]]]] = None,
health_check: Optional[pulumi.Input[pulumi.InputType['HealthCheckArgs']]] = None,
id: Optional[pulumi.Input[str]] = None,
inbound_services: Optional[pulumi.Input[Sequence[pulumi.Input['VersionInboundServicesItem']]]] = None,
instance_class: Optional[pulumi.Input[str]] = None,
libraries: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['LibraryArgs']]]]] = None,
liveness_check: Optional[pulumi.Input[pulumi.InputType['LivenessCheckArgs']]] = None,
manual_scaling: Optional[pulumi.Input[pulumi.InputType['ManualScalingArgs']]] = None,
network: Optional[pulumi.Input[pulumi.InputType['NetworkArgs']]] = None,
nobuild_files_regex: Optional[pulumi.Input[str]] = None,
readiness_check: Optional[pulumi.Input[pulumi.InputType['ReadinessCheckArgs']]] = None,
resources: Optional[pulumi.Input[pulumi.InputType['ResourcesArgs']]] = None,
runtime: Optional[pulumi.Input[str]] = None,
runtime_api_version: Optional[pulumi.Input[str]] = None,
runtime_channel: Optional[pulumi.Input[str]] = None,
runtime_main_executable_path: Optional[pulumi.Input[str]] = None,
service_account: Optional[pulumi.Input[str]] = None,
service_id: Optional[pulumi.Input[str]] = None,
serving_status: Optional[pulumi.Input['VersionServingStatus']] = None,
threadsafe: Optional[pulumi.Input[bool]] = None,
vm: Optional[pulumi.Input[bool]] = None,
vpc_access_connector: Optional[pulumi.Input[pulumi.InputType['VpcAccessConnectorArgs']]] = None,
__props__=None):
if opts is None:
opts = pulumi.ResourceOptions()
if not isinstance(opts, pulumi.ResourceOptions):
raise TypeError('Expected resource options to be a ResourceOptions instance')
if opts.version is None:
opts.version = _utilities.get_version()
if opts.id is None:
if __props__ is not None:
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
__props__ = VersionArgs.__new__(VersionArgs)
__props__.__dict__["api_config"] = api_config
__props__.__dict__["app_engine_apis"] = app_engine_apis
if app_id is None and not opts.urn:
raise TypeError("Missing required property 'app_id'")
__props__.__dict__["app_id"] = app_id
__props__.__dict__["automatic_scaling"] = automatic_scaling
__props__.__dict__["basic_scaling"] = basic_scaling
__props__.__dict__["beta_settings"] = beta_settings
__props__.__dict__["build_env_variables"] = build_env_variables
__props__.__dict__["default_expiration"] = default_expiration
__props__.__dict__["deployment"] = deployment
__props__.__dict__["endpoints_api_service"] = endpoints_api_service
__props__.__dict__["entrypoint"] = entrypoint
__props__.__dict__["env"] = env
__props__.__dict__["env_variables"] = env_variables
__props__.__dict__["error_handlers"] = error_handlers
__props__.__dict__["handlers"] = handlers
__props__.__dict__["health_check"] = health_check
__props__.__dict__["id"] = id
__props__.__dict__["inbound_services"] = inbound_services
__props__.__dict__["instance_class"] = instance_class
__props__.__dict__["libraries"] = libraries
__props__.__dict__["liveness_check"] = liveness_check
__props__.__dict__["manual_scaling"] = manual_scaling
__props__.__dict__["network"] = network
__props__.__dict__["nobuild_files_regex"] = nobuild_files_regex
__props__.__dict__["readiness_check"] = readiness_check
__props__.__dict__["resources"] = resources
__props__.__dict__["runtime"] = runtime
__props__.__dict__["runtime_api_version"] = runtime_api_version
__props__.__dict__["runtime_channel"] = runtime_channel
__props__.__dict__["runtime_main_executable_path"] = runtime_main_executable_path
__props__.__dict__["service_account"] = service_account
if service_id is None and not opts.urn:
raise TypeError("Missing required property 'service_id'")
__props__.__dict__["service_id"] = service_id
__props__.__dict__["serving_status"] = serving_status
__props__.__dict__["threadsafe"] = threadsafe
__props__.__dict__["vm"] = vm
__props__.__dict__["vpc_access_connector"] = vpc_access_connector
__props__.__dict__["create_time"] = None
__props__.__dict__["created_by"] = None
__props__.__dict__["disk_usage_bytes"] = None
__props__.__dict__["name"] = None
__props__.__dict__["version_url"] = None
super(Version, __self__).__init__(
'google-native:appengine/v1beta:Version',
resource_name,
__props__,
opts)
@staticmethod
def get(resource_name: str,
id: pulumi.Input[str],
opts: Optional[pulumi.ResourceOptions] = None) -> 'Version':
"""
Get an existing Version resource's state with the given name, id, and optional extra
properties used to qualify the lookup.
:param str resource_name: The unique name of the resulting resource.
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
:param pulumi.ResourceOptions opts: Options for the resource.
"""
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
__props__ = VersionArgs.__new__(VersionArgs)
__props__.__dict__["api_config"] = None
__props__.__dict__["app_engine_apis"] = None
__props__.__dict__["automatic_scaling"] = None
__props__.__dict__["basic_scaling"] = None
__props__.__dict__["beta_settings"] = None
__props__.__dict__["build_env_variables"] = None
__props__.__dict__["create_time"] = None
__props__.__dict__["created_by"] = None
__props__.__dict__["default_expiration"] = None
__props__.__dict__["deployment"] = None
__props__.__dict__["disk_usage_bytes"] = None
__props__.__dict__["endpoints_api_service"] = None
__props__.__dict__["entrypoint"] = None
__props__.__dict__["env"] = None
__props__.__dict__["env_variables"] = None
__props__.__dict__["error_handlers"] = None
__props__.__dict__["handlers"] = None
__props__.__dict__["health_check"] = None
__props__.__dict__["inbound_services"] = None
__props__.__dict__["instance_class"] = None
__props__.__dict__["libraries"] = None
__props__.__dict__["liveness_check"] = None
__props__.__dict__["manual_scaling"] = None
__props__.__dict__["name"] = None
__props__.__dict__["network"] = None
__props__.__dict__["nobuild_files_regex"] = None
__props__.__dict__["readiness_check"] = None
__props__.__dict__["resources"] = None
__props__.__dict__["runtime"] = None
__props__.__dict__["runtime_api_version"] = None
__props__.__dict__["runtime_channel"] = None
__props__.__dict__["runtime_main_executable_path"] = None
__props__.__dict__["service_account"] = None
__props__.__dict__["serving_status"] = None
__props__.__dict__["threadsafe"] = None
__props__.__dict__["version_url"] = None
__props__.__dict__["vm"] = None
__props__.__dict__["vpc_access_connector"] = None
return Version(resource_name, opts=opts, __props__=__props__)
@property
@pulumi.getter(name="apiConfig")
def api_config(self) -> pulumi.Output['outputs.ApiConfigHandlerResponse']:
"""
Serving configuration for Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/).Only returned in GET requests if view=FULL is set.
"""
return pulumi.get(self, "api_config")
@property
@pulumi.getter(name="appEngineApis")
def app_engine_apis(self) -> pulumi.Output[bool]:
"""
app_engine_apis allows second generation runtimes to access the App Engine APIs.
"""
return pulumi.get(self, "app_engine_apis")
@property
@pulumi.getter(name="automaticScaling")
def automatic_scaling(self) -> pulumi.Output['outputs.AutomaticScalingResponse']:
"""
Automatic scaling is based on request rate, response latencies, and other application metrics. Instances are dynamically created and destroyed as needed in order to handle traffic.
"""
return pulumi.get(self, "automatic_scaling")
@property
@pulumi.getter(name="basicScaling")
def basic_scaling(self) -> pulumi.Output['outputs.BasicScalingResponse']:
"""
A service with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity.
"""
return pulumi.get(self, "basic_scaling")
@property
@pulumi.getter(name="betaSettings")
def beta_settings(self) -> pulumi.Output[Mapping[str, str]]:
"""
Metadata settings that are supplied to this version to enable beta runtime features.
"""
return pulumi.get(self, "beta_settings")
@property
@pulumi.getter(name="buildEnvVariables")
def build_env_variables(self) -> pulumi.Output[Mapping[str, str]]:
"""
Environment variables available to the build environment.Only returned in GET requests if view=FULL is set.
"""
return pulumi.get(self, "build_env_variables")
@property
@pulumi.getter(name="createTime")
def create_time(self) -> pulumi.Output[str]:
"""
Time that this version was created.
"""
return pulumi.get(self, "create_time")
@property
@pulumi.getter(name="createdBy")
def created_by(self) -> pulumi.Output[str]:
"""
Email address of the user who created this version.
"""
return pulumi.get(self, "created_by")
@property
@pulumi.getter(name="defaultExpiration")
def default_expiration(self) -> pulumi.Output[str]:
"""
Duration that static files should be cached by web proxies and browsers. Only applicable if the corresponding StaticFilesHandler (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#StaticFilesHandler) does not specify its own expiration time.Only returned in GET requests if view=FULL is set.
"""
return pulumi.get(self, "default_expiration")
@property
@pulumi.getter
def deployment(self) -> pulumi.Output['outputs.DeploymentResponse']:
"""
Code and application artifacts that make up this version.Only returned in GET requests if view=FULL is set.
"""
return pulumi.get(self, "deployment")
@property
@pulumi.getter(name="diskUsageBytes")
def disk_usage_bytes(self) -> pulumi.Output[str]:
"""
Total size in bytes of all the files that are included in this version and currently hosted on the App Engine disk.
"""
return pulumi.get(self, "disk_usage_bytes")
@property
@pulumi.getter(name="endpointsApiService")
def endpoints_api_service(self) -> pulumi.Output['outputs.EndpointsApiServiceResponse']:
"""
Cloud Endpoints configuration.If endpoints_api_service is set, the Cloud Endpoints Extensible Service Proxy will be provided to serve the API implemented by the app.
"""
return pulumi.get(self, "endpoints_api_service")
@property
@pulumi.getter
def entrypoint(self) -> pulumi.Output['outputs.EntrypointResponse']:
"""
The entrypoint for the application.
"""
return pulumi.get(self, "entrypoint")
@property
@pulumi.getter
def env(self) -> pulumi.Output[str]:
"""
App Engine execution environment for this version.Defaults to standard.
"""
return pulumi.get(self, "env")
@property
@pulumi.getter(name="envVariables")
def env_variables(self) -> pulumi.Output[Mapping[str, str]]:
"""
Environment variables available to the application.Only returned in GET requests if view=FULL is set.
"""
return pulumi.get(self, "env_variables")
@property
@pulumi.getter(name="errorHandlers")
def error_handlers(self) -> pulumi.Output[Sequence['outputs.ErrorHandlerResponse']]:
"""
Custom static error pages. Limited to 10KB per page.Only returned in GET requests if view=FULL is set.
"""
return pulumi.get(self, "error_handlers")
@property
@pulumi.getter
def handlers(self) -> pulumi.Output[Sequence['outputs.UrlMapResponse']]:
"""
An ordered list of URL-matching patterns that should be applied to incoming requests. The first matching URL handles the request and other request handlers are not attempted.Only returned in GET requests if view=FULL is set.
"""
return pulumi.get(self, "handlers")
@property
@pulumi.getter(name="healthCheck")
def health_check(self) -> pulumi.Output['outputs.HealthCheckResponse']:
"""
Configures health checking for instances. Unhealthy instances are stopped and replaced with new instances. Only applicable in the App Engine flexible environment.Only returned in GET requests if view=FULL is set.
"""
return pulumi.get(self, "health_check")
@property
@pulumi.getter(name="inboundServices")
def inbound_services(self) -> pulumi.Output[Sequence[str]]:
"""
Before an application can receive email or XMPP messages, the application must be configured to enable the service.
"""
return pulumi.get(self, "inbound_services")
@property
@pulumi.getter(name="instanceClass")
def instance_class(self) -> pulumi.Output[str]:
"""
Instance class that is used to run this version. Valid values are: AutomaticScaling: F1, F2, F4, F4_1G ManualScaling or BasicScaling: B1, B2, B4, B8, B4_1GDefaults to F1 for AutomaticScaling and B1 for ManualScaling or BasicScaling.
"""
return pulumi.get(self, "instance_class")
@property
@pulumi.getter
def libraries(self) -> pulumi.Output[Sequence['outputs.LibraryResponse']]:
"""
Configuration for third-party Python runtime libraries that are required by the application.Only returned in GET requests if view=FULL is set.
"""
return pulumi.get(self, "libraries")
@property
@pulumi.getter(name="livenessCheck")
def liveness_check(self) -> pulumi.Output['outputs.LivenessCheckResponse']:
"""
Configures liveness health checking for instances. Unhealthy instances are stopped and replaced with new instancesOnly returned in GET requests if view=FULL is set.
"""
return pulumi.get(self, "liveness_check")
@property
@pulumi.getter(name="manualScaling")
def manual_scaling(self) -> pulumi.Output['outputs.ManualScalingResponse']:
"""
A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time. Manually scaled versions are sometimes referred to as "backends".
"""
return pulumi.get(self, "manual_scaling")
@property
@pulumi.getter
def name(self) -> pulumi.Output[str]:
"""
Full path to the Version resource in the API. Example: apps/myapp/services/default/versions/v1.
"""
return pulumi.get(self, "name")
@property
@pulumi.getter
def network(self) -> pulumi.Output['outputs.NetworkResponse']:
"""
Extra network settings. Only applicable in the App Engine flexible environment.
"""
return pulumi.get(self, "network")
@property
@pulumi.getter(name="nobuildFilesRegex")
def nobuild_files_regex(self) -> pulumi.Output[str]:
"""
Files that match this pattern will not be built into this version. Only applicable for Go runtimes.Only returned in GET requests if view=FULL is set.
"""
return pulumi.get(self, "nobuild_files_regex")
@property
@pulumi.getter(name="readinessCheck")
def readiness_check(self) -> pulumi.Output['outputs.ReadinessCheckResponse']:
"""
Configures readiness health checking for instances. Unhealthy instances are not put into the backend traffic rotation.Only returned in GET requests if view=FULL is set.
"""
return pulumi.get(self, "readiness_check")
@property
@pulumi.getter
def resources(self) -> pulumi.Output['outputs.ResourcesResponse']:
"""
Machine resources for this version. Only applicable in the App Engine flexible environment.
"""
return pulumi.get(self, "resources")
@property
@pulumi.getter
def runtime(self) -> pulumi.Output[str]:
"""
Desired runtime. Example: python27.
"""
return pulumi.get(self, "runtime")
@property
@pulumi.getter(name="runtimeApiVersion")
def runtime_api_version(self) -> pulumi.Output[str]:
"""
The version of the API in the given runtime environment. Please see the app.yaml reference for valid values at https://cloud.google.com/appengine/docs/standard//config/appref
"""
return pulumi.get(self, "runtime_api_version")
@property
@pulumi.getter(name="runtimeChannel")
def runtime_channel(self) -> pulumi.Output[str]:
"""
The channel of the runtime to use. Only available for some runtimes. Defaults to the default channel.
"""
return pulumi.get(self, "runtime_channel")
@property
@pulumi.getter(name="runtimeMainExecutablePath")
def runtime_main_executable_path(self) -> pulumi.Output[str]:
"""
The path or name of the app's main executable.
"""
return pulumi.get(self, "runtime_main_executable_path")
@property
@pulumi.getter(name="serviceAccount")
def service_account(self) -> pulumi.Output[str]:
"""
The identity that the deployed version will run as. Admin API will use the App Engine Appspot service account as default if this field is neither provided in app.yaml file nor through CLI flag.
"""
return pulumi.get(self, "service_account")
@property
@pulumi.getter(name="servingStatus")
def serving_status(self) -> pulumi.Output[str]:
"""
Current serving status of this version. Only the versions with a SERVING status create instances and can be billed.SERVING_STATUS_UNSPECIFIED is an invalid value. Defaults to SERVING.
"""
return pulumi.get(self, "serving_status")
@property
@pulumi.getter
def threadsafe(self) -> pulumi.Output[bool]:
"""
Whether multiple requests can be dispatched to this version at once.
"""
return pulumi.get(self, "threadsafe")
@property
@pulumi.getter(name="versionUrl")
def version_url(self) -> pulumi.Output[str]:
"""
Serving URL for this version. Example: "https://myversion-dot-myservice-dot-myapp.appspot.com"
"""
return pulumi.get(self, "version_url")
@property
@pulumi.getter
def vm(self) -> pulumi.Output[bool]:
"""
Whether to deploy this version in a container on a virtual machine.
"""
return pulumi.get(self, "vm")
@property
@pulumi.getter(name="vpcAccessConnector")
def vpc_access_connector(self) -> pulumi.Output['outputs.VpcAccessConnectorResponse']:
"""
Enables VPC connectivity for standard apps.
"""
return pulumi.get(self, "vpc_access_connector")
| 56.157303
| 389
| 0.688983
| 7,714
| 64,974
| 5.602411
| 0.057817
| 0.076359
| 0.076498
| 0.032533
| 0.857464
| 0.799778
| 0.747923
| 0.717773
| 0.703543
| 0.640628
| 0
| 0.001526
| 0.213347
| 64,974
| 1,156
| 390
| 56.205882
| 0.844009
| 0.369409
| 0
| 0.447368
| 1
| 0
| 0.152198
| 0.030735
| 0
| 0
| 0
| 0
| 0
| 1
| 0.160665
| false
| 0.001385
| 0.01108
| 0.00277
| 0.278393
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
3d507789fdd3b1ff9e650418cfd9951cb504bf94
| 9,439
|
py
|
Python
|
scripts/python/turtleRelated/hexpath.py
|
jeremiahmarks/dangerzone
|
fe2946b8463ed018d2136ca0eb178161ad370565
|
[
"MIT"
] | 1
|
2015-08-15T05:25:35.000Z
|
2015-08-15T05:25:35.000Z
|
scripts/python/turtleRelated/hexpath.py
|
jeremiahmarks/dangerzone
|
fe2946b8463ed018d2136ca0eb178161ad370565
|
[
"MIT"
] | null | null | null |
scripts/python/turtleRelated/hexpath.py
|
jeremiahmarks/dangerzone
|
fe2946b8463ed018d2136ca0eb178161ad370565
|
[
"MIT"
] | null | null | null |
def hex_spirala(data):
setranges=lambda x,y: (x+1, x+1+(y*6)-1)
circleranges={}
circleranges[0]=[1,1]
a, b = max(data), min(data)
circlea=None
circleb=None
while(a>circleranges[len(circleranges)-1][1]):
for x in range(len(circleranges), len(circleranges)+10):
circleranges[x]=setranges(circleranges[x-1][1], x)
for x in range(len(circleranges)):
if not circlea:
if circleranges[x][0]<=a<=circleranges[x][1]: circlea=x
if not circleb:
if circleranges[x][0]<=b<=circleranges[x][1]: circleb=x
circleaMax=circleranges[circlea][1]
circlebMax=circleranges[circleb][1]
distanceaisfrommax=circleaMax-a
distancebisfrommax=circlebMax-b
stepsize=circlea
bstepsize=circleb
if circlea:
if distanceaisfrommax/stepsize==0:
aX=-stepsize
elif distanceaisfrommax/stepsize==3:
aX=stepsize
elif distanceaisfrommax/stepsize==1:
aX=-stepsize+(distanceaisfrommax%stepsize)
elif distanceaisfrommax/stepsize==2:
aX=distanceaisfrommax%stepsize
elif distanceaisfrommax/stepsize==4:
aX=stepsize-(distanceaisfrommax%stepsize)
elif distanceaisfrommax/stepsize==5:
aX=-(distanceaisfrommax%stepsize)
else:
aX=0
if circleb:
if distancebisfrommax/bstepsize==0:
bX=-bstepsize
elif distancebisfrommax/bstepsize==3:
bX=bstepsize
elif distancebisfrommax/bstepsize==1:
bX=-bstepsize+(distancebisfrommax%bstepsize)
elif distancebisfrommax/bstepsize==2:
bX=distancebisfrommax%bstepsize
elif distancebisfrommax/bstepsize==4:
bX=bstepsize-(distancebisfrommax%bstepsize)
elif distancebisfrommax/bstepsize==5:
bX=-(distancebisfrommax%bstepsize)
else:
bX=0
amaxycoord=circlea
bmaxycoord=circleb
if circlea:
if distanceaisfrommax/stepsize==0:
aY=amaxycoord-2*distanceaisfrommax
elif distanceaisfrommax/stepsize==1:
aY=-amaxycoord-(distanceaisfrommax%stepsize)
elif distanceaisfrommax/stepsize==2:
if amaxycoord==1:
aY=-(2*(amaxycoord))+(distanceaisfrommax%stepsize)
else:
aY=-(2*(amaxycoord-1))+(distanceaisfrommax%stepsize)
elif distanceaisfrommax/stepsize==3:
aY=-amaxycoord+(distanceaisfrommax%stepsize)
elif distanceaisfrommax/stepsize==4:
aY=amaxycoord+(distanceaisfrommax%stepsize)
elif distanceaisfrommax/stepsize==5:
if amaxycoord==1:
aY=(2*(amaxycoord))-(distanceaisfrommax%stepsize)
else:
aY=(2*(amaxycoord-1))-(distanceaisfrommax%stepsize)
else:
aY=0
if circleb:
if distancebisfrommax/bstepsize==0:
bY=bmaxycoord-2*distancebisfrommax
elif distancebisfrommax/bstepsize==1:
bY=-bmaxycoord-(distancebisfrommax%bstepsize)
elif distancebisfrommax/bstepsize==2:
if bmaxycoord==1:
bY=-(2*bmaxycoord)+(distancebisfrommax%bstepsize)
else:
bY=-(2*(bmaxycoord-1))+(distancebisfrommax%bstepsize)
elif distancebisfrommax/bstepsize==3:
bY=-bmaxycoord+(distancebisfrommax%bstepsize)
elif distancebisfrommax/bstepsize==4:
bY=bmaxycoord+(distancebisfrommax%bstepsize)
elif distancebisfrommax/bstepsize==5:
if bmaxycoord==1:
bY=(2*bmaxycoord)-(distancebisfrommax%bstepsize)
else:
bY=(2*(bmaxycoord-1))-(distancebisfrommax%bstepsize)
else:
bY=0
xdiff=(aX-bX)
ydiff=(aY-bY)
if xdiff>ydiff:
dis=xdiff
if ydiff>xdiff:
dis=xdiff+(ydiff-xdiff)/2
print aX, aY, bX,bY,circlea,circleb
def hex_spiral(data):
"""
The map of the circuit consists of a collection of hexagonal elements. The
first element in the center is marked as 1 and in a continuing clockwise
spiral, the rest of the elements are marked in ascending order ad infinitum.
On the map, you can move (connect) through the adjoining edges of the
hexagonal elements.
For example: the distance between elements 6 and 19 is two moves and the
distance between 2 and 9 is one move. You must help Nikola find the distance
between any two elements on the map.
"""
"""
This copy of the code is only for history's sake. I am currently rewritting
it and am leaving this copy so I can come back if needed
"""
setranges=lambda x,y: (x+1, x+1+(y*6)-1)
circleranges={}
circleranges[0]=[1,1]
a, b = max(data), min(data)
circlea=None
circleb=None
#find the circle a is in
while(a>circleranges[len(circleranges)-1][1]):
for x in range(len(circleranges), len(circleranges)+10):
circleranges[x]=setranges(circleranges[x-1][1], x)
# this ugle statement should appropriatly lengthen the dictionary so that
# it can find the appropriate circle that a is in
for x in range(len(circleranges)):
if not circlea:
if circleranges[x][0]<=a<=circleranges[x][1]: circlea=x
if not circleb:
if circleranges[x][0]<=b<=circleranges[x][1]: circleb=x
circleaMax=circleranges[circlea][1]
circlebMax=circleranges[circleb][1]
distanceaisfrommax=circleaMax-a
distancebisfrommax=circlebMax-b
stepsize=circlea
bstepsize=circleb
if circlea:
#When the number 1 is used it is in the zeroth circle
#this caused several issues and this seemed like a decent
#resolution to that particular issue
#also, this bunch of code finds the X coordinate for the
#larger of the two circles.
if distanceaisfrommax/stepsize==0:
aX=-stepsize
elif distanceaisfrommax/stepsize==3:
aX=stepsize
elif distanceaisfrommax/stepsize==1:
aX=-stepsize+(distanceaisfrommax%stepsize)
elif distanceaisfrommax/stepsize==2:
aX=distanceaisfrommax%stepsize
elif distanceaisfrommax/stepsize==4:
aX=stepsize-(distanceaisfrommax%stepsize)
elif distanceaisfrommax/stepsize==5:
aX=-(distanceaisfrommax%stepsize)
else:
aX=0
if circleb:
#this particular section finds the x coordinate of the
#smaller of the two numbers
if distancebisfrommax/bstepsize==0:
bX=-bstepsize
elif distancebisfrommax/bstepsize==3:
bX=bstepsize
elif distancebisfrommax/bstepsize==1:
bX=-bstepsize+(distancebisfrommax%bstepsize)
elif distancebisfrommax/bstepsize==2:
bX=distancebisfrommax%bstepsize
elif distancebisfrommax/bstepsize==4:
bX=bstepsize-(distancebisfrommax%bstepsize)
elif distancebisfrommax/bstepsize==5:
bX=-(distancebisfrommax%bstepsize)
else:
bX=0
#Now that we have the X coordinates, it is time to find the Y coords
#Starting with the larger of the two numbers:
amaxycoord=circlea
bmaxycoord=circleb
if circlea:
if distanceaisfrommax/stepsize==0:
aY=amaxycoord-2*distanceaisfrommax
elif distanceaisfrommax/stepsize==1:
aY=-amaxycoord-(distanceaisfrommax%stepsize)
elif distanceaisfrommax/stepsize==2:
if amaxycoord==1:
aY=-(2*(amaxycoord))+(distanceaisfrommax%stepsize)
else:
aY=-(2*(amaxycoord-1))+(distanceaisfrommax%stepsize)
elif distanceaisfrommax/stepsize==3:
aY=-amaxycoord+(distanceaisfrommax%stepsize)
elif distanceaisfrommax/stepsize==4:
aY=amaxycoord+(distanceaisfrommax%stepsize)
elif distanceaisfrommax/stepsize==5:
if amaxycoord==1:
aY=(2*(amaxycoord))-(distanceaisfrommax%stepsize)
else:
aY=(2*(amaxycoord-1))-(distanceaisfrommax%stepsize)
else:
aY=0
if circleb:
if distancebisfrommax/bstepsize==0:
bY=bmaxycoord-2*distancebisfrommax
elif distancebisfrommax/bstepsize==1:
bY=-bmaxycoord-(distancebisfrommax%bstepsize)
elif distancebisfrommax/bstepsize==2:
if bmaxycoord==1:
bY=-(2*bmaxycoord)+(distancebisfrommax%bstepsize)
else:
bY=-(2*(bmaxycoord-1))+(distancebisfrommax%bstepsize)
elif distancebisfrommax/bstepsize==3:
bY=-bmaxycoord+(distancebisfrommax%bstepsize)
elif distancebisfrommax/bstepsize==4:
bY=bmaxycoord+(distancebisfrommax%bstepsize)
elif distancebisfrommax/bstepsize==5:
if bmaxycoord==1:
bY=(2*bmaxycoord)-(distancebisfrommax%bstepsize)
else:
bY=(2*(bmaxycoord-1))-(distancebisfrommax%bstepsize)
else:
bY=0
xdiff=(aX-bX)
ydiff=(aY-bY)
if xdiff>ydiff:
dis=xdiff
if ydiff>xdiff:
dis=xdiff+(ydiff-xdiff)/2
print aX, aY, bX,bY,circlea,circleb
| 34.830258
| 85
| 0.616061
| 981
| 9,439
| 5.925586
| 0.153925
| 0.205746
| 0.103217
| 0.117667
| 0.834681
| 0.828832
| 0.828832
| 0.828832
| 0.828832
| 0.828832
| 0
| 0.020688
| 0.288166
| 9,439
| 270
| 86
| 34.959259
| 0.844471
| 0.059222
| 0
| 0.990196
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0.009804
| 0
| 0
| 0
| null | 1
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 9
|
3d523517f113a432e644cae6ff79b964b4a203a1
| 6,345
|
py
|
Python
|
primaseru/base_layouts.py
|
Lukmanhakim112/ppdb
|
c6179478b4c1f0b6cec77a8a059a6e418f6263f1
|
[
"MIT"
] | null | null | null |
primaseru/base_layouts.py
|
Lukmanhakim112/ppdb
|
c6179478b4c1f0b6cec77a8a059a6e418f6263f1
|
[
"MIT"
] | null | null | null |
primaseru/base_layouts.py
|
Lukmanhakim112/ppdb
|
c6179478b4c1f0b6cec77a8a059a6e418f6263f1
|
[
"MIT"
] | null | null | null |
from crispy_forms.layout import Layout, Fieldset, Row, Div, HTML, Field
from crispy_forms.bootstrap import TabHolder, Tab, Accordion, AccordionGroup
STUDENT_BASE_LAYOUT = Layout(
Fieldset(None,
Accordion(
AccordionGroup("Data Diri",
Row(
Div(Field("sex", css_class='custom-select custom-select-sm'), css_class="col-sm-6"),
Div(Field('religion', css_class='custom-select custom-select-sm'), css_class="col-sm-6"),
),
Row(
Div(Field("handpone", css_class='form-control-sm'), css_class="col-sm-6"),
Div(Field("social_media", css_class='form-control-sm'), css_class="col-sm-6"),
),
Row(
Div(Field("city_born", css_class='form-control-sm'), css_class="col-sm-6"),
Div(Field('date_born', css_class='form-control-sm'), css_class="col-sm-6"),
),
Row(
Div(Field('school_origin', css_class='form-control-sm'), css_class="col-sm-6"),
Div(Field("npsn_school_origin", css_class='form-control-sm'), css_class="col-sm-6"),
),
Row(
Div(Field('nisn', css_class='form-control-sm'), css_class="col-sm-6"),
Div(Field("no_regis", css_class='form-control-sm'), css_class="col-sm-6"),
),
Row(
Div(Field("nik", css_class='form-control-sm'), css_class="col-sm-6"),
Div(Field('no_kk', css_class='form-control-sm'), css_class="col-sm-6"),
),
Row(
Div(Field('achievement', css_class='form-control-sm'), css_class="col-sm-12"),
),
),
AccordionGroup("Alamat",
Row(
Div(Field("resident", css_class='form-control-sm'), css_class="col-sm-6"),
Div(Field('transport', css_class='form-control-sm'), css_class="col-sm-6"),
),
Row(
Div(Field('city', css_class='form-control-sm'), css_class="col-sm-6"),
Div(Field("kecamatan", css_class='form-control-sm'), css_class="col-sm-6"),
),
Row(
Div(Field("dusun", css_class='form-control-sm'), css_class="col-sm-4"),
Div(Field('kelurahan', css_class='form-control-sm'), css_class="col-sm-4"),
Div(Field("rt_rw", css_class='form-control-sm'), css_class="col-sm-4"),
),
Row(
Div(Field("address_kk", css_class='form-control-sm'), css_class="col-sm-6"),
Div(Field('real_address', css_class='form-control-sm'), css_class="col-sm-6"),
),
),
AccordionGroup("Catatan Kesehatan",
Row(
Div(Field("blood_type", css_class='custom-select custom-select-sm'), css_class="col-sm-6"),
Div(Field('in_medicine', css_class='form-control-sm'), css_class="col-sm-6"),
),
Row(
Div(Field("private_doctor", css_class='form-control-sm'), css_class="col-sm-6"),
Div(Field('phone_doctor', css_class='form-control-sm'), css_class="col-sm-6"),
),
Row(
Div(Field('medic_record', css_class='form-control-sm auto-size'), css_class="col-sm-12"),
),
)
),
),
)
PARENT_BASE_LAYOUT = Layout(
Fieldset(None,
Row(
Div(Field('full_name', css_class='form-control-sm'), css_class="col-sm-12"),
),
Row(
Div(Field('city_born', css_class='form-control-sm'), css_class="col-sm-6"),
Div(Field('date_born', css_class='form-control-sm'), css_class="col-sm-6"),
),
Row(
Div(Field('nik', css_class='form-control-sm'), css_class="col-sm-6"),
Div(Field('education', css_class='custom-select custom-select-sm'), css_class="col-sm-6"),
),
Row(
Div(Field('job', css_class='form-control-sm'), css_class="col-sm-6"),
Div(Field('salary', css_class='form-control-sm'), css_class="col-sm-6"),
),
Row(
Div(Field('email', css_class='form-control-sm'), css_class="col-sm-6"),
Div(Field('phone', css_class='form-control-sm'), css_class="col-sm-6"),
),
)
)
MAJOR_BASE_LAYOUT = Layout(
Fieldset(None,
Field('first_major', css_class="custom-select custom-select-sm"),
Field('second_major', css_class="custom-select custom-select-sm"),
Field('info', css_class="form-control-sm"),
)
)
FILE_BASE_LAYOUT = Layout(
Fieldset(None,
Row(
Div('ra_sem_1', css_class="col-sm-12"),
),
Row(
Div('ra_sem_2', css_class="col-sm-12"),
),
Row(
Div('ra_sem_3', css_class="col-sm-12"),
),
Row(
Div('ra_sem_4', css_class="col-sm-12"),
),
Row(
Div('ra_sem_5', css_class="col-sm-12"),
),
Row(
Div('color_blind_cert', css_class="col-sm-12"),
),
Row(
Div('healty_cert', css_class="col-sm-12"),
),
)
)
| 48.435115
| 119
| 0.431836
| 665
| 6,345
| 3.930827
| 0.13985
| 0.250956
| 0.180949
| 0.213849
| 0.804514
| 0.761285
| 0.752487
| 0.710406
| 0.710406
| 0.636955
| 0
| 0.015787
| 0.420961
| 6,345
| 130
| 120
| 48.807692
| 0.6957
| 0
| 0
| 0.5
| 0
| 0
| 0.23089
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.016129
| 0
| 0.016129
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 9
|
18096f111414539b782e225eb0603ef87d153401
| 22,829
|
py
|
Python
|
unit_tests/test_ceph_radosgw_context.py
|
dardelean/charm-ceph-radosgw
|
cdc59e2a39db985aef53f8f9d7a14f761aaa96f6
|
[
"ECL-2.0",
"Apache-2.0"
] | null | null | null |
unit_tests/test_ceph_radosgw_context.py
|
dardelean/charm-ceph-radosgw
|
cdc59e2a39db985aef53f8f9d7a14f761aaa96f6
|
[
"ECL-2.0",
"Apache-2.0"
] | null | null | null |
unit_tests/test_ceph_radosgw_context.py
|
dardelean/charm-ceph-radosgw
|
cdc59e2a39db985aef53f8f9d7a14f761aaa96f6
|
[
"ECL-2.0",
"Apache-2.0"
] | null | null | null |
# Copyright 2016 Canonical 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.
from mock import patch
import ceph_radosgw_context as context
import charmhelpers
import charmhelpers.contrib.storage.linux.ceph as ceph
from test_utils import CharmTestCase
TO_PATCH = [
'config',
'log',
'relation_get',
'relation_ids',
'related_units',
'cmp_pkgrevno',
'socket',
'unit_public_ip',
'determine_api_port',
'cmp_pkgrevno',
'leader_get',
'utils',
]
class HAProxyContextTests(CharmTestCase):
def setUp(self):
super(HAProxyContextTests, self).setUp(context, TO_PATCH)
self.relation_get.side_effect = self.test_relation.get
self.config.side_effect = self.test_config.get
self.cmp_pkgrevno.return_value = 1
@patch('charmhelpers.contrib.openstack.context.get_relation_ip')
@patch('charmhelpers.contrib.openstack.context.mkdir')
@patch('charmhelpers.contrib.openstack.context.unit_get')
@patch('charmhelpers.contrib.openstack.context.local_unit')
@patch('charmhelpers.contrib.openstack.context.config')
@patch('charmhelpers.contrib.hahelpers.cluster.config_get')
@patch('charmhelpers.contrib.openstack.context.relation_ids')
@patch('charmhelpers.contrib.hahelpers.cluster.relation_ids')
def test_ctxt(self, _harelation_ids, _ctxtrelation_ids, _haconfig,
_ctxtconfig, _local_unit, _unit_get, _mkdir,
_get_relation_ip):
_unit_get.return_value = '10.0.0.10'
_get_relation_ip.return_value = '10.0.0.10'
_ctxtconfig.side_effect = self.test_config.get
_haconfig.side_effect = self.test_config.get
_harelation_ids.return_value = []
haproxy_context = context.HAProxyContext()
self.utils.listen_port.return_value = 80
self.determine_api_port.return_value = 70
expect = {
'cephradosgw_bind_port': 70,
'service_ports': {'cephradosgw-server': [80, 70]}
}
self.assertEqual(expect, haproxy_context())
class IdentityServiceContextTest(CharmTestCase):
def setUp(self):
super(IdentityServiceContextTest, self).setUp(context, TO_PATCH)
self.relation_get.side_effect = self.test_relation.get
self.config.side_effect = self.test_config.get
self.maxDiff = None
self.cmp_pkgrevno.return_value = 1
self.leader_get.return_value = 'False'
@patch.object(charmhelpers.contrib.openstack.context,
'filter_installed_packages', return_value=['absent-pkg'])
@patch.object(charmhelpers.contrib.openstack.context, 'format_ipv6_addr')
@patch.object(charmhelpers.contrib.openstack.context, 'context_complete')
@patch.object(charmhelpers.contrib.openstack.context, 'relation_get')
@patch.object(charmhelpers.contrib.openstack.context, 'related_units')
@patch.object(charmhelpers.contrib.openstack.context, 'relation_ids')
@patch.object(charmhelpers.contrib.openstack.context, 'log')
def test_ids_ctxt(self, _log, _rids, _runits, _rget, _ctxt_comp,
_format_ipv6_addr, _filter_installed_packages,
jewel_installed=False, cmp_pkgrevno_side_effects=None):
self.cmp_pkgrevno.side_effect = (cmp_pkgrevno_side_effects
if cmp_pkgrevno_side_effects
else [-1, -1])
self.test_config.set('operator-roles', 'Babel')
self.test_config.set('admin-roles', 'Dart')
self.test_config.set('cache-size', '42')
self.relation_ids.return_value = ['identity-service:5']
self.related_units.return_value = ['keystone/0']
_format_ipv6_addr.return_value = False
_rids.return_value = 'rid1'
_runits.return_value = 'runit'
_ctxt_comp.return_value = True
id_data = {
'service_port': 9876,
'service_host': '127.0.0.4',
'service_tenant_id': '2852107b8f8f473aaf0d769c7bbcf86b',
'service_domain_id': '8e50f28a556911e8aaeed33789425d23',
'auth_host': '127.0.0.5',
'auth_port': 5432,
'service_tenant': 'ten',
'service_username': 'admin',
'service_password': 'adminpass',
}
_rget.return_value = id_data
ids_ctxt = context.IdentityServiceContext()
expect = {
'admin_domain_id': '8e50f28a556911e8aaeed33789425d23',
'admin_password': 'adminpass',
'admin_tenant_id': '2852107b8f8f473aaf0d769c7bbcf86b',
'admin_tenant_name': 'ten',
'admin_user': 'admin',
'api_version': '2.0',
'auth_host': '127.0.0.5',
'auth_port': 5432,
'auth_protocol': 'http',
'auth_type': 'keystone',
'namespace_tenants': False,
'cache_size': '42',
'service_host': '127.0.0.4',
'service_port': 9876,
'service_protocol': 'http',
}
if cmp_pkgrevno_side_effects and cmp_pkgrevno_side_effects[1] >= 0:
expect['user_roles'] = 'Babel'
expect['admin_roles'] = 'Dart'
else:
expect['user_roles'] = 'Babel,Dart'
if jewel_installed:
expect['auth_keystone_v3_supported'] = True
self.assertEqual(expect, ids_ctxt())
@patch.object(charmhelpers.contrib.openstack.context,
'filter_installed_packages', return_value=['absent-pkg'])
@patch.object(charmhelpers.contrib.openstack.context, 'format_ipv6_addr')
@patch.object(charmhelpers.contrib.openstack.context, 'context_complete')
@patch.object(charmhelpers.contrib.openstack.context, 'relation_get')
@patch.object(charmhelpers.contrib.openstack.context, 'related_units')
@patch.object(charmhelpers.contrib.openstack.context, 'relation_ids')
@patch.object(charmhelpers.contrib.openstack.context, 'log')
def test_ids_ctxt_with_namespace(self, _log, _rids, _runits, _rget,
_ctxt_comp, _format_ipv6_addr,
_filter_installed_packages,
jewel_installed=False,
cmp_pkgrevno_side_effects=None):
self.cmp_pkgrevno.side_effect = (cmp_pkgrevno_side_effects
if cmp_pkgrevno_side_effects
else [-1, -1])
self.test_config.set('operator-roles', 'Babel')
self.test_config.set('admin-roles', 'Dart')
self.test_config.set('cache-size', '42')
self.relation_ids.return_value = ['identity-service:5']
self.related_units.return_value = ['keystone/0']
_format_ipv6_addr.return_value = False
_rids.return_value = 'rid1'
_runits.return_value = 'runit'
_ctxt_comp.return_value = True
self.leader_get.return_value = 'True'
id_data = {
'service_port': 9876,
'service_host': '127.0.0.4',
'service_tenant_id': '2852107b8f8f473aaf0d769c7bbcf86b',
'service_domain_id': '8e50f28a556911e8aaeed33789425d23',
'auth_host': '127.0.0.5',
'auth_port': 5432,
'service_tenant': 'ten',
'service_username': 'admin',
'service_password': 'adminpass',
}
_rget.return_value = id_data
ids_ctxt = context.IdentityServiceContext()
expect = {
'admin_domain_id': '8e50f28a556911e8aaeed33789425d23',
'admin_password': 'adminpass',
'admin_tenant_id': '2852107b8f8f473aaf0d769c7bbcf86b',
'admin_tenant_name': 'ten',
'admin_user': 'admin',
'api_version': '2.0',
'auth_host': '127.0.0.5',
'auth_port': 5432,
'auth_protocol': 'http',
'auth_type': 'keystone',
'namespace_tenants': True,
'cache_size': '42',
'service_host': '127.0.0.4',
'service_port': 9876,
'service_protocol': 'http',
}
if cmp_pkgrevno_side_effects and cmp_pkgrevno_side_effects[1] >= 0:
expect['user_roles'] = 'Babel'
expect['admin_roles'] = 'Dart'
else:
expect['user_roles'] = 'Babel,Dart'
if jewel_installed:
expect['auth_keystone_v3_supported'] = True
self.assertEqual(expect, ids_ctxt())
@patch.object(charmhelpers.contrib.openstack.context,
'filter_installed_packages', return_value=['absent-pkg'])
@patch.object(charmhelpers.contrib.openstack.context, 'format_ipv6_addr')
@patch.object(charmhelpers.contrib.openstack.context, 'context_complete')
@patch.object(charmhelpers.contrib.openstack.context, 'relation_get')
@patch.object(charmhelpers.contrib.openstack.context, 'related_units')
@patch.object(charmhelpers.contrib.openstack.context, 'relation_ids')
@patch.object(charmhelpers.contrib.openstack.context, 'log')
def test_ids_ctxt_missing_admin_domain_id(
self, _log, _rids, _runits, _rget, _ctxt_comp, _format_ipv6_addr,
_filter_installed_packages, jewel_installed=False):
self.test_config.set('operator-roles', 'Babel')
self.test_config.set('admin-roles', 'Dart')
self.test_config.set('cache-size', '42')
self.relation_ids.return_value = ['identity-service:5']
self.related_units.return_value = ['keystone/0']
_format_ipv6_addr.return_value = False
_rids.return_value = ['rid1']
_runits.return_value = ['runit']
_ctxt_comp.return_value = True
self.cmp_pkgrevno.return_value = -1
if jewel_installed:
self.cmp_pkgrevno.return_value = 0
id_data = {
'service_port': 9876,
'service_host': '127.0.0.4',
'service_tenant_id': '2852107b8f8f473aaf0d769c7bbcf86b',
'auth_host': '127.0.0.5',
'auth_port': 5432,
'service_tenant': 'ten',
'service_username': 'admin',
'service_password': 'adminpass',
}
_rget.return_value = id_data
ids_ctxt = context.IdentityServiceContext()
expect = {
'admin_password': 'adminpass',
'admin_tenant_id': '2852107b8f8f473aaf0d769c7bbcf86b',
'admin_tenant_name': 'ten',
'admin_user': 'admin',
'api_version': '2.0',
'auth_host': '127.0.0.5',
'auth_port': 5432,
'auth_protocol': 'http',
'auth_type': 'keystone',
'namespace_tenants': False,
'cache_size': '42',
'service_host': '127.0.0.4',
'service_port': 9876,
'service_protocol': 'http',
'user_roles': 'Babel,Dart',
}
if jewel_installed:
expect['auth_keystone_v3_supported'] = True
self.assertEqual(expect, ids_ctxt())
@patch.object(charmhelpers.contrib.openstack.context,
'filter_installed_packages', return_value=['absent-pkg'])
@patch.object(charmhelpers.contrib.openstack.context, 'format_ipv6_addr')
@patch.object(charmhelpers.contrib.openstack.context, 'context_complete')
@patch.object(charmhelpers.contrib.openstack.context, 'relation_get')
@patch.object(charmhelpers.contrib.openstack.context, 'related_units')
@patch.object(charmhelpers.contrib.openstack.context, 'relation_ids')
@patch.object(charmhelpers.contrib.openstack.context, 'log')
def test_ids_ctxt_v3(
self, _log, _rids, _runits, _rget, _ctxt_comp, _format_ipv6_addr,
_filter_installed_packages, jewel_installed=False):
self.test_config.set('operator-roles', 'Babel')
self.test_config.set('admin-roles', 'Dart')
self.test_config.set('cache-size', '42')
self.relation_ids.return_value = ['identity-service:5']
self.related_units.return_value = ['keystone/0']
_format_ipv6_addr.return_value = False
_rids.return_value = ['rid1']
_runits.return_value = ['runit']
_ctxt_comp.return_value = True
self.cmp_pkgrevno.return_value = -1
if jewel_installed:
self.cmp_pkgrevno.return_value = 0
id_data = {
'service_port': 9876,
'service_host': '127.0.0.4',
'service_tenant_id': '2852107b8f8f473aaf0d769c7bbcf86b',
'service_domain_id': '8e50f28a556911e8aaeed33789425d23',
'service_domain': 'service_domain',
'auth_host': '127.0.0.5',
'auth_port': 5432,
'service_tenant': 'ten',
'service_username': 'admin',
'service_password': 'adminpass',
'api_version': '3',
}
_rget.return_value = id_data
ids_ctxt = context.IdentityServiceContext()
expect = {
'admin_domain_id': '8e50f28a556911e8aaeed33789425d23',
'admin_domain_name': 'service_domain',
'admin_password': 'adminpass',
'admin_tenant_id': '2852107b8f8f473aaf0d769c7bbcf86b',
'admin_tenant_name': 'ten',
'admin_user': 'admin',
'api_version': '3',
'auth_host': '127.0.0.5',
'auth_port': 5432,
'auth_protocol': 'http',
'auth_type': 'keystone',
'namespace_tenants': False,
'cache_size': '42',
'service_domain_id': '8e50f28a556911e8aaeed33789425d23',
'service_host': '127.0.0.4',
'service_port': 9876,
'service_project_id': '2852107b8f8f473aaf0d769c7bbcf86b',
'service_protocol': 'http',
'user_roles': 'Babel,Dart',
}
if jewel_installed:
expect['auth_keystone_v3_supported'] = True
self.assertEqual(expect, ids_ctxt())
def test_ids_ctxt_jewel(self):
self.test_ids_ctxt(jewel_installed=True,
cmp_pkgrevno_side_effects=[0, -1])
def test_ids_ctxt_luminous(self):
self.test_ids_ctxt(jewel_installed=True,
cmp_pkgrevno_side_effects=[1, 0])
@patch.object(charmhelpers.contrib.openstack.context,
'filter_installed_packages', return_value=['absent-pkg'])
@patch.object(charmhelpers.contrib.openstack.context, 'relation_ids')
@patch.object(charmhelpers.contrib.openstack.context, 'log')
def test_ids_ctxt_no_rels(self, _log, _rids, _filter_installed_packages):
_rids.return_value = []
ids_ctxt = context.IdentityServiceContext()
self.assertEqual(ids_ctxt(), None)
class MonContextTest(CharmTestCase):
def setUp(self):
super(MonContextTest, self).setUp(context, TO_PATCH)
self.config.side_effect = self.test_config.get
self.unit_public_ip.return_value = '10.255.255.255'
self.cmp_pkgrevno.return_value = 1
@patch.object(ceph, 'config', lambda *args:
'{"client.radosgw.gateway": {"rgw init timeout": 60}}')
@patch.object(context, 'ensure_host_resolvable_v6')
def test_ctxt(self, mock_ensure_rsv_v6):
self.socket.gethostname.return_value = 'testhost'
mon_ctxt = context.MonContext()
addresses = ['10.5.4.1', '10.5.4.2', '10.5.4.3']
def _relation_get(attr, unit, rid):
if attr == 'ceph-public-address':
return addresses.pop()
elif attr == 'auth':
return 'cephx'
elif attr == 'rgw.testhost_key':
return 'testkey'
elif attr == 'fsid':
return 'testfsid'
self.relation_get.side_effect = _relation_get
self.relation_ids.return_value = ['mon:6']
self.related_units.return_value = ['ceph/0', 'ceph/1', 'ceph/2']
self.determine_api_port.return_value = 70
expect = {
'auth_supported': 'cephx',
'hostname': 'testhost',
'mon_hosts': '10.5.4.1 10.5.4.2 10.5.4.3',
'old_auth': False,
'systemd_rgw': True,
'unit_public_ip': '10.255.255.255',
'use_syslog': 'false',
'loglevel': 1,
'port': 70,
'client_radosgw_gateway': {'rgw init timeout': 60},
'ipv6': False,
'rgw_zone': None,
'fsid': 'testfsid',
}
self.assertEqual(expect, mon_ctxt())
self.assertFalse(mock_ensure_rsv_v6.called)
self.test_config.set('prefer-ipv6', True)
addresses = ['10.5.4.1', '10.5.4.2', '10.5.4.3']
expect['ipv6'] = True
expect['port'] = "[::]:%s" % (70)
self.assertEqual(expect, mon_ctxt())
self.assertTrue(mock_ensure_rsv_v6.called)
@patch.object(ceph, 'config', lambda *args:
'{"client.radosgw.gateway": {"rgw init timeout": 60}}')
@patch.object(context, 'ensure_host_resolvable_v6')
def test_list_of_addresses_from_ceph_proxy(self, mock_ensure_rsv_v6):
self.socket.gethostname.return_value = 'testhost'
mon_ctxt = context.MonContext()
addresses = ['10.5.4.1 10.5.4.2 10.5.4.3']
self.cmp_pkgrevno.return_value = 1
def _relation_get(attr, unit, rid):
if attr == 'ceph-public-address':
return addresses.pop()
elif attr == 'auth':
return 'cephx'
elif attr == 'rgw.testhost_key':
return 'testkey'
elif attr == 'fsid':
return 'testfsid'
self.relation_get.side_effect = _relation_get
self.relation_ids.return_value = ['mon:6']
self.related_units.return_value = ['ceph-proxy/0']
self.determine_api_port.return_value = 70
expect = {
'auth_supported': 'cephx',
'hostname': 'testhost',
'mon_hosts': '10.5.4.1 10.5.4.2 10.5.4.3',
'old_auth': False,
'systemd_rgw': True,
'unit_public_ip': '10.255.255.255',
'use_syslog': 'false',
'loglevel': 1,
'port': 70,
'client_radosgw_gateway': {'rgw init timeout': 60},
'ipv6': False,
'rgw_zone': None,
'fsid': 'testfsid',
}
self.assertEqual(expect, mon_ctxt())
self.assertFalse(mock_ensure_rsv_v6.called)
self.test_config.set('prefer-ipv6', True)
addresses = ['10.5.4.1 10.5.4.2 10.5.4.3']
expect['ipv6'] = True
expect['port'] = "[::]:%s" % (70)
self.assertEqual(expect, mon_ctxt())
self.assertTrue(mock_ensure_rsv_v6.called)
@patch.object(ceph, 'config', lambda *args:
'{"client.radosgw.gateway": {"rgw init timeout": 60}}')
def test_ctxt_missing_data(self):
self.socket.gethostname.return_value = 'testhost'
mon_ctxt = context.MonContext()
self.relation_get.return_value = None
self.relation_ids.return_value = ['mon:6']
self.related_units.return_value = ['ceph/0', 'ceph/1', 'ceph/2']
self.assertEqual({}, mon_ctxt())
@patch.object(ceph, 'config', lambda *args:
'{"client.radosgw.gateway": {"rgw init timeout": 60}}')
def test_ctxt_inconsistent_auths(self):
self.socket.gethostname.return_value = 'testhost'
mon_ctxt = context.MonContext()
addresses = ['10.5.4.1', '10.5.4.2', '10.5.4.3']
auths = ['cephx', 'cephy', 'cephz']
def _relation_get(attr, unit, rid):
if attr == 'ceph-public-address':
return addresses.pop()
elif attr == 'auth':
return auths.pop()
elif attr == 'rgw.testhost_key':
return 'testkey'
elif attr == 'fsid':
return 'testfsid'
self.relation_get.side_effect = _relation_get
self.relation_ids.return_value = ['mon:6']
self.related_units.return_value = ['ceph/0', 'ceph/1', 'ceph/2']
self.determine_api_port.return_value = 70
expect = {
'auth_supported': 'none',
'hostname': 'testhost',
'mon_hosts': '10.5.4.1 10.5.4.2 10.5.4.3',
'old_auth': False,
'systemd_rgw': True,
'unit_public_ip': '10.255.255.255',
'use_syslog': 'false',
'loglevel': 1,
'port': 70,
'client_radosgw_gateway': {'rgw init timeout': 60},
'ipv6': False,
'rgw_zone': None,
'fsid': 'testfsid',
}
self.assertEqual(expect, mon_ctxt())
@patch.object(ceph, 'config', lambda *args:
'{"client.radosgw.gateway": {"rgw init timeout": 60}}')
def test_ctxt_consistent_auths(self):
self.socket.gethostname.return_value = 'testhost'
mon_ctxt = context.MonContext()
addresses = ['10.5.4.1', '10.5.4.2', '10.5.4.3']
auths = ['cephx', 'cephx', 'cephx']
def _relation_get(attr, unit, rid):
if attr == 'ceph-public-address':
return addresses.pop()
elif attr == 'auth':
return auths.pop()
elif attr == 'rgw.testhost_key':
return 'testkey'
elif attr == 'fsid':
return 'testfsid'
self.relation_get.side_effect = _relation_get
self.relation_ids.return_value = ['mon:6']
self.related_units.return_value = ['ceph/0', 'ceph/1', 'ceph/2']
self.determine_api_port.return_value = 70
expect = {
'auth_supported': 'cephx',
'hostname': 'testhost',
'mon_hosts': '10.5.4.1 10.5.4.2 10.5.4.3',
'old_auth': False,
'systemd_rgw': True,
'unit_public_ip': '10.255.255.255',
'use_syslog': 'false',
'loglevel': 1,
'port': 70,
'client_radosgw_gateway': {'rgw init timeout': 60},
'ipv6': False,
'rgw_zone': None,
'fsid': 'testfsid',
}
self.assertEqual(expect, mon_ctxt())
class ApacheContextTest(CharmTestCase):
def setUp(self):
super(ApacheContextTest, self).setUp(context, TO_PATCH)
self.config.side_effect = self.test_config.get
| 42.042357
| 77
| 0.600727
| 2,517
| 22,829
| 5.178387
| 0.097735
| 0.059076
| 0.079484
| 0.099356
| 0.867347
| 0.834356
| 0.819395
| 0.811263
| 0.808271
| 0.807964
| 0
| 0.052283
| 0.271935
| 22,829
| 542
| 78
| 42.119926
| 0.731905
| 0.023961
| 0
| 0.806517
| 0
| 0.01222
| 0.253099
| 0.063769
| 0
| 0
| 0
| 0
| 0.034623
| 1
| 0.04277
| false
| 0.016293
| 0.010183
| 0
| 0.093686
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
185157c4ded9f6f6d11fda053daf49f2f7984f64
| 126
|
py
|
Python
|
J_Mathematical_Modeling/Section 2/solutionQuestion1.py
|
sylvain2002/CBM101
|
4d9dc4264ce81cc2af58ceaff96fd0ed7a570af5
|
[
"MIT"
] | 7
|
2019-07-03T07:41:55.000Z
|
2022-02-06T20:25:37.000Z
|
J_Mathematical_Modeling/Section 2/solutionQuestion1.py
|
sylvain2002/CBM101
|
4d9dc4264ce81cc2af58ceaff96fd0ed7a570af5
|
[
"MIT"
] | 9
|
2019-03-14T15:15:09.000Z
|
2019-08-01T14:18:21.000Z
|
J_Mathematical_Modeling/Section 2/solutionQuestion1.py
|
sylvain2002/CBM101
|
4d9dc4264ce81cc2af58ceaff96fd0ed7a570af5
|
[
"MIT"
] | 11
|
2019-03-12T10:43:11.000Z
|
2021-10-05T12:15:00.000Z
|
print("No. Because protein a does not affect the total concentration of protein b, it only converts inactive b in active b. ")
| 126
| 126
| 0.777778
| 22
| 126
| 4.454545
| 0.863636
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 126
| 1
| 126
| 126
| 0.933333
| 0
| 0
| 0
| 0
| 1
| 0.92126
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 7
|
187bfbe011f7e111114412c5f585f9f34fa6ab2f
| 550
|
py
|
Python
|
Ryven/custom_src/WidgetBaseClasses.py
|
lidong1266/Ryven-Switch
|
68d1f71e81d6564196f44ca49d5903f06db6a4d9
|
[
"MIT"
] | 18
|
2021-01-18T09:52:41.000Z
|
2022-03-22T10:48:44.000Z
|
Ryven/custom_src/WidgetBaseClasses.py
|
xamofb-xsk/Ryven
|
8c3dcc613098863ae9fb747e62c0bb9d9eb4cef1
|
[
"MIT"
] | null | null | null |
Ryven/custom_src/WidgetBaseClasses.py
|
xamofb-xsk/Ryven
|
8c3dcc613098863ae9fb747e62c0bb9d9eb4cef1
|
[
"MIT"
] | 3
|
2021-01-18T09:49:42.000Z
|
2022-03-22T10:48:47.000Z
|
class MWB:
"""MainWidgetBase"""
def __init__(self, params):
self.parent_node_instance = params
def get_data(self):
data = {}
return data
def set_data(self, data):
pass
def remove_event(self):
pass
class IWB:
"""InputWidgetBase"""
def __init__(self, params):
self.parent_port_instance, self.parent_node_instance = params
def get_data(self):
data = {}
return data
def set_data(self, data):
pass
def remove_event(self):
pass
| 17.741935
| 69
| 0.583636
| 64
| 550
| 4.703125
| 0.3125
| 0.106312
| 0.159468
| 0.112957
| 0.810631
| 0.810631
| 0.664452
| 0.664452
| 0.664452
| 0.664452
| 0
| 0
| 0.318182
| 550
| 30
| 70
| 18.333333
| 0.802667
| 0.054545
| 0
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.4
| false
| 0.2
| 0
| 0
| 0.6
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 7
|
a10c6dd7f7d65e2eedccc0dabdcc5d0d9513cc0b
| 76,325
|
py
|
Python
|
python/ngsi_v2/ngsi_v2/api/entities_api.py
|
orchestracities/sdk
|
9dd1e618d6c013ab916f3880df84c7882f6beec6
|
[
"Apache-2.0"
] | 2
|
2019-12-22T01:01:34.000Z
|
2021-07-03T20:30:03.000Z
|
python/ngsi_v2/ngsi_v2/api/entities_api.py
|
orchestracities/sdk
|
9dd1e618d6c013ab916f3880df84c7882f6beec6
|
[
"Apache-2.0"
] | 2
|
2019-06-06T05:45:45.000Z
|
2019-06-06T09:03:10.000Z
|
python/ngsi_v2/ngsi_v2/api/entities_api.py
|
orchestracities/sdk
|
9dd1e618d6c013ab916f3880df84c7882f6beec6
|
[
"Apache-2.0"
] | 2
|
2021-07-03T20:30:06.000Z
|
2021-11-30T21:55:02.000Z
|
# coding: utf-8
"""
ngsi_v2
NGSI V2 API RC-2018.07 # noqa: E501
The version of the OpenAPI document: 0.2.2
Contact: info@orchestracities.com
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import re # noqa: F401
# python 2 and python 3 compatibility library
import six
from ngsi_v2.api_client import ApiClient
from ngsi_v2.exceptions import (
ApiTypeError,
ApiValueError
)
class EntitiesApi(object):
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
def __init__(self, api_client=None):
if api_client is None:
api_client = ApiClient()
self.api_client = api_client
def create_entity(self, request_body, **kwargs): # noqa: E501
"""create_entity # noqa: E501
The payload is an object representing the entity to be created. The object follows the JSON entity Representation format (described in a [JSON Entity Representation](https://fiware.github.io/specifications/ngsiv2/stable) section). Response: * Successful operation uses 201 Created or 204 No Content (if upsert option is used). Response includes a `Location` header with the URL of the created entity. * Errors use a non-2xx and (optionally) an error payload. See subsection on [Error Responses](https://fiware.github.io/specifications/ngsiv2/stable) for more details. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_entity(request_body, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param dict(str, object) request_body: (required)
:param str fiware_service: When \"-multiservice\" is used, Orion uses the \"Fiware-Service\" HTTP header in the request to identify the service/tenant. If the header is not present in the HTTP request, the default service/tenant is used..
:param str fiware_service_path: Fiware-ServicePath is an optional header. It is assumed that all the entities created without Fiware-ServicePath (or that don't include service path information in the database) belongs to a root scope \"/\" implicitely.
:param str options: Options dictionary
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
return self.create_entity_with_http_info(request_body, **kwargs) # noqa: E501
def create_entity_with_http_info(self, request_body, **kwargs): # noqa: E501
"""create_entity # noqa: E501
The payload is an object representing the entity to be created. The object follows the JSON entity Representation format (described in a [JSON Entity Representation](https://fiware.github.io/specifications/ngsiv2/stable) section). Response: * Successful operation uses 201 Created or 204 No Content (if upsert option is used). Response includes a `Location` header with the URL of the created entity. * Errors use a non-2xx and (optionally) an error payload. See subsection on [Error Responses](https://fiware.github.io/specifications/ngsiv2/stable) for more details. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_entity_with_http_info(request_body, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param dict(str, object) request_body: (required)
:param str fiware_service: When \"-multiservice\" is used, Orion uses the \"Fiware-Service\" HTTP header in the request to identify the service/tenant. If the header is not present in the HTTP request, the default service/tenant is used..
:param str fiware_service_path: Fiware-ServicePath is an optional header. It is assumed that all the entities created without Fiware-ServicePath (or that don't include service path information in the database) belongs to a root scope \"/\" implicitely.
:param str options: Options dictionary
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: None
If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
all_params = ['request_body', 'fiware_service', 'fiware_service_path', 'options'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method create_entity" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'request_body' is set
if ('request_body' not in local_var_params or
local_var_params['request_body'] is None):
raise ApiValueError("Missing the required parameter `request_body` when calling `create_entity`") # noqa: E501
collection_formats = {}
path_params = {}
query_params = []
if 'options' in local_var_params:
query_params.append(('options', local_var_params['options'])) # noqa: E501
header_params = {}
if 'fiware_service' in local_var_params:
header_params['Fiware-Service'] = local_var_params['fiware_service'] # noqa: E501
if 'fiware_service_path' in local_var_params:
header_params['Fiware-ServicePath'] = local_var_params['fiware_service_path'] # noqa: E501
form_params = []
local_var_files = {}
body_params = None
if 'request_body' in local_var_params:
body_params = local_var_params['request_body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['ApiKeyAuth', 'BearerAuth'] # noqa: E501
return self.api_client.call_api(
'/entities', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None, # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
def list_entities(self, **kwargs): # noqa: E501
"""list_entities # noqa: E501
Retrieves a list of entities that match different criteria by id, type, pattern matching (either id or type) and/or those which match a query or geographical query (see [Simple Query Language](https://fiware.github.io/specifications/ngsiv2/stable) and [Geographical Queries](https://fiware.github.io/specifications/ngsiv2/stable)). A given entity has to match all the criteria to be retrieved (i.e., the criteria is combined in a logical AND way). Note that pattern matching query parameters are incompatible (i.e. mutually exclusive) with their corresponding exact matching parameters, i.e. `idPattern` with `id` and `typePattern` with `type`. The response payload is an array containing one object per matching entity. Each entity follows the JSON entity Representation format (described in [JSON Entity Representation](https://fiware.github.io/specifications/ngsiv2/stable) section). Response code: * Successful operation uses 200 OK * Errors use a non-2xx and (optionally) an error payload. See subsection on [Error Responses](https://fiware.github.io/specifications/ngsiv2/stable) for more details. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_entities(async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str fiware_service: When \"-multiservice\" is used, Orion uses the \"Fiware-Service\" HTTP header in the request to identify the service/tenant. If the header is not present in the HTTP request, the default service/tenant is used..
:param str fiware_service_path: Fiware-ServicePath is an optional header. It is assumed that all the entities created without Fiware-ServicePath (or that don't include service path information in the database) belongs to a root scope \"/\" implicitely.
:param str id: A comma-separated list of elements. Retrieve entities whose ID matches one of the elements in the list. Incompatible with `idPattern`.
:param str type: comma-separated list of elements. Retrieve entities whose type matches one of the elements in the list. Incompatible with `typePattern`.
:param str id_pattern: A correctly formated regular expression. Retrieve entities whose ID matches the regular expression. Incompatible with `id`.
:param str type_pattern: A correctly formated regular expression. Retrieve entities whose type matches the regular expression. Incompatible with `type`.
:param str q: A query expression, composed of a list of statements separated by `;`, i.e., q=statement;statements;statement. See [Simple Query Language specification](https://fiware.github.io/specifications/ngsiv2/stable).
:param str mq: A query expression for attribute metadata, composed of a list of statements separated by `;`, i.e., mq=statement1;statement2;statement3. See [Simple Query Language specification](https://fiware.github.io/specifications/ngsiv2/stable).
:param str georel: Spatial relationship between matching entities and a reference shape. See [Geographical Queries](https://fiware.github.io/specifications/ngsiv2/stable).
:param str geometry: Geografical area to which the query is restricted. See [Geographical Queries](https://fiware.github.io/specifications/ngsiv2/stable).
:param str coords: List of latitude-longitude pairs of coordinates separated by `;`. See [Geographical Queries](https://fiware.github.io/specifications/ngsiv2/stable).
:param int limit: Limits the number of entities to be retrieved
:param int offset: Establishes the offset from where entities are retrieved
:param str attrs: Comma-separated list of attribute names whose data are to be included in the response. The attributes are retrieved in the order specified by this parameter. If this parameter is not included, the attributes are retrieved in arbitrary order.
:param str metadata: A list of metadata names to include in the response.
:param str order_by: Criteria for ordering results. See [Ordering Results](https://fiware.github.io/specifications/ngsiv2/stable) section for details.
:param str options: Options dictionary
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: list[Entity]
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
return self.list_entities_with_http_info(**kwargs) # noqa: E501
def list_entities_with_http_info(self, **kwargs): # noqa: E501
"""list_entities # noqa: E501
Retrieves a list of entities that match different criteria by id, type, pattern matching (either id or type) and/or those which match a query or geographical query (see [Simple Query Language](https://fiware.github.io/specifications/ngsiv2/stable) and [Geographical Queries](https://fiware.github.io/specifications/ngsiv2/stable)). A given entity has to match all the criteria to be retrieved (i.e., the criteria is combined in a logical AND way). Note that pattern matching query parameters are incompatible (i.e. mutually exclusive) with their corresponding exact matching parameters, i.e. `idPattern` with `id` and `typePattern` with `type`. The response payload is an array containing one object per matching entity. Each entity follows the JSON entity Representation format (described in [JSON Entity Representation](https://fiware.github.io/specifications/ngsiv2/stable) section). Response code: * Successful operation uses 200 OK * Errors use a non-2xx and (optionally) an error payload. See subsection on [Error Responses](https://fiware.github.io/specifications/ngsiv2/stable) for more details. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_entities_with_http_info(async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str fiware_service: When \"-multiservice\" is used, Orion uses the \"Fiware-Service\" HTTP header in the request to identify the service/tenant. If the header is not present in the HTTP request, the default service/tenant is used..
:param str fiware_service_path: Fiware-ServicePath is an optional header. It is assumed that all the entities created without Fiware-ServicePath (or that don't include service path information in the database) belongs to a root scope \"/\" implicitely.
:param str id: A comma-separated list of elements. Retrieve entities whose ID matches one of the elements in the list. Incompatible with `idPattern`.
:param str type: comma-separated list of elements. Retrieve entities whose type matches one of the elements in the list. Incompatible with `typePattern`.
:param str id_pattern: A correctly formated regular expression. Retrieve entities whose ID matches the regular expression. Incompatible with `id`.
:param str type_pattern: A correctly formated regular expression. Retrieve entities whose type matches the regular expression. Incompatible with `type`.
:param str q: A query expression, composed of a list of statements separated by `;`, i.e., q=statement;statements;statement. See [Simple Query Language specification](https://fiware.github.io/specifications/ngsiv2/stable).
:param str mq: A query expression for attribute metadata, composed of a list of statements separated by `;`, i.e., mq=statement1;statement2;statement3. See [Simple Query Language specification](https://fiware.github.io/specifications/ngsiv2/stable).
:param str georel: Spatial relationship between matching entities and a reference shape. See [Geographical Queries](https://fiware.github.io/specifications/ngsiv2/stable).
:param str geometry: Geografical area to which the query is restricted. See [Geographical Queries](https://fiware.github.io/specifications/ngsiv2/stable).
:param str coords: List of latitude-longitude pairs of coordinates separated by `;`. See [Geographical Queries](https://fiware.github.io/specifications/ngsiv2/stable).
:param int limit: Limits the number of entities to be retrieved
:param int offset: Establishes the offset from where entities are retrieved
:param str attrs: Comma-separated list of attribute names whose data are to be included in the response. The attributes are retrieved in the order specified by this parameter. If this parameter is not included, the attributes are retrieved in arbitrary order.
:param str metadata: A list of metadata names to include in the response.
:param str order_by: Criteria for ordering results. See [Ordering Results](https://fiware.github.io/specifications/ngsiv2/stable) section for details.
:param str options: Options dictionary
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: tuple(list[Entity], status_code(int), headers(HTTPHeaderDict))
If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
all_params = ['fiware_service', 'fiware_service_path', 'id', 'type', 'id_pattern', 'type_pattern', 'q', 'mq', 'georel', 'geometry', 'coords', 'limit', 'offset', 'attrs', 'metadata', 'order_by', 'options'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method list_entities" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
collection_formats = {}
path_params = {}
query_params = []
if 'id' in local_var_params:
query_params.append(('id', local_var_params['id'])) # noqa: E501
if 'type' in local_var_params:
query_params.append(('type', local_var_params['type'])) # noqa: E501
if 'id_pattern' in local_var_params:
query_params.append(('idPattern', local_var_params['id_pattern'])) # noqa: E501
if 'type_pattern' in local_var_params:
query_params.append(('typePattern', local_var_params['type_pattern'])) # noqa: E501
if 'q' in local_var_params:
query_params.append(('q', local_var_params['q'])) # noqa: E501
if 'mq' in local_var_params:
query_params.append(('mq', local_var_params['mq'])) # noqa: E501
if 'georel' in local_var_params:
query_params.append(('georel', local_var_params['georel'])) # noqa: E501
if 'geometry' in local_var_params:
query_params.append(('geometry', local_var_params['geometry'])) # noqa: E501
if 'coords' in local_var_params:
query_params.append(('coords', local_var_params['coords'])) # noqa: E501
if 'limit' in local_var_params:
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
if 'offset' in local_var_params:
query_params.append(('offset', local_var_params['offset'])) # noqa: E501
if 'attrs' in local_var_params:
query_params.append(('attrs', local_var_params['attrs'])) # noqa: E501
if 'metadata' in local_var_params:
query_params.append(('metadata', local_var_params['metadata'])) # noqa: E501
if 'order_by' in local_var_params:
query_params.append(('orderBy', local_var_params['order_by'])) # noqa: E501
if 'options' in local_var_params:
query_params.append(('options', local_var_params['options'])) # noqa: E501
header_params = {}
if 'fiware_service' in local_var_params:
header_params['Fiware-Service'] = local_var_params['fiware_service'] # noqa: E501
if 'fiware_service_path' in local_var_params:
header_params['Fiware-ServicePath'] = local_var_params['fiware_service_path'] # noqa: E501
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['ApiKeyAuth', 'BearerAuth'] # noqa: E501
return self.api_client.call_api(
'/entities', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='list[Entity]', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
def remove_entity(self, entity_id, **kwargs): # noqa: E501
"""remove_entity # noqa: E501
Delete the entity. Response: * Successful operation uses 204 No Content * Errors use a non-2xx and (optionally) an error payload. See subsection on [Error Responses](https://fiware.github.io/specifications/ngsiv2/stable) for more details. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.remove_entity(entity_id, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str entity_id: Id of the entity to be deleted (required)
:param str fiware_service: When \"-multiservice\" is used, Orion uses the \"Fiware-Service\" HTTP header in the request to identify the service/tenant. If the header is not present in the HTTP request, the default service/tenant is used..
:param str fiware_service_path: Fiware-ServicePath is an optional header. It is assumed that all the entities created without Fiware-ServicePath (or that don't include service path information in the database) belongs to a root scope \"/\" implicitely.
:param str type: Entity type, to avoid ambiguity in the case there are several entities with the same entity id.
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
return self.remove_entity_with_http_info(entity_id, **kwargs) # noqa: E501
def remove_entity_with_http_info(self, entity_id, **kwargs): # noqa: E501
"""remove_entity # noqa: E501
Delete the entity. Response: * Successful operation uses 204 No Content * Errors use a non-2xx and (optionally) an error payload. See subsection on [Error Responses](https://fiware.github.io/specifications/ngsiv2/stable) for more details. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.remove_entity_with_http_info(entity_id, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str entity_id: Id of the entity to be deleted (required)
:param str fiware_service: When \"-multiservice\" is used, Orion uses the \"Fiware-Service\" HTTP header in the request to identify the service/tenant. If the header is not present in the HTTP request, the default service/tenant is used..
:param str fiware_service_path: Fiware-ServicePath is an optional header. It is assumed that all the entities created without Fiware-ServicePath (or that don't include service path information in the database) belongs to a root scope \"/\" implicitely.
:param str type: Entity type, to avoid ambiguity in the case there are several entities with the same entity id.
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: None
If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
all_params = ['entity_id', 'fiware_service', 'fiware_service_path', 'type'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method remove_entity" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'entity_id' is set
if ('entity_id' not in local_var_params or
local_var_params['entity_id'] is None):
raise ApiValueError("Missing the required parameter `entity_id` when calling `remove_entity`") # noqa: E501
collection_formats = {}
path_params = {}
if 'entity_id' in local_var_params:
path_params['entityId'] = local_var_params['entity_id'] # noqa: E501
query_params = []
if 'type' in local_var_params:
query_params.append(('type', local_var_params['type'])) # noqa: E501
header_params = {}
if 'fiware_service' in local_var_params:
header_params['Fiware-Service'] = local_var_params['fiware_service'] # noqa: E501
if 'fiware_service_path' in local_var_params:
header_params['Fiware-ServicePath'] = local_var_params['fiware_service_path'] # noqa: E501
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['ApiKeyAuth', 'BearerAuth'] # noqa: E501
return self.api_client.call_api(
'/entities/{entityId}', 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None, # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
def replace_all_entity_attributes(self, entity_id, body, **kwargs): # noqa: E501
"""replace_all_entity_attributes # noqa: E501
The request payload is an object representing the new entity attributes. The object follows the JSON entity Representation format (described in a [JSON Entity Representation](https://fiware.github.io/specifications/ngsiv2/stable) above), except that `id` and `type` are not allowed. The attributes previously existing in the entity are removed and replaced by the ones in the request. Response: * Successful operation uses 204 No Content * Errors use a non-2xx and (optionally) an error payload. See subsection on [Error Responses](https://fiware.github.io/specifications/ngsiv2/stable) for more details. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.replace_all_entity_attributes(entity_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str entity_id: Id of the entity in question. (required)
:param object body: (required)
:param str fiware_service: When \"-multiservice\" is used, Orion uses the \"Fiware-Service\" HTTP header in the request to identify the service/tenant. If the header is not present in the HTTP request, the default service/tenant is used..
:param str fiware_service_path: Fiware-ServicePath is an optional header. It is assumed that all the entities created without Fiware-ServicePath (or that don't include service path information in the database) belongs to a root scope \"/\" implicitely.
:param str type: Entity type, to avoid ambiguity in the case there are several entities with the same entity id.
:param str options: Operations options
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
return self.replace_all_entity_attributes_with_http_info(entity_id, body, **kwargs) # noqa: E501
def replace_all_entity_attributes_with_http_info(self, entity_id, body, **kwargs): # noqa: E501
"""replace_all_entity_attributes # noqa: E501
The request payload is an object representing the new entity attributes. The object follows the JSON entity Representation format (described in a [JSON Entity Representation](https://fiware.github.io/specifications/ngsiv2/stable) above), except that `id` and `type` are not allowed. The attributes previously existing in the entity are removed and replaced by the ones in the request. Response: * Successful operation uses 204 No Content * Errors use a non-2xx and (optionally) an error payload. See subsection on [Error Responses](https://fiware.github.io/specifications/ngsiv2/stable) for more details. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.replace_all_entity_attributes_with_http_info(entity_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str entity_id: Id of the entity in question. (required)
:param object body: (required)
:param str fiware_service: When \"-multiservice\" is used, Orion uses the \"Fiware-Service\" HTTP header in the request to identify the service/tenant. If the header is not present in the HTTP request, the default service/tenant is used..
:param str fiware_service_path: Fiware-ServicePath is an optional header. It is assumed that all the entities created without Fiware-ServicePath (or that don't include service path information in the database) belongs to a root scope \"/\" implicitely.
:param str type: Entity type, to avoid ambiguity in the case there are several entities with the same entity id.
:param str options: Operations options
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: None
If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
all_params = ['entity_id', 'body', 'fiware_service', 'fiware_service_path', 'type', 'options'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method replace_all_entity_attributes" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'entity_id' is set
if ('entity_id' not in local_var_params or
local_var_params['entity_id'] is None):
raise ApiValueError("Missing the required parameter `entity_id` when calling `replace_all_entity_attributes`") # noqa: E501
# verify the required parameter 'body' is set
if ('body' not in local_var_params or
local_var_params['body'] is None):
raise ApiValueError("Missing the required parameter `body` when calling `replace_all_entity_attributes`") # noqa: E501
collection_formats = {}
path_params = {}
if 'entity_id' in local_var_params:
path_params['entityId'] = local_var_params['entity_id'] # noqa: E501
query_params = []
if 'type' in local_var_params:
query_params.append(('type', local_var_params['type'])) # noqa: E501
if 'options' in local_var_params:
query_params.append(('options', local_var_params['options'])) # noqa: E501
header_params = {}
if 'fiware_service' in local_var_params:
header_params['Fiware-Service'] = local_var_params['fiware_service'] # noqa: E501
if 'fiware_service_path' in local_var_params:
header_params['Fiware-ServicePath'] = local_var_params['fiware_service_path'] # noqa: E501
form_params = []
local_var_files = {}
body_params = None
if 'body' in local_var_params:
body_params = local_var_params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['ApiKeyAuth', 'BearerAuth'] # noqa: E501
return self.api_client.call_api(
'/entities/{entityId}/attrs', 'PUT',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None, # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
def retrieve_entity(self, entity_id, **kwargs): # noqa: E501
"""retrieve_entity # noqa: E501
The response is an object representing the entity identified by the ID. The object follows the JSON entity Representation format (described in a [JSON Entity Representation](https://fiware.github.io/specifications/ngsiv2/stable) section). This operation must return one entity element only, but there may be more than one entity with the same ID (e.g. entities with same ID but different types). In such case, an error message is returned, with the HTTP status code set to 409 Conflict. Response: * Successful operation uses 200 OK * Errors use a non-2xx and (optionally) an error payload. See subsection on [Error Responses](https://fiware.github.io/specifications/ngsiv2/stable) for more details. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.retrieve_entity(entity_id, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str entity_id: Id of the entity to be retrieved (required)
:param str fiware_service: When \"-multiservice\" is used, Orion uses the \"Fiware-Service\" HTTP header in the request to identify the service/tenant. If the header is not present in the HTTP request, the default service/tenant is used..
:param str fiware_service_path: Fiware-ServicePath is an optional header. It is assumed that all the entities created without Fiware-ServicePath (or that don't include service path information in the database) belongs to a root scope \"/\" implicitely.
:param str type: Entity type, to avoid ambiguity in case there are several entities with the same entity id.
:param str attrs: Comma-separated list of attribute names whose data must be included in the response. The attributes are retrieved in the order specified by this parameter. If this parameter is not included, the attributes are retrieved in arbitrary order, and all the attributes of the entity are included in the response.
:param str metadata: A list of metadata names to include in the response. See \"Filtering out attributes and metadata\" section for more detail.
:param str options: Options dictionary
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: Entity
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
return self.retrieve_entity_with_http_info(entity_id, **kwargs) # noqa: E501
def retrieve_entity_with_http_info(self, entity_id, **kwargs): # noqa: E501
"""retrieve_entity # noqa: E501
The response is an object representing the entity identified by the ID. The object follows the JSON entity Representation format (described in a [JSON Entity Representation](https://fiware.github.io/specifications/ngsiv2/stable) section). This operation must return one entity element only, but there may be more than one entity with the same ID (e.g. entities with same ID but different types). In such case, an error message is returned, with the HTTP status code set to 409 Conflict. Response: * Successful operation uses 200 OK * Errors use a non-2xx and (optionally) an error payload. See subsection on [Error Responses](https://fiware.github.io/specifications/ngsiv2/stable) for more details. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.retrieve_entity_with_http_info(entity_id, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str entity_id: Id of the entity to be retrieved (required)
:param str fiware_service: When \"-multiservice\" is used, Orion uses the \"Fiware-Service\" HTTP header in the request to identify the service/tenant. If the header is not present in the HTTP request, the default service/tenant is used..
:param str fiware_service_path: Fiware-ServicePath is an optional header. It is assumed that all the entities created without Fiware-ServicePath (or that don't include service path information in the database) belongs to a root scope \"/\" implicitely.
:param str type: Entity type, to avoid ambiguity in case there are several entities with the same entity id.
:param str attrs: Comma-separated list of attribute names whose data must be included in the response. The attributes are retrieved in the order specified by this parameter. If this parameter is not included, the attributes are retrieved in arbitrary order, and all the attributes of the entity are included in the response.
:param str metadata: A list of metadata names to include in the response. See \"Filtering out attributes and metadata\" section for more detail.
:param str options: Options dictionary
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: tuple(Entity, status_code(int), headers(HTTPHeaderDict))
If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
all_params = ['entity_id', 'fiware_service', 'fiware_service_path', 'type', 'attrs', 'metadata', 'options'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method retrieve_entity" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'entity_id' is set
if ('entity_id' not in local_var_params or
local_var_params['entity_id'] is None):
raise ApiValueError("Missing the required parameter `entity_id` when calling `retrieve_entity`") # noqa: E501
collection_formats = {}
path_params = {}
if 'entity_id' in local_var_params:
path_params['entityId'] = local_var_params['entity_id'] # noqa: E501
query_params = []
if 'type' in local_var_params:
query_params.append(('type', local_var_params['type'])) # noqa: E501
if 'attrs' in local_var_params:
query_params.append(('attrs', local_var_params['attrs'])) # noqa: E501
if 'metadata' in local_var_params:
query_params.append(('metadata', local_var_params['metadata'])) # noqa: E501
if 'options' in local_var_params:
query_params.append(('options', local_var_params['options'])) # noqa: E501
header_params = {}
if 'fiware_service' in local_var_params:
header_params['Fiware-Service'] = local_var_params['fiware_service'] # noqa: E501
if 'fiware_service_path' in local_var_params:
header_params['Fiware-ServicePath'] = local_var_params['fiware_service_path'] # noqa: E501
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['ApiKeyAuth', 'BearerAuth'] # noqa: E501
return self.api_client.call_api(
'/entities/{entityId}', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='Entity', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
def retrieve_entity_attributes(self, entity_id, **kwargs): # noqa: E501
"""retrieve_entity_attributes # noqa: E501
This request is similar to retreiving the whole entity, however this one omits the `id` and `type` fields. Just like the general request of getting an entire entity, this operation must return only one entity element. If more than one entity with the same ID is found (e.g. entities with same ID but different type), an error message is returned, with the HTTP status code set to 409 Conflict. Response: * Successful operation uses 200 OK * Errors use a non-2xx and (optionally) an error payload. See subsection on [Error Responses](https://fiware.github.io/specifications/ngsiv2/stable) for more details. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.retrieve_entity_attributes(entity_id, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str entity_id: Id of the entity to be retrieved (required)
:param str fiware_service: When \"-multiservice\" is used, Orion uses the \"Fiware-Service\" HTTP header in the request to identify the service/tenant. If the header is not present in the HTTP request, the default service/tenant is used..
:param str fiware_service_path: Fiware-ServicePath is an optional header. It is assumed that all the entities created without Fiware-ServicePath (or that don't include service path information in the database) belongs to a root scope \"/\" implicitely.
:param str type: Entity type, to avoid ambiguity in the case there are several entities with the same entity id.
:param str attrs: Comma-separated list of attribute names whose data are to be included in the response. The attributes are retrieved in the order specified by this parameter. If this parameter is not included, the attributes are retrieved in arbitrary order, and all the attributes of the entity are included in the response.
:param str metadata: A list of metadata names to include in the response. See [Filtering out attributes and metadata](https://fiware.github.io/specifications/ngsiv2/stable) section for more detail.
:param str options: Options dictionary
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: object
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
return self.retrieve_entity_attributes_with_http_info(entity_id, **kwargs) # noqa: E501
def retrieve_entity_attributes_with_http_info(self, entity_id, **kwargs): # noqa: E501
"""retrieve_entity_attributes # noqa: E501
This request is similar to retreiving the whole entity, however this one omits the `id` and `type` fields. Just like the general request of getting an entire entity, this operation must return only one entity element. If more than one entity with the same ID is found (e.g. entities with same ID but different type), an error message is returned, with the HTTP status code set to 409 Conflict. Response: * Successful operation uses 200 OK * Errors use a non-2xx and (optionally) an error payload. See subsection on [Error Responses](https://fiware.github.io/specifications/ngsiv2/stable) for more details. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.retrieve_entity_attributes_with_http_info(entity_id, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str entity_id: Id of the entity to be retrieved (required)
:param str fiware_service: When \"-multiservice\" is used, Orion uses the \"Fiware-Service\" HTTP header in the request to identify the service/tenant. If the header is not present in the HTTP request, the default service/tenant is used..
:param str fiware_service_path: Fiware-ServicePath is an optional header. It is assumed that all the entities created without Fiware-ServicePath (or that don't include service path information in the database) belongs to a root scope \"/\" implicitely.
:param str type: Entity type, to avoid ambiguity in the case there are several entities with the same entity id.
:param str attrs: Comma-separated list of attribute names whose data are to be included in the response. The attributes are retrieved in the order specified by this parameter. If this parameter is not included, the attributes are retrieved in arbitrary order, and all the attributes of the entity are included in the response.
:param str metadata: A list of metadata names to include in the response. See [Filtering out attributes and metadata](https://fiware.github.io/specifications/ngsiv2/stable) section for more detail.
:param str options: Options dictionary
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: tuple(object, status_code(int), headers(HTTPHeaderDict))
If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
all_params = ['entity_id', 'fiware_service', 'fiware_service_path', 'type', 'attrs', 'metadata', 'options'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method retrieve_entity_attributes" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'entity_id' is set
if ('entity_id' not in local_var_params or
local_var_params['entity_id'] is None):
raise ApiValueError("Missing the required parameter `entity_id` when calling `retrieve_entity_attributes`") # noqa: E501
collection_formats = {}
path_params = {}
if 'entity_id' in local_var_params:
path_params['entityId'] = local_var_params['entity_id'] # noqa: E501
query_params = []
if 'type' in local_var_params:
query_params.append(('type', local_var_params['type'])) # noqa: E501
if 'attrs' in local_var_params:
query_params.append(('attrs', local_var_params['attrs'])) # noqa: E501
if 'metadata' in local_var_params:
query_params.append(('metadata', local_var_params['metadata'])) # noqa: E501
if 'options' in local_var_params:
query_params.append(('options', local_var_params['options'])) # noqa: E501
header_params = {}
if 'fiware_service' in local_var_params:
header_params['Fiware-Service'] = local_var_params['fiware_service'] # noqa: E501
if 'fiware_service_path' in local_var_params:
header_params['Fiware-ServicePath'] = local_var_params['fiware_service_path'] # noqa: E501
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['ApiKeyAuth', 'BearerAuth'] # noqa: E501
return self.api_client.call_api(
'/entities/{entityId}/attrs', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='object', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
def update_existing_entity_attributes(self, entity_id, body, **kwargs): # noqa: E501
"""update_existing_entity_attributes # noqa: E501
The request payload is an object representing the attributes to update. The object follows the JSON entity Representation format (described in [JSON Entity Representation](https://fiware.github.io/specifications/ngsiv2/stable) section), except that `id` and `type` are not allowed. The entity attributes are updated with the ones in the payload. In addition to that, if one or more attributes in the payload doesn't exist in the entity, an error is returned. Response: * Successful operation uses 204 No Content * Errors use a non-2xx and (optionally) an error payload. See subsection on [Error Responses](https://fiware.github.io/specifications/ngsiv2/stable) for more details. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.update_existing_entity_attributes(entity_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str entity_id: Id of the entity to be updated (required)
:param object body: (required)
:param str fiware_service: When \"-multiservice\" is used, Orion uses the \"Fiware-Service\" HTTP header in the request to identify the service/tenant. If the header is not present in the HTTP request, the default service/tenant is used..
:param str fiware_service_path: Fiware-ServicePath is an optional header. It is assumed that all the entities created without Fiware-ServicePath (or that don't include service path information in the database) belongs to a root scope \"/\" implicitely.
:param str type: Entity type, to avoid ambiguity in case there are several entities with the same entity id.
:param str options: Operations options
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
return self.update_existing_entity_attributes_with_http_info(entity_id, body, **kwargs) # noqa: E501
def update_existing_entity_attributes_with_http_info(self, entity_id, body, **kwargs): # noqa: E501
"""update_existing_entity_attributes # noqa: E501
The request payload is an object representing the attributes to update. The object follows the JSON entity Representation format (described in [JSON Entity Representation](https://fiware.github.io/specifications/ngsiv2/stable) section), except that `id` and `type` are not allowed. The entity attributes are updated with the ones in the payload. In addition to that, if one or more attributes in the payload doesn't exist in the entity, an error is returned. Response: * Successful operation uses 204 No Content * Errors use a non-2xx and (optionally) an error payload. See subsection on [Error Responses](https://fiware.github.io/specifications/ngsiv2/stable) for more details. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.update_existing_entity_attributes_with_http_info(entity_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str entity_id: Id of the entity to be updated (required)
:param object body: (required)
:param str fiware_service: When \"-multiservice\" is used, Orion uses the \"Fiware-Service\" HTTP header in the request to identify the service/tenant. If the header is not present in the HTTP request, the default service/tenant is used..
:param str fiware_service_path: Fiware-ServicePath is an optional header. It is assumed that all the entities created without Fiware-ServicePath (or that don't include service path information in the database) belongs to a root scope \"/\" implicitely.
:param str type: Entity type, to avoid ambiguity in case there are several entities with the same entity id.
:param str options: Operations options
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: None
If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
all_params = ['entity_id', 'body', 'fiware_service', 'fiware_service_path', 'type', 'options'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method update_existing_entity_attributes" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'entity_id' is set
if ('entity_id' not in local_var_params or
local_var_params['entity_id'] is None):
raise ApiValueError("Missing the required parameter `entity_id` when calling `update_existing_entity_attributes`") # noqa: E501
# verify the required parameter 'body' is set
if ('body' not in local_var_params or
local_var_params['body'] is None):
raise ApiValueError("Missing the required parameter `body` when calling `update_existing_entity_attributes`") # noqa: E501
collection_formats = {}
path_params = {}
if 'entity_id' in local_var_params:
path_params['entityId'] = local_var_params['entity_id'] # noqa: E501
query_params = []
if 'type' in local_var_params:
query_params.append(('type', local_var_params['type'])) # noqa: E501
if 'options' in local_var_params:
query_params.append(('options', local_var_params['options'])) # noqa: E501
header_params = {}
if 'fiware_service' in local_var_params:
header_params['Fiware-Service'] = local_var_params['fiware_service'] # noqa: E501
if 'fiware_service_path' in local_var_params:
header_params['Fiware-ServicePath'] = local_var_params['fiware_service_path'] # noqa: E501
form_params = []
local_var_files = {}
body_params = None
if 'body' in local_var_params:
body_params = local_var_params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['ApiKeyAuth', 'BearerAuth'] # noqa: E501
return self.api_client.call_api(
'/entities/{entityId}/attrs', 'PATCH',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None, # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
def update_or_append_entity_attributes(self, entity_id, body, **kwargs): # noqa: E501
"""update_or_append_entity_attributes # noqa: E501
The request payload is an object representing the attributes to append or update. The object follows the JSON entity Representation format (described in [JSON Entity Representation](https://fiware.github.io/specifications/ngsiv2/stable) section), except that `id` and `type` are not allowed. The entity attributes are updated with the ones in the payload, depending on whether the `append` operation option is used or not. * If `append` is not used: the entity attributes are updated (if they previously exist) or appended (if they don't previously exist) with the ones in the payload. * If `append` is used (i.e. strict append semantics): all the attributes in the payload not previously existing in the entity are appended. In addition to that, in case some of the attributes in the payload already exist in the entity, an error is returned. Response: * Successful operation uses 204 No Content * Errors use a non-2xx and (optionally) an error payload. See subsection on [Error Responses](https://fiware.github.io/specifications/ngsiv2/stable) for more details. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.update_or_append_entity_attributes(entity_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str entity_id: Entity id to be updated (required)
:param object body: (required)
:param str fiware_service: When \"-multiservice\" is used, Orion uses the \"Fiware-Service\" HTTP header in the request to identify the service/tenant. If the header is not present in the HTTP request, the default service/tenant is used..
:param str fiware_service_path: Fiware-ServicePath is an optional header. It is assumed that all the entities created without Fiware-ServicePath (or that don't include service path information in the database) belongs to a root scope \"/\" implicitely.
:param str type: Entity type, to avoid ambiguity in case there are several entities with the same entity id.
:param str options: Operations options
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
return self.update_or_append_entity_attributes_with_http_info(entity_id, body, **kwargs) # noqa: E501
def update_or_append_entity_attributes_with_http_info(self, entity_id, body, **kwargs): # noqa: E501
"""update_or_append_entity_attributes # noqa: E501
The request payload is an object representing the attributes to append or update. The object follows the JSON entity Representation format (described in [JSON Entity Representation](https://fiware.github.io/specifications/ngsiv2/stable) section), except that `id` and `type` are not allowed. The entity attributes are updated with the ones in the payload, depending on whether the `append` operation option is used or not. * If `append` is not used: the entity attributes are updated (if they previously exist) or appended (if they don't previously exist) with the ones in the payload. * If `append` is used (i.e. strict append semantics): all the attributes in the payload not previously existing in the entity are appended. In addition to that, in case some of the attributes in the payload already exist in the entity, an error is returned. Response: * Successful operation uses 204 No Content * Errors use a non-2xx and (optionally) an error payload. See subsection on [Error Responses](https://fiware.github.io/specifications/ngsiv2/stable) for more details. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.update_or_append_entity_attributes_with_http_info(entity_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str entity_id: Entity id to be updated (required)
:param object body: (required)
:param str fiware_service: When \"-multiservice\" is used, Orion uses the \"Fiware-Service\" HTTP header in the request to identify the service/tenant. If the header is not present in the HTTP request, the default service/tenant is used..
:param str fiware_service_path: Fiware-ServicePath is an optional header. It is assumed that all the entities created without Fiware-ServicePath (or that don't include service path information in the database) belongs to a root scope \"/\" implicitely.
:param str type: Entity type, to avoid ambiguity in case there are several entities with the same entity id.
:param str options: Operations options
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: None
If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
all_params = ['entity_id', 'body', 'fiware_service', 'fiware_service_path', 'type', 'options'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method update_or_append_entity_attributes" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'entity_id' is set
if ('entity_id' not in local_var_params or
local_var_params['entity_id'] is None):
raise ApiValueError("Missing the required parameter `entity_id` when calling `update_or_append_entity_attributes`") # noqa: E501
# verify the required parameter 'body' is set
if ('body' not in local_var_params or
local_var_params['body'] is None):
raise ApiValueError("Missing the required parameter `body` when calling `update_or_append_entity_attributes`") # noqa: E501
collection_formats = {}
path_params = {}
if 'entity_id' in local_var_params:
path_params['entityId'] = local_var_params['entity_id'] # noqa: E501
query_params = []
if 'type' in local_var_params:
query_params.append(('type', local_var_params['type'])) # noqa: E501
if 'options' in local_var_params:
query_params.append(('options', local_var_params['options'])) # noqa: E501
header_params = {}
if 'fiware_service' in local_var_params:
header_params['Fiware-Service'] = local_var_params['fiware_service'] # noqa: E501
if 'fiware_service_path' in local_var_params:
header_params['Fiware-ServicePath'] = local_var_params['fiware_service_path'] # noqa: E501
form_params = []
local_var_files = {}
body_params = None
if 'body' in local_var_params:
body_params = local_var_params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['ApiKeyAuth', 'BearerAuth'] # noqa: E501
return self.api_client.call_api(
'/entities/{entityId}/attrs', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None, # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
| 67.965272
| 1,131
| 0.670226
| 9,748
| 76,325
| 5.081966
| 0.0397
| 0.034559
| 0.055956
| 0.02164
| 0.975777
| 0.971517
| 0.97067
| 0.961263
| 0.958356
| 0.9566
| 0
| 0.011822
| 0.254111
| 76,325
| 1,122
| 1,132
| 68.025847
| 0.858352
| 0.605175
| 0
| 0.797642
| 1
| 0
| 0.209694
| 0.037194
| 0
| 0
| 0
| 0
| 0
| 1
| 0.033399
| false
| 0
| 0.009823
| 0
| 0.076621
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 9
|
a176a94ce5fdd6d4d2bf2a0940411b9533b9d75e
| 74
|
py
|
Python
|
test/type_hint_tests/torch_cuda_random.py
|
wenhaopeter/read_pytorch_code
|
491f989cd918cf08874dd4f671fb7f0142a0bc4f
|
[
"Intel",
"X11"
] | 206
|
2020-11-28T22:56:38.000Z
|
2022-03-27T02:33:04.000Z
|
test/type_hint_tests/torch_cuda_random.py
|
wenhaopeter/read_pytorch_code
|
491f989cd918cf08874dd4f671fb7f0142a0bc4f
|
[
"Intel",
"X11"
] | 19
|
2020-12-09T23:13:14.000Z
|
2022-01-24T23:24:08.000Z
|
test/type_hint_tests/torch_cuda_random.py
|
wenhaopeter/read_pytorch_code
|
491f989cd918cf08874dd4f671fb7f0142a0bc4f
|
[
"Intel",
"X11"
] | 28
|
2020-11-29T15:25:12.000Z
|
2022-01-20T02:16:27.000Z
|
import torch
torch.cuda.manual_seed_all(0)
torch.cuda.manual_seed(1007)
| 12.333333
| 29
| 0.810811
| 13
| 74
| 4.384615
| 0.615385
| 0.315789
| 0.526316
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.073529
| 0.081081
| 74
| 5
| 30
| 14.8
| 0.764706
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 7
|
a1837f59d83519101d3380cc30925b10bba15b2e
| 3,407
|
py
|
Python
|
work2/lib/src/te941.py
|
thinety/te941
|
7e3eb22e107672fa14863c9fb60c6d8d7e3790d2
|
[
"MIT"
] | 1
|
2022-03-03T02:28:54.000Z
|
2022-03-03T02:28:54.000Z
|
work2/lib/src/te941.py
|
thinety/te941
|
7e3eb22e107672fa14863c9fb60c6d8d7e3790d2
|
[
"MIT"
] | null | null | null |
work2/lib/src/te941.py
|
thinety/te941
|
7e3eb22e107672fa14863c9fb60c6d8d7e3790d2
|
[
"MIT"
] | null | null | null |
import torch as _torch
from torch import nn as _nn
class NN1(_nn.Module):
def __init__(self):
super().__init__()
self.body = _nn.Sequential(
_nn.Conv2d(1, 32, kernel_size=3, stride=1, padding='same'),
_nn.ReLU(),
_nn.Conv2d(32, 32, kernel_size=2, stride=2),
_nn.ReLU(),
)
self.head = _nn.Sequential(
_nn.Linear(32 * 14 * 14, 100),
_nn.ReLU(),
_nn.Linear(100, 10),
)
def forward(self, x):
x = self.body(x)
x = _torch.flatten(x, start_dim=1, end_dim=-1)
x = self.head(x)
return x
class NN2(_nn.Module):
def __init__(self):
super().__init__()
self.body = _nn.Sequential(
_nn.Conv2d(1, 32, kernel_size=5, stride=1, padding='same'),
_nn.ReLU(),
_nn.Conv2d(32, 32, kernel_size=2, stride=2),
_nn.ReLU(),
)
self.head = _nn.Sequential(
_nn.Linear(32 * 14 * 14, 100),
_nn.ReLU(),
_nn.Linear(100, 10),
)
def forward(self, x):
x = self.body(x)
x = _torch.flatten(x, start_dim=1, end_dim=-1)
x = self.head(x)
return x
class NN3(_nn.Module):
def __init__(self):
super().__init__()
self.body = _nn.Sequential(
_nn.Conv2d(1, 64, kernel_size=5, stride=1, padding='same'),
_nn.ReLU(),
_nn.Conv2d(64, 64, kernel_size=2, stride=2),
_nn.ReLU(),
)
self.head = _nn.Sequential(
_nn.Linear(64 * 14 * 14, 100),
_nn.ReLU(),
_nn.Linear(100, 10),
)
def forward(self, x):
x = self.body(x)
x = _torch.flatten(x, start_dim=1, end_dim=-1)
x = self.head(x)
return x
class NN4(_nn.Module):
def __init__(self):
super().__init__()
self.body = _nn.Sequential(
_nn.Conv2d(1, 32, kernel_size=3, stride=1, padding='same'),
_nn.ReLU(),
_nn.Conv2d(32, 32, kernel_size=2, stride=2),
_nn.ReLU(),
_nn.Conv2d(32, 64, kernel_size=5, stride=1, padding='same'),
_nn.ReLU(),
_nn.Conv2d(64, 64, kernel_size=2, stride=2),
_nn.ReLU(),
)
self.head = _nn.Sequential(
_nn.Linear(64 * 7 * 7, 100),
_nn.ReLU(),
_nn.Linear(100, 10),
)
def forward(self, x):
x = self.body(x)
x = _torch.flatten(x, start_dim=1, end_dim=-1)
x = self.head(x)
return x
class NN5(_nn.Module):
def __init__(self):
super().__init__()
self.body = _nn.Sequential(
_nn.Conv2d(1, 32, kernel_size=3, stride=1, padding='same'),
_nn.ReLU(),
_nn.Conv2d(32, 32, kernel_size=2, stride=2),
_nn.ReLU(),
_nn.Conv2d(32, 64, kernel_size=5, stride=1, padding='same'),
_nn.ReLU(),
_nn.Conv2d(64, 64, kernel_size=2, stride=2),
_nn.ReLU(),
)
self.head = _nn.Sequential(
_nn.Conv2d(64, 128, kernel_size=1, stride=1),
_nn.ReLU(),
_nn.Conv2d(128, 10, kernel_size=1, stride=1),
)
def forward(self, x):
x = self.body(x)
x = self.head(x)
x = _torch.mean(x, dim=[-2, -1])
return x
| 26.826772
| 72
| 0.493102
| 448
| 3,407
| 3.462054
| 0.102679
| 0.073501
| 0.072211
| 0.090264
| 0.920696
| 0.897485
| 0.897485
| 0.897485
| 0.897485
| 0.880722
| 0
| 0.081167
| 0.356325
| 3,407
| 126
| 73
| 27.039683
| 0.626083
| 0
| 0
| 0.771429
| 0
| 0
| 0.008218
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.095238
| false
| 0
| 0.019048
| 0
| 0.209524
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
a18c36b45d85df2e95a97a0e08b7e612369d95da
| 101
|
py
|
Python
|
src/runner/predictors/__init__.py
|
Tung-I/nips2019_template
|
a1fcf35b7633d192d2706a533731cb8c457ac230
|
[
"MIT"
] | null | null | null |
src/runner/predictors/__init__.py
|
Tung-I/nips2019_template
|
a1fcf35b7633d192d2706a533731cb8c457ac230
|
[
"MIT"
] | null | null | null |
src/runner/predictors/__init__.py
|
Tung-I/nips2019_template
|
a1fcf35b7633d192d2706a533731cb8c457ac230
|
[
"MIT"
] | null | null | null |
from .vipcup_seg_predictor import VIPCUPSegPredictor
from .kits_seg_predictor import KitsSegPredictor
| 50.5
| 52
| 0.910891
| 12
| 101
| 7.333333
| 0.666667
| 0.272727
| 0.409091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.069307
| 101
| 2
| 53
| 50.5
| 0.93617
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 7
|
a1ad6a260b77ccfbddcb9d8e3e4cea19a630205a
| 3,878
|
py
|
Python
|
tests/test_core/test_widget_set.py
|
Vamporelol/py_cui
|
96c1c1832373821c77d51a98212721fd9a339a59
|
[
"BSD-3-Clause"
] | null | null | null |
tests/test_core/test_widget_set.py
|
Vamporelol/py_cui
|
96c1c1832373821c77d51a98212721fd9a339a59
|
[
"BSD-3-Clause"
] | null | null | null |
tests/test_core/test_widget_set.py
|
Vamporelol/py_cui
|
96c1c1832373821c77d51a98212721fd9a339a59
|
[
"BSD-3-Clause"
] | 1
|
2021-06-16T08:56:36.000Z
|
2021-06-16T08:56:36.000Z
|
import pytest # noqa
import py_cui
def test_create(WIDGETSET):
test_widget_set = WIDGETSET(4, 5, 30, 100)
assert test_widget_set._simulated_terminal == [30, 100]
assert test_widget_set._height == 26
assert test_widget_set._width == 100
def test_add_scroll_menu(WIDGETSET):
test_widget_set = WIDGETSET(4, 5, 30, 100)
test_widget_set.add_scroll_menu('Demo', 1, 1)
assert len(test_widget_set.get_widgets().keys()) == 1
for key in test_widget_set.get_widgets().keys():
assert key == 'Widget0'
break
widget = test_widget_set.get_widgets()['Widget0']
assert isinstance(widget, py_cui.widgets.ScrollMenu)
assert widget.get_id() == 'Widget0'
row, col = widget.get_grid_cell()
assert row == 1
assert col == 1
def test_add_checkbox_menu(WIDGETSET):
test_widget_set = WIDGETSET(4, 5, 30, 100)
test_widget_set.add_checkbox_menu('Demo', 1, 1)
assert len(test_widget_set.get_widgets().keys()) == 1
for key in test_widget_set.get_widgets().keys():
assert key == 'Widget0'
break
widget = test_widget_set.get_widgets()['Widget0']
assert isinstance(widget, py_cui.widgets.CheckBoxMenu)
assert widget.get_id() == 'Widget0'
row, col = widget.get_grid_cell()
assert row == 1
assert col == 1
def test_add_label(WIDGETSET):
test_widget_set = WIDGETSET(4, 5, 30, 100)
test_widget_set.add_label('Demo', 1, 1)
assert len(test_widget_set.get_widgets().keys()) == 1
for key in test_widget_set.get_widgets().keys():
assert key == 'Widget0'
break
widget = test_widget_set.get_widgets()['Widget0']
assert isinstance(widget, py_cui.widgets.Label)
assert widget.get_id() == 'Widget0'
row, col = widget.get_grid_cell()
assert row == 1
assert col == 1
def test_add_block_label(WIDGETSET):
test_widget_set = WIDGETSET(4, 5, 30, 100)
test_widget_set.add_block_label('Demo', 1, 1)
assert len(test_widget_set.get_widgets().keys()) == 1
for key in test_widget_set.get_widgets().keys():
assert key == 'Widget0'
break
widget = test_widget_set.get_widgets()['Widget0']
assert isinstance(widget, py_cui.widgets.BlockLabel)
assert widget.get_id() == 'Widget0'
row, col = widget.get_grid_cell()
assert row == 1
assert col == 1
def test_add_text_box(WIDGETSET):
test_widget_set = WIDGETSET(4, 5, 30, 100)
test_widget_set.add_text_box('Demo', 1, 1)
assert len(test_widget_set.get_widgets().keys()) == 1
for key in test_widget_set.get_widgets().keys():
assert key == 'Widget0'
break
widget = test_widget_set.get_widgets()['Widget0']
assert isinstance(widget, py_cui.widgets.TextBox)
assert widget.get_id() == 'Widget0'
row, col = widget.get_grid_cell()
assert row == 1
assert col == 1
def test_add_button(WIDGETSET):
test_widget_set = WIDGETSET(4, 5, 30, 100)
test_widget_set.add_button('Demo', 1, 1)
assert len(test_widget_set.get_widgets().keys()) == 1
for key in test_widget_set.get_widgets().keys():
assert key == 'Widget0'
break
widget = test_widget_set.get_widgets()['Widget0']
assert isinstance(widget, py_cui.widgets.Button)
assert widget.get_id() == 'Widget0'
row, col = widget.get_grid_cell()
assert row == 1
assert col == 1
def test_add_text_block(WIDGETSET):
test_widget_set = WIDGETSET(4, 5, 30, 100)
test_widget_set.add_text_block('Demo', 1, 1)
assert len(test_widget_set.get_widgets().keys()) == 1
for key in test_widget_set.get_widgets().keys():
assert key == 'Widget0'
break
widget = test_widget_set.get_widgets()['Widget0']
assert isinstance(widget, py_cui.widgets.ScrollTextBlock)
assert widget.get_id() == 'Widget0'
row, col = widget.get_grid_cell()
assert row == 1
assert col == 1
| 33.431034
| 61
| 0.675606
| 566
| 3,878
| 4.339223
| 0.091873
| 0.158795
| 0.206433
| 0.136808
| 0.90513
| 0.90513
| 0.887622
| 0.887622
| 0.887622
| 0.87215
| 0
| 0.039304
| 0.199587
| 3,878
| 115
| 62
| 33.721739
| 0.751933
| 0.001031
| 0
| 0.72449
| 0
| 0
| 0.045196
| 0
| 0
| 0
| 0
| 0
| 0.459184
| 1
| 0.081633
| false
| 0
| 0.020408
| 0
| 0.102041
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 9
|
a1f5a8834bd2dc5177bbe32aae76a2226769db7e
| 49,859
|
py
|
Python
|
ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/protocols/trafficendpoint_2a9ee9d883512c1a5bdd5b6b068836f5.py
|
Vibaswan/ixnetwork_restpy
|
239fedc7050890746cbabd71ea1e91c68d9e5cad
|
[
"MIT"
] | null | null | null |
ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/protocols/trafficendpoint_2a9ee9d883512c1a5bdd5b6b068836f5.py
|
Vibaswan/ixnetwork_restpy
|
239fedc7050890746cbabd71ea1e91c68d9e5cad
|
[
"MIT"
] | null | null | null |
ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/protocols/trafficendpoint_2a9ee9d883512c1a5bdd5b6b068836f5.py
|
Vibaswan/ixnetwork_restpy
|
239fedc7050890746cbabd71ea1e91c68d9e5cad
|
[
"MIT"
] | null | null | null |
# MIT LICENSE
#
# Copyright 1997 - 2020 by IXIA Keysight
#
# 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.
from ixnetwork_restpy.base import Base
from ixnetwork_restpy.files import Files
class TrafficEndPoint(Base):
"""Specifies the Traffic Endpoints added to the grid.
The TrafficEndPoint class encapsulates a list of trafficEndPoint resources that are managed by the user.
A list of resources can be retrieved from the server using the TrafficEndPoint.find() method.
The list can be managed by using the TrafficEndPoint.add() and TrafficEndPoint.remove() methods.
"""
__slots__ = ()
_SDM_NAME = 'trafficEndPoint'
_SDM_ATT_MAP = {
'ArpViaInterface': 'arpViaInterface',
'CustomEtherHeaderLength': 'customEtherHeaderLength',
'CustomEtherHeaderValue': 'customEtherHeaderValue',
'CustomEtherType': 'customEtherType',
'CustomIpHeaderLength': 'customIpHeaderLength',
'CustomIpHeaderValue': 'customIpHeaderValue',
'CustomIpProtocol': 'customIpProtocol',
'DestinationPort': 'destinationPort',
'EnableMacInMac': 'enableMacInMac',
'EnableVlan': 'enableVlan',
'EtherType': 'etherType',
'GatewayMac': 'gatewayMac',
'IpAddress': 'ipAddress',
'IpMask': 'ipMask',
'IpProtocol': 'ipProtocol',
'IpTos': 'ipTos',
'Ipv4Dscp': 'ipv4Dscp',
'Ipv4Ecn': 'ipv4Ecn',
'Ipv6Address': 'ipv6Address',
'Ipv6AddressMask': 'ipv6AddressMask',
'Ipv6CustomHeaderLength': 'ipv6CustomHeaderLength',
'Ipv6CustomHeaderValue': 'ipv6CustomHeaderValue',
'Ipv6CustomNextHeader': 'ipv6CustomNextHeader',
'Ipv6Dscp': 'ipv6Dscp',
'Ipv6Ecn': 'ipv6Ecn',
'Ipv6FlowLabel': 'ipv6FlowLabel',
'Ipv6NextHeader': 'ipv6NextHeader',
'MacAddress': 'macAddress',
'MplsInnerMacSource': 'mplsInnerMacSource',
'MplsInnerVlanId': 'mplsInnerVlanId',
'MplsInnerVlanPriority': 'mplsInnerVlanPriority',
'MplsLabel': 'mplsLabel',
'MplsLabelStackSize': 'mplsLabelStackSize',
'MplsPayloadType': 'mplsPayloadType',
'MplsTrafficClass': 'mplsTrafficClass',
'Name': 'name',
'PbbDestinamtionMac': 'pbbDestinamtionMac',
'PbbEtherType': 'pbbEtherType',
'PbbIsId': 'pbbIsId',
'PbbSourceMac': 'pbbSourceMac',
'PbbVlanId': 'pbbVlanId',
'PbbVlanPcp': 'pbbVlanPcp',
'ProtocolInterface': 'protocolInterface',
'RangeSize': 'rangeSize',
'SourcePort': 'sourcePort',
'UdpDestination': 'udpDestination',
'UdpSource': 'udpSource',
'VlanCount': 'vlanCount',
'VlanId': 'vlanId',
'VlanPriority': 'vlanPriority',
}
def __init__(self, parent):
super(TrafficEndPoint, self).__init__(parent)
@property
def ArpViaInterface(self):
"""DEPRECATED
Returns
-------
- bool: If true, ARP request is conveyed through an Interface.
"""
return self._get_attribute(self._SDM_ATT_MAP['ArpViaInterface'])
@ArpViaInterface.setter
def ArpViaInterface(self, value):
self._set_attribute(self._SDM_ATT_MAP['ArpViaInterface'], value)
@property
def CustomEtherHeaderLength(self):
"""DEPRECATED
Returns
-------
- number: Specifies the Custom Header length in bytes.
"""
return self._get_attribute(self._SDM_ATT_MAP['CustomEtherHeaderLength'])
@CustomEtherHeaderLength.setter
def CustomEtherHeaderLength(self, value):
self._set_attribute(self._SDM_ATT_MAP['CustomEtherHeaderLength'], value)
@property
def CustomEtherHeaderValue(self):
"""DEPRECATED
Returns
-------
- str: Specifies the Custom ether Header value.
"""
return self._get_attribute(self._SDM_ATT_MAP['CustomEtherHeaderValue'])
@CustomEtherHeaderValue.setter
def CustomEtherHeaderValue(self, value):
self._set_attribute(self._SDM_ATT_MAP['CustomEtherHeaderValue'], value)
@property
def CustomEtherType(self):
"""DEPRECATED
Returns
-------
- str: Specifies the custom Ether Type. This attribute is of range kind and can take wildcard as input. It is composed of sub-attributes like, startValue, stepValue, repeatCount, wrapCount, and incrementMode.
"""
return self._get_attribute(self._SDM_ATT_MAP['CustomEtherType'])
@CustomEtherType.setter
def CustomEtherType(self, value):
self._set_attribute(self._SDM_ATT_MAP['CustomEtherType'], value)
@property
def CustomIpHeaderLength(self):
"""DEPRECATED
Returns
-------
- number: Specifies the custom Header length in bytes.
"""
return self._get_attribute(self._SDM_ATT_MAP['CustomIpHeaderLength'])
@CustomIpHeaderLength.setter
def CustomIpHeaderLength(self, value):
self._set_attribute(self._SDM_ATT_MAP['CustomIpHeaderLength'], value)
@property
def CustomIpHeaderValue(self):
"""DEPRECATED
Returns
-------
- str: Specifies the Custom Header value.
"""
return self._get_attribute(self._SDM_ATT_MAP['CustomIpHeaderValue'])
@CustomIpHeaderValue.setter
def CustomIpHeaderValue(self, value):
self._set_attribute(self._SDM_ATT_MAP['CustomIpHeaderValue'], value)
@property
def CustomIpProtocol(self):
"""DEPRECATED
Returns
-------
- str: Specifies the custom IP Protocol for the Source Traffic Endpoints. This attribute is of range kind and can take wildcard as input. It is composed of sub-attributes like, startValue, stepValue, repeatCount, wrapCount, and incrementMode.
"""
return self._get_attribute(self._SDM_ATT_MAP['CustomIpProtocol'])
@CustomIpProtocol.setter
def CustomIpProtocol(self, value):
self._set_attribute(self._SDM_ATT_MAP['CustomIpProtocol'], value)
@property
def DestinationPort(self):
"""DEPRECATED
Returns
-------
- str: Specifies the transport destination port. This attribute is of range kind and can take wildcard as input. It is composed of sub-attributes like, startValue, stepValue, repeatCount, wrapCount, and incrementMode.
"""
return self._get_attribute(self._SDM_ATT_MAP['DestinationPort'])
@DestinationPort.setter
def DestinationPort(self, value):
self._set_attribute(self._SDM_ATT_MAP['DestinationPort'], value)
@property
def EnableMacInMac(self):
"""DEPRECATED
Returns
-------
- bool: Enables the PBB-specific fields.
"""
return self._get_attribute(self._SDM_ATT_MAP['EnableMacInMac'])
@EnableMacInMac.setter
def EnableMacInMac(self, value):
self._set_attribute(self._SDM_ATT_MAP['EnableMacInMac'], value)
@property
def EnableVlan(self):
"""DEPRECATED
Returns
-------
- bool: If enabled, VLAN is available.
"""
return self._get_attribute(self._SDM_ATT_MAP['EnableVlan'])
@EnableVlan.setter
def EnableVlan(self, value):
self._set_attribute(self._SDM_ATT_MAP['EnableVlan'], value)
@property
def EtherType(self):
"""DEPRECATED
Returns
-------
- str(custom | ipv4 | ipv6 | mplsUnicast): Specifies the Ether Type to be used.
"""
return self._get_attribute(self._SDM_ATT_MAP['EtherType'])
@EtherType.setter
def EtherType(self, value):
self._set_attribute(self._SDM_ATT_MAP['EtherType'], value)
@property
def GatewayMac(self):
"""DEPRECATED
Returns
-------
- str: Specifies the Gateway MAC address of the source traffic endpoint. This attribute is of range kind and can take wildcard as input. It is composed of sub-attributes like, startValue, stepValue, repeatCount, wrapCount, and incrementMode.
"""
return self._get_attribute(self._SDM_ATT_MAP['GatewayMac'])
@GatewayMac.setter
def GatewayMac(self, value):
self._set_attribute(self._SDM_ATT_MAP['GatewayMac'], value)
@property
def IpAddress(self):
"""DEPRECATED
Returns
-------
- str: Specifies the IPv4 address of the Source Traffic Endpoint. This attribute is of range kind and can take wildcard as input. It is composed of sub-attributes like, startValue, stepValue, repeatCount, wrapCount, and incrementMode.
"""
return self._get_attribute(self._SDM_ATT_MAP['IpAddress'])
@IpAddress.setter
def IpAddress(self, value):
self._set_attribute(self._SDM_ATT_MAP['IpAddress'], value)
@property
def IpMask(self):
"""DEPRECATED
Returns
-------
- number: Specifies the Mask value.
"""
return self._get_attribute(self._SDM_ATT_MAP['IpMask'])
@IpMask.setter
def IpMask(self, value):
self._set_attribute(self._SDM_ATT_MAP['IpMask'], value)
@property
def IpProtocol(self):
"""DEPRECATED
Returns
-------
- str(custom | tcp | udp): Specifies the IP Protocol to be used.
"""
return self._get_attribute(self._SDM_ATT_MAP['IpProtocol'])
@IpProtocol.setter
def IpProtocol(self, value):
self._set_attribute(self._SDM_ATT_MAP['IpProtocol'], value)
@property
def IpTos(self):
"""DEPRECATED
Returns
-------
- str: Specifies the Terms of Service of the IP Protocol. This attribute is of range kind and can take wildcard as input. It is composed of sub-attributes like, startValue, stepValue, repeatCount, wrapCount, and incrementMode.
"""
return self._get_attribute(self._SDM_ATT_MAP['IpTos'])
@IpTos.setter
def IpTos(self, value):
self._set_attribute(self._SDM_ATT_MAP['IpTos'], value)
@property
def Ipv4Dscp(self):
"""DEPRECATED
Returns
-------
- str: Specifies value of Ipv4 DSCP field.
"""
return self._get_attribute(self._SDM_ATT_MAP['Ipv4Dscp'])
@Ipv4Dscp.setter
def Ipv4Dscp(self, value):
self._set_attribute(self._SDM_ATT_MAP['Ipv4Dscp'], value)
@property
def Ipv4Ecn(self):
"""DEPRECATED
Returns
-------
- str: Specifies the IPv4 ECN field, which is actually the last 2 bits of ToS field.
"""
return self._get_attribute(self._SDM_ATT_MAP['Ipv4Ecn'])
@Ipv4Ecn.setter
def Ipv4Ecn(self, value):
self._set_attribute(self._SDM_ATT_MAP['Ipv4Ecn'], value)
@property
def Ipv6Address(self):
"""DEPRECATED
Returns
-------
- str: Specifies the IPv6 address to be used in the traffic endpoint.
"""
return self._get_attribute(self._SDM_ATT_MAP['Ipv6Address'])
@Ipv6Address.setter
def Ipv6Address(self, value):
self._set_attribute(self._SDM_ATT_MAP['Ipv6Address'], value)
@property
def Ipv6AddressMask(self):
"""DEPRECATED
Returns
-------
- number: Specifies the mask of IPv6 address
"""
return self._get_attribute(self._SDM_ATT_MAP['Ipv6AddressMask'])
@Ipv6AddressMask.setter
def Ipv6AddressMask(self, value):
self._set_attribute(self._SDM_ATT_MAP['Ipv6AddressMask'], value)
@property
def Ipv6CustomHeaderLength(self):
"""DEPRECATED
Returns
-------
- number: Specifies the IPv6 custom header length. This indicates the number of bytes in the field IPv6 custom header Value.
"""
return self._get_attribute(self._SDM_ATT_MAP['Ipv6CustomHeaderLength'])
@Ipv6CustomHeaderLength.setter
def Ipv6CustomHeaderLength(self, value):
self._set_attribute(self._SDM_ATT_MAP['Ipv6CustomHeaderLength'], value)
@property
def Ipv6CustomHeaderValue(self):
"""DEPRECATED
Returns
-------
- str: Specifies the IPv6 custom header value. This is populated with hexadecimal byte string containing the protocol header content.
"""
return self._get_attribute(self._SDM_ATT_MAP['Ipv6CustomHeaderValue'])
@Ipv6CustomHeaderValue.setter
def Ipv6CustomHeaderValue(self, value):
self._set_attribute(self._SDM_ATT_MAP['Ipv6CustomHeaderValue'], value)
@property
def Ipv6CustomNextHeader(self):
"""DEPRECATED
Returns
-------
- str: Specifies the custom IPv6 Next header. This has dependency on the field IPv6 Next Header which should be set to custom. It actually specifies the protocol type of header, the actual content and length of protocol header is specified in other fields. Using this custom header, user can send any other protocol header except TCP/UDP.
"""
return self._get_attribute(self._SDM_ATT_MAP['Ipv6CustomNextHeader'])
@Ipv6CustomNextHeader.setter
def Ipv6CustomNextHeader(self, value):
self._set_attribute(self._SDM_ATT_MAP['Ipv6CustomNextHeader'], value)
@property
def Ipv6Dscp(self):
"""DEPRECATED
Returns
-------
- str: Specifies the IPv6 DSCP field. This is the set of first 6 bits of the ToS field.
"""
return self._get_attribute(self._SDM_ATT_MAP['Ipv6Dscp'])
@Ipv6Dscp.setter
def Ipv6Dscp(self, value):
self._set_attribute(self._SDM_ATT_MAP['Ipv6Dscp'], value)
@property
def Ipv6Ecn(self):
"""DEPRECATED
Returns
-------
- str: Specifies the IPv6 ECN field, which is actually the last 2 bits of ToS field.
"""
return self._get_attribute(self._SDM_ATT_MAP['Ipv6Ecn'])
@Ipv6Ecn.setter
def Ipv6Ecn(self, value):
self._set_attribute(self._SDM_ATT_MAP['Ipv6Ecn'], value)
@property
def Ipv6FlowLabel(self):
"""DEPRECATED
Returns
-------
- str: Specifies the IPv6 flow label field.
"""
return self._get_attribute(self._SDM_ATT_MAP['Ipv6FlowLabel'])
@Ipv6FlowLabel.setter
def Ipv6FlowLabel(self, value):
self._set_attribute(self._SDM_ATT_MAP['Ipv6FlowLabel'], value)
@property
def Ipv6NextHeader(self):
"""DEPRECATED
Returns
-------
- str(custom | tcp | udp): Specifies the IPv6 Next header. It can be TCP, UDP or a custom header.
"""
return self._get_attribute(self._SDM_ATT_MAP['Ipv6NextHeader'])
@Ipv6NextHeader.setter
def Ipv6NextHeader(self, value):
self._set_attribute(self._SDM_ATT_MAP['Ipv6NextHeader'], value)
@property
def MacAddress(self):
"""DEPRECATED
Returns
-------
- str: Specifies the MAC Address of the source traffic endpoint. This attribute is of range kind and can take wildcard as input. It is composed of sub-attributes like, startValue, stepValue, repeatCount, wrapCount, and incrementMode.
"""
return self._get_attribute(self._SDM_ATT_MAP['MacAddress'])
@MacAddress.setter
def MacAddress(self, value):
self._set_attribute(self._SDM_ATT_MAP['MacAddress'], value)
@property
def MplsInnerMacSource(self):
"""DEPRECATED
Returns
-------
- str: Specifies the Inner MAC source of MPLS. Applicable when the MPLS payload type is ethernet.
"""
return self._get_attribute(self._SDM_ATT_MAP['MplsInnerMacSource'])
@MplsInnerMacSource.setter
def MplsInnerMacSource(self, value):
self._set_attribute(self._SDM_ATT_MAP['MplsInnerMacSource'], value)
@property
def MplsInnerVlanId(self):
"""DEPRECATED
Returns
-------
- str: Specifies the inner VLAN ID. Applicable when the MPLS payload type is ethernet.
"""
return self._get_attribute(self._SDM_ATT_MAP['MplsInnerVlanId'])
@MplsInnerVlanId.setter
def MplsInnerVlanId(self, value):
self._set_attribute(self._SDM_ATT_MAP['MplsInnerVlanId'], value)
@property
def MplsInnerVlanPriority(self):
"""DEPRECATED
Returns
-------
- str: Specifies the Inner VLAN priority. Applicable when the MPLS payload type is ethernet.
"""
return self._get_attribute(self._SDM_ATT_MAP['MplsInnerVlanPriority'])
@MplsInnerVlanPriority.setter
def MplsInnerVlanPriority(self, value):
self._set_attribute(self._SDM_ATT_MAP['MplsInnerVlanPriority'], value)
@property
def MplsLabel(self):
"""DEPRECATED
Returns
-------
- str: Value of the MPLS label field.
"""
return self._get_attribute(self._SDM_ATT_MAP['MplsLabel'])
@MplsLabel.setter
def MplsLabel(self, value):
self._set_attribute(self._SDM_ATT_MAP['MplsLabel'], value)
@property
def MplsLabelStackSize(self):
"""DEPRECATED
Returns
-------
- number: Specifies the MPLS label stack size. Indicates the number of MPLS tage that are appended. Can take a max of 3.
"""
return self._get_attribute(self._SDM_ATT_MAP['MplsLabelStackSize'])
@MplsLabelStackSize.setter
def MplsLabelStackSize(self, value):
self._set_attribute(self._SDM_ATT_MAP['MplsLabelStackSize'], value)
@property
def MplsPayloadType(self):
"""DEPRECATED
Returns
-------
- str(ethernet | ipv4 | ipv6): Specifies the payload type in MPLS. Can be IPv4/IPv6 (L3) or Ethernet (L2).
"""
return self._get_attribute(self._SDM_ATT_MAP['MplsPayloadType'])
@MplsPayloadType.setter
def MplsPayloadType(self, value):
self._set_attribute(self._SDM_ATT_MAP['MplsPayloadType'], value)
@property
def MplsTrafficClass(self):
"""DEPRECATED
Returns
-------
- str: Specifies the MPLS traffic class.
"""
return self._get_attribute(self._SDM_ATT_MAP['MplsTrafficClass'])
@MplsTrafficClass.setter
def MplsTrafficClass(self, value):
self._set_attribute(self._SDM_ATT_MAP['MplsTrafficClass'], value)
@property
def Name(self):
"""DEPRECATED
Returns
-------
- str: Specifies the name of the Traffic endpoint.
"""
return self._get_attribute(self._SDM_ATT_MAP['Name'])
@Name.setter
def Name(self, value):
self._set_attribute(self._SDM_ATT_MAP['Name'], value)
@property
def PbbDestinamtionMac(self):
"""DEPRECATED
Returns
-------
- str: Specifies the B-Destination MAC.
"""
return self._get_attribute(self._SDM_ATT_MAP['PbbDestinamtionMac'])
@PbbDestinamtionMac.setter
def PbbDestinamtionMac(self, value):
self._set_attribute(self._SDM_ATT_MAP['PbbDestinamtionMac'], value)
@property
def PbbEtherType(self):
"""DEPRECATED
Returns
-------
- str(bEtherType8100 | bEtherType88A8 | bEtherType88E7 | bEtherType9100 | bEtherType9200): Specifies the B-Ether Type.
"""
return self._get_attribute(self._SDM_ATT_MAP['PbbEtherType'])
@PbbEtherType.setter
def PbbEtherType(self, value):
self._set_attribute(self._SDM_ATT_MAP['PbbEtherType'], value)
@property
def PbbIsId(self):
"""DEPRECATED
Returns
-------
- str: Value of the PBB I-SID field.
"""
return self._get_attribute(self._SDM_ATT_MAP['PbbIsId'])
@PbbIsId.setter
def PbbIsId(self, value):
self._set_attribute(self._SDM_ATT_MAP['PbbIsId'], value)
@property
def PbbSourceMac(self):
"""DEPRECATED
Returns
-------
- str: Specifies the B-Source MAC.
"""
return self._get_attribute(self._SDM_ATT_MAP['PbbSourceMac'])
@PbbSourceMac.setter
def PbbSourceMac(self, value):
self._set_attribute(self._SDM_ATT_MAP['PbbSourceMac'], value)
@property
def PbbVlanId(self):
"""DEPRECATED
Returns
-------
- str: Specifies the B-VLAN ID.
"""
return self._get_attribute(self._SDM_ATT_MAP['PbbVlanId'])
@PbbVlanId.setter
def PbbVlanId(self, value):
self._set_attribute(self._SDM_ATT_MAP['PbbVlanId'], value)
@property
def PbbVlanPcp(self):
"""DEPRECATED
Returns
-------
- str: Specifies the B-VLAN priority.
"""
return self._get_attribute(self._SDM_ATT_MAP['PbbVlanPcp'])
@PbbVlanPcp.setter
def PbbVlanPcp(self, value):
self._set_attribute(self._SDM_ATT_MAP['PbbVlanPcp'], value)
@property
def ProtocolInterface(self):
"""DEPRECATED
Returns
-------
- str(None | /api/v1/sessions/1/ixnetwork/vport/.../interface): Specifies the name of the protocol interface being used for this OpenFlow configuration.
"""
return self._get_attribute(self._SDM_ATT_MAP['ProtocolInterface'])
@ProtocolInterface.setter
def ProtocolInterface(self, value):
self._set_attribute(self._SDM_ATT_MAP['ProtocolInterface'], value)
@property
def RangeSize(self):
"""DEPRECATED
Returns
-------
- number: Specifies the size of the traffic range.
"""
return self._get_attribute(self._SDM_ATT_MAP['RangeSize'])
@RangeSize.setter
def RangeSize(self, value):
self._set_attribute(self._SDM_ATT_MAP['RangeSize'], value)
@property
def SourcePort(self):
"""DEPRECATED
Returns
-------
- str: Specifies the transport source port. This attribute is of range kind and can take wildcard as input. It is composed of sub-attributes like, startValue, stepValue, repeatCount, wrapCount, and incrementMode.
"""
return self._get_attribute(self._SDM_ATT_MAP['SourcePort'])
@SourcePort.setter
def SourcePort(self, value):
self._set_attribute(self._SDM_ATT_MAP['SourcePort'], value)
@property
def UdpDestination(self):
"""DEPRECATED
Returns
-------
- str: Value of the UDP destination field.
"""
return self._get_attribute(self._SDM_ATT_MAP['UdpDestination'])
@UdpDestination.setter
def UdpDestination(self, value):
self._set_attribute(self._SDM_ATT_MAP['UdpDestination'], value)
@property
def UdpSource(self):
"""DEPRECATED
Returns
-------
- str: Value of the UDP source field.
"""
return self._get_attribute(self._SDM_ATT_MAP['UdpSource'])
@UdpSource.setter
def UdpSource(self, value):
self._set_attribute(self._SDM_ATT_MAP['UdpSource'], value)
@property
def VlanCount(self):
"""DEPRECATED
Returns
-------
- number: Specifies the VLAN Count.
"""
return self._get_attribute(self._SDM_ATT_MAP['VlanCount'])
@VlanCount.setter
def VlanCount(self, value):
self._set_attribute(self._SDM_ATT_MAP['VlanCount'], value)
@property
def VlanId(self):
"""DEPRECATED
Returns
-------
- str: Specifies the VLAN ID. This attribute is of range kind and can take wildcard as input. It is composed of sub-attributes like, startValue, stepValue, repeatCount, wrapCount, and incrementMode.
"""
return self._get_attribute(self._SDM_ATT_MAP['VlanId'])
@VlanId.setter
def VlanId(self, value):
self._set_attribute(self._SDM_ATT_MAP['VlanId'], value)
@property
def VlanPriority(self):
"""DEPRECATED
Returns
-------
- str: Specifies the VLAN Priority. This attribute is of range kind and can take wildcard as input. It is composed of sub-attributes like, startValue, stepValue, repeatCount, wrapCount, and incrementMode.
"""
return self._get_attribute(self._SDM_ATT_MAP['VlanPriority'])
@VlanPriority.setter
def VlanPriority(self, value):
self._set_attribute(self._SDM_ATT_MAP['VlanPriority'], value)
def update(self, ArpViaInterface=None, CustomEtherHeaderLength=None, CustomEtherHeaderValue=None, CustomEtherType=None, CustomIpHeaderLength=None, CustomIpHeaderValue=None, CustomIpProtocol=None, DestinationPort=None, EnableMacInMac=None, EnableVlan=None, EtherType=None, GatewayMac=None, IpAddress=None, IpMask=None, IpProtocol=None, IpTos=None, Ipv4Dscp=None, Ipv4Ecn=None, Ipv6Address=None, Ipv6AddressMask=None, Ipv6CustomHeaderLength=None, Ipv6CustomHeaderValue=None, Ipv6CustomNextHeader=None, Ipv6Dscp=None, Ipv6Ecn=None, Ipv6FlowLabel=None, Ipv6NextHeader=None, MacAddress=None, MplsInnerMacSource=None, MplsInnerVlanId=None, MplsInnerVlanPriority=None, MplsLabel=None, MplsLabelStackSize=None, MplsPayloadType=None, MplsTrafficClass=None, Name=None, PbbDestinamtionMac=None, PbbEtherType=None, PbbIsId=None, PbbSourceMac=None, PbbVlanId=None, PbbVlanPcp=None, ProtocolInterface=None, RangeSize=None, SourcePort=None, UdpDestination=None, UdpSource=None, VlanCount=None, VlanId=None, VlanPriority=None):
"""Updates trafficEndPoint resource on the server.
Args
----
- ArpViaInterface (bool): If true, ARP request is conveyed through an Interface.
- CustomEtherHeaderLength (number): Specifies the Custom Header length in bytes.
- CustomEtherHeaderValue (str): Specifies the Custom ether Header value.
- CustomEtherType (str): Specifies the custom Ether Type. This attribute is of range kind and can take wildcard as input. It is composed of sub-attributes like, startValue, stepValue, repeatCount, wrapCount, and incrementMode.
- CustomIpHeaderLength (number): Specifies the custom Header length in bytes.
- CustomIpHeaderValue (str): Specifies the Custom Header value.
- CustomIpProtocol (str): Specifies the custom IP Protocol for the Source Traffic Endpoints. This attribute is of range kind and can take wildcard as input. It is composed of sub-attributes like, startValue, stepValue, repeatCount, wrapCount, and incrementMode.
- DestinationPort (str): Specifies the transport destination port. This attribute is of range kind and can take wildcard as input. It is composed of sub-attributes like, startValue, stepValue, repeatCount, wrapCount, and incrementMode.
- EnableMacInMac (bool): Enables the PBB-specific fields.
- EnableVlan (bool): If enabled, VLAN is available.
- EtherType (str(custom | ipv4 | ipv6 | mplsUnicast)): Specifies the Ether Type to be used.
- GatewayMac (str): Specifies the Gateway MAC address of the source traffic endpoint. This attribute is of range kind and can take wildcard as input. It is composed of sub-attributes like, startValue, stepValue, repeatCount, wrapCount, and incrementMode.
- IpAddress (str): Specifies the IPv4 address of the Source Traffic Endpoint. This attribute is of range kind and can take wildcard as input. It is composed of sub-attributes like, startValue, stepValue, repeatCount, wrapCount, and incrementMode.
- IpMask (number): Specifies the Mask value.
- IpProtocol (str(custom | tcp | udp)): Specifies the IP Protocol to be used.
- IpTos (str): Specifies the Terms of Service of the IP Protocol. This attribute is of range kind and can take wildcard as input. It is composed of sub-attributes like, startValue, stepValue, repeatCount, wrapCount, and incrementMode.
- Ipv4Dscp (str): Specifies value of Ipv4 DSCP field.
- Ipv4Ecn (str): Specifies the IPv4 ECN field, which is actually the last 2 bits of ToS field.
- Ipv6Address (str): Specifies the IPv6 address to be used in the traffic endpoint.
- Ipv6AddressMask (number): Specifies the mask of IPv6 address
- Ipv6CustomHeaderLength (number): Specifies the IPv6 custom header length. This indicates the number of bytes in the field IPv6 custom header Value.
- Ipv6CustomHeaderValue (str): Specifies the IPv6 custom header value. This is populated with hexadecimal byte string containing the protocol header content.
- Ipv6CustomNextHeader (str): Specifies the custom IPv6 Next header. This has dependency on the field IPv6 Next Header which should be set to custom. It actually specifies the protocol type of header, the actual content and length of protocol header is specified in other fields. Using this custom header, user can send any other protocol header except TCP/UDP.
- Ipv6Dscp (str): Specifies the IPv6 DSCP field. This is the set of first 6 bits of the ToS field.
- Ipv6Ecn (str): Specifies the IPv6 ECN field, which is actually the last 2 bits of ToS field.
- Ipv6FlowLabel (str): Specifies the IPv6 flow label field.
- Ipv6NextHeader (str(custom | tcp | udp)): Specifies the IPv6 Next header. It can be TCP, UDP or a custom header.
- MacAddress (str): Specifies the MAC Address of the source traffic endpoint. This attribute is of range kind and can take wildcard as input. It is composed of sub-attributes like, startValue, stepValue, repeatCount, wrapCount, and incrementMode.
- MplsInnerMacSource (str): Specifies the Inner MAC source of MPLS. Applicable when the MPLS payload type is ethernet.
- MplsInnerVlanId (str): Specifies the inner VLAN ID. Applicable when the MPLS payload type is ethernet.
- MplsInnerVlanPriority (str): Specifies the Inner VLAN priority. Applicable when the MPLS payload type is ethernet.
- MplsLabel (str): Value of the MPLS label field.
- MplsLabelStackSize (number): Specifies the MPLS label stack size. Indicates the number of MPLS tage that are appended. Can take a max of 3.
- MplsPayloadType (str(ethernet | ipv4 | ipv6)): Specifies the payload type in MPLS. Can be IPv4/IPv6 (L3) or Ethernet (L2).
- MplsTrafficClass (str): Specifies the MPLS traffic class.
- Name (str): Specifies the name of the Traffic endpoint.
- PbbDestinamtionMac (str): Specifies the B-Destination MAC.
- PbbEtherType (str(bEtherType8100 | bEtherType88A8 | bEtherType88E7 | bEtherType9100 | bEtherType9200)): Specifies the B-Ether Type.
- PbbIsId (str): Value of the PBB I-SID field.
- PbbSourceMac (str): Specifies the B-Source MAC.
- PbbVlanId (str): Specifies the B-VLAN ID.
- PbbVlanPcp (str): Specifies the B-VLAN priority.
- ProtocolInterface (str(None | /api/v1/sessions/1/ixnetwork/vport/.../interface)): Specifies the name of the protocol interface being used for this OpenFlow configuration.
- RangeSize (number): Specifies the size of the traffic range.
- SourcePort (str): Specifies the transport source port. This attribute is of range kind and can take wildcard as input. It is composed of sub-attributes like, startValue, stepValue, repeatCount, wrapCount, and incrementMode.
- UdpDestination (str): Value of the UDP destination field.
- UdpSource (str): Value of the UDP source field.
- VlanCount (number): Specifies the VLAN Count.
- VlanId (str): Specifies the VLAN ID. This attribute is of range kind and can take wildcard as input. It is composed of sub-attributes like, startValue, stepValue, repeatCount, wrapCount, and incrementMode.
- VlanPriority (str): Specifies the VLAN Priority. This attribute is of range kind and can take wildcard as input. It is composed of sub-attributes like, startValue, stepValue, repeatCount, wrapCount, and incrementMode.
Raises
------
- ServerError: The server has encountered an uncategorized error condition
"""
return self._update(self._map_locals(self._SDM_ATT_MAP, locals()))
def add(self, ArpViaInterface=None, CustomEtherHeaderLength=None, CustomEtherHeaderValue=None, CustomEtherType=None, CustomIpHeaderLength=None, CustomIpHeaderValue=None, CustomIpProtocol=None, DestinationPort=None, EnableMacInMac=None, EnableVlan=None, EtherType=None, GatewayMac=None, IpAddress=None, IpMask=None, IpProtocol=None, IpTos=None, Ipv4Dscp=None, Ipv4Ecn=None, Ipv6Address=None, Ipv6AddressMask=None, Ipv6CustomHeaderLength=None, Ipv6CustomHeaderValue=None, Ipv6CustomNextHeader=None, Ipv6Dscp=None, Ipv6Ecn=None, Ipv6FlowLabel=None, Ipv6NextHeader=None, MacAddress=None, MplsInnerMacSource=None, MplsInnerVlanId=None, MplsInnerVlanPriority=None, MplsLabel=None, MplsLabelStackSize=None, MplsPayloadType=None, MplsTrafficClass=None, Name=None, PbbDestinamtionMac=None, PbbEtherType=None, PbbIsId=None, PbbSourceMac=None, PbbVlanId=None, PbbVlanPcp=None, ProtocolInterface=None, RangeSize=None, SourcePort=None, UdpDestination=None, UdpSource=None, VlanCount=None, VlanId=None, VlanPriority=None):
"""Adds a new trafficEndPoint resource on the server and adds it to the container.
Args
----
- ArpViaInterface (bool): If true, ARP request is conveyed through an Interface.
- CustomEtherHeaderLength (number): Specifies the Custom Header length in bytes.
- CustomEtherHeaderValue (str): Specifies the Custom ether Header value.
- CustomEtherType (str): Specifies the custom Ether Type. This attribute is of range kind and can take wildcard as input. It is composed of sub-attributes like, startValue, stepValue, repeatCount, wrapCount, and incrementMode.
- CustomIpHeaderLength (number): Specifies the custom Header length in bytes.
- CustomIpHeaderValue (str): Specifies the Custom Header value.
- CustomIpProtocol (str): Specifies the custom IP Protocol for the Source Traffic Endpoints. This attribute is of range kind and can take wildcard as input. It is composed of sub-attributes like, startValue, stepValue, repeatCount, wrapCount, and incrementMode.
- DestinationPort (str): Specifies the transport destination port. This attribute is of range kind and can take wildcard as input. It is composed of sub-attributes like, startValue, stepValue, repeatCount, wrapCount, and incrementMode.
- EnableMacInMac (bool): Enables the PBB-specific fields.
- EnableVlan (bool): If enabled, VLAN is available.
- EtherType (str(custom | ipv4 | ipv6 | mplsUnicast)): Specifies the Ether Type to be used.
- GatewayMac (str): Specifies the Gateway MAC address of the source traffic endpoint. This attribute is of range kind and can take wildcard as input. It is composed of sub-attributes like, startValue, stepValue, repeatCount, wrapCount, and incrementMode.
- IpAddress (str): Specifies the IPv4 address of the Source Traffic Endpoint. This attribute is of range kind and can take wildcard as input. It is composed of sub-attributes like, startValue, stepValue, repeatCount, wrapCount, and incrementMode.
- IpMask (number): Specifies the Mask value.
- IpProtocol (str(custom | tcp | udp)): Specifies the IP Protocol to be used.
- IpTos (str): Specifies the Terms of Service of the IP Protocol. This attribute is of range kind and can take wildcard as input. It is composed of sub-attributes like, startValue, stepValue, repeatCount, wrapCount, and incrementMode.
- Ipv4Dscp (str): Specifies value of Ipv4 DSCP field.
- Ipv4Ecn (str): Specifies the IPv4 ECN field, which is actually the last 2 bits of ToS field.
- Ipv6Address (str): Specifies the IPv6 address to be used in the traffic endpoint.
- Ipv6AddressMask (number): Specifies the mask of IPv6 address
- Ipv6CustomHeaderLength (number): Specifies the IPv6 custom header length. This indicates the number of bytes in the field IPv6 custom header Value.
- Ipv6CustomHeaderValue (str): Specifies the IPv6 custom header value. This is populated with hexadecimal byte string containing the protocol header content.
- Ipv6CustomNextHeader (str): Specifies the custom IPv6 Next header. This has dependency on the field IPv6 Next Header which should be set to custom. It actually specifies the protocol type of header, the actual content and length of protocol header is specified in other fields. Using this custom header, user can send any other protocol header except TCP/UDP.
- Ipv6Dscp (str): Specifies the IPv6 DSCP field. This is the set of first 6 bits of the ToS field.
- Ipv6Ecn (str): Specifies the IPv6 ECN field, which is actually the last 2 bits of ToS field.
- Ipv6FlowLabel (str): Specifies the IPv6 flow label field.
- Ipv6NextHeader (str(custom | tcp | udp)): Specifies the IPv6 Next header. It can be TCP, UDP or a custom header.
- MacAddress (str): Specifies the MAC Address of the source traffic endpoint. This attribute is of range kind and can take wildcard as input. It is composed of sub-attributes like, startValue, stepValue, repeatCount, wrapCount, and incrementMode.
- MplsInnerMacSource (str): Specifies the Inner MAC source of MPLS. Applicable when the MPLS payload type is ethernet.
- MplsInnerVlanId (str): Specifies the inner VLAN ID. Applicable when the MPLS payload type is ethernet.
- MplsInnerVlanPriority (str): Specifies the Inner VLAN priority. Applicable when the MPLS payload type is ethernet.
- MplsLabel (str): Value of the MPLS label field.
- MplsLabelStackSize (number): Specifies the MPLS label stack size. Indicates the number of MPLS tage that are appended. Can take a max of 3.
- MplsPayloadType (str(ethernet | ipv4 | ipv6)): Specifies the payload type in MPLS. Can be IPv4/IPv6 (L3) or Ethernet (L2).
- MplsTrafficClass (str): Specifies the MPLS traffic class.
- Name (str): Specifies the name of the Traffic endpoint.
- PbbDestinamtionMac (str): Specifies the B-Destination MAC.
- PbbEtherType (str(bEtherType8100 | bEtherType88A8 | bEtherType88E7 | bEtherType9100 | bEtherType9200)): Specifies the B-Ether Type.
- PbbIsId (str): Value of the PBB I-SID field.
- PbbSourceMac (str): Specifies the B-Source MAC.
- PbbVlanId (str): Specifies the B-VLAN ID.
- PbbVlanPcp (str): Specifies the B-VLAN priority.
- ProtocolInterface (str(None | /api/v1/sessions/1/ixnetwork/vport/.../interface)): Specifies the name of the protocol interface being used for this OpenFlow configuration.
- RangeSize (number): Specifies the size of the traffic range.
- SourcePort (str): Specifies the transport source port. This attribute is of range kind and can take wildcard as input. It is composed of sub-attributes like, startValue, stepValue, repeatCount, wrapCount, and incrementMode.
- UdpDestination (str): Value of the UDP destination field.
- UdpSource (str): Value of the UDP source field.
- VlanCount (number): Specifies the VLAN Count.
- VlanId (str): Specifies the VLAN ID. This attribute is of range kind and can take wildcard as input. It is composed of sub-attributes like, startValue, stepValue, repeatCount, wrapCount, and incrementMode.
- VlanPriority (str): Specifies the VLAN Priority. This attribute is of range kind and can take wildcard as input. It is composed of sub-attributes like, startValue, stepValue, repeatCount, wrapCount, and incrementMode.
Returns
-------
- self: This instance with all currently retrieved trafficEndPoint resources using find and the newly added trafficEndPoint resources available through an iterator or index
Raises
------
- ServerError: The server has encountered an uncategorized error condition
"""
return self._create(self._map_locals(self._SDM_ATT_MAP, locals()))
def remove(self):
"""Deletes all the contained trafficEndPoint resources in this instance from the server.
Raises
------
- NotFoundError: The requested resource does not exist on the server
- ServerError: The server has encountered an uncategorized error condition
"""
self._delete()
def find(self, ArpViaInterface=None, CustomEtherHeaderLength=None, CustomEtherHeaderValue=None, CustomEtherType=None, CustomIpHeaderLength=None, CustomIpHeaderValue=None, CustomIpProtocol=None, DestinationPort=None, EnableMacInMac=None, EnableVlan=None, EtherType=None, GatewayMac=None, IpAddress=None, IpMask=None, IpProtocol=None, IpTos=None, Ipv4Dscp=None, Ipv4Ecn=None, Ipv6Address=None, Ipv6AddressMask=None, Ipv6CustomHeaderLength=None, Ipv6CustomHeaderValue=None, Ipv6CustomNextHeader=None, Ipv6Dscp=None, Ipv6Ecn=None, Ipv6FlowLabel=None, Ipv6NextHeader=None, MacAddress=None, MplsInnerMacSource=None, MplsInnerVlanId=None, MplsInnerVlanPriority=None, MplsLabel=None, MplsLabelStackSize=None, MplsPayloadType=None, MplsTrafficClass=None, Name=None, PbbDestinamtionMac=None, PbbEtherType=None, PbbIsId=None, PbbSourceMac=None, PbbVlanId=None, PbbVlanPcp=None, ProtocolInterface=None, RangeSize=None, SourcePort=None, UdpDestination=None, UdpSource=None, VlanCount=None, VlanId=None, VlanPriority=None):
"""Finds and retrieves trafficEndPoint resources from the server.
All named parameters are evaluated on the server using regex. The named parameters can be used to selectively retrieve trafficEndPoint resources from the server.
To retrieve an exact match ensure the parameter value starts with ^ and ends with $
By default the find method takes no parameters and will retrieve all trafficEndPoint resources from the server.
Args
----
- ArpViaInterface (bool): If true, ARP request is conveyed through an Interface.
- CustomEtherHeaderLength (number): Specifies the Custom Header length in bytes.
- CustomEtherHeaderValue (str): Specifies the Custom ether Header value.
- CustomEtherType (str): Specifies the custom Ether Type. This attribute is of range kind and can take wildcard as input. It is composed of sub-attributes like, startValue, stepValue, repeatCount, wrapCount, and incrementMode.
- CustomIpHeaderLength (number): Specifies the custom Header length in bytes.
- CustomIpHeaderValue (str): Specifies the Custom Header value.
- CustomIpProtocol (str): Specifies the custom IP Protocol for the Source Traffic Endpoints. This attribute is of range kind and can take wildcard as input. It is composed of sub-attributes like, startValue, stepValue, repeatCount, wrapCount, and incrementMode.
- DestinationPort (str): Specifies the transport destination port. This attribute is of range kind and can take wildcard as input. It is composed of sub-attributes like, startValue, stepValue, repeatCount, wrapCount, and incrementMode.
- EnableMacInMac (bool): Enables the PBB-specific fields.
- EnableVlan (bool): If enabled, VLAN is available.
- EtherType (str(custom | ipv4 | ipv6 | mplsUnicast)): Specifies the Ether Type to be used.
- GatewayMac (str): Specifies the Gateway MAC address of the source traffic endpoint. This attribute is of range kind and can take wildcard as input. It is composed of sub-attributes like, startValue, stepValue, repeatCount, wrapCount, and incrementMode.
- IpAddress (str): Specifies the IPv4 address of the Source Traffic Endpoint. This attribute is of range kind and can take wildcard as input. It is composed of sub-attributes like, startValue, stepValue, repeatCount, wrapCount, and incrementMode.
- IpMask (number): Specifies the Mask value.
- IpProtocol (str(custom | tcp | udp)): Specifies the IP Protocol to be used.
- IpTos (str): Specifies the Terms of Service of the IP Protocol. This attribute is of range kind and can take wildcard as input. It is composed of sub-attributes like, startValue, stepValue, repeatCount, wrapCount, and incrementMode.
- Ipv4Dscp (str): Specifies value of Ipv4 DSCP field.
- Ipv4Ecn (str): Specifies the IPv4 ECN field, which is actually the last 2 bits of ToS field.
- Ipv6Address (str): Specifies the IPv6 address to be used in the traffic endpoint.
- Ipv6AddressMask (number): Specifies the mask of IPv6 address
- Ipv6CustomHeaderLength (number): Specifies the IPv6 custom header length. This indicates the number of bytes in the field IPv6 custom header Value.
- Ipv6CustomHeaderValue (str): Specifies the IPv6 custom header value. This is populated with hexadecimal byte string containing the protocol header content.
- Ipv6CustomNextHeader (str): Specifies the custom IPv6 Next header. This has dependency on the field IPv6 Next Header which should be set to custom. It actually specifies the protocol type of header, the actual content and length of protocol header is specified in other fields. Using this custom header, user can send any other protocol header except TCP/UDP.
- Ipv6Dscp (str): Specifies the IPv6 DSCP field. This is the set of first 6 bits of the ToS field.
- Ipv6Ecn (str): Specifies the IPv6 ECN field, which is actually the last 2 bits of ToS field.
- Ipv6FlowLabel (str): Specifies the IPv6 flow label field.
- Ipv6NextHeader (str(custom | tcp | udp)): Specifies the IPv6 Next header. It can be TCP, UDP or a custom header.
- MacAddress (str): Specifies the MAC Address of the source traffic endpoint. This attribute is of range kind and can take wildcard as input. It is composed of sub-attributes like, startValue, stepValue, repeatCount, wrapCount, and incrementMode.
- MplsInnerMacSource (str): Specifies the Inner MAC source of MPLS. Applicable when the MPLS payload type is ethernet.
- MplsInnerVlanId (str): Specifies the inner VLAN ID. Applicable when the MPLS payload type is ethernet.
- MplsInnerVlanPriority (str): Specifies the Inner VLAN priority. Applicable when the MPLS payload type is ethernet.
- MplsLabel (str): Value of the MPLS label field.
- MplsLabelStackSize (number): Specifies the MPLS label stack size. Indicates the number of MPLS tage that are appended. Can take a max of 3.
- MplsPayloadType (str(ethernet | ipv4 | ipv6)): Specifies the payload type in MPLS. Can be IPv4/IPv6 (L3) or Ethernet (L2).
- MplsTrafficClass (str): Specifies the MPLS traffic class.
- Name (str): Specifies the name of the Traffic endpoint.
- PbbDestinamtionMac (str): Specifies the B-Destination MAC.
- PbbEtherType (str(bEtherType8100 | bEtherType88A8 | bEtherType88E7 | bEtherType9100 | bEtherType9200)): Specifies the B-Ether Type.
- PbbIsId (str): Value of the PBB I-SID field.
- PbbSourceMac (str): Specifies the B-Source MAC.
- PbbVlanId (str): Specifies the B-VLAN ID.
- PbbVlanPcp (str): Specifies the B-VLAN priority.
- ProtocolInterface (str(None | /api/v1/sessions/1/ixnetwork/vport/.../interface)): Specifies the name of the protocol interface being used for this OpenFlow configuration.
- RangeSize (number): Specifies the size of the traffic range.
- SourcePort (str): Specifies the transport source port. This attribute is of range kind and can take wildcard as input. It is composed of sub-attributes like, startValue, stepValue, repeatCount, wrapCount, and incrementMode.
- UdpDestination (str): Value of the UDP destination field.
- UdpSource (str): Value of the UDP source field.
- VlanCount (number): Specifies the VLAN Count.
- VlanId (str): Specifies the VLAN ID. This attribute is of range kind and can take wildcard as input. It is composed of sub-attributes like, startValue, stepValue, repeatCount, wrapCount, and incrementMode.
- VlanPriority (str): Specifies the VLAN Priority. This attribute is of range kind and can take wildcard as input. It is composed of sub-attributes like, startValue, stepValue, repeatCount, wrapCount, and incrementMode.
Returns
-------
- self: This instance with matching trafficEndPoint resources retrieved from the server available through an iterator or index
Raises
------
- ServerError: The server has encountered an uncategorized error condition
"""
return self._select(self._map_locals(self._SDM_ATT_MAP, locals()))
def read(self, href):
"""Retrieves a single instance of trafficEndPoint data from the server.
Args
----
- href (str): An href to the instance to be retrieved
Returns
-------
- self: This instance with the trafficEndPoint resources from the server available through an iterator or index
Raises
------
- NotFoundError: The requested resource does not exist on the server
- ServerError: The server has encountered an uncategorized error condition
"""
return self._read(href)
| 54.431223
| 1,015
| 0.694057
| 5,819
| 49,859
| 5.85427
| 0.06221
| 0.060941
| 0.049316
| 0.039306
| 0.809282
| 0.798744
| 0.751424
| 0.73296
| 0.706364
| 0.638173
| 0
| 0.008594
| 0.218155
| 49,859
| 915
| 1,016
| 54.49071
| 0.865297
| 0.555707
| 0
| 0.135501
| 0
| 0
| 0.139047
| 0.023398
| 0
| 0
| 0
| 0
| 0
| 1
| 0.287263
| false
| 0
| 0.00542
| 0
| 0.449865
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
b80da989fda9e12d79dc5b17815d347d6cfc28a3
| 4,567
|
py
|
Python
|
pyprobecurrent/log/su8230/AnalyzeSU3500LogFiles.py
|
drix00/pyprobecurrent
|
fe9b557fe802084a3f769b42ad2738522856fd73
|
[
"Apache-2.0"
] | null | null | null |
pyprobecurrent/log/su8230/AnalyzeSU3500LogFiles.py
|
drix00/pyprobecurrent
|
fe9b557fe802084a3f769b42ad2738522856fd73
|
[
"Apache-2.0"
] | null | null | null |
pyprobecurrent/log/su8230/AnalyzeSU3500LogFiles.py
|
drix00/pyprobecurrent
|
fe9b557fe802084a3f769b42ad2738522856fd73
|
[
"Apache-2.0"
] | null | null | null |
#!/usr/bin/env python
"""
.. py:currentmodule:: experimental.su8000.log.AnalyzeSU3500LogFiles
.. moduleauthor:: Hendrix Demers <hendrix.demers@mail.mcgill.ca>
Analize Su-3500 log files.
"""
# Script information for the file.
__author__ = "Hendrix Demers (hendrix.demers@mail.mcgill.ca)"
__version__ = ""
__date__ = ""
__copyright__ = "Copyright (c) 2014 Hendrix Demers"
__license__ = ""
# Standard library modules.
import os.path
import logging
# Third party modules.
# Local modules.
from . import LogFiles
# Project modules
# Globals and constants variables.
def analyze20140502():
logging.info("Analyze log files of %s", "20140502")
basepath = r"K:\hdemers\results\experiments\SU3500\logs\Hitachi_20140502"
relativePath = r"PC_SEM\Log"
path = os.path.join(basepath, relativePath)
if os.path.isdir(path):
logging.info("Path exist: %s", path)
logFiles = LogFiles.LogFiles(path)
logFiles.findLogFiles()
logging.info("Number of log files: %i", logFiles.numberLogFiles)
logFile = logFiles.readLastLogFile()
if logFile is not None:
logging.info("Number of lines: %i", logFile.numberLines)
uniqueInterv = logFile.uniqueInterv()
logging.info("Number of unique Interv: %i", len(uniqueInterv))
uniqueFI = logFile.uniqueFI()
logging.info("Number of unique from instrument: %i", len(uniqueFI))
logging.info("Unique from instruments: %s", uniqueFI)
uniqueTI = logFile.uniqueTI()
logging.info("Number of unique to instrument: %i", len(uniqueTI))
logging.info("Unique to instruments: %s", uniqueTI)
uniqueFITI = logFile.uniqueFITI()
logging.info("Number of unique from/to instrument: %i", len(uniqueFITI))
logging.info("Unique from/to instruments:")
for fi, ti in uniqueFITI:
logging.debug(" : %s, %s", fi, ti)
uniqueCodes = logFile.uniqueCodes()
logging.info("Number of unique code: %i", len(uniqueCodes))
logging.info("Unique codes: %s", uniqueCodes)
uniqueFITICode = logFile.uniqueFITICode()
logging.info("Number of unique from/to instrument with code: %i", len(uniqueFITICode))
logging.info("Unique from/to instruments code:")
for fi, ti, code in uniqueFITICode:
logging.info(" : %s, %s, %s", fi, ti, code)
def analyze20141026():
logging.info("Analyze log files of %s", "20141026")
basepath = r"K:\hdemers\results\experiments\SU3500\logs\Hitachi_20141026"
relativePath = r"PC_SEM\Log"
path = os.path.join(basepath, relativePath)
if os.path.isdir(path):
logging.info("Path exist: %s", path)
logFiles = LogFiles.LogFiles(path)
logFiles.findLogFiles()
logging.info("Number of log files: %i", logFiles.numberLogFiles)
logFile = logFiles.readLastLogFile()
if logFile is not None:
logging.info("Number of lines: %i", logFile.numberLines)
uniqueInterv = logFile.uniqueInterv()
logging.info("Number of unique Interv: %i", len(uniqueInterv))
uniqueFI = logFile.uniqueFI()
logging.info("Number of unique from instrument: %i", len(uniqueFI))
logging.info("Unique from instruments: %s", uniqueFI)
uniqueTI = logFile.uniqueTI()
logging.info("Number of unique to instrument: %i", len(uniqueTI))
logging.info("Unique to instruments: %s", uniqueTI)
uniqueFITI = logFile.uniqueFITI()
logging.info("Number of unique from/to instrument: %i", len(uniqueFITI))
logging.info("Unique from/to instruments:")
for fi, ti in uniqueFITI:
logging.debug(" : %s, %s", fi, ti)
uniqueCodes = logFile.uniqueCodes()
logging.info("Number of unique code: %i", len(uniqueCodes))
logging.info("Unique codes: %s", uniqueCodes)
uniqueFITICode = logFile.uniqueFITICode()
logging.info("Number of unique from/to instrument with code: %i", len(uniqueFITICode))
logging.info("Unique from/to instruments code:")
for fi, ti, code in uniqueFITICode:
logging.info(" : %s, %s, %s", fi, ti, code)
def run():
# analyze20140502()
analyze20141026()
if __name__ == '__main__': # pragma: no cover
run()
| 35.130769
| 98
| 0.614408
| 500
| 4,567
| 5.548
| 0.22
| 0.126893
| 0.098053
| 0.109589
| 0.837058
| 0.837058
| 0.837058
| 0.788753
| 0.788753
| 0.751262
| 0
| 0.026284
| 0.266915
| 4,567
| 129
| 99
| 35.403101
| 0.80227
| 0.078826
| 0
| 0.775
| 0
| 0
| 0.290384
| 0.035552
| 0
| 0
| 0
| 0
| 0
| 1
| 0.0375
| false
| 0
| 0.0375
| 0
| 0.075
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
b818633c65cc36ce1c5c51dda452c2d44c462230
| 25,570
|
py
|
Python
|
track_model/track_model_train.py
|
QUVA-Lab/lang-tracker
|
6cb3630471765565b6f2d34a160f0cd51d95a082
|
[
"BSD-2-Clause-FreeBSD"
] | 31
|
2017-09-13T13:40:59.000Z
|
2022-01-25T16:55:19.000Z
|
track_model/track_model_train.py
|
zhenyangli/lang-tracker
|
dddd808a22582573ab0a5e4c3dbf0ba054e42d61
|
[
"BSD-3-Clause"
] | 4
|
2017-09-14T01:56:58.000Z
|
2021-01-28T00:58:58.000Z
|
track_model/track_model_train.py
|
QUVA-Lab/lang-tracker
|
6cb3630471765565b6f2d34a160f0cd51d95a082
|
[
"BSD-2-Clause-FreeBSD"
] | 9
|
2017-09-28T03:22:08.000Z
|
2021-01-19T10:56:44.000Z
|
from __future__ import absolute_import, division, print_function
import numpy as np
import caffe
from caffe import layers as L
from caffe import params as P
channel_mean = np.array([123.68, 116.779, 103.939], dtype=np.float32)
###############################################################################
# Helper Methods
###############################################################################
def conv_relu(bottom, nout, ks=3, stride=1, pad=1, param_names=('conv_w', 'conv_b'), bias_term=True, fix_param=False, finetune=False):
if fix_param:
mult = [dict(name=param_names[0], lr_mult=0, decay_mult=0), dict(name=param_names[1], lr_mult=0, decay_mult=0)]
conv = L.Convolution(bottom, kernel_size=ks, stride=stride,
num_output=nout, pad=pad, param=mult)
else:
if finetune:
mult = [dict(name=param_names[0], lr_mult=0.1, decay_mult=1), dict(name=param_names[1], lr_mult=0.2, decay_mult=0)]
conv = L.Convolution(bottom, kernel_size=ks, stride=stride,
num_output=nout, pad=pad, param=mult)
else:
mult = [dict(name=param_names[0], lr_mult=1, decay_mult=1), dict(name=param_names[1], lr_mult=2, decay_mult=0)]
filler = dict(type='xavier')
conv = L.Convolution(bottom, kernel_size=ks, stride=stride,
num_output=nout, pad=pad, bias_term=bias_term,
param=mult, weight_filler=filler)
return conv, L.ReLU(conv, in_place=True)
def conv(bottom, nout, ks=3, stride=1, pad=1, param_names=('conv_w', 'conv_b'), bias_term=True, fix_param=False, finetune=False):
if fix_param:
mult = [dict(name=param_names[0], lr_mult=0, decay_mult=0), dict(name=param_names[1], lr_mult=0, decay_mult=0)]
conv = L.Convolution(bottom, kernel_size=ks, stride=stride,
num_output=nout, pad=pad, param=mult)
else:
if finetune:
mult = [dict(name=param_names[0], lr_mult=0.1, decay_mult=1), dict(name=param_names[1], lr_mult=0.2, decay_mult=0)]
conv = L.Convolution(bottom, kernel_size=ks, stride=stride,
num_output=nout, pad=pad, param=mult)
else:
mult = [dict(name=param_names[0], lr_mult=1, decay_mult=1), dict(name=param_names[1], lr_mult=2, decay_mult=0)]
filler = dict(type='xavier')
conv = L.Convolution(bottom, kernel_size=ks, stride=stride,
num_output=nout, pad=pad, bias_term=bias_term,
param=mult, weight_filler=filler)
return conv
def max_pool(bottom, ks=2, stride=2):
return L.Pooling(bottom, pool=P.Pooling.MAX, kernel_size=ks, stride=stride)
################################################################################
# Model Generation
###############################################################################
def generate_scores(split, config):
n = caffe.NetSpec()
dataset = config.dataset
batch_size = config.N
mode_str = str(dict(dataset=dataset, split=split, batch_size=batch_size))
n.image1, n.image2, n.label, n.sample_weights, n.feat_crop = L.Python(module=config.data_provider,
layer=config.data_provider_layer,
param_str=mode_str,
ntop=5)
################################
# the base net (VGG-16) branch 1
n.conv1_1, n.relu1_1 = conv_relu(n.image1, 64,
param_names=('conv1_1_w', 'conv1_1_b'),
fix_param=True,
finetune=False)
n.conv1_2, n.relu1_2 = conv_relu(n.relu1_1, 64,
param_names=('conv1_2_w', 'conv1_2_b'),
fix_param=True,
finetune=False)
n.pool1 = max_pool(n.relu1_2)
n.conv2_1, n.relu2_1 = conv_relu(n.pool1, 128,
param_names=('conv2_1_w', 'conv2_1_b'),
fix_param=True,
finetune=False)
n.conv2_2, n.relu2_2 = conv_relu(n.relu2_1, 128,
param_names=('conv2_2_w', 'conv2_2_b'),
fix_param=True,
finetune=False)
n.pool2 = max_pool(n.relu2_2)
n.conv3_1, n.relu3_1 = conv_relu(n.pool2, 256,
param_names=('conv3_1_w', 'conv3_1_b'),
fix_param=config.fix_vgg,
finetune=config.finetune)
n.conv3_2, n.relu3_2 = conv_relu(n.relu3_1, 256,
param_names=('conv3_2_w', 'conv3_2_b'),
fix_param=config.fix_vgg,
finetune=config.finetune)
n.conv3_3, n.relu3_3 = conv_relu(n.relu3_2, 256,
param_names=('conv3_3_w', 'conv3_3_b'),
fix_param=config.fix_vgg,
finetune=config.finetune)
n.pool3 = max_pool(n.relu3_3)
# spatial L2 norm
n.pool3_lrn = L.LRN(n.pool3, local_size=513, alpha=513, beta=0.5, k=1e-16)
n.conv4_1, n.relu4_1 = conv_relu(n.pool3, 512,
param_names=('conv4_1_w', 'conv4_1_b'),
fix_param=config.fix_vgg,
finetune=config.finetune)
n.conv4_2, n.relu4_2 = conv_relu(n.relu4_1, 512,
param_names=('conv4_2_w', 'conv4_2_b'),
fix_param=config.fix_vgg,
finetune=config.finetune)
n.conv4_3, n.relu4_3 = conv_relu(n.relu4_2, 512,
param_names=('conv4_3_w', 'conv4_3_b'),
fix_param=config.fix_vgg,
finetune=config.finetune)
# spatial L2 norm
n.relu4_3_lrn = L.LRN(n.relu4_3, local_size=1025, alpha=1025, beta=0.5, k=1e-16)
#n.pool4 = max_pool(n.relu4_3)
#n.conv5_1, n.relu5_1 = conv_relu(n.pool4, 512,
# param_names=('conv5_1_w', 'conv5_1_b'),
# fix_param=config.fix_vgg,
# finetune=config.finetune)
#n.conv5_2, n.relu5_2 = conv_relu(n.relu5_1, 512,
# param_names=('conv5_2_w', 'conv5_2_b'),
# fix_param=config.fix_vgg,
# finetune=config.finetune)
#n.conv5_3, n.relu5_3 = conv_relu(n.relu5_2, 512,
# param_names=('conv5_3_w', 'conv5_3_b'),
# fix_param=config.fix_vgg,
# finetune=config.finetune)
# upsampling feature map
#n.relu5_3_upsampling = L.Deconvolution(n.relu5_3,
# convolution_param=dict(num_output=512,
# group=512,
# kernel_size=4,
# stride=2,
# pad=1,
# bias_term=False,
# weight_filler=dict(type='bilinear')),
# param=[dict(lr_mult=0, decay_mult=0)])
# spatial L2 norm
#n.relu5_3_lrn = L.LRN(n.relu5_3_upsampling, local_size=1025, alpha=1025, beta=0.5, k=1e-16)
# concat all skip features
#n.feat_all1 = n.relu4_3_lrn
n.feat_all1 = L.Concat(n.pool3_lrn, n.relu4_3_lrn, concat_param=dict(axis=1))
#n.feat_all1 = L.Concat(n.pool3_lrn, n.relu4_3_lrn, n.relu5_3_lrn, concat_param=dict(axis=1))
n.feat_all1_crop = L.Crop(n.feat_all1, n.feat_crop, crop_param=dict(axis=2, offset=[config.query_featmap_H//3, config.query_featmap_W//3]))
################################
# the base net (VGG-16) branch 2
n.conv1_1_p, n.relu1_1_p = conv_relu(n.image2, 64,
param_names=('conv1_1_w', 'conv1_1_b'),
fix_param=True,
finetune=False)
n.conv1_2_p, n.relu1_2_p = conv_relu(n.relu1_1_p, 64,
param_names=('conv1_2_w', 'conv1_2_b'),
fix_param=True,
finetune=False)
n.pool1_p = max_pool(n.relu1_2_p)
n.conv2_1_p, n.relu2_1_p = conv_relu(n.pool1_p, 128,
param_names=('conv2_1_w', 'conv2_1_b'),
fix_param=True,
finetune=False)
n.conv2_2_p, n.relu2_2_p = conv_relu(n.relu2_1_p, 128,
param_names=('conv2_2_w', 'conv2_2_b'),
fix_param=True,
finetune=False)
n.pool2_p = max_pool(n.relu2_2_p)
n.conv3_1_p, n.relu3_1_p = conv_relu(n.pool2_p, 256,
param_names=('conv3_1_w', 'conv3_1_b'),
fix_param=config.fix_vgg,
finetune=config.finetune)
n.conv3_2_p, n.relu3_2_p = conv_relu(n.relu3_1_p, 256,
param_names=('conv3_2_w', 'conv3_2_b'),
fix_param=config.fix_vgg,
finetune=config.finetune)
n.conv3_3_p, n.relu3_3_p = conv_relu(n.relu3_2_p, 256,
param_names=('conv3_3_w', 'conv3_3_b'),
fix_param=config.fix_vgg,
finetune=config.finetune)
n.pool3_p = max_pool(n.relu3_3_p)
# spatial L2 norm
n.pool3_lrn_p = L.LRN(n.pool3_p, local_size=513, alpha=513, beta=0.5, k=1e-16)
n.conv4_1_p, n.relu4_1_p = conv_relu(n.pool3_p, 512,
param_names=('conv4_1_w', 'conv4_1_b'),
fix_param=config.fix_vgg,
finetune=config.finetune)
n.conv4_2_p, n.relu4_2_p = conv_relu(n.relu4_1_p, 512,
param_names=('conv4_2_w', 'conv4_2_b'),
fix_param=config.fix_vgg,
finetune=config.finetune)
n.conv4_3_p, n.relu4_3_p = conv_relu(n.relu4_2_p, 512,
param_names=('conv4_3_w', 'conv4_3_b'),
fix_param=config.fix_vgg,
finetune=config.finetune)
# spatial L2 norm
n.relu4_3_lrn_p = L.LRN(n.relu4_3_p, local_size=1025, alpha=1025, beta=0.5, k=1e-16)
#n.pool4_p = max_pool(n.relu4_3_p)
#n.conv5_1_p, n.relu5_1_p = conv_relu(n.pool4_p, 512,
# param_names=('conv5_1_w', 'conv5_1_b'),
# fix_param=config.fix_vgg,
# finetune=config.finetune)
#n.conv5_2_p, n.relu5_2_p = conv_relu(n.relu5_1_p, 512,
# param_names=('conv5_2_w', 'conv5_2_b'),
# fix_param=config.fix_vgg,
# finetune=config.finetune)
#n.conv5_3_p, n.relu5_3_p = conv_relu(n.relu5_2_p, 512,
# param_names=('conv5_3_w', 'conv5_3_b'),
# fix_param=config.fix_vgg,
# finetune=config.finetune)
# upsampling feature map
#n.relu5_3_upsampling_p = L.Deconvolution(n.relu5_3_p,
# convolution_param=dict(num_output=512,
# group=512,
# kernel_size=4,
# stride=2,
# pad=1,
# bias_term=False,
# weight_filler=dict(type='bilinear')),
# param=[dict(lr_mult=0, decay_mult=0)])
# spatial L2 norm
#n.relu5_3_lrn_p = L.LRN(n.relu5_3_upsampling_p, local_size=1025, alpha=1025, beta=0.5, k=1e-16)
# concat all skip features
#n.feat_all2 = n.relu4_3_lrn_p
n.feat_all2 = L.Concat(n.pool3_lrn_p, n.relu4_3_lrn_p, concat_param=dict(axis=1))
#n.feat_all2 = L.Concat(n.pool3_lrn_p, n.relu4_3_lrn_p, n.relu5_3_lrn_p, concat_param=dict(axis=1))
# Dyn conv layer
n.fcn_scores = L.DynamicConvolution(n.feat_all2, n.feat_all1_crop,
convolution_param=dict(num_output=1,
kernel_size=11,
stride=1,
pad=5,
bias_term=False))
return n.to_proto()
def generate_model(split, config):
n = caffe.NetSpec()
dataset = config.dataset
batch_size = config.N
mode_str = str(dict(dataset=dataset, split=split, batch_size=batch_size))
n.image1, n.image2, n.label, n.sample_weights, n.feat_crop = L.Python(module=config.data_provider,
layer=config.data_provider_layer,
param_str=mode_str,
ntop=5)
################################
# the base net (VGG-16) branch 1
n.conv1_1, n.relu1_1 = conv_relu(n.image1, 64,
param_names=('conv1_1_w', 'conv1_1_b'),
fix_param=True,
finetune=False)
n.conv1_2, n.relu1_2 = conv_relu(n.relu1_1, 64,
param_names=('conv1_2_w', 'conv1_2_b'),
fix_param=True,
finetune=False)
n.pool1 = max_pool(n.relu1_2)
n.conv2_1, n.relu2_1 = conv_relu(n.pool1, 128,
param_names=('conv2_1_w', 'conv2_1_b'),
fix_param=True,
finetune=False)
n.conv2_2, n.relu2_2 = conv_relu(n.relu2_1, 128,
param_names=('conv2_2_w', 'conv2_2_b'),
fix_param=True,
finetune=False)
n.pool2 = max_pool(n.relu2_2)
n.conv3_1, n.relu3_1 = conv_relu(n.pool2, 256,
param_names=('conv3_1_w', 'conv3_1_b'),
fix_param=config.fix_vgg,
finetune=config.finetune)
n.conv3_2, n.relu3_2 = conv_relu(n.relu3_1, 256,
param_names=('conv3_2_w', 'conv3_2_b'),
fix_param=config.fix_vgg,
finetune=config.finetune)
n.conv3_3, n.relu3_3 = conv_relu(n.relu3_2, 256,
param_names=('conv3_3_w', 'conv3_3_b'),
fix_param=config.fix_vgg,
finetune=config.finetune)
n.pool3 = max_pool(n.relu3_3)
# spatial L2 norm
n.pool3_lrn = L.LRN(n.pool3, local_size=513, alpha=513, beta=0.5, k=1e-16)
n.conv4_1, n.relu4_1 = conv_relu(n.pool3, 512,
param_names=('conv4_1_w', 'conv4_1_b'),
fix_param=config.fix_vgg,
finetune=config.finetune)
n.conv4_2, n.relu4_2 = conv_relu(n.relu4_1, 512,
param_names=('conv4_2_w', 'conv4_2_b'),
fix_param=config.fix_vgg,
finetune=config.finetune)
n.conv4_3, n.relu4_3 = conv_relu(n.relu4_2, 512,
param_names=('conv4_3_w', 'conv4_3_b'),
fix_param=config.fix_vgg,
finetune=config.finetune)
# spatial L2 norm
n.relu4_3_lrn = L.LRN(n.relu4_3, local_size=1025, alpha=1025, beta=0.5, k=1e-16)
#n.pool4 = max_pool(n.relu4_3)
#n.conv5_1, n.relu5_1 = conv_relu(n.pool4, 512,
# param_names=('conv5_1_w', 'conv5_1_b'),
# fix_param=config.fix_vgg,
# finetune=config.finetune)
#n.conv5_2, n.relu5_2 = conv_relu(n.relu5_1, 512,
# param_names=('conv5_2_w', 'conv5_2_b'),
# fix_param=config.fix_vgg,
# finetune=config.finetune)
#n.conv5_3, n.relu5_3 = conv_relu(n.relu5_2, 512,
# param_names=('conv5_3_w', 'conv5_3_b'),
# fix_param=config.fix_vgg,
# finetune=config.finetune)
# upsampling feature map
#n.relu5_3_upsampling = L.Deconvolution(n.relu5_3,
# convolution_param=dict(num_output=512,
# group=512,
# kernel_size=4,
# stride=2,
# pad=1,
# bias_term=False,
# weight_filler=dict(type='bilinear')),
# param=[dict(lr_mult=0, decay_mult=0)])
# spatial L2 norm
#n.relu5_3_lrn = L.LRN(n.relu5_3_upsampling, local_size=1025, alpha=1025, beta=0.5, k=1e-16)
# concat all skip features
#n.feat_all1 = n.relu4_3_lrn
n.feat_all1 = L.Concat(n.pool3_lrn, n.relu4_3_lrn, concat_param=dict(axis=1))
#n.feat_all1 = L.Concat(n.pool3_lrn, n.relu4_3_lrn, n.relu5_3_lrn, concat_param=dict(axis=1))
n.feat_all1_crop = L.Crop(n.feat_all1, n.feat_crop, crop_param=dict(axis=2, offset=[config.query_featmap_H//3, config.query_featmap_W//3]))
################################
# the base net (VGG-16) branch 2
n.conv1_1_p, n.relu1_1_p = conv_relu(n.image2, 64,
param_names=('conv1_1_w', 'conv1_1_b'),
fix_param=True,
finetune=False)
n.conv1_2_p, n.relu1_2_p = conv_relu(n.relu1_1_p, 64,
param_names=('conv1_2_w', 'conv1_2_b'),
fix_param=True,
finetune=False)
n.pool1_p = max_pool(n.relu1_2_p)
n.conv2_1_p, n.relu2_1_p = conv_relu(n.pool1_p, 128,
param_names=('conv2_1_w', 'conv2_1_b'),
fix_param=True,
finetune=False)
n.conv2_2_p, n.relu2_2_p = conv_relu(n.relu2_1_p, 128,
param_names=('conv2_2_w', 'conv2_2_b'),
fix_param=True,
finetune=False)
n.pool2_p = max_pool(n.relu2_2_p)
n.conv3_1_p, n.relu3_1_p = conv_relu(n.pool2_p, 256,
param_names=('conv3_1_w', 'conv3_1_b'),
fix_param=config.fix_vgg,
finetune=config.finetune)
n.conv3_2_p, n.relu3_2_p = conv_relu(n.relu3_1_p, 256,
param_names=('conv3_2_w', 'conv3_2_b'),
fix_param=config.fix_vgg,
finetune=config.finetune)
n.conv3_3_p, n.relu3_3_p = conv_relu(n.relu3_2_p, 256,
param_names=('conv3_3_w', 'conv3_3_b'),
fix_param=config.fix_vgg,
finetune=config.finetune)
n.pool3_p = max_pool(n.relu3_3_p)
# spatial L2 norm
n.pool3_lrn_p = L.LRN(n.pool3_p, local_size=513, alpha=513, beta=0.5, k=1e-16)
n.conv4_1_p, n.relu4_1_p = conv_relu(n.pool3_p, 512,
param_names=('conv4_1_w', 'conv4_1_b'),
fix_param=config.fix_vgg,
finetune=config.finetune)
n.conv4_2_p, n.relu4_2_p = conv_relu(n.relu4_1_p, 512,
param_names=('conv4_2_w', 'conv4_2_b'),
fix_param=config.fix_vgg,
finetune=config.finetune)
n.conv4_3_p, n.relu4_3_p = conv_relu(n.relu4_2_p, 512,
param_names=('conv4_3_w', 'conv4_3_b'),
fix_param=config.fix_vgg,
finetune=config.finetune)
# spatial L2 norm
n.relu4_3_lrn_p = L.LRN(n.relu4_3_p, local_size=1025, alpha=1025, beta=0.5, k=1e-16)
#n.pool4_p = max_pool(n.relu4_3_p)
#n.conv5_1_p, n.relu5_1_p = conv_relu(n.pool4_p, 512,
# param_names=('conv5_1_w', 'conv5_1_b'),
# fix_param=config.fix_vgg,
# finetune=config.finetune)
#n.conv5_2_p, n.relu5_2_p = conv_relu(n.relu5_1_p, 512,
# param_names=('conv5_2_w', 'conv5_2_b'),
# fix_param=config.fix_vgg,
# finetune=config.finetune)
#n.conv5_3_p, n.relu5_3_p = conv_relu(n.relu5_2_p, 512,
# param_names=('conv5_3_w', 'conv5_3_b'),
# fix_param=config.fix_vgg,
# finetune=config.finetune)
# upsampling feature map
#n.relu5_3_upsampling_p = L.Deconvolution(n.relu5_3_p,
# convolution_param=dict(num_output=512,
# group=512,
# kernel_size=4,
# stride=2,
# pad=1,
# bias_term=False,
# weight_filler=dict(type='bilinear')),
# param=[dict(lr_mult=0, decay_mult=0)])
# spatial L2 norm
#n.relu5_3_lrn_p = L.LRN(n.relu5_3_upsampling_p, local_size=1025, alpha=1025, beta=0.5, k=1e-16)
# concat all skip features
#n.feat_all2 = n.relu4_3_lrn_p
n.feat_all2 = L.Concat(n.pool3_lrn_p, n.relu4_3_lrn_p, concat_param=dict(axis=1))
#n.feat_all2 = L.Concat(n.pool3_lrn_p, n.relu4_3_lrn_p, n.relu5_3_lrn_p, concat_param=dict(axis=1))
# Dyn conv layer
n.fcn_scores = L.DynamicConvolution(n.feat_all2, n.feat_all1_crop,
convolution_param=dict(num_output=1,
kernel_size=11,
stride=1,
pad=5,
bias_term=False))
# scale scores with zero mean 0.01196 -> 0.02677
n.fcn_scaled_scores = L.Power(n.fcn_scores, power_param=dict(scale=0.01196,
shift=-1.0,
power=1))
# Loss Layer
n.loss = L.WeightedSigmoidCrossEntropyLoss(n.fcn_scaled_scores, n.label, n.sample_weights)
return n.to_proto()
| 57.203579
| 143
| 0.441103
| 2,967
| 25,570
| 3.472531
| 0.056286
| 0.064059
| 0.045424
| 0.052412
| 0.948656
| 0.944385
| 0.944385
| 0.944385
| 0.944385
| 0.944385
| 0
| 0.081116
| 0.447478
| 25,570
| 446
| 144
| 57.331839
| 0.648146
| 0.283731
| 0
| 0.931818
| 0
| 0
| 0.042623
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.018939
| false
| 0
| 0.018939
| 0.003788
| 0.056818
| 0.003788
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
62e6cc4a74b04bdd7b76c9a8eb419dfe32532b2b
| 879
|
py
|
Python
|
test_autolens/integration/tests/imaging/full_pipeline/test_mock_nlo.py
|
PyJedi/PyAutoLens
|
bcfb2e7b447aa24508fc648d60b6fd9b4fd852e7
|
[
"MIT"
] | 1
|
2020-04-06T20:07:56.000Z
|
2020-04-06T20:07:56.000Z
|
test_autolens/integration/tests/imaging/full_pipeline/test_mock_nlo.py
|
PyJedi/PyAutoLens
|
bcfb2e7b447aa24508fc648d60b6fd9b4fd852e7
|
[
"MIT"
] | null | null | null |
test_autolens/integration/tests/imaging/full_pipeline/test_mock_nlo.py
|
PyJedi/PyAutoLens
|
bcfb2e7b447aa24508fc648d60b6fd9b4fd852e7
|
[
"MIT"
] | null | null | null |
from test_autolens.integration.tests.imaging.full_pipeline import hyper_no_lens_light_bg
from test_autolens.integration.tests.imaging.full_pipeline import (
hyper_no_lens_light_bg_extension_false,
)
from test_autolens.integration.tests.imaging.full_pipeline import (
hyper_with_lens_light_bg,
)
from test_autolens.integration.tests.imaging.runner import run_a_mock
class TestCase:
def _test_hyper_no_lens_light_bg_extension_false(self):
run_a_mock(hyper_no_lens_light_bg_extension_false)
def _test_hyper_no_lens_light_bg(self):
run_a_mock(hyper_no_lens_light_bg)
def _test_hyper_with_lens_light(self):
run_a_mock(hyper_with_lens_light_bg)
def _test_hyper_with_lens_light_bg(self):
run_a_mock(hyper_with_lens_light_bg)
def _test_hyper_with_lens_light_bg_new_api(self):
run_a_mock(hyper_with_lens_light_bg)
| 33.807692
| 88
| 0.819113
| 142
| 879
| 4.450704
| 0.190141
| 0.185127
| 0.208861
| 0.199367
| 0.938291
| 0.931962
| 0.931962
| 0.803797
| 0.786392
| 0.522152
| 0
| 0
| 0.12628
| 879
| 25
| 89
| 35.16
| 0.822917
| 0
| 0
| 0.263158
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.263158
| false
| 0
| 0.210526
| 0
| 0.526316
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
a7fbbf47ffc55354edd0a83597dc7b4c4615beea
| 23,249
|
py
|
Python
|
python/test/function/test_interpolate.py
|
daniel-falk/nnabla
|
3fe132ea52dc10521cc029a5d6ba8f565cf65ccf
|
[
"Apache-2.0"
] | 2,792
|
2017-06-26T13:05:44.000Z
|
2022-03-28T07:55:26.000Z
|
python/test/function/test_interpolate.py
|
daniel-falk/nnabla
|
3fe132ea52dc10521cc029a5d6ba8f565cf65ccf
|
[
"Apache-2.0"
] | 138
|
2017-06-27T07:04:44.000Z
|
2022-02-28T01:37:15.000Z
|
python/test/function/test_interpolate.py
|
daniel-falk/nnabla
|
3fe132ea52dc10521cc029a5d6ba8f565cf65ccf
|
[
"Apache-2.0"
] | 380
|
2017-06-26T13:23:52.000Z
|
2022-03-25T16:51:30.000Z
|
# Copyright 2018,2019,2020,2021 Sony Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from __future__ import division
import pytest
import numpy as np
import nnabla.functions as F
import refs
from nbla_test_utils import list_context
ctxs = list_context('Interpolate')
def compute_scale(isize, osize, align_corners):
if osize > 1:
return (isize - 1) / (osize - 1) if align_corners else isize / osize
else:
return 0.0
def compute_scale_for_nn(isize, osize, align_corners, half_pixel_for_nn):
if half_pixel_for_nn:
return isize / float(osize)
else:
return compute_scale(isize, osize, align_corners)
def get_source_index(scale, dst_index, half_pixel):
return np.maximum(0, scale * (dst_index + 0.5) - 0.5) \
if half_pixel else scale * dst_index
def get_source_index_for_nn(scale, dst_index, half_pixel, half_pixel_for_nn):
if half_pixel_for_nn:
return scale * (dst_index + 0.5)
else:
return get_source_index(scale, dst_index, half_pixel)
def ref_interpolate(x, scale, output_size, mode, align_corners=True, half_pixel=False,
half_pixel_for_nn=False, channel_last=False):
assert scale or output_size, 'Need either scale or output_size.'
assert not scale or len(scale) in (1, 2, 3), 'Only 1D/2D/3D'
assert not output_size or len(output_size) in (1, 2, 3), 'Only 1D/2D/3D'
if channel_last:
n_sdim = len(scale) if scale else len(output_size)
t = refs.ChannelLastToFirstTranspose(x.ndim, n_sdim)
x = t(x)
if not output_size:
output_size = np.floor(np.array(scale) * x.shape[-len(scale):])
output_size = tuple(map(int, output_size))
if mode == "nearest":
if len(output_size) == 1:
out = ref_nearest_interpolate_1d(
x, output_size, align_corners, half_pixel, half_pixel_for_nn)
out = t.inv(out) if channel_last else out
if len(output_size) == 2:
out = ref_nearest_interpolate_2d(
x, output_size, align_corners, half_pixel, half_pixel_for_nn)
out = t.inv(out) if channel_last else out
if len(output_size) == 3:
out = ref_nearest_interpolate_3d(
x, output_size, align_corners, half_pixel, half_pixel_for_nn)
out = t.inv(out) if channel_last else out
elif mode == "linear":
if len(output_size) == 1:
out = ref_linear_interpolate_1d(
x, output_size, align_corners, half_pixel)
if len(output_size) == 2:
out = ref_linear_interpolate_2d(
x, output_size, align_corners, half_pixel)
if len(output_size) == 3:
out = ref_linear_interpolate_3d(
x, output_size, align_corners, half_pixel)
out = t.inv(out) if channel_last else out
return out
def ref_linear_interpolate_1d(x, output_size, align_corners, half_pixel):
oshape = output_size # output-width
ishape = x.shape[-1:] # input-width
xx = x.reshape(-1, *ishape)
ib = np.arange(xx.shape[0]) # batch index
scale = (compute_scale(ishape[0], oshape[0], align_corners),) # x
# Real input indices as floats
index = (get_source_index(scale[0], np.arange(oshape[0]), half_pixel),)
# Nearest input indices per axis
index_1 = (index[0].astype(np.int32),)
index_2 = (np.minimum(index_1[0] + 1, ishape[0] - 1),)
# Unit distance to left and right
dist_1 = ((index[0] - index_1[0]).reshape(1, -1),) # x
dist_2 = (1.0 - dist_1[0],)
val0 = dist_2[0] * xx[np.ix_(ib, index_1[0])]
val1 = dist_1[0] * xx[np.ix_(ib, index_2[0])]
yy = val0 + val1
return yy.reshape(x.shape[:-len(oshape)] + oshape)
def ref_linear_interpolate_2d(x, output_size, align_corners, half_pixel):
oshape = output_size # output-height, output-width
ishape = x.shape[-2:] # input-height, input-width
xx = x.reshape(-1, *ishape)
ib = np.arange(xx.shape[0]) # batch index
scale = (compute_scale(ishape[0], oshape[0], align_corners), # y
compute_scale(ishape[1], oshape[1], align_corners)) # x
# Real input indices as floats
index = (get_source_index(scale[0], np.arange(oshape[0]), half_pixel),
get_source_index(scale[1], np.arange(oshape[1]), half_pixel))
# Nearest input indices per axis
index_1 = (index[0].astype(np.int32),
index[1].astype(np.int32))
index_2 = (np.minimum(index_1[0] + 1, ishape[0] - 1),
np.minimum(index_1[1] + 1, ishape[1] - 1))
# Unit distance to left and right
dist_1 = ((index[0] - index_1[0]).reshape(1, -1, 1), # y
(index[1] - index_1[1]).reshape(1, 1, -1)) # x
dist_2 = (1.0 - dist_1[0],
1.0 - dist_1[1])
val0 = dist_2[1] * xx[np.ix_(ib, index_1[0], index_1[1])]
val1 = dist_1[1] * xx[np.ix_(ib, index_1[0], index_2[1])]
val2 = dist_2[1] * xx[np.ix_(ib, index_2[0], index_1[1])]
val3 = dist_1[1] * xx[np.ix_(ib, index_2[0], index_2[1])]
yy = (dist_2[0] * (val0 + val1)) + (dist_1[0] * (val2 + val3))
return yy.reshape(x.shape[:-len(oshape)] + oshape)
def ref_linear_interpolate_3d(x, output_size, align_corners, half_pixel):
oshape = output_size # output-depth, output-height, output-width
ishape = x.shape[-3:] # input-depth, input-height, input-width
xx = x.reshape(-1, *ishape)
ib = np.arange(xx.shape[0]) # batch index
scale = (compute_scale(ishape[0], oshape[0], align_corners), # z
compute_scale(ishape[1], oshape[1], align_corners), # y
compute_scale(ishape[2], oshape[2], align_corners)) # x
# Real input indices as floats
index = (get_source_index(scale[0], np.arange(oshape[0]), half_pixel),
get_source_index(scale[1], np.arange(oshape[1]), half_pixel),
get_source_index(scale[2], np.arange(oshape[2]), half_pixel))
# Nearest input indices per axis
index_1 = (index[0].astype(np.int32),
index[1].astype(np.int32),
index[2].astype(np.int32))
index_2 = (np.minimum(index_1[0] + 1, ishape[0] - 1),
np.minimum(index_1[1] + 1, ishape[1] - 1),
np.minimum(index_1[2] + 1, ishape[2] - 1))
# Unit distance to left and right
dist_1 = ((index[0] - index_1[0]).reshape(1, -1, 1, 1), # z
(index[1] - index_1[1]).reshape(1, 1, -1, 1), # y
(index[2] - index_1[2]).reshape(1, 1, 1, -1)) # x
dist_2 = (1.0 - dist_1[0],
1.0 - dist_1[1],
1.0 - dist_1[2])
val0 = dist_2[2] * xx[np.ix_(ib, index_1[0], index_1[1], index_1[2])]
val1 = dist_1[2] * xx[np.ix_(ib, index_1[0], index_1[1], index_2[2])]
val2 = dist_2[2] * xx[np.ix_(ib, index_1[0], index_2[1], index_1[2])]
val3 = dist_1[2] * xx[np.ix_(ib, index_1[0], index_2[1], index_2[2])]
val4 = dist_2[2] * xx[np.ix_(ib, index_2[0], index_1[1], index_1[2])]
val5 = dist_1[2] * xx[np.ix_(ib, index_2[0], index_1[1], index_2[2])]
val6 = dist_2[2] * xx[np.ix_(ib, index_2[0], index_2[1], index_1[2])]
val7 = dist_1[2] * xx[np.ix_(ib, index_2[0], index_2[1], index_2[2])]
val8 = (dist_2[1] * (val0 + val1)) + (dist_1[1] * (val2 + val3))
val9 = (dist_2[1] * (val4 + val5)) + (dist_1[1] * (val6 + val7))
yy = dist_2[0] * val8 + dist_1[0] * val9
return yy.reshape(x.shape[:-len(oshape)] + oshape)
def ref_nearest_interpolate_1d(x, output_size, align_corners, half_pixel, half_pixel_for_nn):
oshape = output_size # output-width
ishape = x.shape[-1:] # input-width
xx = x.reshape(-1, *ishape)
ib = np.arange(xx.shape[0]) # batch index
scale = (compute_scale_for_nn(
ishape[0], oshape[0], align_corners, half_pixel_for_nn),) # x
# Real input indices as floats
index = (get_source_index_for_nn(scale[0], np.arange(
oshape[0]), half_pixel, half_pixel_for_nn),)
# Nearest input indices per axis
index_1 = (np.minimum(index[0].astype(np.int32), ishape[0] - 1), )
# Nearest input
yy = xx[np.ix_(ib, index_1[0])]
return yy.reshape(x.shape[:-len(oshape)] + oshape)
def ref_nearest_interpolate_2d(x, output_size, align_corners, half_pixel, half_pixel_for_nn):
oshape = output_size # output-height, output-width
ishape = x.shape[-2:] # input-height, input-width
xx = x.reshape(-1, *ishape)
ib = np.arange(xx.shape[0]) # batch index
scale = (compute_scale_for_nn(ishape[0], oshape[0], align_corners, half_pixel_for_nn), # y
compute_scale_for_nn(ishape[1], oshape[1], align_corners, half_pixel_for_nn)) # x
# Real input indices as floats
index = (get_source_index_for_nn(scale[0], np.arange(oshape[0]), half_pixel, half_pixel_for_nn),
get_source_index_for_nn(scale[1], np.arange(oshape[1]), half_pixel, half_pixel_for_nn))
# Nearest input indices per axis
index_1 = (index[0].astype(np.int32),
index[1].astype(np.int32))
index_2 = (np.minimum(index_1[0], ishape[0] - 1),
np.minimum(index_1[1], ishape[1] - 1))
# Nearest input
yy = xx[np.ix_(ib, index_2[0], index_2[1])]
return yy.reshape(x.shape[:-len(oshape)] + oshape)
def ref_nearest_interpolate_3d(x, output_size, align_corners, half_pixel, half_pixel_for_nn):
oshape = output_size # output-depth, output-height, output-width
ishape = x.shape[-3:] # input-depth, input-height, input-width
xx = x.reshape(-1, *ishape)
ib = np.arange(xx.shape[0]) # batch index
scale = (compute_scale_for_nn(ishape[0], oshape[0], align_corners, half_pixel_for_nn), # z
compute_scale_for_nn(
ishape[1], oshape[1], align_corners, half_pixel_for_nn), # y
compute_scale_for_nn(ishape[2], oshape[2], align_corners, half_pixel_for_nn)) # x
# Real input indices as floats
index = (get_source_index_for_nn(scale[0], np.arange(oshape[0]), half_pixel, half_pixel_for_nn),
get_source_index_for_nn(scale[1], np.arange(
oshape[1]), half_pixel, half_pixel_for_nn),
get_source_index_for_nn(scale[2], np.arange(oshape[2]), half_pixel, half_pixel_for_nn))
# Nearest input indices per axis
index_1 = (index[0].astype(np.int32),
index[1].astype(np.int32),
index[2].astype(np.int32))
index_2 = (np.minimum(index_1[0], ishape[0] - 1),
np.minimum(index_1[1], ishape[1] - 1),
np.minimum(index_1[2], ishape[2] - 1))
# Nearest input
yy = xx[np.ix_(ib, index_2[0], index_2[1], index_2[2])]
return yy.reshape(x.shape[:-len(oshape)] + oshape)
@pytest.mark.parametrize("ctx, func_name", ctxs)
@pytest.mark.parametrize("inshape, outsize, scale, sdim_only", [
# 1-dimensional
((3,), (6,), None, True),
((3,), (8,), None, True),
((3,), (2,), None, True),
((3,), (1,), None, True),
((3,), None, (2.5,), True),
((3,), None, (0.5,), True),
((2, 3, 4), (10,), None, False),
((2, 3, 5), None, (1.3,), False),
# 2-dimensional
((3, 3), (8, 6), None, True),
((3, 3), (2, 1), None, True),
((3, 3), None, (2.5, 1.0), True),
((3, 3), None, (0.5, 0.5), True),
((2, 3, 4, 4), (8, 6), None, False),
((2, 3, 4, 4), (2, 1), None, False),
((2, 3, 4, 4), None, (2.5, 1.0), False),
((2, 3, 4, 4), None, (0.5, 0.5), False),
((2, 3, 4, 4), None, (0.5, 0.5), False),
# 3-dimensional
((3, 3, 3), (6, 8, 6), None, True),
((3, 3, 3), (1, 2, 1), None, True),
((3, 3, 3), None, (1.5, 2.5, 1.0), True),
((3, 3, 3), None, (1.2, 0.5, 0.5), True),
((2, 3, 3, 4, 4), (6, 8, 6), None, False),
((2, 3, 3, 4, 4), (1, 2, 1), None, False),
((2, 3, 3, 4, 4), None, (1.5, 2.5, 1.0), False),
((2, 3, 3, 4, 4), None, (1.2, 0.5, 0.5), False),
])
@pytest.mark.parametrize('align_corners, half_pixel', [(True, False), (False, True), (False, False)])
@pytest.mark.parametrize('channel_last', [False, True])
@pytest.mark.parametrize("seed", [313])
def test_interpolate_linear_forward_backward(seed, inshape, outsize, scale, sdim_only,
align_corners, half_pixel, channel_last,
ctx, func_name):
if channel_last and func_name == "Interpolate":
pytest.skip("Interpolate with channel_last is only supported in CUDA.")
if sdim_only and channel_last:
pytest.skip(
"Interpolate for spatial dimension only data is only supported for channel_first option.")
from nbla_test_utils import function_tester
rng = np.random.RandomState(seed)
inputs = [rng.randn(*inshape).astype(np.float32)]
func_args = [scale, outsize, 'linear',
align_corners, half_pixel, False, channel_last]
function_tester(rng, F.interpolate, ref_interpolate, inputs,
func_name=func_name, func_args=func_args,
atol_f=1e-6, atol_b=1e-2, dstep=2e-3, ctx=ctx, disable_half_test=True)
@pytest.mark.parametrize("ctx, func_name", ctxs)
@pytest.mark.parametrize("inshape, outsize, scale, sdim_only", [
# 1-dimensional
((3,), (6,), None, True),
((3,), (8,), None, True),
((3,), (2,), None, True),
((3,), (1,), None, True),
((3,), None, (2.5,), True),
((3,), None, (0.5,), True),
((2, 3, 4), (10,), None, False),
((2, 3, 5), None, (1.3,), False),
# 2-dimensional
((3, 3), (8, 6), None, True),
((3, 3), (2, 1), None, True),
((3, 3), None, (2.5, 1.0), True),
((3, 3), None, (0.5, 0.5), True),
((2, 3, 4, 4), (8, 6), None, False),
((2, 3, 4, 4), (2, 1), None, False),
((2, 3, 4, 4), None, (2.5, 1.0), False),
((2, 3, 4, 4), None, (0.5, 0.5), False),
((2, 3, 4, 4), None, (0.5, 0.5), False),
# 3-dimensional
((3, 3, 3), (6, 8, 6), None, True),
((3, 3, 3), (1, 2, 1), None, True),
((3, 3, 3), None, (1.5, 2.5, 1.0), True),
((3, 3, 3), None, (1.2, 0.5, 0.5), True),
((1, 2, 3, 4, 4), (6, 8, 6), None, False),
((1, 2, 3, 4, 4), (1, 2, 1), None, False),
((1, 2, 3, 4, 4), None, (1.5, 2.5, 1.0), False),
((1, 2, 3, 4, 4), None, (1.2, 0.5, 0.5), False),
])
@pytest.mark.parametrize('align_corners, half_pixel, half_pixel_for_nn',
[(True, False, True),
(True, False, False),
(False, True, False),
(False, False, False)])
@pytest.mark.parametrize('channel_last', [False, True])
@pytest.mark.parametrize("seed", [313])
def test_interpolate_nearest_forward_backward(seed, inshape, outsize, scale, sdim_only,
align_corners, half_pixel, half_pixel_for_nn,
channel_last,
ctx, func_name):
if channel_last and func_name == "Interpolate":
pytest.skip("Interpolate with channel_last is only supported in CUDA.")
if sdim_only and channel_last:
pytest.skip(
"Interpolate for spatial dimension only data is only supported for channel_first option.")
from nbla_test_utils import function_tester
rng = np.random.RandomState(seed)
inputs = [rng.randn(*inshape).astype(np.float32)]
func_args = [scale, outsize, 'nearest', align_corners,
half_pixel, half_pixel_for_nn, channel_last]
function_tester(rng, F.interpolate, ref_interpolate, inputs,
func_name=func_name, func_args=func_args,
atol_f=1e-6, atol_b=1e-2, dstep=2e-3, ctx=ctx)
@pytest.mark.parametrize("ctx, func_name", ctxs)
@pytest.mark.parametrize("inshape, outsize, scale, sdim_only", [
# 1-dimensional
((3,), (6,), None, True),
((3,), (8,), None, True),
((3,), (2,), None, True),
((3,), (1,), None, True),
((3,), None, (2.5,), True),
((3,), None, (0.5,), True),
((2, 3, 4), (10,), None, False),
((2, 3, 5), None, (1.3,), False),
# 2-dimensional
((3, 3), (8, 6), None, True),
((3, 3), (2, 1), None, True),
((3, 3), None, (2.5, 1.0), True),
((3, 3), None, (0.5, 0.5), True),
((2, 3, 4, 4), (8, 6), None, False),
((2, 3, 4, 4), (2, 1), None, False),
((2, 3, 4, 4), None, (2.5, 1.0), False),
((2, 3, 4, 4), None, (0.5, 0.5), False),
((2, 3, 4, 4), None, (0.5, 0.5), False),
# 3-dimensional
((3, 3, 3), (6, 8, 6), None, True),
((3, 3, 3), (1, 2, 1), None, True),
((3, 3, 3), None, (1.5, 2.5, 1.0), True),
((3, 3, 3), None, (1.2, 0.5, 0.5), True),
((2, 3, 3, 4, 4), (6, 8, 6), None, False),
((2, 3, 3, 4, 4), (1, 2, 1), None, False),
((2, 3, 3, 4, 4), None, (1.5, 2.5, 1.0), False),
((2, 3, 3, 4, 4), None, (1.2, 0.5, 0.5), False),
])
@pytest.mark.parametrize('align_corners, half_pixel', [(True, False), (False, True), (False, False)])
@pytest.mark.parametrize('channel_last', [False, True])
@pytest.mark.parametrize("seed", [313])
def test_interpolate_linear_double_backward(seed, inshape, outsize, scale, sdim_only,
align_corners, half_pixel, channel_last, ctx, func_name):
if channel_last and func_name == "Interpolate":
pytest.skip("Interpolate with channel_last is only supported in CUDA.")
if sdim_only and channel_last:
pytest.skip(
"Interpolate for spatial dimension only data is only supported for channel_first option.")
from nbla_test_utils import backward_function_tester, grad_function_forward_function_output
from nnabla.backward_function.interpolate import InterpolateDataGrad
rng = np.random.RandomState(seed)
inputs = [rng.randn(*inshape).astype(np.float32)]
func_args = [scale, outsize, 'linear',
align_corners, half_pixel, False, channel_last]
# 2nd-order
backward_function_tester(rng, F.interpolate, inputs,
func_args=func_args,
ctx=ctx)
# 3rd-order
# F.interpolate takes scale and output_size while InterpolateDataGrad takes only output_size
# for passing kwargs in the nn.grad, same as F.Interpolate
import nnabla as nn
import math
vinputs = [nn.Variable(inp.shape)
if inp is not None else None for inp in inputs]
y = F.interpolate(*(vinputs + func_args))
x = inputs[0]
if scale:
input_size = x.shape[-len(scale)-1:-
1] if channel_last else x.shape[-len(scale):]
output_size = [int(math.floor(s * d))
for d, s in zip(input_size, scale)]
else:
output_size = outsize
df = InterpolateDataGrad(ctx, *([output_size] + func_args[2:]))
df.xshape = x.shape
ginputs = [rng.randn(*y.shape)]
backward_function_tester(rng, df,
ginputs, func_args=[],
ctx=ctx, atol_f=1e-6, atol_accum=8e-2, non_accum_check=True)
@pytest.mark.parametrize("ctx, func_name", ctxs)
@pytest.mark.parametrize("inshape, outsize, scale, sdim_only", [
# 1-dimensional
((3,), (6,), None, True),
((3,), (8,), None, True),
((3,), (2,), None, True),
((3,), (1,), None, True),
((3,), None, (2.5,), True),
((3,), None, (0.5,), True),
((2, 3, 4), (10,), None, False),
((2, 3, 5), None, (1.3,), False),
# 2-dimensional
((3, 3), (8, 6), None, True),
((3, 3), (2, 1), None, True),
((3, 3), None, (2.5, 1.0), True),
((3, 3), None, (0.5, 0.5), True),
((2, 3, 4, 4), (8, 6), None, False),
((2, 3, 4, 4), (2, 1), None, False),
((2, 3, 4, 4), None, (2.5, 1.0), False),
((2, 3, 4, 4), None, (0.5, 0.5), False),
((2, 3, 4, 4), None, (0.5, 0.5), False),
# 3-dimensional
((3, 3, 3), (6, 8, 6), None, True),
((3, 3, 3), (1, 2, 1), None, True),
((3, 3, 3), None, (1.5, 2.5, 1.0), True),
((3, 3, 3), None, (1.2, 0.5, 0.5), True),
((1, 2, 3, 4, 4), (6, 8, 6), None, False),
((1, 2, 3, 4, 4), (1, 2, 1), None, False),
((1, 2, 3, 4, 4), None, (1.5, 2.5, 1.0), False),
((1, 2, 3, 4, 4), None, (1.2, 0.5, 0.5), False),
])
@pytest.mark.parametrize('align_corners, half_pixel, half_pixel_for_nn',
[(True, False, True),
(True, False, False),
(False, True, False),
(False, False, False)])
@pytest.mark.parametrize('channel_last', [False, True])
@pytest.mark.parametrize("seed", [313])
def test_interpolate_nearest_double_backward(seed, inshape, outsize, scale, sdim_only,
align_corners, half_pixel, half_pixel_for_nn,
channel_last,
ctx, func_name):
if channel_last and func_name == "Interpolate":
pytest.skip("Interpolate with channel_last is only supported in CUDA.")
if sdim_only and channel_last:
pytest.skip(
"Interpolate for spatial dimension only data is only supported for channel_first option.")
from nbla_test_utils import backward_function_tester, grad_function_forward_function_output
from nnabla.backward_function.interpolate import InterpolateDataGrad
rng = np.random.RandomState(seed)
inputs = [rng.randn(*inshape).astype(np.float32)]
func_args = [scale, outsize, 'nearest', align_corners,
half_pixel, half_pixel_for_nn, channel_last]
# 2nd-order
backward_function_tester(rng, F.interpolate, inputs,
func_args=func_args,
atol_f=1e-6, atol_accum=1e-2, dstep=1e-3, ctx=ctx)
# 3rd-order
# F.interpolate takes scale and output_size while InterpolateDataGrad takes only output_size
# for passing kwargs in the nn.grad, same as F.Interpolate
import nnabla as nn
import math
vinputs = [nn.Variable(inp.shape)
if inp is not None else None for inp in inputs]
y = F.interpolate(*(vinputs + func_args))
x = inputs[0]
if scale:
input_size = x.shape[-len(scale)-1:-
1] if channel_last else x.shape[-len(scale):]
output_size = [int(math.floor(s * d))
for d, s in zip(input_size, scale)]
else:
output_size = outsize
df = InterpolateDataGrad(ctx, *([output_size] + func_args[2:]))
df.xshape = x.shape
ginputs = [rng.randn(*y.shape)]
backward_function_tester(rng, df,
ginputs, func_args=[],
ctx=ctx, atol_f=1e-6, atol_accum=5e-2, non_accum_check=True)
| 42.194192
| 102
| 0.579724
| 3,555
| 23,249
| 3.619128
| 0.068073
| 0.048966
| 0.008394
| 0.050598
| 0.887688
| 0.877662
| 0.862584
| 0.854811
| 0.834681
| 0.825587
| 0
| 0.064239
| 0.254764
| 23,249
| 550
| 103
| 42.270909
| 0.678345
| 0.085982
| 0
| 0.714286
| 0
| 0
| 0.052878
| 0
| 0
| 0
| 0
| 0
| 0.007143
| 1
| 0.035714
| false
| 0
| 0.038095
| 0.002381
| 0.107143
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
9a9212982223f7932361f7af95046253d186591c
| 120,649
|
py
|
Python
|
Ethernet/python/E_TC.py
|
wjasper/Linix_Drivers
|
9c5443f3c9d249f341b6b8580929f8cdbdba4079
|
[
"JasPer-2.0"
] | 100
|
2016-11-08T15:41:43.000Z
|
2022-02-20T19:37:32.000Z
|
Ethernet/python/E_TC.py
|
wjasper/Linix_Drivers
|
9c5443f3c9d249f341b6b8580929f8cdbdba4079
|
[
"JasPer-2.0"
] | 37
|
2017-01-05T17:48:14.000Z
|
2022-01-06T17:43:27.000Z
|
Ethernet/python/E_TC.py
|
wjasper/Linix_Drivers
|
9c5443f3c9d249f341b6b8580929f8cdbdba4079
|
[
"JasPer-2.0"
] | 65
|
2016-12-20T07:03:44.000Z
|
2022-03-14T21:48:35.000Z
|
#! /usr/bin/python3
#
# Copyright (c) 2018 Warren J. Jasper <wjasper@ncsu.edu>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
from datetime import datetime
from struct import *
from mccEthernet import *
"""
Configuration memory map
|=================================================================|
| Address | Value |
|=================================================================|
| 0x00 - 0x07 | Serial number (not used by firmware) |
|-----------------------------------------------------------------|
| 0x08 - 0x09 | Reserved |
|-----------------------------------------------------------------|
| 0x0A - 0x0F | MAC address |
| | If all 6 bytes are 0xFF then the firmware will |
| | use the Microchip unique MAC address that |
| | is programmed into the micro. |
|=================================================================|
Settings memory map
|=====================================================================================|
| Address | Value | Default value |
|=====================================================================================|
| 0x000 - 0x001 | Network options: | 0x0000 |
| | Bit 0: 0 = DHCP enabled 1 = DHCP disabled | |
| | Bit 1: 0 = Auto IP enabled 1 = Auto IP disabled | |
| | Bits 2-15 reserved | |
|-------------------------------------------------------------------------------------|
| 0x002 - 0x005 | Default IP address | 192.168.0.101 |
|-------------------------------------------------------------------------------------|
| 0x006 - 0x009 | Default subnet mask | 255.255.255.0 |
|-------------------------------------------------------------------------------------|
| 0x00A - 0x00D | Default gateway address | 192.168.0.1 |
|-------------------------------------------------------------------------------------|
| 0x00E - 0x00F | Reserved | |
|-------------------------------------------------------------------------------------|
| 0x010 - 0x011 | Reserved | |
|-------------------------------------------------------------------------------------|
| 0x012 - 0x015 | Connection code, 4 bytes | 0x00000000 |
|-------------------------------------------------------------------------------------|
| 0x016 - 0x01F | Reserved | |
|=====================================================================================|
Note: The settings do not take effect until after device is reset or power cycled.
User memory map
|=================================================================|
| Address | Value |
|=================================================================|
| 0x000 - 0xDFF | Available for UL use |
|=================================================================|
"""
ETC_PID = 0x0138 # Product code for the MCC E-TC
CELSIUS = 0x0 # read in Celsius
VOLTAGE = 0x1 # read in Voltage
ADC_CODE = 0x2 # uncalibraded
class E_TC:
# Digital I/O Commands
CMD_DIN = 0x00 # Read DIO pins
CMD_DOUT_R = 0x02 # Read DIO latch value
CMD_DOUT_W = 0x03 # Write DIO latch value
CMD_DCONF_R = 0x04 # Read DIO configuration value
CMD_DCONF_W = 0x05 # Write DIO configuration value
# Temperature Input Commands
CMD_TIN = 0x10 # Read single thermocouple channel
CMD_CJC = 0x11 # Read single CJC sensor
CMD_TIN_CONFIG_R = 0x12 # Read temperature channel configuration
CMD_TIN_CONFIG_W = 0x13 # Write temperature channel configuration
CMD_TIN_STATUS = 0x14 # Read temperature channel data status
CMD_OTD_STATUS = 0x15 # Read open thermocouple detect data status
CMD_MEASURE_CONFIG_R = 0x16 # Read measurement configuration
CMD_MEASURE_CONFIG_W = 0x17 # Write measurement configuration
CMD_MEASURE_MODE_R = 0x18 # Read measurement mode
CMD_MEASURE_MODE_W = 0x19 # Write measurement mode
CMD_FACTORY_COEF_R = 0x1A # Write factory calibration coefficients
CMD_FACTORY_COEF_W = 0x1B # Write factory calibration coefficients
CMD_FIELD_COEF_R = 0x1C # Read field calibration coefficients
CMD_FIELD_COEF_W = 0x1D # Write field calibration coefficients
CMD_FACTORY_CAL_DATE_R = 0x1E # Read factory calibration date
CMD_FACTORY_CAL_DATE_W = 0x1F # Write factory calibration date
CMD_FIELD_CAL_DATE_R = 0x20 # Read field calibration date
CMD_FIELD_CAL_DATE_W = 0x21 # Write field calibration date
CMD_AD_CAL = 0x22 # Run the A/D offset calibration
CMD_CJC_OFFSET_R = 0x24 # Read user CJC offset values
CMD_CJC_OFFSET_W = 0x25 # Write user CJC offset values
# Alarm Commands
CMD_ALARM_CONFIG_R = 0x28 # Read temperature alarm configuration
CMD_ALARM_CONFIG_W = 0x29 # Write temperature alarm configuration
CMD_ALARM_STATUS_R = 0x2A # Read temperature alarm status
CMD_ALARM_STATUS_W = 0x2B # Clear temperature alarm status
# Counter Commands
CMD_COUNTER_R = 0x30 # Read event counter
CMD_COUNTER_W = 0x31 # Write event counter
# Memory Commands
CMD_CONF_MEMORY_R = 0x40 # Read device configuration memory
CMD_CONF_MEMORY_W = 0x41 # Write device configuration memory
CMD_USER_MEMORY_R = 0x42 # Read user memory
CMD_USER_MEMORY_W = 0x43 # Write user memory
CDM_SETTINGS_MEMORY_R = 0x44 # Read network settings memory
CMD_SETTINGS_MEMORY_W = 0x45 # Write network settings memory
CMD_BOOT_MEMORY_R = 0x46 # Read bootloader memory
CDM_BOOT_MEMORY_W = 0x47 # Write bootloader memory
# Miscellaneous Commands
CMD_BLINK_LED = 0x50 # Blink the LED
CMD_RESET = 0x51 # Reset the device
CMD_STATUS = 0x52 # Read device status
CMD_NETWORK_CONFIG = 0x54 # Read the current network configuration
CMD_FIRMWARE_UPGRADE = 0x60 # Enter firmware upgrade mode
def __init__(self, device):
self.device = device # inherit values from mccEthernetDevice
self.channel_mask = 0 # the channel bitmask (channels 0-7)
self.Tin_status = 0 # the reading status of the Tin channels
self.OTD_status = 0 # the status of the open thermocouple detect
self.config_measure = 0 # the measurement configuration
self.mode_measure = 0 # the measurement mode
self.units = 0 # the units for the returned values: 0 - Celsius, 1 - Voltage, 2 - ADC code (uncalibraded)
self.wait = 0 # 0 - return current value, 1 - wait for new value before returning.
self.Tin_values = [] # the values read from the configured channels
self.CJC_offsets = [] # the per channel CJC user offsets
self.CJC_value= [] # the CJC values in Celsius.
self.config_values = bytearray(8) # the configuration value of each channel (type of thermocouple);
self.alarm_status = 0 # the alarm status of each channel
self.alarm_config = bytearray(8) # the alarm configuration
self.alarm_threshold1 = [] # the alarm threshold 1 values in Celsius
self.alarm_threshold2 = [] # the alarm threshold 2 values in Celsius
self.calCoefFactory = [table(), table()] # the factory calibration coefficients (slope and offset).
self.calCoefField = [table(), table()] # the field calibration coefficients (slope and offset).
self.MACaddress() # get the MAC address
return
#################################
# Digital I/O Commands #
#################################
def DIn(self):
"""
This command reads the current state of the DIO pins. A 0 in a
bit position indicates the corresponding pin is reading a low
state, and a 1 indicates a high state.
"""
dataCount = 0
replyCount = 1
result = False
s_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+dataCount) # send buffer
r_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+replyCount) # reply buffer
s_buffer[MSG_INDEX_COMMAND] = self.CMD_DIN
s_buffer[MSG_INDEX_START] = MSG_START
s_buffer[MSG_INDEX_FRAME] = self.device.frameID
self.device.frameID = (self.device.frameID + 1) % 256 # increment frame ID with every send
s_buffer[MSG_INDEX_STATUS] = 0
s_buffer[MSG_INDEX_COUNT_LOW] = (dataCount & 0xff)
s_buffer[MSG_INDEX_COUNT_HIGH] = ((dataCount>>8) & 0xff)
s_buffer[MSG_INDEX_DATA+dataCount] = 0xff - self.device.calcChecksum(s_buffer, MSG_INDEX_DATA+dataCount)
self.device.sock.settimeout(.1)
self.device.sendMessage(s_buffer)
try:
r_buffer = self.device.sock.recv(16)
except socket.timeout:
raise TimeoutError('DIn: timeout error.')
return
if len(r_buffer) == MSG_HEADER_SIZE + MSG_CHECKSUM_SIZE + replyCount:
if r_buffer[MSG_INDEX_START] == s_buffer[0] and \
r_buffer[MSG_INDEX_COMMAND] == s_buffer[MSG_INDEX_COMMAND] | MSG_REPLY and \
r_buffer[MSG_INDEX_FRAME] == s_buffer[2] and \
r_buffer[MSG_INDEX_STATUS] == MSG_SUCCESS and \
r_buffer[MSG_INDEX_COUNT_LOW] == replyCount & 0xff and \
r_buffer[MSG_INDEX_COUNT_HIGH] == (replyCount >> 8) & 0xff and \
r_buffer[MSG_INDEX_DATA+replyCount] + self.device.calcChecksum(r_buffer,(MSG_HEADER_SIZE+replyCount)) == 0xff :
result = True
value = r_buffer[MSG_INDEX_DATA]
try:
if (result == False):
raise ResultError
except ResultError:
print('Error in DIn E-TC. Status =', hex(r_buffer[MSG_INDEX_STATUS]))
return -1
return value
def DOut_R(self):
"""
This command reads the DIO output latch value. The factory power
on default is all zeros. A 0 in a bit position indicates the
corresponding pin driver is low, a 1 indicates it is high.
"""
dataCount = 0
replyCount = 1
result = False
s_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+dataCount) # send buffer
r_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+replyCount) # reply buffer
s_buffer[MSG_INDEX_COMMAND] = self.CMD_DOUT_R
s_buffer[MSG_INDEX_START] = MSG_START
s_buffer[MSG_INDEX_FRAME] = self.device.frameID
self.device.frameID = (self.device.frameID + 1) % 256 # increment frame ID with every send
s_buffer[MSG_INDEX_STATUS] = 0
s_buffer[MSG_INDEX_COUNT_LOW] = (dataCount & 0xff)
s_buffer[MSG_INDEX_COUNT_HIGH] = ((dataCount>>8) & 0xff)
s_buffer[MSG_INDEX_DATA+dataCount] = 0xff - self.device.calcChecksum(s_buffer, MSG_INDEX_DATA+dataCount)
self.device.sock.settimeout(.1)
self.device.sendMessage(s_buffer)
try:
r_buffer = self.device.sock.recv(16)
except socket.timeout:
raise TimeoutError('DOut_R: timeout error.')
return
if len(r_buffer) == MSG_HEADER_SIZE + MSG_CHECKSUM_SIZE + replyCount:
if r_buffer[MSG_INDEX_START] == s_buffer[0] and \
r_buffer[MSG_INDEX_COMMAND] == s_buffer[MSG_INDEX_COMMAND] | MSG_REPLY and \
r_buffer[MSG_INDEX_FRAME] == s_buffer[2] and \
r_buffer[MSG_INDEX_STATUS] == MSG_SUCCESS and \
r_buffer[MSG_INDEX_COUNT_LOW] == replyCount & 0xff and \
r_buffer[MSG_INDEX_COUNT_HIGH] == (replyCount >> 8) & 0xff and \
r_buffer[MSG_INDEX_DATA+replyCount] + self.device.calcChecksum(r_buffer,(MSG_HEADER_SIZE+replyCount)) == 0xff :
result = True
value = r_buffer[MSG_INDEX_DATA]
try:
if (result == False):
raise ResultError
except ResultError:
print('Error in DOut_R E-TC. Status =', hex(r_buffer[MSG_INDEX_STATUS]))
return -1
return value
def DOut(self, value):
"""
This command writes the DIO latch value. Writing a 0 to a bit will set
the corresponding pin driver low, writing a 1 sets it high. If pin(s) are
configured as alarm outputs, this command does not affect their value.
"""
dataCount = 1
replyCount = 0
result = False
s_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+dataCount) # send buffer
r_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+replyCount) # reply buffer
s_buffer[MSG_INDEX_COMMAND] = self.CMD_DOUT_W
s_buffer[MSG_INDEX_DATA] = value
s_buffer[MSG_INDEX_START] = MSG_START
s_buffer[MSG_INDEX_FRAME] = self.device.frameID
self.device.frameID = (self.device.frameID + 1) % 256 # increment frame ID with every send
s_buffer[MSG_INDEX_STATUS] = 0
s_buffer[MSG_INDEX_COUNT_LOW] = (dataCount & 0xff)
s_buffer[MSG_INDEX_COUNT_HIGH] = ((dataCount>>8) & 0xff)
s_buffer[MSG_INDEX_DATA+dataCount] = 0xff - self.device.calcChecksum(s_buffer, MSG_INDEX_DATA+dataCount)
self.device.sock.settimeout(.1)
self.device.sendMessage(s_buffer)
try:
r_buffer = self.device.sock.recv(16)
except socket.timeout:
raise TimeoutError('DOut: timeout error.')
return
if len(r_buffer) == MSG_HEADER_SIZE + MSG_CHECKSUM_SIZE + replyCount:
if r_buffer[MSG_INDEX_START] == s_buffer[0] and \
r_buffer[MSG_INDEX_COMMAND] == s_buffer[MSG_INDEX_COMMAND] | MSG_REPLY and \
r_buffer[MSG_INDEX_FRAME] == s_buffer[2] and \
r_buffer[MSG_INDEX_STATUS] == MSG_SUCCESS and \
r_buffer[MSG_INDEX_COUNT_LOW] == replyCount & 0xff and \
r_buffer[MSG_INDEX_COUNT_HIGH] == (replyCount >> 8) & 0xff and \
r_buffer[MSG_INDEX_DATA+replyCount] + self.device.calcChecksum(r_buffer,(MSG_HEADER_SIZE+replyCount)) == 0xff :
result = True
try:
if (result == False):
raise ResultError
except ResultError:
print('Error in DOut E-TC. Status =', hex(r_buffer[MSG_INDEX_STATUS]))
def DConfig_R(self):
"""
This command reads the DIO configuration value. A 1 in a bit
position indicates the corresponding pin is set to an input, a 0
indicates it is set to an output. The power on devault is all 1 (input)
"""
dataCount = 0
replyCount = 1
result = False
s_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+dataCount) # send buffer
r_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+replyCount) # reply buffer
s_buffer[MSG_INDEX_COMMAND] = self.CMD_DCONF_R
s_buffer[MSG_INDEX_START] = MSG_START
s_buffer[MSG_INDEX_FRAME] = self.device.frameID
self.device.frameID = (self.device.frameID + 1) % 256 # increment frame ID with every send
s_buffer[MSG_INDEX_STATUS] = 0
s_buffer[MSG_INDEX_COUNT_LOW] = (dataCount & 0xff)
s_buffer[MSG_INDEX_COUNT_HIGH] = ((dataCount>>8) & 0xff)
s_buffer[MSG_INDEX_DATA+dataCount] = 0xff - self.device.calcChecksum(s_buffer, MSG_INDEX_DATA+dataCount)
self.device.sock.settimeout(.1)
self.device.sendMessage(s_buffer)
try:
r_buffer = self.device.sock.recv(16)
except socket.timeout:
raise TimeoutError('DConfig_R: timeout error.')
return
if len(r_buffer) == MSG_HEADER_SIZE + MSG_CHECKSUM_SIZE + replyCount:
if r_buffer[MSG_INDEX_START] == s_buffer[0] and \
r_buffer[MSG_INDEX_COMMAND] == s_buffer[MSG_INDEX_COMMAND] | MSG_REPLY and \
r_buffer[MSG_INDEX_FRAME] == s_buffer[2] and \
r_buffer[MSG_INDEX_STATUS] == MSG_SUCCESS and \
r_buffer[MSG_INDEX_COUNT_LOW] == replyCount & 0xff and \
r_buffer[MSG_INDEX_COUNT_HIGH] == (replyCount >> 8) & 0xff and \
r_buffer[MSG_INDEX_DATA+replyCount] + self.device.calcChecksum(r_buffer,(MSG_HEADER_SIZE+replyCount)) == 0xff :
result = True
value = r_buffer[MSG_INDEX_DATA]
try:
if (result == False):
raise ResultError
except ResultError:
print('Error in DConfig_R E-TC. Status =', hex(r_buffer[MSG_INDEX_STATUS]))
return -1
return value
def DConfig_W(self, value):
"""
This command writes the configuration value. A 1 in a bit
position sets the corresponding pin to an input, a 0 sets it to an
output. The power on default is all ones (input). If one or more
alarms are configured, they will force the corresponding DIO bit to
and output and may not be overridden with this command.
"""
dataCount = 1
replyCount = 0
result = False
s_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+dataCount) # send buffer
r_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+replyCount) # reply buffer
s_buffer[MSG_INDEX_COMMAND] = self.CMD_DCONF_W
s_buffer[MSG_INDEX_DATA] = value
s_buffer[MSG_INDEX_START] = MSG_START
s_buffer[MSG_INDEX_FRAME] = self.device.frameID
self.device.frameID = (self.device.frameID + 1) % 256 # increment frame ID with every send
s_buffer[MSG_INDEX_STATUS] = 0
s_buffer[MSG_INDEX_COUNT_LOW] = (dataCount & 0xff)
s_buffer[MSG_INDEX_COUNT_HIGH] = ((dataCount>>8) & 0xff)
s_buffer[MSG_INDEX_DATA+dataCount] = 0xff - self.device.calcChecksum(s_buffer, MSG_INDEX_DATA+dataCount)
self.device.sock.settimeout(.1)
self.device.sendMessage(s_buffer)
try:
r_buffer = self.device.sock.recv(16)
except socket.timeout:
raise TimeoutError('DConfig_W: timeout error.')
return
if len(r_buffer) == MSG_HEADER_SIZE + MSG_CHECKSUM_SIZE + replyCount:
if r_buffer[MSG_INDEX_START] == s_buffer[0] and \
r_buffer[MSG_INDEX_COMMAND] == s_buffer[MSG_INDEX_COMMAND] | MSG_REPLY and \
r_buffer[MSG_INDEX_FRAME] == s_buffer[2] and \
r_buffer[MSG_INDEX_STATUS] == MSG_SUCCESS and \
r_buffer[MSG_INDEX_COUNT_LOW] == replyCount & 0xff and \
r_buffer[MSG_INDEX_COUNT_HIGH] == (replyCount >> 8) & 0xff and \
r_buffer[MSG_INDEX_DATA+replyCount] + self.device.calcChecksum(r_buffer,(MSG_HEADER_SIZE+replyCount)) == 0xff :
result = True
try:
if (result == False):
raise ResultError
except ResultError:
print('Error in DConfig_W E-TC. Status =', hex(r_buffer[MSG_INDEX_STATUS]))
#############################################
# Temperature Input Commands #
#############################################
def Tin(self, channel_mask, units, wait):
"""
This command reads the value of one or more thermocouple
channels. The channels to be read are passed as a bitmask when
calling the command. The data will be returned in the order low
channel number to high channel. The number of floating point
values returned will be equal to the number of channels specified
(max 8). Each temperature is calculated by performing cold
junction compensation as follows:
T = reverse_nist_function(Vin + Vcjc), where Vin is input
voltage, Vcjc is calculated cold junction voltage based on the
terminal temperature, and reverse_nist_function() is the NIST
thermocouple polynomial for voltage to temperature.
Vcjc = nist_function(Tcjc), where Tcjc is the temperature of the
screw terminal and nist_function() is the NIST thermocouple
polynomial for temperature to voltage.
Tcjc = Tsensor + Toffset + Tuser, where Tsensor is the
appropriate CJC sensor temperature, Toffset is a per-channel
offset characterized over a number of boards and fixed in
firmware, and Tuser is an optional user-specified offset (see
CJCOffset_r and CJCOffset_w).
There are some special return values:
-6666.0: Over range on input (temperature < -300C, only reported with units = 0)
-8888.0: Open thermocouple detected (only reported with units = 0)
-9999.0: Channel disabled
channel_mask: bitmask, the channels to be read
units: the units for the returned values
0 - Celsius, linerarized by TC type
1 - Voltage
2 - ADC code (uncalibrated)
wait: 0 - return current value, 1 - wait for new readings before returning
"""
dataCount = 3
replyCount = 4*self.nBits8(channel_mask)
result = False
s_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+dataCount) # send buffer
r_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+replyCount) # reply buffer
s_buffer[MSG_INDEX_COMMAND] = self.CMD_TIN
s_buffer[MSG_INDEX_DATA] = channel_mask & 0xff
s_buffer[MSG_INDEX_DATA+1] = units & 0xff
s_buffer[MSG_INDEX_DATA+2] = wait & 0xff
s_buffer[MSG_INDEX_START] = MSG_START
s_buffer[MSG_INDEX_FRAME] = self.device.frameID
self.device.frameID = (self.device.frameID + 1) % 256 # increment frame ID with every send
s_buffer[MSG_INDEX_STATUS] = 0
s_buffer[MSG_INDEX_COUNT_LOW] = (dataCount & 0xff)
s_buffer[MSG_INDEX_COUNT_HIGH] = ((dataCount>>8) & 0xff)
s_buffer[MSG_INDEX_DATA+dataCount] = 0xff - self.device.calcChecksum(s_buffer, MSG_INDEX_DATA+dataCount)
self.device.sock.settimeout(.5)
self.device.sendMessage(s_buffer)
try:
r_buffer = self.device.sock.recv(128)
except socket.timeout:
raise TimeoutError('Tin: timeout error.')
return
if len(r_buffer) == MSG_HEADER_SIZE + MSG_CHECKSUM_SIZE + replyCount:
if r_buffer[MSG_INDEX_START] == s_buffer[0] and \
r_buffer[MSG_INDEX_COMMAND] == s_buffer[MSG_INDEX_COMMAND] | MSG_REPLY and \
r_buffer[MSG_INDEX_FRAME] == s_buffer[2] and \
r_buffer[MSG_INDEX_STATUS] == MSG_SUCCESS and \
r_buffer[MSG_INDEX_COUNT_LOW] == replyCount & 0xff and \
r_buffer[MSG_INDEX_COUNT_HIGH] == (replyCount >> 8) & 0xff and \
r_buffer[MSG_INDEX_DATA+replyCount] + self.device.calcChecksum(r_buffer,(MSG_HEADER_SIZE+replyCount)) == 0xff :
result = True
value = list(unpack_from('f'*self.nBits8(channel_mask), r_buffer, MSG_INDEX_DATA))
try:
if (result == False):
raise ResultError
except ResultError:
print('Error in Tin E-TC. Status =', hex(r_buffer[MSG_INDEX_STATUS]))
return value
def CJC(self):
"""
This command reads the most recent value of the CJC sensors in Celsius.
"""
dataCount = 0
replyCount = 8
result = False
s_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+dataCount) # send buffer
r_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+replyCount) # reply buffer
s_buffer[MSG_INDEX_COMMAND] = self.CMD_CJC
s_buffer[MSG_INDEX_START] = MSG_START
s_buffer[MSG_INDEX_FRAME] = self.device.frameID
self.device.frameID = (self.device.frameID + 1) % 256 # increment frame ID with every send
s_buffer[MSG_INDEX_STATUS] = 0
s_buffer[MSG_INDEX_COUNT_LOW] = (dataCount & 0xff)
s_buffer[MSG_INDEX_COUNT_HIGH] = ((dataCount>>8) & 0xff)
s_buffer[MSG_INDEX_DATA+dataCount] = 0xff - self.device.calcChecksum(s_buffer, MSG_INDEX_DATA+dataCount)
self.device.sock.settimeout(.1)
self.device.sendMessage(s_buffer)
try:
r_buffer = self.device.sock.recv(64)
except socket.timeout:
raise TimeoutError('CJC: timeout error.')
return
if len(r_buffer) == MSG_HEADER_SIZE + MSG_CHECKSUM_SIZE + replyCount:
if r_buffer[MSG_INDEX_START] == s_buffer[0] and \
r_buffer[MSG_INDEX_COMMAND] == s_buffer[MSG_INDEX_COMMAND] | MSG_REPLY and \
r_buffer[MSG_INDEX_FRAME] == s_buffer[2] and \
r_buffer[MSG_INDEX_STATUS] == MSG_SUCCESS and \
r_buffer[MSG_INDEX_COUNT_LOW] == replyCount & 0xff and \
r_buffer[MSG_INDEX_COUNT_HIGH] == (replyCount >> 8) & 0xff and \
r_buffer[MSG_INDEX_DATA+replyCount] + self.device.calcChecksum(r_buffer,(MSG_HEADER_SIZE+replyCount)) == 0xff :
result = True
self.CJC_value = list(unpack_from('ff', r_buffer, MSG_INDEX_DATA))
try:
if (result == False):
raise ResultError
except ResultError:
print('Error in CJC E-TC. Status =', hex(r_buffer[MSG_INDEX_STATUS]))
return False
return self.CJC_value
def TinConfig_R(self):
"""
This command reads the thermocouple channel configurations. Each
configuration is a uint8_t with the following possible values:
0 - channel disabled
1 - TC type J
2 - TC type K
3 - TC type T
4 - TC type E
5 - TC type R
6 - TC type S
7 - TC type B
8 - TC type N
"""
dataCount = 0
replyCount = 8
result = False
s_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+dataCount) # send buffer
r_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+replyCount) # reply buffer
s_buffer[MSG_INDEX_COMMAND] = self.CMD_TIN_CONFIG_R
s_buffer[MSG_INDEX_START] = MSG_START
s_buffer[MSG_INDEX_FRAME] = self.device.frameID
self.device.frameID = (self.device.frameID + 1) % 256 # increment frame ID with every send
s_buffer[MSG_INDEX_STATUS] = 0
s_buffer[MSG_INDEX_COUNT_LOW] = (dataCount & 0xff)
s_buffer[MSG_INDEX_COUNT_HIGH] = ((dataCount>>8) & 0xff)
s_buffer[MSG_INDEX_DATA+dataCount] = 0xff - self.device.calcChecksum(s_buffer, MSG_INDEX_DATA+dataCount)
self.device.sock.settimeout(.1)
self.device.sendMessage(s_buffer)
try:
r_buffer = self.device.sock.recv(64)
except socket.timeout:
raise TimeoutError('TinConfig_R: timeout error.')
return
if len(r_buffer) == MSG_HEADER_SIZE + MSG_CHECKSUM_SIZE + replyCount:
if r_buffer[MSG_INDEX_START] == s_buffer[0] and \
r_buffer[MSG_INDEX_COMMAND] == s_buffer[MSG_INDEX_COMMAND] | MSG_REPLY and \
r_buffer[MSG_INDEX_FRAME] == s_buffer[2] and \
r_buffer[MSG_INDEX_STATUS] == MSG_SUCCESS and \
r_buffer[MSG_INDEX_COUNT_LOW] == replyCount & 0xff and \
r_buffer[MSG_INDEX_COUNT_HIGH] == (replyCount >> 8) & 0xff and \
r_buffer[MSG_INDEX_DATA+replyCount] + self.device.calcChecksum(r_buffer,(MSG_HEADER_SIZE+replyCount)) == 0xff :
result = True
for i in range(8):
self.config_values[i]= r_buffer[MSG_INDEX_DATA+i]
try:
if (result == False):
raise ResultError
except ResultError:
print('Error in TinConfig_R E-TC. Status =', hex(r_buffer[MSG_INDEX_STATUS]))
def TinConfig_W(self):
"""
This command writes the thermocouple channel
configurations. The micro stores these values in EEPROM and
loads them from EEPROM at power on. Each configuration is a
uint8_t with the following possible values:
0 - channel disabled
1 - TC type J
2 - TC type K
3 - TC type T
4 - TC type E
5 - TC type R
6 - TC type S
7 - TC type B
8 - TC type N
"""
dataCount = 8
replyCount = 0
result = False
s_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+dataCount) # send buffer
r_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+replyCount) # reply buffer
s_buffer[MSG_INDEX_COMMAND] = self.CMD_TIN_CONFIG_W
s_buffer[MSG_INDEX_START] = MSG_START
for i in range(8):
s_buffer[MSG_INDEX_DATA+i] = self.config_values[i]
s_buffer[MSG_INDEX_FRAME] = self.device.frameID
self.device.frameID = (self.device.frameID + 1) % 256 # increment frame ID with every send
s_buffer[MSG_INDEX_STATUS] = 0
s_buffer[MSG_INDEX_COUNT_LOW] = (dataCount & 0xff)
s_buffer[MSG_INDEX_COUNT_HIGH] = ((dataCount>>8) & 0xff)
s_buffer[MSG_INDEX_DATA+dataCount] = 0xff - self.device.calcChecksum(s_buffer, MSG_INDEX_DATA+dataCount)
self.device.sock.settimeout(.1)
self.device.sendMessage(s_buffer)
try:
r_buffer = self.device.sock.recv(64)
except socket.timeout:
raise TimeoutError('TinConfig_W: timeout error.')
return
if len(r_buffer) == MSG_HEADER_SIZE + MSG_CHECKSUM_SIZE + replyCount:
if r_buffer[MSG_INDEX_START] == s_buffer[0] and \
r_buffer[MSG_INDEX_COMMAND] == s_buffer[MSG_INDEX_COMMAND] | MSG_REPLY and \
r_buffer[MSG_INDEX_FRAME] == s_buffer[2] and \
r_buffer[MSG_INDEX_STATUS] == MSG_SUCCESS and \
r_buffer[MSG_INDEX_COUNT_LOW] == replyCount & 0xff and \
r_buffer[MSG_INDEX_COUNT_HIGH] == (replyCount >> 8) & 0xff and \
r_buffer[MSG_INDEX_DATA+replyCount] + self.device.calcChecksum(r_buffer,(MSG_HEADER_SIZE+replyCount)) == 0xff :
result = True
try:
if (result == False):
raise ResultError
except ResultError:
print('Error in TinConfig_W E-TC. Status =', hex(r_buffer[MSG_INDEX_STATUS]))
def TinStatus(self):
"""
This command reads the status of the temperature readings. If
a bit is set the corresponding channel has a new reading that
has not been read with the Tin command.
"""
dataCount = 0
replyCount = 1
result = False
s_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+dataCount) # send buffer
r_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+replyCount) # reply buffer
s_buffer[MSG_INDEX_COMMAND] = self.CMD_TIN_STATUS
s_buffer[MSG_INDEX_START] = MSG_START
s_buffer[MSG_INDEX_FRAME] = self.device.frameID
self.device.frameID = (self.device.frameID + 1) % 256 # increment frame ID with every send
s_buffer[MSG_INDEX_STATUS] = 0
s_buffer[MSG_INDEX_COUNT_LOW] = (dataCount & 0xff)
s_buffer[MSG_INDEX_COUNT_HIGH] = ((dataCount>>8) & 0xff)
s_buffer[MSG_INDEX_DATA+dataCount] = 0xff - self.device.calcChecksum(s_buffer, MSG_INDEX_DATA+dataCount)
self.device.sock.settimeout(.1)
self.device.sendMessage(s_buffer)
try:
r_buffer = self.device.sock.recv(64)
except socket.timeout:
raise TimeoutError('TinStatus: timeout error.')
return
if len(r_buffer) == MSG_HEADER_SIZE + MSG_CHECKSUM_SIZE + replyCount:
if r_buffer[MSG_INDEX_START] == s_buffer[0] and \
r_buffer[MSG_INDEX_COMMAND] == s_buffer[MSG_INDEX_COMMAND] | MSG_REPLY and \
r_buffer[MSG_INDEX_FRAME] == s_buffer[2] and \
r_buffer[MSG_INDEX_STATUS] == MSG_SUCCESS and \
r_buffer[MSG_INDEX_COUNT_LOW] == replyCount & 0xff and \
r_buffer[MSG_INDEX_COUNT_HIGH] == (replyCount >> 8) & 0xff and \
r_buffer[MSG_INDEX_DATA+replyCount] + self.device.calcChecksum(r_buffer,(MSG_HEADER_SIZE+replyCount)) == 0xff :
result = True
self.Tin_status ,= unpack_from('B', r_buffer, MSG_INDEX_DATA)
try:
if (result == False):
raise ResultError
except ResultError:
print('Error in TinStatus E-TC. Status =', hex(r_buffer[MSG_INDEX_STATUS]))
return -1
return self.Tin_status
def OTDStatus(self):
"""
This command reads the status of the open thermocouple
detection. If a bit is set an open thermocouple is currently
detected on the corresponding channel.
"""
dataCount = 0
replyCount = 1
result = False
s_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+dataCount) # send buffer
r_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+replyCount) # reply buffer
s_buffer[MSG_INDEX_COMMAND] = self.CMD_OTD_STATUS
s_buffer[MSG_INDEX_START] = MSG_START
s_buffer[MSG_INDEX_FRAME] = self.device.frameID
self.device.frameID = (self.device.frameID + 1) % 256 # increment frame ID with every send
s_buffer[MSG_INDEX_STATUS] = 0
s_buffer[MSG_INDEX_COUNT_LOW] = (dataCount & 0xff)
s_buffer[MSG_INDEX_COUNT_HIGH] = ((dataCount>>8) & 0xff)
s_buffer[MSG_INDEX_DATA+dataCount] = 0xff - self.device.calcChecksum(s_buffer, MSG_INDEX_DATA+dataCount)
self.device.sock.settimeout(.1)
self.device.sendMessage(s_buffer)
try:
r_buffer = self.device.sock.recv(64)
except socket.timeout:
raise TimeoutError('OTDStatus: timeout error.')
return
if len(r_buffer) == MSG_HEADER_SIZE + MSG_CHECKSUM_SIZE + replyCount:
if r_buffer[MSG_INDEX_START] == s_buffer[0] and \
r_buffer[MSG_INDEX_COMMAND] == s_buffer[MSG_INDEX_COMMAND] | MSG_REPLY and \
r_buffer[MSG_INDEX_FRAME] == s_buffer[2] and \
r_buffer[MSG_INDEX_STATUS] == MSG_SUCCESS and \
r_buffer[MSG_INDEX_COUNT_LOW] == replyCount & 0xff and \
r_buffer[MSG_INDEX_COUNT_HIGH] == (replyCount >> 8) & 0xff and \
r_buffer[MSG_INDEX_DATA+replyCount] + self.device.calcChecksum(r_buffer,(MSG_HEADER_SIZE+replyCount)) == 0xff :
result = True
self.OTD_status ,= unpack_from('B', r_buffer, MSG_INDEX_DATA)
try:
if (result == False):
raise ResultError
except ResultError:
print('Error in OTDStatus E-TC. Status =', hex(r_buffer[MSG_INDEX_STATUS]))
return -1
return self.OTD_status
def MeasureConfig_R(self):
"""
This command reads the measurement configuration.
bit 0: OTD disable 0 - OTD enable, 1 - OTD disabled
bit 1: Coefficient select 0 - factory coefficients 1 - field coefficients
bit 2-7: Reserved
"""
dataCount = 0
replyCount = 1
result = False
s_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+dataCount) # send buffer
r_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+replyCount) # reply buffer
s_buffer[MSG_INDEX_COMMAND] = self.CMD_MEASURE_CONFIG_R
s_buffer[MSG_INDEX_START] = MSG_START
s_buffer[MSG_INDEX_FRAME] = self.device.frameID
self.device.frameID = (self.device.frameID + 1) % 256 # increment frame ID with every send
s_buffer[MSG_INDEX_STATUS] = 0
s_buffer[MSG_INDEX_COUNT_LOW] = (dataCount & 0xff)
s_buffer[MSG_INDEX_COUNT_HIGH] = ((dataCount>>8) & 0xff)
s_buffer[MSG_INDEX_DATA+dataCount] = 0xff - self.device.calcChecksum(s_buffer, MSG_INDEX_DATA+dataCount)
self.device.sock.settimeout(.1)
self.device.sendMessage(s_buffer)
try:
r_buffer = self.device.sock.recv(64)
except socket.timeout:
raise TimeoutError('MeasureConfig_R: timeout error.')
return
if len(r_buffer) == MSG_HEADER_SIZE + MSG_CHECKSUM_SIZE + replyCount:
if r_buffer[MSG_INDEX_START] == s_buffer[0] and \
r_buffer[MSG_INDEX_COMMAND] == s_buffer[MSG_INDEX_COMMAND] | MSG_REPLY and \
r_buffer[MSG_INDEX_FRAME] == s_buffer[2] and \
r_buffer[MSG_INDEX_STATUS] == MSG_SUCCESS and \
r_buffer[MSG_INDEX_COUNT_LOW] == replyCount & 0xff and \
r_buffer[MSG_INDEX_COUNT_HIGH] == (replyCount >> 8) & 0xff and \
r_buffer[MSG_INDEX_DATA+replyCount] + self.device.calcChecksum(r_buffer,(MSG_HEADER_SIZE+replyCount)) == 0xff :
result = True
self.config_measure ,= unpack_from('B', r_buffer, MSG_INDEX_DATA)
try:
if (result == False):
raise ResultError
except ResultError:
print('Error in MeasureConfig_R E-TC. Status =', hex(r_buffer[MSG_INDEX_STATUS]))
return -1
return self.config_measure
def MeasureConfig_W(self):
"""
This command writes the measurement configuration.
bit 0: OTD disable 0 - OTD enable, 1 - OTD disabled
bit 1: Coefficient select 0 - factory coefficients 1 - field coefficients
bit 2-7: Reserved
"""
dataCount = 1
replyCount = 0
result = False
s_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+dataCount) # send buffer
r_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+replyCount) # reply buffer
s_buffer[MSG_INDEX_COMMAND] = self.CMD_MEASURE_CONFIG_W
s_buffer[MSG_INDEX_DATA] = self.config_measure
s_buffer[MSG_INDEX_START] = MSG_START
s_buffer[MSG_INDEX_FRAME] = self.device.frameID
self.device.frameID = (self.device.frameID + 1) % 256 # increment frame ID with every send
s_buffer[MSG_INDEX_STATUS] = 0
s_buffer[MSG_INDEX_COUNT_LOW] = (dataCount & 0xff)
s_buffer[MSG_INDEX_COUNT_HIGH] = ((dataCount>>8) & 0xff)
s_buffer[MSG_INDEX_DATA+dataCount] = 0xff - self.device.calcChecksum(s_buffer, MSG_INDEX_DATA+dataCount)
self.device.sock.settimeout(.1)
self.device.sendMessage(s_buffer)
try:
r_buffer = self.device.sock.recv(64)
except socket.timeout:
raise TimeoutError('MeasureConfig_W: timeout error.')
return
if len(r_buffer) == MSG_HEADER_SIZE + MSG_CHECKSUM_SIZE + replyCount:
if r_buffer[MSG_INDEX_START] == s_buffer[0] and \
r_buffer[MSG_INDEX_COMMAND] == s_buffer[MSG_INDEX_COMMAND] | MSG_REPLY and \
r_buffer[MSG_INDEX_FRAME] == s_buffer[2] and \
r_buffer[MSG_INDEX_STATUS] == MSG_SUCCESS and \
r_buffer[MSG_INDEX_COUNT_LOW] == replyCount & 0xff and \
r_buffer[MSG_INDEX_COUNT_HIGH] == (replyCount >> 8) & 0xff and \
r_buffer[MSG_INDEX_DATA+replyCount] + self.device.calcChecksum(r_buffer,(MSG_HEADER_SIZE+replyCount)) == 0xff :
result = True
try:
if (result == False):
raise ResultError
except ResultError:
print('Error in MeasureConfig_W E-TC. Status =', hex(r_buffer[MSG_INDEX_STATUS]))
def MeasureMode_R(self):
"""
This command reads the measurement mode. The power on default is mode 0 (normal mode)
mode_base: the measurement mode for the base unit:
0 = Normal mode, the measurement loop converts all of the configured channels in sequence
1 = Test mode: the muxes are fixed on channel 0 and 4 and the ADCs continuously convert those channels.
2 = Offset measure mode: offset cal circuit is connected to cal mux and all conversions are performed
on that input. Value is stored in channel 0 and 4.
"""
dataCount = 0
replyCount = 1
result = False
s_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+dataCount) # send buffer
r_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+replyCount) # reply buffer
s_buffer[MSG_INDEX_COMMAND] = self.CMD_MEASURE_MODE_R
s_buffer[MSG_INDEX_START] = MSG_START
s_buffer[MSG_INDEX_FRAME] = self.device.frameID
self.device.frameID = (self.device.frameID + 1) % 256 # increment frame ID with every send
s_buffer[MSG_INDEX_STATUS] = 0
s_buffer[MSG_INDEX_COUNT_LOW] = (dataCount & 0xff)
s_buffer[MSG_INDEX_COUNT_HIGH] = ((dataCount>>8) & 0xff)
s_buffer[MSG_INDEX_DATA+dataCount] = 0xff - self.device.calcChecksum(s_buffer, MSG_INDEX_DATA+dataCount)
self.device.sock.settimeout(.1)
self.device.sendMessage(s_buffer)
try:
r_buffer = self.device.sock.recv(64)
except socket.timeout:
raise TimeoutError('MeasureMode_R: timeout error.')
return
if len(r_buffer) == MSG_HEADER_SIZE + MSG_CHECKSUM_SIZE + replyCount:
if r_buffer[MSG_INDEX_START] == s_buffer[0] and \
r_buffer[MSG_INDEX_COMMAND] == s_buffer[MSG_INDEX_COMMAND] | MSG_REPLY and \
r_buffer[MSG_INDEX_FRAME] == s_buffer[2] and \
r_buffer[MSG_INDEX_STATUS] == MSG_SUCCESS and \
r_buffer[MSG_INDEX_COUNT_LOW] == replyCount & 0xff and \
r_buffer[MSG_INDEX_COUNT_HIGH] == (replyCount >> 8) & 0xff and \
r_buffer[MSG_INDEX_DATA+replyCount] + self.device.calcChecksum(r_buffer,(MSG_HEADER_SIZE+replyCount)) == 0xff :
result = True
self.mode_measure ,= unpack_from('B', r_buffer, MSG_INDEX_DATA)
try:
if (result == False):
raise ResultError
except ResultError:
print('Error in MeasureMode_R E-TC. Status =', hex(r_buffer[MSG_INDEX_STATUS]))
return -1
return self.mode_measure
def MeasureMode_W(self):
"""
This command writes the measurement mode. The power on default is mode 0 (normal mode)
mode_base: the measurement mode for the base unit:
0 = Normal mode, the measurement loop converts all of the configured channels in sequence
1 = Test mode: the muxes are fixed on channel 0 and 4 and the ADCs continuously convert those channels.
2 = Offset measure mode: offset cal circuit is connected to cal mux and all conversions are performed
on that input. Value is stored in channel 0 and 4.
"""
dataCount = 1
replyCount = 0
result = False
s_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+dataCount) # send buffer
r_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+replyCount) # reply buffer
s_buffer[MSG_INDEX_COMMAND] = self.CMD_MEASURE_MODE_W
s_buffer[MSG_INDEX_DATA] = self.mode_measure
s_buffer[MSG_INDEX_START] = MSG_START
s_buffer[MSG_INDEX_FRAME] = self.device.frameID
self.device.frameID = (self.device.frameID + 1) % 256 # increment frame ID with every send
s_buffer[MSG_INDEX_STATUS] = 0
s_buffer[MSG_INDEX_COUNT_LOW] = (dataCount & 0xff)
s_buffer[MSG_INDEX_COUNT_HIGH] = ((dataCount>>8) & 0xff)
s_buffer[MSG_INDEX_DATA+dataCount] = 0xff - self.device.calcChecksum(s_buffer, MSG_INDEX_DATA+dataCount)
self.device.sock.settimeout(.1)
self.device.sendMessage(s_buffer)
try:
r_buffer = self.device.sock.recv(64)
except socket.timeout:
raise TimeoutError('MeasureMode_W: timeout error.')
return
if len(r_buffer) == MSG_HEADER_SIZE + MSG_CHECKSUM_SIZE + replyCount:
if r_buffer[MSG_INDEX_START] == s_buffer[0] and \
r_buffer[MSG_INDEX_COMMAND] == s_buffer[MSG_INDEX_COMMAND] | MSG_REPLY and \
r_buffer[MSG_INDEX_FRAME] == s_buffer[2] and \
r_buffer[MSG_INDEX_STATUS] == MSG_SUCCESS and \
r_buffer[MSG_INDEX_COUNT_LOW] == replyCount & 0xff and \
r_buffer[MSG_INDEX_COUNT_HIGH] == (replyCount >> 8) & 0xff and \
r_buffer[MSG_INDEX_DATA+replyCount] + self.device.calcChecksum(r_buffer,(MSG_HEADER_SIZE+replyCount)) == 0xff :
result = True
try:
if (result == False):
raise ResultError
except ResultError:
print('Error in MeasureMode_W E-TC. Status =', hex(r_buffer[MSG_INDEX_STATUS]))
def FactoryCoefficients_R(self):
"""
This command reads the factory calibration coefficients. Each
coefficient is a float. The firmware applies the coefficients
when calculating the voltage and temperature values for each
channel. The coefficients are applied immediately and stored in
the EEPROM.
"""
dataCount = 0
replyCount = 1
result = False
s_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+dataCount) # send buffer
r_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+replyCount) # reply buffer
s_buffer[MSG_INDEX_COMMAND] = self.CMD_FACTORY_COEF_R
s_buffer[MSG_INDEX_START] = MSG_START
s_buffer[MSG_INDEX_FRAME] = self.device.frameID
self.device.frameID = (self.device.frameID + 1) % 256 # increment frame ID with every send
s_buffer[MSG_INDEX_STATUS] = 0
s_buffer[MSG_INDEX_COUNT_LOW] = (dataCount & 0xff)
s_buffer[MSG_INDEX_COUNT_HIGH] = ((dataCount>>8) & 0xff)
s_buffer[MSG_INDEX_DATA+dataCount] = 0xff - self.device.calcChecksum(s_buffer, MSG_INDEX_DATA+dataCount)
self.device.sock.settimeout(.1)
self.device.sendMessage(s_buffer)
try:
r_buffer = self.device.sock.recv(64)
except socket.timeout:
raise TimeoutError('FactoryCoefficients_R: timeout error.')
return
if len(r_buffer) == MSG_HEADER_SIZE + MSG_CHECKSUM_SIZE + replyCount:
if r_buffer[MSG_INDEX_START] == s_buffer[0] and \
r_buffer[MSG_INDEX_COMMAND] == s_buffer[MSG_INDEX_COMMAND] | MSG_REPLY and \
r_buffer[MSG_INDEX_FRAME] == s_buffer[2] and \
r_buffer[MSG_INDEX_STATUS] == MSG_SUCCESS and \
r_buffer[MSG_INDEX_COUNT_LOW] == replyCount & 0xff and \
r_buffer[MSG_INDEX_COUNT_HIGH] == (replyCount >> 8) & 0xff and \
r_buffer[MSG_INDEX_DATA+replyCount] + self.device.calcChecksum(r_buffer,(MSG_HEADER_SIZE+replyCount)) == 0xff :
result = True
self.calCoefFactory[0].slope ,= unpack_from('f', r_buffer, MSG_INDEX_DATA)
self.calCoefFactory[1].slope ,= unpack_from('f', r_buffer, MSG_INDEX_DATA+4)
self.calCoefFactory[0].intercept ,= unpack_from('f', r_buffer, MSG_INDEX_DATA+8)
self.calCoefFactory[1].intercept ,= unpack_from('f', r_buffer, MSG_INDEX_DATA+12)
try:
if (result == False):
raise ResultError
except ResultError:
print('Error in FactoryCoefficients_R E-TC. Status =', hex(r_buffer[MSG_INDEX_STATUS]))
def FactoryCoefficients_W(self):
"""
This command writes the factory calibration coefficients. The
microcontroller stores the values in EEPROM and restores them at
power on.
"""
dataCount = 16 # 4*sizeof(float)
replyCount = 0
result = False
s_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+dataCount) # send buffer
r_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+replyCount) # reply buffer
s_buffer[MSG_INDEX_COMMAND] = self.CMD_FACTORY_COEF_W
pack_into('ffff', s_buffer, MSG_INDEX_DATA, self.calCoefFactory[0].slope, self.calCoefFactory[1].slope, \
self.calCoefFactory[0].intercept, self.calCoefFactory[1].intercept)
s_buffer[MSG_INDEX_START] = MSG_START
s_buffer[MSG_INDEX_FRAME] = self.device.frameID
self.device.frameID = (self.device.frameID + 1) % 256 # increment frame ID with every send
s_buffer[MSG_INDEX_STATUS] = 0
s_buffer[MSG_INDEX_COUNT_LOW] = (dataCount & 0xff)
s_buffer[MSG_INDEX_COUNT_HIGH] = ((dataCount>>8) & 0xff)
s_buffer[MSG_INDEX_DATA+dataCount] = 0xff - self.device.calcChecksum(s_buffer, MSG_INDEX_DATA+dataCount)
self.device.sock.settimeout(.1)
self.device.sendMessage(s_buffer)
try:
r_buffer = self.device.sock.recv(64)
except socket.timeout:
raise TimeoutError('FactoryCoefficients_W: timeout error.')
return
if len(r_buffer) == MSG_HEADER_SIZE + MSG_CHECKSUM_SIZE + replyCount:
if r_buffer[MSG_INDEX_START] == s_buffer[0] and \
r_buffer[MSG_INDEX_COMMAND] == s_buffer[MSG_INDEX_COMMAND] | MSG_REPLY and \
r_buffer[MSG_INDEX_FRAME] == s_buffer[2] and \
r_buffer[MSG_INDEX_STATUS] == MSG_SUCCESS and \
r_buffer[MSG_INDEX_COUNT_LOW] == replyCount & 0xff and \
r_buffer[MSG_INDEX_COUNT_HIGH] == (replyCount >> 8) & 0xff and \
r_buffer[MSG_INDEX_DATA+replyCount] + self.device.calcChecksum(r_buffer,(MSG_HEADER_SIZE+replyCount)) == 0xff :
result = True
try:
if (result == False):
raise ResultError
except ResultError:
print('Error in FactoryCoefficients_W E-TC. Status =', hex(r_buffer[MSG_INDEX_STATUS]))
def FieldCoefficients_R(self):
"""
This command reads the field calibration coefficients. Each
coefficient is a float. The firmware applies the coefficients
when calculating the voltage and temperature values for each
channel. The coefficients are applied immediately and stored in
the EEPROM.
"""
dataCount = 0
replyCount = 1
result = False
s_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+dataCount) # send buffer
r_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+replyCount) # reply buffer
s_buffer[MSG_INDEX_COMMAND] = self.CMD_FIELD_COEF_R
s_buffer[MSG_INDEX_START] = MSG_START
s_buffer[MSG_INDEX_FRAME] = self.device.frameID
self.device.frameID = (self.device.frameID + 1) % 256 # increment frame ID with every send
s_buffer[MSG_INDEX_STATUS] = 0
s_buffer[MSG_INDEX_COUNT_LOW] = (dataCount & 0xff)
s_buffer[MSG_INDEX_COUNT_HIGH] = ((dataCount>>8) & 0xff)
s_buffer[MSG_INDEX_DATA+dataCount] = 0xff - self.device.calcChecksum(s_buffer, MSG_INDEX_DATA+dataCount)
self.device.sock.settimeout(.1)
self.device.sendMessage(s_buffer)
try:
r_buffer = self.device.sock.recv(64)
except socket.timeout:
raise TimeoutError('FieldCoefficients_R: timeout error.')
return
if len(r_buffer) == MSG_HEADER_SIZE + MSG_CHECKSUM_SIZE + replyCount:
if r_buffer[MSG_INDEX_START] == s_buffer[0] and \
r_buffer[MSG_INDEX_COMMAND] == s_buffer[MSG_INDEX_COMMAND] | MSG_REPLY and \
r_buffer[MSG_INDEX_FRAME] == s_buffer[2] and \
r_buffer[MSG_INDEX_STATUS] == MSG_SUCCESS and \
r_buffer[MSG_INDEX_COUNT_LOW] == replyCount & 0xff and \
r_buffer[MSG_INDEX_COUNT_HIGH] == (replyCount >> 8) & 0xff and \
r_buffer[MSG_INDEX_DATA+replyCount] + self.device.calcChecksum(r_buffer,(MSG_HEADER_SIZE+replyCount)) == 0xff :
result = True
self.calCoefField[0].slope ,= unpack_from('f', r_buffer, MSG_INDEX_DATA)
self.calCoefField[1].slope ,= unpack_from('f', r_buffer, MSG_INDEX_DATA+4)
self.calCoefField[0].intercept ,= unpack_from('f', r_buffer, MSG_INDEX_DATA+8)
self.calCoefField[1].intercept ,= unpack_from('f', r_buffer, MSG_INDEX_DATA+12)
if (result == False):
print('Error in FieldCoefficients_R E-TC. Status =', hex(r_buffer[MSG_INDEX_STATUS]))
return result
def FieldCoefficients_W(self):
"""
This command writes the field calibration coefficients. The
microcontroller stores the values in EEPROM and restores them at
power on.
"""
dataCount = 16 # 4*sizeof(float)
replyCount = 0
result = False
s_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+dataCount) # send buffer
r_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+replyCount) # reply buffer
s_buffer[MSG_INDEX_COMMAND] = self.CMD_FIELD_COEF_W
pack_into('ffff', s_buffer, MSG_INDEX_DATA, self.calCoefField[0].slope, self.calCoefField[1].slope, \
self.calCoefField[0].intercept, self.calCoefField[1].intercept)
s_buffer[MSG_INDEX_START] = MSG_START
s_buffer[MSG_INDEX_FRAME] = self.device.frameID
self.device.frameID = (self.device.frameID + 1) % 256 # increment frame ID with every send
s_buffer[MSG_INDEX_STATUS] = 0
s_buffer[MSG_INDEX_COUNT_LOW] = (dataCount & 0xff)
s_buffer[MSG_INDEX_COUNT_HIGH] = ((dataCount>>8) & 0xff)
s_buffer[MSG_INDEX_DATA+dataCount] = 0xff - self.device.calcChecksum(s_buffer, MSG_INDEX_DATA+dataCount)
self.device.sock.settimeout(.1)
self.device.sendMessage(s_buffer)
try:
r_buffer = self.device.sock.recv(64)
except socket.timeout:
raise TimeoutError('FieldCoefficients_W: timeout error.')
return
if len(r_buffer) == MSG_HEADER_SIZE + MSG_CHECKSUM_SIZE + replyCount:
if r_buffer[MSG_INDEX_START] == s_buffer[0] and \
r_buffer[MSG_INDEX_COMMAND] == s_buffer[MSG_INDEX_COMMAND] | MSG_REPLY and \
r_buffer[MSG_INDEX_FRAME] == s_buffer[2] and \
r_buffer[MSG_INDEX_STATUS] == MSG_SUCCESS and \
r_buffer[MSG_INDEX_COUNT_LOW] == replyCount & 0xff and \
r_buffer[MSG_INDEX_COUNT_HIGH] == (replyCount >> 8) & 0xff and \
r_buffer[MSG_INDEX_DATA+replyCount] + self.device.calcChecksum(r_buffer,(MSG_HEADER_SIZE+replyCount)) == 0xff :
result = True
try:
if (result == False):
raise ResultError
except ResultError:
print('Error in FieldCoefficients_W E-TC. Status =', hex(r_buffer[MSG_INDEX_STATUS]))
def FactoryCalDate_R(self):
"""
This command reads the factory calibration date
"""
dataCount = 0
replyCount = 6
result = False
s_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+dataCount) # send buffer
r_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+replyCount) # reply buffer
s_buffer[MSG_INDEX_COMMAND] = self.CMD_FACTORY_CAL_DATE_R
s_buffer[MSG_INDEX_START] = MSG_START
s_buffer[MSG_INDEX_FRAME] = self.device.frameID
self.device.frameID = (self.device.frameID + 1) % 256 # increment frame ID with every send
s_buffer[MSG_INDEX_STATUS] = 0
s_buffer[MSG_INDEX_COUNT_LOW] = (dataCount & 0xff)
s_buffer[MSG_INDEX_COUNT_HIGH] = ((dataCount>>8) & 0xff)
s_buffer[MSG_INDEX_DATA+dataCount] = 0xff - self.device.calcChecksum(s_buffer, MSG_INDEX_DATA+dataCount)
self.device.sock.settimeout(.1)
self.device.sendMessage(s_buffer)
try:
r_buffer = self.device.sock.recv(64)
except socket.timeout:
raise TimeoutError('FactoryCalDate_R: timeout error.')
return
if len(r_buffer) == MSG_HEADER_SIZE + MSG_CHECKSUM_SIZE + replyCount:
if r_buffer[MSG_INDEX_START] == s_buffer[0] and \
r_buffer[MSG_INDEX_COMMAND] == s_buffer[MSG_INDEX_COMMAND] | MSG_REPLY and \
r_buffer[MSG_INDEX_FRAME] == s_buffer[2] and \
r_buffer[MSG_INDEX_STATUS] == MSG_SUCCESS and \
r_buffer[MSG_INDEX_COUNT_LOW] == replyCount & 0xff and \
r_buffer[MSG_INDEX_COUNT_HIGH] == (replyCount >> 8) & 0xff and \
r_buffer[MSG_INDEX_DATA+replyCount] + self.device.calcChecksum(r_buffer,(MSG_HEADER_SIZE+replyCount)) == 0xff :
result = True
year ,= unpack_from('B', r_buffer, MSG_INDEX_DATA)
year += 2000
month ,= unpack_from('B', r_buffer, MSG_INDEX_DATA+1)
day ,= unpack_from('B', r_buffer, MSG_INDEX_DATA+2)
hour ,= unpack_from('B', r_buffer, MSG_INDEX_DATA+3)
minute ,= unpack_from('B', r_buffer, MSG_INDEX_DATA+4)
second ,= unpack_from('B', r_buffer, MSG_INDEX_DATA+5)
mdate = datetime(year, month, day, hour, minute, second)
try:
if (result == False):
raise ResultError
except ResultError:
print('Error in FactoryCalDate_R E-TC. Status =', hex(r_buffer[MSG_INDEX_STATUS]))
return mdate
def FactoryCalDate_W(self, mdate):
"""
This command writes the factory calibration date.
"""
dataCount = 6
replyCount = 0
result = False
s_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+dataCount) # send buffer
r_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+replyCount) # reply buffer
s_buffer[MSG_INDEX_COMMAND] = self.CMD_FACTORY_CAL_DATE_W
s_buffer[MSG_INDEX_DATA] = mdate.year - 2000
s_buffer[MSG_INDEX_DATA+1] = mdate.month
s_buffer[MSG_INDEX_DATA+2] = mdate.day
s_buffer[MSG_INDEX_DATA+3] = mdate.hour
s_buffer[MSG_INDEX_DATA+4] = mdate.minute
s_buffer[MSG_INDEX_DATA+5] = mdate.second
s_buffer[MSG_INDEX_START] = MSG_START
s_buffer[MSG_INDEX_FRAME] = self.device.frameID
self.device.frameID = (self.device.frameID + 1) % 256 # increment frame ID with every send
s_buffer[MSG_INDEX_STATUS] = 0
s_buffer[MSG_INDEX_COUNT_LOW] = (dataCount & 0xff)
s_buffer[MSG_INDEX_COUNT_HIGH] = ((dataCount>>8) & 0xff)
s_buffer[MSG_INDEX_DATA+dataCount] = 0xff - self.device.calcChecksum(s_buffer, MSG_INDEX_DATA+dataCount)
self.device.sock.settimeout(.1)
self.device.sendMessage(s_buffer)
try:
r_buffer = self.device.sock.recv(64)
except socket.timeout:
raise TimeoutError('FactoryCalDate_W: timeout error.')
return
if len(r_buffer) == MSG_HEADER_SIZE + MSG_CHECKSUM_SIZE + replyCount:
if r_buffer[MSG_INDEX_START] == s_buffer[0] and \
r_buffer[MSG_INDEX_COMMAND] == s_buffer[MSG_INDEX_COMMAND] | MSG_REPLY and \
r_buffer[MSG_INDEX_FRAME] == s_buffer[2] and \
r_buffer[MSG_INDEX_STATUS] == MSG_SUCCESS and \
r_buffer[MSG_INDEX_COUNT_LOW] == replyCount & 0xff and \
r_buffer[MSG_INDEX_COUNT_HIGH] == (replyCount >> 8) & 0xff and \
r_buffer[MSG_INDEX_DATA+replyCount] + self.device.calcChecksum(r_buffer,(MSG_HEADER_SIZE+replyCount)) == 0xff :
result = True
try:
if (result == False):
raise ResultError
except ResultError:
print('Error in FactoryCalDate_W E-TC. Status =', hex(r_buffer[MSG_INDEX_STATUS]))
def FieldCalDate_R(self):
"""
This command reads the field calibration date.
"""
dataCount = 0
replyCount = 6
result = False
s_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+dataCount) # send buffer
r_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+replyCount) # reply buffer
s_buffer[MSG_INDEX_COMMAND] = self.CMD_FIELD_CAL_DATE_R
s_buffer[MSG_INDEX_START] = MSG_START
s_buffer[MSG_INDEX_FRAME] = self.device.frameID
self.device.frameID = (self.device.frameID + 1) % 256 # increment frame ID with every send
s_buffer[MSG_INDEX_STATUS] = 0
s_buffer[MSG_INDEX_COUNT_LOW] = (dataCount & 0xff)
s_buffer[MSG_INDEX_COUNT_HIGH] = ((dataCount>>8) & 0xff)
s_buffer[MSG_INDEX_DATA+dataCount] = 0xff - self.device.calcChecksum(s_buffer, MSG_INDEX_DATA+dataCount)
self.device.sock.settimeout(.1)
self.device.sendMessage(s_buffer)
try:
r_buffer = self.device.sock.recv(64)
except socket.timeout:
raise TimeoutError('FieldCalDate_R: timeout error.')
return
if len(r_buffer) == MSG_HEADER_SIZE + MSG_CHECKSUM_SIZE + replyCount:
if r_buffer[MSG_INDEX_START] == s_buffer[0] and \
r_buffer[MSG_INDEX_COMMAND] == s_buffer[MSG_INDEX_COMMAND] | MSG_REPLY and \
r_buffer[MSG_INDEX_FRAME] == s_buffer[2] and \
r_buffer[MSG_INDEX_STATUS] == MSG_SUCCESS and \
r_buffer[MSG_INDEX_COUNT_LOW] == replyCount & 0xff and \
r_buffer[MSG_INDEX_COUNT_HIGH] == (replyCount >> 8) & 0xff and \
r_buffer[MSG_INDEX_DATA+replyCount] + self.device.calcChecksum(r_buffer,(MSG_HEADER_SIZE+replyCount)) == 0xff :
result = True
year ,= unpack_from('B', r_buffer, MSG_INDEX_DATA)
year += 2000
month ,= unpack_from('B', r_buffer, MSG_INDEX_DATA+1)
day ,= unpack_from('B', r_buffer, MSG_INDEX_DATA+2)
hour ,= unpack_from('B', r_buffer, MSG_INDEX_DATA+3)
minute ,= unpack_from('B', r_buffer, MSG_INDEX_DATA+4)
second ,= unpack_from('B', r_buffer, MSG_INDEX_DATA+5)
mdate = datetime(year, month, day, hour, minute, second)
try:
if (result == False):
raise ResultError
except ResultError:
print('Error in FieldCalDate_R E-TC. Status =', hex(r_buffer[MSG_INDEX_STATUS]))
return mdate
def FieldCalDate_W(self, mdate):
"""
This command writes the field calibration date.
"""
dataCount = 6
replyCount = 0
result = False
s_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+dataCount) # send buffer
r_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+replyCount) # reply buffer
s_buffer[MSG_INDEX_COMMAND] = self.CMD_FACTORY_CAL_DATE_W
s_buffer[MSG_INDEX_DATA] = mdate.year - 2000
s_buffer[MSG_INDEX_DATA+1] = mdate.month
s_buffer[MSG_INDEX_DATA+2] = mdate.day
s_buffer[MSG_INDEX_DATA+3] = mdate.hour
s_buffer[MSG_INDEX_DATA+4] = mdate.minute
s_buffer[MSG_INDEX_DATA+5] = mdate.second
s_buffer[MSG_INDEX_START] = MSG_START
s_buffer[MSG_INDEX_FRAME] = self.device.frameID
self.device.frameID = (self.device.frameID + 1) % 256 # increment frame ID with every send
s_buffer[MSG_INDEX_STATUS] = 0
s_buffer[MSG_INDEX_COUNT_LOW] = (dataCount & 0xff)
s_buffer[MSG_INDEX_COUNT_HIGH] = ((dataCount>>8) & 0xff)
s_buffer[MSG_INDEX_DATA+dataCount] = 0xff - self.device.calcChecksum(s_buffer, MSG_INDEX_DATA+dataCount)
self.device.sock.settimeout(.1)
self.device.sendMessage(s_buffer)
try:
r_buffer = self.device.sock.recv(64)
except socket.timeout:
raise TimeoutError('FieldCalDate_W: timeout error.')
return
if len(r_buffer) == MSG_HEADER_SIZE + MSG_CHECKSUM_SIZE + replyCount:
if r_buffer[MSG_INDEX_START] == s_buffer[0] and \
r_buffer[MSG_INDEX_COMMAND] == s_buffer[MSG_INDEX_COMMAND] | MSG_REPLY and \
r_buffer[MSG_INDEX_FRAME] == s_buffer[2] and \
r_buffer[MSG_INDEX_STATUS] == MSG_SUCCESS and \
r_buffer[MSG_INDEX_COUNT_LOW] == replyCount & 0xff and \
r_buffer[MSG_INDEX_COUNT_HIGH] == (replyCount >> 8) & 0xff and \
r_buffer[MSG_INDEX_DATA+replyCount] + self.device.calcChecksum(r_buffer,(MSG_HEADER_SIZE+replyCount)) == 0xff :
result = True
try:
if (result == False):
raise ResultError
except ResultError:
print('Error in FieldCalDate_W E-TC. Status =', hex(r_buffer[MSG_INDEX_STATUS]))
def ADCal(self):
"""
This command causes the measurement loop to pause and an A/D
system offset calibration to run. The calibration requires
approximately 800ms to complete then the measurement loop
automatically returns to the current mode. The calibration will
run on both A/Ds simultaneously. The command reply will not be
sent until the calibration completes.
"""
dataCount = 0
replyCount = 0
result = False
s_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+dataCount) # send buffer
r_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+replyCount) # reply buffer
s_buffer[MSG_INDEX_COMMAND] = self.CMD_AD_CAL
s_buffer[MSG_INDEX_START] = MSG_START
s_buffer[MSG_INDEX_FRAME] = self.device.frameID
self.device.frameID = (self.device.frameID + 1) % 256 # increment frame ID with every send
s_buffer[MSG_INDEX_STATUS] = 0
s_buffer[MSG_INDEX_COUNT_LOW] = (dataCount & 0xff)
s_buffer[MSG_INDEX_COUNT_HIGH] = ((dataCount>>8) & 0xff)
s_buffer[MSG_INDEX_DATA+dataCount] = 0xff - self.device.calcChecksum(s_buffer, MSG_INDEX_DATA+dataCount)
self.device.sock.settimeout(1.0)
self.device.sendMessage(s_buffer)
try:
r_buffer = self.device.sock.recv(64)
except socket.timeout:
raise TimeoutError('ADCal: timeout error.')
return
if len(r_buffer) == MSG_HEADER_SIZE + MSG_CHECKSUM_SIZE + replyCount:
if r_buffer[MSG_INDEX_START] == s_buffer[0] and \
r_buffer[MSG_INDEX_COMMAND] == s_buffer[MSG_INDEX_COMMAND] | MSG_REPLY and \
r_buffer[MSG_INDEX_FRAME] == s_buffer[2] and \
r_buffer[MSG_INDEX_STATUS] == MSG_SUCCESS and \
r_buffer[MSG_INDEX_COUNT_LOW] == replyCount & 0xff and \
r_buffer[MSG_INDEX_COUNT_HIGH] == (replyCount >> 8) & 0xff and \
r_buffer[MSG_INDEX_DATA+replyCount] + self.device.calcChecksum(r_buffer,(MSG_HEADER_SIZE+replyCount)) == 0xff :
result = True
try:
if (result == False):
raise ResultError
except ResultError:
print('Error in ADCal E-TC. Status =', hex(r_buffer[MSG_INDEX_STATUS]))
def CJCOffset_R(self):
"""
This command reads the CJC user offset values. Each value is
added to the appropriate CJC sensor and factory offset reading
prior to performing te NIST calculation for the temperature for
that channel.
"""
dataCount = 0
replyCount = 32
result = False
s_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+dataCount) # send buffer
r_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+replyCount) # reply buffer
s_buffer[MSG_INDEX_COMMAND] = self.CMD_CJC_OFFSET_R
s_buffer[MSG_INDEX_START] = MSG_START
s_buffer[MSG_INDEX_FRAME] = self.device.frameID
self.device.frameID = (self.device.frameID + 1) % 256 # increment frame ID with every send
s_buffer[MSG_INDEX_STATUS] = 0
s_buffer[MSG_INDEX_COUNT_LOW] = (dataCount & 0xff)
s_buffer[MSG_INDEX_COUNT_HIGH] = ((dataCount>>8) & 0xff)
s_buffer[MSG_INDEX_DATA+dataCount] = 0xff - self.device.calcChecksum(s_buffer, MSG_INDEX_DATA+dataCount)
self.device.sock.settimeout(.1)
self.device.sendMessage(s_buffer)
try:
r_buffer = self.device.sock.recv(128)
except socket.timeout:
raise TimeoutError('CJCOffset_R: timeout error.')
return
if len(r_buffer) == MSG_HEADER_SIZE + MSG_CHECKSUM_SIZE + replyCount:
if r_buffer[MSG_INDEX_START] == s_buffer[0] and \
r_buffer[MSG_INDEX_COMMAND] == s_buffer[MSG_INDEX_COMMAND] | MSG_REPLY and \
r_buffer[MSG_INDEX_FRAME] == s_buffer[2] and \
r_buffer[MSG_INDEX_STATUS] == MSG_SUCCESS and \
r_buffer[MSG_INDEX_COUNT_LOW] == replyCount & 0xff and \
r_buffer[MSG_INDEX_COUNT_HIGH] == (replyCount >> 8) & 0xff and \
r_buffer[MSG_INDEX_DATA+replyCount] + self.device.calcChecksum(r_buffer,(MSG_HEADER_SIZE+replyCount)) == 0xff :
result = True
self.CJC_offset = list(unpack_from('f'*8, r_buffer, MSG_INDEX_DATA))
try:
if (result == False):
raise ResultError
except ResultError:
print('Error in CJCOffset_R E-TC. Status =', hex(r_buffer[MSG_INDEX_STATUS]))
def CJCOffset_W(self):
"""
This command writes the CJC user offset values. Each value is
added to the appropriate CJC sensor and factory offset reading
prior to performing te NIST calculation for the temperature for
that channel.
"""
dataCount = 32
replyCount = 0
result = False
s_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+dataCount) # send buffer
r_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+replyCount) # reply buffer
s_buffer[MSG_INDEX_COMMAND] = self.CMD_CJC_OFFSET_W
for i in range(8):
pack_into('f', s_buffer, MSG_INDEX_DATA+i, self.CJCOffset[i])
s_buffer[MSG_INDEX_START] = MSG_START
s_buffer[MSG_INDEX_FRAME] = self.device.frameID
self.device.frameID = (self.device.frameID + 1) % 256 # increment frame ID with every send
s_buffer[MSG_INDEX_STATUS] = 0
s_buffer[MSG_INDEX_COUNT_LOW] = (dataCount & 0xff)
s_buffer[MSG_INDEX_COUNT_HIGH] = ((dataCount>>8) & 0xff)
s_buffer[MSG_INDEX_DATA+dataCount] = 0xff - self.device.calcChecksum(s_buffer, MSG_INDEX_DATA+dataCount)
self.device.sock.settimeout(.1)
self.device.sendMessage(s_buffer)
try:
r_buffer = self.device.sock.recv(128)
except socket.timeout:
raise TimeoutError('CJCOffset_W: timeout error.')
return
if len(r_buffer) == MSG_HEADER_SIZE + MSG_CHECKSUM_SIZE + replyCount:
if r_buffer[MSG_INDEX_START] == s_buffer[0] and \
r_buffer[MSG_INDEX_COMMAND] == s_buffer[MSG_INDEX_COMMAND] | MSG_REPLY and \
r_buffer[MSG_INDEX_FRAME] == s_buffer[2] and \
r_buffer[MSG_INDEX_STATUS] == MSG_SUCCESS and \
r_buffer[MSG_INDEX_COUNT_LOW] == replyCount & 0xff and \
r_buffer[MSG_INDEX_COUNT_HIGH] == (replyCount >> 8) & 0xff and \
r_buffer[MSG_INDEX_DATA+replyCount] + self.device.calcChecksum(r_buffer,(MSG_HEADER_SIZE+replyCount)) == 0xff :
result = True
self.CJC_offset = list(unpack_from('f'*8, r_buffer, MSG_INDEX_DATA))
try:
if (result == False):
raise ResultError
except ResultError:
print('Error in CJCOffset_W E-TC. Status =', hex(r_buffer[MSG_INDEX_STATUS]))
####################################
# Alarm Commands #
####################################
def AlarmConfig_R(self):
"""
This command reads the temperature alarm configurations. There
are configuration values and two threshold values for each of the
thermocouple channels.
alarm_config: the alarm configuration
bit 0: Alarm enable
0 - alarm disabled, associated bit is controlled by DOut
1 - alarm enabled, associated bit is controlled by status
bit 1: Alarm invert
0 - normal polarity (output is low when in alarm condition)
1 - inverted polarity (output is high when in alarm condition)
bits 2-3: Alarm type
0 - High level: alarm when reading >= threshold 1, reset when reading < threshold 2
1 - Low level: alarm when reading <= threshold 1, reset when reading > threshold 2
2 - Outside window: alarm when reading < threshold 1 or > threshold 2
bit 4: Alarm latch
0 - no latch, alarm output status indicates current state of alarm
1 - latch, alarm output is active if an alarm condition is detected
and remains active until cleared with AlarmStatus command
bits 5-6: Error alarms
00 - Alarm can only be set by valid temperature reading
01 - An open thermocouple or common-mode voltage error will also set the alarm
10 - Only an open thermocouple or common-mode voltage will set the alarm,
termperature is ignored.
11 - invalid.
bit 7: reserved.
threshold1: float[8] the new alarm threshold 1 values in Celsius
threshold2: float[8] the new alarm threshold 2 values in Celsius
"""
dataCount = 0
replyCount = 72
result = False
s_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+dataCount) # send buffer
r_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+replyCount) # reply buffer
s_buffer[MSG_INDEX_COMMAND] = self.CMD_ALARM_CONFIG_R
s_buffer[MSG_INDEX_START] = MSG_START
s_buffer[MSG_INDEX_FRAME] = self.device.frameID
self.device.frameID = (self.device.frameID + 1) % 256 # increment frame ID with every send
s_buffer[MSG_INDEX_STATUS] = 0
s_buffer[MSG_INDEX_COUNT_LOW] = (dataCount & 0xff)
s_buffer[MSG_INDEX_COUNT_HIGH] = ((dataCount>>8) & 0xff)
s_buffer[MSG_INDEX_DATA+dataCount] = 0xff - self.device.calcChecksum(s_buffer, MSG_INDEX_DATA+dataCount)
self.device.sock.settimeout(.1)
self.device.sendMessage(s_buffer)
try:
r_buffer = self.device.sock.recv(592)
except socket.timeout:
raise TimeoutError('AlarmConfig_R: timeout error.')
return
if len(r_buffer) == MSG_HEADER_SIZE + MSG_CHECKSUM_SIZE + replyCount:
if r_buffer[MSG_INDEX_START] == s_buffer[0] and \
r_buffer[MSG_INDEX_COMMAND] == s_buffer[MSG_INDEX_COMMAND] | MSG_REPLY and \
r_buffer[MSG_INDEX_FRAME] == s_buffer[2] and \
r_buffer[MSG_INDEX_STATUS] == MSG_SUCCESS and \
r_buffer[MSG_INDEX_COUNT_LOW] == replyCount & 0xff and \
r_buffer[MSG_INDEX_COUNT_HIGH] == (replyCount >> 8) & 0xff and \
r_buffer[MSG_INDEX_DATA+replyCount] + self.device.calcChecksum(r_buffer,(MSG_HEADER_SIZE+replyCount)) == 0xff :
result = True
self.alarm_config = list(unpack_from('B'*8, r_buffer, MSG_INDEX_DATA))
self.alarm_threshold1 = list(unpack_from('f'*8, r_buffer, MSG_INDEX_DATA+8))
self.alarm_threshold2 = list(unpack_from('f'*8, r_buffer, MSG_INDEX_DATA+40))
try:
if (result == False):
raise ResultError
except ResultError:
print('Error in AlarmConfig_R E-TC. Status =', hex(r_buffer[MSG_INDEX_STATUS]))
def AlarmConfig_W(self):
"""
This command writesthe temperature alarm configurations. There
are configuration values and two threshold values for each of the
thermocouple channels. The configuration is stored in EEPROM and
restored at power on.
alarm_config: the alarm configuration
bit 0: Alarm enable
0 - alarm disabled, associated bit is controlled by DOut
1 - alarm enabled, associated bit is controlled by status
bit 1: Alarm invert
0 - normal polarity (output is low when in alarm condition)
1 - inverted polarity (output is high when in alarm condition)
bits 2-3: Alarm type
0 - High level: alarm when reading >= threshold 1, reset when reading < threshold 2
1 - Low level: alarm when reading <= threshold 1, reset when reading > threshold 2
2 - Outside window: alarm when reading < threshold 1 or > threshold 2
bit 4: Alarm latch
0 - no latch, alarm output status indicates current state of alarm
1 - latch, alarm output is active if an alarm condition is detected
and remains active until cleared with AlarmStatus command
bits 5-6: Error alarms
00 - Alarm can only be set by valid temperature reading
01 - An open thermocouple or common-mode voltage error will also set the alarm
10 - Only an open thermocouple or common-mode voltage will set the alarm,
termperature is ignored.
11 - invalid.
bit 7: reserved.
threshold1: float[8] the new alarm threshold 1 values in Celsius
threshold2: float[8] the new alarm threshold 2 values in Celsius
"""
dataCount = 72
replyCount = 0
result = False
s_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+dataCount) # send buffer
r_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+replyCount) # reply buffer
s_buffer[MSG_INDEX_COMMAND] = self.CMD_ALARM_CONFIG_W
for i in range(8):
pack_into('B', s_buffer, MSG_INDEX_DATA+i, self.alarm_config[i])
for i in range(8):
pack_into('f', s_buffer, MSG_INDEX_DATA+8+i, self.alarm_threshold1[i])
for i in range(8):
pack_into('f', s_buffer, MSG_INDEX_DATA+40+i, self.alarm_threshold2[i])
s_buffer[MSG_INDEX_START] = MSG_START
s_buffer[MSG_INDEX_FRAME] = self.device.frameID
self.device.frameID = (self.device.frameID + 1) % 256 # increment frame ID with every send
s_buffer[MSG_INDEX_STATUS] = 0
s_buffer[MSG_INDEX_COUNT_LOW] = (dataCount & 0xff)
s_buffer[MSG_INDEX_COUNT_HIGH] = ((dataCount>>8) & 0xff)
s_buffer[MSG_INDEX_DATA+dataCount] = 0xff - self.device.calcChecksum(s_buffer, MSG_INDEX_DATA+dataCount)
self.device.sock.settimeout(.1)
self.device.sendMessage(s_buffer)
try:
r_buffer = self.device.sock.recv(592)
except socket.timeout:
raise TimeoutError('AlarmConfig_W: timeout error.')
return
if len(r_buffer) == MSG_HEADER_SIZE + MSG_CHECKSUM_SIZE + replyCount:
if r_buffer[MSG_INDEX_START] == s_buffer[0] and \
r_buffer[MSG_INDEX_COMMAND] == s_buffer[MSG_INDEX_COMMAND] | MSG_REPLY and \
r_buffer[MSG_INDEX_FRAME] == s_buffer[2] and \
r_buffer[MSG_INDEX_STATUS] == MSG_SUCCESS and \
r_buffer[MSG_INDEX_COUNT_LOW] == replyCount & 0xff and \
r_buffer[MSG_INDEX_COUNT_HIGH] == (replyCount >> 8) & 0xff and \
r_buffer[MSG_INDEX_DATA+replyCount] + self.device.calcChecksum(r_buffer,(MSG_HEADER_SIZE+replyCount)) == 0xff :
result = True
try:
if (result == False):
raise ResultError
except ResultError:
print('Error in AlarmConfig_W E-TC. Status =', hex(r_buffer[MSG_INDEX_STATUS]))
def AlarmStatus_R(self):
"""
This command reads the status of the temperature
alarms. If a bit is set an alarm condition exists or is latched
on the corresponding channel. If the alarm is configured for
latching then the status will not clear when the alarm condition
is no longer present. It must be cleared by writing a 1 to the
corresponding bit using the AlarmStatusW command.
"""
dataCount = 0
replyCount = 1
result = False
s_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+dataCount) # send buffer
r_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+replyCount) # reply buffer
s_buffer[MSG_INDEX_COMMAND] = self.CMD_ALARM_STATUS_R
s_buffer[MSG_INDEX_START] = MSG_START
s_buffer[MSG_INDEX_FRAME] = self.device.frameID
self.device.frameID = (self.device.frameID + 1) % 256 # increment frame ID with every send
s_buffer[MSG_INDEX_STATUS] = 0
s_buffer[MSG_INDEX_COUNT_LOW] = (dataCount & 0xff)
s_buffer[MSG_INDEX_COUNT_HIGH] = ((dataCount>>8) & 0xff)
s_buffer[MSG_INDEX_DATA+dataCount] = 0xff - self.device.calcChecksum(s_buffer, MSG_INDEX_DATA+dataCount)
self.device.sock.settimeout(.1)
self.device.sendMessage(s_buffer)
try:
r_buffer = self.device.sock.recv(64)
except socket.timeout:
raise TimeoutError('AlarmStatus_R: timeout error.')
return
if len(r_buffer) == MSG_HEADER_SIZE + MSG_CHECKSUM_SIZE + replyCount:
if r_buffer[MSG_INDEX_START] == s_buffer[0] and \
r_buffer[MSG_INDEX_COMMAND] == s_buffer[MSG_INDEX_COMMAND] | MSG_REPLY and \
r_buffer[MSG_INDEX_FRAME] == s_buffer[2] and \
r_buffer[MSG_INDEX_STATUS] == MSG_SUCCESS and \
r_buffer[MSG_INDEX_COUNT_LOW] == replyCount & 0xff and \
r_buffer[MSG_INDEX_COUNT_HIGH] == (replyCount >> 8) & 0xff and \
r_buffer[MSG_INDEX_DATA+replyCount] + self.device.calcChecksum(r_buffer,(MSG_HEADER_SIZE+replyCount)) == 0xff :
result = True
self.alarm_status = r_buffer[MSG_INDEX_DATA]
try:
if (result == False):
raise ResultError
except ResultError:
print('Error in AlarmStatus_R E-TC. Status =', hex(r_buffer[MSG_INDEX_STATUS]))
return self.alarm_status
def AlarmStatus_W(self):
"""
This command clears the alarm status. Writing a 1 to a bit will
dlear the status for the corresponding channel.
"""
dataCount = 1
replyCount = 0
result = False
s_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+dataCount) # send buffer
r_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+replyCount) # reply buffer
s_buffer[MSG_INDEX_COMMAND] = self.CMD_ALARM_STATUS_W
s_buffer[MSG_INDEX_DATA] = self.alarm_status
s_buffer[MSG_INDEX_START] = MSG_START
s_buffer[MSG_INDEX_FRAME] = self.device.frameID
self.device.frameID = (self.device.frameID + 1) % 256 # increment frame ID with every send
s_buffer[MSG_INDEX_STATUS] = 0
s_buffer[MSG_INDEX_COUNT_LOW] = (dataCount & 0xff)
s_buffer[MSG_INDEX_COUNT_HIGH] = ((dataCount>>8) & 0xff)
s_buffer[MSG_INDEX_DATA+dataCount] = 0xff - self.device.calcChecksum(s_buffer, MSG_INDEX_DATA+dataCount)
self.device.sock.settimeout(.1)
self.device.sendMessage(s_buffer)
try:
r_buffer = self.device.sock.recv(64)
except socket.timeout:
raise TimeoutError('AlarmStatus_W: timeout error.')
return
if len(r_buffer) == MSG_HEADER_SIZE + MSG_CHECKSUM_SIZE + replyCount:
if r_buffer[MSG_INDEX_START] == s_buffer[0] and \
r_buffer[MSG_INDEX_COMMAND] == s_buffer[MSG_INDEX_COMMAND] | MSG_REPLY and \
r_buffer[MSG_INDEX_FRAME] == s_buffer[2] and \
r_buffer[MSG_INDEX_STATUS] == MSG_SUCCESS and \
r_buffer[MSG_INDEX_COUNT_LOW] == replyCount & 0xff and \
r_buffer[MSG_INDEX_COUNT_HIGH] == (replyCount >> 8) & 0xff and \
r_buffer[MSG_INDEX_DATA+replyCount] + self.device.calcChecksum(r_buffer,(MSG_HEADER_SIZE+replyCount)) == 0xff :
result = True
try:
if (result == False):
raise ResultError
except ResultError:
print('Error in AlarmStatus_W E-TC. Status =', hex(r_buffer[MSG_INDEX_STATUS]))
#################################
# Counter Commands #
#################################
def Counter(self):
"""
This command reads the event counter
"""
dataCount = 0
replyCount = 4
result = False
s_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+dataCount) # send buffer
r_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+replyCount) # reply buffer
s_buffer[MSG_INDEX_COMMAND] = self.CMD_COUNTER_R
s_buffer[MSG_INDEX_START] = MSG_START
s_buffer[MSG_INDEX_FRAME] = self.device.frameID
self.device.frameID = (self.device.frameID + 1) % 256 # increment frame ID with every send
s_buffer[MSG_INDEX_STATUS] = 0
s_buffer[MSG_INDEX_COUNT_LOW] = (dataCount & 0xff)
s_buffer[MSG_INDEX_COUNT_HIGH] = ((dataCount>>8) & 0xff)
s_buffer[MSG_INDEX_DATA+dataCount] = 0xff - self.device.calcChecksum(s_buffer, MSG_INDEX_DATA+dataCount)
self.device.sock.settimeout(.1)
self.device.sendMessage(s_buffer)
try:
r_buffer = self.device.sock.recv(64)
except socket.timeout:
raise TimeoutError('Counter: timeout error.')
return
if len(r_buffer) == MSG_HEADER_SIZE + MSG_CHECKSUM_SIZE + replyCount:
if r_buffer[MSG_INDEX_START] == s_buffer[0] and \
r_buffer[MSG_INDEX_COMMAND] == s_buffer[MSG_INDEX_COMMAND] | MSG_REPLY and \
r_buffer[MSG_INDEX_FRAME] == s_buffer[2] and \
r_buffer[MSG_INDEX_STATUS] == MSG_SUCCESS and \
r_buffer[MSG_INDEX_COUNT_LOW] == replyCount & 0xff and \
r_buffer[MSG_INDEX_COUNT_HIGH] == (replyCount >> 8) & 0xff and \
r_buffer[MSG_INDEX_DATA+replyCount] + self.device.calcChecksum(r_buffer,(MSG_HEADER_SIZE+replyCount)) == 0xff :
result = True
value ,= unpack_from('I', r_buffer, MSG_INDEX_DATA)
try:
if (result == False):
raise ResultError
except ResultError:
print('Error in counter E-TC. Status =', hex(r_buffer[MSG_INDEX_STATUS]))
return-1
return value
def ResetCounter(self):
"""
This command resets the event counter. On a write, the
counter will be reset to 0.
"""
dataCount = 0
replyCount = 0
result = False
s_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+dataCount) # send buffer
r_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+replyCount) # reply buffer
s_buffer[MSG_INDEX_COMMAND] = self.CMD_COUNTER_W
s_buffer[MSG_INDEX_START] = MSG_START
s_buffer[MSG_INDEX_FRAME] = self.device.frameID
self.device.frameID = (self.device.frameID + 1) % 256 # increment frame ID with every send
s_buffer[MSG_INDEX_STATUS] = 0
s_buffer[MSG_INDEX_COUNT_LOW] = (dataCount & 0xff)
s_buffer[MSG_INDEX_COUNT_HIGH] = ((dataCount>>8) & 0xff)
s_buffer[MSG_INDEX_DATA+dataCount] = 0xff - self.device.calcChecksum(s_buffer, MSG_INDEX_DATA+dataCount)
self.device.sock.settimeout(.1)
self.device.sendMessage(s_buffer)
try:
r_buffer = self.device.sock.recv(64)
except socket.timeout:
raise TimeoutError('ResetCounter: timeout error.')
return
if len(r_buffer) == MSG_HEADER_SIZE + MSG_CHECKSUM_SIZE + replyCount:
if r_buffer[MSG_INDEX_START] == s_buffer[0] and \
r_buffer[MSG_INDEX_COMMAND] == s_buffer[MSG_INDEX_COMMAND] | MSG_REPLY and \
r_buffer[MSG_INDEX_FRAME] == s_buffer[2] and \
r_buffer[MSG_INDEX_STATUS] == MSG_SUCCESS and \
r_buffer[MSG_INDEX_COUNT_LOW] == replyCount & 0xff and \
r_buffer[MSG_INDEX_COUNT_HIGH] == (replyCount >> 8) & 0xff and \
r_buffer[MSG_INDEX_DATA+replyCount] + self.device.calcChecksum(r_buffer,(MSG_HEADER_SIZE+replyCount)) == 0xff :
result = True
try:
if (result == False):
raise ResultError
except ResultError:
print('Error in restCounter E-TC. Status =', hex(r_buffer[MSG_INDEX_STATUS]))
#################################
# Miscellaneous Commands #
#################################
def Blink(self, count=1):
"""
This command will blink the device power LED "count" times
"""
dataCount = 1
replyCount = 0
result = False
s_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+dataCount) # send buffer
r_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+replyCount) # reply buffer
s_buffer[MSG_INDEX_COMMAND] = self.CMD_BLINK_LED
s_buffer[MSG_INDEX_DATA] = count
s_buffer[MSG_INDEX_START] = MSG_START
s_buffer[MSG_INDEX_FRAME] = self.device.frameID
self.device.frameID = (self.device.frameID + 1) % 256 # increment frame ID with every send
s_buffer[MSG_INDEX_STATUS] = 0
s_buffer[MSG_INDEX_COUNT_LOW] = (dataCount & 0xff)
s_buffer[MSG_INDEX_COUNT_HIGH] = ((dataCount>>8) & 0xff)
s_buffer[MSG_INDEX_DATA+dataCount] = 0xff - self.device.calcChecksum(s_buffer, MSG_INDEX_DATA+dataCount)
self.device.sock.settimeout(.1)
self.device.sendMessage(s_buffer)
try:
r_buffer = self.device.sock.recv(16)
except socket.timeout:
raise TimeoutError('Blink: timout error.')
return
if len(r_buffer) == MSG_HEADER_SIZE + MSG_CHECKSUM_SIZE + replyCount:
if r_buffer[MSG_INDEX_START] == s_buffer[0] and \
r_buffer[MSG_INDEX_COMMAND] == s_buffer[MSG_INDEX_COMMAND] | MSG_REPLY and \
r_buffer[MSG_INDEX_FRAME] == s_buffer[2] and \
r_buffer[MSG_INDEX_STATUS] == MSG_SUCCESS and \
r_buffer[MSG_INDEX_COUNT_LOW] == replyCount & 0xff and \
r_buffer[MSG_INDEX_COUNT_HIGH] == (replyCount >> 8) & 0xff and \
r_buffer[MSG_INDEX_DATA+replyCount] + self.device.calcChecksum(r_buffer,(MSG_HEADER_SIZE+replyCount)) == 0xff :
result = True
try:
if (result == False):
raise ResultError
except ResultError:
print('Error in blink E-TC. Status =', hex(r_buffer[MSG_INDEX_STATUS]))
def Reset(self):
"""
This command resets the device
"""
dataCount = 0
replyCount = 0
result = False
s_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+dataCount) # send buffer
r_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+replyCount) # reply buffer
s_buffer[MSG_INDEX_COMMAND] = self.CMD_RESET
s_buffer[MSG_INDEX_START] = MSG_START
s_buffer[MSG_INDEX_FRAME] = self.device.frameID
self.device.frameID = (self.device.frameID + 1) % 256 # increment frame ID with every send
s_buffer[MSG_INDEX_STATUS] = 0
s_buffer[MSG_INDEX_COUNT_LOW] = (dataCount & 0xff)
s_buffer[MSG_INDEX_COUNT_HIGH] = ((dataCount>>8) & 0xff)
s_buffer[MSG_INDEX_DATA+dataCount] = 0xff - self.device.calcChecksum(s_buffer, MSG_INDEX_DATA+dataCount)
self.device.sock.settimeout(.1)
self.device.sendMessage(s_buffer)
try:
r_buffer = self.device.sock.recv(16)
except socket.timeout:
raise TimeoutError('Reset: timout error.')
return
if len(r_buffer) == MSG_HEADER_SIZE + MSG_CHECKSUM_SIZE + replyCount:
if r_buffer[MSG_INDEX_START] == s_buffer[0] and \
r_buffer[MSG_INDEX_COMMAND] == s_buffer[MSG_INDEX_COMMAND] | MSG_REPLY and \
r_buffer[MSG_INDEX_FRAME] == s_buffer[2] and \
r_buffer[MSG_INDEX_STATUS] == MSG_SUCCESS and \
r_buffer[MSG_INDEX_COUNT_LOW] == replyCount & 0xff and \
r_buffer[MSG_INDEX_COUNT_HIGH] == (replyCount >> 8) & 0xff and \
r_buffer[MSG_INDEX_DATA+replyCount] + self.device.calcChecksum(r_buffer,(MSG_HEADER_SIZE+replyCount)) == 0xff :
result = True
try:
if (result == False):
raise ResultError
except ResultError:
print('Error in reset E-TC. Status =', hex(r_buffer[MSG_INDEX_STATUS]))
def Status(self):
"""
This command reads the device status
bits 0-15: Reserved
"""
dataCount = 0
replyCount = 2
result = False
s_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+dataCount) # send buffer
r_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+replyCount) # reply buffer
s_buffer[MSG_INDEX_COMMAND] = self.CMD_STATUS
s_buffer[MSG_INDEX_START] = MSG_START
s_buffer[MSG_INDEX_FRAME] = self.device.frameID
self.device.frameID = (self.device.frameID + 1) % 256 # increment frame ID with every send
s_buffer[MSG_INDEX_STATUS] = 0
s_buffer[MSG_INDEX_COUNT_LOW] = (dataCount & 0xff)
s_buffer[MSG_INDEX_COUNT_HIGH] = ((dataCount>>8) & 0xff)
s_buffer[MSG_INDEX_DATA+dataCount] = 0xff - self.device.calcChecksum(s_buffer, MSG_INDEX_DATA+dataCount)
self.device.sock.settimeout(.1)
self.device.sendMessage(s_buffer)
try:
r_buffer = self.device.sock.recv(16)
except socket.timeout:
raise TimeoutError('Status: timout error.')
return
if len(r_buffer) == MSG_HEADER_SIZE + MSG_CHECKSUM_SIZE + replyCount:
if r_buffer[MSG_INDEX_START] == s_buffer[0] and \
r_buffer[MSG_INDEX_COMMAND] == s_buffer[MSG_INDEX_COMMAND] | MSG_REPLY and \
r_buffer[MSG_INDEX_FRAME] == s_buffer[2] and \
r_buffer[MSG_INDEX_STATUS] == MSG_SUCCESS and \
r_buffer[MSG_INDEX_COUNT_LOW] == replyCount & 0xff and \
r_buffer[MSG_INDEX_COUNT_HIGH] == (replyCount >> 8) & 0xff and \
r_buffer[MSG_INDEX_DATA+replyCount] + self.device.calcChecksum(r_buffer,(MSG_HEADER_SIZE+replyCount)) == 0xff :
result = True
status = r_buffer[MSG_INDEX_DATA] | (r_buffer[MSG_INDEX_DATA+1]<<8 & 0xff)
try:
if (result == False):
raise ResultError
except ResultError:
print('Error in status E-TC. Status =', hex(r_buffer[MSG_INDEX_STATUS]))
return status
def NetworkConfig(self):
"""
This command reads the current network configuration. Returns tuple
(ip_address, subnet_mask, gateway_address)
"""
dataCount = 0
replyCount = 12
result = False
s_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+dataCount) # send buffer
r_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+replyCount) # reply buffer
s_buffer[MSG_INDEX_COMMAND] = self.CMD_NETWORK_CONFIG
s_buffer[MSG_INDEX_START] = MSG_START
s_buffer[MSG_INDEX_FRAME] = self.device.frameID
self.device.frameID = (self.device.frameID + 1) % 256 # increment frame ID with every send
s_buffer[MSG_INDEX_STATUS] = 0
s_buffer[MSG_INDEX_COUNT_LOW] = (dataCount & 0xff)
s_buffer[MSG_INDEX_COUNT_HIGH] = ((dataCount>>8) & 0xff)
s_buffer[MSG_INDEX_DATA+dataCount] = 0xff - self.device.calcChecksum(s_buffer, MSG_INDEX_DATA+dataCount)
self.device.sock.settimeout(.1)
self.device.sendMessage(s_buffer)
try:
r_buffer = self.device.sock.recv(64)
except socket.timeout:
raise TimeoutError('NetworkConfig: timout error.')
return
if len(r_buffer) == MSG_HEADER_SIZE + MSG_CHECKSUM_SIZE + replyCount:
if r_buffer[MSG_INDEX_START] == s_buffer[0] and \
r_buffer[MSG_INDEX_COMMAND] == s_buffer[MSG_INDEX_COMMAND] | MSG_REPLY and \
r_buffer[MSG_INDEX_FRAME] == s_buffer[2] and \
r_buffer[MSG_INDEX_STATUS] == MSG_SUCCESS and \
r_buffer[MSG_INDEX_COUNT_LOW] == replyCount & 0xff and \
r_buffer[MSG_INDEX_COUNT_HIGH] == (replyCount >> 8) & 0xff and \
r_buffer[MSG_INDEX_DATA+replyCount] + self.device.calcChecksum(r_buffer,(MSG_HEADER_SIZE+replyCount)) == 0xff :
result = True
data = unpack_from('III', r_buffer, MSG_INDEX_DATA)
value = (socket.inet_ntoa(pack('L', data[0])), socket.inet_ntoa(pack('L', data[1])), socket.inet_ntoa(pack('L', data[2])))
try:
if (result == False):
raise ResultError
except ResultError:
print('Error in networkConfig E-TC. Status =', hex(r_buffer[MSG_INDEX_STATUS]))
return value
#################################
# Memory Commands #
#################################
def ConfigMemory_R(self, address, count):
"""
This command reads the nonvolatile configuration memory. The configuration memory is
"""
if (count > 16 or address > 0xf):
return False
dataCount = 4
replyCount = count
result = False
s_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+dataCount) # send buffer
r_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+replyCount) # reply buffer
s_buffer[MSG_INDEX_COMMAND] = self.CMD_CONF_MEMORY_R
s_buffer[MSG_INDEX_DATA] = address & 0xff
s_buffer[MSG_INDEX_DATA+1] = (address>>8) & 0xff
s_buffer[MSG_INDEX_DATA+2] = count & 0xff
s_buffer[MSG_INDEX_DATA+3] = (count>>8) & 0xff
s_buffer[MSG_INDEX_START] = MSG_START
s_buffer[MSG_INDEX_FRAME] = self.device.frameID
self.device.frameID = (self.device.frameID + 1) % 256 # increment frame ID with every send
s_buffer[MSG_INDEX_STATUS] = 0
s_buffer[MSG_INDEX_COUNT_LOW] = (dataCount & 0xff)
s_buffer[MSG_INDEX_COUNT_HIGH] = ((dataCount>>8) & 0xff)
s_buffer[MSG_INDEX_DATA+dataCount] = 0xff - self.device.calcChecksum(s_buffer, MSG_INDEX_DATA+dataCount)
self.device.sock.settimeout(.1)
self.device.sendMessage(s_buffer)
try:
r_buffer = self.device.sock.recv(1024)
except socket.timeout:
raise TimeoutError('ConfigMemory_R: timeout error.')
return
if len(r_buffer) == MSG_HEADER_SIZE + MSG_CHECKSUM_SIZE + replyCount:
if r_buffer[MSG_INDEX_START] == s_buffer[0] and \
r_buffer[MSG_INDEX_COMMAND] == s_buffer[MSG_INDEX_COMMAND] | MSG_REPLY and \
r_buffer[MSG_INDEX_FRAME] == s_buffer[2] and \
r_buffer[MSG_INDEX_STATUS] == MSG_SUCCESS and \
r_buffer[MSG_INDEX_COUNT_LOW] == replyCount & 0xff and \
r_buffer[MSG_INDEX_COUNT_HIGH] == (replyCount >> 8) & 0xff and \
r_buffer[MSG_INDEX_DATA+replyCount] + self.device.calcChecksum(r_buffer,(MSG_HEADER_SIZE+replyCount)) == 0xff :
result = True
value = r_buffer[MSG_INDEX_DATA:MSG_INDEX_DATA+replyCount]
try:
if (result == False):
raise ResultError
except ResultError:
print('Error in ConfigMemory_R E-TC. Status =', hex(r_buffer[MSG_INDEX_STATUS]))
return value
def ConfigMemory_W(self, address, count, data):
"""
This command writes the nonvolatile configuration memory. The
config memory is 16 bytes (address 0 - 0xf) The config memory
should only be written during factory setup.
address: the start address for writing (0-0xf)
data: the data to be written (frame count -2)
"""
if (count > 16 or address > 0xf):
return False
dataCount = count + 2
replyCount = 0
result = False
s_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+dataCount) # send buffer
r_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+replyCount) # reply buffer
s_buffer[MSG_INDEX_COMMAND] = self.CMD_CONF_MEMORY_W
s_buffer[MSG_INDEX_DATA] = address & 0xff
s_buffer[MSG_INDEX_DATA+1] = (address>>8) & 0xff
for i in range(count):
s_buffer[MSG_INDEX_DATA+2+i] = data[i]
s_buffer[MSG_INDEX_START] = MSG_START
s_buffer[MSG_INDEX_FRAME] = self.device.frameID
self.device.frameID = (self.device.frameID + 1) % 256 # increment frame ID with every send
s_buffer[MSG_INDEX_STATUS] = 0
s_buffer[MSG_INDEX_COUNT_LOW] = (dataCount & 0xff)
s_buffer[MSG_INDEX_COUNT_HIGH] = ((dataCount>>8) & 0xff)
s_buffer[MSG_INDEX_DATA+dataCount] = 0xff - self.device.calcChecksum(s_buffer, MSG_INDEX_DATA+dataCount)
self.device.sock.settimeout(.1)
self.device.sendMessage(s_buffer)
try:
r_buffer = self.device.sock.recv(1024)
except socket.timeout:
raise TimeoutError('ConfigMemory_W: timeout error.')
return
if len(r_buffer) == MSG_HEADER_SIZE + MSG_CHECKSUM_SIZE + replyCount:
if r_buffer[MSG_INDEX_START] == s_buffer[0] and \
r_buffer[MSG_INDEX_COMMAND] == s_buffer[MSG_INDEX_COMMAND] | MSG_REPLY and \
r_buffer[MSG_INDEX_FRAME] == s_buffer[2] and \
r_buffer[MSG_INDEX_STATUS] == MSG_SUCCESS and \
r_buffer[MSG_INDEX_COUNT_LOW] == replyCount & 0xff and \
r_buffer[MSG_INDEX_COUNT_HIGH] == (replyCount >> 8) & 0xff and \
r_buffer[MSG_INDEX_DATA+replyCount] + self.device.calcChecksum(r_buffer,(MSG_HEADER_SIZE+replyCount)) == 0xff :
result = True
try:
if (result == False):
raise ResultError
except ResultError:
print('Error in configMemory_W E-TC. Status =', hex(r_buffer[MSG_INDEX_STATUS]))
def UserMemory_R(self, address, count):
"""
This command reads the nonvolatile user memory. The user memory is
3583 bytes (address 0 - 0xdff)
address: the start address for reading (0-0xdff)
count: the number of bytes to read (max 1024 due to protocol)
"""
if (count > 1024 or address > 0xdff):
return False
dataCount = 4
replyCount = count
result = False
s_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+dataCount) # send buffer
r_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+replyCount) # reply buffer
s_buffer[MSG_INDEX_COMMAND] = self.CMD_USER_MEMORY_R
s_buffer[MSG_INDEX_DATA] = address & 0xff
s_buffer[MSG_INDEX_DATA+1] = (address>>8) & 0xff
s_buffer[MSG_INDEX_DATA+2] = count & 0xff
s_buffer[MSG_INDEX_DATA+3] = (count>>8) & 0xff
s_buffer[MSG_INDEX_START] = MSG_START
s_buffer[MSG_INDEX_FRAME] = self.device.frameID
self.device.frameID = (self.device.frameID + 1) % 256 # increment frame ID with every send
s_buffer[MSG_INDEX_STATUS] = 0
s_buffer[MSG_INDEX_COUNT_LOW] = (dataCount & 0xff)
s_buffer[MSG_INDEX_COUNT_HIGH] = ((dataCount>>8) & 0xff)
s_buffer[MSG_INDEX_DATA+dataCount] = 0xff - self.device.calcChecksum(s_buffer, MSG_INDEX_DATA+dataCount)
self.device.sock.settimeout(.1)
self.device.sendMessage(s_buffer)
try:
r_buffer = self.device.sock.recv(1050)
except socket.timeout:
raise TimeoutError('UserMemory_R: timeout error.')
return
if len(r_buffer) == MSG_HEADER_SIZE + MSG_CHECKSUM_SIZE + replyCount:
if r_buffer[MSG_INDEX_START] == s_buffer[0] and \
r_buffer[MSG_INDEX_COMMAND] == s_buffer[MSG_INDEX_COMMAND] | MSG_REPLY and \
r_buffer[MSG_INDEX_FRAME] == s_buffer[2] and \
r_buffer[MSG_INDEX_STATUS] == MSG_SUCCESS and \
r_buffer[MSG_INDEX_COUNT_LOW] == replyCount & 0xff and \
r_buffer[MSG_INDEX_COUNT_HIGH] == (replyCount >> 8) & 0xff and \
r_buffer[MSG_INDEX_DATA+replyCount] + self.device.calcChecksum(r_buffer,(MSG_HEADER_SIZE+replyCount)) == 0xff :
result = True
value = int.from_bytes(r_buffer[MSG_INDEX_DATA:MSG_INDEX_DATA+replyCount], byteorder='little')
try:
if (result == False):
raise ResultError
except ResultError:
print('Error in UserMemory_R E-TC. Status =', hex(r_buffer[MSG_INDEX_STATUS]))
return value
def UserMemory_W(self, address, count, data):
"""
This command writes the nonvolatile user memory. The user memory
is 3583 bytes (address 0 - 0xdff). The amount of data to be
written is inferred from the frame count - 2. The maximum that
can be written in one transfer is 1024 bytes.
"""
if (count > 512 or address > 0xdff):
return False
dataCount = count + 2
replyCount = 0
result = False
s_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+dataCount) # send buffer
r_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+replyCount) # reply buffer
s_buffer[MSG_INDEX_COMMAND] = self.CMD_USER_MEMORY_W
s_buffer[MSG_INDEX_DATA] = address & 0xff
s_buffer[MSG_INDEX_DATA+1] = (address>>8) & 0xff
for i in range(count):
s_buffer[MSG_INDEX_DATA+2+i] = data[i]
s_buffer[MSG_INDEX_START] = MSG_START
s_buffer[MSG_INDEX_FRAME] = self.device.frameID
self.device.frameID = (self.device.frameID + 1) % 256 # increment frame ID with every send
s_buffer[MSG_INDEX_STATUS] = 0
s_buffer[MSG_INDEX_COUNT_LOW] = (dataCount & 0xff)
s_buffer[MSG_INDEX_COUNT_HIGH] = ((dataCount>>8) & 0xff)
s_buffer[MSG_INDEX_DATA+dataCount] = 0xff - self.device.calcChecksum(s_buffer, MSG_INDEX_DATA+dataCount)
self.device.sock.settimeout(.1)
self.device.sendMessage(s_buffer)
try:
r_buffer = self.device.sock.recv(1024)
except socket.timeout:
raise TimeoutError('UserMemory_W: timeout error.')
return
if len(r_buffer) == MSG_HEADER_SIZE + MSG_CHECKSUM_SIZE + replyCount:
if r_buffer[MSG_INDEX_START] == s_buffer[0] and \
r_buffer[MSG_INDEX_COMMAND] == s_buffer[MSG_INDEX_COMMAND] | MSG_REPLY and \
r_buffer[MSG_INDEX_FRAME] == s_buffer[2] and \
r_buffer[MSG_INDEX_STATUS] == MSG_SUCCESS and \
r_buffer[MSG_INDEX_COUNT_LOW] == replyCount & 0xff and \
r_buffer[MSG_INDEX_COUNT_HIGH] == (replyCount >> 8) & 0xff and \
r_buffer[MSG_INDEX_DATA+replyCount] + self.device.calcChecksum(r_buffer,(MSG_HEADER_SIZE+replyCount)) == 0xff :
result = True
try:
if (result == False):
raise ResultError
except ResultError:
print('Error in UserMemory_W E-TC. Status =', hex(r_buffer[MSG_INDEX_STATUS]))
def SettingsMemory_R(self, address, count):
"""
This command reads the nonvolatile settings memory. The settings memory is
32 bytes (address 0 - 0x1f)
address: the start address for reading (0-0x1f)
count: the number of bytes to read (max 32 due to protocol)
"""
if (count > 32 or address > 0x1f):
return False
dataCount = 4
replyCount = count
result = False
s_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+dataCount) # send buffer
r_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+replyCount) # reply buffer
s_buffer[MSG_INDEX_COMMAND] = self.CDM_SETTINGS_MEMORY_R
s_buffer[MSG_INDEX_DATA] = address & 0xff
s_buffer[MSG_INDEX_DATA+1] = (address>>8) & 0xff
s_buffer[MSG_INDEX_DATA+2] = count & 0xff
s_buffer[MSG_INDEX_DATA+3] = (count>>8) & 0xff
s_buffer[MSG_INDEX_START] = MSG_START
s_buffer[MSG_INDEX_FRAME] = self.device.frameID
self.device.frameID = (self.device.frameID + 1) % 256 # increment frame ID with every send
s_buffer[MSG_INDEX_STATUS] = 0
s_buffer[MSG_INDEX_COUNT_LOW] = (dataCount & 0xff)
s_buffer[MSG_INDEX_COUNT_HIGH] = ((dataCount>>8) & 0xff)
s_buffer[MSG_INDEX_DATA+dataCount] = 0xff - self.device.calcChecksum(s_buffer, MSG_INDEX_DATA+dataCount)
self.device.sock.settimeout(.1)
self.device.sendMessage(s_buffer)
try:
r_buffer = self.device.sock.recv(1024)
except socket.timeout:
raise TimeoutError('SettingsMemory_R: timeout error.')
return
if len(r_buffer) == MSG_HEADER_SIZE + MSG_CHECKSUM_SIZE + replyCount:
if r_buffer[MSG_INDEX_START] == s_buffer[0] and \
r_buffer[MSG_INDEX_COMMAND] == s_buffer[MSG_INDEX_COMMAND] | MSG_REPLY and \
r_buffer[MSG_INDEX_FRAME] == s_buffer[2] and \
r_buffer[MSG_INDEX_STATUS] == MSG_SUCCESS and \
r_buffer[MSG_INDEX_COUNT_LOW] == replyCount & 0xff and \
r_buffer[MSG_INDEX_COUNT_HIGH] == (replyCount >> 8) & 0xff and \
r_buffer[MSG_INDEX_DATA+replyCount] + self.device.calcChecksum(r_buffer,(MSG_HEADER_SIZE+replyCount)) == 0xff :
result = True
value = int.from_bytes(r_buffer[MSG_INDEX_DATA:MSG_INDEX_DATA+replyCount], byteorder='little')
try:
if (result == False):
raise ResultError
except ResultError:
print('Error in SettingsMemory_R E-TC. Status =', hex(r_buffer[MSG_INDEX_STATUS]))
return -1
return value
def SettingsMemory_W(self, address, count, data):
"""
This command writes to the nonvolatile settings memory. The settings memory
is 32 bytes (address 0 - 0x1f). The amount of data to be
written is inferred from the frame count - 2. The maximum that
can be written in one transfer is 32 bytes. The settings will
be implemented after a device reset.
"""
if (count > 256 or address > 0x1f):
return False
dataCount = count + 2
replyCount = 0
result = False
s_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+dataCount) # send buffer
r_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+replyCount) # reply buffer
s_buffer[MSG_INDEX_COMMAND] = self.CMD_SETTINGS_MEMORY_W
s_buffer[MSG_INDEX_DATA] = address & 0xff
s_buffer[MSG_INDEX_DATA+1] = (address>>8) & 0xff
for i in range(count):
s_buffer[MSG_INDEX_DATA+2+i] = data[i]
s_buffer[MSG_INDEX_START] = MSG_START
s_buffer[MSG_INDEX_FRAME] = self.device.frameID
self.device.frameID = (self.device.frameID + 1) % 256 # increment frame ID with every send
s_buffer[MSG_INDEX_STATUS] = 0
s_buffer[MSG_INDEX_COUNT_LOW] = (dataCount & 0xff)
s_buffer[MSG_INDEX_COUNT_HIGH] = ((dataCount>>8) & 0xff)
s_buffer[MSG_INDEX_DATA+dataCount] = 0xff - self.device.calcChecksum(s_buffer, MSG_INDEX_DATA+dataCount)
self.device.sock.settimeout(.1)
self.device.sendMessage(s_buffer)
try:
r_buffer = self.device.sock.recv(1024)
except socket.timeout:
raise TimeoutError('SettingsMemory_W: timeout error.')
return
if len(r_buffer) == MSG_HEADER_SIZE + MSG_CHECKSUM_SIZE + replyCount:
if r_buffer[MSG_INDEX_START] == s_buffer[0] and \
r_buffer[MSG_INDEX_COMMAND] == s_buffer[MSG_INDEX_COMMAND] | MSG_REPLY and \
r_buffer[MSG_INDEX_FRAME] == s_buffer[2] and \
r_buffer[MSG_INDEX_STATUS] == MSG_SUCCESS and \
r_buffer[MSG_INDEX_COUNT_LOW] == replyCount & 0xff and \
r_buffer[MSG_INDEX_COUNT_HIGH] == (replyCount >> 8) & 0xff and \
r_buffer[MSG_INDEX_DATA+replyCount] + self.device.calcChecksum(r_buffer,(MSG_HEADER_SIZE+replyCount)) == 0xff :
result = True
try:
if (result == False):
raise ResultError
except ResultError:
print('Error in SettingsMemory_W E-TC. Status =', hex(r_buffer[MSG_INDEX_STATUS]))
def BootloaderMemory_R(self, address, count):
"""
This command reads the bootloader stored in nonvolatile FLASH
memory. The bootloader is located in program FLASH memory in two
physical address ranges: 0x1D000000 - 0x1D007FFF for bootloader
code and 0x1FC00000 - 0x1FC01FFF for C startup code and
interrupts. Reads may be performed at any time.
address: the start address for reading (see above)
count: the number of bytes to read (max 1024)
"""
if (count > 1024):
return False
if (not((address >= 0x1d000000 and address <= 0x1d007fff) or (address >= 0x1fc00000 and address <= 0x1fc01fff))):
return False
dataCount = 4
replyCount = count
result = False
s_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+dataCount) # send buffer
r_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+replyCount) # reply buffer
s_buffer[MSG_INDEX_COMMAND] = self.CMD_BOOT_MEMORY_R
s_buffer[MSG_INDEX_DATA] = address & 0xff
s_buffer[MSG_INDEX_DATA+1] = (address>>8) & 0xff
s_buffer[MSG_INDEX_DATA+2] = count & 0xff
s_buffer[MSG_INDEX_DATA+3] = (count>>8) & 0xff
s_buffer[MSG_INDEX_START] = MSG_START
s_buffer[MSG_INDEX_FRAME] = self.device.frameID
self.device.frameID = (self.device.frameID + 1) % 256 # increment frame ID with every send
s_buffer[MSG_INDEX_STATUS] = 0
s_buffer[MSG_INDEX_COUNT_LOW] = (dataCount & 0xff)
s_buffer[MSG_INDEX_COUNT_HIGH] = ((dataCount>>8) & 0xff)
s_buffer[MSG_INDEX_DATA+dataCount] = 0xff - self.device.calcChecksum(s_buffer, MSG_INDEX_DATA+dataCount)
self.device.sock.settimeout(.1)
self.device.sendMessage(s_buffer)
try:
r_buffer = self.device.sock.recv(2048)
except socket.timeout:
raise TimeoutError('BootloaderMemory_R: timeout error.')
return
if len(r_buffer) == MSG_HEADER_SIZE + MSG_CHECKSUM_SIZE + replyCount:
if r_buffer[MSG_INDEX_START] == s_buffer[0] and \
r_buffer[MSG_INDEX_COMMAND] == s_buffer[MSG_INDEX_COMMAND] | MSG_REPLY and \
r_buffer[MSG_INDEX_FRAME] == s_buffer[2] and \
r_buffer[MSG_INDEX_STATUS] == MSG_SUCCESS and \
r_buffer[MSG_INDEX_COUNT_LOW] == replyCount & 0xff and \
r_buffer[MSG_INDEX_COUNT_HIGH] == (replyCount >> 8) & 0xff and \
r_buffer[MSG_INDEX_DATA+replyCount] + self.device.calcChecksum(r_buffer,(MSG_HEADER_SIZE+replyCount)) == 0xff :
result = True
value = int.from_bytes(r_buffer[MSG_INDEX_DATA:MSG_INDEX_DATA+replyCount], byteorder='little')
try:
if (result == False):
raise ResultError
except ResultError:
print('Error in BootloaderMemory_R E-TC. Status =', hex(r_buffer[MSG_INDEX_STATUS]))
return value
def BootloaderMemory_W(self, address, count, data):
"""
This command writes the bootloader stored in nonvolatile FLASH
memory. The bootloader is located in program FLASH memory in two
physical address ranges: 0x1D000000 - 0x1D007FFF for bootloader
code and 0x1FC00000 - 0x1FC01FFF for C startup code and
interrupts. Writes outside these ranges are ignored. The
bootloader memory is write protected and must be unlocked in
order to write the memory. The unlock proceedure is to write the
unlock code 0xAA55 to address 0xFFFFFFFE. Writes to the entire
memory range are then possible. Write any other value to address
0xFFFFFFFE to lock the memory after writing.
The FLASH memory must be erased prior to programming. A bulk
erase is perfomred by writing 0xAA55 to address 0x80000000 after
unlocking the memory for write. The bulk erase will require
approximately 150ms to complete. Once the erase is complete, the
memory may be written; however, the device will not be able to
boot unless it has a valid bootloader so the device shold not be
reset until the bootloader is completely written and verified
using BootloaderMemory_R().
The writes are perfomred on 4-byte boundaries internally and it
is recommended that the output data be sent in the same manner.
The amount of data to be written is inferred frolm the frame
count - 2. The maximum count value is 1024.
"""
if (count > 1024):
return False
if (not((address >= 0x1d000000 and address <= 0x1d007fff) or (address >= 0x1fc00000 and address <= 0x1fc01fff))):
return False
dataCount = count + 2
replyCount = 0
result = False
s_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+dataCount) # send buffer
r_buffer = bytearray(MSG_HEADER_SIZE+MSG_CHECKSUM_SIZE+replyCount) # reply buffer
s_buffer[MSG_INDEX_COMMAND] = self.CMD_BOOT_MEMORY_W
s_buffer[MSG_INDEX_DATA] = address & 0xff
s_buffer[MSG_INDEX_DATA+1] = (address>>8) & 0xff
for i in range(count):
s_buffer[MSG_INDEX_DATA+2+i] = data[i]
s_buffer[MSG_INDEX_START] = MSG_START
s_buffer[MSG_INDEX_FRAME] = self.device.frameID
self.device.frameID = (self.device.frameID + 1) % 256 # increment frame ID with every send
s_buffer[MSG_INDEX_STATUS] = 0
s_buffer[MSG_INDEX_COUNT_LOW] = (dataCount & 0xff)
s_buffer[MSG_INDEX_COUNT_HIGH] = ((dataCount>>8) & 0xff)
s_buffer[MSG_INDEX_DATA+dataCount] = 0xff - self.device.calcChecksum(s_buffer, MSG_INDEX_DATA+dataCount)
self.device.sock.settimeout(.1)
self.device.sendMessage(s_buffer)
try:
r_buffer = self.device.sock.recv(2048)
except socket.timeout:
raise TimeoutError('BootloaderMemory_W: timeout error.')
return
if len(r_buffer) == MSG_HEADER_SIZE + MSG_CHECKSUM_SIZE + replyCount:
if r_buffer[MSG_INDEX_START] == s_buffer[0] and \
r_buffer[MSG_INDEX_COMMAND] == s_buffer[MSG_INDEX_COMMAND] | MSG_REPLY and \
r_buffer[MSG_INDEX_FRAME] == s_buffer[2] and \
r_buffer[MSG_INDEX_STATUS] == MSG_SUCCESS and \
r_buffer[MSG_INDEX_COUNT_LOW] == replyCount & 0xff and \
r_buffer[MSG_INDEX_COUNT_HIGH] == (replyCount >> 8) & 0xff and \
r_buffer[MSG_INDEX_DATA+replyCount] + self.device.calcChecksum(r_buffer,(MSG_HEADER_SIZE+replyCount)) == 0xff :
result = True
try:
if (result == False):
raise ResultError
except ResultError:
print('Error in BootloaderMemory_W E-TC. Status =', hex(r_buffer[MSG_INDEX_STATUS]))
def MACaddress(self):
"""
Gets the MAC address
"""
address = 0x0a
value = self.ConfigMemory_R(address, 6)
self.device.MAC = (value[0]<<40) + (value[1]<<32) + (value[2]<<24) + (value[3]<<16) + (value[4]<<8) + value[5]
return self.device.MAC
@staticmethod
def nBits8(num):
"""
counts the number of bits in a number
"""
count = 0
for i in range(8):
if ((num & 0x1) == 0x1):
count += 1
num >>= 0x1
return count
| 48.885332
| 135
| 0.629446
| 15,430
| 120,649
| 4.645172
| 0.043616
| 0.117531
| 0.165637
| 0.094594
| 0.871545
| 0.85984
| 0.845218
| 0.838075
| 0.829913
| 0.82316
| 0
| 0.020301
| 0.271623
| 120,649
| 2,467
| 136
| 48.905148
| 0.795319
| 0.164983
| 0
| 0.818994
| 0
| 0
| 0.030542
| 0.000903
| 0
| 0
| 0.015544
| 0
| 0
| 1
| 0.026257
| false
| 0
| 0.001676
| 0
| 0.101676
| 0.024581
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
9ade7e44fc2d0b258a78d136b35721e2f2d9919d
| 54,121
|
py
|
Python
|
napalm_yang/models/openconfig/network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/adjacency_sids/adjacency_sid/config/__init__.py
|
ckishimo/napalm-yang
|
8f2bd907bd3afcde3c2f8e985192de74748baf6c
|
[
"Apache-2.0"
] | 64
|
2016-10-20T15:47:18.000Z
|
2021-11-11T11:57:32.000Z
|
napalm_yang/models/openconfig/network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/adjacency_sids/adjacency_sid/config/__init__.py
|
ckishimo/napalm-yang
|
8f2bd907bd3afcde3c2f8e985192de74748baf6c
|
[
"Apache-2.0"
] | 126
|
2016-10-05T10:36:14.000Z
|
2019-05-15T08:43:23.000Z
|
napalm_yang/models/openconfig/network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/adjacency_sids/adjacency_sid/config/__init__.py
|
ckishimo/napalm-yang
|
8f2bd907bd3afcde3c2f8e985192de74748baf6c
|
[
"Apache-2.0"
] | 63
|
2016-11-07T15:23:08.000Z
|
2021-09-22T14:41:16.000Z
|
# -*- coding: utf-8 -*-
from operator import attrgetter
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType
from pyangbind.lib.yangtypes import RestrictedClassType
from pyangbind.lib.yangtypes import TypedListType
from pyangbind.lib.yangtypes import YANGBool
from pyangbind.lib.yangtypes import YANGListType
from pyangbind.lib.yangtypes import YANGDynClass
from pyangbind.lib.yangtypes import ReferenceType
from pyangbind.lib.base import PybindBase
from collections import OrderedDict
from decimal import Decimal
from bitarray import bitarray
import six
# PY3 support of some PY2 keywords (needs improved)
if six.PY3:
import builtins as __builtin__
long = int
elif six.PY2:
import __builtin__
class config(PybindBase):
"""
This class was auto-generated by the PythonClass plugin for PYANG
from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/afi-safi/af/segment-routing/adjacency-sids/adjacency-sid/config. Each member element of
the container is represented as a class variable - with a specific
YANG type.
YANG Description: Configuraton parameters relating to the AdjSID.
"""
__slots__ = (
"_path_helper",
"_extmethods",
"__sid_id",
"__protection_eligible",
"__group",
"__neighbor",
)
_yang_name = "config"
_pybind_generated_by = "container"
def __init__(self, *args, **kwargs):
self._path_helper = False
self._extmethods = False
self.__sid_id = YANGDynClass(
base=[
RestrictedClassType(
base_type=RestrictedClassType(
base_type=long,
restriction_dict={"range": ["0..4294967295"]},
int_size=32,
),
restriction_dict={"range": ["16..1048575"]},
),
RestrictedClassType(
base_type=six.text_type,
restriction_type="dict_key",
restriction_arg={
"IPV4_EXPLICIT_NULL": {"value": 0},
"ROUTER_ALERT": {"value": 1},
"IPV6_EXPLICIT_NULL": {"value": 2},
"IMPLICIT_NULL": {"value": 3},
"ENTROPY_LABEL_INDICATOR": {"value": 7},
"NO_LABEL": {},
},
),
RestrictedClassType(
base_type=RestrictedClassType(
base_type=six.text_type,
restriction_dict={
"pattern": "((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?"
},
),
restriction_dict={"pattern": "[0-9a-fA-F:\\.]*"},
),
RestrictedClassType(
base_type=six.text_type,
restriction_type="dict_key",
restriction_arg={"DYNAMIC": {}},
),
],
is_leaf=True,
yang_name="sid-id",
parent=self,
path_helper=self._path_helper,
extmethods=self._extmethods,
register_paths=True,
namespace="http://openconfig.net/yang/network-instance",
defining_module="openconfig-network-instance",
yang_type="union",
is_config=True,
)
self.__protection_eligible = YANGDynClass(
base=YANGBool,
default=YANGBool("true"),
is_leaf=True,
yang_name="protection-eligible",
parent=self,
path_helper=self._path_helper,
extmethods=self._extmethods,
register_paths=True,
namespace="http://openconfig.net/yang/network-instance",
defining_module="openconfig-network-instance",
yang_type="boolean",
is_config=True,
)
self.__group = YANGDynClass(
base=YANGBool,
default=YANGBool("false"),
is_leaf=True,
yang_name="group",
parent=self,
path_helper=self._path_helper,
extmethods=self._extmethods,
register_paths=True,
namespace="http://openconfig.net/yang/network-instance",
defining_module="openconfig-network-instance",
yang_type="boolean",
is_config=True,
)
self.__neighbor = YANGDynClass(
base=[
RestrictedClassType(
base_type=six.text_type,
restriction_dict={
"pattern": "(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?"
},
),
RestrictedClassType(
base_type=six.text_type,
restriction_dict={
"pattern": "((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?"
},
),
],
is_leaf=True,
yang_name="neighbor",
parent=self,
path_helper=self._path_helper,
extmethods=self._extmethods,
register_paths=True,
namespace="http://openconfig.net/yang/network-instance",
defining_module="openconfig-network-instance",
yang_type="inet:ip-address",
is_config=True,
)
load = kwargs.pop("load", None)
if args:
if len(args) > 1:
raise TypeError("cannot create a YANG container with >1 argument")
all_attr = True
for e in self._pyangbind_elements:
if not hasattr(args[0], e):
all_attr = False
break
if not all_attr:
raise ValueError("Supplied object did not have the correct attributes")
for e in self._pyangbind_elements:
nobj = getattr(args[0], e)
if nobj._changed() is False:
continue
setmethod = getattr(self, "_set_%s" % e)
if load is None:
setmethod(getattr(args[0], e))
else:
setmethod(getattr(args[0], e), load=load)
def _path(self):
if hasattr(self, "_parent"):
return self._parent._path() + [self._yang_name]
else:
return [
"network-instances",
"network-instance",
"protocols",
"protocol",
"isis",
"interfaces",
"interface",
"levels",
"level",
"afi-safi",
"af",
"segment-routing",
"adjacency-sids",
"adjacency-sid",
"config",
]
def _get_sid_id(self):
"""
Getter method for sid_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/adjacency_sids/adjacency_sid/config/sid_id (union)
YANG Description: The value of the Adj-SID to be advertised. Where a static SID
identifier is specified, this should be advertised directly by the
system. Where the DYNAMIC value is specified, this should be treated
as a dynamically allocated value. When the MPLS data plane is in use
the dynamic value should not fall within a reserved-label-block.
"""
return self.__sid_id
def _set_sid_id(self, v, load=False):
"""
Setter method for sid_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/adjacency_sids/adjacency_sid/config/sid_id (union)
If this variable is read-only (config: false) in the
source YANG file, then _set_sid_id is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_sid_id() directly.
YANG Description: The value of the Adj-SID to be advertised. Where a static SID
identifier is specified, this should be advertised directly by the
system. Where the DYNAMIC value is specified, this should be treated
as a dynamically allocated value. When the MPLS data plane is in use
the dynamic value should not fall within a reserved-label-block.
"""
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(
v,
base=[
RestrictedClassType(
base_type=RestrictedClassType(
base_type=long,
restriction_dict={"range": ["0..4294967295"]},
int_size=32,
),
restriction_dict={"range": ["16..1048575"]},
),
RestrictedClassType(
base_type=six.text_type,
restriction_type="dict_key",
restriction_arg={
"IPV4_EXPLICIT_NULL": {"value": 0},
"ROUTER_ALERT": {"value": 1},
"IPV6_EXPLICIT_NULL": {"value": 2},
"IMPLICIT_NULL": {"value": 3},
"ENTROPY_LABEL_INDICATOR": {"value": 7},
"NO_LABEL": {},
},
),
RestrictedClassType(
base_type=RestrictedClassType(
base_type=six.text_type,
restriction_dict={
"pattern": "((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?"
},
),
restriction_dict={"pattern": "[0-9a-fA-F:\\.]*"},
),
RestrictedClassType(
base_type=six.text_type,
restriction_type="dict_key",
restriction_arg={"DYNAMIC": {}},
),
],
is_leaf=True,
yang_name="sid-id",
parent=self,
path_helper=self._path_helper,
extmethods=self._extmethods,
register_paths=True,
namespace="http://openconfig.net/yang/network-instance",
defining_module="openconfig-network-instance",
yang_type="union",
is_config=True,
)
except (TypeError, ValueError):
raise ValueError(
{
"error-string": """sid_id must be of a type compatible with union""",
"defined-type": "openconfig-network-instance:union",
"generated-type": """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}), restriction_dict={'pattern': '[0-9a-fA-F:\\.]*'}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DYNAMIC': {}},),], is_leaf=True, yang_name="sid-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)""",
}
)
self.__sid_id = t
if hasattr(self, "_set"):
self._set()
def _unset_sid_id(self):
self.__sid_id = YANGDynClass(
base=[
RestrictedClassType(
base_type=RestrictedClassType(
base_type=long,
restriction_dict={"range": ["0..4294967295"]},
int_size=32,
),
restriction_dict={"range": ["16..1048575"]},
),
RestrictedClassType(
base_type=six.text_type,
restriction_type="dict_key",
restriction_arg={
"IPV4_EXPLICIT_NULL": {"value": 0},
"ROUTER_ALERT": {"value": 1},
"IPV6_EXPLICIT_NULL": {"value": 2},
"IMPLICIT_NULL": {"value": 3},
"ENTROPY_LABEL_INDICATOR": {"value": 7},
"NO_LABEL": {},
},
),
RestrictedClassType(
base_type=RestrictedClassType(
base_type=six.text_type,
restriction_dict={
"pattern": "((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?"
},
),
restriction_dict={"pattern": "[0-9a-fA-F:\\.]*"},
),
RestrictedClassType(
base_type=six.text_type,
restriction_type="dict_key",
restriction_arg={"DYNAMIC": {}},
),
],
is_leaf=True,
yang_name="sid-id",
parent=self,
path_helper=self._path_helper,
extmethods=self._extmethods,
register_paths=True,
namespace="http://openconfig.net/yang/network-instance",
defining_module="openconfig-network-instance",
yang_type="union",
is_config=True,
)
def _get_protection_eligible(self):
"""
Getter method for protection_eligible, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/adjacency_sids/adjacency_sid/config/protection_eligible (boolean)
YANG Description: Whether the Adj-SID should be considered to be eligible for protection
using IP or MPLS FRR during a network failure. When this value is set to
true, the B-flag of the Adj-SID is set to 1, and the local system should
provide FRR paths for the associated label forwarding entry. When it is
set to false, the local system must not provide FRR for the specified
LFIB entry.
"""
return self.__protection_eligible
def _set_protection_eligible(self, v, load=False):
"""
Setter method for protection_eligible, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/adjacency_sids/adjacency_sid/config/protection_eligible (boolean)
If this variable is read-only (config: false) in the
source YANG file, then _set_protection_eligible is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_protection_eligible() directly.
YANG Description: Whether the Adj-SID should be considered to be eligible for protection
using IP or MPLS FRR during a network failure. When this value is set to
true, the B-flag of the Adj-SID is set to 1, and the local system should
provide FRR paths for the associated label forwarding entry. When it is
set to false, the local system must not provide FRR for the specified
LFIB entry.
"""
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(
v,
base=YANGBool,
default=YANGBool("true"),
is_leaf=True,
yang_name="protection-eligible",
parent=self,
path_helper=self._path_helper,
extmethods=self._extmethods,
register_paths=True,
namespace="http://openconfig.net/yang/network-instance",
defining_module="openconfig-network-instance",
yang_type="boolean",
is_config=True,
)
except (TypeError, ValueError):
raise ValueError(
{
"error-string": """protection_eligible must be of a type compatible with boolean""",
"defined-type": "boolean",
"generated-type": """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="protection-eligible", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
}
)
self.__protection_eligible = t
if hasattr(self, "_set"):
self._set()
def _unset_protection_eligible(self):
self.__protection_eligible = YANGDynClass(
base=YANGBool,
default=YANGBool("true"),
is_leaf=True,
yang_name="protection-eligible",
parent=self,
path_helper=self._path_helper,
extmethods=self._extmethods,
register_paths=True,
namespace="http://openconfig.net/yang/network-instance",
defining_module="openconfig-network-instance",
yang_type="boolean",
is_config=True,
)
def _get_group(self):
"""
Getter method for group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/adjacency_sids/adjacency_sid/config/group (boolean)
YANG Description: When set to true, the Adj-SID is indicated to be part of a group, and
the G flag is set to 1 in the corresponding advertisement in the IGP.
"""
return self.__group
def _set_group(self, v, load=False):
"""
Setter method for group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/adjacency_sids/adjacency_sid/config/group (boolean)
If this variable is read-only (config: false) in the
source YANG file, then _set_group is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_group() directly.
YANG Description: When set to true, the Adj-SID is indicated to be part of a group, and
the G flag is set to 1 in the corresponding advertisement in the IGP.
"""
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(
v,
base=YANGBool,
default=YANGBool("false"),
is_leaf=True,
yang_name="group",
parent=self,
path_helper=self._path_helper,
extmethods=self._extmethods,
register_paths=True,
namespace="http://openconfig.net/yang/network-instance",
defining_module="openconfig-network-instance",
yang_type="boolean",
is_config=True,
)
except (TypeError, ValueError):
raise ValueError(
{
"error-string": """group must be of a type compatible with boolean""",
"defined-type": "boolean",
"generated-type": """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
}
)
self.__group = t
if hasattr(self, "_set"):
self._set()
def _unset_group(self):
self.__group = YANGDynClass(
base=YANGBool,
default=YANGBool("false"),
is_leaf=True,
yang_name="group",
parent=self,
path_helper=self._path_helper,
extmethods=self._extmethods,
register_paths=True,
namespace="http://openconfig.net/yang/network-instance",
defining_module="openconfig-network-instance",
yang_type="boolean",
is_config=True,
)
def _get_neighbor(self):
"""
Getter method for neighbor, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/adjacency_sids/adjacency_sid/config/neighbor (inet:ip-address)
YANG Description: The remote system on the interface with which the Adj-SID is
associated.
"""
return self.__neighbor
def _set_neighbor(self, v, load=False):
"""
Setter method for neighbor, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/adjacency_sids/adjacency_sid/config/neighbor (inet:ip-address)
If this variable is read-only (config: false) in the
source YANG file, then _set_neighbor is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_neighbor() directly.
YANG Description: The remote system on the interface with which the Adj-SID is
associated.
"""
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(
v,
base=[
RestrictedClassType(
base_type=six.text_type,
restriction_dict={
"pattern": "(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?"
},
),
RestrictedClassType(
base_type=six.text_type,
restriction_dict={
"pattern": "((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?"
},
),
],
is_leaf=True,
yang_name="neighbor",
parent=self,
path_helper=self._path_helper,
extmethods=self._extmethods,
register_paths=True,
namespace="http://openconfig.net/yang/network-instance",
defining_module="openconfig-network-instance",
yang_type="inet:ip-address",
is_config=True,
)
except (TypeError, ValueError):
raise ValueError(
{
"error-string": """neighbor must be of a type compatible with inet:ip-address""",
"defined-type": "inet:ip-address",
"generated-type": """YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)""",
}
)
self.__neighbor = t
if hasattr(self, "_set"):
self._set()
def _unset_neighbor(self):
self.__neighbor = YANGDynClass(
base=[
RestrictedClassType(
base_type=six.text_type,
restriction_dict={
"pattern": "(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?"
},
),
RestrictedClassType(
base_type=six.text_type,
restriction_dict={
"pattern": "((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?"
},
),
],
is_leaf=True,
yang_name="neighbor",
parent=self,
path_helper=self._path_helper,
extmethods=self._extmethods,
register_paths=True,
namespace="http://openconfig.net/yang/network-instance",
defining_module="openconfig-network-instance",
yang_type="inet:ip-address",
is_config=True,
)
sid_id = __builtin__.property(_get_sid_id, _set_sid_id)
protection_eligible = __builtin__.property(
_get_protection_eligible, _set_protection_eligible
)
group = __builtin__.property(_get_group, _set_group)
neighbor = __builtin__.property(_get_neighbor, _set_neighbor)
_pyangbind_elements = OrderedDict(
[
("sid_id", sid_id),
("protection_eligible", protection_eligible),
("group", group),
("neighbor", neighbor),
]
)
class config(PybindBase):
"""
This class was auto-generated by the PythonClass plugin for PYANG
from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/afi-safi/af/segment-routing/adjacency-sids/adjacency-sid/config. Each member element of
the container is represented as a class variable - with a specific
YANG type.
YANG Description: Configuraton parameters relating to the AdjSID.
"""
__slots__ = (
"_path_helper",
"_extmethods",
"__sid_id",
"__protection_eligible",
"__group",
"__neighbor",
)
_yang_name = "config"
_pybind_generated_by = "container"
def __init__(self, *args, **kwargs):
self._path_helper = False
self._extmethods = False
self.__sid_id = YANGDynClass(
base=[
RestrictedClassType(
base_type=RestrictedClassType(
base_type=long,
restriction_dict={"range": ["0..4294967295"]},
int_size=32,
),
restriction_dict={"range": ["16..1048575"]},
),
RestrictedClassType(
base_type=six.text_type,
restriction_type="dict_key",
restriction_arg={
"IPV4_EXPLICIT_NULL": {"value": 0},
"ROUTER_ALERT": {"value": 1},
"IPV6_EXPLICIT_NULL": {"value": 2},
"IMPLICIT_NULL": {"value": 3},
"ENTROPY_LABEL_INDICATOR": {"value": 7},
"NO_LABEL": {},
},
),
RestrictedClassType(
base_type=RestrictedClassType(
base_type=six.text_type,
restriction_dict={
"pattern": "((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?"
},
),
restriction_dict={"pattern": "[0-9a-fA-F:\\.]*"},
),
RestrictedClassType(
base_type=six.text_type,
restriction_type="dict_key",
restriction_arg={"DYNAMIC": {}},
),
],
is_leaf=True,
yang_name="sid-id",
parent=self,
path_helper=self._path_helper,
extmethods=self._extmethods,
register_paths=True,
namespace="http://openconfig.net/yang/network-instance",
defining_module="openconfig-network-instance",
yang_type="union",
is_config=True,
)
self.__protection_eligible = YANGDynClass(
base=YANGBool,
default=YANGBool("true"),
is_leaf=True,
yang_name="protection-eligible",
parent=self,
path_helper=self._path_helper,
extmethods=self._extmethods,
register_paths=True,
namespace="http://openconfig.net/yang/network-instance",
defining_module="openconfig-network-instance",
yang_type="boolean",
is_config=True,
)
self.__group = YANGDynClass(
base=YANGBool,
default=YANGBool("false"),
is_leaf=True,
yang_name="group",
parent=self,
path_helper=self._path_helper,
extmethods=self._extmethods,
register_paths=True,
namespace="http://openconfig.net/yang/network-instance",
defining_module="openconfig-network-instance",
yang_type="boolean",
is_config=True,
)
self.__neighbor = YANGDynClass(
base=[
RestrictedClassType(
base_type=six.text_type,
restriction_dict={
"pattern": "(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?"
},
),
RestrictedClassType(
base_type=six.text_type,
restriction_dict={
"pattern": "((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?"
},
),
],
is_leaf=True,
yang_name="neighbor",
parent=self,
path_helper=self._path_helper,
extmethods=self._extmethods,
register_paths=True,
namespace="http://openconfig.net/yang/network-instance",
defining_module="openconfig-network-instance",
yang_type="inet:ip-address",
is_config=True,
)
load = kwargs.pop("load", None)
if args:
if len(args) > 1:
raise TypeError("cannot create a YANG container with >1 argument")
all_attr = True
for e in self._pyangbind_elements:
if not hasattr(args[0], e):
all_attr = False
break
if not all_attr:
raise ValueError("Supplied object did not have the correct attributes")
for e in self._pyangbind_elements:
nobj = getattr(args[0], e)
if nobj._changed() is False:
continue
setmethod = getattr(self, "_set_%s" % e)
if load is None:
setmethod(getattr(args[0], e))
else:
setmethod(getattr(args[0], e), load=load)
def _path(self):
if hasattr(self, "_parent"):
return self._parent._path() + [self._yang_name]
else:
return [
"network-instances",
"network-instance",
"protocols",
"protocol",
"isis",
"interfaces",
"interface",
"levels",
"level",
"afi-safi",
"af",
"segment-routing",
"adjacency-sids",
"adjacency-sid",
"config",
]
def _get_sid_id(self):
"""
Getter method for sid_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/adjacency_sids/adjacency_sid/config/sid_id (union)
YANG Description: The value of the Adj-SID to be advertised. Where a static SID
identifier is specified, this should be advertised directly by the
system. Where the DYNAMIC value is specified, this should be treated
as a dynamically allocated value. When the MPLS data plane is in use
the dynamic value should not fall within a reserved-label-block.
"""
return self.__sid_id
def _set_sid_id(self, v, load=False):
"""
Setter method for sid_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/adjacency_sids/adjacency_sid/config/sid_id (union)
If this variable is read-only (config: false) in the
source YANG file, then _set_sid_id is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_sid_id() directly.
YANG Description: The value of the Adj-SID to be advertised. Where a static SID
identifier is specified, this should be advertised directly by the
system. Where the DYNAMIC value is specified, this should be treated
as a dynamically allocated value. When the MPLS data plane is in use
the dynamic value should not fall within a reserved-label-block.
"""
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(
v,
base=[
RestrictedClassType(
base_type=RestrictedClassType(
base_type=long,
restriction_dict={"range": ["0..4294967295"]},
int_size=32,
),
restriction_dict={"range": ["16..1048575"]},
),
RestrictedClassType(
base_type=six.text_type,
restriction_type="dict_key",
restriction_arg={
"IPV4_EXPLICIT_NULL": {"value": 0},
"ROUTER_ALERT": {"value": 1},
"IPV6_EXPLICIT_NULL": {"value": 2},
"IMPLICIT_NULL": {"value": 3},
"ENTROPY_LABEL_INDICATOR": {"value": 7},
"NO_LABEL": {},
},
),
RestrictedClassType(
base_type=RestrictedClassType(
base_type=six.text_type,
restriction_dict={
"pattern": "((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?"
},
),
restriction_dict={"pattern": "[0-9a-fA-F:\\.]*"},
),
RestrictedClassType(
base_type=six.text_type,
restriction_type="dict_key",
restriction_arg={"DYNAMIC": {}},
),
],
is_leaf=True,
yang_name="sid-id",
parent=self,
path_helper=self._path_helper,
extmethods=self._extmethods,
register_paths=True,
namespace="http://openconfig.net/yang/network-instance",
defining_module="openconfig-network-instance",
yang_type="union",
is_config=True,
)
except (TypeError, ValueError):
raise ValueError(
{
"error-string": """sid_id must be of a type compatible with union""",
"defined-type": "openconfig-network-instance:union",
"generated-type": """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}), restriction_dict={'pattern': '[0-9a-fA-F:\\.]*'}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DYNAMIC': {}},),], is_leaf=True, yang_name="sid-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)""",
}
)
self.__sid_id = t
if hasattr(self, "_set"):
self._set()
def _unset_sid_id(self):
self.__sid_id = YANGDynClass(
base=[
RestrictedClassType(
base_type=RestrictedClassType(
base_type=long,
restriction_dict={"range": ["0..4294967295"]},
int_size=32,
),
restriction_dict={"range": ["16..1048575"]},
),
RestrictedClassType(
base_type=six.text_type,
restriction_type="dict_key",
restriction_arg={
"IPV4_EXPLICIT_NULL": {"value": 0},
"ROUTER_ALERT": {"value": 1},
"IPV6_EXPLICIT_NULL": {"value": 2},
"IMPLICIT_NULL": {"value": 3},
"ENTROPY_LABEL_INDICATOR": {"value": 7},
"NO_LABEL": {},
},
),
RestrictedClassType(
base_type=RestrictedClassType(
base_type=six.text_type,
restriction_dict={
"pattern": "((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?"
},
),
restriction_dict={"pattern": "[0-9a-fA-F:\\.]*"},
),
RestrictedClassType(
base_type=six.text_type,
restriction_type="dict_key",
restriction_arg={"DYNAMIC": {}},
),
],
is_leaf=True,
yang_name="sid-id",
parent=self,
path_helper=self._path_helper,
extmethods=self._extmethods,
register_paths=True,
namespace="http://openconfig.net/yang/network-instance",
defining_module="openconfig-network-instance",
yang_type="union",
is_config=True,
)
def _get_protection_eligible(self):
"""
Getter method for protection_eligible, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/adjacency_sids/adjacency_sid/config/protection_eligible (boolean)
YANG Description: Whether the Adj-SID should be considered to be eligible for protection
using IP or MPLS FRR during a network failure. When this value is set to
true, the B-flag of the Adj-SID is set to 1, and the local system should
provide FRR paths for the associated label forwarding entry. When it is
set to false, the local system must not provide FRR for the specified
LFIB entry.
"""
return self.__protection_eligible
def _set_protection_eligible(self, v, load=False):
"""
Setter method for protection_eligible, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/adjacency_sids/adjacency_sid/config/protection_eligible (boolean)
If this variable is read-only (config: false) in the
source YANG file, then _set_protection_eligible is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_protection_eligible() directly.
YANG Description: Whether the Adj-SID should be considered to be eligible for protection
using IP or MPLS FRR during a network failure. When this value is set to
true, the B-flag of the Adj-SID is set to 1, and the local system should
provide FRR paths for the associated label forwarding entry. When it is
set to false, the local system must not provide FRR for the specified
LFIB entry.
"""
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(
v,
base=YANGBool,
default=YANGBool("true"),
is_leaf=True,
yang_name="protection-eligible",
parent=self,
path_helper=self._path_helper,
extmethods=self._extmethods,
register_paths=True,
namespace="http://openconfig.net/yang/network-instance",
defining_module="openconfig-network-instance",
yang_type="boolean",
is_config=True,
)
except (TypeError, ValueError):
raise ValueError(
{
"error-string": """protection_eligible must be of a type compatible with boolean""",
"defined-type": "boolean",
"generated-type": """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="protection-eligible", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
}
)
self.__protection_eligible = t
if hasattr(self, "_set"):
self._set()
def _unset_protection_eligible(self):
self.__protection_eligible = YANGDynClass(
base=YANGBool,
default=YANGBool("true"),
is_leaf=True,
yang_name="protection-eligible",
parent=self,
path_helper=self._path_helper,
extmethods=self._extmethods,
register_paths=True,
namespace="http://openconfig.net/yang/network-instance",
defining_module="openconfig-network-instance",
yang_type="boolean",
is_config=True,
)
def _get_group(self):
"""
Getter method for group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/adjacency_sids/adjacency_sid/config/group (boolean)
YANG Description: When set to true, the Adj-SID is indicated to be part of a group, and
the G flag is set to 1 in the corresponding advertisement in the IGP.
"""
return self.__group
def _set_group(self, v, load=False):
"""
Setter method for group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/adjacency_sids/adjacency_sid/config/group (boolean)
If this variable is read-only (config: false) in the
source YANG file, then _set_group is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_group() directly.
YANG Description: When set to true, the Adj-SID is indicated to be part of a group, and
the G flag is set to 1 in the corresponding advertisement in the IGP.
"""
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(
v,
base=YANGBool,
default=YANGBool("false"),
is_leaf=True,
yang_name="group",
parent=self,
path_helper=self._path_helper,
extmethods=self._extmethods,
register_paths=True,
namespace="http://openconfig.net/yang/network-instance",
defining_module="openconfig-network-instance",
yang_type="boolean",
is_config=True,
)
except (TypeError, ValueError):
raise ValueError(
{
"error-string": """group must be of a type compatible with boolean""",
"defined-type": "boolean",
"generated-type": """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
}
)
self.__group = t
if hasattr(self, "_set"):
self._set()
def _unset_group(self):
self.__group = YANGDynClass(
base=YANGBool,
default=YANGBool("false"),
is_leaf=True,
yang_name="group",
parent=self,
path_helper=self._path_helper,
extmethods=self._extmethods,
register_paths=True,
namespace="http://openconfig.net/yang/network-instance",
defining_module="openconfig-network-instance",
yang_type="boolean",
is_config=True,
)
def _get_neighbor(self):
"""
Getter method for neighbor, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/adjacency_sids/adjacency_sid/config/neighbor (inet:ip-address)
YANG Description: The remote system on the interface with which the Adj-SID is
associated.
"""
return self.__neighbor
def _set_neighbor(self, v, load=False):
"""
Setter method for neighbor, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/adjacency_sids/adjacency_sid/config/neighbor (inet:ip-address)
If this variable is read-only (config: false) in the
source YANG file, then _set_neighbor is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_neighbor() directly.
YANG Description: The remote system on the interface with which the Adj-SID is
associated.
"""
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(
v,
base=[
RestrictedClassType(
base_type=six.text_type,
restriction_dict={
"pattern": "(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?"
},
),
RestrictedClassType(
base_type=six.text_type,
restriction_dict={
"pattern": "((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?"
},
),
],
is_leaf=True,
yang_name="neighbor",
parent=self,
path_helper=self._path_helper,
extmethods=self._extmethods,
register_paths=True,
namespace="http://openconfig.net/yang/network-instance",
defining_module="openconfig-network-instance",
yang_type="inet:ip-address",
is_config=True,
)
except (TypeError, ValueError):
raise ValueError(
{
"error-string": """neighbor must be of a type compatible with inet:ip-address""",
"defined-type": "inet:ip-address",
"generated-type": """YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)""",
}
)
self.__neighbor = t
if hasattr(self, "_set"):
self._set()
def _unset_neighbor(self):
self.__neighbor = YANGDynClass(
base=[
RestrictedClassType(
base_type=six.text_type,
restriction_dict={
"pattern": "(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?"
},
),
RestrictedClassType(
base_type=six.text_type,
restriction_dict={
"pattern": "((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?"
},
),
],
is_leaf=True,
yang_name="neighbor",
parent=self,
path_helper=self._path_helper,
extmethods=self._extmethods,
register_paths=True,
namespace="http://openconfig.net/yang/network-instance",
defining_module="openconfig-network-instance",
yang_type="inet:ip-address",
is_config=True,
)
sid_id = __builtin__.property(_get_sid_id, _set_sid_id)
protection_eligible = __builtin__.property(
_get_protection_eligible, _set_protection_eligible
)
group = __builtin__.property(_get_group, _set_group)
neighbor = __builtin__.property(_get_neighbor, _set_neighbor)
_pyangbind_elements = OrderedDict(
[
("sid_id", sid_id),
("protection_eligible", protection_eligible),
("group", group),
("neighbor", neighbor),
]
)
| 47.020851
| 1,397
| 0.539938
| 6,200
| 54,121
| 4.533548
| 0.044516
| 0.012523
| 0.010246
| 0.015369
| 0.986659
| 0.978938
| 0.978938
| 0.978938
| 0.978938
| 0.978938
| 0
| 0.037704
| 0.320781
| 54,121
| 1,150
| 1,398
| 47.061739
| 0.726931
| 0.201456
| 0
| 0.88913
| 0
| 0.028261
| 0.322037
| 0.180122
| 0
| 0
| 0
| 0
| 0
| 1
| 0.030435
| false
| 0
| 0.016304
| 0
| 0.079348
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
9af5a874906ab1d9657091bb70064fdc1c865f30
| 339
|
py
|
Python
|
main/CompuCellPythonTutorial/steppableBasedMitosisPeriodicBC/Simulation/steppableBasedMitosis.py
|
JulianoGianlupi/nh-cc3d-4x-base-tool
|
c0f4aceebd4c5bf3ec39e831ef851e419b161259
|
[
"CC0-1.0"
] | null | null | null |
main/CompuCellPythonTutorial/steppableBasedMitosisPeriodicBC/Simulation/steppableBasedMitosis.py
|
JulianoGianlupi/nh-cc3d-4x-base-tool
|
c0f4aceebd4c5bf3ec39e831ef851e419b161259
|
[
"CC0-1.0"
] | null | null | null |
main/CompuCellPythonTutorial/steppableBasedMitosisPeriodicBC/Simulation/steppableBasedMitosis.py
|
JulianoGianlupi/nh-cc3d-4x-base-tool
|
c0f4aceebd4c5bf3ec39e831ef851e419b161259
|
[
"CC0-1.0"
] | 1
|
2021-02-26T21:50:29.000Z
|
2021-02-26T21:50:29.000Z
|
from cc3d import CompuCellSetup
from .steppableBasedMitosisSteppables import VolumeParamSteppable
from .steppableBasedMitosisSteppables import MitosisSteppable
CompuCellSetup.register_steppable(steppable=VolumeParamSteppable(frequency=10))
CompuCellSetup.register_steppable(steppable=MitosisSteppable(frequency=10))
CompuCellSetup.run()
| 37.666667
| 79
| 0.893805
| 28
| 339
| 10.75
| 0.428571
| 0.232558
| 0.272425
| 0.265781
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.015528
| 0.050147
| 339
| 8
| 80
| 42.375
| 0.919255
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 1
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 8
|
b14f6227092021ac0e03fc627a68b3514652e85c
| 90
|
py
|
Python
|
tests/PaxHeaders.2308045/test-ovsdb.py
|
cuijianming/ovs-2.13.6
|
e7fdf06d6c26d280b25bdf235146ae007cd2208c
|
[
"Apache-2.0"
] | null | null | null |
tests/PaxHeaders.2308045/test-ovsdb.py
|
cuijianming/ovs-2.13.6
|
e7fdf06d6c26d280b25bdf235146ae007cd2208c
|
[
"Apache-2.0"
] | null | null | null |
tests/PaxHeaders.2308045/test-ovsdb.py
|
cuijianming/ovs-2.13.6
|
e7fdf06d6c26d280b25bdf235146ae007cd2208c
|
[
"Apache-2.0"
] | null | null | null |
30 mtime=1639777086.636355983
30 atime=1639777086.636355983
30 ctime=1639777126.675355983
| 22.5
| 29
| 0.866667
| 12
| 90
| 6.5
| 0.666667
| 0.487179
| 0.538462
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.75
| 0.066667
| 90
| 3
| 30
| 30
| 0.178571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
b1560af9d764841f8719224d4c6205b6bb60058b
| 11,897
|
py
|
Python
|
test_autolens/unit/simulator/test_simulator.py
|
harshitjindal/PyAutoLens
|
f1d3f08f12a61f6634e1b7a0ccf8f5cfe0252035
|
[
"MIT"
] | 1
|
2020-04-06T20:07:56.000Z
|
2020-04-06T20:07:56.000Z
|
test_autolens/unit/simulator/test_simulator.py
|
harshitjindal/PyAutoLens
|
f1d3f08f12a61f6634e1b7a0ccf8f5cfe0252035
|
[
"MIT"
] | null | null | null |
test_autolens/unit/simulator/test_simulator.py
|
harshitjindal/PyAutoLens
|
f1d3f08f12a61f6634e1b7a0ccf8f5cfe0252035
|
[
"MIT"
] | null | null | null |
import autolens as al
import numpy as np
import os
import pytest
test_data_dir = "{}/../test_files/arrays/".format(
os.path.dirname(os.path.realpath(__file__))
)
class TestSimulatorImaging:
def test__from_tracer__same_as_manual_tracer_input(self):
psf = al.kernel.manual_2d(
array=np.array([[0.0, 1.0, 0.0], [1.0, 2.0, 1.0], [0.0, 1.0, 0.0]]),
pixel_scales=1.0,
)
grid = al.grid.uniform(shape_2d=(20, 20), pixel_scales=0.05, sub_size=1)
lens_galaxy = al.Galaxy(
redshift=0.5,
light=al.lp.EllipticalSersic(intensity=1.0),
mass=al.mp.EllipticalIsothermal(einstein_radius=1.6),
)
source_galaxy = al.Galaxy(
redshift=1.0, light=al.lp.EllipticalSersic(intensity=0.3)
)
tracer = al.Tracer.from_galaxies(galaxies=[lens_galaxy, source_galaxy])
simulator = al.simulator.imaging(
shape_2d=(20, 20),
pixel_scales=0.05,
sub_size=1,
psf=psf,
exposure_time=10000.0,
background_level=100.0,
add_noise=True,
noise_seed=1,
)
imaging_simulated = simulator.from_tracer(tracer=tracer)
imaging_manual = al.imaging.simulate(
image=tracer.padded_profile_image_from_grid_and_psf_shape(
grid=grid, psf_shape_2d=(3, 3)
),
exposure_time=10000.0,
psf=psf,
background_level=100.0,
add_noise=True,
noise_seed=1,
)
assert (imaging_simulated.image.in_2d == imaging_manual.image.in_2d).all()
assert (imaging_simulated.psf == imaging_manual.psf).all()
assert (imaging_simulated.noise_map == imaging_manual.noise_map).all()
assert (
imaging_simulated.background_sky_map == imaging_manual.background_sky_map
).all()
assert (
imaging_simulated.exposure_time_map == imaging_manual.exposure_time_map
).all()
def test__from_deflections_and_galaxies__same_as_manual_calculation_using_tracer(
self
):
psf = al.kernel.manual_2d(
array=np.array([[0.0, 1.0, 0.0], [1.0, 2.0, 1.0], [0.0, 1.0, 0.0]]),
pixel_scales=0.05,
)
grid = al.grid.uniform(shape_2d=(20, 20), pixel_scales=0.05, sub_size=1)
lens_galaxy = al.Galaxy(
redshift=0.5, mass=al.mp.EllipticalIsothermal(einstein_radius=1.6)
)
source_galaxy = al.Galaxy(
redshift=1.0, light=al.lp.EllipticalSersic(intensity=0.3)
)
tracer = al.Tracer.from_galaxies(galaxies=[lens_galaxy, source_galaxy])
simulator = al.simulator.imaging(
shape_2d=(20, 20),
pixel_scales=0.05,
sub_size=1,
psf=psf,
exposure_time=10000.0,
background_level=100.0,
add_noise=True,
noise_seed=1,
)
imaging_simulated = simulator.from_deflections_and_galaxies(
deflections=tracer.deflections_from_grid(grid=grid),
galaxies=[source_galaxy],
)
imaging_manual = al.imaging.simulate(
image=tracer.padded_profile_image_from_grid_and_psf_shape(
grid=grid, psf_shape_2d=(1, 1)
),
exposure_time=10000.0,
psf=psf,
background_level=100.0,
add_noise=True,
noise_seed=1,
)
assert (imaging_simulated.image.in_2d == imaging_manual.image.in_2d).all()
assert (imaging_simulated.psf == imaging_manual.psf).all()
assert (imaging_simulated.noise_map == imaging_manual.noise_map).all()
assert (
imaging_simulated.background_sky_map == imaging_manual.background_sky_map
).all()
assert (
imaging_simulated.exposure_time_map == imaging_manual.exposure_time_map
).all()
def test__simulate_imaging_from_lens__source_galaxy__compare_to_manual_imaging(
self
):
lens_galaxy = al.Galaxy(
redshift=0.5,
mass=al.mp.EllipticalIsothermal(
centre=(0.0, 0.0), einstein_radius=1.6, axis_ratio=0.7, phi=45.0
),
)
source_galaxy = al.Galaxy(
redshift=0.5,
light=al.lp.EllipticalSersic(
centre=(0.1, 0.1),
axis_ratio=0.8,
phi=60.0,
intensity=0.3,
effective_radius=1.0,
sersic_index=2.5,
),
)
grid = al.grid.uniform(shape_2d=(11, 11), pixel_scales=0.2, sub_size=1)
psf = al.kernel.from_gaussian(shape_2d=(7, 7), sigma=0.1, pixel_scales=0.2)
simulator = al.simulator.imaging(
shape_2d=(11, 11),
pixel_scales=0.2,
sub_size=1,
psf=psf,
exposure_time=100.0,
background_level=1.0,
add_noise=False,
noise_if_add_noise_false=0.2,
)
imaging_simulated = simulator.from_galaxies(
galaxies=[lens_galaxy, source_galaxy]
)
tracer = al.Tracer.from_galaxies(galaxies=[lens_galaxy, source_galaxy])
imaging_manual = al.imaging.simulate(
image=tracer.padded_profile_image_from_grid_and_psf_shape(
grid=grid, psf_shape_2d=(7, 7)
),
exposure_time=100.0,
psf=psf,
background_level=1.0,
add_noise=False,
noise_if_add_noise_false=0.2,
)
assert (imaging_manual.image == imaging_simulated.image).all()
assert (imaging_manual.psf == imaging_simulated.psf).all()
assert (imaging_simulated.noise_map.in_2d == 0.2 * np.ones((11, 11))).all()
assert imaging_manual.noise_map == imaging_simulated.noise_map
assert (
imaging_manual.background_noise_map
== imaging_simulated.background_noise_map
)
assert imaging_manual.poisson_noise_map == imaging_simulated.poisson_noise_map
assert (
imaging_manual.exposure_time_map == imaging_simulated.exposure_time_map
).all()
assert (
imaging_manual.background_sky_map == imaging_simulated.background_sky_map
).all()
class TestSimulatorInterferometer:
def test__from_tracer__same_as_manual_tracer_input(self):
grid = al.grid.uniform(shape_2d=(20, 20), pixel_scales=0.05, sub_size=1)
lens_galaxy = al.Galaxy(
redshift=0.5,
light=al.lp.EllipticalSersic(intensity=1.0),
mass=al.mp.EllipticalIsothermal(einstein_radius=1.6),
)
source_galaxy = al.Galaxy(
redshift=1.0, light=al.lp.EllipticalSersic(intensity=0.3)
)
tracer = al.Tracer.from_galaxies(galaxies=[lens_galaxy, source_galaxy])
simulator = al.simulator.interferometer(
real_space_shape_2d=(20, 20),
real_space_pixel_scales=0.05,
uv_wavelengths=np.ones(shape=(7, 2)),
sub_size=1,
exposure_time=10000.0,
background_level=100.0,
noise_sigma=0.1,
noise_seed=1,
)
interferometer_simulated = simulator.from_tracer(tracer=tracer)
interferometer_manual = al.interferometer.simulate(
real_space_image=tracer.profile_image_from_grid(grid=grid),
transformer=simulator.transformer,
real_space_pixel_scales=0.05,
exposure_time=10000.0,
background_level=100.0,
noise_sigma=0.1,
noise_seed=1,
)
assert (
interferometer_simulated.visibilities == interferometer_manual.visibilities
).all()
assert (
interferometer_simulated.uv_wavelengths
== interferometer_manual.uv_wavelengths
).all()
assert (
interferometer_simulated.noise_map == interferometer_manual.noise_map
).all()
def test__from_deflections_and_galaxies__same_as_manual_calculation_using_tracer(
self
):
grid = al.grid.uniform(shape_2d=(20, 20), pixel_scales=0.05, sub_size=1)
lens_galaxy = al.Galaxy(
redshift=0.5, mass=al.mp.EllipticalIsothermal(einstein_radius=1.6)
)
source_galaxy = al.Galaxy(
redshift=1.0, light=al.lp.EllipticalSersic(intensity=0.3)
)
tracer = al.Tracer.from_galaxies(galaxies=[lens_galaxy, source_galaxy])
simulator = al.simulator.interferometer(
real_space_shape_2d=(20, 20),
real_space_pixel_scales=0.05,
uv_wavelengths=np.ones(shape=(7, 2)),
sub_size=1,
exposure_time=10000.0,
background_level=100.0,
noise_sigma=0.1,
noise_seed=1,
)
interferometer_simulated = simulator.from_deflections_and_galaxies(
deflections=tracer.deflections_from_grid(grid=grid),
galaxies=[source_galaxy],
)
interferometer_manual = al.interferometer.simulate(
real_space_image=tracer.profile_image_from_grid(grid=grid),
real_space_pixel_scales=0.05,
transformer=simulator.transformer,
exposure_time=10000.0,
background_level=100.0,
noise_sigma=0.1,
noise_seed=1,
)
assert (
interferometer_simulated.visibilities == interferometer_manual.visibilities
).all()
assert (
interferometer_simulated.uv_wavelengths
== interferometer_manual.uv_wavelengths
).all()
assert (
interferometer_simulated.noise_map == interferometer_manual.noise_map
).all()
def test__simulate_interferometer_from_lens__source_galaxy__compare_to_manual_interferometer(
self
):
lens_galaxy = al.Galaxy(
redshift=0.5,
mass=al.mp.EllipticalIsothermal(
centre=(0.0, 0.0), einstein_radius=1.6, axis_ratio=0.7, phi=45.0
),
)
source_galaxy = al.Galaxy(
redshift=0.5,
light=al.lp.EllipticalSersic(
centre=(0.1, 0.1),
axis_ratio=0.8,
phi=60.0,
intensity=0.3,
effective_radius=1.0,
sersic_index=2.5,
),
)
grid = al.grid.uniform(shape_2d=(11, 11), pixel_scales=0.05, sub_size=1)
simulator = al.simulator.interferometer(
real_space_shape_2d=(11, 11),
real_space_pixel_scales=0.05,
uv_wavelengths=np.ones(shape=(7, 2)),
sub_size=1,
exposure_time=10000.0,
background_level=100.0,
noise_sigma=0.1,
noise_seed=1,
)
interferometer_simulated = simulator.from_galaxies(
galaxies=[lens_galaxy, source_galaxy]
)
tracer = al.Tracer.from_galaxies(galaxies=[lens_galaxy, source_galaxy])
interferometer_manual = al.interferometer.simulate(
real_space_image=tracer.profile_image_from_grid(grid=grid),
real_space_pixel_scales=0.05,
transformer=simulator.transformer,
exposure_time=10000.0,
background_level=100.0,
noise_sigma=0.1,
noise_seed=1,
)
assert interferometer_manual.visibilities == pytest.approx(
interferometer_simulated.visibilities, 1.0e-4
)
assert (
interferometer_manual.uv_wavelengths
== interferometer_simulated.uv_wavelengths
).all()
assert (
interferometer_manual.noise_map == interferometer_simulated.noise_map
).all()
| 32.774105
| 97
| 0.594267
| 1,384
| 11,897
| 4.802746
| 0.084538
| 0.006319
| 0.030691
| 0.029487
| 0.886264
| 0.848954
| 0.836016
| 0.816308
| 0.808786
| 0.808786
| 0
| 0.051879
| 0.306548
| 11,897
| 362
| 98
| 32.864641
| 0.753818
| 0
| 0
| 0.758278
| 0
| 0
| 0.002017
| 0.002017
| 0
| 0
| 0
| 0
| 0.089404
| 1
| 0.019868
| false
| 0
| 0.013245
| 0
| 0.039735
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
b1597f08b61cfa12827a5347227351ceef176d37
| 9,804
|
py
|
Python
|
source/RandomProblem.py
|
fedetoff/SMMR
|
7ad642bdd1b68c49df5d64de00e1e6df27c67291
|
[
"MIT"
] | null | null | null |
source/RandomProblem.py
|
fedetoff/SMMR
|
7ad642bdd1b68c49df5d64de00e1e6df27c67291
|
[
"MIT"
] | null | null | null |
source/RandomProblem.py
|
fedetoff/SMMR
|
7ad642bdd1b68c49df5d64de00e1e6df27c67291
|
[
"MIT"
] | null | null | null |
import random
from source import Utils, SolutionsUtils, Polytope
from random import randint
def get_random_constrants_T(d, T):
"""
Random generation of T user preferences with d criteria.
:param n: integer: number of criteria.
:param T: integer: number of user preferences.
"""
formatted_constraints = list([])
random_w = []
sum = 0
for j in range(d):
rnd = random.uniform(0, 1)
random_w.append(rnd)
sum += rnd
random_w = [x / sum for x in random_w]
for i in range(T):
# randomly select e_i
e_i = randint(0, d - 1)
e_j = e_i
e_k = e_i
# randomly select e_j
while e_j == e_i:
e_j = randint(0, d - 1)
# randomly select e_k
while e_k == e_i or e_k == e_j:
e_k = randint(0, d - 1)
coefficients = [0]*d
a = random.uniform(0, 1)
b = -random.uniform(0, 1)
c = -random.uniform(0, 1)
coefficients[e_i] = a
coefficients[e_j] = b
coefficients[e_k] = c
if Utils.dot(random_w, coefficients) >= 0:
sign = '>='
else:
sign = '<='
formatted_constraints.append('%f w%i + %f w%i + %f w%i %s 0' % (a, e_i, b, e_j, c, e_k, sign))
return formatted_constraints
def random_problem(vars, n, J, T, mu=10, theta=50, delta=60, int_values=False):
"""
Random generation of J sets of n alternatives with T random user preferences.
:param vars: list of string: variables name of each criteria.
:param n: integer: number of elements for each set of alternative.
:param J: integer: number of sets of alternatives.
:param T: integer: number of user preferences.
:param mu: integer: statistical parameter for random generator:.
:param theta: integer: statistical parameter for random generator.
:param delta: integer: statistical parameter for random generator.
:param int_values: boolean: if true the alternatives are vectors of integer, otherwise vectors of floats.
"""
d=len(vars)
formatted_constraints = get_random_constrants_T(d, T)
W = Polytope.Polytope(vars, frac=True)
A = []
for j in range(J):
mu_j = random.random() * 2 * mu - mu
theta_j = random.random() * 2 * theta
delta_j = random.random() * 2 * delta
mu_ji = [0] * d
delta_ji = [0] * d
for i in range(d):
mu_ji[i] = mu_j + random.random() * 2 * theta_j - theta_j
delta_ji[i] = random.random() * 2 * delta_j
Aj = []
for k in range(n):
v = [0] * d
for i in range(d):
if int_values:
v[i] = int(mu_ji[i] + random.random() * 2 * delta_ji[i] - delta_ji[i])
else:
v[i] = mu_ji[i] + random.random() * 2 * delta_ji[i] - delta_ji[i]
Aj.append(v)
A.append(Aj)
return A, formatted_constraints, W
def random_problem_UD(vars, n, J, T, mu=10, theta=50, delta=60, int_values=False):
"""
Random generation of J sets of n undominated alternatives with T random user preferences.
:param vars: list of string: variables name of each criteria.
:param n: integer: number of elements for each set of alternative.
:param J: integer: number of sets of alternatives.
:param T: integer: number of user preferences.
:param mu: integer: statistical parameter for random generator:.
:param theta: integer: statistical parameter for random generator.
:param delta: integer: statistical parameter for random generator.
:param int_values: boolean: if true the alternatives are vectors of integer, otherwise vectors of floats.
"""
d=len(vars)
formatted_constraints = get_random_constrants_T(d, T)
W = Polytope.Polytope(vars, frac=True)
A = []
for j in range(J):
mu_j = random.random() * 2 * mu - mu
theta_j = random.random() * 2 * theta
delta_j = random.random() * 2 * delta
mu_ji = [0] * d
delta_ji = [0] * d
for i in range(d):
mu_ji[i] = mu_j + random.random() * 2 * theta_j - theta_j
delta_ji[i] = random.random() * 2 * delta_j
Aj = []
for k in range(n*10000):
v = [0] * d
for i in range(d):
if int_values:
v[i] = int(mu_ji[i] + random.random() * 2 * delta_ji[i] - delta_ji[i])
else:
v[i] = mu_ji[i] + random.random() * 2 * delta_ji[i] - delta_ji[i]
#Aj.append(v)
#ud = SolutionsUtils.UD(Aj, W)
correct = True
for s in Aj:
if SolutionsUtils.pairwise_dominance(s, v, W, False) or SolutionsUtils.pairwise_dominance(v, s, W, False):
correct = False
break
if correct:
Aj.append(v)
# print(k)
# print(len(Aj))
if len(Aj)==n:
break
if T!= 0:
formatted_constraints = get_random_constrants_T(d, T)
W.add_formatted_constraints(formatted_constraints)
A.append(SolutionsUtils.UD(Aj, W))
else:
A.append(Aj)
return A, formatted_constraints, W
def random_problem_PO(vars, n, J, T, mu=10, theta=50, delta=60, int_values=False):
"""
Random generation of J sets of n possibly optimal alternatives with T random user preferences.
:param vars: list of string: variables name of each criteria.
:param n: integer: number of elements for each set of alternative.
:param J: integer: number of sets of alternatives.
:param T: integer: number of user preferences.
:param mu: integer: statistical parameter for random generator:.
:param theta: integer: statistical parameter for random generator.
:param delta: integer: statistical parameter for random generator.
:param int_values: boolean: if true the alternatives are vectors of integer, otherwise vectors of floats.
"""
d=len(vars)
formatted_constraints = get_random_constrants_T(d, T)
W = Polytope.Polytope(vars, frac=True)
A = []
for j in range(J):
mu_j = random.random() * 2 * mu - mu
theta_j = random.random() * 2 * theta
delta_j = random.random() * 2 * delta
mu_ji = [0] * d
delta_ji = [0] * d
for i in range(d):
mu_ji[i] = mu_j + random.random() * 2 * theta_j - theta_j
delta_ji[i] = random.random() * 2 * delta_j
Aj = []
for k in range(n*1000):
v = [0] * d
for i in range(d):
if int_values:
v[i] = int(mu_ji[i] + random.random() * 2 * delta_ji[i] - delta_ji[i])
else:
v[i] = mu_ji[i] + random.random() * 2 * delta_ji[i] - delta_ji[i]
correct = True
if SolutionsUtils.PO_test(v, Aj, W):
Aj.append(v)
if(SolutionsUtils.PO(Aj, W) != Aj):
Aj.remove(v)
else:
print(k)
print(len(Aj))
if len(Aj)==n:
break
if T!= 0:
formatted_constraints = get_random_constrants_T(d, T)
W.add_formatted_constraints(formatted_constraints)
A.append(SolutionsUtils.PO(Aj, W))
else:
A.append(Aj)
return A, formatted_constraints, W
def random_problem_PSO(vars, n, J, T, mu=10, theta=50, delta=60, int_values=False):
"""
Random generation of J sets of n strictly optimal alternatives with T random user preferences.
:param vars: list of string: variables name of each criteria.
:param n: integer: number of elements for each set of alternative.
:param J: integer: number of sets of alternatives.
:param T: integer: number of user preferences.
:param mu: integer: statistical parameter for random generator:.
:param theta: integer: statistical parameter for random generator.
:param delta: integer: statistical parameter for random generator.
:param int_values: boolean: if true the alternatives are vectors of integer, otherwise vectors of floats.
"""
d=len(vars)
formatted_constraints = get_random_constrants_T(d, T)
W = Polytope.Polytope(vars, frac=True)
A = []
for j in range(J):
mu_j = random.random() * 2 * mu - mu
theta_j = random.random() * 2 * theta
delta_j = random.random() * 2 * delta
mu_ji = [0] * d
delta_ji = [0] * d
for i in range(d):
mu_ji[i] = mu_j + random.random() * 2 * theta_j - theta_j
delta_ji[i] = random.random() * 2 * delta_j
Aj = []
for k in range(n*1000):
v = [0] * d
for i in range(d):
if int_values:
v[i] = int(mu_ji[i] + random.random() * 2 * delta_ji[i] - delta_ji[i])
else:
v[i] = mu_ji[i] + random.random() * 2 * delta_ji[i] - delta_ji[i]
correct = True
if SolutionsUtils.PSO_test(v, Aj, W):
add = True
for s in Aj:
if not SolutionsUtils.PSO_test(s, Aj + [v], W):
add=False
break
if(add):
Aj.append(v)
print(k)
print(len(Aj))
if len(Aj)==n:
break
if T!= 0:
formatted_constraints = get_random_constrants_T(d, T)
W.add_formatted_constraints(formatted_constraints)
A.append(SolutionsUtils.PO(Aj, W))
else:
A.append(Aj)
return A, formatted_constraints, W
| 34.765957
| 122
| 0.56069
| 1,346
| 9,804
| 3.960624
| 0.081724
| 0.018008
| 0.06828
| 0.042018
| 0.834928
| 0.833052
| 0.816545
| 0.809792
| 0.809792
| 0.809792
| 0
| 0.015024
| 0.334659
| 9,804
| 281
| 123
| 34.88968
| 0.802238
| 0.281416
| 0
| 0.717514
| 0
| 0
| 0.004835
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.028249
| false
| 0
| 0.016949
| 0
| 0.073446
| 0.022599
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
b193eba787252cca8aa9ceebb0446faa8db3eeb7
| 3,460
|
py
|
Python
|
tests/test_get_data.py
|
duncanmazza/ml_stock_prediction_api
|
4cf6325ff1252511049b87bc46fa4d5b48acf4f3
|
[
"MIT"
] | 1
|
2020-04-05T20:19:10.000Z
|
2020-04-05T20:19:10.000Z
|
tests/test_get_data.py
|
duncanmazza/ml_stock_prediction_api
|
4cf6325ff1252511049b87bc46fa4d5b48acf4f3
|
[
"MIT"
] | null | null | null |
tests/test_get_data.py
|
duncanmazza/ml_stock_prediction_api
|
4cf6325ff1252511049b87bc46fa4d5b48acf4f3
|
[
"MIT"
] | null | null | null |
"""
Tests the :py:mod:`src.get_data` module
@author: Duncan Mazza
"""
from src.get_data import Company
from tests.BColors import BColors
import pytest
import os
from warnings import warn
from datetime import datetime
import numpy as np
@pytest.fixture()
def company():
r"""
TODO: documentation
"""
return Company("IBM", start_date=datetime(2017, 2, 9), end_date=datetime(2017, 2, 13))
def test_save_to_csv_saves_file_no_csv_suffix(company: Company, test_file_path="obscure_file_name",
remove_test_file: bool = True):
r"""
Tests whether :py:class:`src.get_data.pandas_stock_data.Company.save_to_csv` saves a file whose file name is not
supplied with a ``.csv`` suffix
:param company:
:param test_file_path:
:param remove_test_file:
:return:
"""
company.cache(test_file_path, company.data_frame)
expected_output_file = os.path.join(os.getcwd(), test_file_path + ".csv")
try:
assert os.path.exists(expected_output_file)
except AssertionError:
warn(BColors.WARNING + "Failed to save file to expected output file - there be a file saved that was not "
"automatically removed by testing" + BColors.WHITE)
raise AssertionError
if remove_test_file:
os.remove(expected_output_file)
def test_save_to_csv_saves_file_with_csv_suffix(company: Company, test_file_path: str = "obscure_file_name.csv",
remove_test_file: bool = True):
r"""
Tests whether :py:class:`src.get_data.pandas_stock_data.Company.save_to_csv` saves a file whose file name is
supplied with a ``.csv`` suffix
:param company:
:param test_file_path:
:param remove_test_file:
:return:
"""
company.cache(test_file_path, company.data_frame)
expected_output_file = os.path.join(os.getcwd(), test_file_path)
try:
assert os.path.exists(expected_output_file)
except AssertionError:
warn(BColors.WARNING + "Failed to save file to expected output file - there be a file saved that was not "
"automatically removed by testing" + BColors.WHITE)
raise AssertionError
if remove_test_file:
os.remove(expected_output_file)
def test_return_numpy_array_of_company_daily_stock_close(company: Company):
r"""
TODO: documentation
:param company:
:return:
"""
stock_data = company.return_numpy_array_of_company_daily_stock_close()
assert type(stock_data) == np.ndarray
assert len(stock_data) == 3
compare_array = np.array([177.21000671, 178.67999268, 179.36000061])
# typecast to 32bit integers to avoid discrepancy with comparing floating point numbers
assert np.array_equal(stock_data.astype(np.int32), compare_array.astype(np.int32))
def return_numpy_array_of_company_daily_stock_percent_change(company: Company):
r"""
TODO: documentation
:param company:
:return:
"""
stock_data = company.return_numpy_array_of_company_daily_stock_percent_change()
assert type(stock_data) == np.ndarray
assert len(stock_data) == 2
compare_array = np.array([0.00829516, 0.00380573])
# typecast to 32bit integers to avoid discrepancy with comparing floating point numbers
assert np.array_equal(stock_data.astype(np.int32), compare_array.astype(np.int32))
if __name__ == "__main__":
pytest.main()
| 34.257426
| 116
| 0.696821
| 472
| 3,460
| 4.834746
| 0.256356
| 0.04908
| 0.042068
| 0.02454
| 0.803243
| 0.803243
| 0.803243
| 0.753725
| 0.734005
| 0.707274
| 0
| 0.028666
| 0.213584
| 3,460
| 100
| 117
| 34.6
| 0.809996
| 0.225434
| 0
| 0.45283
| 0
| 0
| 0.109843
| 0.008268
| 0
| 0
| 0
| 0.03
| 0.226415
| 1
| 0.09434
| false
| 0
| 0.132075
| 0
| 0.245283
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
b1a430df18bff0a8c6a80a70fae541688afdf7c0
| 95
|
py
|
Python
|
foo/lc/leetcode/editor/en/aa.py
|
JaeCoding/keepPying
|
5bf07b34a6c63e9a6bd2b39c17149adb2dc59570
|
[
"MIT"
] | 1
|
2020-02-24T15:15:55.000Z
|
2020-02-24T15:15:55.000Z
|
foo/lc/leetcode/editor/en/aa.py
|
JaeCoding/keepPying
|
5bf07b34a6c63e9a6bd2b39c17149adb2dc59570
|
[
"MIT"
] | null | null | null |
foo/lc/leetcode/editor/en/aa.py
|
JaeCoding/keepPying
|
5bf07b34a6c63e9a6bd2b39c17149adb2dc59570
|
[
"MIT"
] | null | null | null |
# a = ''.join('a','b')
# b = ''.join([1,2,3])
c = ''.join(['a','b'])
c = ''.join(['1','2','3'])
| 23.75
| 26
| 0.315789
| 18
| 95
| 1.666667
| 0.388889
| 0.333333
| 0.4
| 0.466667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.073171
| 0.136842
| 95
| 4
| 26
| 23.75
| 0.292683
| 0.431579
| 0
| 0
| 0
| 0
| 0.096154
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
498502d6dd54251b2dbcb405a126a81cf8fbc832
| 73
|
py
|
Python
|
pySUMMA/decomposition/__init__.py
|
ahsen1402/pySUMMA
|
3412e1282bc2cc9b9076f38bf64ef1674d69d770
|
[
"Apache-2.0"
] | 1
|
2020-01-11T19:56:05.000Z
|
2020-01-11T19:56:05.000Z
|
pySUMMA/decomposition/__init__.py
|
learn-ensemble/PY-SUMMA
|
1b82237be5dc33af57b5c2e2c16aee4d568ddb77
|
[
"Apache-2.0"
] | null | null | null |
pySUMMA/decomposition/__init__.py
|
learn-ensemble/PY-SUMMA
|
1b82237be5dc33af57b5c2e2c16aee4d568ddb77
|
[
"Apache-2.0"
] | null | null | null |
from .rank_one_tensor import Tensor
from .rank_one_matrix import Matrix
| 18.25
| 35
| 0.849315
| 12
| 73
| 4.833333
| 0.5
| 0.275862
| 0.37931
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.123288
| 73
| 3
| 36
| 24.333333
| 0.90625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 7
|
b8f7a36a1da847c928a9931029314610def383cb
| 638
|
py
|
Python
|
build/catkin_generated/order_packages.py
|
ahamden2222/QTRobotTester
|
90e91d96e0d35a82c904934898d9456812d9728e
|
[
"MIT"
] | null | null | null |
build/catkin_generated/order_packages.py
|
ahamden2222/QTRobotTester
|
90e91d96e0d35a82c904934898d9456812d9728e
|
[
"MIT"
] | null | null | null |
build/catkin_generated/order_packages.py
|
ahamden2222/QTRobotTester
|
90e91d96e0d35a82c904934898d9456812d9728e
|
[
"MIT"
] | null | null | null |
# generated from catkin/cmake/template/order_packages.context.py.in
source_root_dir = "/home/robotpt/QTRobotTester/src"
whitelisted_packages = "".split(';') if "" != "" else []
blacklisted_packages = "".split(';') if "" != "" else []
underlay_workspaces = "/home/robotpt/QTRobotTester/devel;/home/robotpt/HumanProjectorInteration/devel;/home/robotpt/Desktop/catkin_nui/devel;/home/robotpt/Developer/catkin_ws/devel;/opt/ros/kinetic".split(';') if "/home/robotpt/QTRobotTester/devel;/home/robotpt/HumanProjectorInteration/devel;/home/robotpt/Desktop/catkin_nui/devel;/home/robotpt/Developer/catkin_ws/devel;/opt/ros/kinetic" != "" else []
| 106.333333
| 403
| 0.766458
| 78
| 638
| 6.141026
| 0.423077
| 0.206681
| 0.200418
| 0.079332
| 0.613779
| 0.613779
| 0.613779
| 0.613779
| 0.613779
| 0.613779
| 0
| 0
| 0.053292
| 638
| 5
| 404
| 127.6
| 0.793046
| 0.101881
| 0
| 0
| 1
| 0.5
| 0.669002
| 0.663748
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 9
|
62100c393bd3c4820183782b5336d26ac2a53512
| 52,044
|
py
|
Python
|
sdk/python/pulumi_okta/user_schema_property.py
|
pulumi/pulumi-okta
|
83f7617a85b3d05213901773fa4e6a151ab6076b
|
[
"ECL-2.0",
"Apache-2.0"
] | 5
|
2019-10-29T21:59:22.000Z
|
2021-11-08T12:00:24.000Z
|
sdk/python/pulumi_okta/user_schema_property.py
|
pulumi/pulumi-okta
|
83f7617a85b3d05213901773fa4e6a151ab6076b
|
[
"ECL-2.0",
"Apache-2.0"
] | 109
|
2020-01-06T10:28:09.000Z
|
2022-03-25T19:52:40.000Z
|
sdk/python/pulumi_okta/user_schema_property.py
|
pulumi/pulumi-okta
|
83f7617a85b3d05213901773fa4e6a151ab6076b
|
[
"ECL-2.0",
"Apache-2.0"
] | 2
|
2020-09-11T16:31:04.000Z
|
2020-11-24T12:23:17.000Z
|
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import _utilities
from . import outputs
from ._inputs import *
__all__ = ['UserSchemaPropertyArgs', 'UserSchemaProperty']
@pulumi.input_type
class UserSchemaPropertyArgs:
def __init__(__self__, *,
index: pulumi.Input[str],
title: pulumi.Input[str],
type: pulumi.Input[str],
array_enums: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
array_one_ofs: Optional[pulumi.Input[Sequence[pulumi.Input['UserSchemaPropertyArrayOneOfArgs']]]] = None,
array_type: Optional[pulumi.Input[str]] = None,
description: Optional[pulumi.Input[str]] = None,
enums: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
external_name: Optional[pulumi.Input[str]] = None,
external_namespace: Optional[pulumi.Input[str]] = None,
master: Optional[pulumi.Input[str]] = None,
master_override_priorities: Optional[pulumi.Input[Sequence[pulumi.Input['UserSchemaPropertyMasterOverridePriorityArgs']]]] = None,
max_length: Optional[pulumi.Input[int]] = None,
min_length: Optional[pulumi.Input[int]] = None,
one_ofs: Optional[pulumi.Input[Sequence[pulumi.Input['UserSchemaPropertyOneOfArgs']]]] = None,
pattern: Optional[pulumi.Input[str]] = None,
permissions: Optional[pulumi.Input[str]] = None,
required: Optional[pulumi.Input[bool]] = None,
scope: Optional[pulumi.Input[str]] = None,
unique: Optional[pulumi.Input[str]] = None,
user_type: Optional[pulumi.Input[str]] = None):
"""
The set of arguments for constructing a UserSchemaProperty resource.
:param pulumi.Input[str] index: The property name.
:param pulumi.Input[str] title: display name for the enum value.
:param pulumi.Input[str] type: - Type of profile source.
:param pulumi.Input[Sequence[pulumi.Input[str]]] array_enums: Array of values that an array property's items can be set to.
:param pulumi.Input[Sequence[pulumi.Input['UserSchemaPropertyArrayOneOfArgs']]] array_one_ofs: Display name and value an enum array can be set to.
:param pulumi.Input[str] array_type: The type of the array elements if `type` is set to `"array"`.
:param pulumi.Input[str] description: The description of the user schema property.
:param pulumi.Input[Sequence[pulumi.Input[str]]] enums: Array of values a primitive property can be set to. See `array_enum` for arrays.
:param pulumi.Input[str] external_name: External name of the user schema property.
:param pulumi.Input[str] external_namespace: External name of the user schema property.
:param pulumi.Input[str] master: Master priority for the user schema property. It can be set to `"PROFILE_MASTER"`, `"OVERRIDE"` or `"OKTA"`.
:param pulumi.Input[Sequence[pulumi.Input['UserSchemaPropertyMasterOverridePriorityArgs']]] master_override_priorities: Prioritized list of profile sources (required when `master` is `"OVERRIDE"`).
:param pulumi.Input[int] max_length: The maximum length of the user property value. Only applies to type `"string"`.
:param pulumi.Input[int] min_length: The minimum length of the user property value. Only applies to type `"string"`.
:param pulumi.Input[Sequence[pulumi.Input['UserSchemaPropertyOneOfArgs']]] one_ofs: Array of maps containing a mapping for display name to enum value.
:param pulumi.Input[str] pattern: The validation pattern to use for the subschema. Must be in form of '.+', or '[<pattern>]+' if present.'
:param pulumi.Input[str] permissions: Access control permissions for the property. It can be set to `"READ_WRITE"`, `"READ_ONLY"`, `"HIDE"`.
:param pulumi.Input[bool] required: Whether the property is required for this application's users.
:param pulumi.Input[str] scope: determines whether an app user attribute can be set at the Individual or Group Level.
:param pulumi.Input[str] unique: Whether the property should be unique. It can be set to `"UNIQUE_VALIDATED"` or `"NOT_UNIQUE"`.
:param pulumi.Input[str] user_type: User type ID
"""
pulumi.set(__self__, "index", index)
pulumi.set(__self__, "title", title)
pulumi.set(__self__, "type", type)
if array_enums is not None:
pulumi.set(__self__, "array_enums", array_enums)
if array_one_ofs is not None:
pulumi.set(__self__, "array_one_ofs", array_one_ofs)
if array_type is not None:
pulumi.set(__self__, "array_type", array_type)
if description is not None:
pulumi.set(__self__, "description", description)
if enums is not None:
pulumi.set(__self__, "enums", enums)
if external_name is not None:
pulumi.set(__self__, "external_name", external_name)
if external_namespace is not None:
pulumi.set(__self__, "external_namespace", external_namespace)
if master is not None:
pulumi.set(__self__, "master", master)
if master_override_priorities is not None:
pulumi.set(__self__, "master_override_priorities", master_override_priorities)
if max_length is not None:
pulumi.set(__self__, "max_length", max_length)
if min_length is not None:
pulumi.set(__self__, "min_length", min_length)
if one_ofs is not None:
pulumi.set(__self__, "one_ofs", one_ofs)
if pattern is not None:
pulumi.set(__self__, "pattern", pattern)
if permissions is not None:
pulumi.set(__self__, "permissions", permissions)
if required is not None:
pulumi.set(__self__, "required", required)
if scope is not None:
pulumi.set(__self__, "scope", scope)
if unique is not None:
pulumi.set(__self__, "unique", unique)
if user_type is not None:
pulumi.set(__self__, "user_type", user_type)
@property
@pulumi.getter
def index(self) -> pulumi.Input[str]:
"""
The property name.
"""
return pulumi.get(self, "index")
@index.setter
def index(self, value: pulumi.Input[str]):
pulumi.set(self, "index", value)
@property
@pulumi.getter
def title(self) -> pulumi.Input[str]:
"""
display name for the enum value.
"""
return pulumi.get(self, "title")
@title.setter
def title(self, value: pulumi.Input[str]):
pulumi.set(self, "title", value)
@property
@pulumi.getter
def type(self) -> pulumi.Input[str]:
"""
- Type of profile source.
"""
return pulumi.get(self, "type")
@type.setter
def type(self, value: pulumi.Input[str]):
pulumi.set(self, "type", value)
@property
@pulumi.getter(name="arrayEnums")
def array_enums(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
"""
Array of values that an array property's items can be set to.
"""
return pulumi.get(self, "array_enums")
@array_enums.setter
def array_enums(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
pulumi.set(self, "array_enums", value)
@property
@pulumi.getter(name="arrayOneOfs")
def array_one_ofs(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['UserSchemaPropertyArrayOneOfArgs']]]]:
"""
Display name and value an enum array can be set to.
"""
return pulumi.get(self, "array_one_ofs")
@array_one_ofs.setter
def array_one_ofs(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['UserSchemaPropertyArrayOneOfArgs']]]]):
pulumi.set(self, "array_one_ofs", value)
@property
@pulumi.getter(name="arrayType")
def array_type(self) -> Optional[pulumi.Input[str]]:
"""
The type of the array elements if `type` is set to `"array"`.
"""
return pulumi.get(self, "array_type")
@array_type.setter
def array_type(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "array_type", value)
@property
@pulumi.getter
def description(self) -> Optional[pulumi.Input[str]]:
"""
The description of the user schema property.
"""
return pulumi.get(self, "description")
@description.setter
def description(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "description", value)
@property
@pulumi.getter
def enums(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
"""
Array of values a primitive property can be set to. See `array_enum` for arrays.
"""
return pulumi.get(self, "enums")
@enums.setter
def enums(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
pulumi.set(self, "enums", value)
@property
@pulumi.getter(name="externalName")
def external_name(self) -> Optional[pulumi.Input[str]]:
"""
External name of the user schema property.
"""
return pulumi.get(self, "external_name")
@external_name.setter
def external_name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "external_name", value)
@property
@pulumi.getter(name="externalNamespace")
def external_namespace(self) -> Optional[pulumi.Input[str]]:
"""
External name of the user schema property.
"""
return pulumi.get(self, "external_namespace")
@external_namespace.setter
def external_namespace(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "external_namespace", value)
@property
@pulumi.getter
def master(self) -> Optional[pulumi.Input[str]]:
"""
Master priority for the user schema property. It can be set to `"PROFILE_MASTER"`, `"OVERRIDE"` or `"OKTA"`.
"""
return pulumi.get(self, "master")
@master.setter
def master(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "master", value)
@property
@pulumi.getter(name="masterOverridePriorities")
def master_override_priorities(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['UserSchemaPropertyMasterOverridePriorityArgs']]]]:
"""
Prioritized list of profile sources (required when `master` is `"OVERRIDE"`).
"""
return pulumi.get(self, "master_override_priorities")
@master_override_priorities.setter
def master_override_priorities(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['UserSchemaPropertyMasterOverridePriorityArgs']]]]):
pulumi.set(self, "master_override_priorities", value)
@property
@pulumi.getter(name="maxLength")
def max_length(self) -> Optional[pulumi.Input[int]]:
"""
The maximum length of the user property value. Only applies to type `"string"`.
"""
return pulumi.get(self, "max_length")
@max_length.setter
def max_length(self, value: Optional[pulumi.Input[int]]):
pulumi.set(self, "max_length", value)
@property
@pulumi.getter(name="minLength")
def min_length(self) -> Optional[pulumi.Input[int]]:
"""
The minimum length of the user property value. Only applies to type `"string"`.
"""
return pulumi.get(self, "min_length")
@min_length.setter
def min_length(self, value: Optional[pulumi.Input[int]]):
pulumi.set(self, "min_length", value)
@property
@pulumi.getter(name="oneOfs")
def one_ofs(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['UserSchemaPropertyOneOfArgs']]]]:
"""
Array of maps containing a mapping for display name to enum value.
"""
return pulumi.get(self, "one_ofs")
@one_ofs.setter
def one_ofs(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['UserSchemaPropertyOneOfArgs']]]]):
pulumi.set(self, "one_ofs", value)
@property
@pulumi.getter
def pattern(self) -> Optional[pulumi.Input[str]]:
"""
The validation pattern to use for the subschema. Must be in form of '.+', or '[<pattern>]+' if present.'
"""
return pulumi.get(self, "pattern")
@pattern.setter
def pattern(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "pattern", value)
@property
@pulumi.getter
def permissions(self) -> Optional[pulumi.Input[str]]:
"""
Access control permissions for the property. It can be set to `"READ_WRITE"`, `"READ_ONLY"`, `"HIDE"`.
"""
return pulumi.get(self, "permissions")
@permissions.setter
def permissions(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "permissions", value)
@property
@pulumi.getter
def required(self) -> Optional[pulumi.Input[bool]]:
"""
Whether the property is required for this application's users.
"""
return pulumi.get(self, "required")
@required.setter
def required(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "required", value)
@property
@pulumi.getter
def scope(self) -> Optional[pulumi.Input[str]]:
"""
determines whether an app user attribute can be set at the Individual or Group Level.
"""
return pulumi.get(self, "scope")
@scope.setter
def scope(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "scope", value)
@property
@pulumi.getter
def unique(self) -> Optional[pulumi.Input[str]]:
"""
Whether the property should be unique. It can be set to `"UNIQUE_VALIDATED"` or `"NOT_UNIQUE"`.
"""
return pulumi.get(self, "unique")
@unique.setter
def unique(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "unique", value)
@property
@pulumi.getter(name="userType")
def user_type(self) -> Optional[pulumi.Input[str]]:
"""
User type ID
"""
return pulumi.get(self, "user_type")
@user_type.setter
def user_type(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "user_type", value)
@pulumi.input_type
class _UserSchemaPropertyState:
def __init__(__self__, *,
array_enums: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
array_one_ofs: Optional[pulumi.Input[Sequence[pulumi.Input['UserSchemaPropertyArrayOneOfArgs']]]] = None,
array_type: Optional[pulumi.Input[str]] = None,
description: Optional[pulumi.Input[str]] = None,
enums: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
external_name: Optional[pulumi.Input[str]] = None,
external_namespace: Optional[pulumi.Input[str]] = None,
index: Optional[pulumi.Input[str]] = None,
master: Optional[pulumi.Input[str]] = None,
master_override_priorities: Optional[pulumi.Input[Sequence[pulumi.Input['UserSchemaPropertyMasterOverridePriorityArgs']]]] = None,
max_length: Optional[pulumi.Input[int]] = None,
min_length: Optional[pulumi.Input[int]] = None,
one_ofs: Optional[pulumi.Input[Sequence[pulumi.Input['UserSchemaPropertyOneOfArgs']]]] = None,
pattern: Optional[pulumi.Input[str]] = None,
permissions: Optional[pulumi.Input[str]] = None,
required: Optional[pulumi.Input[bool]] = None,
scope: Optional[pulumi.Input[str]] = None,
title: Optional[pulumi.Input[str]] = None,
type: Optional[pulumi.Input[str]] = None,
unique: Optional[pulumi.Input[str]] = None,
user_type: Optional[pulumi.Input[str]] = None):
"""
Input properties used for looking up and filtering UserSchemaProperty resources.
:param pulumi.Input[Sequence[pulumi.Input[str]]] array_enums: Array of values that an array property's items can be set to.
:param pulumi.Input[Sequence[pulumi.Input['UserSchemaPropertyArrayOneOfArgs']]] array_one_ofs: Display name and value an enum array can be set to.
:param pulumi.Input[str] array_type: The type of the array elements if `type` is set to `"array"`.
:param pulumi.Input[str] description: The description of the user schema property.
:param pulumi.Input[Sequence[pulumi.Input[str]]] enums: Array of values a primitive property can be set to. See `array_enum` for arrays.
:param pulumi.Input[str] external_name: External name of the user schema property.
:param pulumi.Input[str] external_namespace: External name of the user schema property.
:param pulumi.Input[str] index: The property name.
:param pulumi.Input[str] master: Master priority for the user schema property. It can be set to `"PROFILE_MASTER"`, `"OVERRIDE"` or `"OKTA"`.
:param pulumi.Input[Sequence[pulumi.Input['UserSchemaPropertyMasterOverridePriorityArgs']]] master_override_priorities: Prioritized list of profile sources (required when `master` is `"OVERRIDE"`).
:param pulumi.Input[int] max_length: The maximum length of the user property value. Only applies to type `"string"`.
:param pulumi.Input[int] min_length: The minimum length of the user property value. Only applies to type `"string"`.
:param pulumi.Input[Sequence[pulumi.Input['UserSchemaPropertyOneOfArgs']]] one_ofs: Array of maps containing a mapping for display name to enum value.
:param pulumi.Input[str] pattern: The validation pattern to use for the subschema. Must be in form of '.+', or '[<pattern>]+' if present.'
:param pulumi.Input[str] permissions: Access control permissions for the property. It can be set to `"READ_WRITE"`, `"READ_ONLY"`, `"HIDE"`.
:param pulumi.Input[bool] required: Whether the property is required for this application's users.
:param pulumi.Input[str] scope: determines whether an app user attribute can be set at the Individual or Group Level.
:param pulumi.Input[str] title: display name for the enum value.
:param pulumi.Input[str] type: - Type of profile source.
:param pulumi.Input[str] unique: Whether the property should be unique. It can be set to `"UNIQUE_VALIDATED"` or `"NOT_UNIQUE"`.
:param pulumi.Input[str] user_type: User type ID
"""
if array_enums is not None:
pulumi.set(__self__, "array_enums", array_enums)
if array_one_ofs is not None:
pulumi.set(__self__, "array_one_ofs", array_one_ofs)
if array_type is not None:
pulumi.set(__self__, "array_type", array_type)
if description is not None:
pulumi.set(__self__, "description", description)
if enums is not None:
pulumi.set(__self__, "enums", enums)
if external_name is not None:
pulumi.set(__self__, "external_name", external_name)
if external_namespace is not None:
pulumi.set(__self__, "external_namespace", external_namespace)
if index is not None:
pulumi.set(__self__, "index", index)
if master is not None:
pulumi.set(__self__, "master", master)
if master_override_priorities is not None:
pulumi.set(__self__, "master_override_priorities", master_override_priorities)
if max_length is not None:
pulumi.set(__self__, "max_length", max_length)
if min_length is not None:
pulumi.set(__self__, "min_length", min_length)
if one_ofs is not None:
pulumi.set(__self__, "one_ofs", one_ofs)
if pattern is not None:
pulumi.set(__self__, "pattern", pattern)
if permissions is not None:
pulumi.set(__self__, "permissions", permissions)
if required is not None:
pulumi.set(__self__, "required", required)
if scope is not None:
pulumi.set(__self__, "scope", scope)
if title is not None:
pulumi.set(__self__, "title", title)
if type is not None:
pulumi.set(__self__, "type", type)
if unique is not None:
pulumi.set(__self__, "unique", unique)
if user_type is not None:
pulumi.set(__self__, "user_type", user_type)
@property
@pulumi.getter(name="arrayEnums")
def array_enums(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
"""
Array of values that an array property's items can be set to.
"""
return pulumi.get(self, "array_enums")
@array_enums.setter
def array_enums(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
pulumi.set(self, "array_enums", value)
@property
@pulumi.getter(name="arrayOneOfs")
def array_one_ofs(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['UserSchemaPropertyArrayOneOfArgs']]]]:
"""
Display name and value an enum array can be set to.
"""
return pulumi.get(self, "array_one_ofs")
@array_one_ofs.setter
def array_one_ofs(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['UserSchemaPropertyArrayOneOfArgs']]]]):
pulumi.set(self, "array_one_ofs", value)
@property
@pulumi.getter(name="arrayType")
def array_type(self) -> Optional[pulumi.Input[str]]:
"""
The type of the array elements if `type` is set to `"array"`.
"""
return pulumi.get(self, "array_type")
@array_type.setter
def array_type(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "array_type", value)
@property
@pulumi.getter
def description(self) -> Optional[pulumi.Input[str]]:
"""
The description of the user schema property.
"""
return pulumi.get(self, "description")
@description.setter
def description(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "description", value)
@property
@pulumi.getter
def enums(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
"""
Array of values a primitive property can be set to. See `array_enum` for arrays.
"""
return pulumi.get(self, "enums")
@enums.setter
def enums(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
pulumi.set(self, "enums", value)
@property
@pulumi.getter(name="externalName")
def external_name(self) -> Optional[pulumi.Input[str]]:
"""
External name of the user schema property.
"""
return pulumi.get(self, "external_name")
@external_name.setter
def external_name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "external_name", value)
@property
@pulumi.getter(name="externalNamespace")
def external_namespace(self) -> Optional[pulumi.Input[str]]:
"""
External name of the user schema property.
"""
return pulumi.get(self, "external_namespace")
@external_namespace.setter
def external_namespace(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "external_namespace", value)
@property
@pulumi.getter
def index(self) -> Optional[pulumi.Input[str]]:
"""
The property name.
"""
return pulumi.get(self, "index")
@index.setter
def index(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "index", value)
@property
@pulumi.getter
def master(self) -> Optional[pulumi.Input[str]]:
"""
Master priority for the user schema property. It can be set to `"PROFILE_MASTER"`, `"OVERRIDE"` or `"OKTA"`.
"""
return pulumi.get(self, "master")
@master.setter
def master(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "master", value)
@property
@pulumi.getter(name="masterOverridePriorities")
def master_override_priorities(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['UserSchemaPropertyMasterOverridePriorityArgs']]]]:
"""
Prioritized list of profile sources (required when `master` is `"OVERRIDE"`).
"""
return pulumi.get(self, "master_override_priorities")
@master_override_priorities.setter
def master_override_priorities(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['UserSchemaPropertyMasterOverridePriorityArgs']]]]):
pulumi.set(self, "master_override_priorities", value)
@property
@pulumi.getter(name="maxLength")
def max_length(self) -> Optional[pulumi.Input[int]]:
"""
The maximum length of the user property value. Only applies to type `"string"`.
"""
return pulumi.get(self, "max_length")
@max_length.setter
def max_length(self, value: Optional[pulumi.Input[int]]):
pulumi.set(self, "max_length", value)
@property
@pulumi.getter(name="minLength")
def min_length(self) -> Optional[pulumi.Input[int]]:
"""
The minimum length of the user property value. Only applies to type `"string"`.
"""
return pulumi.get(self, "min_length")
@min_length.setter
def min_length(self, value: Optional[pulumi.Input[int]]):
pulumi.set(self, "min_length", value)
@property
@pulumi.getter(name="oneOfs")
def one_ofs(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['UserSchemaPropertyOneOfArgs']]]]:
"""
Array of maps containing a mapping for display name to enum value.
"""
return pulumi.get(self, "one_ofs")
@one_ofs.setter
def one_ofs(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['UserSchemaPropertyOneOfArgs']]]]):
pulumi.set(self, "one_ofs", value)
@property
@pulumi.getter
def pattern(self) -> Optional[pulumi.Input[str]]:
"""
The validation pattern to use for the subschema. Must be in form of '.+', or '[<pattern>]+' if present.'
"""
return pulumi.get(self, "pattern")
@pattern.setter
def pattern(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "pattern", value)
@property
@pulumi.getter
def permissions(self) -> Optional[pulumi.Input[str]]:
"""
Access control permissions for the property. It can be set to `"READ_WRITE"`, `"READ_ONLY"`, `"HIDE"`.
"""
return pulumi.get(self, "permissions")
@permissions.setter
def permissions(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "permissions", value)
@property
@pulumi.getter
def required(self) -> Optional[pulumi.Input[bool]]:
"""
Whether the property is required for this application's users.
"""
return pulumi.get(self, "required")
@required.setter
def required(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "required", value)
@property
@pulumi.getter
def scope(self) -> Optional[pulumi.Input[str]]:
"""
determines whether an app user attribute can be set at the Individual or Group Level.
"""
return pulumi.get(self, "scope")
@scope.setter
def scope(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "scope", value)
@property
@pulumi.getter
def title(self) -> Optional[pulumi.Input[str]]:
"""
display name for the enum value.
"""
return pulumi.get(self, "title")
@title.setter
def title(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "title", value)
@property
@pulumi.getter
def type(self) -> Optional[pulumi.Input[str]]:
"""
- Type of profile source.
"""
return pulumi.get(self, "type")
@type.setter
def type(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "type", value)
@property
@pulumi.getter
def unique(self) -> Optional[pulumi.Input[str]]:
"""
Whether the property should be unique. It can be set to `"UNIQUE_VALIDATED"` or `"NOT_UNIQUE"`.
"""
return pulumi.get(self, "unique")
@unique.setter
def unique(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "unique", value)
@property
@pulumi.getter(name="userType")
def user_type(self) -> Optional[pulumi.Input[str]]:
"""
User type ID
"""
return pulumi.get(self, "user_type")
@user_type.setter
def user_type(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "user_type", value)
class UserSchemaProperty(pulumi.CustomResource):
@overload
def __init__(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
array_enums: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
array_one_ofs: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['UserSchemaPropertyArrayOneOfArgs']]]]] = None,
array_type: Optional[pulumi.Input[str]] = None,
description: Optional[pulumi.Input[str]] = None,
enums: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
external_name: Optional[pulumi.Input[str]] = None,
external_namespace: Optional[pulumi.Input[str]] = None,
index: Optional[pulumi.Input[str]] = None,
master: Optional[pulumi.Input[str]] = None,
master_override_priorities: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['UserSchemaPropertyMasterOverridePriorityArgs']]]]] = None,
max_length: Optional[pulumi.Input[int]] = None,
min_length: Optional[pulumi.Input[int]] = None,
one_ofs: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['UserSchemaPropertyOneOfArgs']]]]] = None,
pattern: Optional[pulumi.Input[str]] = None,
permissions: Optional[pulumi.Input[str]] = None,
required: Optional[pulumi.Input[bool]] = None,
scope: Optional[pulumi.Input[str]] = None,
title: Optional[pulumi.Input[str]] = None,
type: Optional[pulumi.Input[str]] = None,
unique: Optional[pulumi.Input[str]] = None,
user_type: Optional[pulumi.Input[str]] = None,
__props__=None):
"""
Creates a User Schema property.
This resource allows you to create and configure a custom user schema property.
## Example Usage
```python
import pulumi
import pulumi_okta as okta
example = okta.UserSchemaProperty("example",
description="My custom property name",
index="customPropertyName",
master="OKTA",
scope="SELF",
title="customPropertyName",
type="string",
user_type=data["okta_user_type"]["example"]["id"])
```
## Import
User schema property of default user type can be imported via the property index.
```sh
$ pulumi import okta:index/userSchemaProperty:UserSchemaProperty example <index>
```
User schema property of custom user type can be imported via user type id and property index
```sh
$ pulumi import okta:index/userSchemaProperty:UserSchemaProperty example <user type id>.<index>
```
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[Sequence[pulumi.Input[str]]] array_enums: Array of values that an array property's items can be set to.
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['UserSchemaPropertyArrayOneOfArgs']]]] array_one_ofs: Display name and value an enum array can be set to.
:param pulumi.Input[str] array_type: The type of the array elements if `type` is set to `"array"`.
:param pulumi.Input[str] description: The description of the user schema property.
:param pulumi.Input[Sequence[pulumi.Input[str]]] enums: Array of values a primitive property can be set to. See `array_enum` for arrays.
:param pulumi.Input[str] external_name: External name of the user schema property.
:param pulumi.Input[str] external_namespace: External name of the user schema property.
:param pulumi.Input[str] index: The property name.
:param pulumi.Input[str] master: Master priority for the user schema property. It can be set to `"PROFILE_MASTER"`, `"OVERRIDE"` or `"OKTA"`.
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['UserSchemaPropertyMasterOverridePriorityArgs']]]] master_override_priorities: Prioritized list of profile sources (required when `master` is `"OVERRIDE"`).
:param pulumi.Input[int] max_length: The maximum length of the user property value. Only applies to type `"string"`.
:param pulumi.Input[int] min_length: The minimum length of the user property value. Only applies to type `"string"`.
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['UserSchemaPropertyOneOfArgs']]]] one_ofs: Array of maps containing a mapping for display name to enum value.
:param pulumi.Input[str] pattern: The validation pattern to use for the subschema. Must be in form of '.+', or '[<pattern>]+' if present.'
:param pulumi.Input[str] permissions: Access control permissions for the property. It can be set to `"READ_WRITE"`, `"READ_ONLY"`, `"HIDE"`.
:param pulumi.Input[bool] required: Whether the property is required for this application's users.
:param pulumi.Input[str] scope: determines whether an app user attribute can be set at the Individual or Group Level.
:param pulumi.Input[str] title: display name for the enum value.
:param pulumi.Input[str] type: - Type of profile source.
:param pulumi.Input[str] unique: Whether the property should be unique. It can be set to `"UNIQUE_VALIDATED"` or `"NOT_UNIQUE"`.
:param pulumi.Input[str] user_type: User type ID
"""
...
@overload
def __init__(__self__,
resource_name: str,
args: UserSchemaPropertyArgs,
opts: Optional[pulumi.ResourceOptions] = None):
"""
Creates a User Schema property.
This resource allows you to create and configure a custom user schema property.
## Example Usage
```python
import pulumi
import pulumi_okta as okta
example = okta.UserSchemaProperty("example",
description="My custom property name",
index="customPropertyName",
master="OKTA",
scope="SELF",
title="customPropertyName",
type="string",
user_type=data["okta_user_type"]["example"]["id"])
```
## Import
User schema property of default user type can be imported via the property index.
```sh
$ pulumi import okta:index/userSchemaProperty:UserSchemaProperty example <index>
```
User schema property of custom user type can be imported via user type id and property index
```sh
$ pulumi import okta:index/userSchemaProperty:UserSchemaProperty example <user type id>.<index>
```
:param str resource_name: The name of the resource.
:param UserSchemaPropertyArgs args: The arguments to use to populate this resource's properties.
:param pulumi.ResourceOptions opts: Options for the resource.
"""
...
def __init__(__self__, resource_name: str, *args, **kwargs):
resource_args, opts = _utilities.get_resource_args_opts(UserSchemaPropertyArgs, pulumi.ResourceOptions, *args, **kwargs)
if resource_args is not None:
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
else:
__self__._internal_init(resource_name, *args, **kwargs)
def _internal_init(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
array_enums: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
array_one_ofs: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['UserSchemaPropertyArrayOneOfArgs']]]]] = None,
array_type: Optional[pulumi.Input[str]] = None,
description: Optional[pulumi.Input[str]] = None,
enums: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
external_name: Optional[pulumi.Input[str]] = None,
external_namespace: Optional[pulumi.Input[str]] = None,
index: Optional[pulumi.Input[str]] = None,
master: Optional[pulumi.Input[str]] = None,
master_override_priorities: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['UserSchemaPropertyMasterOverridePriorityArgs']]]]] = None,
max_length: Optional[pulumi.Input[int]] = None,
min_length: Optional[pulumi.Input[int]] = None,
one_ofs: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['UserSchemaPropertyOneOfArgs']]]]] = None,
pattern: Optional[pulumi.Input[str]] = None,
permissions: Optional[pulumi.Input[str]] = None,
required: Optional[pulumi.Input[bool]] = None,
scope: Optional[pulumi.Input[str]] = None,
title: Optional[pulumi.Input[str]] = None,
type: Optional[pulumi.Input[str]] = None,
unique: Optional[pulumi.Input[str]] = None,
user_type: Optional[pulumi.Input[str]] = None,
__props__=None):
if opts is None:
opts = pulumi.ResourceOptions()
if not isinstance(opts, pulumi.ResourceOptions):
raise TypeError('Expected resource options to be a ResourceOptions instance')
if opts.version is None:
opts.version = _utilities.get_version()
if opts.id is None:
if __props__ is not None:
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
__props__ = UserSchemaPropertyArgs.__new__(UserSchemaPropertyArgs)
__props__.__dict__["array_enums"] = array_enums
__props__.__dict__["array_one_ofs"] = array_one_ofs
__props__.__dict__["array_type"] = array_type
__props__.__dict__["description"] = description
__props__.__dict__["enums"] = enums
__props__.__dict__["external_name"] = external_name
__props__.__dict__["external_namespace"] = external_namespace
if index is None and not opts.urn:
raise TypeError("Missing required property 'index'")
__props__.__dict__["index"] = index
__props__.__dict__["master"] = master
__props__.__dict__["master_override_priorities"] = master_override_priorities
__props__.__dict__["max_length"] = max_length
__props__.__dict__["min_length"] = min_length
__props__.__dict__["one_ofs"] = one_ofs
__props__.__dict__["pattern"] = pattern
__props__.__dict__["permissions"] = permissions
__props__.__dict__["required"] = required
__props__.__dict__["scope"] = scope
if title is None and not opts.urn:
raise TypeError("Missing required property 'title'")
__props__.__dict__["title"] = title
if type is None and not opts.urn:
raise TypeError("Missing required property 'type'")
__props__.__dict__["type"] = type
__props__.__dict__["unique"] = unique
__props__.__dict__["user_type"] = user_type
super(UserSchemaProperty, __self__).__init__(
'okta:index/userSchemaProperty:UserSchemaProperty',
resource_name,
__props__,
opts)
@staticmethod
def get(resource_name: str,
id: pulumi.Input[str],
opts: Optional[pulumi.ResourceOptions] = None,
array_enums: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
array_one_ofs: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['UserSchemaPropertyArrayOneOfArgs']]]]] = None,
array_type: Optional[pulumi.Input[str]] = None,
description: Optional[pulumi.Input[str]] = None,
enums: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
external_name: Optional[pulumi.Input[str]] = None,
external_namespace: Optional[pulumi.Input[str]] = None,
index: Optional[pulumi.Input[str]] = None,
master: Optional[pulumi.Input[str]] = None,
master_override_priorities: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['UserSchemaPropertyMasterOverridePriorityArgs']]]]] = None,
max_length: Optional[pulumi.Input[int]] = None,
min_length: Optional[pulumi.Input[int]] = None,
one_ofs: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['UserSchemaPropertyOneOfArgs']]]]] = None,
pattern: Optional[pulumi.Input[str]] = None,
permissions: Optional[pulumi.Input[str]] = None,
required: Optional[pulumi.Input[bool]] = None,
scope: Optional[pulumi.Input[str]] = None,
title: Optional[pulumi.Input[str]] = None,
type: Optional[pulumi.Input[str]] = None,
unique: Optional[pulumi.Input[str]] = None,
user_type: Optional[pulumi.Input[str]] = None) -> 'UserSchemaProperty':
"""
Get an existing UserSchemaProperty resource's state with the given name, id, and optional extra
properties used to qualify the lookup.
:param str resource_name: The unique name of the resulting resource.
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[Sequence[pulumi.Input[str]]] array_enums: Array of values that an array property's items can be set to.
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['UserSchemaPropertyArrayOneOfArgs']]]] array_one_ofs: Display name and value an enum array can be set to.
:param pulumi.Input[str] array_type: The type of the array elements if `type` is set to `"array"`.
:param pulumi.Input[str] description: The description of the user schema property.
:param pulumi.Input[Sequence[pulumi.Input[str]]] enums: Array of values a primitive property can be set to. See `array_enum` for arrays.
:param pulumi.Input[str] external_name: External name of the user schema property.
:param pulumi.Input[str] external_namespace: External name of the user schema property.
:param pulumi.Input[str] index: The property name.
:param pulumi.Input[str] master: Master priority for the user schema property. It can be set to `"PROFILE_MASTER"`, `"OVERRIDE"` or `"OKTA"`.
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['UserSchemaPropertyMasterOverridePriorityArgs']]]] master_override_priorities: Prioritized list of profile sources (required when `master` is `"OVERRIDE"`).
:param pulumi.Input[int] max_length: The maximum length of the user property value. Only applies to type `"string"`.
:param pulumi.Input[int] min_length: The minimum length of the user property value. Only applies to type `"string"`.
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['UserSchemaPropertyOneOfArgs']]]] one_ofs: Array of maps containing a mapping for display name to enum value.
:param pulumi.Input[str] pattern: The validation pattern to use for the subschema. Must be in form of '.+', or '[<pattern>]+' if present.'
:param pulumi.Input[str] permissions: Access control permissions for the property. It can be set to `"READ_WRITE"`, `"READ_ONLY"`, `"HIDE"`.
:param pulumi.Input[bool] required: Whether the property is required for this application's users.
:param pulumi.Input[str] scope: determines whether an app user attribute can be set at the Individual or Group Level.
:param pulumi.Input[str] title: display name for the enum value.
:param pulumi.Input[str] type: - Type of profile source.
:param pulumi.Input[str] unique: Whether the property should be unique. It can be set to `"UNIQUE_VALIDATED"` or `"NOT_UNIQUE"`.
:param pulumi.Input[str] user_type: User type ID
"""
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
__props__ = _UserSchemaPropertyState.__new__(_UserSchemaPropertyState)
__props__.__dict__["array_enums"] = array_enums
__props__.__dict__["array_one_ofs"] = array_one_ofs
__props__.__dict__["array_type"] = array_type
__props__.__dict__["description"] = description
__props__.__dict__["enums"] = enums
__props__.__dict__["external_name"] = external_name
__props__.__dict__["external_namespace"] = external_namespace
__props__.__dict__["index"] = index
__props__.__dict__["master"] = master
__props__.__dict__["master_override_priorities"] = master_override_priorities
__props__.__dict__["max_length"] = max_length
__props__.__dict__["min_length"] = min_length
__props__.__dict__["one_ofs"] = one_ofs
__props__.__dict__["pattern"] = pattern
__props__.__dict__["permissions"] = permissions
__props__.__dict__["required"] = required
__props__.__dict__["scope"] = scope
__props__.__dict__["title"] = title
__props__.__dict__["type"] = type
__props__.__dict__["unique"] = unique
__props__.__dict__["user_type"] = user_type
return UserSchemaProperty(resource_name, opts=opts, __props__=__props__)
@property
@pulumi.getter(name="arrayEnums")
def array_enums(self) -> pulumi.Output[Optional[Sequence[str]]]:
"""
Array of values that an array property's items can be set to.
"""
return pulumi.get(self, "array_enums")
@property
@pulumi.getter(name="arrayOneOfs")
def array_one_ofs(self) -> pulumi.Output[Optional[Sequence['outputs.UserSchemaPropertyArrayOneOf']]]:
"""
Display name and value an enum array can be set to.
"""
return pulumi.get(self, "array_one_ofs")
@property
@pulumi.getter(name="arrayType")
def array_type(self) -> pulumi.Output[Optional[str]]:
"""
The type of the array elements if `type` is set to `"array"`.
"""
return pulumi.get(self, "array_type")
@property
@pulumi.getter
def description(self) -> pulumi.Output[Optional[str]]:
"""
The description of the user schema property.
"""
return pulumi.get(self, "description")
@property
@pulumi.getter
def enums(self) -> pulumi.Output[Optional[Sequence[str]]]:
"""
Array of values a primitive property can be set to. See `array_enum` for arrays.
"""
return pulumi.get(self, "enums")
@property
@pulumi.getter(name="externalName")
def external_name(self) -> pulumi.Output[Optional[str]]:
"""
External name of the user schema property.
"""
return pulumi.get(self, "external_name")
@property
@pulumi.getter(name="externalNamespace")
def external_namespace(self) -> pulumi.Output[Optional[str]]:
"""
External name of the user schema property.
"""
return pulumi.get(self, "external_namespace")
@property
@pulumi.getter
def index(self) -> pulumi.Output[str]:
"""
The property name.
"""
return pulumi.get(self, "index")
@property
@pulumi.getter
def master(self) -> pulumi.Output[Optional[str]]:
"""
Master priority for the user schema property. It can be set to `"PROFILE_MASTER"`, `"OVERRIDE"` or `"OKTA"`.
"""
return pulumi.get(self, "master")
@property
@pulumi.getter(name="masterOverridePriorities")
def master_override_priorities(self) -> pulumi.Output[Optional[Sequence['outputs.UserSchemaPropertyMasterOverridePriority']]]:
"""
Prioritized list of profile sources (required when `master` is `"OVERRIDE"`).
"""
return pulumi.get(self, "master_override_priorities")
@property
@pulumi.getter(name="maxLength")
def max_length(self) -> pulumi.Output[Optional[int]]:
"""
The maximum length of the user property value. Only applies to type `"string"`.
"""
return pulumi.get(self, "max_length")
@property
@pulumi.getter(name="minLength")
def min_length(self) -> pulumi.Output[Optional[int]]:
"""
The minimum length of the user property value. Only applies to type `"string"`.
"""
return pulumi.get(self, "min_length")
@property
@pulumi.getter(name="oneOfs")
def one_ofs(self) -> pulumi.Output[Optional[Sequence['outputs.UserSchemaPropertyOneOf']]]:
"""
Array of maps containing a mapping for display name to enum value.
"""
return pulumi.get(self, "one_ofs")
@property
@pulumi.getter
def pattern(self) -> pulumi.Output[Optional[str]]:
"""
The validation pattern to use for the subschema. Must be in form of '.+', or '[<pattern>]+' if present.'
"""
return pulumi.get(self, "pattern")
@property
@pulumi.getter
def permissions(self) -> pulumi.Output[Optional[str]]:
"""
Access control permissions for the property. It can be set to `"READ_WRITE"`, `"READ_ONLY"`, `"HIDE"`.
"""
return pulumi.get(self, "permissions")
@property
@pulumi.getter
def required(self) -> pulumi.Output[Optional[bool]]:
"""
Whether the property is required for this application's users.
"""
return pulumi.get(self, "required")
@property
@pulumi.getter
def scope(self) -> pulumi.Output[Optional[str]]:
"""
determines whether an app user attribute can be set at the Individual or Group Level.
"""
return pulumi.get(self, "scope")
@property
@pulumi.getter
def title(self) -> pulumi.Output[str]:
"""
display name for the enum value.
"""
return pulumi.get(self, "title")
@property
@pulumi.getter
def type(self) -> pulumi.Output[str]:
"""
- Type of profile source.
"""
return pulumi.get(self, "type")
@property
@pulumi.getter
def unique(self) -> pulumi.Output[Optional[str]]:
"""
Whether the property should be unique. It can be set to `"UNIQUE_VALIDATED"` or `"NOT_UNIQUE"`.
"""
return pulumi.get(self, "unique")
@property
@pulumi.getter(name="userType")
def user_type(self) -> pulumi.Output[Optional[str]]:
"""
User type ID
"""
return pulumi.get(self, "user_type")
| 44.98185
| 223
| 0.642552
| 6,095
| 52,044
| 5.310747
| 0.03708
| 0.116222
| 0.085205
| 0.073404
| 0.939912
| 0.929253
| 0.914517
| 0.905187
| 0.901449
| 0.887578
| 0
| 0.000025
| 0.241853
| 52,044
| 1,156
| 224
| 45.020761
| 0.820336
| 0.310603
| 0
| 0.870343
| 1
| 0
| 0.106871
| 0.042712
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166915
| false
| 0.00149
| 0.010432
| 0
| 0.277198
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
62147de95581eca38deaf6136f0bd1d593d7997b
| 130
|
py
|
Python
|
ninjalooter/tests/test_window.py
|
ewjax/ninjalooter
|
9faf94eed56de3c375cca4d1be24eab20dc7b226
|
[
"MIT"
] | 4
|
2020-08-30T12:57:03.000Z
|
2022-03-18T15:11:13.000Z
|
ninjalooter/tests/test_window.py
|
ewjax/ninjalooter
|
9faf94eed56de3c375cca4d1be24eab20dc7b226
|
[
"MIT"
] | 5
|
2022-01-07T03:17:32.000Z
|
2022-03-27T21:20:12.000Z
|
ninjalooter/tests/test_window.py
|
ewjax/ninjalooter
|
9faf94eed56de3c375cca4d1be24eab20dc7b226
|
[
"MIT"
] | 1
|
2021-12-28T02:18:04.000Z
|
2021-12-28T02:18:04.000Z
|
from ninjalooter.tests import base
# TODO: placeholder class, can window be tested?
class TestWindow(base.NLTestBase):
pass
| 18.571429
| 48
| 0.769231
| 17
| 130
| 5.882353
| 0.882353
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.161538
| 130
| 6
| 49
| 21.666667
| 0.917431
| 0.353846
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 0
| 1
| 0
| true
| 0.333333
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
|
0
| 7
|
62268064cf1b1e6f9767f4512b5ca6d09b5b3d47
| 301,418
|
py
|
Python
|
Xerus/GSASII/testinp/sgtbxtestinp.py
|
pedrobcst/Xerus
|
09df088e0207176df0d20715e1c9778d09d28250
|
[
"MIT"
] | 18
|
2021-12-10T03:05:49.000Z
|
2022-03-25T15:48:35.000Z
|
Xerus/GSASII/testinp/sgtbxtestinp.py
|
pedrobcst/Xerus
|
09df088e0207176df0d20715e1c9778d09d28250
|
[
"MIT"
] | 14
|
2022-02-24T11:09:26.000Z
|
2022-03-30T07:42:17.000Z
|
Xerus/GSASII/testinp/sgtbxtestinp.py
|
pedrobcst/Xerus
|
09df088e0207176df0d20715e1c9778d09d28250
|
[
"MIT"
] | 1
|
2022-02-25T16:26:54.000Z
|
2022-02-25T16:26:54.000Z
|
# output from sgtbx computed on platform win32 on 2010-04-28
sgtbx = {
'p 2 3': [
(1.0, 0.0, 0.0, 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,
],
'p 31': [
(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0) ,
(0.0, -1.0, 0.0, 1.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.33333333333333331) ,
(-1.0, 1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.66666666666666663) ,
],
'p 32': [
(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0) ,
(0.0, -1.0, 0.0, 1.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.66666666666666663) ,
(-1.0, 1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.33333333333333331) ,
],
'r 3': [
(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0) ,
(0.0, -1.0, 0.0, 1.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0) ,
(-1.0, 1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0) ,
(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.33333333333333331, 0.66666666666666663, 0.66666666666666663) ,
(0.0, -1.0, 0.0, 1.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.33333333333333331, 0.66666666666666663, 0.66666666666666663) ,
(-1.0, 1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.33333333333333331, 0.66666666666666663, 0.66666666666666663) ,
(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.66666666666666663, 0.33333333333333331, 0.33333333333333331) ,
(0.0, -1.0, 0.0, 1.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.66666666666666663, 0.33333333333333331, 0.33333333333333331) ,
(-1.0, 1.0, 0.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, 0.0, 0.0, 0.0) ,
(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.33333333333333331, 0.66666666666666663, 0.66666666666666663) ,
(0.0, -1.0, 0.0, 1.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.33333333333333331, 0.66666666666666663, 0.66666666666666663) ,
(-1.0, 1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.33333333333333331, 0.66666666666666663, 0.66666666666666663) ,
(-1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, -1.0, 0.33333333333333331, 0.66666666666666663, 0.66666666666666663) ,
(0.0, 1.0, 0.0, -1.0, 1.0, 0.0, 0.0, 0.0, -1.0, 0.33333333333333331, 0.66666666666666663, 0.66666666666666663) ,
(1.0, -1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.33333333333333331, 0.66666666666666663, 0.66666666666666663) ,
(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.66666666666666663, 0.33333333333333331, 0.33333333333333331) ,
(0.0, -1.0, 0.0, 1.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.66666666666666663, 0.33333333333333331, 0.33333333333333331) ,
(-1.0, 1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.66666666666666663, 0.33333333333333331, 0.33333333333333331) ,
(-1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, -1.0, 0.66666666666666663, 0.33333333333333331, 0.33333333333333331) ,
(0.0, 1.0, 0.0, -1.0, 1.0, 0.0, 0.0, 0.0, -1.0, 0.66666666666666663, 0.33333333333333331, 0.33333333333333331) ,
(1.0, -1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.66666666666666663, 0.33333333333333331, 0.33333333333333331) ,
],
'r -3 r': [
(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0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, -1.0, 0.0, 0.0, 0.0) ,
(0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0) ,
],
'p 31 1 2': [
(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0) ,
(0.0, -1.0, 0.0, 1.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.33333333333333331) ,
(-1.0, 1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.66666666666666663) ,
(0.0, -1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.66666666666666663) ,
(-1.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.33333333333333331) ,
(1.0, 0.0, 0.0, 1.0, -1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0) ,
],
'p 31 2 1': [
(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0) ,
(0.0, -1.0, 0.0, 1.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.33333333333333331) ,
(-1.0, 1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.66666666666666663) ,
(1.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.66666666666666663) ,
(-1.0, 0.0, 0.0, -1.0, 1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.33333333333333331) ,
(0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0) ,
],
'p 32 1 2': [
(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0) ,
(0.0, -1.0, 0.0, 1.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.66666666666666663) ,
(-1.0, 1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.33333333333333331) ,
(0.0, -1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.33333333333333331) ,
(-1.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.66666666666666663) ,
(1.0, 0.0, 0.0, 1.0, -1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0) ,
],
'p 32 2 1': [
(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0) ,
(0.0, -1.0, 0.0, 1.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.66666666666666663) ,
(-1.0, 1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.33333333333333331) ,
(1.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.33333333333333331) ,
(-1.0, 0.0, 0.0, -1.0, 1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.66666666666666663) ,
(0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0) ,
],
'r 3 2 h': [
(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0) ,
(0.0, -1.0, 0.0, 1.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0) ,
(-1.0, 1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0) ,
(1.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0) ,
(-1.0, 0.0, 0.0, -1.0, 1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0) ,
(0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0) ,
(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.33333333333333331, 0.66666666666666663, 0.66666666666666663) ,
(0.0, -1.0, 0.0, 1.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.33333333333333331, 0.66666666666666663, 0.66666666666666663) ,
(-1.0, 1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.33333333333333331, 0.66666666666666663, 0.66666666666666663) ,
(1.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, -1.0, 0.33333333333333331, 0.66666666666666663, 0.66666666666666663) ,
(-1.0, 0.0, 0.0, -1.0, 1.0, 0.0, 0.0, 0.0, -1.0, 0.33333333333333331, 0.66666666666666663, 0.66666666666666663) ,
(0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.33333333333333331, 0.66666666666666663, 0.66666666666666663) ,
(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.66666666666666663, 0.33333333333333331, 0.33333333333333331) ,
(0.0, -1.0, 0.0, 1.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.66666666666666663, 0.33333333333333331, 0.33333333333333331) ,
(-1.0, 1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.66666666666666663, 0.33333333333333331, 0.33333333333333331) ,
(1.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, -1.0, 0.66666666666666663, 0.33333333333333331, 0.33333333333333331) ,
(-1.0, 0.0, 0.0, -1.0, 1.0, 0.0, 0.0, 0.0, -1.0, 0.66666666666666663, 0.33333333333333331, 0.33333333333333331) ,
(0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.66666666666666663, 0.33333333333333331, 0.33333333333333331) ,
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, 0.0, 1.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0) ,
(-1.0, 1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0) ,
(-1.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0) ,
(1.0, 0.0, 0.0, 1.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0) ,
(0.0, -1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0) ,
(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.33333333333333331, 0.66666666666666663, 0.66666666666666663) ,
(0.0, -1.0, 0.0, 1.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.33333333333333331, 0.66666666666666663, 0.66666666666666663) ,
(-1.0, 1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.33333333333333331, 0.66666666666666663, 0.66666666666666663) ,
(-1.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.33333333333333331, 0.66666666666666663, 0.66666666666666663) ,
(1.0, 0.0, 0.0, 1.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.33333333333333331, 0.66666666666666663, 0.66666666666666663) ,
(0.0, -1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.33333333333333331, 0.66666666666666663, 0.66666666666666663) ,
(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.66666666666666663, 0.33333333333333331, 0.33333333333333331) ,
(0.0, -1.0, 0.0, 1.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.66666666666666663, 0.33333333333333331, 0.33333333333333331) ,
(-1.0, 1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.66666666666666663, 0.33333333333333331, 0.33333333333333331) ,
(-1.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.66666666666666663, 0.33333333333333331, 0.33333333333333331) ,
(1.0, 0.0, 0.0, 1.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.66666666666666663, 0.33333333333333331, 0.33333333333333331) ,
(0.0, -1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.66666666666666663, 0.33333333333333331, 0.33333333333333331) ,
],
'r 3 m r': [
(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0) ,
(0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0) ,
(0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0) ,
(0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0) ,
(0.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0) ,
(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0) ,
],
'r 3 c': [
(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0) ,
(0.0, -1.0, 0.0, 1.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0) ,
(-1.0, 1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0) ,
(-1.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.5) ,
(1.0, 0.0, 0.0, 1.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.5) ,
(0.0, -1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.5) ,
(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.33333333333333331, 0.66666666666666663, 0.66666666666666663) ,
(0.0, -1.0, 0.0, 1.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.33333333333333331, 0.66666666666666663, 0.66666666666666663) ,
(-1.0, 1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.33333333333333331, 0.66666666666666663, 0.66666666666666663) ,
(-1.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.33333333333333331, 0.66666666666666663, 1.1666666666666667) ,
(1.0, 0.0, 0.0, 1.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.33333333333333331, 0.66666666666666663, 1.1666666666666667) ,
(0.0, -1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.33333333333333331, 0.66666666666666663, 1.1666666666666667) ,
(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.66666666666666663, 0.33333333333333331, 0.33333333333333331) ,
(0.0, -1.0, 0.0, 1.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.66666666666666663, 0.33333333333333331, 0.33333333333333331) ,
(-1.0, 1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.66666666666666663, 0.33333333333333331, 0.33333333333333331) ,
(-1.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.66666666666666663, 0.33333333333333331, 0.83333333333333337) ,
(1.0, 0.0, 0.0, 1.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.66666666666666663, 0.33333333333333331, 0.83333333333333337) ,
(0.0, -1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.66666666666666663, 0.33333333333333331, 0.83333333333333337) ,
],
'r 3 c r': [
(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0) ,
(0.0, 0.0, 1.0, 1.0, 0.0, 0.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, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0) ,
(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.33333333333333331, 0.66666666666666663, 0.66666666666666663) ,
(0.0, -1.0, 0.0, 1.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.33333333333333331, 0.66666666666666663, 0.66666666666666663) ,
(-1.0, 1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.33333333333333331, 0.66666666666666663, 0.66666666666666663) ,
(1.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, -1.0, 0.33333333333333331, 0.66666666666666663, 0.66666666666666663) ,
(-1.0, 0.0, 0.0, -1.0, 1.0, 0.0, 0.0, 0.0, -1.0, 0.33333333333333331, 0.66666666666666663, 0.66666666666666663) ,
(0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.33333333333333331, 0.66666666666666663, 0.66666666666666663) ,
(-1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, -1.0, 0.33333333333333331, 0.66666666666666663, 0.66666666666666663) ,
(0.0, 1.0, 0.0, -1.0, 1.0, 0.0, 0.0, 0.0, -1.0, 0.33333333333333331, 0.66666666666666663, 0.66666666666666663) ,
(1.0, -1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.33333333333333331, 0.66666666666666663, 0.66666666666666663) ,
(-1.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.33333333333333331, 0.66666666666666663, 0.66666666666666663) ,
(1.0, 0.0, 0.0, 1.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.33333333333333331, 0.66666666666666663, 0.66666666666666663) ,
(0.0, -1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.33333333333333331, 0.66666666666666663, 0.66666666666666663) ,
(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.66666666666666663, 0.33333333333333331, 0.33333333333333331) ,
(0.0, -1.0, 0.0, 1.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.66666666666666663, 0.33333333333333331, 0.33333333333333331) ,
(-1.0, 1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.66666666666666663, 0.33333333333333331, 0.33333333333333331) ,
(1.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, -1.0, 0.66666666666666663, 0.33333333333333331, 0.33333333333333331) ,
(-1.0, 0.0, 0.0, -1.0, 1.0, 0.0, 0.0, 0.0, -1.0, 0.66666666666666663, 0.33333333333333331, 0.33333333333333331) ,
(0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.66666666666666663, 0.33333333333333331, 0.33333333333333331) ,
(-1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, -1.0, 0.66666666666666663, 0.33333333333333331, 0.33333333333333331) ,
(0.0, 1.0, 0.0, -1.0, 1.0, 0.0, 0.0, 0.0, -1.0, 0.66666666666666663, 0.33333333333333331, 0.33333333333333331) ,
(1.0, -1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.66666666666666663, 0.33333333333333331, 0.33333333333333331) ,
(-1.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.66666666666666663, 0.33333333333333331, 0.33333333333333331) ,
(1.0, 0.0, 0.0, 1.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.66666666666666663, 0.33333333333333331, 0.33333333333333331) ,
(0.0, -1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.66666666666666663, 0.33333333333333331, 0.33333333333333331) ,
],
'r -3 m r': [
(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0) ,
(0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 0.0, 1.0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-1.0, 0.0, 0.0, 0.5) ,
(-1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0) ,
(0.0, 1.0, 0.0, -1.0, 1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0) ,
(1.0, -1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0) ,
(-1.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, -0.5) ,
(1.0, 0.0, 0.0, 1.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, -0.5) ,
(0.0, -1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, -0.5) ,
(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.33333333333333331, 0.66666666666666663, 0.66666666666666663) ,
(0.0, -1.0, 0.0, 1.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.33333333333333331, 0.66666666666666663, 0.66666666666666663) ,
(-1.0, 1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.33333333333333331, 0.66666666666666663, 0.66666666666666663) ,
(1.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, -1.0, 0.33333333333333331, 0.66666666666666663, 1.1666666666666667) ,
(-1.0, 0.0, 0.0, -1.0, 1.0, 0.0, 0.0, 0.0, -1.0, 0.33333333333333331, 0.66666666666666663, 1.1666666666666667) ,
(0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.33333333333333331, 0.66666666666666663, 1.1666666666666667) ,
(-1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, -1.0, 0.33333333333333331, 0.66666666666666663, 0.66666666666666663) ,
(0.0, 1.0, 0.0, -1.0, 1.0, 0.0, 0.0, 0.0, -1.0, 0.33333333333333331, 0.66666666666666663, 0.66666666666666663) ,
(1.0, -1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.33333333333333331, 0.66666666666666663, 0.66666666666666663) ,
(-1.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.33333333333333331, 0.66666666666666663, 0.16666666666666666) ,
(1.0, 0.0, 0.0, 1.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.33333333333333331, 0.66666666666666663, 0.16666666666666666) ,
(0.0, -1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.33333333333333331, 0.66666666666666663, 0.16666666666666666) ,
(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.66666666666666663, 0.33333333333333331, 0.33333333333333331) ,
(0.0, -1.0, 0.0, 1.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.66666666666666663, 0.33333333333333331, 0.33333333333333331) ,
(-1.0, 1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.66666666666666663, 0.33333333333333331, 0.33333333333333331) ,
(1.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, -1.0, 0.66666666666666663, 0.33333333333333331, 0.83333333333333337) ,
(-1.0, 0.0, 0.0, -1.0, 1.0, 0.0, 0.0, 0.0, -1.0, 0.66666666666666663, 0.33333333333333331, 0.83333333333333337) ,
(0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.66666666666666663, 0.33333333333333331, 0.83333333333333337) ,
(-1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, -1.0, 0.66666666666666663, 0.33333333333333331, 0.33333333333333331) ,
(0.0, 1.0, 0.0, -1.0, 1.0, 0.0, 0.0, 0.0, -1.0, 0.66666666666666663, 0.33333333333333331, 0.33333333333333331) ,
(1.0, -1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.66666666666666663, 0.33333333333333331, 0.33333333333333331) ,
(-1.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.66666666666666663, 0.33333333333333331, -0.16666666666666666) ,
(1.0, 0.0, 0.0, 1.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.66666666666666663, 0.33333333333333331, -0.16666666666666666) ,
(0.0, -1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.66666666666666663, 0.33333333333333331, -0.16666666666666666) ,
],
'r -3 c r': [
(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0) ,
(0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0) ,
(0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0) ,
(0.0, -1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.5, 0.5, 0.5) ,
(0.0, 0.0, -1.0, 0.0, -1.0, 0.0, -1.0, 0.0, 0.0, 0.5, 0.5, 0.5) ,
(-1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, -1.0, 0.0, 0.5, 0.5, 0.5) ,
(-1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0) ,
(0.0, 0.0, -1.0, -1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0) ,
(0.0, -1.0, 0.0, 0.0, 0.0, -1.0, -1.0, 0.0, 0.0, 0.0, 0.0, 0.0) ,
(0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, -0.5, -0.5, -0.5) ,
(0.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 0.0, -0.5, -0.5, -0.5) ,
(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 1.0, 0.0, -0.5, -0.5, -0.5) ,
],
'p 6': [
(1.0, 0.0,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.0, 1.0, 0.0, 0.0, 0.66666666666666663) ,
(-1.0, 1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.33333333333333331) ,
(-1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.5) ,
],
'p 62': [
(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0) ,
(1.0, -1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.33333333333333331) ,
(0.0, 1.0, 0.0, -1.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.66666666666666663) ,
(0.0, -1.0, 0.0, 1.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.66666666666666663) ,
(-1.0, 1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.33333333333333331) ,
(-1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0) ,
],
'p 64': [
(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0) ,
(1.0, -1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.66666666666666663) ,
(0.0, 1.0, 0.0, -1.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.33333333333333331) ,
(0.0, -1.0, 0.0, 1.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.33333333333333331) ,
(-1.0, 1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.66666666666666663) ,
(-1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0) ,
],
'p 63': [
(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.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0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0) ,
(1.0, -1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.16666666666666666) ,
(0.0, 1.0, 0.0, -1.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.83333333333333337) ,
(0.0, -1.0, 0.0, 1.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.33333333333333331) ,
(-1.0, 1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.66666666666666663) ,
(1.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0) ,
(-1.0, 0.0, 0.0, -1.0, 1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.66666666666666663) ,
(-1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.5) ,
(0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.33333333333333331) ,
(0.0, -1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.83333333333333337) ,
(-1.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.5) ,
(1.0, 0.0, 0.0, 1.0, -1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.16666666666666666) ,
],
'p 65 2 2': [
(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0) ,
(1.0, -1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.83333333333333337) ,
(0.0, 1.0, 0.0, -1.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.16666666666666666) ,
(0.0, -1.0, 0.0, 1.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.66666666666666663) ,
(-1.0, 1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.33333333333333331) ,
(1.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0) ,
(-1.0, 0.0, 0.0, -1.0, 1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.33333333333333331) ,
(-1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.5) ,
(0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.66666666666666663) ,
(0.0, -1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.16666666666666666) ,
(-1.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.5) ,
(1.0, 0.0, 0.0, 1.0, -1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.83333333333333337) ,
],
'p 62 2 2': [
(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0) ,
(1.0, -1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.33333333333333331) ,
(0.0, 1.0, 0.0, -1.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.66666666666666663) ,
(0.0, -1.0, 0.0, 1.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.66666666666666663) ,
(-1.0, 1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.33333333333333331) ,
(1.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0) ,
(-1.0, 0.0, 0.0, -1.0, 1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.33333333333333331) ,
(-1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0) ,
(0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.66666666666666663) ,
(0.0, -1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.66666666666666663) ,
(-1.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0) ,
(1.0, 0.0, 0.0, 1.0, -1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.33333333333333331) ,
],
'p 64 2 2': [
(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0) ,
(1.0, -1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.66666666666666663) ,
(0.0, 1.0, 0.0, -1.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.33333333333333331) ,
(0.0, -1.0, 0.0, 1.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.33333333333333331) ,
(-1.0, 1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.66666666666666663) ,
(1.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0) ,
(-1.0, 0.0, 0.0, -1.0, 1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.66666666666666663) ,
(-1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0) ,
(0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.33333333333333331) ,
(0.0, -1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, -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 0.0) ,
(1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, -1.0, 0.5, 0.0, 0.0) ,
],
'p 1 21 1': [
(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0) ,
(-1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.5, 0.0) ,
],
'p 1 1 21': [
(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0) ,
(-1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.5) ,
],
}
| 57.898194
| 113
| 0.38501
| 108,473
| 301,418
| 1.069842
| 0.000424
| 1.172195
| 1.375229
| 1.400719
| 0.999087
| 0.999
| 0.998931
| 0.998854
| 0.998802
| 0.998759
| 0
| 0.477896
| 0.198578
| 301,418
| 5,205
| 114
| 57.909318
| 0.002513
| 0.000192
| 0
| 0.867043
| 0
| 0
| 0.005578
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| null | 1
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 13
|
6595cb055058b2e4b73b255bf554fdf72cb13b67
| 175
|
py
|
Python
|
enformer_pytorch/__init__.py
|
simonlevine/enformer-pytorch
|
342915c3f9385f5f24ee4d1d9965d126d49ca279
|
[
"MIT"
] | null | null | null |
enformer_pytorch/__init__.py
|
simonlevine/enformer-pytorch
|
342915c3f9385f5f24ee4d1d9965d126d49ca279
|
[
"MIT"
] | null | null | null |
enformer_pytorch/__init__.py
|
simonlevine/enformer-pytorch
|
342915c3f9385f5f24ee4d1d9965d126d49ca279
|
[
"MIT"
] | null | null | null |
from enformer_pytorch.enformer_pytorch import Enformer, SEQUENCE_LENGTH, AttentionPool, seq_indices_to_one_hot
from enformer_pytorch.model_loader import load_pretrained_model
| 58.333333
| 110
| 0.908571
| 24
| 175
| 6.166667
| 0.666667
| 0.304054
| 0.256757
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.062857
| 175
| 2
| 111
| 87.5
| 0.902439
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 7
|
65e8075642f053ea2750baf226488468847ab1e6
| 142
|
py
|
Python
|
src/petronia/defimpl/logging/console/__init__.py
|
groboclown/petronia
|
486338023d19cee989e92f0c5692680f1a37811f
|
[
"MIT"
] | 19
|
2017-06-21T10:28:24.000Z
|
2021-12-31T11:49:28.000Z
|
src/petronia/defimpl/logging/console/__init__.py
|
groboclown/petronia
|
486338023d19cee989e92f0c5692680f1a37811f
|
[
"MIT"
] | 10
|
2016-11-11T18:57:57.000Z
|
2021-02-01T15:33:43.000Z
|
src/petronia/defimpl/logging/console/__init__.py
|
groboclown/petronia
|
486338023d19cee989e92f0c5692680f1a37811f
|
[
"MIT"
] | 3
|
2017-09-17T03:29:35.000Z
|
2019-06-03T10:43:08.000Z
|
"""
Console-based logging.
"""
from .bootstrap import bootstrap_console_logger as start_extension
from .bootstrap import EXTENSION_METADATA
| 17.75
| 66
| 0.816901
| 17
| 142
| 6.588235
| 0.647059
| 0.232143
| 0.339286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.112676
| 142
| 7
| 67
| 20.285714
| 0.888889
| 0.15493
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 7
|
b84dc414bf1edde155b248980f10a2eda37a869c
| 291
|
py
|
Python
|
tripod/util/__init__.py
|
amaarora/tripod
|
bf749da8f223aa208befc398f461549001833ff4
|
[
"Apache-2.0"
] | null | null | null |
tripod/util/__init__.py
|
amaarora/tripod
|
bf749da8f223aa208befc398f461549001833ff4
|
[
"Apache-2.0"
] | null | null | null |
tripod/util/__init__.py
|
amaarora/tripod
|
bf749da8f223aa208befc398f461549001833ff4
|
[
"Apache-2.0"
] | null | null | null |
# ------------------------------------------------------------------------
# Modified from DETR (https://github.com/facebookresearch/detr)
# and UP-DETR (https://github.com/dddzg/up-detr)
# Copyright 2021 Aman Arora
# ------------------------------------------------------------------------
| 48.5
| 74
| 0.364261
| 21
| 291
| 5.047619
| 0.666667
| 0.169811
| 0.283019
| 0.339623
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.014652
| 0.061856
| 291
| 5
| 75
| 58.2
| 0.373626
| 0.962199
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
b861f52e61e7c5f547ed5628da88f14c366cf1b9
| 5,091
|
py
|
Python
|
EEG_Lightning/tools/process_predict_task_2.py
|
mcd4874/NeurIPS_competition
|
4df1f222929e9824a55c9c4ae6634743391b0fe9
|
[
"MIT"
] | 23
|
2021-10-14T02:31:06.000Z
|
2022-01-25T16:26:44.000Z
|
EEG_Lightning/tools/process_predict_task_2.py
|
mcd4874/NeurIPS_competition
|
4df1f222929e9824a55c9c4ae6634743391b0fe9
|
[
"MIT"
] | null | null | null |
EEG_Lightning/tools/process_predict_task_2.py
|
mcd4874/NeurIPS_competition
|
4df1f222929e9824a55c9c4ae6634743391b0fe9
|
[
"MIT"
] | 1
|
2022-03-05T06:54:11.000Z
|
2022-03-05T06:54:11.000Z
|
import numpy as np
import pandas as pd
import os
# exp="\\task_2_final_2\\LA_EA\\tune_filter\\2"
# # exp=""
# model_path = "C:\\wduong_folder\Dassl.pytorch-master\\NeurIPS_competition\\EEG_Lightning\\NeurIPS_2{}\\no_aug\\no_norm\\mcdV1".format(exp)
#
# #task 2 final 2
# dataset_A_0_result_path = model_path+"\\dataset_A_0\model\\predict_folder"
# dataset_A_1_result_path = model_path+"\\dataset_A_1\model\\predict_folder"
# dataset_A_2_result_path = model_path+"\\dataset_A_2\model\\predict_folder"
# #
# #
# dataset_B_0_result_path = model_path+"\\dataset_B_0\model\\predict_folder"
# dataset_B_1_result_path = model_path+"\\dataset_B_1\model\\predict_folder"
# # case="compare_against_vernon"
#
# case="task_2_final_20"
# exp="\\LA_EA\\tune_filter\\3"
# # exp=""
# model_path = "C:\\wduong_folder\Dassl.pytorch-master\\NeurIPS_competition\\EEG_Lightning\\NeurIPS_4{}\\no_aug\\no_norm\\mcdV1".format(exp)
#
# #task 2 final 2
# dataset_A_0_result_path = model_path+"\\dataset_A_0\model\\predict_folder"
# dataset_A_1_result_path = model_path+"\\dataset_A_1\model\\predict_folder"
# dataset_A_2_result_path = model_path+"\\dataset_A_2\model\\predict_folder"
# #
# #
# dataset_B_0_result_path = model_path+"\\dataset_B_0\model\\predict_folder"
# dataset_B_1_result_path = model_path+"\\dataset_B_1\model\\predict_folder"
# # case="compare_against_vernon"
#
# case="task_2_final_21"
# exp="\\LA_EA\\tune_filter\\5"
# # exp=""
# model_path = "C:\\wduong_folder\Dassl.pytorch-master\\NeurIPS_competition\\EEG_Lightning\\NeurIPS_4{}\\no_aug\\no_norm\\mcdV1".format(exp)
#
# #task 2 final 2
# dataset_A_0_result_path = model_path+"\\dataset_A_0\model\\predict_folder"
# dataset_A_1_result_path = model_path+"\\dataset_A_1\model\\predict_folder"
# dataset_A_2_result_path = model_path+"\\dataset_A_2\model\\predict_folder"
# #
# #
# dataset_B_0_result_path = model_path+"\\dataset_B_0\model\\predict_folder"
# dataset_B_1_result_path = model_path+"\\dataset_B_1\model\\predict_folder"
# # case="compare_against_vernon"
#
# case="task_2_final_22"
# exp="\\filterbank\\best"
# # exp=""
# model_path = "C:\\wduong_folder\Dassl.pytorch-master\\NeurIPS_competition\\EEG_Lightning\\NeurIPS_4{}\\no_aug\\no_norm\\mcdV1".format(exp)
#
# #task 2 final 2
# dataset_A_0_result_path = model_path+"\\dataset_A_0\model\\predict_folder"
# dataset_A_1_result_path = model_path+"\\dataset_A_1\model\\predict_folder"
# dataset_A_2_result_path = model_path+"\\dataset_A_2\model\\predict_folder"
# #
# #
# dataset_B_0_result_path = model_path+"\\dataset_B_0\model\\predict_folder"
# dataset_B_1_result_path = model_path+"\\dataset_B_1\model\\predict_folder"
# # case="compare_against_vernon"
#
# case="task_2_final_24"
# exp="\\best_extend_last"
# # exp=""
# model_path = "C:\\wduong_folder\Dassl.pytorch-master\\NeurIPS_competition\\EEG_Lightning\\NeurIPS_4{}\\no_aug\\no_norm\\mcdV1".format(exp)
#
# #task 2 final 2
# dataset_A_0_result_path = model_path+"\\dataset_A_0\model\\predict_folder"
# dataset_A_1_result_path = model_path+"\\dataset_A_1\model\\predict_folder"
# dataset_A_2_result_path = model_path+"\\dataset_A_2\model\\predict_folder"
# #
# #
# dataset_B_0_result_path = model_path+"\\dataset_B_0\model\\predict_folder"
# dataset_B_1_result_path = model_path+"\\dataset_B_1\model\\predict_folder"
# # case="compare_against_vernon"
#
# case="task_2_final_26"
exp="\\no_fmin_ex"
# exp=""
model_path = "C:\\wduong_folder\Dassl.pytorch-master\\NeurIPS_competition\\EEG_Lightning\\NeurIPS_5{}\\no_aug\\no_norm\\mcdV1".format(exp)
#task 2 final 2
dataset_A_0_result_path = model_path+"\\dataset_A_0\model\\predict_folder"
dataset_A_1_result_path = model_path+"\\dataset_A_1\model\\predict_folder"
dataset_A_2_result_path = model_path+"\\dataset_A_2\model\\predict_folder"
#
#
dataset_B_0_result_path = model_path+"\\dataset_B_0\model\\predict_folder"
dataset_B_1_result_path = model_path+"\\dataset_B_1\model\\predict_folder"
# case="compare_against_vernon"
case="task_2_final_27"
file = "pred_MI_label.txt"
pred_A_0 = np.loadtxt(os.path.join(dataset_A_0_result_path, file), delimiter=',')
pred_A_1 = np.loadtxt(os.path.join(dataset_A_1_result_path, file), delimiter=',')
pred_A_2 = np.loadtxt(os.path.join(dataset_A_2_result_path, file), delimiter=',')
pred_B_0 = np.loadtxt(os.path.join(dataset_B_0_result_path, file), delimiter=',')
pred_B_1 = np.loadtxt(os.path.join(dataset_B_1_result_path, file), delimiter=',')
pred_A = np.concatenate([pred_A_0,pred_A_1,pred_A_2])
pred_B = np.concatenate([pred_B_0,pred_B_1])
final_pred = np.concatenate([pred_A,pred_B])
answer_folder = os.path.join("util",case)
if not os.path.exists(answer_folder):
os.makedirs(answer_folder)
path = os.path.join(answer_folder,"answer.txt")
np.savetxt(path,final_pred,delimiter=',',fmt="%d")
def count(label,name=""):
count_0 = len(np.where(label == 0)[0])
count_1 = len(np.where(label == 1)[0])
count_2 = len(np.where(label == 2)[0])
print("dataset {}, has {} label 0, {} label 1, and {} label 2".format(name,count_0,count_1,count_2))
count(pred_A,"dataset A")
count(pred_B,"dataset B")
| 36.891304
| 140
| 0.758986
| 844
| 5,091
| 4.122038
| 0.099526
| 0.09198
| 0.129348
| 0.16384
| 0.836447
| 0.822363
| 0.797643
| 0.741018
| 0.741018
| 0.741018
| 0
| 0.029161
| 0.077195
| 5,091
| 137
| 141
| 37.160584
| 0.711367
| 0.622864
| 0
| 0
| 0
| 0.03125
| 0.234289
| 0.157663
| 0
| 0
| 0
| 0
| 0
| 1
| 0.03125
| false
| 0
| 0.09375
| 0
| 0.125
| 0.03125
| 0
| 0
| 0
| null | 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
b88580536c76ee65dd86fbba0d3f65c1b2e3372a
| 39,715
|
py
|
Python
|
python/sbp/linux.py
|
Patrick-Luo-THR/libsbp
|
d42e4a1e3cedf6a82b1d993b82e0da148401f80d
|
[
"MIT"
] | 65
|
2015-03-25T10:28:10.000Z
|
2022-02-24T12:36:49.000Z
|
python/sbp/linux.py
|
Patrick-Luo-THR/libsbp
|
d42e4a1e3cedf6a82b1d993b82e0da148401f80d
|
[
"MIT"
] | 654
|
2015-03-24T17:43:55.000Z
|
2022-03-31T21:42:49.000Z
|
python/sbp/linux.py
|
Patrick-Luo-THR/libsbp
|
d42e4a1e3cedf6a82b1d993b82e0da148401f80d
|
[
"MIT"
] | 110
|
2015-03-24T17:38:35.000Z
|
2022-03-21T02:05:19.000Z
|
#!/usr/bin/env python
# Copyright (C) 2015-2021 Swift Navigation Inc.
# Contact: https://support.swiftnav.com
#
# This source is subject to the license found in the file 'LICENSE' which must
# be be distributed together with this source. All other rights reserved.
#
# THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
# EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
"""
Linux state monitoring.
"""
import json
import construct
from sbp.msg import SBP, SENDER_ID
from sbp.utils import fmt_repr, exclude_fields, walk_json_dict, containerize
# Automatically generated from piksi/yaml/swiftnav/sbp/linux.yaml with generate.py.
# Please do not hand edit!
SBP_MSG_LINUX_CPU_STATE_DEP_A = 0x7F00
class MsgLinuxCpuStateDepA(SBP):
"""SBP class for message MSG_LINUX_CPU_STATE_DEP_A (0x7F00).
You can have MSG_LINUX_CPU_STATE_DEP_A inherit its fields directly
from an inherited SBP object, or construct it inline using a dict
of its fields.
This message indicates the process state of the top 10 heaviest consumers of
CPU on the system.
Parameters
----------
sbp : SBP
SBP parent object to inherit from.
index : int
sequence of this status message, values from 0-9
pid : int
the PID of the process
pcpu : int
percent of cpu used, expressed as a fraction of 256
tname : string
fixed length string representing the thread name
cmdline : string
the command line (as much as it fits in the remaining packet)
sender : int
Optional sender ID, defaults to SENDER_ID (see sbp/msg.py).
"""
_parser = construct.Struct(
'index' / construct.Int8ul,
'pid' / construct.Int16ul,
'pcpu' / construct.Int8ul,
'tname'/ construct.Bytes(15),
'cmdline' / construct.GreedyBytes,)
__slots__ = [
'index',
'pid',
'pcpu',
'tname',
'cmdline',
]
def __init__(self, sbp=None, **kwargs):
if sbp:
super( MsgLinuxCpuStateDepA,
self).__init__(sbp.msg_type, sbp.sender, sbp.length,
sbp.payload, sbp.crc)
self.from_binary(sbp.payload)
else:
super( MsgLinuxCpuStateDepA, self).__init__()
self.msg_type = SBP_MSG_LINUX_CPU_STATE_DEP_A
self.sender = kwargs.pop('sender', SENDER_ID)
self.index = kwargs.pop('index')
self.pid = kwargs.pop('pid')
self.pcpu = kwargs.pop('pcpu')
self.tname = kwargs.pop('tname')
self.cmdline = kwargs.pop('cmdline')
def __repr__(self):
return fmt_repr(self)
@staticmethod
def from_json(s):
"""Given a JSON-encoded string s, build a message object.
"""
d = json.loads(s)
return MsgLinuxCpuStateDepA.from_json_dict(d)
@staticmethod
def from_json_dict(d):
sbp = SBP.from_json_dict(d)
return MsgLinuxCpuStateDepA(sbp, **d)
def from_binary(self, d):
"""Given a binary payload d, update the appropriate payload fields of
the message.
"""
p = MsgLinuxCpuStateDepA._parser.parse(d)
for n in self.__class__.__slots__:
setattr(self, n, getattr(p, n))
def to_binary(self):
"""Produce a framed/packed SBP message.
"""
c = containerize(exclude_fields(self))
self.payload = MsgLinuxCpuStateDepA._parser.build(c)
return self.pack()
def into_buffer(self, buf, offset):
"""Produce a framed/packed SBP message into the provided buffer and offset.
"""
self.payload = containerize(exclude_fields(self))
self.parser = MsgLinuxCpuStateDepA._parser
self.stream_payload.reset(buf, offset)
return self.pack_into(buf, offset, self._build_payload)
def to_json_dict(self):
self.to_binary()
d = super( MsgLinuxCpuStateDepA, self).to_json_dict()
j = walk_json_dict(exclude_fields(self))
d.update(j)
return d
SBP_MSG_LINUX_MEM_STATE_DEP_A = 0x7F01
class MsgLinuxMemStateDepA(SBP):
"""SBP class for message MSG_LINUX_MEM_STATE_DEP_A (0x7F01).
You can have MSG_LINUX_MEM_STATE_DEP_A inherit its fields directly
from an inherited SBP object, or construct it inline using a dict
of its fields.
This message indicates the process state of the top 10 heaviest consumers of
memory on the system.
Parameters
----------
sbp : SBP
SBP parent object to inherit from.
index : int
sequence of this status message, values from 0-9
pid : int
the PID of the process
pmem : int
percent of memory used, expressed as a fraction of 256
tname : string
fixed length string representing the thread name
cmdline : string
the command line (as much as it fits in the remaining packet)
sender : int
Optional sender ID, defaults to SENDER_ID (see sbp/msg.py).
"""
_parser = construct.Struct(
'index' / construct.Int8ul,
'pid' / construct.Int16ul,
'pmem' / construct.Int8ul,
'tname'/ construct.Bytes(15),
'cmdline' / construct.GreedyBytes,)
__slots__ = [
'index',
'pid',
'pmem',
'tname',
'cmdline',
]
def __init__(self, sbp=None, **kwargs):
if sbp:
super( MsgLinuxMemStateDepA,
self).__init__(sbp.msg_type, sbp.sender, sbp.length,
sbp.payload, sbp.crc)
self.from_binary(sbp.payload)
else:
super( MsgLinuxMemStateDepA, self).__init__()
self.msg_type = SBP_MSG_LINUX_MEM_STATE_DEP_A
self.sender = kwargs.pop('sender', SENDER_ID)
self.index = kwargs.pop('index')
self.pid = kwargs.pop('pid')
self.pmem = kwargs.pop('pmem')
self.tname = kwargs.pop('tname')
self.cmdline = kwargs.pop('cmdline')
def __repr__(self):
return fmt_repr(self)
@staticmethod
def from_json(s):
"""Given a JSON-encoded string s, build a message object.
"""
d = json.loads(s)
return MsgLinuxMemStateDepA.from_json_dict(d)
@staticmethod
def from_json_dict(d):
sbp = SBP.from_json_dict(d)
return MsgLinuxMemStateDepA(sbp, **d)
def from_binary(self, d):
"""Given a binary payload d, update the appropriate payload fields of
the message.
"""
p = MsgLinuxMemStateDepA._parser.parse(d)
for n in self.__class__.__slots__:
setattr(self, n, getattr(p, n))
def to_binary(self):
"""Produce a framed/packed SBP message.
"""
c = containerize(exclude_fields(self))
self.payload = MsgLinuxMemStateDepA._parser.build(c)
return self.pack()
def into_buffer(self, buf, offset):
"""Produce a framed/packed SBP message into the provided buffer and offset.
"""
self.payload = containerize(exclude_fields(self))
self.parser = MsgLinuxMemStateDepA._parser
self.stream_payload.reset(buf, offset)
return self.pack_into(buf, offset, self._build_payload)
def to_json_dict(self):
self.to_binary()
d = super( MsgLinuxMemStateDepA, self).to_json_dict()
j = walk_json_dict(exclude_fields(self))
d.update(j)
return d
SBP_MSG_LINUX_SYS_STATE_DEP_A = 0x7F02
class MsgLinuxSysStateDepA(SBP):
"""SBP class for message MSG_LINUX_SYS_STATE_DEP_A (0x7F02).
You can have MSG_LINUX_SYS_STATE_DEP_A inherit its fields directly
from an inherited SBP object, or construct it inline using a dict
of its fields.
This presents a summary of CPU and memory utilization.
Parameters
----------
sbp : SBP
SBP parent object to inherit from.
mem_total : int
total system memory
pcpu : int
percent of total cpu currently utilized
pmem : int
percent of total memory currently utilized
procs_starting : int
number of processes that started during collection phase
procs_stopping : int
number of processes that stopped during collection phase
pid_count : int
the count of processes on the system
sender : int
Optional sender ID, defaults to SENDER_ID (see sbp/msg.py).
"""
_parser = construct.Struct(
'mem_total' / construct.Int16ul,
'pcpu' / construct.Int8ul,
'pmem' / construct.Int8ul,
'procs_starting' / construct.Int16ul,
'procs_stopping' / construct.Int16ul,
'pid_count' / construct.Int16ul,)
__slots__ = [
'mem_total',
'pcpu',
'pmem',
'procs_starting',
'procs_stopping',
'pid_count',
]
def __init__(self, sbp=None, **kwargs):
if sbp:
super( MsgLinuxSysStateDepA,
self).__init__(sbp.msg_type, sbp.sender, sbp.length,
sbp.payload, sbp.crc)
self.from_binary(sbp.payload)
else:
super( MsgLinuxSysStateDepA, self).__init__()
self.msg_type = SBP_MSG_LINUX_SYS_STATE_DEP_A
self.sender = kwargs.pop('sender', SENDER_ID)
self.mem_total = kwargs.pop('mem_total')
self.pcpu = kwargs.pop('pcpu')
self.pmem = kwargs.pop('pmem')
self.procs_starting = kwargs.pop('procs_starting')
self.procs_stopping = kwargs.pop('procs_stopping')
self.pid_count = kwargs.pop('pid_count')
def __repr__(self):
return fmt_repr(self)
@staticmethod
def from_json(s):
"""Given a JSON-encoded string s, build a message object.
"""
d = json.loads(s)
return MsgLinuxSysStateDepA.from_json_dict(d)
@staticmethod
def from_json_dict(d):
sbp = SBP.from_json_dict(d)
return MsgLinuxSysStateDepA(sbp, **d)
def from_binary(self, d):
"""Given a binary payload d, update the appropriate payload fields of
the message.
"""
p = MsgLinuxSysStateDepA._parser.parse(d)
for n in self.__class__.__slots__:
setattr(self, n, getattr(p, n))
def to_binary(self):
"""Produce a framed/packed SBP message.
"""
c = containerize(exclude_fields(self))
self.payload = MsgLinuxSysStateDepA._parser.build(c)
return self.pack()
def into_buffer(self, buf, offset):
"""Produce a framed/packed SBP message into the provided buffer and offset.
"""
self.payload = containerize(exclude_fields(self))
self.parser = MsgLinuxSysStateDepA._parser
self.stream_payload.reset(buf, offset)
return self.pack_into(buf, offset, self._build_payload)
def to_json_dict(self):
self.to_binary()
d = super( MsgLinuxSysStateDepA, self).to_json_dict()
j = walk_json_dict(exclude_fields(self))
d.update(j)
return d
SBP_MSG_LINUX_PROCESS_SOCKET_COUNTS = 0x7F03
class MsgLinuxProcessSocketCounts(SBP):
"""SBP class for message MSG_LINUX_PROCESS_SOCKET_COUNTS (0x7F03).
You can have MSG_LINUX_PROCESS_SOCKET_COUNTS inherit its fields directly
from an inherited SBP object, or construct it inline using a dict
of its fields.
Top 10 list of processes with high socket counts.
Parameters
----------
sbp : SBP
SBP parent object to inherit from.
index : int
sequence of this status message, values from 0-9
pid : int
the PID of the process in question
socket_count : int
the number of sockets the process is using
socket_types : int
A bitfield indicating the socket types used: 0x1 (tcp), 0x2 (udp), 0x4
(unix stream), 0x8 (unix dgram), 0x10 (netlink), and 0x8000 (unknown)
socket_states : int
A bitfield indicating the socket states: 0x1 (established), 0x2 (syn-
sent), 0x4 (syn-recv), 0x8 (fin-wait-1), 0x10 (fin-wait-2), 0x20 (time-
wait), 0x40 (closed), 0x80 (close-wait), 0x100 (last-ack), 0x200 (listen),
0x400 (closing), 0x800 (unconnected), and 0x8000 (unknown)
cmdline : string
the command line of the process in question
sender : int
Optional sender ID, defaults to SENDER_ID (see sbp/msg.py).
"""
_parser = construct.Struct(
'index' / construct.Int8ul,
'pid' / construct.Int16ul,
'socket_count' / construct.Int16ul,
'socket_types' / construct.Int16ul,
'socket_states' / construct.Int16ul,
'cmdline' / construct.GreedyBytes,)
__slots__ = [
'index',
'pid',
'socket_count',
'socket_types',
'socket_states',
'cmdline',
]
def __init__(self, sbp=None, **kwargs):
if sbp:
super( MsgLinuxProcessSocketCounts,
self).__init__(sbp.msg_type, sbp.sender, sbp.length,
sbp.payload, sbp.crc)
self.from_binary(sbp.payload)
else:
super( MsgLinuxProcessSocketCounts, self).__init__()
self.msg_type = SBP_MSG_LINUX_PROCESS_SOCKET_COUNTS
self.sender = kwargs.pop('sender', SENDER_ID)
self.index = kwargs.pop('index')
self.pid = kwargs.pop('pid')
self.socket_count = kwargs.pop('socket_count')
self.socket_types = kwargs.pop('socket_types')
self.socket_states = kwargs.pop('socket_states')
self.cmdline = kwargs.pop('cmdline')
def __repr__(self):
return fmt_repr(self)
@staticmethod
def from_json(s):
"""Given a JSON-encoded string s, build a message object.
"""
d = json.loads(s)
return MsgLinuxProcessSocketCounts.from_json_dict(d)
@staticmethod
def from_json_dict(d):
sbp = SBP.from_json_dict(d)
return MsgLinuxProcessSocketCounts(sbp, **d)
def from_binary(self, d):
"""Given a binary payload d, update the appropriate payload fields of
the message.
"""
p = MsgLinuxProcessSocketCounts._parser.parse(d)
for n in self.__class__.__slots__:
setattr(self, n, getattr(p, n))
def to_binary(self):
"""Produce a framed/packed SBP message.
"""
c = containerize(exclude_fields(self))
self.payload = MsgLinuxProcessSocketCounts._parser.build(c)
return self.pack()
def into_buffer(self, buf, offset):
"""Produce a framed/packed SBP message into the provided buffer and offset.
"""
self.payload = containerize(exclude_fields(self))
self.parser = MsgLinuxProcessSocketCounts._parser
self.stream_payload.reset(buf, offset)
return self.pack_into(buf, offset, self._build_payload)
def to_json_dict(self):
self.to_binary()
d = super( MsgLinuxProcessSocketCounts, self).to_json_dict()
j = walk_json_dict(exclude_fields(self))
d.update(j)
return d
SBP_MSG_LINUX_PROCESS_SOCKET_QUEUES = 0x7F04
class MsgLinuxProcessSocketQueues(SBP):
"""SBP class for message MSG_LINUX_PROCESS_SOCKET_QUEUES (0x7F04).
You can have MSG_LINUX_PROCESS_SOCKET_QUEUES inherit its fields directly
from an inherited SBP object, or construct it inline using a dict
of its fields.
Top 10 list of sockets with deep queues.
Parameters
----------
sbp : SBP
SBP parent object to inherit from.
index : int
sequence of this status message, values from 0-9
pid : int
the PID of the process in question
recv_queued : int
the total amount of receive data queued for this process
send_queued : int
the total amount of send data queued for this process
socket_types : int
A bitfield indicating the socket types used: 0x1 (tcp), 0x2 (udp), 0x4
(unix stream), 0x8 (unix dgram), 0x10 (netlink), and 0x8000 (unknown)
socket_states : int
A bitfield indicating the socket states: 0x1 (established), 0x2 (syn-
sent), 0x4 (syn-recv), 0x8 (fin-wait-1), 0x10 (fin-wait-2), 0x20 (time-
wait), 0x40 (closed), 0x80 (close-wait), 0x100 (last-ack), 0x200 (listen),
0x400 (closing), 0x800 (unconnected), and 0x8000 (unknown)
address_of_largest : string
Address of the largest queue, remote or local depending on the
directionality of the connection.
cmdline : string
the command line of the process in question
sender : int
Optional sender ID, defaults to SENDER_ID (see sbp/msg.py).
"""
_parser = construct.Struct(
'index' / construct.Int8ul,
'pid' / construct.Int16ul,
'recv_queued' / construct.Int16ul,
'send_queued' / construct.Int16ul,
'socket_types' / construct.Int16ul,
'socket_states' / construct.Int16ul,
'address_of_largest'/ construct.Bytes(64),
'cmdline' / construct.GreedyBytes,)
__slots__ = [
'index',
'pid',
'recv_queued',
'send_queued',
'socket_types',
'socket_states',
'address_of_largest',
'cmdline',
]
def __init__(self, sbp=None, **kwargs):
if sbp:
super( MsgLinuxProcessSocketQueues,
self).__init__(sbp.msg_type, sbp.sender, sbp.length,
sbp.payload, sbp.crc)
self.from_binary(sbp.payload)
else:
super( MsgLinuxProcessSocketQueues, self).__init__()
self.msg_type = SBP_MSG_LINUX_PROCESS_SOCKET_QUEUES
self.sender = kwargs.pop('sender', SENDER_ID)
self.index = kwargs.pop('index')
self.pid = kwargs.pop('pid')
self.recv_queued = kwargs.pop('recv_queued')
self.send_queued = kwargs.pop('send_queued')
self.socket_types = kwargs.pop('socket_types')
self.socket_states = kwargs.pop('socket_states')
self.address_of_largest = kwargs.pop('address_of_largest')
self.cmdline = kwargs.pop('cmdline')
def __repr__(self):
return fmt_repr(self)
@staticmethod
def from_json(s):
"""Given a JSON-encoded string s, build a message object.
"""
d = json.loads(s)
return MsgLinuxProcessSocketQueues.from_json_dict(d)
@staticmethod
def from_json_dict(d):
sbp = SBP.from_json_dict(d)
return MsgLinuxProcessSocketQueues(sbp, **d)
def from_binary(self, d):
"""Given a binary payload d, update the appropriate payload fields of
the message.
"""
p = MsgLinuxProcessSocketQueues._parser.parse(d)
for n in self.__class__.__slots__:
setattr(self, n, getattr(p, n))
def to_binary(self):
"""Produce a framed/packed SBP message.
"""
c = containerize(exclude_fields(self))
self.payload = MsgLinuxProcessSocketQueues._parser.build(c)
return self.pack()
def into_buffer(self, buf, offset):
"""Produce a framed/packed SBP message into the provided buffer and offset.
"""
self.payload = containerize(exclude_fields(self))
self.parser = MsgLinuxProcessSocketQueues._parser
self.stream_payload.reset(buf, offset)
return self.pack_into(buf, offset, self._build_payload)
def to_json_dict(self):
self.to_binary()
d = super( MsgLinuxProcessSocketQueues, self).to_json_dict()
j = walk_json_dict(exclude_fields(self))
d.update(j)
return d
SBP_MSG_LINUX_SOCKET_USAGE = 0x7F05
class MsgLinuxSocketUsage(SBP):
"""SBP class for message MSG_LINUX_SOCKET_USAGE (0x7F05).
You can have MSG_LINUX_SOCKET_USAGE inherit its fields directly
from an inherited SBP object, or construct it inline using a dict
of its fields.
Summaries the socket usage across the system.
Parameters
----------
sbp : SBP
SBP parent object to inherit from.
avg_queue_depth : int
average socket queue depths across all sockets on the system
max_queue_depth : int
the max queue depth seen within the reporting period
socket_state_counts : array
A count for each socket type reported in the `socket_types_reported`
field, the first entry corresponds to the first enabled bit in
`types_reported`.
socket_type_counts : array
A count for each socket type reported in the `socket_types_reported`
field, the first entry corresponds to the first enabled bit in
`types_reported`.
sender : int
Optional sender ID, defaults to SENDER_ID (see sbp/msg.py).
"""
_parser = construct.Struct(
'avg_queue_depth' / construct.Int32ul,
'max_queue_depth' / construct.Int32ul,
'socket_state_counts' / construct.Array(16, construct.Int16ul),
'socket_type_counts' / construct.Array(16, construct.Int16ul),)
__slots__ = [
'avg_queue_depth',
'max_queue_depth',
'socket_state_counts',
'socket_type_counts',
]
def __init__(self, sbp=None, **kwargs):
if sbp:
super( MsgLinuxSocketUsage,
self).__init__(sbp.msg_type, sbp.sender, sbp.length,
sbp.payload, sbp.crc)
self.from_binary(sbp.payload)
else:
super( MsgLinuxSocketUsage, self).__init__()
self.msg_type = SBP_MSG_LINUX_SOCKET_USAGE
self.sender = kwargs.pop('sender', SENDER_ID)
self.avg_queue_depth = kwargs.pop('avg_queue_depth')
self.max_queue_depth = kwargs.pop('max_queue_depth')
self.socket_state_counts = kwargs.pop('socket_state_counts')
self.socket_type_counts = kwargs.pop('socket_type_counts')
def __repr__(self):
return fmt_repr(self)
@staticmethod
def from_json(s):
"""Given a JSON-encoded string s, build a message object.
"""
d = json.loads(s)
return MsgLinuxSocketUsage.from_json_dict(d)
@staticmethod
def from_json_dict(d):
sbp = SBP.from_json_dict(d)
return MsgLinuxSocketUsage(sbp, **d)
def from_binary(self, d):
"""Given a binary payload d, update the appropriate payload fields of
the message.
"""
p = MsgLinuxSocketUsage._parser.parse(d)
for n in self.__class__.__slots__:
setattr(self, n, getattr(p, n))
def to_binary(self):
"""Produce a framed/packed SBP message.
"""
c = containerize(exclude_fields(self))
self.payload = MsgLinuxSocketUsage._parser.build(c)
return self.pack()
def into_buffer(self, buf, offset):
"""Produce a framed/packed SBP message into the provided buffer and offset.
"""
self.payload = containerize(exclude_fields(self))
self.parser = MsgLinuxSocketUsage._parser
self.stream_payload.reset(buf, offset)
return self.pack_into(buf, offset, self._build_payload)
def to_json_dict(self):
self.to_binary()
d = super( MsgLinuxSocketUsage, self).to_json_dict()
j = walk_json_dict(exclude_fields(self))
d.update(j)
return d
SBP_MSG_LINUX_PROCESS_FD_COUNT = 0x7F06
class MsgLinuxProcessFdCount(SBP):
"""SBP class for message MSG_LINUX_PROCESS_FD_COUNT (0x7F06).
You can have MSG_LINUX_PROCESS_FD_COUNT inherit its fields directly
from an inherited SBP object, or construct it inline using a dict
of its fields.
Top 10 list of processes with a large number of open file descriptors.
Parameters
----------
sbp : SBP
SBP parent object to inherit from.
index : int
sequence of this status message, values from 0-9
pid : int
the PID of the process in question
fd_count : int
a count of the number of file descriptors opened by the process
cmdline : string
the command line of the process in question
sender : int
Optional sender ID, defaults to SENDER_ID (see sbp/msg.py).
"""
_parser = construct.Struct(
'index' / construct.Int8ul,
'pid' / construct.Int16ul,
'fd_count' / construct.Int16ul,
'cmdline' / construct.GreedyBytes,)
__slots__ = [
'index',
'pid',
'fd_count',
'cmdline',
]
def __init__(self, sbp=None, **kwargs):
if sbp:
super( MsgLinuxProcessFdCount,
self).__init__(sbp.msg_type, sbp.sender, sbp.length,
sbp.payload, sbp.crc)
self.from_binary(sbp.payload)
else:
super( MsgLinuxProcessFdCount, self).__init__()
self.msg_type = SBP_MSG_LINUX_PROCESS_FD_COUNT
self.sender = kwargs.pop('sender', SENDER_ID)
self.index = kwargs.pop('index')
self.pid = kwargs.pop('pid')
self.fd_count = kwargs.pop('fd_count')
self.cmdline = kwargs.pop('cmdline')
def __repr__(self):
return fmt_repr(self)
@staticmethod
def from_json(s):
"""Given a JSON-encoded string s, build a message object.
"""
d = json.loads(s)
return MsgLinuxProcessFdCount.from_json_dict(d)
@staticmethod
def from_json_dict(d):
sbp = SBP.from_json_dict(d)
return MsgLinuxProcessFdCount(sbp, **d)
def from_binary(self, d):
"""Given a binary payload d, update the appropriate payload fields of
the message.
"""
p = MsgLinuxProcessFdCount._parser.parse(d)
for n in self.__class__.__slots__:
setattr(self, n, getattr(p, n))
def to_binary(self):
"""Produce a framed/packed SBP message.
"""
c = containerize(exclude_fields(self))
self.payload = MsgLinuxProcessFdCount._parser.build(c)
return self.pack()
def into_buffer(self, buf, offset):
"""Produce a framed/packed SBP message into the provided buffer and offset.
"""
self.payload = containerize(exclude_fields(self))
self.parser = MsgLinuxProcessFdCount._parser
self.stream_payload.reset(buf, offset)
return self.pack_into(buf, offset, self._build_payload)
def to_json_dict(self):
self.to_binary()
d = super( MsgLinuxProcessFdCount, self).to_json_dict()
j = walk_json_dict(exclude_fields(self))
d.update(j)
return d
SBP_MSG_LINUX_PROCESS_FD_SUMMARY = 0x7F07
class MsgLinuxProcessFdSummary(SBP):
r"""SBP class for message MSG_LINUX_PROCESS_FD_SUMMARY (0x7F07).
You can have MSG_LINUX_PROCESS_FD_SUMMARY inherit its fields directly
from an inherited SBP object, or construct it inline using a dict
of its fields.
Summary of open file descriptors on the system.
Parameters
----------
sbp : SBP
SBP parent object to inherit from.
sys_fd_count : int
count of total FDs open on the system
most_opened : string
A null delimited list of strings which alternates between a string
representation of the process count and the file name whose count it being
reported. That is, in C string syntax
"32\0/var/log/syslog\012\0/tmp/foo\0" with the end of the list being 2
NULL terminators in a row.
sender : int
Optional sender ID, defaults to SENDER_ID (see sbp/msg.py).
"""
_parser = construct.Struct(
'sys_fd_count' / construct.Int32ul,
'most_opened' / construct.GreedyBytes,)
__slots__ = [
'sys_fd_count',
'most_opened',
]
def __init__(self, sbp=None, **kwargs):
if sbp:
super( MsgLinuxProcessFdSummary,
self).__init__(sbp.msg_type, sbp.sender, sbp.length,
sbp.payload, sbp.crc)
self.from_binary(sbp.payload)
else:
super( MsgLinuxProcessFdSummary, self).__init__()
self.msg_type = SBP_MSG_LINUX_PROCESS_FD_SUMMARY
self.sender = kwargs.pop('sender', SENDER_ID)
self.sys_fd_count = kwargs.pop('sys_fd_count')
self.most_opened = kwargs.pop('most_opened')
def __repr__(self):
return fmt_repr(self)
@staticmethod
def from_json(s):
"""Given a JSON-encoded string s, build a message object.
"""
d = json.loads(s)
return MsgLinuxProcessFdSummary.from_json_dict(d)
@staticmethod
def from_json_dict(d):
sbp = SBP.from_json_dict(d)
return MsgLinuxProcessFdSummary(sbp, **d)
def from_binary(self, d):
"""Given a binary payload d, update the appropriate payload fields of
the message.
"""
p = MsgLinuxProcessFdSummary._parser.parse(d)
for n in self.__class__.__slots__:
setattr(self, n, getattr(p, n))
def to_binary(self):
"""Produce a framed/packed SBP message.
"""
c = containerize(exclude_fields(self))
self.payload = MsgLinuxProcessFdSummary._parser.build(c)
return self.pack()
def into_buffer(self, buf, offset):
"""Produce a framed/packed SBP message into the provided buffer and offset.
"""
self.payload = containerize(exclude_fields(self))
self.parser = MsgLinuxProcessFdSummary._parser
self.stream_payload.reset(buf, offset)
return self.pack_into(buf, offset, self._build_payload)
def to_json_dict(self):
self.to_binary()
d = super( MsgLinuxProcessFdSummary, self).to_json_dict()
j = walk_json_dict(exclude_fields(self))
d.update(j)
return d
SBP_MSG_LINUX_CPU_STATE = 0x7F08
class MsgLinuxCpuState(SBP):
"""SBP class for message MSG_LINUX_CPU_STATE (0x7F08).
You can have MSG_LINUX_CPU_STATE inherit its fields directly
from an inherited SBP object, or construct it inline using a dict
of its fields.
This message indicates the process state of the top 10 heaviest consumers of
CPU on the system, including a timestamp.
Parameters
----------
sbp : SBP
SBP parent object to inherit from.
index : int
sequence of this status message, values from 0-9
pid : int
the PID of the process
pcpu : int
percent of CPU used, expressed as a fraction of 256
time : int
timestamp of message, refer to flags field for how to interpret
flags : int
flags
tname : string
fixed length string representing the thread name
cmdline : string
the command line (as much as it fits in the remaining packet)
sender : int
Optional sender ID, defaults to SENDER_ID (see sbp/msg.py).
"""
_parser = construct.Struct(
'index' / construct.Int8ul,
'pid' / construct.Int16ul,
'pcpu' / construct.Int8ul,
'time' / construct.Int32ul,
'flags' / construct.Int8ul,
'tname'/ construct.Bytes(15),
'cmdline' / construct.GreedyBytes,)
__slots__ = [
'index',
'pid',
'pcpu',
'time',
'flags',
'tname',
'cmdline',
]
def __init__(self, sbp=None, **kwargs):
if sbp:
super( MsgLinuxCpuState,
self).__init__(sbp.msg_type, sbp.sender, sbp.length,
sbp.payload, sbp.crc)
self.from_binary(sbp.payload)
else:
super( MsgLinuxCpuState, self).__init__()
self.msg_type = SBP_MSG_LINUX_CPU_STATE
self.sender = kwargs.pop('sender', SENDER_ID)
self.index = kwargs.pop('index')
self.pid = kwargs.pop('pid')
self.pcpu = kwargs.pop('pcpu')
self.time = kwargs.pop('time')
self.flags = kwargs.pop('flags')
self.tname = kwargs.pop('tname')
self.cmdline = kwargs.pop('cmdline')
def __repr__(self):
return fmt_repr(self)
@staticmethod
def from_json(s):
"""Given a JSON-encoded string s, build a message object.
"""
d = json.loads(s)
return MsgLinuxCpuState.from_json_dict(d)
@staticmethod
def from_json_dict(d):
sbp = SBP.from_json_dict(d)
return MsgLinuxCpuState(sbp, **d)
def from_binary(self, d):
"""Given a binary payload d, update the appropriate payload fields of
the message.
"""
p = MsgLinuxCpuState._parser.parse(d)
for n in self.__class__.__slots__:
setattr(self, n, getattr(p, n))
def to_binary(self):
"""Produce a framed/packed SBP message.
"""
c = containerize(exclude_fields(self))
self.payload = MsgLinuxCpuState._parser.build(c)
return self.pack()
def into_buffer(self, buf, offset):
"""Produce a framed/packed SBP message into the provided buffer and offset.
"""
self.payload = containerize(exclude_fields(self))
self.parser = MsgLinuxCpuState._parser
self.stream_payload.reset(buf, offset)
return self.pack_into(buf, offset, self._build_payload)
def to_json_dict(self):
self.to_binary()
d = super( MsgLinuxCpuState, self).to_json_dict()
j = walk_json_dict(exclude_fields(self))
d.update(j)
return d
SBP_MSG_LINUX_MEM_STATE = 0x7F09
class MsgLinuxMemState(SBP):
"""SBP class for message MSG_LINUX_MEM_STATE (0x7F09).
You can have MSG_LINUX_MEM_STATE inherit its fields directly
from an inherited SBP object, or construct it inline using a dict
of its fields.
This message indicates the process state of the top 10 heaviest consumers of
memory on the system, including a timestamp.
Parameters
----------
sbp : SBP
SBP parent object to inherit from.
index : int
sequence of this status message, values from 0-9
pid : int
the PID of the process
pmem : int
percent of memory used, expressed as a fraction of 256
time : int
timestamp of message, refer to flags field for how to interpret
flags : int
flags
tname : string
fixed length string representing the thread name
cmdline : string
the command line (as much as it fits in the remaining packet)
sender : int
Optional sender ID, defaults to SENDER_ID (see sbp/msg.py).
"""
_parser = construct.Struct(
'index' / construct.Int8ul,
'pid' / construct.Int16ul,
'pmem' / construct.Int8ul,
'time' / construct.Int32ul,
'flags' / construct.Int8ul,
'tname'/ construct.Bytes(15),
'cmdline' / construct.GreedyBytes,)
__slots__ = [
'index',
'pid',
'pmem',
'time',
'flags',
'tname',
'cmdline',
]
def __init__(self, sbp=None, **kwargs):
if sbp:
super( MsgLinuxMemState,
self).__init__(sbp.msg_type, sbp.sender, sbp.length,
sbp.payload, sbp.crc)
self.from_binary(sbp.payload)
else:
super( MsgLinuxMemState, self).__init__()
self.msg_type = SBP_MSG_LINUX_MEM_STATE
self.sender = kwargs.pop('sender', SENDER_ID)
self.index = kwargs.pop('index')
self.pid = kwargs.pop('pid')
self.pmem = kwargs.pop('pmem')
self.time = kwargs.pop('time')
self.flags = kwargs.pop('flags')
self.tname = kwargs.pop('tname')
self.cmdline = kwargs.pop('cmdline')
def __repr__(self):
return fmt_repr(self)
@staticmethod
def from_json(s):
"""Given a JSON-encoded string s, build a message object.
"""
d = json.loads(s)
return MsgLinuxMemState.from_json_dict(d)
@staticmethod
def from_json_dict(d):
sbp = SBP.from_json_dict(d)
return MsgLinuxMemState(sbp, **d)
def from_binary(self, d):
"""Given a binary payload d, update the appropriate payload fields of
the message.
"""
p = MsgLinuxMemState._parser.parse(d)
for n in self.__class__.__slots__:
setattr(self, n, getattr(p, n))
def to_binary(self):
"""Produce a framed/packed SBP message.
"""
c = containerize(exclude_fields(self))
self.payload = MsgLinuxMemState._parser.build(c)
return self.pack()
def into_buffer(self, buf, offset):
"""Produce a framed/packed SBP message into the provided buffer and offset.
"""
self.payload = containerize(exclude_fields(self))
self.parser = MsgLinuxMemState._parser
self.stream_payload.reset(buf, offset)
return self.pack_into(buf, offset, self._build_payload)
def to_json_dict(self):
self.to_binary()
d = super( MsgLinuxMemState, self).to_json_dict()
j = walk_json_dict(exclude_fields(self))
d.update(j)
return d
SBP_MSG_LINUX_SYS_STATE = 0x7F0A
class MsgLinuxSysState(SBP):
"""SBP class for message MSG_LINUX_SYS_STATE (0x7F0A).
You can have MSG_LINUX_SYS_STATE inherit its fields directly
from an inherited SBP object, or construct it inline using a dict
of its fields.
This presents a summary of CPU and memory utilization, including a
timestamp.
Parameters
----------
sbp : SBP
SBP parent object to inherit from.
mem_total : int
total system memory, in MiB
pcpu : int
percent of CPU used, expressed as a fraction of 256
pmem : int
percent of memory used, expressed as a fraction of 256
procs_starting : int
number of processes that started during collection phase
procs_stopping : int
number of processes that stopped during collection phase
pid_count : int
the count of processes on the system
time : int
timestamp of message, refer to flags field for how to interpret
flags : int
flags
sender : int
Optional sender ID, defaults to SENDER_ID (see sbp/msg.py).
"""
_parser = construct.Struct(
'mem_total' / construct.Int16ul,
'pcpu' / construct.Int8ul,
'pmem' / construct.Int8ul,
'procs_starting' / construct.Int16ul,
'procs_stopping' / construct.Int16ul,
'pid_count' / construct.Int16ul,
'time' / construct.Int32ul,
'flags' / construct.Int8ul,)
__slots__ = [
'mem_total',
'pcpu',
'pmem',
'procs_starting',
'procs_stopping',
'pid_count',
'time',
'flags',
]
def __init__(self, sbp=None, **kwargs):
if sbp:
super( MsgLinuxSysState,
self).__init__(sbp.msg_type, sbp.sender, sbp.length,
sbp.payload, sbp.crc)
self.from_binary(sbp.payload)
else:
super( MsgLinuxSysState, self).__init__()
self.msg_type = SBP_MSG_LINUX_SYS_STATE
self.sender = kwargs.pop('sender', SENDER_ID)
self.mem_total = kwargs.pop('mem_total')
self.pcpu = kwargs.pop('pcpu')
self.pmem = kwargs.pop('pmem')
self.procs_starting = kwargs.pop('procs_starting')
self.procs_stopping = kwargs.pop('procs_stopping')
self.pid_count = kwargs.pop('pid_count')
self.time = kwargs.pop('time')
self.flags = kwargs.pop('flags')
def __repr__(self):
return fmt_repr(self)
@staticmethod
def from_json(s):
"""Given a JSON-encoded string s, build a message object.
"""
d = json.loads(s)
return MsgLinuxSysState.from_json_dict(d)
@staticmethod
def from_json_dict(d):
sbp = SBP.from_json_dict(d)
return MsgLinuxSysState(sbp, **d)
def from_binary(self, d):
"""Given a binary payload d, update the appropriate payload fields of
the message.
"""
p = MsgLinuxSysState._parser.parse(d)
for n in self.__class__.__slots__:
setattr(self, n, getattr(p, n))
def to_binary(self):
"""Produce a framed/packed SBP message.
"""
c = containerize(exclude_fields(self))
self.payload = MsgLinuxSysState._parser.build(c)
return self.pack()
def into_buffer(self, buf, offset):
"""Produce a framed/packed SBP message into the provided buffer and offset.
"""
self.payload = containerize(exclude_fields(self))
self.parser = MsgLinuxSysState._parser
self.stream_payload.reset(buf, offset)
return self.pack_into(buf, offset, self._build_payload)
def to_json_dict(self):
self.to_binary()
d = super( MsgLinuxSysState, self).to_json_dict()
j = walk_json_dict(exclude_fields(self))
d.update(j)
return d
msg_classes = {
0x7F00: MsgLinuxCpuStateDepA,
0x7F01: MsgLinuxMemStateDepA,
0x7F02: MsgLinuxSysStateDepA,
0x7F03: MsgLinuxProcessSocketCounts,
0x7F04: MsgLinuxProcessSocketQueues,
0x7F05: MsgLinuxSocketUsage,
0x7F06: MsgLinuxProcessFdCount,
0x7F07: MsgLinuxProcessFdSummary,
0x7F08: MsgLinuxCpuState,
0x7F09: MsgLinuxMemState,
0x7F0A: MsgLinuxSysState,
}
| 30.620663
| 83
| 0.653229
| 5,086
| 39,715
| 4.897759
| 0.069996
| 0.026375
| 0.015897
| 0.017222
| 0.811481
| 0.804295
| 0.791208
| 0.777158
| 0.766198
| 0.748454
| 0
| 0.01357
| 0.250384
| 39,715
| 1,297
| 84
| 30.620663
| 0.82315
| 0.334231
| 0
| 0.729651
| 0
| 0
| 0.05868
| 0
| 0
| 0
| 0.005185
| 0
| 0
| 1
| 0.127907
| false
| 0
| 0.005814
| 0.015988
| 0.277616
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
b89529cbe5faa624ee8598783e6fd793786469b4
| 819
|
py
|
Python
|
tests/parser/bug.18.test.py
|
veltri/DLV2
|
944aaef803aa75e7ec51d7e0c2b0d964687fdd0e
|
[
"Apache-2.0"
] | null | null | null |
tests/parser/bug.18.test.py
|
veltri/DLV2
|
944aaef803aa75e7ec51d7e0c2b0d964687fdd0e
|
[
"Apache-2.0"
] | null | null | null |
tests/parser/bug.18.test.py
|
veltri/DLV2
|
944aaef803aa75e7ec51d7e0c2b0d964687fdd0e
|
[
"Apache-2.0"
] | null | null | null |
input = """
bad :- r1, r2.
bad :- g1, g2.
bad :- b1, b2.
bad :- r2, r3.
bad :- g2, g3.
bad :- b2, b3.
bad :- r3, r1.
bad :- g3, g1.
bad :- b3, b1.
r1 :- not g1, not b1.
g1 :- not b1, not r1.
b1 :- not r1, not g1.
r2 :- not g2, not b2.
g2 :- not b2, not r2.
b2 :- not r2, not g2.
r3 :- not g3, not b3.
g3 :- not b3, not r3.
b3 :- not r3, not g3.
a :- bad, not a.
true.
r1 :- true.
"""
output = """
bad :- r1, r2.
bad :- g1, g2.
bad :- b1, b2.
bad :- r2, r3.
bad :- g2, g3.
bad :- b2, b3.
bad :- r3, r1.
bad :- g3, g1.
bad :- b3, b1.
r1 :- not g1, not b1.
g1 :- not b1, not r1.
b1 :- not r1, not g1.
r2 :- not g2, not b2.
g2 :- not b2, not r2.
b2 :- not r2, not g2.
r3 :- not g3, not b3.
g3 :- not b3, not r3.
b3 :- not r3, not g3.
a :- bad, not a.
true.
r1 :- true.
"""
| 16.058824
| 22
| 0.474969
| 160
| 819
| 2.43125
| 0.09375
| 0.051414
| 0.071979
| 0.051414
| 0.971722
| 0.971722
| 0.971722
| 0.971722
| 0.971722
| 0.971722
| 0
| 0.16341
| 0.312576
| 819
| 50
| 23
| 16.38
| 0.527531
| 0
| 0
| 0.956522
| 0
| 0
| 0.959897
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
b2486aa105c4a83cab57bb59c9abccf8057036be
| 23,370
|
py
|
Python
|
pyspedas/cluster/__init__.py
|
ergsc-devel/pyspedas
|
43d985cbcd23c54205453b06e08f8e51d29ab435
|
[
"MIT"
] | 75
|
2019-02-22T12:59:33.000Z
|
2022-02-26T15:33:20.000Z
|
pyspedas/cluster/__init__.py
|
ergsc-devel/pyspedas
|
43d985cbcd23c54205453b06e08f8e51d29ab435
|
[
"MIT"
] | 40
|
2019-07-02T07:46:34.000Z
|
2022-02-23T21:48:50.000Z
|
pyspedas/cluster/__init__.py
|
ergsc-devel/pyspedas
|
43d985cbcd23c54205453b06e08f8e51d29ab435
|
[
"MIT"
] | 43
|
2019-02-22T13:03:41.000Z
|
2022-01-24T19:26:59.000Z
|
from .load import load
def fgm(trange=['2018-11-5', '2018-11-6'],
probe='1',
datatype='up',
suffix='',
get_support_data=False,
varformat=None,
varnames=[],
downloadonly=False,
notplot=False,
no_update=False,
time_clip=False):
"""
This function loads data from the Fluxgate Magnetometer
Parameters:
trange : list of str
time range of interest [starttime, endtime] with the format
'YYYY-MM-DD','YYYY-MM-DD'] or to specify more or less than a day
['YYYY-MM-DD/hh:mm:ss','YYYY-MM-DD/hh:mm:ss']
datatype: str
Data type; Valid options:
suffix: str
The tplot variable names will be given this suffix. By default,
no suffix is added.
get_support_data: bool
Data with an attribute "VAR_TYPE" with a value of "support_data"
will be loaded into tplot. By default, only loads in data with a
"VAR_TYPE" attribute of "data".
varformat: str
The file variable formats to load into tplot. Wildcard character
"*" is accepted. By default, all variables are loaded in.
varnames: list of str
List of variable names to load (if not specified,
all data variables are loaded)
downloadonly: bool
Set this flag to download the CDF files, but not load them into
tplot variables
notplot: bool
Return the data in hash tables instead of creating tplot variables
no_update: bool
If set, only load data from your local cache
time_clip: bool
Time clip the variables to exactly the range specified in the trange keyword
Returns:
List of tplot variables created.
"""
return load(instrument='fgm', trange=trange, probe=probe, datatype=datatype, suffix=suffix, get_support_data=get_support_data, varformat=varformat, varnames=varnames, downloadonly=downloadonly, notplot=notplot, no_update=no_update, time_clip=time_clip)
def aspoc(trange=['2018-11-5', '2018-11-6'],
probe='1',
datatype='pp',
suffix='',
get_support_data=False,
varformat=None,
varnames=[],
downloadonly=False,
notplot=False,
no_update=False,
time_clip=False):
"""
This function loads data from the Active Spacecraft Potential Control experiment
Parameters:
trange : list of str
time range of interest [starttime, endtime] with the format
'YYYY-MM-DD','YYYY-MM-DD'] or to specify more or less than a day
['YYYY-MM-DD/hh:mm:ss','YYYY-MM-DD/hh:mm:ss']
datatype: str
Data type; Valid options:
suffix: str
The tplot variable names will be given this suffix. By default,
no suffix is added.
get_support_data: bool
Data with an attribute "VAR_TYPE" with a value of "support_data"
will be loaded into tplot. By default, only loads in data with a
"VAR_TYPE" attribute of "data".
varformat: str
The file variable formats to load into tplot. Wildcard character
"*" is accepted. By default, all variables are loaded in.
varnames: list of str
List of variable names to load (if not specified,
all data variables are loaded)
downloadonly: bool
Set this flag to download the CDF files, but not load them into
tplot variables
notplot: bool
Return the data in hash tables instead of creating tplot variables
no_update: bool
If set, only load data from your local cache
time_clip: bool
Time clip the variables to exactly the range specified in the trange keyword
Returns:
List of tplot variables created.
"""
return load(instrument='aspoc', trange=trange, probe=probe, datatype=datatype, suffix=suffix, get_support_data=get_support_data, varformat=varformat, varnames=varnames, downloadonly=downloadonly, notplot=notplot, no_update=no_update, time_clip=time_clip)
def cis(trange=['2018-11-5', '2018-11-6'],
probe='1',
datatype='pp',
suffix='',
get_support_data=False,
varformat=None,
varnames=[],
downloadonly=False,
notplot=False,
no_update=False,
time_clip=False):
"""
This function loads data from the Cluster Ion Spectroscopy experiment
Parameters:
trange : list of str
time range of interest [starttime, endtime] with the format
'YYYY-MM-DD','YYYY-MM-DD'] or to specify more or less than a day
['YYYY-MM-DD/hh:mm:ss','YYYY-MM-DD/hh:mm:ss']
datatype: str
Data type; Valid options:
suffix: str
The tplot variable names will be given this suffix. By default,
no suffix is added.
get_support_data: bool
Data with an attribute "VAR_TYPE" with a value of "support_data"
will be loaded into tplot. By default, only loads in data with a
"VAR_TYPE" attribute of "data".
varformat: str
The file variable formats to load into tplot. Wildcard character
"*" is accepted. By default, all variables are loaded in.
varnames: list of str
List of variable names to load (if not specified,
all data variables are loaded)
downloadonly: bool
Set this flag to download the CDF files, but not load them into
tplot variables
notplot: bool
Return the data in hash tables instead of creating tplot variables
no_update: bool
If set, only load data from your local cache
time_clip: bool
Time clip the variables to exactly the range specified in the trange keyword
Returns:
List of tplot variables created.
"""
return load(instrument='cis', trange=trange, probe=probe, datatype=datatype, suffix=suffix, get_support_data=get_support_data, varformat=varformat, varnames=varnames, downloadonly=downloadonly, notplot=notplot, no_update=no_update, time_clip=time_clip)
def dwp(trange=['2018-11-5', '2018-11-6'],
probe='1',
datatype='pp',
suffix='',
get_support_data=False,
varformat=None,
varnames=[],
downloadonly=False,
notplot=False,
no_update=False,
time_clip=False):
"""
This function loads data from the Digital Wave Processing instrument
Parameters:
trange : list of str
time range of interest [starttime, endtime] with the format
'YYYY-MM-DD','YYYY-MM-DD'] or to specify more or less than a day
['YYYY-MM-DD/hh:mm:ss','YYYY-MM-DD/hh:mm:ss']
datatype: str
Data type; Valid options:
suffix: str
The tplot variable names will be given this suffix. By default,
no suffix is added.
get_support_data: bool
Data with an attribute "VAR_TYPE" with a value of "support_data"
will be loaded into tplot. By default, only loads in data with a
"VAR_TYPE" attribute of "data".
varformat: str
The file variable formats to load into tplot. Wildcard character
"*" is accepted. By default, all variables are loaded in.
varnames: list of str
List of variable names to load (if not specified,
all data variables are loaded)
downloadonly: bool
Set this flag to download the CDF files, but not load them into
tplot variables
notplot: bool
Return the data in hash tables instead of creating tplot variables
no_update: bool
If set, only load data from your local cache
time_clip: bool
Time clip the variables to exactly the range specified in the trange keyword
Returns:
List of tplot variables created.
"""
return load(instrument='dwp', trange=trange, probe=probe, datatype=datatype, suffix=suffix, get_support_data=get_support_data, varformat=varformat, varnames=varnames, downloadonly=downloadonly, notplot=notplot, no_update=no_update, time_clip=time_clip)
def edi(trange=['2018-11-5', '2018-11-6'],
probe='1',
datatype='pp',
suffix='',
get_support_data=False,
varformat=None,
varnames=[],
downloadonly=False,
notplot=False,
no_update=False,
time_clip=False):
"""
This function loads data from the Electron Drift Instrument
Parameters:
trange : list of str
time range of interest [starttime, endtime] with the format
'YYYY-MM-DD','YYYY-MM-DD'] or to specify more or less than a day
['YYYY-MM-DD/hh:mm:ss','YYYY-MM-DD/hh:mm:ss']
datatype: str
Data type; Valid options:
suffix: str
The tplot variable names will be given this suffix. By default,
no suffix is added.
get_support_data: bool
Data with an attribute "VAR_TYPE" with a value of "support_data"
will be loaded into tplot. By default, only loads in data with a
"VAR_TYPE" attribute of "data".
varformat: str
The file variable formats to load into tplot. Wildcard character
"*" is accepted. By default, all variables are loaded in.
varnames: list of str
List of variable names to load (if not specified,
all data variables are loaded)
downloadonly: bool
Set this flag to download the CDF files, but not load them into
tplot variables
notplot: bool
Return the data in hash tables instead of creating tplot variables
no_update: bool
If set, only load data from your local cache
time_clip: bool
Time clip the variables to exactly the range specified in the trange keyword
Returns:
List of tplot variables created.
"""
return load(instrument='edi', trange=trange, probe=probe, datatype=datatype, suffix=suffix, get_support_data=get_support_data, varformat=varformat, varnames=varnames, downloadonly=downloadonly, notplot=notplot, no_update=no_update, time_clip=time_clip)
def efw(trange=['2018-11-5', '2018-11-6'],
probe='1',
datatype='pp',
suffix='',
get_support_data=False,
varformat=None,
varnames=[],
downloadonly=False,
notplot=False,
no_update=False,
time_clip=False):
"""
This function loads data from the Electric Field and Wave experiment
Parameters:
trange : list of str
time range of interest [starttime, endtime] with the format
'YYYY-MM-DD','YYYY-MM-DD'] or to specify more or less than a day
['YYYY-MM-DD/hh:mm:ss','YYYY-MM-DD/hh:mm:ss']
datatype: str
Data type; Valid options:
suffix: str
The tplot variable names will be given this suffix. By default,
no suffix is added.
get_support_data: bool
Data with an attribute "VAR_TYPE" with a value of "support_data"
will be loaded into tplot. By default, only loads in data with a
"VAR_TYPE" attribute of "data".
varformat: str
The file variable formats to load into tplot. Wildcard character
"*" is accepted. By default, all variables are loaded in.
varnames: list of str
List of variable names to load (if not specified,
all data variables are loaded)
downloadonly: bool
Set this flag to download the CDF files, but not load them into
tplot variables
notplot: bool
Return the data in hash tables instead of creating tplot variables
no_update: bool
If set, only load data from your local cache
time_clip: bool
Time clip the variables to exactly the range specified in the trange keyword
Returns:
List of tplot variables created.
"""
return load(instrument='efw', trange=trange, probe=probe, datatype=datatype, suffix=suffix, get_support_data=get_support_data, varformat=varformat, varnames=varnames, downloadonly=downloadonly, notplot=notplot, no_update=no_update, time_clip=time_clip)
def peace(trange=['2016-11-5', '2016-11-6'],
probe='1',
datatype='pp',
suffix='',
get_support_data=False,
varformat=None,
varnames=[],
downloadonly=False,
notplot=False,
no_update=False,
time_clip=False):
"""
This function loads data from the Plasma Electron and Current Experiment
Parameters:
trange : list of str
time range of interest [starttime, endtime] with the format
'YYYY-MM-DD','YYYY-MM-DD'] or to specify more or less than a day
['YYYY-MM-DD/hh:mm:ss','YYYY-MM-DD/hh:mm:ss']
datatype: str
Data type; Valid options:
suffix: str
The tplot variable names will be given this suffix. By default,
no suffix is added.
get_support_data: bool
Data with an attribute "VAR_TYPE" with a value of "support_data"
will be loaded into tplot. By default, only loads in data with a
"VAR_TYPE" attribute of "data".
varformat: str
The file variable formats to load into tplot. Wildcard character
"*" is accepted. By default, all variables are loaded in.
varnames: list of str
List of variable names to load (if not specified,
all data variables are loaded)
downloadonly: bool
Set this flag to download the CDF files, but not load them into
tplot variables
notplot: bool
Return the data in hash tables instead of creating tplot variables
no_update: bool
If set, only load data from your local cache
time_clip: bool
Time clip the variables to exactly the range specified in the trange keyword
Returns:
List of tplot variables created.
"""
return load(instrument='peace', trange=trange, probe=probe, datatype=datatype, suffix=suffix, get_support_data=get_support_data, varformat=varformat, varnames=varnames, downloadonly=downloadonly, notplot=notplot, no_update=no_update, time_clip=time_clip)
def rapid(trange=['2016-11-5', '2016-11-6'],
probe='1',
datatype='pp',
suffix='',
get_support_data=False,
varformat=None,
varnames=[],
downloadonly=False,
notplot=False,
no_update=False,
time_clip=False):
"""
This function loads data from the Research with Adaptive Particle Imaging Detectors
Parameters:
trange : list of str
time range of interest [starttime, endtime] with the format
'YYYY-MM-DD','YYYY-MM-DD'] or to specify more or less than a day
['YYYY-MM-DD/hh:mm:ss','YYYY-MM-DD/hh:mm:ss']
datatype: str
Data type; Valid options:
suffix: str
The tplot variable names will be given this suffix. By default,
no suffix is added.
get_support_data: bool
Data with an attribute "VAR_TYPE" with a value of "support_data"
will be loaded into tplot. By default, only loads in data with a
"VAR_TYPE" attribute of "data".
varformat: str
The file variable formats to load into tplot. Wildcard character
"*" is accepted. By default, all variables are loaded in.
varnames: list of str
List of variable names to load (if not specified,
all data variables are loaded)
downloadonly: bool
Set this flag to download the CDF files, but not load them into
tplot variables
notplot: bool
Return the data in hash tables instead of creating tplot variables
no_update: bool
If set, only load data from your local cache
time_clip: bool
Time clip the variables to exactly the range specified in the trange keyword
Returns:
List of tplot variables created.
"""
return load(instrument='rapid', trange=trange, probe=probe, datatype=datatype, suffix=suffix, get_support_data=get_support_data, varformat=varformat, varnames=varnames, downloadonly=downloadonly, notplot=notplot, no_update=no_update, time_clip=time_clip)
def staff(trange=['2012-11-5', '2012-11-6'],
probe='1',
datatype='pp',
suffix='',
get_support_data=False,
varformat=None,
varnames=[],
downloadonly=False,
notplot=False,
no_update=False,
time_clip=False):
"""
This function loads data from the Spatio-Temporal Analysis of Field Fluctuation experiment
Parameters:
trange : list of str
time range of interest [starttime, endtime] with the format
'YYYY-MM-DD','YYYY-MM-DD'] or to specify more or less than a day
['YYYY-MM-DD/hh:mm:ss','YYYY-MM-DD/hh:mm:ss']
datatype: str
Data type; Valid options:
suffix: str
The tplot variable names will be given this suffix. By default,
no suffix is added.
get_support_data: bool
Data with an attribute "VAR_TYPE" with a value of "support_data"
will be loaded into tplot. By default, only loads in data with a
"VAR_TYPE" attribute of "data".
varformat: str
The file variable formats to load into tplot. Wildcard character
"*" is accepted. By default, all variables are loaded in.
varnames: list of str
List of variable names to load (if not specified,
all data variables are loaded)
downloadonly: bool
Set this flag to download the CDF files, but not load them into
tplot variables
notplot: bool
Return the data in hash tables instead of creating tplot variables
no_update: bool
If set, only load data from your local cache
time_clip: bool
Time clip the variables to exactly the range specified in the trange keyword
Returns:
List of tplot variables created.
"""
return load(instrument='staff', trange=trange, probe=probe, datatype=datatype, suffix=suffix, get_support_data=get_support_data, varformat=varformat, varnames=varnames, downloadonly=downloadonly, notplot=notplot, no_update=no_update, time_clip=time_clip)
def wbd(trange=['2012-11-6', '2012-11-7'],
probe='1',
datatype='waveform',
suffix='',
get_support_data=False,
varformat=None,
varnames=[],
downloadonly=False,
notplot=False,
no_update=False,
time_clip=False):
"""
This function loads data from the Wide Band Data receiver
Parameters:
trange : list of str
time range of interest [starttime, endtime] with the format
'YYYY-MM-DD','YYYY-MM-DD'] or to specify more or less than a day
['YYYY-MM-DD/hh:mm:ss','YYYY-MM-DD/hh:mm:ss']
datatype: str
Data type; Valid options:
suffix: str
The tplot variable names will be given this suffix. By default,
no suffix is added.
get_support_data: bool
Data with an attribute "VAR_TYPE" with a value of "support_data"
will be loaded into tplot. By default, only loads in data with a
"VAR_TYPE" attribute of "data".
varformat: str
The file variable formats to load into tplot. Wildcard character
"*" is accepted. By default, all variables are loaded in.
varnames: list of str
List of variable names to load (if not specified,
all data variables are loaded)
downloadonly: bool
Set this flag to download the CDF files, but not load them into
tplot variables
notplot: bool
Return the data in hash tables instead of creating tplot variables
no_update: bool
If set, only load data from your local cache
time_clip: bool
Time clip the variables to exactly the range specified in the trange keyword
Returns:
List of tplot variables created.
"""
return load(instrument='wbd', trange=trange, probe=probe, datatype=datatype, suffix=suffix, get_support_data=get_support_data, varformat=varformat, varnames=varnames, downloadonly=downloadonly, notplot=notplot, no_update=no_update, time_clip=time_clip)
def whi(trange=['2012-11-5', '2012-11-6'],
probe='1',
datatype='pp',
suffix='',
get_support_data=False,
varformat=None,
varnames=[],
downloadonly=False,
notplot=False,
no_update=False,
time_clip=False):
"""
This function loads data from the Waves of High Frequency and Sounder for Probing of Density by Relaxation instrument
Parameters:
trange : list of str
time range of interest [starttime, endtime] with the format
'YYYY-MM-DD','YYYY-MM-DD'] or to specify more or less than a day
['YYYY-MM-DD/hh:mm:ss','YYYY-MM-DD/hh:mm:ss']
datatype: str
Data type; Valid options:
suffix: str
The tplot variable names will be given this suffix. By default,
no suffix is added.
get_support_data: bool
Data with an attribute "VAR_TYPE" with a value of "support_data"
will be loaded into tplot. By default, only loads in data with a
"VAR_TYPE" attribute of "data".
varformat: str
The file variable formats to load into tplot. Wildcard character
"*" is accepted. By default, all variables are loaded in.
varnames: list of str
List of variable names to load (if not specified,
all data variables are loaded)
downloadonly: bool
Set this flag to download the CDF files, but not load them into
tplot variables
notplot: bool
Return the data in hash tables instead of creating tplot variables
no_update: bool
If set, only load data from your local cache
time_clip: bool
Time clip the variables to exactly the range specified in the trange keyword
Returns:
List of tplot variables created.
"""
return load(instrument='whi', trange=trange, probe=probe, datatype=datatype, suffix=suffix, get_support_data=get_support_data, varformat=varformat, varnames=varnames, downloadonly=downloadonly, notplot=notplot, no_update=no_update, time_clip=time_clip)
| 35.843558
| 258
| 0.62071
| 3,054
| 23,370
| 4.681401
| 0.053373
| 0.042317
| 0.043086
| 0.030776
| 0.967546
| 0.967546
| 0.967546
| 0.967546
| 0.967546
| 0.967546
| 0
| 0.010233
| 0.310013
| 23,370
| 651
| 259
| 35.898618
| 0.876403
| 0.67086
| 0
| 0.81203
| 0
| 0
| 0.045529
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.082707
| false
| 0
| 0.007519
| 0
| 0.172932
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
b248918677f1089ae52e067a81f848e09d6e3bd2
| 11
|
py
|
Python
|
pj16.py
|
Ziggareto/project_euler_solns
|
e52066b9ffec97005bad0f26a3f0e08760d5c5cb
|
[
"MIT"
] | null | null | null |
pj16.py
|
Ziggareto/project_euler_solns
|
e52066b9ffec97005bad0f26a3f0e08760d5c5cb
|
[
"MIT"
] | null | null | null |
pj16.py
|
Ziggareto/project_euler_solns
|
e52066b9ffec97005bad0f26a3f0e08760d5c5cb
|
[
"MIT"
] | null | null | null |
#pj17
| 2.75
| 6
| 0.363636
| 1
| 11
| 4
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.4
| 0.545455
| 11
| 3
| 7
| 3.666667
| 0.4
| 0.363636
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
b273c52080a94e558551231cc66f856d9d6acf11
| 143
|
py
|
Python
|
src/data/__init__.py
|
simonsanvil/twitch-web-analytics
|
c44fab75ecb8173edc05fc7b5c436d1c2c8eaa51
|
[
"MIT"
] | 2
|
2021-12-14T04:14:36.000Z
|
2021-12-23T21:36:02.000Z
|
src/data/__init__.py
|
simonsanvil/twitch-web-analytics
|
c44fab75ecb8173edc05fc7b5c436d1c2c8eaa51
|
[
"MIT"
] | null | null | null |
src/data/__init__.py
|
simonsanvil/twitch-web-analytics
|
c44fab75ecb8173edc05fc7b5c436d1c2c8eaa51
|
[
"MIT"
] | 2
|
2022-03-04T09:36:33.000Z
|
2022-03-04T12:42:05.000Z
|
from .make_dataset import make_data_from_root_user
from .make_dataset import extract_follows_from_users_df, extract_num_followers_from_users_df
| 71.5
| 92
| 0.923077
| 24
| 143
| 4.875
| 0.541667
| 0.136752
| 0.25641
| 0.358974
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.055944
| 143
| 2
| 92
| 71.5
| 0.866667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 7
|
b278559faa858983fb7c9b185053d8f80c83eb88
| 56,257
|
py
|
Python
|
scripts/gan/cycle_gan/model_base.py
|
hiroyasuakada/ros_start
|
10221ad2bcaefa4aaadc6c90424a3751126ac256
|
[
"MIT"
] | null | null | null |
scripts/gan/cycle_gan/model_base.py
|
hiroyasuakada/ros_start
|
10221ad2bcaefa4aaadc6c90424a3751126ac256
|
[
"MIT"
] | null | null | null |
scripts/gan/cycle_gan/model_base.py
|
hiroyasuakada/ros_start
|
10221ad2bcaefa4aaadc6c90424a3751126ac256
|
[
"MIT"
] | null | null | null |
import os
import random
import itertools
import numpy as np
import torch
import torch.nn as nn
import torch.utils.data
import torchvision.transforms as transforms
from torchvision.utils import make_grid
from torch.autograd import Variable
from PIL import Image
import matplotlib.pyplot as plt
from tensorboardX import SummaryWriter
import time
import cv2
from torchsummary import summary
from dataset import LSTMDataset
class ResNetBlock(nn.Module):
def __init__(self, dim):
super(ResNetBlock, self).__init__()
conv_block = []
conv_block += [nn.ReflectionPad2d(1),
nn.Conv2d(dim, dim, kernel_size=3),
nn.InstanceNorm2d(dim),
nn.ReLU(True),
nn.ReflectionPad2d(1),
nn.Conv2d(dim, dim, kernel_size=3),
nn.InstanceNorm2d(dim)]
self.conv_block = nn.Sequential(*conv_block)
def forward(self, x):
out = x + self.conv_block(x)
return out
class Generator(nn.Module):
def __init__(self):
super(Generator, self).__init__()
self.model = nn.Sequential(
nn.ReflectionPad2d(3),
nn.Conv2d(3, 64, kernel_size=7),
nn.InstanceNorm2d(64),
nn.ReLU(True),
nn.Conv2d(64, 128, kernel_size=3, stride=2, padding=1),
nn.InstanceNorm2d(128),
nn.ReLU(True),
nn.Conv2d(128, 256, kernel_size=3, stride=2, padding=1),
nn.InstanceNorm2d(256),
nn.ReLU(True),
ResNetBlock(256),
ResNetBlock(256),
ResNetBlock(256),
ResNetBlock(256),
ResNetBlock(256),
ResNetBlock(256),
# ResNetBlock(256),
# ResNetBlock(256),
# ResNetBlock(256),
nn.ConvTranspose2d(256, 128, kernel_size=3, stride=2, padding=1, output_padding=1),
nn.InstanceNorm2d(128),
nn.ReLU(True),
nn.ConvTranspose2d(128, 64, kernel_size=3, stride=2, padding=1, output_padding=1),
nn.InstanceNorm2d(64),
nn.ReLU(True),
nn.ReflectionPad2d(3),
nn.Conv2d(64, 3, kernel_size=7, stride=1, padding=0),
nn.Tanh()
)
# initialize weights
self.model.apply(self._init_weights)
def forward(self, input_img):
out = self.model(input_img)
return out
@staticmethod
def _init_weights(m):
classname = m.__class__.__name__
if classname.find('Conv') != -1:
nn.init.normal(m.weight.data, 0.0, 0.02)
class Discriminator(nn.Module):
def __init__(self):
super(Discriminator, self).__init__()
self.model = nn.Sequential(
nn.Conv2d(3, 64, kernel_size=4, stride=2, padding=1),
nn.LeakyReLU(0.2, True),
nn.Conv2d(64, 128, kernel_size=4, stride=2, padding=1),
nn.InstanceNorm2d(128),
nn.LeakyReLU(0.2, True),
nn.Conv2d(128, 256, kernel_size=4, stride=2, padding=1),
nn.InstanceNorm2d(256),
nn.LeakyReLU(0.2, True),
nn.Conv2d(256, 512, kernel_size=4, stride=1, padding=1),
nn.InstanceNorm2d(512),
nn.LeakyReLU(0.2, True),
nn.Conv2d(512, 1, kernel_size=4, stride=1, padding=1)
)
# initialize weights
self.model.apply(self._init_weights)
def forward(self, input_img):
out = self.model(input_img)
return out
@staticmethod
def _init_weights(m):
classname = m.__class__.__name__
if classname.find('Conv') != -1:
nn.init.normal(m.weight.data, 0.0, 0.02)
# =====================================================================================================================
# class ConvLSTMCell(nn.Module):
# def __init__(self, input_channels, hidden_channels, kernel_size):
# super(ConvLSTMCell, self).__init__()
#
# assert hidden_channels % 2 == 0
#
# self.input_channels = input_channels
# self.hidden_channels = hidden_channels
# self.kernel_size = kernel_size
# self.num_features = 4
#
# self.padding = int((kernel_size - 1) / 2)
#
# self.Wxi = nn.Conv2d(self.input_channels, self.hidden_channels, self.kernel_size, 1, self.padding, bias=True)
# self.Whi = nn.Conv2d(self.hidden_channels, self.hidden_channels, self.kernel_size, 1, self.padding, bias=False)
# self.Wxf = nn.Conv2d(self.input_channels, self.hidden_channels, self.kernel_size, 1, self.padding, bias=True)
# self.Whf = nn.Conv2d(self.hidden_channels, self.hidden_channels, self.kernel_size, 1, self.padding, bias=False)
# self.Wxc = nn.Conv2d(self.input_channels, self.hidden_channels, self.kernel_size, 1, self.padding, bias=True)
# self.Whc = nn.Conv2d(self.hidden_channels, self.hidden_channels, self.kernel_size, 1, self.padding, bias=False)
# self.Wxo = nn.Conv2d(self.input_channels, self.hidden_channels, self.kernel_size, 1, self.padding, bias=True)
# self.Who = nn.Conv2d(self.hidden_channels, self.hidden_channels, self.kernel_size, 1, self.padding, bias=False)
#
# self.Wci = None
# self.Wcf = None
# self.Wco = None
#
# def forward(self, x, h, c):
# ci = torch.sigmoid(self.Wxi(x) + self.Whi(h) + c * self.Wci)
# cf = torch.sigmoid(self.Wxf(x) + self.Whf(h) + c * self.Wcf)
# cc = cf * c + ci * torch.tanh(self.Wxc(x) + self.Whc(h))
# co = torch.sigmoid(self.Wxo(x) + self.Who(h) + cc * self.Wco)
# ch = co * torch.tanh(cc)
# return ch, cc
#
# def init_hidden(self, batch_size, hidden, shape):
# if self.Wci is None:
# self.Wci = torch.tensor(torch.zeros(1, hidden, shape[0], shape[1])).to(device)
# self.Wcf = torch.tensor(torch.zeros(1, hidden, shape[0], shape[1])).to(device)
# self.Wco = torch.tensor(torch.zeros(1, hidden, shape[0], shape[1])).to(device)
# else:
# assert shape[0] == self.Wci.size()[2], 'Input Height Mismatched!'
# assert shape[1] == self.Wci.size()[3], 'Input Width Mismatched!'
# return (torch.tensor(torch.zeros(batch_size, hidden, shape[0], shape[1])).to(device),
# torch.tensor(torch.zeros(batch_size, hidden, shape[0], shape[1])).to(device))
#
#
# class ConvLSTM(nn.Module):
# # input_channels corresponds to the first input feature map
# # hidden state is a list of succeeding lstm layers.
# def __init__(self, input_channels, hidden_channels, kernel_size, step=1, effective_step=[1]):
# super(ConvLSTM, self).__init__()
# self.input_channels = [input_channels] + hidden_channels
# self.hidden_channels = hidden_channels
# self.kernel_size = kernel_size
# self.num_layers = len(hidden_channels)
# self.step = step
# self.effective_step = effective_step
# self._all_layers = []
# for i in range(self.num_layers):
# name = 'cell{}'.format(i)
# cell = ConvLSTMCell(self.input_channels[i], self.hidden_channels[i], self.kernel_size)
# setattr(self, name, cell)
# self._all_layers.append(cell)
#
# def forward(self, _input):
# internal_state = []
# outputs = []
# for step in range(self.step):
# x = _input
# for i in range(self.num_layers):
# # all cells are initialized in the first step
# name = 'cell{}'.format(i)
# if step == 0:
# bsize, _, height, width = x.size()
# (h, c) = getattr(self, name).init_hidden(batch_size=bsize, hidden=self.hidden_channels[i],
# shape=(height, width))
# internal_state.append((h, c))
#
# # do forward
# (h, c) = internal_state[i]
# x, new_c = getattr(self, name)(x, h, c)
# internal_state[i] = (x, new_c)
# # only record effective steps
# if step in self.effective_step:
# outputs.append(x)
#
# return outputs, (x, new_c)
# =====================================================================================================================
# class ConvLSTMCell(nn.Module):
# def __init__(self, input_size, input_dim,
# hidden_dim, kernel_size, bias=True, mode_train=True):
# """
# Initialize ConvLSTM cell.
# Parameters
# ----------
# input_size (int, int):
# height x width of input tensor
# input_dim (int):
# number of channels of input tensor
# hidden_dim (int):
# number of channels of hidden state
# kernel_size (int):
# size of filter kernel
# bias (bool):
# add bias or not
# """
#
# super(ConvLSTMCell, self).__init__()
#
# self.height, self.width = input_size
# self.input_dim = input_dim
# self.hidden_dim = hidden_dim
#
# self.kernel_size = kernel_size
# self.padding = kernel_size[0] // 2, kernel_size[1] // 2
# self.bias = bias
#
# """
# ๆณจๆ่พๅ
ฅ่พๅบ็็ปดๅบฆ๏ผๆฏไธบไบๆททๅๅท็งฏ๏ผๅ ๅฟซ่ฟ็ฎ้ๅบฆ
# LSTM: gate_size = 4 * hidden_size
# GRU: gate_size = 3 * hidden_size
# """
# self.conv = nn.Conv2d(in_channels=self.input_dim + self.hidden_dim,
# out_channels=4 * self.hidden_dim,
# kernel_size=self.kernel_size,
# padding=self.padding, bias=self.bias)
#
# self.mode_train = mode_train
#
# def forward(self, input_tensor, cur_state):
# """
# input_tensor (Tensor):
# input x
# cur_state (Tensor, Tensor):
# h_out, c_out: the output of the previous state
# return๏ผh_next, c_next
# """
# h_cur, c_cur = cur_state
#
# # concatenate along channel axis
# combined = torch.cat([input_tensor, h_cur], dim=1)
#
# # ConvLSTM: concatenate to speed up
# combined_conv = self.conv(combined)
# cc_i, cc_f, cc_o, cc_g = torch.split(combined_conv, self.hidden_dim, dim=1)
# i = torch.sigmoid(cc_i)
# f = torch.sigmoid(cc_f)
# o = torch.sigmoid(cc_o)
# g = torch.tanh(cc_g)
#
# c_next = f * c_cur + i * g
# h_next = o * torch.tanh(c_next)
#
# return h_next, c_next
#
# def init_hidden(self, batch_size, device, cuda_use):
# if cuda_use:
# return (torch.zeros(batch_size, self.hidden_dim, self.height, self.width).to('cuda:0'),
# torch.zeros(batch_size, self.hidden_dim, self.height, self.width).to('cuda:0'))
# else:
# return (torch.zeros(batch_size, self.hidden_dim, self.height, self.width).to('cuda:0'),
# torch.zeros(batch_size, self.hidden_dim, self.height, self.width).to('cuda:0'))
#
#
# class ConvLSTM(nn.Module):
# def __init__(self, input_size, input_dim, hidden_dim, kernel_size,
# num_layers, batch_first=False, bias=True,
# return_all_layers=False, cuda_use=False, device="cuda:0", mode_train=True):
# """
# Initialize ConvLSTM network.
# Parameters
# ----------
# input_size (int, int):
# height and width of input tensor
# input_dim (int):
# number of channels of input tensor
# hidden_dim (int):
# number of channels of hidden state
# kernel_size (int):
# size of filter kernel
# num_layers (int):
# number of ConvLSTMCells
# batch_first (bool):
# batch first or not
# bias (bool):
# add bias or not
# return_all_layers (bool):
# return all the layers or not
# cuda_use (bool):
# use GPU(s) or not
# """
#
# super(ConvLSTM, self).__init__()
#
# self._check_kernel_size_consistency(kernel_size)
#
# # make sure kernel_size and hidden_dim are lists having len == num_layers
# kernel_size = self._extend_for_multilayer(kernel_size, num_layers)
# hidden_dim = self._extend_for_multilayer(hidden_dim, num_layers)
# if len(kernel_size) != num_layers or len(hidden_dim) != num_layers:
# raise ValueError('Inconsistent list length.')
#
# self.height, self.width = input_size
#
# self.input_dim = input_dim
# self.hidden_dim = hidden_dim
# self.kernel_size = kernel_size
# self.num_layers = num_layers
# self.batch_first = batch_first
# self.bias = bias
# self.return_all_layers = return_all_layers
# self.cuda_use = cuda_use
# self.device = device
#
# cell_list = []
#
# # add LSTM Unit to cell_list
# for i in range(0, self.num_layers):
# if i == 0:
# cur_input_dim = self.input_dim
# else:
# cur_input_dim = hidden_dim[i - 1]
#
# if self.cuda_use:
# cell_list.append(ConvLSTMCell(input_size=(self.height, self.width),
# input_dim=cur_input_dim,
# hidden_dim=self.hidden_dim[i],
# kernel_size=self.kernel_size[i],
# bias=self.bias, mode_train=mode_train))
# else:
# cell_list.append(ConvLSTMCell(input_size=(self.height, self.width),
# input_dim=cur_input_dim,
# hidden_dim=self.hidden_dim[i],
# kernel_size=self.kernel_size[i],
# bias=self.bias))
# self.cell_list = nn.ModuleList(cell_list)
#
# def forward(self, input_tensor, hidden_state=None):
# """
# Parameters
# ----------
# input_tensor: todo
# 5-D Tensor either of shape
# (t, b, c, h, w) or
# (b, t, c, h, w)
# hidden_state: todo
# None. todo implement stateful
# return: last_state_list, layer_output
# """
#
# # (t, b, c, h, w) -> (b, t, c, h, w)
# if not self.batch_first:
# input_tensor.permute(1, 0, 2, 3, 4)
#
# # Implement stateful ConvLSTM
# if hidden_state is not None:
# raise NotImplementedError()
# else:
# hidden_state = self._init_hidden(batch_size=input_tensor.size(0), cuda_use=self.cuda_use)
#
# layer_output_list = []
# last_state_list = []
#
# seq_len = input_tensor.size(1)
# cur_layer_input = input_tensor
#
# for layer_idx in range(self.num_layers):
#
# h, c = hidden_state[layer_idx]
# output_inner = []
# for t in range(seq_len):
# h, c = self.cell_list[layer_idx](input_tensor=cur_layer_input[:, t, :, :, :],
# cur_state=[h, c])
# output_inner.append(h)
#
# layer_output = torch.stack(output_inner, dim=1)
# cur_layer_input = layer_output
#
# layer_output_list.append(layer_output)
# last_state_list.append([h, c])
#
# if not self.return_all_layers:
# layer_output_list = layer_output_list[-1:]
# last_state_list = last_state_list[-1:]
#
# return layer_output_list, last_state_list
#
# def _init_hidden(self, batch_size, cuda_use=False):
# init_states = []
# for i in range(self.num_layers):
# init_states.append(self.cell_list[i].init_hidden(batch_size, self.device, cuda_use=cuda_use))
# return init_states
#
# @staticmethod
# def _check_kernel_size_consistency(kernel_size):
# if not (isinstance(kernel_size, tuple) or
# (isinstance(kernel_size, list) and all([isinstance(elem, tuple) for elem in kernel_size]))):
# raise ValueError('`kernel_size` must be tuple or list of tuples')
#
# @staticmethod
# def _extend_for_multilayer(param, num_layers):
# if not isinstance(param, list):
# param = [param] * num_layers
# return param
#
# # =====================================================================================================================
#
# class ConvLSTMCell_2(nn.Module):
# def __init__(self, input_size, input_dim,
# hidden_dim, kernel_size, bias=True):
# """
# Initialize ConvLSTM cell.
# Parameters
# ----------
# input_size (int, int):
# height x width of input tensor
# input_dim (int):
# number of channels of input tensor
# hidden_dim (int):
# number of channels of hidden state
# kernel_size (int):
# size of filter kernel
# bias (bool):
# add bias or not
# """
#
# super(ConvLSTMCell_2, self).__init__()
#
# self.height, self.width = input_size
# self.input_dim = input_dim
# self.hidden_dim = hidden_dim
#
# self.kernel_size = kernel_size
# self.padding = kernel_size[0] // 2, kernel_size[1] // 2
# self.bias = bias
#
# """
# ๆณจๆ่พๅ
ฅ่พๅบ็็ปดๅบฆ๏ผๆฏไธบไบๆททๅๅท็งฏ๏ผๅ ๅฟซ่ฟ็ฎ้ๅบฆ
# LSTM: gate_size = 4 * hidden_size
# GRU: gate_size = 3 * hidden_size
# """
# self.conv = nn.Conv2d(in_channels=self.input_dim + self.hidden_dim,
# out_channels=4 * self.hidden_dim,
# kernel_size=self.kernel_size,
# padding=self.padding, bias=self.bias)
#
# def forward(self, input_tensor, cur_state):
# """
# input_tensor (Tensor):
# input x
# cur_state (Tensor, Tensor):
# h_out, c_out: the output of the previous state
# return๏ผh_next, c_next
# """
# h_cur, c_cur = cur_state
#
# # concatenate along channel axis
# combined = torch.cat([input_tensor, h_cur], dim=1)
#
# # ConvLSTM: concatenate to speed up
# combined_conv = self.conv(combined)
# cc_i, cc_f, cc_o, cc_g = torch.split(combined_conv, self.hidden_dim, dim=1)
# i = torch.sigmoid(cc_i)
# f = torch.sigmoid(cc_f)
# o = torch.sigmoid(cc_o)
# g = torch.tanh(cc_g)
#
# c_next = f * c_cur + i * g
# h_next = o * torch.tanh(c_next)
#
# return h_next, c_next
#
# def init_hidden(self, batch_size, device, cuda_use):
# if cuda_use:
# return (torch.zeros(batch_size, self.hidden_dim, self.height, self.width).to('cuda:1'),
# torch.zeros(batch_size, self.hidden_dim, self.height, self.width).to('cuda:1'))
# else:
# return (torch.zeros(batch_size, self.hidden_dim, self.height, self.width).to('cuda:1'),
# torch.zeros(batch_size, self.hidden_dim, self.height, self.width).to('cuda:1'))
#
#
# class ConvLSTM_2(nn.Module):
# def __init__(self, input_size, input_dim, hidden_dim, kernel_size,
# num_layers, batch_first=False, bias=True,
# return_all_layers=False, cuda_use=False, device="cuda:1"):
# """
# Initialize ConvLSTM network.
# Parameters
# ----------
# input_size (int, int):
# height and width of input tensor
# input_dim (int):
# number of channels of input tensor
# hidden_dim (int):
# number of channels of hidden state
# kernel_size (int):
# size of filter kernel
# num_layers (int):
# number of ConvLSTMCells
# batch_first (bool):
# batch first or not
# bias (bool):
# add bias or not
# return_all_layers (bool):
# return all the layers or not
# cuda_use (bool):
# use GPU(s) or not
# """
#
# super(ConvLSTM_2, self).__init__()
#
# self._check_kernel_size_consistency(kernel_size)
#
# # make sure kernel_size and hidden_dim are lists having len == num_layers
# kernel_size = self._extend_for_multilayer(kernel_size, num_layers)
# hidden_dim = self._extend_for_multilayer(hidden_dim, num_layers)
# if len(kernel_size) != num_layers or len(hidden_dim) != num_layers:
# raise ValueError('Inconsistent list length.')
#
# self.height, self.width = input_size
#
# self.input_dim = input_dim
# self.hidden_dim = hidden_dim
# self.kernel_size = kernel_size
# self.num_layers = num_layers
# self.batch_first = batch_first
# self.bias = bias
# self.return_all_layers = return_all_layers
# self.cuda_use = cuda_use
# self.device = device
#
# cell_list = []
#
# # add LSTM Unit to cell_list
# for i in range(0, self.num_layers):
# if i == 0:
# cur_input_dim = self.input_dim
# else:
# cur_input_dim = hidden_dim[i - 1]
#
# if self.cuda_use:
# cell_list.append(ConvLSTMCell_2(input_size=(self.height, self.width),
# input_dim=cur_input_dim,
# hidden_dim=self.hidden_dim[i],
# kernel_size=self.kernel_size[i],
# bias=self.bias))
# else:
# cell_list.append(ConvLSTMCell_2(input_size=(self.height, self.width),
# input_dim=cur_input_dim,
# hidden_dim=self.hidden_dim[i],
# kernel_size=self.kernel_size[i],
# bias=self.bias))
# self.cell_list = nn.ModuleList(cell_list)
#
# def forward(self, input_tensor, hidden_state=None):
# """
# Parameters
# ----------
# input_tensor: todo
# 5-D Tensor either of shape
# (t, b, c, h, w) or
# (b, t, c, h, w)
# hidden_state: todo
# None. todo implement stateful
# return: last_state_list, layer_output
# """
#
# # (t, b, c, h, w) -> (b, t, c, h, w)
# if not self.batch_first:
# input_tensor.permute(1, 0, 2, 3, 4)
#
# # Implement stateful ConvLSTM
# if hidden_state is not None:
# raise NotImplementedError()
# else:
# hidden_state = self._init_hidden(batch_size=input_tensor.size(0), cuda_use=self.cuda_use)
#
# layer_output_list = []
# last_state_list = []
#
# seq_len = input_tensor.size(1)
# cur_layer_input = input_tensor
#
# for layer_idx in range(self.num_layers):
#
# h, c = hidden_state[layer_idx]
# output_inner = []
# for t in range(seq_len):
# h, c = self.cell_list[layer_idx](input_tensor=cur_layer_input[:, t, :, :, :],
# cur_state=[h, c])
# output_inner.append(h)
#
# layer_output = torch.stack(output_inner, dim=1)
# cur_layer_input = layer_output
#
# layer_output_list.append(layer_output)
# last_state_list.append([h, c])
#
# if not self.return_all_layers:
# layer_output_list = layer_output_list[-1:]
# last_state_list = last_state_list[-1:]
#
# return layer_output_list, last_state_list
#
# def _init_hidden(self, batch_size, cuda_use=False):
# init_states = []
# for i in range(self.num_layers):
# init_states.append(self.cell_list[i].init_hidden(batch_size, self.device, cuda_use=cuda_use))
# return init_states
#
# @staticmethod
# def _check_kernel_size_consistency(kernel_size):
# if not (isinstance(kernel_size, tuple) or
# (isinstance(kernel_size, list) and all([isinstance(elem, tuple) for elem in kernel_size]))):
# raise ValueError('`kernel_size` must be tuple or list of tuples')
#
# @staticmethod
# def _extend_for_multilayer(param, num_layers):
# if not isinstance(param, list):
# param = [param] * num_layers
# return param
# =====================================================================================================================
class Reshape(nn.Module):
def __init__(self, args):
super(Reshape, self).__init__()
self.shape = args
def forward(self, x):
return x.view(self.shape)
# class LSTMGenerator_A(nn.Module):
# def __init__(self, batch_size, window_size, step_size, device):
# super(LSTMGenerator_A, self).__init__()
#
# self.model_1 = Reshape([int(batch_size * window_size / step_size), 3, 128, 256])
#
# self.model_2 = nn.Sequential(
# nn.Conv2d(3, 64, kernel_size=3, stride=2, padding=1),
# nn.InstanceNorm2d(64),
# nn.ReLU(True),
#
# nn.Conv2d(64, 128, kernel_size=3, stride=2, padding=1),
# nn.InstanceNorm2d(128),
# nn.ReLU(True)
# )
#
# self.model_3 = Reshape([int(batch_size), int(window_size / step_size), 128, 32, 64])
#
# self.model_4 = nn.Sequential(
# ConvLSTM(input_size=(32, 64), input_dim=128, hidden_dim=[256], kernel_size=(3, 3), num_layers=1,
# batch_first=True, return_all_layers=True, cuda_use=True, device=device)
# )
#
# self.model_5 = Reshape([int(batch_size * window_size / step_size), 256, 32, 64])
#
# self.model_6 = nn.Sequential(
# ResNetBlock(256),
# ResNetBlock(256),
# ResNetBlock(256),
# ResNetBlock(256),
# ResNetBlock(256),
# ResNetBlock(256)
# )
#
# self.model_7 = Reshape([int(batch_size), int(window_size / step_size), 256, 32, 64])
#
# self.model_8 = nn.Sequential(
# ConvLSTM(input_size=(32, 64), input_dim=256, hidden_dim=[128], kernel_size=(3, 3), num_layers=1,
# batch_first=True, return_all_layers=True, cuda_use=True, device=device)
# )
#
# self.model_9 = Reshape([int(batch_size * window_size / step_size), 128, 32, 64])
#
# self.model_10 = nn.Sequential(
# nn.ConvTranspose2d(128, 64, kernel_size=3, stride=2, padding=1, output_padding=1),
# nn.InstanceNorm2d(64),
# nn.ReLU(True),
#
# nn.ConvTranspose2d(64, 32, kernel_size=3, stride=2, padding=1, output_padding=1),
# nn.InstanceNorm2d(32),
# nn.ReLU(True),
#
# nn.ReflectionPad2d(3),
# nn.Conv2d(32, 3, kernel_size=7, stride=1, padding=0),
# nn.Tanh()
# )
#
# self.model_11 = Reshape([int(batch_size), int(window_size / step_size), 3, 128, 256])
#
# # initialize weights
# self.model_2.apply(self._init_weights)
# self.model_6.apply(self._init_weights)
# self.model_10.apply(self._init_weights)
#
# def forward(self, input_img):
# out = self.model_1(input_img)
# out = self.model_2(out)
# out = self.model_3(out)
# layer_output_list_1, _ = self.model_4(out)
# out = self.model_5(layer_output_list_1[0])
# out = self.model_6(out)
# out = self.model_7(out)
# layer_output_list_2, _ = self.model_8(out)
# out = self.model_9(layer_output_list_2[0])
# out = self.model_10(out)
# out = self.model_11(out)
# return out
#
#
# @staticmethod
# def _init_weights(m):
# classname = m.__class__.__name__
# if classname.find('Conv') != -1:
# nn.init.normal(m.weight.data, 0.0, 0.02)
# @staticmethod
# def mix_batch_and_sequence(layer_output_list):
# output_list = []
# for s in range(layer_output_list[1].size()[0]):
# output_list.append(layer_output_list[1][s]) # add torch.Size([4, 128, 128, 256]) * num_layer
# out = torch.cat(output_list, dim=0) # torch.Size([8, 128, 128, 256])
# return out
#
# @staticmethod
# def make_batch_based_sequence(sequence, layer_output_list):
# out_taple = torch.chunk(sequence, layer_output_list[1].size()[0], dim=0)
# out_list = list(out_taple)
# out = torch.stack(out_list, dim=0)
# return out
class LSTMGenerator_A(nn.Module):
def __init__(self, batch_size, window_size, step_size, device):
super(LSTMGenerator_A, self).__init__()
self.model_1 = Reshape([int(batch_size * window_size / step_size), 3, 128, 256])
self.model_2 = nn.Sequential(
nn.ReflectionPad2d(3),
nn.Conv2d(3, 64, kernel_size=7),
nn.InstanceNorm2d(64),
nn.ReLU(True),
nn.Conv2d(64, 128, kernel_size=3, stride=2, padding=1),
nn.InstanceNorm2d(128),
nn.ReLU(True),
nn.Conv2d(128, 256, kernel_size=3, stride=2, padding=1),
nn.InstanceNorm2d(256),
nn.ReLU(True),
ResNetBlock(256),
ResNetBlock(256),
ResNetBlock(256),
ResNetBlock(256),
ResNetBlock(256),
ResNetBlock(256),
# ResNetBlock(256),
# ResNetBlock(256),
# ResNetBlock(256),
nn.ConvTranspose2d(256, 128, kernel_size=3, stride=2, padding=1, output_padding=1),
nn.InstanceNorm2d(128),
nn.ReLU(True),
nn.ConvTranspose2d(128, 64, kernel_size=3, stride=2, padding=1, output_padding=1),
nn.InstanceNorm2d(64),
nn.ReLU(True),
nn.ReflectionPad2d(3),
nn.Conv2d(64, 3, kernel_size=7, stride=1, padding=0),
nn.Tanh()
)
self.model_3 = Reshape([int(batch_size), int(window_size / step_size), 3, 128, 256])
# initialize weights
self.model_2.apply(self._init_weights)
def forward(self, input_img):
out = self.model_1(input_img)
out = self.model(out)
out = self.model(out)
return out
@staticmethod
def _init_weights(m):
classname = m.__class__.__name__
if classname.find('Conv') != -1:
nn.init.normal(m.weight.data, 0.0, 0.02)
class LSTMGenerator_B(nn.Module):
def __init__(self, batch_size, window_size, step_size, device):
super(LSTMGenerator_B, self).__init__()
self.model_1 = Reshape([int(batch_size * window_size / step_size), 3, 128, 256])
self.model_2 = nn.Sequential(
nn.ReflectionPad2d(3),
nn.Conv2d(3, 64, kernel_size=7),
nn.InstanceNorm2d(64),
nn.ReLU(True),
nn.Conv2d(64, 128, kernel_size=3, stride=2, padding=1),
nn.InstanceNorm2d(128),
nn.ReLU(True),
nn.Conv2d(128, 256, kernel_size=3, stride=2, padding=1),
nn.InstanceNorm2d(256),
nn.ReLU(True),
ResNetBlock(256),
ResNetBlock(256),
ResNetBlock(256),
ResNetBlock(256),
ResNetBlock(256),
ResNetBlock(256),
# ResNetBlock(256),
# ResNetBlock(256),
# ResNetBlock(256),
nn.ConvTranspose2d(256, 128, kernel_size=3, stride=2, padding=1, output_padding=1),
nn.InstanceNorm2d(128),
nn.ReLU(True),
nn.ConvTranspose2d(128, 64, kernel_size=3, stride=2, padding=1, output_padding=1),
nn.InstanceNorm2d(64),
nn.ReLU(True),
nn.ReflectionPad2d(3),
nn.Conv2d(64, 3, kernel_size=7, stride=1, padding=0),
nn.Tanh()
)
self.model_3 = Reshape([int(batch_size), int(window_size / step_size), 3, 128, 256])
# initialize weights
self.model_2.apply(self._init_weights)
def forward(self, input_img):
out = self.model_1(input_img.to('cuda:1'))
out = self.model(out)
out = self.model_3(out)
return out.to('cuda:0')
@staticmethod
def _init_weights(m):
classname = m.__class__.__name__
if classname.find('Conv') != -1:
nn.init.normal(m.weight.data, 0.0, 0.02)
# class LSTMGenerator_B(nn.Module):
# def __init__(self, batch_size, window_size, step_size, device):
# super(LSTMGenerator_B, self).__init__()
#
# self.model_1 = Reshape([int(batch_size * window_size / step_size), 3, 128, 256])
#
# self.model_2 = nn.Sequential(
# nn.Conv2d(3, 64, kernel_size=3, stride=2, padding=1),
# nn.InstanceNorm2d(64),
# nn.ReLU(True),
#
# nn.Conv2d(64, 128, kernel_size=3, stride=2, padding=1),
# nn.InstanceNorm2d(128),
# nn.ReLU(True)
# )
#
# self.model_3 = Reshape([int(batch_size), int(window_size / step_size), 128, 32, 64])
#
# self.model_4 = nn.Sequential(
# ConvLSTM_2(input_size=(32, 64), input_dim=128, hidden_dim=[256], kernel_size=(3, 3), num_layers=1,
# batch_first=True, return_all_layers=True, cuda_use=True, device=device)
# )
#
# self.model_5 = Reshape([int(batch_size * window_size / step_size), 256, 32, 64])
#
# self.model_6 = nn.Sequential(
# ResNetBlock(256),
# ResNetBlock(256),
# ResNetBlock(256),
# ResNetBlock(256),
# ResNetBlock(256),
# ResNetBlock(256)
# )
#
# self.model_7 = Reshape([int(batch_size), int(window_size / step_size), 256, 32, 64])
#
# self.model_8 = nn.Sequential(
# ConvLSTM_2(input_size=(32, 64), input_dim=256, hidden_dim=[128], kernel_size=(3, 3), num_layers=1,
# batch_first=True, return_all_layers=True, cuda_use=True, device=device)
# )
#
# self.model_9 = Reshape([int(batch_size * window_size / step_size), 128, 32, 64])
#
# self.model_10 = nn.Sequential(
# nn.ConvTranspose2d(128, 64, kernel_size=3, stride=2, padding=1, output_padding=1),
# nn.InstanceNorm2d(64),
# nn.ReLU(True),
#
# nn.ConvTranspose2d(64, 32, kernel_size=3, stride=2, padding=1, output_padding=1),
# nn.InstanceNorm2d(32),
# nn.ReLU(True),
#
# nn.ReflectionPad2d(3),
# nn.Conv2d(32, 3, kernel_size=7, stride=1, padding=0),
# nn.Tanh()
# )
#
# self.model_11 = Reshape([int(batch_size), int(window_size / step_size), 3, 128, 256])
#
# # initialize weights
# self.model_2.apply(self._init_weights)
# self.model_6.apply(self._init_weights)
# self.model_10.apply(self._init_weights)
#
# def forward(self, input_img):
# out = self.model_1(input_img.to('cuda:1'))
# out = self.model_2(out)
# out = self.model_3(out)
# layer_output_list_1, _ = self.model_4(out)
# out = self.model_5(layer_output_list_1[0])
# out = self.model_6(out)
# out = self.model_7(out)
# layer_output_list_2, _ = self.model_8(out)
# out = self.model_9(layer_output_list_2[0])
# out = self.model_10(out)
# out = self.model_11(out)
# return out.to('cuda:0')
#
# @staticmethod
# def _init_weights(m):
# classname = m.__class__.__name__
# if classname.find('Conv') != -1:
# nn.init.normal(m.weight.data, 0.0, 0.02)
# @staticmethod
# def mix_batch_and_sequence(layer_output_list):
# output_list = []
# for s in range(layer_output_list[1].size()[0]):
# output_list.append(layer_output_list[1][s]) # add torch.Size([4, 128, 128, 256]) * num_layer
# out = torch.cat(output_list, dim=0) # torch.Size([8, 128, 128, 256])
# return out
#
# @staticmethod
# def make_batch_based_sequence(sequence, layer_output_list):
# out_taple = torch.chunk(sequence, layer_output_list[1].size()[0], dim=0)
# out_list = list(out_taple)
# out = torch.stack(out_list, dim=0)
# return out
# class LSTMDiscriminator_A(nn.Module):
#
# def __init__(self, batch_size, window_size, step_size, device):
# super(LSTMDiscriminator_A, self).__init__()
#
# self.model_1 = nn.Sequential(
# ConvLSTM(input_size=(128, 256), input_dim=3, hidden_dim=[64, 64], kernel_size=(3, 3), num_layers=2,
# batch_first=True, return_all_layers=True, cuda_use=True, device=device)
# )
#
# self.model_2 = nn.Sequential(
# nn.Linear(int(window_size / step_size)*128*256*64, 1),
# nn.Sigmoid()
# )
#
# # initialize weights
#
# def forward(self, input_img):
# layer_output_list, _ = self.model_1(input_img)
# out = self.model_2(layer_output_list[1]).squeeze()
# return out
# class LSTMDiscriminator_A(nn.Module):
#
# def __init__(self, batch_size, window_size, step_size, device):
# super(LSTMDiscriminator_A, self).__init__()
#
# self.model_1 = Reshape([int(batch_size * window_size / step_size), 3, 128, 256])
#
# self.model_2 = nn.Sequential(
# nn.Conv2d(3, 64, kernel_size=4, stride=2, padding=1),
# nn.LeakyReLU(0.2, True),
# nn.Conv2d(64, 128, kernel_size=4, stride=2, padding=1),
# nn.InstanceNorm2d(128),
# nn.LeakyReLU(0.2, True)
# )
#
# self.model_3 = Reshape([int(batch_size), int(window_size / step_size), 128, 32, 64])
#
# self.model_4 = nn.Sequential(
# ConvLSTM(input_size=(32, 64), input_dim=128, hidden_dim=[128, 128], kernel_size=(3, 3), num_layers=2,
# batch_first=True, return_all_layers=True, cuda_use=True, device=device)
# )
#
# self.model_5 = Reshape([int(batch_size * window_size / step_size), 128, 32, 64])
#
# self.model_6 = nn.Sequential(
# nn.Conv2d(128, 256, kernel_size=4, stride=2, padding=1),
# nn.InstanceNorm2d(256),
# nn.LeakyReLU(0.2, True),
# nn.Conv2d(256, 512, kernel_size=4, stride=2, padding=1),
# nn.InstanceNorm2d(512),
# nn.LeakyReLU(0.2, True),
# nn.Conv2d(512, 1, kernel_size=4, stride=1, padding=1)
# )
#
# self.model_7 = Reshape([int(batch_size), int(window_size / step_size), 1, 7, 15])
#
# # initialize weights
# self.model_2.apply(self._init_weights)
# self.model_6.apply(self._init_weights)
#
# def forward(self, input_img):
# out = self.model_1(input_img)
# out = self.model_2(out)
# out = self.model_3(out)
# layer_output_list, _ = self.model_4(out)
# out = self.model_5(layer_output_list[1])
# out = self.model_6(out)
# out = self.model_7(out)
# return out
#
# @staticmethod
# def _init_weights(m):
# classname = m.__class__.__name__
# if classname.find('Conv') != -1:
# nn.init.normal(m.weight.data, 0.0, 0.02)
# @staticmethod
# def mix_batch_and_sequence(layer_output_list): # torch.Size([2, 4, 128, 128, 256]) to ([8, 128, 128, 256])
# output_list = []
# for s in range(layer_output_list[1].size()[0]): # 2ๅฑค็ฎใใใฎ็ปๅใฎใตใคใบ
# output_list.append(layer_output_list[1][s]) # add torch.Size([4, 128, 128, 256]) * num_layer
# out = torch.cat(output_list, dim=0) # torch.Size([8, 128, 128, 256])
# return out
#
# @staticmethod
# def make_batch_based_sequence(sequence, layer_output_list):
# out_taple = torch.chunk(sequence, layer_output_list[1].size()[0], dim=0)
# out_list = list(out_taple)
# out = torch.stack(out_list, dim=0)
# return out
# class LSTMDiscriminator_B(nn.Module):
#
# def __init__(self, batch_size, window_size, step_size, device):
# super(LSTMDiscriminator_B, self).__init__()
#
# self.model_1 = nn.Sequential(
# ConvLSTM_2(input_size=(128, 256), input_dim=3, hidden_dim=[64, 64], kernel_size=(3, 3), num_layers=2,
# batch_first=True, return_all_layers=True, cuda_use=True, device=device)
# )
#
# self.model_2 = nn.Sequential(
# nn.Linear(int(window_size / step_size)*128*256*64, 1),
# nn.Sigmoid()
# )
#
# # initialize weights
#
# def forward(self, input_img):
# layer_output_list, _ = self.model_1(input_img.to('cuda:1'))
# out = self.model_2(layer_output_list[1]).squeeze()
# return out.to('cuda:0')
#
# @staticmethod
# def _init_weights(m):
# classname = m.__class__.__name__
# if classname.find('Conv') != -1:
# nn.init.normal(m.weight.data, 0.0, 0.02)
# @staticmethod
# def mix_batch_and_sequence(layer_output_list): # torch.Size([2, 4, 128, 128, 256]) to ([8, 128, 128, 256])
# output_list = []
# for s in range(layer_output_list[1].size()[0]): # 2ๅฑค็ฎใใใฎ็ปๅใฎใตใคใบ
# output_list.append(layer_output_list[1][s]) # add torch.Size([4, 128, 128, 256]) * num_layer
# out = torch.cat(output_list, dim=0) # torch.Size([8, 128, 128, 256])
# return out
#
# @staticmethod
# def make_batch_based_sequence(sequence, layer_output_list):
# out_taple = torch.chunk(sequence, layer_output_list[1].size()[0], dim=0)
# out_list = list(out_taple)
# out = torch.stack(out_list, dim=0)
# return out
class C3dResNetBlock(nn.Module):
def __init__(self, dim):
super(C3dResNetBlock, self).__init__()
conv_block = []
conv_block += [nn.ReplicationPad3d(1),
nn.Conv3d(dim, dim, kernel_size=3),
nn.InstanceNorm3d(dim),
nn.ReLU(True),
nn.ReplicationPad3d(1),
nn.Conv3d(dim, dim, kernel_size=3),
nn.InstanceNorm3d(dim)]
self.conv_block = nn.Sequential(*conv_block)
def forward(self, x):
out = x + self.conv_block(x)
return out
class Conv3dGenerator(nn.Module):
def __init__(self):
super(Conv3dGenerator, self).__init__()
self.model = nn.Sequential(
nn.ReplicationPad3d(1),
nn.Conv3d(3, 64, kernel_size=3),
nn.InstanceNorm3d(64),
nn.ReLU(True),
nn.Conv3d(64, 128, kernel_size=3, stride=[1, 2, 2], padding=1),
nn.InstanceNorm3d(128),
nn.ReLU(True),
nn.Conv3d(128, 256, kernel_size=3, stride=[1, 2, 2], padding=1),
nn.InstanceNorm3d(256),
nn.ReLU(True),
C3dResNetBlock(256),
C3dResNetBlock(256),
C3dResNetBlock(256),
C3dResNetBlock(256),
C3dResNetBlock(256),
C3dResNetBlock(256),
# ResNetBlock(256),
# ResNetBlock(256),
# ResNetBlock(256),
nn.ConvTranspose3d(256, 128, kernel_size=3, stride=[1, 2, 2], padding=1, output_padding=[0, 1, 1]),
nn.InstanceNorm3d(128),
nn.ReLU(True),
nn.ConvTranspose3d(128, 64, kernel_size=3, stride=[1, 2, 2], padding=1, output_padding=[0, 1, 1]),
nn.InstanceNorm3d(64),
nn.ReLU(True),
nn.ReplicationPad3d(1),
nn.Conv3d(64, 3, kernel_size=3, stride=1, padding=0),
nn.Tanh()
)
# initialize weights
self.model.apply(self._init_weights)
def forward(self, input_img):
out = input_img.permute([0, 2, 1, 3, 4])
out = self.model(out)
out = out.permute([0, 2, 1, 3, 4])
return out
@staticmethod
def _init_weights(m):
classname = m.__class__.__name__
if classname.find('Conv') != -1:
nn.init.normal(m.weight.data, 0.0, 0.02)
class Conv2dConv3dGenerator(nn.Module):
def __init__(self, batch_size, window_size, step_size):
super(Conv2dConv3dGenerator, self).__init__()
self.model_1 = Reshape([-1, 3, 128, 256])
self.model_2 = nn.Sequential(
nn.ReflectionPad2d(3),
nn.Conv2d(3, 64, kernel_size=7),
nn.InstanceNorm2d(64),
nn.ReLU(True),
nn.Conv2d(64, 128, kernel_size=3, stride=2, padding=1),
nn.InstanceNorm2d(128),
nn.ReLU(True),
nn.Conv2d(128, 256, kernel_size=3, stride=2, padding=1),
nn.InstanceNorm2d(256),
nn.ReLU(True)
)
self.model_3 = Reshape([-1, int(window_size / step_size), 256, 32, 64])
self.model_4 = nn.Sequential(
C3dResNetBlock(256),
C3dResNetBlock(256),
C3dResNetBlock(256),
C3dResNetBlock(256),
C3dResNetBlock(256),
C3dResNetBlock(256),
# ResNetBlock(256),
# ResNetBlock(256),
# ResNetBlock(256),
)
# self.model_5 = Reshape([-1, 256, 32, 64])
self.model_6 = nn.Sequential(
nn.ConvTranspose2d(256, 128, kernel_size=3, stride=2, padding=1, output_padding=1),
nn.InstanceNorm2d(128),
nn.ReLU(True),
nn.ConvTranspose2d(128, 64, kernel_size=3, stride=2, padding=1, output_padding=1),
nn.InstanceNorm2d(64),
nn.ReLU(True),
nn.ReflectionPad2d(3),
nn.Conv2d(64, 3, kernel_size=7, stride=1, padding=0),
nn.Tanh()
)
self.model_7 = Reshape([-1, int(window_size / step_size), 3, 128, 256])
# initialize weights
self.model_2.apply(self._init_weights)
self.model_6.apply(self._init_weights)
def forward(self, input_img):
out = self.model_1(input_img)
out = self.model_2(out)
out = self.model_3(out)
out = out.permute([0, 2, 1, 3, 4])
out = self.model_4(out)
out = out.permute([0, 2, 1, 3, 4])
out = out.contiguous().view([-1, 256, 32, 64])
out = self.model_6(out)
out = self.model_7(out)
return out
@staticmethod
def _init_weights(m):
classname = m.__class__.__name__
if classname.find('Conv') != -1:
nn.init.normal(m.weight.data, 0.0, 0.02)
class Conv3dDiscriminator(nn.Module):
def __init__(self):
super(Conv3dDiscriminator, self).__init__()
self.model = nn.Sequential(
nn.Conv3d(3, 64, kernel_size=3, stride=[1, 2, 2], padding=1),
nn.LeakyReLU(0.2, True),
nn.Conv3d(64, 128, kernel_size=3, stride=[1, 2, 2], padding=1),
nn.InstanceNorm3d(128),
nn.LeakyReLU(0.2, True),
nn.Conv3d(128, 256, kernel_size=3, stride=[1, 2, 2], padding=1),
nn.InstanceNorm3d(256),
nn.LeakyReLU(0.2, True),
nn.Conv3d(256, 512, kernel_size=3, stride=1, padding=1),
nn.InstanceNorm3d(512),
nn.LeakyReLU(0.2, True),
nn.Conv3d(512, 1, kernel_size=3, stride=1, padding=1)
)
# initialize weights
self.model.apply(self._init_weights)
def forward(self, input_img):
out = input_img.permute([0, 2, 1, 3, 4])
out = self.model(out)
out = out.permute([0, 2, 1, 3, 4])
return out.squeeze()
@staticmethod
def _init_weights(m):
classname = m.__class__.__name__
if classname.find('Conv') != -1:
nn.init.normal(m.weight.data, 0.0, 0.02)
class FrameDiscriminator(nn.Module):
def __init__(self, batch_size, window_size, step_size):
super(FrameDiscriminator, self).__init__()
self.model_1 = Reshape([-1, 3, 128, 256])
self.model_2 = nn.Sequential(
nn.Conv2d(3, 64, kernel_size=4, stride=2, padding=1),
nn.LeakyReLU(0.2, True),
nn.Conv2d(64, 128, kernel_size=4, stride=2, padding=1),
nn.InstanceNorm2d(128),
nn.LeakyReLU(0.2, True),
nn.Conv2d(128, 256, kernel_size=4, stride=2, padding=1),
nn.InstanceNorm2d(256),
nn.LeakyReLU(0.2, True),
nn.Conv2d(256, 512, kernel_size=4, stride=1, padding=1),
nn.InstanceNorm2d(512),
nn.LeakyReLU(0.2, True),
nn.Conv2d(512, 1, kernel_size=4, stride=1, padding=1)
)
# initialize weights
self.model_2.apply(self._init_weights)
def forward(self, input_img):
out = self.model_1(input_img)
out = self.model_2(out)
return out.squeeze()
@staticmethod
def _init_weights(m):
classname = m.__class__.__name__
if classname.find('Conv') != -1:
nn.init.normal(m.weight.data, 0.0, 0.02)
# @staticmethod
# def mix_batch_and_sequence(input): # torch.Size([2, 4, 128, 128, 256]) to ([8, 128, 128, 256])
# images_list = []
# for image in input:
# images_list.append(image)
# out = torch.cat(images_list, dim=0)
# return out
# class FrameDiscriminator_B(nn.Module):
#
# def __init__(self, batch_size, window_size, step_size):
# super(FrameDiscriminator_B, self).__init__()
#
# self.model_1 = Reshape([int(batch_size * window_size / step_size), 3, 128, 256])
#
# self.model_2 = nn.Sequential(
# nn.Conv2d(3, 64, kernel_size=4, stride=2, padding=1),
# nn.LeakyReLU(0.2, True),
# nn.Conv2d(64, 128, kernel_size=4, stride=2, padding=1),
# nn.InstanceNorm2d(128),
# nn.LeakyReLU(0.2, True),
# nn.Conv2d(128, 256, kernel_size=4, stride=2, padding=1),
# nn.InstanceNorm2d(256),
# nn.LeakyReLU(0.2, True),
# nn.Conv2d(256, 512, kernel_size=4, stride=1, padding=1),
# nn.InstanceNorm2d(512),
# nn.LeakyReLU(0.2, True),
# nn.Conv2d(512, 1, kernel_size=4, stride=1, padding=1)
# )
#
# # initialize weights
# self.model_2.apply(self._init_weights)
#
# def forward(self, input_img):
# out = self.model_1(input_img.to('cuda:1'))
# out = self.model_2(out)
# return out.to('cuda:0')
#
# @staticmethod
# def _init_weights(m):
# classname = m.__class__.__name__
# if classname.find('Conv') != -1:
# nn.init.normal(m.weight.data, 0.0, 0.02)
# @staticmethod
# def mix_batch_and_sequence(input): # torch.Size([2, 4, 128, 128, 256]) to ([8, 128, 128, 256])
# images_list = []
# for image in input:
# images_list.append(image)
# out = torch.cat(images_list, dim=0)
# return out
if __name__ == '__main__':
device = torch.device("cuda:0" if torch.cuda.is_available else "cpu")
print('device {}'.format(device))
batch_size = 2
window_size = 48
step_size = 12
train_dataset = LSTMDataset(batch_size, window_size, step_size, is_train=True)
train_loader = torch.utils.data.DataLoader(train_dataset, batch_size=batch_size, shuffle=True)
#
data = iter(train_loader).next()
print('===========================================================')
# print(data['A'].shape)
# print(data['A'][0].shape)
# print(data['B'])
# print(data['path_A']) # torch.Size([4, 8, 3, 128, 256])
# print(data['path_A'][0]) # torch.Size([8, 3, 128, 256])
data['A'] = data['A'].to(device)
print('A: ' + str(data['A'].shape))
print('===========================================================')
CG = Conv3dGenerator().to(device)
fake = CG(data['A'])
print(fake.shape)
# ใใฉใกใผใฟใซใฆใณใ
params = 0
for p in CG.parameters():
if p.requires_grad:
params += p.numel()
print(params) # 23459587
CD = Conv3dDiscriminator().to(device)
real_or_not = CD(data['A'])
print(real_or_not.shape)
# ใใฉใกใผใฟใซใฆใณใ
params_1 = 0
for p in CD.parameters():
if p.requires_grad:
params_1 += p.numel()
print(params_1) # 4664833
C2C3G = Conv2dConv3dGenerator(batch_size, window_size, step_size).to(device)
real_or_not_2 = C2C3G(data['A'])
print(real_or_not_2.shape)
# ใใฉใกใผใฟใซใฆใณใ
params_2 = 0
for p in C2C3G.parameters():
if p.requires_grad:
params_2 += p.numel()
print(params_2) # 21993475
print("===============generator above")
#
# fake_judge = LD(fake)
# print(fake_judge.shape)
# print(fake_judge.grad_fn)
#
# fake_indi_judge = iLD(fake)
# print(fake_indi_judge.shape)
# print(fake_indi_judge.grad_fn)
#
# #
# # y = fake_indi_judge.view(1, 4, 14, 30)
# # print(y.grad_fn)
#
#
# # output_list = []
# # for i in range(fake_judge.shape[0]):
# # output_list.append(fake_judge[i]) # add torch.Size([4, 128, 128, 256]) * num_layer
# # out = torch.cat(output_list, dim=0) # torch.Size([8, 128, 128, 256])
# #
# # print(out.shape)
# #
# # return_images = []
# # for image in fake_judge:
# # return_images.append(image)
# #
# # out_return = torch.cat(return_images, dim=0)
# #
# # print(out_return == out)
#
#
# convlstm = ConvLSTM(input_size=(128, 256), input_dim=3, hidden_dim=[32, 64], kernel_size=(3, 3), num_layers=2,
# batch_first=True, return_all_layers=True, cuda_use=True).to(device)
#
# layer_output_list, last_state_list = convlstm(data['A'].to(device))
#
# print('layer below==============')
# print(layer_output_list[1].shape) # from layer 1 of lstms / torch.Size([2, 2, 64, 128, 256])
# out_6 = layer_output_list[1].view([int(batch_size * window_size / step_size), 64, 128, 256])
# print('out_6: ' + str(out_6.shape))
# print('======')
# print(layer_output_list[1][0].shape) # from layer 2 of lstms / torch.Size([2, 64, 128, 256])
# print(layer_output_list[1].size()[0]) # from layer 2 of lstms / 2
# print('======')
# out = []
# for i in range(layer_output_list[1].size()[0]):
# out.append(layer_output_list[1][i])
#
# x = torch.cat(out, dim=0)
#
# print(x.shape)
#
# out_1 = torch.chunk(x, layer_output_list[1].size()[0], dim=0)
# out_1_list = list(out_1)
# out_1_list_stack = torch.stack(out_1_list, dim=0)
# print(out_1_list_stack)
#
# print('===========================================================')
#
# # out_1, out_2 = torch.chunk(x, layer_output_list[1].size()[0], dim=0)
# #
# # print(out_1.size())
# # print(out_2.size())
# #
# # out_3 = torch.stack([out_1, out_2], dim=0)
# #
# # print(out_3.size())
#
# # # gradient check
# # convlstm = ConvLSTM(input_channels=512, hidden_channels=[128, 64, 64, 32, 32], kernel_size=3, step=5,
# # effective_step=[4]).to(device)
# # loss_fn = torch.nn.MSELoss()
# #
# # input = torch.tensor(torch.randn(1, 2, 3, 16, 64)).to(device)
# # target = torch.tensor(torch.randn(1, 2, 32, 16, 64)).double().to(device)
# #
# # output = convlstm(input)
# # output = output[0][0].double()
# # res = torch.autograd.gradcheck(loss_fn, (output, target), eps=1e-6, raise_exception=True)
# # print(res)
| 36.601822
| 121
| 0.5525
| 7,001
| 56,257
| 4.205542
| 0.045422
| 0.050946
| 0.027001
| 0.036138
| 0.878341
| 0.864348
| 0.849845
| 0.83266
| 0.823388
| 0.819006
| 0
| 0.053983
| 0.303571
| 56,257
| 1,537
| 122
| 36.601822
| 0.697517
| 0.671063
| 0
| 0.715736
| 0
| 0
| 0.013039
| 0.008157
| 0
| 0
| 0
| 0.000651
| 0
| 1
| 0.076142
| false
| 0
| 0.043147
| 0.002538
| 0.175127
| 0.027919
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
b2ab5a015da177007e385ab94b1f672f98e3d2bb
| 1,557
|
py
|
Python
|
ll.py
|
shehan-9909/t-banner
|
8301b8668198d47d26a892e860a77b135fca6560
|
[
"Apache-2.0"
] | null | null | null |
ll.py
|
shehan-9909/t-banner
|
8301b8668198d47d26a892e860a77b135fca6560
|
[
"Apache-2.0"
] | null | null | null |
ll.py
|
shehan-9909/t-banner
|
8301b8668198d47d26a892e860a77b135fca6560
|
[
"Apache-2.0"
] | null | null | null |
# Obfuscated by Py Compile
# Created by HTR-TECH (https://github.com/htr-tech)
# Instagram : @tahmid.rayat
import marshal,zlib,base64
exec(marshal.loads(zlib.decompress(base64.b64decode("eJxFVMmuo1YQ5b1+Gb8ji5ZYMA+Wkig20zVgJjPY7MxwGYyZ4YG3+fAES91JqerUUd2jupvSiZFv8bHVX1sN2gbJlm9IhSDhf/wNCd++83ckfEdSBCm/IOkbUn4g6TtS/oAk78jfb99yk314G5y/ftn2Ff9sYQz49kmqLokvk+fmebWX3uTI1FbM+MgLmICGstoKZ0kS5MceNUAUmoQ2lH7kLT7nMqLO5KF65nWS0NrPM9pO6DyzC7WY4+yZkMNyjltAHDt1xX3ei2hKErqO1Ft8R6Fm1yBSKwqq/BkwIRrDUWcp7RgCgJozRh0IhsKgSldnHtyWo0TafhIoGbNvKkkeiwzemnNOE9LczIAmZTOzd85TKro28DIB8GFmrXbWSHuqM/kHP2cHRQzZZhjdrE6wmZWYE5ueiM/9hO+BufIgIWbWqnMQSSu+15g9qK5i5oFMZY62VQ1krpfokEcUvEe3WoKH4nxppftTVXO1vF9EX3XA2Pcnjzec6yPHE6x2UQztlNVmzbW3UbIeLFU7HFgaVcfzWonw2johKUO8M8Le8mYhwIe99VAWzQLkMkKrmR77XUbMvC9xhdcW9ojz3Rz55NRL0ME9HETPkFxldYa7q2Iy/K1ITpjsCTXRG2hwJsvHOuZCc8x4J+njUxC0eQkXwqLzHVX1kuiZebymyiwUc4JeHt1QnTs39qhkCifjJpTpjsLcPaWEweIcA8OJNVq9s5HQkJYlHImQPurg6pqNzbK67Cd1wdrl5VJH5WpMNj1vSyI3FZSAyuOqIUoFavtRvvSmObJcF7L3YOBSlQ3jnYh/8rqblN2ePqvGKdlVz8Ipu2qRmLHLL4c0GCMS5YqOk6GciVN9RF0ftTK64wK3dnST9O+4mFE+Xut9OMlhYe3D0nbHTma4izWyEZwE3jMgEOrI7VXc3bmrOmsCqz7U47L2GcOMTyZjcnm1fco0zYt3cgz8hGI14beLD8PdkZqmOlxMb8RYJSqMXO8lFPVVDQ/umJhJpBi3c+r06lgS4g0/ZV2ymFZ77xTv6micPGDgaS5ttgYBt1O62RJLfTXqe1bRT5GxxBDUp2hOOrwopx6EN8PulYrzRDL0CTj3lOEuAsiPeu3kN5sOkpwqIA+vSbkrp/vxKu0sl8bo3hsmQMg8hByHmfC5oh6wLAyFIjcO/AAsneWtHLMqBuVPxQXgKLzQaO1Ayprp+ZnNXItdACdxYTr3fDLrbAIt4klY2y0fME1Ph/iPrz9u/jH+tMHj1g/5rRpfTvWsimh8vUS3IWXp8YeNVs0tGcZfX/aVxs2j7dNhGH95aVj6NUnSry+j+x+G95c2G3/e2u+PJpmq9M+P7/Pf3v4FGamLlw=="))))
| 259.5
| 1,422
| 0.942197
| 68
| 1,557
| 21.573529
| 0.911765
| 0.009543
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.145455
| 0.010918
| 1,557
| 6
| 1,422
| 259.5
| 0.807143
| 0.064226
| 0
| 0
| 0
| 0.5
| 0.938102
| 0.938102
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| null | 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 10
|
a23b9ef0b81c61e18bdb48bea86d54470152de44
| 2,120
|
py
|
Python
|
tests/fixtures.py
|
jsbeckwith/entwiner
|
47e31d332a81ad3108a27cbe768663dc50ce2825
|
[
"Apache-2.0"
] | 1
|
2021-02-11T19:21:24.000Z
|
2021-02-11T19:21:24.000Z
|
tests/fixtures.py
|
jsbeckwith/entwiner
|
47e31d332a81ad3108a27cbe768663dc50ce2825
|
[
"Apache-2.0"
] | null | null | null |
tests/fixtures.py
|
jsbeckwith/entwiner
|
47e31d332a81ad3108a27cbe768663dc50ce2825
|
[
"Apache-2.0"
] | 1
|
2020-08-23T22:19:39.000Z
|
2020-08-23T22:19:39.000Z
|
import os
import pytest
from entwiner import DiGraphDB, DiGraphDBView
from .constants import FEATURES
# TODO: Use a dynamic path and embed this into core graph functionality, like a
# classmethod
GRAPH_PATH = "/tmp/test_graph.gpkg"
@pytest.fixture()
def G_test():
if os.path.exists(GRAPH_PATH):
os.remove(GRAPH_PATH)
G = DiGraphDB.create_graph(path=GRAPH_PATH)
# TODO: test integer node IDs as well as coordinates
edges = []
for feature in FEATURES["features"]:
start_x = round(feature["geometry"]["coordinates"][0][0], 7)
start_y = round(feature["geometry"]["coordinates"][0][1], 7)
end_x = round(feature["geometry"]["coordinates"][-1][0], 7)
end_y = round(feature["geometry"]["coordinates"][-1][1], 7)
u = f"{start_x}, {start_y}"
v = f"{end_x}, {end_y}"
d = {"geom": feature["geometry"]}
edges.append((u, v, d))
rev_coords = list(reversed(feature["geometry"]["coordinates"]))
d_rev = {"geom": {"type": "LineString", "coordinates": rev_coords}}
edges.append((v, u, d_rev))
G.add_edges_from(edges)
del G
G = DiGraphDBView(path=GRAPH_PATH)
return G
@pytest.fixture()
def G_test_writable():
if os.path.exists(GRAPH_PATH):
os.remove(GRAPH_PATH)
G = DiGraphDB.create_graph(path=GRAPH_PATH)
# TODO: test integer node IDs as well as coordinates
edges = []
for feature in FEATURES["features"]:
start_x = round(feature["geometry"]["coordinates"][0][0], 7)
start_y = round(feature["geometry"]["coordinates"][0][1], 7)
end_x = round(feature["geometry"]["coordinates"][-1][0], 7)
end_y = round(feature["geometry"]["coordinates"][-1][1], 7)
u = f"{start_x}, {start_y}"
v = f"{end_x}, {end_y}"
d = {"geom": feature["geometry"]}
edges.append((u, v, d))
rev_coords = list(reversed(feature["geometry"]["coordinates"]))
d_rev = {"geom": {"type": "LineString", "coordinates": rev_coords}}
edges.append((v, u, d_rev))
G.add_edges_from(edges)
return G
| 27.179487
| 79
| 0.610377
| 286
| 2,120
| 4.377622
| 0.237762
| 0.14377
| 0.207668
| 0.198083
| 0.809904
| 0.776358
| 0.776358
| 0.776358
| 0.776358
| 0.776358
| 0
| 0.014563
| 0.222642
| 2,120
| 77
| 80
| 27.532468
| 0.745146
| 0.092925
| 0
| 0.808511
| 0
| 0
| 0.198123
| 0
| 0
| 0
| 0
| 0.012987
| 0
| 1
| 0.042553
| false
| 0
| 0.085106
| 0
| 0.170213
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 10
|
a23ce0b8acb68f9f186675870267b5c794381022
| 134,180
|
py
|
Python
|
Smart_Process_Analytics.py
|
1212Prajwol-Pdl/SmartProcessAnalytics
|
b25b6e922e19cc61cfb9eb96395ad177af1daf71
|
[
"MIT"
] | 2
|
2020-11-18T02:50:06.000Z
|
2021-02-02T16:18:32.000Z
|
Smart_Process_Analytics.py
|
1212Prajwol-Pdl/SmartProcessAnalytics
|
b25b6e922e19cc61cfb9eb96395ad177af1daf71
|
[
"MIT"
] | 1
|
2021-09-09T15:52:53.000Z
|
2022-02-03T05:43:15.000Z
|
Smart_Process_Analytics.py
|
1212Prajwol-Pdl/SmartProcessAnalytics
|
b25b6e922e19cc61cfb9eb96395ad177af1daf71
|
[
"MIT"
] | 3
|
2021-02-02T16:18:34.000Z
|
2021-09-08T06:27:37.000Z
|
# -*- coding: utf-8 -*-
"""
Created on Wed Feb 19 00:56:16 2020
@author: Weike (Vicky) Sun vickysun@mit.edu/weike.sun93@gmail.com
(c) 2020 Weike Sun, all rights reserved
"""
import pandas as pd
import numpy as np
from dataset_property_new import nonlinearity_assess, collinearity_assess, residual_analysis, nonlinearity_assess_dynamic
from sklearn.preprocessing import StandardScaler
import matplotlib as mpl
mpl.style.use('default')
import warnings
warnings.filterwarnings('ignore')
"""
Decision Tree for Smart Process Analytics
"""
"""
Create Data Block
"""
print("""----------------------------------------------------
Please provide the following information using 'Yes=1' or 'No=0'
----------------------------------------------------""")
if_have_testing_data = int(input("Do you have a specific testing dataset you want to test? "))
if_time_series = int(input("The data is time-series? "))
if_interpretable = int(input("Do you require the model to be interpretable? "))
if_continuity = int(input("Do you require the model to be contiuous? e.g., use the model for an optimizer. "))
if_grouped = int(input("Is there any grouping in your measurements? e.g., replicated measurements. "))
if not if_grouped:
group =None
if_spectra = int(input("Spectral data? "))
if_plot_interrogation = int(input("Do you want to visualize the data interrogation results? "))
if_time = int(input("Do you have time for nested cross-validation? "))
if_robust = int(input("Do you prioritize robustness over accuracy? "))
print('')
print("""----------------------------------------------------
Please provide the following information using 'Yes=1', 'No=0', or 'Unknown=2'
---------------------------------------------------- """)
if_enough = int(input("Do you think you have enough data to characterize the underlying process complexity? "))
if_nonlinear = int(input("Do you believe your model should be nonlinear? For spectral data, the linear model is used. "))
if if_spectra:
if_nonlinear = 0
if_multicollinear= int(input("Do you believe there is siginificant collinearity in your data? "))
if_dynamic = int(input("Do you believe the dynamic model is neccessary? "))
if if_dynamic != 0 and if_time_series == 0:
print('Warining*Your data is not time series data, so only static model should be considered.*')
if_dynamic = 0
if_stability = int(input("Do you require information of model stability given enough time? "))
print('')
print("""----------------------------------------------------
Please provide the file name, e.g., mydata.txt:
----------------------------------------------------""")
Data_name = input("Name of your data file (Should have dimension N x (m+1), last column for predicted variable) ")
#load data
if Data_name[-3:] == 'txt':
if int(input('Is there delimiter (,) in your txt file? ')):
Data = np.loadtxt(Data_name, delimiter=',')
else:
Data = np.loadtxt(Data_name)
elif Data_name[-3:] == 'lsx':
Data = pd.read_excel(Data_name, header = None)
Data = np.array(Data)
else:
print("Please convert data type to '.txt' or '.xlsx'")
X_original = Data[:,0:-1]
y_original = Data[:,-1].reshape(-1,1)
m = np.shape(X_original)[1]
N = np.shape(X_original)[0]
if if_have_testing_data:
Test_data_name = input("Please provide test dataset name: ")
if Test_data_name[-3:] == 'txt':
if int(input('Is there delimiter (,) in your txt file? ')):
Test_data = np.loadtxt(Test_data_name, delimiter = ',')
else:
Test_data = np.loadtxt(Test_data_name)
elif Test_data_name[-3:] == 'lsx':
Test_data = pd.read_excel(Test_data_name, header = None)
Test_data = np.array(Test_data)
else:
print("Please convert test data type to '.txt' or '.xlsx'")
X_test_original = Test_data[:,0:-1]
y_test_original = Test_data[:,-1].reshape(-1,1)
N_test = np.shape(X_test_original)[0]
else:
X_test_original = None
y_test_original = None
"""
Assess Data Property
"""
round_number = 0
print('')
print("""----------------------------------------------------
Please provide the following information to assess data [Yes:1 No:0]:
----------------------------------------------------""")
if int(input("Is there any categorical variable in your X? ")):
cat = list(map(int,input("Enter a series of indicator for which variable is categorical: e.g., 1 0 0 represents the 1st variable is a categorical variable. ").strip().split()))[:m]
else:
cat = None
if int(input("Do you have varaibles names you want to use in the figures? [Yes 1 No 0]: ")):
xticks = list(map(str,input("Enter a series of x variable name: e.g., x1 x2 x3. ").strip().split()))[:m]
yticks = list(input("Enter the name of y variable: ").strip().split())[:1]
else:
xticks = None
yticks = None
if int(input("Do you have a significance level to use? ")):
alpha = float(input("Provide the significance level: "))
else:
alpha = 0.01
if if_nonlinear == 2:
if_nonlinear = nonlinearity_assess(X_original, y_original, if_plot_interrogation, cat = cat,alpha = alpha, difference = 0.4, xticks = xticks, yticks = yticks, round_number = round_number)
if if_nonlinear == 0 and if_dynamic == 1:
lag = int(input('The lag number you want to use to assess nonlinear dyanmics: '))
if_nonlinear_dynamic = nonlinearity_assess_dynamic(X_original, y_original, if_plot_interrogation, alpha = alpha, difference = 0.4, xticks = xticks, yticks = yticks, round_number = round_number,lag= lag)
if if_nonlinear_dynamic ==1:
if_nonlinear = 1
if if_multicollinear == 2:
if_multicollinear = int(collinearity_assess(X_original, y_original, if_plot_interrogation, xticks = xticks, yticks = yticks, round_number = round_number))
"""
Select the Model
"""
if int(input('Do you have a specific model in the data analytical traingle that you want to use? ')):
model_name = list(map(str,input('Please provide the model name: [ALVEN/SVR/RF/EN/SPLS/RR/PLS or DALVEN or RNN or SS]. Note you can not test static and dynamic model at the same time. If you put in the static model name and then there is significant dynamics in the residual and you did not answer 0 to "do you want a dynamic model", the dyanmic model will be tested automatically after that. ').strip().split()))
else:
print('')
print("""----------------------------------------------------
Based on the information of data characteristics, the following methods are selected:
----------------------------------------------------""")
model_name = None
if if_nonlinear == 1:
if if_dynamic == 0 or if_dynamic == 2:
print('The nonlinear model is selected:')
if if_enough == 0:
print('Because you have limited data, ALVEN is recommonded.')
model_name = ['ALVEN']
elif if_interpretable == 1:
print('Because you would like an interpretable model, ALVEN is recommonded.')
model_name = ['ALVEN']
elif if_continuity == 1:
print('Because you ask for continuity, ALVEN/SVR are recommonded.')
model_name = ['ALVEN','SVR']
else:
print('The nonlinear models, ALVEN/SVR/RF, will be tested.')
model_name = ['ALVEN','SVR','RF']
if if_dynamic == 1:
print('The nonlinear dynamic model is selected:')
if if_enough == 0 :
print('Because you have limited data, DALVEN is recommonded.')
model_name = ['DALVEN']
elif if_interpretable == 1:
print('Because you would like an interpretable model, DALVEN is recommonded.')
model_name = ['DALVEN']
else:
print('Because you have engough data and do not require interpretability, RNN is recommonded.')
model_name = ['RNN']
else:
if if_dynamic == 0 or if_dynamic ==2:
if if_multicollinear == 0:
print('There is no significant nonlinearity and multicollinearity in the data, OLS is recommonded.')
model_name = ['OLS']
else:
if if_spectra:
print('Because you have spectral data, RR/PLS are recommonded.')
model_name = ['RR','PLS']
elif if_interpretable:
print('Because you want interpretability, EN/SOLS are recommonded.')
model_name = ['EN','SPLS']
else:
print('There is significant multicollinearity, EN/SPLS/RR/PLS are recommonded.')
model_name = ['EN','SPLS','RR','PLS']
else:
print('There is significant dynamics and multicolinearity, CVA/SSARX/MOSEP are recommonded.')
model_name = ['SS']
"""
Select Cross-Validation Strategy
"""
nested_flag = 0
cv_method = None
one_std = 0
grouped = 0
if 'OLS' in model_name:
print("")
print('OLS is selected, no cross-validation is needed.')
elif int(input('Do you have a specific cross-validation method that you want to use? ')):
cv_method = input('Please provide the name of cross-validation method: ')
if if_grouped:
grouped = 1
print('Since you have grouped data, please provide the group lable of each variable in a Nx1 format.')
group_name = input('Please provide the file name of the label: (e.g. label.txt) ')
if group_name[-3:] == 'txt':
if int(input('Is there delimiter (,) in your txt file? ')):
group = np.loadtxt(group_name, delimiter=',')
else:
group = np.loadtxt(group_name)
elif group_name[-3:] == 'lsx':
group = pd.read_excel(group_name, header = None)
group = np.array(group)
else:
print("Please convert data type to '.txt' or '.xlsx'")
if if_robust==1:
one_std = 1
if if_stability ==1:
nested_flag = 1
else:
print('')
print("""----------------------------------------------------
Based on the information of data attributes, the cross-validation strategy is selected as:
----------------------------------------------------""")
if if_dynamic != 1:
if not if_grouped:
if if_enough == 1:
cv_method = 'Single'
print('Single validation set is used.')
else:
if if_time == 1:
if if_stability == 1:
if if_robust == 1:
cv_method = 'Re_KFold'
nested_flag = 1
one_std = 1
print('Nested CV with repeated KFold in inner loop and one-std rule is selected')
else:
cv_method = 'Re_KFold'
nested_flag = 1
print('Nested CV with repeated KFold in inner loop is selected')
else:
if if_robust == 1:
if int(input('Do you want to select beweent KFold/MC/Re_KFold? default: Re_Kfold. ')):
cv_method = input('Plese provide the CV method name: ')
one_std = 1
print(cv_method + ' with one-std rule is selected.')
else:
one_std = 1
cv_method = 'Re_KFold'
print('Repeated KFold with one-std rule is selected.')
else:
if int(input('Do you want to select beweent KFold/MC/Re_KFold? default: Re_Kfold. ')):
cv_method = input('Plese provide the CV method name: ')
print(cv_method + ' is selected.')
else:
cv_method = 'Re_KFold'
print('Repated KFold is selected.')
else:
if if_robust == 1:
if int(input('Do you want to select beweent KFold/MC/Re_KFold? default: Re_Kfold. ')):
cv_method = input('Plese provide the CV method name: ')
one_std = 1
print(cv_method + ' with one-std rule is selected.')
else:
one_std = 1
cv_method = 'Re_KFold'
print('Repeated KFold with one-std rule is selected.')
else:
if int(input('Do you want to select beweent KFold/MC/Re_KFold? default: Re_Kfold. ')):
cv_method = input('Plese provide the CV method name: ')
print(cv_method + ' is selected.')
else:
cv_method = 'Re_KFold'
print('Repated KFold is selected.')
else:
grouped = 1
print('Since you have grouped data, please provide the group lable of each variable in a Nx1 format.')
group_name = input('Please provide the file name of the label: (e.g. label.txt) ')
if group_name[-3:] == 'txt':
if int(input('Is there delimiter (,) in your txt file? ')):
group = np.loadtxt(group_name, delimiter=',')
else:
group = np.loadtxt(group_name)
elif group_name[-3:] == 'lsx':
group = pd.read_excel(group_name, header = None)
group = np.array(group)
else:
print("Please convert data type to '.txt' or '.xlsx'")
if if_enough == 1:
cv_method = 'Single_group'
print('Single grouped CV is selected')
else:
if if_time == 1:
if if_stability == 1:
if if_robust == 1:
one_std = 1
nested_flag = 1
cv_method = 'GroupKFold'
print('Nested grouped Kfold with one std rule is selected.')
else:
nested_flag = 1
cv_method = 'GroupKFold'
print('Nested grouped Kfold is selected.')
else:
if if_robust == 1:
one_std = 1
cv_method = 'GroupKFold'
print('Grouped Kfold with one std rule is selected.')
else:
cv_method = 'GroupKFold'
print('Grouped Kfold is selected.')
else:
if if_robust == 1:
one_std = 1
cv_method = 'GroupKFold'
print('Grouped Kfold with one std rule is selected.')
else:
cv_method = 'GroupKFold'
print('Grouped Kfold is selected.')
else:
if model_name == ['SS']:
print('MATLAB/ADAPTx packges with information criterion will be used')
else:
if if_enough == 1:
cv_method = 'Single_ordered'
print('Single validation is used for time series modeling.')
else:
if if_time:
if if_robust:
cv_method = 'Timeseries'
one_std = 1
print('Cross-validation for time series with one std rule is selected.')
else:
cv_method = 'Timeseries'
print('Cross-validation for time series is selected.')
else:
cv_method = 'IC'
print('Information criteria is selected.')
if if_robust:
one_std = 1
print('')
print("""----------------------------------------------------
Start Model Fitting
----------------------------------------------------""")
round_number = 1
from copy import deepcopy
########################### data preprocessing
X=deepcopy(X_original)
y=deepcopy(y_original)
scaler_x = StandardScaler(with_mean=True, with_std=True)
scaler_x.fit(X)
X_scale = scaler_x.transform(X)
scaler_y = StandardScaler(with_mean=True, with_std=True)
scaler_y.fit(y)
y_scale = scaler_y.transform(y)
if X_test_original is not None:
X_test = deepcopy(X_test_original)
y_test = deepcopy(y_test_original)
X_test_scale = scaler_x.transform(X_test)
y_test_scale = scaler_y.transform(y_test)
else:
X_test = X
y_test = y
X_test_scale =X_scale
y_test_scale =y_scale
############################ model fitting 1st round
fitting_result = {}
if 'OLS' in model_name:
from regression_models import OLS_fitting
final_model, model_params, mse_train, mse_test, yhat_train, yhat_test = OLS_fitting(X_scale, y_scale, X_test_scale, y_test_scale, 0)
fitting_result['OLS'] = {'final_model':final_model, 'model_params':model_params, 'mse_train':mse_train, 'mse_test':mse_test, 'yhat_train':yhat_train, 'yhat_test':yhat_test}
selected_model = 'OLS'
yhat_test = scaler_y.inverse_transform(yhat_test)
_, if_dynamic = residual_analysis(X_test, y_test, yhat_test, alpha = alpha, round_number = round_number)
if if_dynamic != 0:
print('The first round static fitting is done, check if nonlinear model is neccesarry')
if if_dynamic:
print('There is significant dynamic in the residual, dyanmic model will be fitted in the 2nd round')
round_number = 2
else:
print('--------------Analysis Is Done--------------')
else:
print('--------------Analysis Is Done--------------')
elif if_dynamic == 2:
if not one_std:
#use static cross-validation for this round and traditional cv
import cv_final as cv
K_fold = int(input('Number of K-fold you want to use, or the fold number you want to use in single validation 1/K, if not known input 5: '))
Nr = int(input('Number of repetition (if have in CV) you want to use, if not known input 10: '))
alpha_num = int(input('Number of penalty weight you want to consider in RR/EN/ALVEN, if not known input 20: '))
if not nested_flag:
print('------Model Construction------')
val_err = np.zeros(len(model_name))
index = 0
fitting1_result_trial = {}
for model_index in model_name:
if model_index == 'ALVEN':
model_hyper,final_model, model_params, mse_train, mse_test, yhat_train, yhat_test, MSE_val, final_list = cv.CV_mse(model_index, X, y, X_test, y_test, cv_type = cv_method, group = group, K_fold = K_fold, Nr= Nr, alpha_num=alpha_num, label_name=True)
fitting1_result_trial[model_index] = {'model_hyper':model_hyper,'final_model':final_model, 'model_params':model_params, 'mse_train':mse_train, 'mse_test':mse_test, 'yhat_train':yhat_train, 'yhat_test':yhat_test, 'MSE_val':MSE_val, 'final_list':final_list}
val_err[index] = MSE_val
elif model_index == 'SVR' or model_index == 'RF':
model_hyper,final_model, mse_train, mse_test, yhat_train, yhat_test, MSE_val = cv.CV_mse(model_index, X_scale, y_scale, X_test_scale, y_test_scale, cv_type = cv_method, group = group, K_fold = K_fold, Nr= Nr, alpha_num=alpha_num)
fitting1_result_trial[model_index] = {'model_hyper':model_hyper,'final_model':final_model, 'mse_train':mse_train, 'mse_test':mse_test, 'yhat_train':yhat_train, 'yhat_test':yhat_test, 'MSE_val':MSE_val}
val_err[index] = MSE_val
else:
model_hyper,final_model, model_params, mse_train, mse_test, yhat_train, yhat_test, MSE_val = cv.CV_mse(model_index, X_scale, y_scale, X_test_scale, y_test_scale, cv_type = cv_method, group = group, K_fold = K_fold, Nr= Nr, alpha_num=alpha_num)
fitting1_result_trial[model_index] = {'model_hyper':model_hyper,'final_model':final_model, 'model_params':model_params, 'mse_train':mse_train, 'mse_test':mse_test, 'yhat_train':yhat_train, 'yhat_test':yhat_test, 'MSE_val': MSE_val}
val_err[index] = MSE_val
index += 1
if len(model_name) > 1:
print('Select the best model from the small candidate pool based on validation error:')
selected_model = model_name[np.argmin(val_err)]
print('*****'+selected_model + ' is selected.'+'*****')
else:
selected_model = model_name[0]
fitting_result[selected_model]=fitting1_result_trial[selected_model]
yhat_test = scaler_y.inverse_transform(fitting_result[selected_model]['yhat_test'])
_, if_dynamic = residual_analysis(X_test, y_test, yhat_test, alpha = alpha, round_number = round_number)
print('The first round static fitting is done, check if nonlinear model is neccesarry')
if if_dynamic:
print('There is significant dynamic in the residual, dyanmic model will be fitted in the 2nd round')
round_number = 2
else:
print('--------------Analysis Is Done--------------')
else:
print('Nested CV is used and the model selection if necessary is based on testing set in the outter loop')
if not grouped:
num_outter = int(input('How many number of outter loop you want to use in Nested CV? if not known input 10: '))
print('------Model Construction------')
from sklearn.model_selection import train_test_split
test_nest_err = np.zeros((len(model_name),num_outter))
for index_out in range(num_outter):
X_nest, X_nest_test, y_nest, y_nest_test = train_test_split(X, y, test_size=1/K_fold, random_state= index_out)
X_nest_scale, X_nest_scale_test, y_nest_scale, y_nest_scale_test = train_test_split(X_scale, y_scale, test_size=1/K_fold, random_state= index_out)
index = 0
for model_index in model_name:
if model_index == 'ALVEN':
model_hyper,final_model, model_params, mse_train, mse_test, yhat_train, yhat_test, MSE_val, final_list = cv.CV_mse(model_index, X_nest, y_nest, X_nest_test, y_nest_test, cv_type = cv_method, group = group, K_fold = K_fold, Nr= Nr, alpha_num=alpha_num, label_name=True)
test_nest_err[index,index_out] = mse_test
elif model_index == 'SVR' or model_index == 'RF':
model_hyper,final_model, mse_train, mse_test, yhat_train, yhat_test, MSE_val = cv.CV_mse(model_index, X_nest_scale, y_nest_scale, X_nest_scale_test, y_nest_scale_test, cv_type = cv_method, group = group, K_fold = K_fold, Nr= Nr, alpha_num=alpha_num)
test_nest_err[index,index_out] = mse_test
else:
model_hyper,final_model, model_params, mse_train, mse_test, yhat_train, yhat_test, MSE_val = cv.CV_mse(model_index, X_nest_scale, y_nest_scale, X_nest_scale_test, y_nest_scale_test, cv_type = cv_method, group = group, K_fold = K_fold, Nr= Nr, alpha_num=alpha_num)
test_nest_err[index,index_out] = mse_test
index += 1
print('The nested CV testing MSE result:')
import matplotlib.pyplot as plt
plt.figure()
pos = [i+1 for i in range(len(model_name))]
ax=plt.subplot(111)
plt.violinplot(np.transpose(test_nest_err))
ax.set_xticks(pos)
ax.set_xticklabels(model_name)
ax.set_title('Testing MSE distribution using nested CV')
if len(model_name) > 1:
print('Select the best model from the small candidate pool based on nested test error:')
selected_model = model_name[np.argmin(np.mean(test_nest_err,axis=1))]
print('*****'+selected_model + ' is selected.*****')
else:
selected_model = model_name[0]
print('Final model fitting')
if selected_model == 'ALVEN':
model_hyper,final_model, model_params, mse_train, mse_test, yhat_train, yhat_test, MSE_val, final_list = cv.CV_mse(selected_model, X, y, X_test, y_test, cv_type = cv_method, group = group, K_fold = K_fold, Nr= Nr, alpha_num=alpha_num, label_name=True)
fitting_result[selected_model] = {'model_hyper':model_hyper,'final_model':final_model, 'model_params':model_params, 'mse_train':mse_train, 'mse_test':mse_test, 'yhat_train':yhat_train, 'yhat_test':yhat_test, 'MSE_val':MSE_val, 'final_list':final_list}
elif selected_model == 'SVR' or selected_model == 'RF':
model_hyper,final_model, mse_train, mse_test, yhat_train, yhat_test, MSE_val = cv.CV_mse(selected_model, X_scale, y_scale, X_test_scale, y_test_scale, cv_type = cv_method, group = group, K_fold = K_fold, Nr= Nr, alpha_num=alpha_num)
fitting_result[selected_model] = {'model_hyper':model_hyper,'final_model':final_model, 'mse_train':mse_train, 'mse_test':mse_test, 'yhat_train':yhat_train, 'yhat_test':yhat_test, 'MSE_val':MSE_val}
else:
model_hyper,final_model, model_params, mse_train, mse_test, yhat_train, yhat_test, MSE_val = cv.CV_mse(selected_model, X_scale, y_scale, X_test_scale, y_test_scale, cv_type = cv_method, group = group, K_fold = K_fold, Nr= Nr, alpha_num=alpha_num)
fitting_result[selected_model] = {'model_hyper':model_hyper,'final_model':final_model, 'model_params':model_params, 'mse_train':mse_train, 'mse_test':mse_test, 'yhat_train':yhat_train, 'yhat_test':yhat_test, 'MSE_val': MSE_val}
yhat_test = scaler_y.inverse_transform(yhat_test)
_, if_dynamic = residual_analysis(X_test, y_test, yhat_test, alpha = alpha, round_number = round_number)
print('The first round static fitting is done, check if nonlinear model is neccesarry')
if if_dynamic:
print('There is significant dynamic in the residual, dyanmic model will be fitted in the 2nd round')
round_number = 2
else:
print('--------------Analysis Is Done--------------')
else:
from sklearn.model_selection import LeaveOneGroupOut
print('Leave one group out will be used in the outer loop')
print('------Model Construction------')
test_nest_err = np.zeros((len(model_name), len(np.unique(group))))
logo = LeaveOneGroupOut()
index_out = 0
for train, test in logo.split(X, y.flatten(), groups=group.flatten()):
index = 0
for model_index in model_name:
if model_index == 'ALVEN':
model_hyper,final_model, model_params, mse_train, mse_test, yhat_train, yhat_test, MSE_val, final_list = cv.CV_mse(model_index, X[train], y[train], X[test], y[test], cv_type = cv_method, group = group[train], K_fold = K_fold, Nr= Nr, alpha_num=alpha_num, label_name=True)
test_nest_err[index,index_out] = mse_test
elif model_index == 'SVR' or model_index == 'RF':
model_hyper,final_model, mse_train, mse_test, yhat_train, yhat_test, MSE_val = cv.CV_mse(model_index, X_scale[train], y_scale[train], X_scale[test], y_scale[test], cv_type = cv_method, group = group[train], K_fold = K_fold, Nr= Nr, alpha_num=alpha_num)
test_nest_err[index,index_out] = mse_test
else:
model_hyper,final_model, model_params, mse_train, mse_test, yhat_train, yhat_test, MSE_val = cv.CV_mse(model_index, X_scale[train], y_scale[train], X_scale[test], y_scale[test], cv_type = cv_method, group = group[train], K_fold = K_fold, Nr= Nr, alpha_num=alpha_num)
test_nest_err[index,index_out] = mse_test
index += 1
index_out +=1
print('The nested CV testing MSE result:')
import matplotlib.pyplot as plt
plt.figure()
pos = [i+1 for i in range(len(model_name))]
ax=plt.subplot(111)
plt.violinplot(np.transpose(test_nest_err))
ax.set_xticks(pos)
ax.set_xticklabels(model_name)
ax.set_title('Testing MSE distribution using nested CV')
if len(model_name) > 1:
print('Select the best model from the small candidate pool based on nested test error:')
selected_model = model_name[np.argmin(np.mean(test_nest_err,axis=1))]
print('*****'+selected_model + ' is selected.*****')
else:
selected_model = model_name[0]
print('------Final model fitting-------')
if selected_model == 'ALVEN':
model_hyper,final_model, model_params, mse_train, mse_test, yhat_train, yhat_test, MSE_val, final_list = cv.CV_mse(selected_model, X, y, X_test, y_test, cv_type = cv_method, group = group, K_fold = K_fold, Nr= Nr, alpha_num=alpha_num, label_name=True)
fitting_result[selected_model] = {'model_hyper':model_hyper,'final_model':final_model, 'model_params':model_params, 'mse_train':mse_train, 'mse_test':mse_test, 'yhat_train':yhat_train, 'yhat_test':yhat_test, 'MSE_val':MSE_val, 'final_list':final_list}
elif selected_model == 'SVR' or selected_model == 'RF':
model_hyper,final_model, mse_train, mse_test, yhat_train, yhat_test, MSE_val = cv.CV_mse(selected_model, X_scale, y_scale, X_test_scale, y_test_scale, cv_type = cv_method, group = group, K_fold = K_fold, Nr= Nr, alpha_num=alpha_num)
fitting_result[selected_model] = {'model_hyper':model_hyper,'final_model':final_model, 'mse_train':mse_train, 'mse_test':mse_test, 'yhat_train':yhat_train, 'yhat_test':yhat_test, 'MSE_val':MSE_val}
else:
model_hyper,final_model, model_params, mse_train, mse_test, yhat_train, yhat_test, MSE_val = cv.CV_mse(selected_model, X_scale, y_scale, X_test_scale, y_test_scale, cv_type = cv_method, group = group, K_fold = K_fold, Nr= Nr, alpha_num=alpha_num)
fitting_result[selected_model] = {'model_hyper':model_hyper,'final_model':final_model, 'model_params':model_params, 'mse_train':mse_train, 'mse_test':mse_test, 'yhat_train':yhat_train, 'yhat_test':yhat_test, 'MSE_val': MSE_val}
yhat_test = scaler_y.inverse_transform(yhat_test)
_, if_dynamic = residual_analysis(X_test, y_test, yhat_test, alpha = alpha, round_number = round_number)
print('The first round static fitting is done, check if nonlinear model is neccesarry')
if if_dynamic:
print('There is significant dynamic in the residual, dyanmic model will be fitted in the 2nd round')
round_number = 2
else:
print('--------------Analysis Is Done--------------')
else:
#use static cross-validation for this round and traditional cv
import cv_final_onestd as cv_std
K_fold = int(input('Number of K-fold you want to use, or the fold number you want to use in single validation 1/K, if not known input 5: '))
Nr = int(input('Number of repetition (if have in CV) you want to use, if not known input 10: '))
alpha_num = int(input('Number of penalty weight you want to consider in RR/EN/ALVEN, if not known input 20: '))
if not nested_flag:
print('------Model Construction------')
val_err = np.zeros(len(model_name))
index = 0
fitting1_result_trial = {}
for model_index in model_name:
if model_index == 'ALVEN':
model_hyper,final_model, model_params, mse_train, mse_test, yhat_train, yhat_test, MSE_val, final_list = cv_std.CV_mse(model_index, X, y, X_test, y_test, cv_type = cv_method, group = group, K_fold = K_fold, Nr= Nr, alpha_num=alpha_num, label_name=True)
fitting1_result_trial[model_index] = {'model_hyper':model_hyper,'final_model':final_model, 'model_params':model_params, 'mse_train':mse_train, 'mse_test':mse_test, 'yhat_train':yhat_train, 'yhat_test':yhat_test, 'MSE_val':MSE_val, 'final_list':final_list}
val_err[index] = MSE_val
elif model_index == 'SVR' or model_index == 'RF':
model_hyper,final_model, mse_train, mse_test, yhat_train, yhat_test, MSE_val = cv_std.CV_mse(model_index, X_scale, y_scale, X_test_scale, y_test_scale, cv_type = cv_method, group = group, K_fold = K_fold, Nr= Nr, alpha_num=alpha_num)
fitting1_result_trial[model_index] = {'model_hyper':model_hyper,'final_model':final_model, 'mse_train':mse_train, 'mse_test':mse_test, 'yhat_train':yhat_train, 'yhat_test':yhat_test, 'MSE_val':MSE_val}
val_err[index] = MSE_val
else:
model_hyper,final_model, model_params, mse_train, mse_test, yhat_train, yhat_test, MSE_val = cv_std.CV_mse(model_index, X_scale, y_scale, X_test_scale, y_test_scale, cv_type = cv_method, group = group, K_fold = K_fold, Nr= Nr, alpha_num=alpha_num)
fitting1_result_trial[model_index] = {'model_hyper':model_hyper,'final_model':final_model, 'model_params':model_params, 'mse_train':mse_train, 'mse_test':mse_test, 'yhat_train':yhat_train, 'yhat_test':yhat_test, 'MSE_val': MSE_val}
val_err[index] = MSE_val
index += 1
if len(model_name) > 1:
print('Select the best model from the small candidate pool based on validation error:')
selected_model = model_name[np.argmin(val_err)]
print('*****'+selected_model + ' is selected.'+'*****')
else:
selected_model = model_name[0]
fitting_result[selected_model]=fitting1_result_trial[selected_model]
yhat_test = scaler_y.inverse_transform(fitting_result[selected_model]['yhat_test'])
_, if_dynamic = residual_analysis(X_test, y_test, yhat_test, alpha = alpha, round_number = round_number)
print('The first round static fitting is done, check if nonlinear model is neccesarry')
if if_dynamic:
print('There is significant dynamic in the residual, dyanmic model will be fitted in the 2nd round')
round_number = 2
else:
print('--------------Analysis Is Done--------------')
else:
print('Nested CV is used and the model selection if necessary is based on testing set in the outter loop')
if not grouped:
num_outter = int(input('How many number of outter loop you want to use in Nested CV? if not known input 10: '))
print('------Model Construction------')
from sklearn.model_selection import train_test_split
test_nest_err = np.zeros((len(model_name),num_outter))
for index_out in range(num_outter):
X_nest, X_nest_test, y_nest, y_nest_test = train_test_split(X, y, test_size=1/K_fold, random_state= index_out)
X_nest_scale, X_nest_scale_test, y_nest_scale, y_nest_scale_test = train_test_split(X_scale, y_scale, test_size=1/K_fold, random_state= index_out)
index = 0
for model_index in model_name:
if model_index == 'ALVEN':
model_hyper,final_model, model_params, mse_train, mse_test, yhat_train, yhat_test, MSE_val, final_list = cv_std.CV_mse(model_index, X_nest, y_nest, X_nest_test, y_nest_test, cv_type = cv_method, group = group, K_fold = K_fold, Nr= Nr, alpha_num=alpha_num, label_name=True)
test_nest_err[index,index_out] = mse_test
elif model_index == 'SVR' or model_index == 'RF':
model_hyper,final_model, mse_train, mse_test, yhat_train, yhat_test, MSE_val = cv_std.CV_mse(model_index, X_nest_scale, y_nest_scale, X_nest_scale_test, y_nest_scale_test, cv_type = cv_method, group = group, K_fold = K_fold, Nr= Nr, alpha_num=alpha_num)
test_nest_err[index,index_out] = mse_test
else:
model_hyper,final_model, model_params, mse_train, mse_test, yhat_train, yhat_test, MSE_val = cv_std.CV_mse(model_index, X_nest_scale, y_nest_scale, X_nest_scale_test, y_nest_scale_test, cv_type = cv_method, group = group, K_fold = K_fold, Nr= Nr, alpha_num=alpha_num)
test_nest_err[index,index_out] = mse_test
index += 1
print('The nested CV testing MSE result:')
import matplotlib.pyplot as plt
plt.figure()
pos = [i+1 for i in range(len(model_name))]
ax=plt.subplot(111)
plt.violinplot(np.transpose(test_nest_err))
ax.set_xticks(pos)
ax.set_xticklabels(model_name)
ax.set_title('Testing MSE distribution using nested CV')
if len(model_name) > 1:
print('Select the best model from the small candidate pool based on nested test error:')
selected_model = model_name[np.argmin(np.mean(test_nest_err,axis=1))]
print('*****'+selected_model + ' is selected.*****')
else:
selected_model = model_name[0]
print('Final model fitting')
if selected_model == 'ALVEN':
model_hyper,final_model, model_params, mse_train, mse_test, yhat_train, yhat_test, MSE_val, final_list = cv_std.CV_mse(selected_model, X, y, X_test, y_test, cv_type = cv_method, group = group, K_fold = K_fold, Nr= Nr, alpha_num=alpha_num, label_name=True)
fitting_result[selected_model] = {'model_hyper':model_hyper,'final_model':final_model, 'model_params':model_params, 'mse_train':mse_train, 'mse_test':mse_test, 'yhat_train':yhat_train, 'yhat_test':yhat_test, 'MSE_val':MSE_val, 'final_list':final_list}
elif selected_model == 'SVR' or selected_model == 'RF':
model_hyper,final_model, mse_train, mse_test, yhat_train, yhat_test, MSE_val = cv_std.CV_mse(selected_model, X_scale, y_scale, X_test_scale, y_test_scale, cv_type = cv_method, group = group, K_fold = K_fold, Nr= Nr, alpha_num=alpha_num)
fitting_result[selected_model] = {'model_hyper':model_hyper,'final_model':final_model, 'mse_train':mse_train, 'mse_test':mse_test, 'yhat_train':yhat_train, 'yhat_test':yhat_test, 'MSE_val':MSE_val}
else:
model_hyper,final_model, model_params, mse_train, mse_test, yhat_train, yhat_test, MSE_val = cv_std.CV_mse(selected_model, X_scale, y_scale, X_test_scale, y_test_scale, cv_type = cv_method, group = group, K_fold = K_fold, Nr= Nr, alpha_num=alpha_num)
fitting_result[selected_model] = {'model_hyper':model_hyper,'final_model':final_model, 'model_params':model_params, 'mse_train':mse_train, 'mse_test':mse_test, 'yhat_train':yhat_train, 'yhat_test':yhat_test, 'MSE_val': MSE_val}
yhat_test = scaler_y.inverse_transform(yhat_test)
_, if_dynamic = residual_analysis(X_test, y_test, yhat_test, alpha = alpha, round_number = round_number)
print('The first round static fitting is done, check if nonlinear model is neccesarry')
if if_dynamic:
print('There is significant dynamic in the residual, dyanmic model will be fitted in the 2nd round')
round_number = 2
else:
print('--------------Analysis Is Done--------------')
else:
from sklearn.model_selection import LeaveOneGroupOut
print('Leave one group out will be used in the outer loop')
print('------Model Construction------')
test_nest_err = np.zeros((len(model_name), len(np.unique(group))))
logo = LeaveOneGroupOut()
index_out = 0
for train, test in logo.split(X, y.flatten(), groups=group.flatten()):
index = 0
for model_index in model_name:
if model_index == 'ALVEN':
model_hyper,final_model, model_params, mse_train, mse_test, yhat_train, yhat_test, MSE_val, final_list = cv_std.CV_mse(model_index, X[train], y[train], X[test], y[test], cv_type = cv_method, group = group[train], K_fold = K_fold, Nr= Nr, alpha_num=alpha_num, label_name=True)
test_nest_err[index,index_out] = mse_test
elif model_index == 'SVR' or model_index == 'RF':
model_hyper,final_model, mse_train, mse_test, yhat_train, yhat_test, MSE_val = cv_std.CV_mse(model_index, X_scale[train], y_scale[train], X_scale[test], y_scale[test], cv_type = cv_method, group = group[train], K_fold = K_fold, Nr= Nr, alpha_num=alpha_num)
test_nest_err[index,index_out] = mse_test
else:
model_hyper,final_model, model_params, mse_train, mse_test, yhat_train, yhat_test, MSE_val = cv_std.CV_mse(model_index, X_scale[train], y_scale[train], X_scale[test], y_scale[test], cv_type = cv_method, group = group[train], K_fold = K_fold, Nr= Nr, alpha_num=alpha_num)
test_nest_err[index,index_out] = mse_test
index += 1
index_out +=1
print('The nested CV testing MSE result:')
import matplotlib.pyplot as plt
plt.figure()
pos = [i+1 for i in range(len(model_name))]
ax=plt.subplot(111)
plt.violinplot(np.transpose(test_nest_err))
ax.set_xticks(pos)
ax.set_xticklabels(model_name)
ax.set_title('Testing MSE distribution using nested CV')
if len(model_name) > 1:
print('Select the best model from the small candidate pool based on nested test error:')
selected_model = model_name[np.argmin(np.mean(test_nest_err,axis=1))]
print('*****'+selected_model + ' is selected.*****')
else:
selected_model = model_name[0]
print('------Final model fitting-------')
if selected_model == 'ALVEN':
model_hyper,final_model, model_params, mse_train, mse_test, yhat_train, yhat_test, MSE_val, final_list = cv_std.CV_mse(selected_model, X, y, X_test, y_test, cv_type = cv_method, group = group, K_fold = K_fold, Nr= Nr, alpha_num=alpha_num, label_name=True)
fitting_result[selected_model] = {'model_hyper':model_hyper,'final_model':final_model, 'model_params':model_params, 'mse_train':mse_train, 'mse_test':mse_test, 'yhat_train':yhat_train, 'yhat_test':yhat_test, 'MSE_val':MSE_val, 'final_list':final_list}
elif selected_model == 'SVR' or selected_model == 'RF':
model_hyper,final_model, mse_train, mse_test, yhat_train, yhat_test, MSE_val = cv_std.CV_mse(selected_model, X_scale, y_scale, X_test_scale, y_test_scale, cv_type = cv_method, group = group, K_fold = K_fold, Nr= Nr, alpha_num=alpha_num)
fitting_result[selected_model] = {'model_hyper':model_hyper,'final_model':final_model, 'mse_train':mse_train, 'mse_test':mse_test, 'yhat_train':yhat_train, 'yhat_test':yhat_test, 'MSE_val':MSE_val}
else:
model_hyper,final_model, model_params, mse_train, mse_test, yhat_train, yhat_test, MSE_val = cv_std.CV_mse(selected_model, X_scale, y_scale, X_test_scale, y_test_scale, cv_type = cv_method, group = group, K_fold = K_fold, Nr= Nr, alpha_num=alpha_num)
fitting_result[selected_model] = {'model_hyper':model_hyper,'final_model':final_model, 'model_params':model_params, 'mse_train':mse_train, 'mse_test':mse_test, 'yhat_train':yhat_train, 'yhat_test':yhat_test, 'MSE_val': MSE_val}
yhat_test = scaler_y.inverse_transform(yhat_test)
_, if_dynamic = residual_analysis(X_test, y_test, yhat_test, alpha = alpha, round_number = round_number)
print('The first round static fitting is done, check if nonlinear model is neccesarry')
if if_dynamic:
print('There is significant dynamic in the residual, dyanmic model will be fitted in the 2nd round')
round_number = 2
else:
print('--------------Analysis Is Done--------------')
elif if_dynamic == 0:
if not one_std:
#use static cross-validation for this round and traditional cv
import cv_final as cv
K_fold = int(input('Number of K-fold you want to use, or the fold number you want to use in single validation 1/K, if not known input 5: '))
Nr = int(input('Number of repetition (if have in CV) you want to use, if not known input 10: '))
alpha_num = int(input('Number of penalty weight you want to consider in RR/EN/ALVEN, if not known input 20: '))
if not nested_flag:
print('------Model Construction------')
val_err = np.zeros(len(model_name))
index = 0
fitting1_result_trial = {}
for model_index in model_name:
if model_index == 'ALVEN':
model_hyper,final_model, model_params, mse_train, mse_test, yhat_train, yhat_test, MSE_val, final_list = cv.CV_mse(model_index, X, y, X_test, y_test, cv_type = cv_method, group = group, K_fold = K_fold, Nr= Nr, alpha_num=alpha_num, label_name=True)
fitting1_result_trial[model_index] = {'model_hyper':model_hyper,'final_model':final_model, 'model_params':model_params, 'mse_train':mse_train, 'mse_test':mse_test, 'yhat_train':yhat_train, 'yhat_test':yhat_test, 'MSE_val':MSE_val, 'final_list':final_list}
val_err[index] = MSE_val
elif model_index == 'SVR' or model_index == 'RF':
model_hyper,final_model, mse_train, mse_test, yhat_train, yhat_test, MSE_val = cv.CV_mse(model_index, X_scale, y_scale, X_test_scale, y_test_scale, cv_type = cv_method, group = group, K_fold = K_fold, Nr= Nr, alpha_num=alpha_num)
fitting1_result_trial[model_index] = {'model_hyper':model_hyper,'final_model':final_model, 'mse_train':mse_train, 'mse_test':mse_test, 'yhat_train':yhat_train, 'yhat_test':yhat_test, 'MSE_val':MSE_val}
val_err[index] = MSE_val
else:
model_hyper,final_model, model_params, mse_train, mse_test, yhat_train, yhat_test, MSE_val = cv.CV_mse(model_index, X_scale, y_scale, X_test_scale, y_test_scale, cv_type = cv_method, group = group, K_fold = K_fold, Nr= Nr, alpha_num=alpha_num)
fitting1_result_trial[model_index] = {'model_hyper':model_hyper,'final_model':final_model, 'model_params':model_params, 'mse_train':mse_train, 'mse_test':mse_test, 'yhat_train':yhat_train, 'yhat_test':yhat_test, 'MSE_val': MSE_val}
val_err[index] = MSE_val
index += 1
if len(model_name) > 1:
print('Select the best model from the small candidate pool based on validation error:')
selected_model = model_name[np.argmin(val_err)]
print('*****'+selected_model + ' is selected.'+'*****')
else:
selected_model = model_name[0]
fitting_result[selected_model]=fitting1_result_trial[selected_model]
yhat_test = scaler_y.inverse_transform(fitting_result[selected_model]['yhat_test'])
residual_analysis(X_test, y_test, yhat_test, alpha = alpha, round_number = round_number)
print('--------------Analysis Is Done--------------')
else:
print('Nested CV is used and the model selection if necessary is based on testing set in the outter loop')
if not grouped:
num_outter = int(input('How many number of outter loop you want to use in Nested CV? if not known input 10: '))
print('------Model Construction------')
from sklearn.model_selection import train_test_split
test_nest_err = np.zeros((len(model_name),num_outter))
for index_out in range(num_outter):
X_nest, X_nest_test, y_nest, y_nest_test = train_test_split(X, y, test_size=1/K_fold, random_state= index_out)
X_nest_scale, X_nest_scale_test, y_nest_scale, y_nest_scale_test = train_test_split(X_scale, y_scale, test_size=1/K_fold, random_state= index_out)
index = 0
for model_index in model_name:
if model_index == 'ALVEN':
model_hyper,final_model, model_params, mse_train, mse_test, yhat_train, yhat_test, MSE_val, final_list = cv.CV_mse(model_index, X_nest, y_nest, X_nest_test, y_nest_test, cv_type = cv_method, group = group, K_fold = K_fold, Nr= Nr, alpha_num=alpha_num, label_name=True)
test_nest_err[index,index_out] = mse_test
elif model_index == 'SVR' or model_index == 'RF':
model_hyper,final_model, mse_train, mse_test, yhat_train, yhat_test, MSE_val = cv.CV_mse(model_index, X_nest_scale, y_nest_scale, X_nest_scale_test, y_nest_scale_test, cv_type = cv_method, group = group, K_fold = K_fold, Nr= Nr, alpha_num=alpha_num)
test_nest_err[index,index_out] = mse_test
else:
model_hyper,final_model, model_params, mse_train, mse_test, yhat_train, yhat_test, MSE_val = cv.CV_mse(model_index, X_nest_scale, y_nest_scale, X_nest_scale_test, y_nest_scale_test, cv_type = cv_method, group = group, K_fold = K_fold, Nr= Nr, alpha_num=alpha_num)
test_nest_err[index,index_out] = mse_test
index += 1
print('The nested CV testing MSE result:')
import matplotlib.pyplot as plt
plt.figure()
pos = [i+1 for i in range(len(model_name))]
ax=plt.subplot(111)
plt.violinplot(np.transpose(test_nest_err))
ax.set_xticks(pos)
ax.set_xticklabels(model_name)
ax.set_title('Testing MSE distribution using nested CV')
if len(model_name) > 1:
print('Select the best model from the small candidate pool based on nested test error:')
selected_model = model_name[np.argmin(np.mean(test_nest_err,axis=1))]
print('*****'+selected_model + ' is selected.*****')
else:
selected_model = model_name[0]
print('Final model fitting')
if selected_model == 'ALVEN':
model_hyper,final_model, model_params, mse_train, mse_test, yhat_train, yhat_test, MSE_val, final_list = cv.CV_mse(selected_model, X, y, X_test, y_test, cv_type = cv_method, group = group, K_fold = K_fold, Nr= Nr, alpha_num=alpha_num, label_name=True)
fitting_result[selected_model] = {'model_hyper':model_hyper,'final_model':final_model, 'model_params':model_params, 'mse_train':mse_train, 'mse_test':mse_test, 'yhat_train':yhat_train, 'yhat_test':yhat_test, 'MSE_val':MSE_val, 'final_list':final_list}
elif selected_model == 'SVR' or selected_model == 'RF':
model_hyper,final_model, mse_train, mse_test, yhat_train, yhat_test, MSE_val = cv.CV_mse(selected_model, X_scale, y_scale, X_test_scale, y_test_scale, cv_type = cv_method, group = group, K_fold = K_fold, Nr= Nr, alpha_num=alpha_num)
fitting_result[selected_model] = {'model_hyper':model_hyper,'final_model':final_model, 'mse_train':mse_train, 'mse_test':mse_test, 'yhat_train':yhat_train, 'yhat_test':yhat_test, 'MSE_val':MSE_val}
else:
model_hyper,final_model, model_params, mse_train, mse_test, yhat_train, yhat_test, MSE_val = cv.CV_mse(selected_model, X_scale, y_scale, X_test_scale, y_test_scale, cv_type = cv_method, group = group, K_fold = K_fold, Nr= Nr, alpha_num=alpha_num)
fitting_result[selected_model] = {'model_hyper':model_hyper,'final_model':final_model, 'model_params':model_params, 'mse_train':mse_train, 'mse_test':mse_test, 'yhat_train':yhat_train, 'yhat_test':yhat_test, 'MSE_val': MSE_val}
yhat_test = scaler_y.inverse_transform(yhat_test)
residual_analysis(X_test, y_test, yhat_test, alpha = alpha, round_number = round_number)
print('--------------Analysis Is Done--------------')
else:
from sklearn.model_selection import LeaveOneGroupOut
print('Leave one group out will be used in the outer loop')
print('------Model Construction------')
test_nest_err = np.zeros((len(model_name), len(np.unique(group))))
logo = LeaveOneGroupOut()
index_out = 0
for train, test in logo.split(X, y.flatten(), groups=group.flatten()):
index = 0
for model_index in model_name:
if model_index == 'ALVEN':
model_hyper,final_model, model_params, mse_train, mse_test, yhat_train, yhat_test, MSE_val, final_list = cv.CV_mse(model_index, X[train], y[train], X[test], y[test], cv_type = cv_method, group = group[train], K_fold = K_fold, Nr= Nr, alpha_num=alpha_num, label_name=True)
test_nest_err[index,index_out] = mse_test
elif model_index == 'SVR' or model_index == 'RF':
model_hyper,final_model, mse_train, mse_test, yhat_train, yhat_test, MSE_val = cv.CV_mse(model_index, X_scale[train], y_scale[train], X_scale[test], y_scale[test], cv_type = cv_method, group = group[train], K_fold = K_fold, Nr= Nr, alpha_num=alpha_num)
test_nest_err[index,index_out] = mse_test
else:
model_hyper,final_model, model_params, mse_train, mse_test, yhat_train, yhat_test, MSE_val = cv.CV_mse(model_index, X_scale[train], y_scale[train], X_scale[test], y_scale[test], cv_type = cv_method, group = group[train], K_fold = K_fold, Nr= Nr, alpha_num=alpha_num)
test_nest_err[index,index_out] = mse_test
index += 1
index_out +=1
print('The nested CV testing MSE result:')
import matplotlib.pyplot as plt
plt.figure()
pos = [i+1 for i in range(len(model_name))]
ax=plt.subplot(111)
plt.violinplot(np.transpose(test_nest_err))
ax.set_xticks(pos)
ax.set_xticklabels(model_name)
ax.set_title('Testing MSE distribution using nested CV')
if len(model_name) > 1:
print('Select the best model from the small candidate pool based on nested test error:')
selected_model = model_name[np.argmin(np.mean(test_nest_err,axis=1))]
print('*****'+selected_model + ' is selected.*****')
else:
selected_model = model_name[0]
print('------Final model fitting-------')
if selected_model == 'ALVEN':
model_hyper,final_model, model_params, mse_train, mse_test, yhat_train, yhat_test, MSE_val, final_list = cv.CV_mse(selected_model, X, y, X_test, y_test, cv_type = cv_method, group = group, K_fold = K_fold, Nr= Nr, alpha_num=alpha_num, label_name=True)
fitting_result[selected_model] = {'model_hyper':model_hyper,'final_model':final_model, 'model_params':model_params, 'mse_train':mse_train, 'mse_test':mse_test, 'yhat_train':yhat_train, 'yhat_test':yhat_test, 'MSE_val':MSE_val, 'final_list':final_list}
elif selected_model == 'SVR' or selected_model == 'RF':
model_hyper,final_model, mse_train, mse_test, yhat_train, yhat_test, MSE_val = cv.CV_mse(selected_model, X_scale, y_scale, X_test_scale, y_test_scale, cv_type = cv_method, group = group, K_fold = K_fold, Nr= Nr, alpha_num=alpha_num)
fitting_result[selected_model] = {'model_hyper':model_hyper,'final_model':final_model, 'mse_train':mse_train, 'mse_test':mse_test, 'yhat_train':yhat_train, 'yhat_test':yhat_test, 'MSE_val':MSE_val}
else:
model_hyper,final_model, model_params, mse_train, mse_test, yhat_train, yhat_test, MSE_val = cv.CV_mse(selected_model, X_scale, y_scale, X_test_scale, y_test_scale, cv_type = cv_method, group = group, K_fold = K_fold, Nr= Nr, alpha_num=alpha_num)
fitting_result[selected_model] = {'model_hyper':model_hyper,'final_model':final_model, 'model_params':model_params, 'mse_train':mse_train, 'mse_test':mse_test, 'yhat_train':yhat_train, 'yhat_test':yhat_test, 'MSE_val': MSE_val}
yhat_test = scaler_y.inverse_transform(yhat_test)
residual_analysis(X_test, y_test, yhat_test, alpha = alpha, round_number = round_number)
print('--------------Analysis Is Done--------------')
else:
#use static cross-validation for this round and traditional cv
import cv_final_onestd as cv_std
K_fold = int(input('Number of K-fold you want to use, or the fold number you want to use in single validation 1/K, if not known input 5: '))
Nr = int(input('Number of repetition (if have in CV) you want to use, if not known input 10: '))
alpha_num = int(input('Number of penalty weight you want to consider in RR/EN/ALVEN, if not known input 20: '))
if not nested_flag:
print('------Model Construction------')
val_err = np.zeros(len(model_name))
index = 0
fitting1_result_trial = {}
for model_index in model_name:
if model_index == 'ALVEN':
model_hyper,final_model, model_params, mse_train, mse_test, yhat_train, yhat_test, MSE_val, final_list = cv_std.CV_mse(model_index, X, y, X_test, y_test, cv_type = cv_method, group = group, K_fold = K_fold, Nr= Nr, alpha_num=alpha_num, label_name=True)
fitting1_result_trial[model_index] = {'model_hyper':model_hyper,'final_model':final_model, 'model_params':model_params, 'mse_train':mse_train, 'mse_test':mse_test, 'yhat_train':yhat_train, 'yhat_test':yhat_test, 'MSE_val':MSE_val, 'final_list':final_list}
val_err[index] = MSE_val
elif model_index == 'SVR' or model_index == 'RF':
model_hyper,final_model, mse_train, mse_test, yhat_train, yhat_test, MSE_val = cv_std.CV_mse(model_index, X_scale, y_scale, X_test_scale, y_test_scale, cv_type = cv_method, group = group, K_fold = K_fold, Nr= Nr, alpha_num=alpha_num)
fitting1_result_trial[model_index] = {'model_hyper':model_hyper,'final_model':final_model, 'mse_train':mse_train, 'mse_test':mse_test, 'yhat_train':yhat_train, 'yhat_test':yhat_test, 'MSE_val':MSE_val}
val_err[index] = MSE_val
else:
model_hyper,final_model, model_params, mse_train, mse_test, yhat_train, yhat_test, MSE_val = cv_std.CV_mse(model_index, X_scale, y_scale, X_test_scale, y_test_scale, cv_type = cv_method, group = group, K_fold = K_fold, Nr= Nr, alpha_num=alpha_num)
fitting1_result_trial[model_index] = {'model_hyper':model_hyper,'final_model':final_model, 'model_params':model_params, 'mse_train':mse_train, 'mse_test':mse_test, 'yhat_train':yhat_train, 'yhat_test':yhat_test, 'MSE_val': MSE_val}
val_err[index] = MSE_val
index += 1
if len(model_name) > 1:
print('Select the best model from the small candidate pool based on validation error:')
selected_model = model_name[np.argmin(val_err)]
print('*****'+selected_model + ' is selected.'+'*****')
else:
selected_model = model_name[0]
fitting_result[selected_model]=fitting1_result_trial[selected_model]
yhat_test = scaler_y.inverse_transform(fitting_result[selected_model]['yhat_test'])
residual_analysis(X_test, y_test, yhat_test, alpha = alpha, round_number = round_number)
print('--------------Analysis Is Done--------------')
else:
print('Nested CV is used and the model selection if necessary is based on testing set in the outter loop')
if not grouped:
num_outter = int(input('How many number of outter loop you want to use in Nested CV? if not known input 10: '))
print('------Model Construction------')
from sklearn.model_selection import train_test_split
test_nest_err = np.zeros((len(model_name),num_outter))
for index_out in range(num_outter):
X_nest, X_nest_test, y_nest, y_nest_test = train_test_split(X, y, test_size=1/K_fold, random_state= index_out)
X_nest_scale, X_nest_scale_test, y_nest_scale, y_nest_scale_test = train_test_split(X_scale, y_scale, test_size=1/K_fold, random_state= index_out)
index = 0
for model_index in model_name:
if model_index == 'ALVEN':
model_hyper,final_model, model_params, mse_train, mse_test, yhat_train, yhat_test, MSE_val, final_list = cv_std.CV_mse(model_index, X_nest, y_nest, X_nest_test, y_nest_test, cv_type = cv_method, group = group, K_fold = K_fold, Nr= Nr, alpha_num=alpha_num, label_name=True)
test_nest_err[index,index_out] = mse_test
elif model_index == 'SVR' or model_index == 'RF':
model_hyper,final_model, mse_train, mse_test, yhat_train, yhat_test, MSE_val = cv_std.CV_mse(model_index, X_nest_scale, y_nest_scale, X_nest_scale_test, y_nest_scale_test, cv_type = cv_method, group = group, K_fold = K_fold, Nr= Nr, alpha_num=alpha_num)
test_nest_err[index,index_out] = mse_test
else:
model_hyper,final_model, model_params, mse_train, mse_test, yhat_train, yhat_test, MSE_val = cv_std.CV_mse(model_index, X_nest_scale, y_nest_scale, X_nest_scale_test, y_nest_scale_test, cv_type = cv_method, group = group, K_fold = K_fold, Nr= Nr, alpha_num=alpha_num)
test_nest_err[index,index_out] = mse_test
index += 1
print('The nested CV testing MSE result:')
import matplotlib.pyplot as plt
plt.figure()
pos = [i+1 for i in range(len(model_name))]
ax=plt.subplot(111)
plt.violinplot(np.transpose(test_nest_err))
ax.set_xticks(pos)
ax.set_xticklabels(model_name)
ax.set_title('Testing MSE distribution using nested CV')
if len(model_name) > 1:
print('Select the best model from the small candidate pool based on nested test error:')
selected_model = model_name[np.argmin(np.mean(test_nest_err,axis=1))]
print('*****'+selected_model + ' is selected.*****')
else:
selected_model = model_name[0]
print('Final model fitting')
if selected_model == 'ALVEN':
model_hyper,final_model, model_params, mse_train, mse_test, yhat_train, yhat_test, MSE_val, final_list = cv_std.CV_mse(selected_model, X, y, X_test, y_test, cv_type = cv_method, group = group, K_fold = K_fold, Nr= Nr, alpha_num=alpha_num, label_name=True)
fitting_result[selected_model] = {'model_hyper':model_hyper,'final_model':final_model, 'model_params':model_params, 'mse_train':mse_train, 'mse_test':mse_test, 'yhat_train':yhat_train, 'yhat_test':yhat_test, 'MSE_val':MSE_val, 'final_list':final_list}
elif selected_model == 'SVR' or selected_model == 'RF':
model_hyper,final_model, mse_train, mse_test, yhat_train, yhat_test, MSE_val = cv_std.CV_mse(selected_model, X_scale, y_scale, X_test_scale, y_test_scale, cv_type = cv_method, group = group, K_fold = K_fold, Nr= Nr, alpha_num=alpha_num)
fitting_result[selected_model] = {'model_hyper':model_hyper,'final_model':final_model, 'mse_train':mse_train, 'mse_test':mse_test, 'yhat_train':yhat_train, 'yhat_test':yhat_test, 'MSE_val':MSE_val}
else:
model_hyper,final_model, model_params, mse_train, mse_test, yhat_train, yhat_test, MSE_val = cv_std.CV_mse(selected_model, X_scale, y_scale, X_test_scale, y_test_scale, cv_type = cv_method, group = group, K_fold = K_fold, Nr= Nr, alpha_num=alpha_num)
fitting_result[selected_model] = {'model_hyper':model_hyper,'final_model':final_model, 'model_params':model_params, 'mse_train':mse_train, 'mse_test':mse_test, 'yhat_train':yhat_train, 'yhat_test':yhat_test, 'MSE_val': MSE_val}
yhat_test = scaler_y.inverse_transform(yhat_test)
residual_analysis(X_test, y_test, yhat_test, alpha = alpha, round_number = round_number)
print('--------------Analysis Is Done--------------')
else:
from sklearn.model_selection import LeaveOneGroupOut
print('Leave one group out will be used in the outer loop')
print('------Model Construction------')
test_nest_err = np.zeros((len(model_name), len(np.unique(group))))
logo = LeaveOneGroupOut()
index_out = 0
for train, test in logo.split(X, y.flatten(), groups=group.flatten()):
index = 0
for model_index in model_name:
if model_index == 'ALVEN':
model_hyper,final_model, model_params, mse_train, mse_test, yhat_train, yhat_test, MSE_val, final_list = cv_std.CV_mse(model_index, X[train], y[train], X[test], y[test], cv_type = cv_method, group = group[train], K_fold = K_fold, Nr= Nr, alpha_num=alpha_num, label_name=True)
test_nest_err[index,index_out] = mse_test
elif model_index == 'SVR' or model_index == 'RF':
model_hyper,final_model, mse_train, mse_test, yhat_train, yhat_test, MSE_val = cv_std.CV_mse(model_index, X_scale[train], y_scale[train], X_scale[test], y_scale[test], cv_type = cv_method, group = group[train], K_fold = K_fold, Nr= Nr, alpha_num=alpha_num)
test_nest_err[index,index_out] = mse_test
else:
model_hyper,final_model, model_params, mse_train, mse_test, yhat_train, yhat_test, MSE_val = cv_std.CV_mse(model_index, X_scale[train], y_scale[train], X_scale[test], y_scale[test], cv_type = cv_method, group = group[train], K_fold = K_fold, Nr= Nr, alpha_num=alpha_num)
test_nest_err[index,index_out] = mse_test
index += 1
index_out +=1
print('The nested CV testing MSE result:')
import matplotlib.pyplot as plt
plt.figure()
pos = [i+1 for i in range(len(model_name))]
ax=plt.subplot(111)
plt.violinplot(np.transpose(test_nest_err))
ax.set_xticks(pos)
ax.set_xticklabels(model_name)
ax.set_title('Testing MSE distribution using nested CV')
if len(model_name) > 1:
print('Select the best model from the small candidate pool based on nested test error:')
selected_model = model_name[np.argmin(np.mean(test_nest_err,axis=1))]
print('*****'+selected_model + ' is selected.*****')
else:
selected_model = model_name[0]
print('------Final model fitting-------')
if selected_model == 'ALVEN':
model_hyper,final_model, model_params, mse_train, mse_test, yhat_train, yhat_test, MSE_val, final_list = cv_std.CV_mse(selected_model, X, y, X_test, y_test, cv_type = cv_method, group = group, K_fold = K_fold, Nr= Nr, alpha_num=alpha_num, label_name=True)
fitting_result[selected_model] = {'model_hyper':model_hyper,'final_model':final_model, 'model_params':model_params, 'mse_train':mse_train, 'mse_test':mse_test, 'yhat_train':yhat_train, 'yhat_test':yhat_test, 'MSE_val':MSE_val, 'final_list':final_list}
elif selected_model == 'SVR' or selected_model == 'RF':
model_hyper,final_model, mse_train, mse_test, yhat_train, yhat_test, MSE_val = cv_std.CV_mse(selected_model, X_scale, y_scale, X_test_scale, y_test_scale, cv_type = cv_method, group = group, K_fold = K_fold, Nr= Nr, alpha_num=alpha_num)
fitting_result[selected_model] = {'model_hyper':model_hyper,'final_model':final_model, 'mse_train':mse_train, 'mse_test':mse_test, 'yhat_train':yhat_train, 'yhat_test':yhat_test, 'MSE_val':MSE_val}
else:
model_hyper,final_model, model_params, mse_train, mse_test, yhat_train, yhat_test, MSE_val = cv_std.CV_mse(selected_model, X_scale, y_scale, X_test_scale, y_test_scale, cv_type = cv_method, group = group, K_fold = K_fold, Nr= Nr, alpha_num=alpha_num)
fitting_result[selected_model] = {'model_hyper':model_hyper,'final_model':final_model, 'model_params':model_params, 'mse_train':mse_train, 'mse_test':mse_test, 'yhat_train':yhat_train, 'yhat_test':yhat_test, 'MSE_val': MSE_val}
yhat_test = scaler_y.inverse_transform(yhat_test)
residual_analysis(X_test, y_test, yhat_test, alpha = alpha, round_number = round_number)
print('--------------Analysis Is Done--------------')
else: #use dynamic model in the first round
steps = int(input('Number of steps you want to test for the future prediction? '))
if if_nonlinear == 1:
if model_name == ['RNN']:
selected_model = 'RNN'
import timeseries_regression_RNN as t_RNN
print('Please input the following numbers/types from the smallest to the largest: 1 3 5 or linear relu')
activation = list(map(str,input("Types of activation function you want to use (e.g. linear, relu, tanh?): ").strip().split()))
num_layers = list(map(int,input("Numbers of layers you want to test: ").strip().split()))
state_size = list(map(int,input("Numbers of states you want to test: ").strip().split()))
cell_type = list(map(str,input("Types of cells you want to use (e.g. regular, LSTM, GRU?): ").strip().split()))
print('Please provide the following training parameter.')
batch_size = int(input("Number of batch used in training you want to test: "))
epoch_overlap = input('The overlap between different batch? The number indicate the space between two training, 0 means no space. If no overlap type None. ')
if epoch_overlap == 'None':
epoch_overlap = None
else:
epoch_overlap = int(epoch_overlap)
num_steps = int(input("Number of steps back in past of RNN you want to use : "))
max_checks_without_progress = int(input('How many steps for no improvment for early stopping?: '))
learning_rate = float(input('Learning rate? '))
lambda_l2_reg = float(input('Penalty weight of L2 norm? '))
num_epochs = float(input('Maximum number of epochs? ' ))
if cv_method == 'IC':
import IC
if one_std:
print('BIC is recommended to prefer a simplier model for robustness.')
IC_method = input('The type of information criterion you want to use (AIC, AICc, BIC), if not known type None, the criterion will be selected between AIC/AICc. ')
if IC_method == 'None':
IC_method = None
print('------Model Construction------')
RNN_hyper, RNN_model, yhat_train_RNN, yhat_val_RNN, yhat_test_RNN, mse_train_RNN, mse_val_RNN, mse_test_RNN= IC.IC_mse('RNN', X_scale, y_scale, X_test_scale, y_test_scale, cv_type = IC_method, cell_type = cell_type,\
activation = activation, num_layers=num_layers,state_size=state_size,num_steps=num_steps, \
batch_size=batch_size,epoch_overlap= epoch_overlap, learning_rate=learning_rate, lambda_l2_reg=lambda_l2_reg,\
num_epochs=num_epochs, max_checks_without_progress = max_checks_without_progress,round_number = str(round_number))
else:
K_fold = int(input('Number of K-fold you want to use, or the fold number you want to use in single validation 1/K, if not known input 5: '))
Nr = int(input('Number of repetition (if have in CV) you want to use, if not known input 10: '))
print('------Model Construction------')
if not one_std:
import cv_final as cv
RNN_hyper, RNN_model, yhat_train_RNN, yhat_val_RNN, yhat_test_RNN, mse_train_RNN, mse_val_RNN, mse_test_RNN= cv.CV_mse('RNN', X_scale, y_scale, X_test_scale, y_test_scale, cv_type = cv_method, K_fold = K_fold, Nr= Nr, cell_type = cell_type,group=group,\
activation = activation, num_layers=num_layers,state_size=state_size,num_steps=num_steps, \
batch_size=batch_size,epoch_overlap= epoch_overlap, learning_rate=learning_rate, lambda_l2_reg=lambda_l2_reg,\
num_epochs=num_epochs, max_checks_without_progress = max_checks_without_progress,round_number = str(round_number))
else:
import cv_final_onestd as cv_std
print('CV with ons-std rule is used for RNN model')
RNN_hyper, RNN_model, yhat_train_RNN, yhat_val_RNN, yhat_test_RNN, mse_train_RNN, mse_val_RNN, mse_test_RNN= cv_std.CV_mse('RNN', X_scale, y_scale, X_test_scale, y_test_scale, cv_type = cv_method, K_fold = K_fold, Nr= Nr, cell_type = cell_type,group=group,\
activation = activation, num_layers=num_layers,state_size=state_size,num_steps=num_steps, \
batch_size=batch_size,epoch_overlap= epoch_overlap, learning_rate=learning_rate, lambda_l2_reg=lambda_l2_reg,\
num_epochs=num_epochs, max_checks_without_progress = max_checks_without_progress,round_number = str(round_number))
#k-step prediction
num_train=round(X.shape[0]*RNN_hyper['early_stop']['train_ratio'])
print('K-step prediction for training')
train_y_prediction_kstep, train_loss_kstep = t_RNN.timeseries_RNN_feedback_test(X_scale[:num_train], y_scale[:num_train], X_scale[:num_train],y_scale[:num_train], kstep = steps, cell_type=RNN_hyper['cell_type'],activation = RNN_hyper['activation'], state_size = RNN_hyper['state_size'],\
num_layers = RNN_hyper['num_layers'], location=RNN_model, plot=True, round_number = str(round_number))
print('K-step prediction for testing')
test_y_prediction_kstep, test_loss_kstep = t_RNN.timeseries_RNN_feedback_test(X_scale[:num_train], y_scale[:num_train], X_test_scale,y_test_scale, kstep = steps, cell_type=RNN_hyper['cell_type'],activation = RNN_hyper['activation'], state_size = RNN_hyper['state_size'],\
num_layers = RNN_hyper['num_layers'], location=RNN_model, plot=True, round_number = str(round_number))
scaler_y_RNN = StandardScaler(with_mean=True, with_std=True)
scaler_y_RNN.fit(y_scale[:num_train])
yhat_test_RNN = scaler_y_RNN.inverse_transform(yhat_test_RNN)
residual_analysis(X_test_scale, y_test_scale, yhat_test_RNN, alpha = alpha, round_number = round_number)
fitting_result[selected_model] = {'model_hyper':RNN_hyper,'final_model':RNN_model, 'mse_train':mse_train_RNN, 'mse_val':mse_val_RNN, 'mse_test':mse_test_RNN, 'yhat_train':yhat_train_RNN, 'yhat_val':yhat_val_RNN, 'yhat_test':yhat_test_RNN, 'MSE_val': MSE_val}
print('--------------Analysis Is Done--------------')
else:
import regression_models as rm
alpha_num = int(input('Number of penalty weight you want to consider in DALVEN, if not known input 20: '))
lag = list(map(int,input("Lists of numbers of lags you want to consider in DALVEN: (e.g. 1 2 3) ").strip().split()))
degree = list(map(int,input("Orders of nonlinear mapping considered in DALVEN: (choose to include 1 2 3) ").strip().split()))
if int(input('Do you want to test both DALVEN-full/DALVEN? (Yes: 1, No: 0): ')):
if cv_method == 'IC':
import IC
if one_std:
print('BIC is recommended to prefer a simplier model for robustness.')
IC_method = input('The type of information criterion you want to use (AIC, AICc, BIC), if not known type None, the criterion will be selected between AIC/AICc. ')
print('------Model Construction------')
DALVEN_hyper,DALVEN_model, DALVEN_params, mse_train_DALVEN, mse_test_DALVEN, yhat_train_DALVEN, yhat_test_DALVEN, MSE_v_DALVEN, final_list = IC.IC_mse('DALVEN', X, y, X_test, y_test, cv_type = IC_method, alpha_num=alpha_num, lag=lag, degree=degree, label_name=True, trans_type= 'auto')
DALVEN_full_hyper,DALVEN_full_model, DALVEN_full_params, mse_train_DALVEN_full, mse_test_DALVEN_full, yhat_train_DALVEN_full, yhat_test_DALVEN_full, MSE_v_DALVEN_full, final_list_full = IC.IC_mse('DALVEN_full_nonlinear', X, y, X_test, y_test, cv_type = IC_method, alpha_num=alpha_num, lag=lag, degree=degree, label_name=True, trans_type= 'auto')
else:
#using validation set
if not one_std:
import cv_final as cv
K_fold = int(input('Number of K-fold you want to use, or the fold number you want to use in single validation 1/K, if not known input 5: '))
Nr = int(input('Number of repetition (if have in CV) you want to use, if not known input 10: '))
print('------Model Construction------')
DALVEN_hyper,DALVEN_model, DALVEN_params, mse_train_DALVEN, mse_test_DALVEN, yhat_train_DALVEN, yhat_test_DALVEN, MSE_v_DALVEN, final_list = cv.CV_mse('DALVEN', X, y, X_test, y_test, cv_type = cv_method, K_fold = K_fold, Nr= Nr, \
alpha_num=alpha_num, label_name=True, trans_type= 'auto',degree=degree,lag = lag)
DALVEN_full_hyper,DALVEN_full_model, DALVEN_full_params, mse_train_DALVEN_full, mse_test_DALVEN_full, yhat_train_DALVEN_full, yhat_test_DALVEN_full, MSE_v_DALVEN_full, final_list_full = cv.CV_mse('DALVEN_full_nonlinear', X, y, X_test, y_test, cv_type = cv_method, K_fold = K_fold, Nr= Nr, \
alpha_num=alpha_num, label_name=True, trans_type= 'auto',degree=degree,lag = lag)
else:
print('CV with ons-std rule is used for DALVEN model')
import cv_final_onestd as cv_std
K_fold = int(input('Number of K-fold you want to use, or the fold number you want to use in single validation 1/K, if not known input 5: '))
Nr = int(input('Number of repetition (if have in CV) you want to use, if not known input 10: '))
print('------Model Construction------')
DALVEN_hyper,DALVEN_model, DALVEN_params, mse_train_DALVEN, mse_test_DALVEN, yhat_train_DALVEN, yhat_test_DALVEN, MSE_v_DALVEN, final_list = cv_std.CV_mse('DALVEN', X, y, X_test, y_test, cv_type = cv_method, K_fold = K_fold, Nr= Nr, \
alpha_num=alpha_num, label_name=True, trans_type= 'auto',degree=degree,lag = lag)
DALVEN_full_hyper,DALVEN_full_model, DALVEN_full_params, mse_train_DALVEN_full, mse_test_DALVEN_full, yhat_train_DALVEN_full, yhat_test_DALVEN_full, MSE_v_DALVEN_full, final_list_full = cv_std.CV_mse('DALVEN_full_nonlinear', X, y, X_test, y_test, cv_type = cv_method, K_fold = K_fold, Nr= Nr, \
alpha_num=alpha_num, label_name=True, trans_type= 'auto',degree=degree,lag = lag)
##select the method
if MSE_v_DALVEN <= MSE_v_DALVEN_full:
selected_model = 'DALVEN'
else:
selected_model = 'DALVEN_full_nonlinear'
print('Based on the ' + cv_method +', ' + selected_model +' is selected.')
#DALVEN model evaluation after choosing the method
if selected_model == 'DALVEN':
DALVEN_mse_test_multi, DALVEN_yhat_test_multi= rm.DALVEN_testing_kstep(X, y, X_test, y_test, DALVEN_model,DALVEN_hyper['retain_index'], DALVEN_hyper['degree'], DALVEN_hyper['lag'] , steps,trans_type = 'auto',plot=True,round_number = str(round_number))
DALVEN_mse_train_multi, DALVEN_yhat_train_multi= rm.DALVEN_testing_kstep(X, y, X, y, DALVEN_model,DALVEN_hyper['retain_index'], DALVEN_hyper['degree'], DALVEN_hyper['lag'] , steps,trans_type = 'auto',plot=True,round_number = str(round_number))
fitting_result[selected_model] = {'model_hyper':DALVEN_hyper,'final_model':DALVEN_model, 'model_params':DALVEN_params , 'mse_train':mse_train_DALVEN, 'mse_val':MSE_v_DALVEN, 'mse_test':mse_test_DALVEN, 'yhat_train':yhat_train_DALVEN, 'yhat_test':yhat_test_DALVEN, 'final_list': final_list}
lag_number = DALVEN_hyper['lag']
scalery = StandardScaler()
scalery.fit(y[lag_number:])
yhat_test_DALVEN=scalery.inverse_transform(yhat_test_DALVEN)
residual_analysis(X_test[lag_number:], y_test[lag_number:],yhat_test_DALVEN, alpha =alpha, round_number = round_number)
else:
DALVEN_full_mse_test_multi, DALVEN_full_yhat_test_multi= rm.DALVEN_testing_kstep_full_nonlinear(X, y, X_test, y_test, DALVEN_full_model,DALVEN_full_hyper['retain_index'], DALVEN_full_hyper['degree'], DALVEN_full_hyper['lag'] , steps ,trans_type = 'auto', plot=True,round_number = str(round_number))
DALVEN_full_mse_train_multi, DALVEN_full_yhat_train_multi= rm.DALVEN_testing_kstep_full_nonlinear(X, y, X, y, DALVEN_full_model,DALVEN_full_hyper['retain_index'], DALVEN_full_hyper['degree'], DALVEN_full_hyper['lag'] , steps ,trans_type = 'auto', plot=True,round_number =str(round_number))
fitting_result[selected_model] = {'model_hyper':DALVEN_full_hyper,'final_model':DALVEN_full_model, 'model_params':DALVEN_full_params , 'mse_train':mse_train_DALVEN_full, 'mse_val':MSE_v_DALVEN_full, 'mse_test':mse_test_DALVEN_full, 'yhat_train':yhat_train_DALVEN_full, 'yhat_test':yhat_test_DALVEN_full, 'final_list': final_list_full}
lag_number = DALVEN_full_hyper['lag']
scalery = StandardScaler()
scalery.fit(y[lag_number:])
yhat_test_DALVEN_full=scalery.inverse_transform(yhat_test_DALVEN_full)
residual_analysis(X_test[lag_number:], y_test[lag_number:],yhat_test_DALVEN_full, alpha =alpha, round_number = round_number)
print('--------------Analysis Is Done--------------')
else:
DALVEN_method = input('Type in the method you want to test: DALVEN_full_nonlinear or DALVEN. ')
selected_model = DALVEN_method
if cv_method == 'IC':
import IC
if one_std:
print('BIC is recommended to prefer a simplier model for robustness.')
IC_method = input('The type of information criterion you want to use (AIC, AICc, BIC), if not known type None, the criterion will be selected between AIC/AICc. ')
print('------Model Construction------')
DALVEN_hyper,DALVEN_model, DALVEN_params, mse_train_DALVEN, mse_test_DALVEN, yhat_train_DALVEN, yhat_test_DALVEN, MSE_v_DALVEN, final_list = IC.IC_mse(DALVEN_method, X, y, X_test, y_test, cv_type = IC_method, alpha_num=alpha_num, lag=lag, degree=degree, label_name=True, trans_type= 'auto')
else:
#using validation set
K_fold = int(input('Number of K-fold you want to use, or the fold number you want to use in single validation 1/K, if not known input 5: '))
Nr = int(input('Number of repetition (if have in CV) you want to use, if not known input 10: '))
print('------Model Construction------')
if not one_std:
import cv_final as cv
DALVEN_hyper,DALVEN_model, DALVEN_params, mse_train_DALVEN, mse_test_DALVEN, yhat_train_DALVEN, yhat_test_DALVEN, MSE_v_DALVEN, final_list = cv.CV_mse(DALVEN_method, X, y, X_test, y_test, cv_type = cv_method, K_fold = K_fold, Nr= Nr, \
alpha_num=alpha_num, label_name=True, trans_type= 'auto',degree=degree,lag = lag)
else:
print('CV with ons-std rule is used for DALVEN model')
import cv_final_onestd as cv_std
DALVEN_hyper,DALVEN_model, DALVEN_params, mse_train_DALVEN, mse_test_DALVEN, yhat_train_DALVEN, yhat_test_DALVEN, MSE_v_DALVEN, final_list = cv_std.CV_mse(DALVEN_method, X, y, X_test, y_test, cv_type = cv_method, K_fold = K_fold, Nr= Nr, \
alpha_num=alpha_num, label_name=True, trans_type= 'auto',degree=degree,lag = lag)
fitting_result[selected_model] = {'model_hyper':DALVEN_hyper,'final_model':DALVEN_model, 'model_params':DALVEN_params , 'mse_train':mse_train_DALVEN, 'mse_val':MSE_v_DALVEN, 'mse_test':mse_test_DALVEN, 'yhat_train':yhat_train_DALVEN, 'yhat_test':yhat_test_DALVEN, 'final_list': final_list}
### model evaluation
if DALVEN_method == 'DALVEN':
DALVEN_mse_test_multi, DALVEN_yhat_test_multi= rm.DALVEN_testing_kstep(X, y, X_test, y_test, DALVEN_model,DALVEN_hyper['retain_index'], DALVEN_hyper['degree'], DALVEN_hyper['lag'] , steps,trans_type = 'auto',plot=True,round_number = str(round_number))
DALVEN_mse_train_multi, DALVEN_yhat_train_multi= rm.DALVEN_testing_kstep(X, y, X, y, DALVEN_model,DALVEN_hyper['retain_index'], DALVEN_hyper['degree'], DALVEN_hyper['lag'] , steps,trans_type = 'auto',plot=True,round_number = str(round_number))
else:
DALVEN_mse_test_multi, DALVEN_yhat_test_multi= rm.DALVEN_testing_kstep_full_nonlinear(X, y, X_test, y_test, DALVEN_model,DALVEN_hyper['retain_index'], DALVEN_hyper['degree'], DALVEN_hyper['lag'] , steps ,trans_type = 'auto', plot=True,round_number = str(round_number))
DALVEN_mse_train_multi, DALVEN_yhat_train_multi= rm.DALVEN_testing_kstep_full_nonlinear(X, y, X, y, DALVEN_model,DALVEN_hyper['retain_index'], DALVEN_hyper['degree'], DALVEN_hyper['lag'] , steps ,trans_type = 'auto', plot=True,round_number =str(round_number))
lag_number = DALVEN_hyper['lag']
scalery = StandardScaler()
scalery.fit(y[lag_number:])
yhat_test_DALVEN=scalery.inverse_transform(yhat_test_DALVEN)
residual_analysis(X_test[lag_number:], y_test[lag_number:],yhat_test_DALVEN, alpha =alpha, round_number = round_number)
print('--------------Analysis Is Done--------------')
else:
import timeseries_regression_matlab as t_matlab
maxorder = int(input('Maximum order number you want to consider: '))
print('------Model Construction------')
#matlab
matlab_params, matlab_myresults, matlab_MSE_train, matlab_MSE_val, matlab_MSE_test, matlab_y_predict_train, matlab_y_predict_val, matlab_y_predict_test, matlab_train_error, matlab_val_error, matlab_test_error = t_matlab.timeseries_matlab_single(X, y, X_test = X_test, y_test= y_test, train_ratio = 1,\
maxorder = maxorder, mynow = 1, steps = steps, plot = True)
#adaptx
ADAPTx = int(input('Do you installed ADAPTx software? [Yes: 1, No: 0] '))
if ADAPTx:
import timeseries_regression_Adaptx as t_Adaptx
url = input('Url for the ADAPTx software (e.g. C:\\Users\\Vicky\\Desktop\\AdaptX\\ADAPTX35M9\\): ')
data_url = input('Saved data file URL for the ADAPTx software (e.g. C:\\Users\\Vicky\\Desktop\\AdaptX\\ADAPTX35M9\\test\\): ')
mymaxlag = int(input('Maximum number of lags considered in ADAPTx: '))
mydegs = [int(x) for x in input('Degree of trend t in ADAPTx [if not known use default -1 0 1]: ').split()]
Adaptx_optimal_params, Adaptx_myresults, Adaptx_MSE_train, Adaptx_MSE_val, Adaptx_MSE_test, Adaptx_y_predict_train, Adaptx_y_predict_val, Adaptx_y_predict_test, Adaptx_train_error, Adaptx_val_error, Adaptx_test_error = t_Adaptx.Adaptx_matlab_single(X, y, data_url = data_url, url = url, X_test=X_test, y_test=y_test, train_ratio = 1,\
mymaxlag = mymaxlag, mydegs = mydegs, mynow = 1, steps = steps, plot = True)
if not ADAPTx:
print('The final state space model is fitted based on ' + matlab_params['method'][0] + ' using MATLAB.')
selected_model = matlab_params['method'][0]
yhat_test = matlab_y_predict_test.transpose()[:,0].reshape((-1,1))
yhat_test = scaler_y.inverse_transform(yhat_test)
fitting_result[selected_model] = {'model_hyper':matlab_params,'final_model':matlab_myresults, 'mse_train':matlab_MSE_train, 'mse_val':matlab_MSE_val, 'mse_test':matlab_MSE_test, 'yhat_train':matlab_y_predict_train, 'yhat_val':matlab_y_predict_val,'yhat_test':matlab_y_predict_test}
residual_analysis(X_test, y_test,yhat_test, alpha = alpha, round_number = round_number)
print('--------------Analysis Is Done--------------')
else:
print('The final state space model is selected based on minimum averaged MSE.')
if np.mean(matlab_MSE_train) <= np.mean(Adaptx_MSE_train):
print('State space model by Matlab is selected. Model parameters is stored in matlab_params.')
print('The final state space model is fitted based on ' + matlab_params['method'][0] + ' using MATLAB.')
selected_model = matlab_params['method'][0]
fitting_result[selected_model] = {'model_hyper':matlab_params,'final_model':matlab_myresults, 'mse_train':matlab_MSE_train, 'mse_val':matlab_MSE_val, 'mse_test':matlab_MSE_test, 'yhat_train':matlab_y_predict_train, 'yhat_val':matlab_y_predict_val,'yhat_test':matlab_y_predict_test}
yhat_test = matlab_y_predict_test.transpose()[:,0].reshape((-1,1))
yhat_test = scaler_y.inverse_transform(yhat_test)
residual_analysis(X_test, y_test,yhat_test, alpha = alpha, round_number = round_number)
print('--------------Analysis Is Done--------------')
else:
print('State space model by ADAPTx is selected. Model parameters is stored in Adaptx_optimal_params.')
selected_model = 'ADAPTx'
fitting_result[selected_model] = {'model_hyper':Adaptx_optimal_params,'final_model':Adaptx_myresults, 'mse_train':Adaptx_MSE_train, 'mse_val':Adaptx_MSE_val, 'mse_test':Adaptx_MSE_test, 'yhat_train':Adaptx_y_predict_train, 'yhat_val':Adaptx_y_predict_val,'yhat_test':Adaptx_y_predict_test}
yhat_test = Adaptx_y_predict_test.transpose()[Adaptx_optimal_params['lag'][0][0]:,0].reshape((-1,1))
yhat_test = scaler_y.inverse_transform(yhat_test)
residual_analysis(X_test[Adaptx_optimal_params['lag'][0][0]:,:], y_test[Adaptx_optimal_params['lag'][0][0]:,0].reshape((-1,1)),yhat_test, alpha = alpha, round_number = round_number)
print('--------------Analysis Is Done--------------')
############################ model fitting 2nd round if necessary
if round_number == 2:
print('')
print("""-----------------------------------------------------
The residual contains dynamics unexplained by the static model, therefore the dynamic model is selected.
-----------------------------------------""")
print('')
nonlinear_dynamic = int(input('Do you want to use a nonlinear dynamic model (Yes 1 No 0 Not sure 2): '))
if nonlinear_dynamic == 1:
if_nonlinear = 1
elif nonlinear_dynamic ==2:
if_nonlinear = nonlinearity_assess(X_original, y_original, if_plot_interrogation, cat = cat,alpha = alpha, difference = 0.4, xticks = xticks, yticks = yticks, round_number = round_number)
if if_nonlinear == 0:
lag = int(input('The lag number you want to use to assess nonlinear dyanmics: '))
if_nonlinear_dynamic = nonlinearity_assess_dynamic(X_original, y_original, if_plot_interrogation, alpha = alpha, difference = 0.4, xticks = xticks, yticks = yticks, round_number = round_number,lag= lag)
if_nonlinear = if_nonlinear or if_nonlinear_dynamic
else:
if_nonlinear == 0
print('')
print("""----------------------------------------------------
Based on the information of data characteristics, the following dynamic model is selected:
----------------------------------------------------""")
model_name = None
if if_nonlinear == 1:
print('The nonlinear dynamic model is selected:')
if if_enough == 0 :
print('Because you have limited data, DALVEN is recommonded.')
model_name = ['DALVEN']
elif if_interpretable == 1:
print('Because you would like an interpretable model, DALVEN is recommonded.')
model_name = ['DALVEN']
else:
print('Because you have engough data and do not require interpretability, RNN is recommonded.')
model_name = ['RNN']
else:
print('There is significant dynamics and multicolinearity, CVA/SSARX/MOSEP are recommonded.')
model_name = ['SS']
print('')
print("""----------------------------------------------------
Based on the information of data characteristics, the following fitting strategy is selected:
----------------------------------------------------""")
if model_name == ['SS']:
print('MATLAB/ADAPTx packges with information criterion will be used')
else:
if if_enough == 1:
cv_method = 'Single_ordered'
print('Single validation is used for time series modeling.')
else:
if if_time:
if if_robust:
cv_method = 'Timeseries'
one_std = 1
print('Cross-validation for time series with one std rule is selected.')
else:
cv_method = 'Timeseries'
print('Cross-validation for time series is selected.')
else:
cv_method = 'IC'
print('Information criteria is selected.')
if if_robust:
one_std = 1
print('')
print("""----------------------------------------------------
Start 2nd-Round Model Fitting
----------------------------------------------------""")
steps = int(input('Number of steps you want to test for the future prediction? '))
if if_nonlinear == 1:
if model_name == ['RNN']:
selected_model = 'RNN'
import timeseries_regression_RNN as t_RNN
print('Please input the following numbers/types from the smallest to the largest: 1 3 5 or linear relu')
activation = list(map(str,input("Types of activation function you want to use (e.g. linear, relu, tanh?): ").strip().split()))
num_layers = list(map(int,input("Numbers of layers you want to test: ").strip().split()))
state_size = list(map(int,input("Numbers of states you want to test: ").strip().split()))
cell_type = list(map(str,input("Types of cells you want to use (e.g. regular, LSTM, GRU?): ").strip().split()))
print('Please provide the following training parameter.')
batch_size = int(input("Number of batch used in training you want to test: "))
epoch_overlap = input('The overlap between different batch? The number indicate the space between two training, 0 means no space. If no overlap type None. ')
if epoch_overlap == 'None':
epoch_overlap = None
else:
epoch_overlap = int(epoch_overlap)
num_steps = int(input("Number of steps back in past of RNN you want to use : "))
max_checks_without_progress = int(input('How many steps for no improvment for early stopping?: '))
learning_rate = float(input('Learning rate? '))
lambda_l2_reg = float(input('Penalty weight of L2 norm? '))
num_epochs = float(input('Maximum number of epochs? ' ))
if cv_method == 'IC':
import IC
if one_std:
print('BIC is recommended to prefer a simplier model for robustness.')
IC_method = input('The type of information criterion you want to use (AIC, AICc, BIC), if not known type None, the criterion will be selected between AIC/AICc. ')
if IC_method == 'None':
IC_method = None
print('------Model Construction------')
RNN_hyper, RNN_model, yhat_train_RNN, yhat_val_RNN, yhat_test_RNN, mse_train_RNN, mse_val_RNN, mse_test_RNN= IC.IC_mse('RNN', X_scale, y_scale, X_test_scale, y_test_scale, cv_type = IC_method, cell_type = cell_type,\
activation = activation, num_layers=num_layers,state_size=state_size,num_steps=num_steps, \
batch_size=batch_size,epoch_overlap= epoch_overlap, learning_rate=learning_rate, lambda_l2_reg=lambda_l2_reg,\
num_epochs=num_epochs, max_checks_without_progress = max_checks_without_progress,round_number = str(round_number))
else:
K_fold = int(input('Number of K-fold you want to use, or the fold number you want to use in single validation 1/K, if not known input 5: '))
Nr = int(input('Number of repetition (if have in CV) you want to use, if not known input 10: '))
print('------Model Construction------')
if not one_std:
import cv_final as cv
RNN_hyper, RNN_model, yhat_train_RNN, yhat_val_RNN, yhat_test_RNN, mse_train_RNN, mse_val_RNN, mse_test_RNN= cv.CV_mse('RNN', X_scale, y_scale, X_test_scale, y_test_scale, cv_type = cv_method, K_fold = K_fold, Nr= Nr, cell_type = cell_type,group=group,\
activation = activation, num_layers=num_layers,state_size=state_size,num_steps=num_steps, \
batch_size=batch_size,epoch_overlap= epoch_overlap, learning_rate=learning_rate, lambda_l2_reg=lambda_l2_reg,\
num_epochs=num_epochs, max_checks_without_progress = max_checks_without_progress,round_number = str(round_number))
else:
import cv_final_onestd as cv_std
print('CV with ons-std rule is used for RNN model')
RNN_hyper, RNN_model, yhat_train_RNN, yhat_val_RNN, yhat_test_RNN, mse_train_RNN, mse_val_RNN, mse_test_RNN= cv_std.CV_mse('RNN', X_scale, y_scale, X_test_scale, y_test_scale, cv_type = cv_method, K_fold = K_fold, Nr= Nr, cell_type = cell_type,group=group,\
activation = activation, num_layers=num_layers,state_size=state_size,num_steps=num_steps, \
batch_size=batch_size,epoch_overlap= epoch_overlap, learning_rate=learning_rate, lambda_l2_reg=lambda_l2_reg,\
num_epochs=num_epochs, max_checks_without_progress = max_checks_without_progress,round_number = str(round_number))
fitting_result[selected_model] = {'model_hyper':RNN_hyper,'final_model':RNN_model, 'mse_train':mse_train_RNN, 'mse_val':mse_val_RNN, 'mse_test':mse_test_RNN, 'yhat_train':yhat_train_RNN, 'yhat_val':yhat_val_RNN, 'yhat_test':yhat_test_RNN, 'MSE_val': MSE_val}
#k-step prediction
num_train=round(X.shape[0]*RNN_hyper['early_stop']['train_ratio'])
print('K-step prediction for training')
train_y_prediction_kstep, train_loss_kstep = t_RNN.timeseries_RNN_feedback_test(X_scale[:num_train], y_scale[:num_train], X_scale[:num_train],y_scale[:num_train], kstep = steps, cell_type=RNN_hyper['cell_type'],activation = RNN_hyper['activation'], state_size = RNN_hyper['state_size'],\
num_layers = RNN_hyper['num_layers'], location=RNN_model, plot=True,round_number = str(round_number))
print('K-step prediction for training')
test_y_prediction_kstep, test_loss_kstep = t_RNN.timeseries_RNN_feedback_test(X_scale[:num_train], y_scale[:num_train], X_test_scale,y_test_scale, kstep = steps, cell_type=RNN_hyper['cell_type'],activation = RNN_hyper['activation'], state_size = RNN_hyper['state_size'],\
num_layers = RNN_hyper['num_layers'], location=RNN_model, plot=True, round_number = str(round_number))
scaler_y_RNN = StandardScaler(with_mean=True, with_std=True)
scaler_y_RNN.fit(y_scale[:num_train])
yhat_test_RNN = scaler_y_RNN.inverse_transform(yhat_test_RNN)
residual_analysis(X_test_scale, y_test_scale, yhat_test_RNN, alpha = alpha, round_number = round_number)
print('--------------Analysis Is Done--------------')
else:
import regression_models as rm
alpha_num = int(input('Number of penalty weight you want to consider in DALVEN, if not known input 20: '))
lag = list(map(int,input("Lists of numbers of lags you want to consider in DALVEN: (e.g. 1 2 3) ").strip().split()))
degree = list(map(int,input("Orders of nonlinear mapping considered in DALVEN: (choose to include 1 2 3) ").strip().split()))
if int(input('Do you want to test both DALVEN-full/DALVEN? (Yes: 1, No: 0): ')):
if cv_method == 'IC':
import IC
if one_std:
print('BIC is recommended to prefer a simplier model for robustness.')
IC_method = input('The type of information criterion you want to use (AIC, AICc, BIC), if not known type None, the criterion will be selected between AIC/AICc. ')
print('------Model Construction------')
DALVEN_hyper,DALVEN_model, DALVEN_params, mse_train_DALVEN, mse_test_DALVEN, yhat_train_DALVEN, yhat_test_DALVEN, MSE_v_DALVEN, final_list = IC.IC_mse('DALVEN', X, y, X_test, y_test, cv_type = IC_method, alpha_num=alpha_num, lag=lag, degree=degree, label_name=True, trans_type= 'auto')
DALVEN_full_hyper,DALVEN_full_model, DALVEN_full_params, mse_train_DALVEN_full, mse_test_DALVEN_full, yhat_train_DALVEN_full, yhat_test_DALVEN_full, MSE_v_DALVEN_full, final_list_full = IC.IC_mse('DALVEN_full_nonlinear', X, y, X_test, y_test, cv_type = IC_method, alpha_num=alpha_num, lag=lag, degree=degree, label_name=True, trans_type= 'auto')
else:
#using validation set
if not one_std:
import cv_final as cv
K_fold = int(input('Number of K-fold you want to use, or the fold number you want to use in single validation 1/K, if not known input 5: '))
Nr = int(input('Number of repetition (if have in CV) you want to use, if not known input 10: '))
print('------Model Construction------')
DALVEN_hyper,DALVEN_model, DALVEN_params, mse_train_DALVEN, mse_test_DALVEN, yhat_train_DALVEN, yhat_test_DALVEN, MSE_v_DALVEN, final_list = cv.CV_mse('DALVEN', X, y, X_test, y_test, cv_type = cv_method, K_fold = K_fold, Nr= Nr, \
alpha_num=alpha_num, label_name=True, trans_type= 'auto',degree=degree,lag = lag)
DALVEN_full_hyper,DALVEN_full_model, DALVEN_full_params, mse_train_DALVEN_full, mse_test_DALVEN_full, yhat_train_DALVEN_full, yhat_test_DALVEN_full, MSE_v_DALVEN_full, final_list_full = cv.CV_mse('DALVEN_full_nonlinear', X, y, X_test, y_test, cv_type = cv_method, K_fold = K_fold, Nr= Nr, \
alpha_num=alpha_num, label_name=True, trans_type= 'auto',degree=degree,lag = lag)
else:
print('CV with ons-std rule is used for DALVEN model')
import cv_final_onestd as cv_std
K_fold = int(input('Number of K-fold you want to use, or the fold number you want to use in single validation 1/K, if not known input 5: '))
Nr = int(input('Number of repetition (if have in CV) you want to use, if not known input 10: '))
print('------Model Construction------')
DALVEN_hyper,DALVEN_model, DALVEN_params, mse_train_DALVEN, mse_test_DALVEN, yhat_train_DALVEN, yhat_test_DALVEN, MSE_v_DALVEN, final_list = cv_std.CV_mse('DALVEN', X, y, X_test, y_test, cv_type = cv_method, K_fold = K_fold, Nr= Nr, \
alpha_num=alpha_num, label_name=True, trans_type= 'auto',degree=degree,lag = lag)
DALVEN_full_hyper,DALVEN_full_model, DALVEN_full_params, mse_train_DALVEN_full, mse_test_DALVEN_full, yhat_train_DALVEN_full, yhat_test_DALVEN_full, MSE_v_DALVEN_full, final_list_full = cv_std.CV_mse('DALVEN_full_nonlinear', X, y, X_test, y_test, cv_type = cv_method, K_fold = K_fold, Nr= Nr, \
alpha_num=alpha_num, label_name=True, trans_type= 'auto',degree=degree,lag = lag)
##select the method
if MSE_v_DALVEN <= MSE_v_DALVEN_full:
selected_model = 'DALVEN'
else:
selected_model = 'DALVEN_full_nonlinear'
print('Based on the ' + cv_method +', ' + selected_model +' is selected.')
#DALVEN model evaluation after choosing the method
if selected_model == 'DALVEN':
DALVEN_mse_test_multi, DALVEN_yhat_test_multi= rm.DALVEN_testing_kstep(X, y, X_test, y_test, DALVEN_model,DALVEN_hyper['retain_index'], DALVEN_hyper['degree'], DALVEN_hyper['lag'] , steps,trans_type = 'auto',plot=True,round_number = str(round_number))
DALVEN_mse_train_multi, DALVEN_yhat_train_multi= rm.DALVEN_testing_kstep(X, y, X, y, DALVEN_model,DALVEN_hyper['retain_index'], DALVEN_hyper['degree'], DALVEN_hyper['lag'] , steps,trans_type = 'auto',plot=True,round_number = str(round_number))
lag_number = DALVEN_hyper['lag']
scalery = StandardScaler()
scalery.fit(y[lag_number:])
yhat_test_DALVEN=scalery.inverse_transform(yhat_test_DALVEN)
fitting_result[selected_model] = {'model_hyper':DALVEN_hyper,'final_model':DALVEN_model, 'model_params':DALVEN_params , 'mse_train':mse_train_DALVEN, 'mse_val':MSE_v_DALVEN, 'mse_test':mse_test_DALVEN, 'yhat_train':yhat_train_DALVEN, 'yhat_test':yhat_test_DALVEN, 'final_list': final_list}
residual_analysis(X_test[lag_number:], y_test[lag_number:],yhat_test_DALVEN, alpha =alpha, round_number = round_number)
else:
DALVEN_full_mse_test_multi, DALVEN_full_yhat_test_multi= rm.DALVEN_testing_kstep_full_nonlinear(X, y, X_test, y_test, DALVEN_full_model,DALVEN_full_hyper['retain_index'], DALVEN_full_hyper['degree'], DALVEN_full_hyper['lag'] , steps ,trans_type = 'auto', plot=True,round_number = str(round_number))
DALVEN_full_mse_train_multi, DALVEN_full_yhat_train_multi= rm.DALVEN_testing_kstep_full_nonlinear(X, y, X, y, DALVEN_full_model,DALVEN_full_hyper['retain_index'], DALVEN_full_hyper['degree'], DALVEN_full_hyper['lag'] , steps ,trans_type = 'auto', plot=True,round_number =str(round_number))
lag_number = DALVEN_full_hyper['lag']
scalery = StandardScaler()
scalery.fit(y[lag_number:])
yhat_test_DALVEN_full=scalery.inverse_transform(yhat_test_DALVEN_full)
fitting_result[selected_model] = {'model_hyper':DALVEN_full_hyper,'final_model':DALVEN_full_model, 'model_params':DALVEN_full_params , 'mse_train':mse_train_DALVEN_full, 'mse_val':MSE_v_DALVEN_full, 'mse_test':mse_test_DALVEN_full, 'yhat_train':yhat_train_DALVEN_full, 'yhat_test':yhat_test_DALVEN_full, 'final_list': final_list_full}
residual_analysis(X_test[lag_number:], y_test[lag_number:],yhat_test_DALVEN_full, alpha =alpha, round_number = round_number)
print('--------------Analysis Is Done--------------')
else:
DALVEN_method = input('Type in the method you want to test: DALVEN_full_nonlinear or DALVEN. ')
selected_model = DALVEN_method
if cv_method == 'IC':
import IC
if one_std:
print('BIC is recommended to prefer a simplier model for robustness.')
IC_method = input('The type of information criterion you want to use (AIC, AICc, BIC), if not known type None, the criterion will be selected between AIC/AICc. ')
print('------Model Construction------')
DALVEN_hyper,DALVEN_model, DALVEN_params, mse_train_DALVEN, mse_test_DALVEN, yhat_train_DALVEN, yhat_test_DALVEN, MSE_v_DALVEN, final_list = IC.IC_mse(DALVEN_method, X, y, X_test, y_test, cv_type = IC_method, alpha_num=alpha_num, lag=lag, degree=degree, label_name=True, trans_type= 'auto')
else:
#using validation set
K_fold = int(input('Number of K-fold you want to use, or the fold number you want to use in single validation 1/K, if not known input 5: '))
Nr = int(input('Number of repetition (if have in CV) you want to use, if not known input 10: '))
print('------Model Construction------')
if not one_std:
import cv_final as cv
DALVEN_hyper,DALVEN_model, DALVEN_params, mse_train_DALVEN, mse_test_DALVEN, yhat_train_DALVEN, yhat_test_DALVEN, MSE_v_DALVEN, final_list = cv.CV_mse(DALVEN_method, X, y, X_test, y_test, cv_type = cv_method, K_fold = K_fold, Nr= Nr, \
alpha_num=alpha_num, label_name=True, trans_type= 'auto',degree=degree,lag = lag)
else:
print('CV with ons-std rule is used for DALVEN model')
import cv_final_onestd as cv_std
DALVEN_hyper,DALVEN_model, DALVEN_params, mse_train_DALVEN, mse_test_DALVEN, yhat_train_DALVEN, yhat_test_DALVEN, MSE_v_DALVEN, final_list = cv_std.CV_mse(DALVEN_method, X, y, X_test, y_test, cv_type = cv_method, K_fold = K_fold, Nr= Nr, \
alpha_num=alpha_num, label_name=True, trans_type= 'auto',degree=degree,lag = lag)
fitting_result[selected_model] = {'model_hyper':DALVEN_hyper,'final_model':DALVEN_model, 'model_params':DALVEN_params , 'mse_train':mse_train_DALVEN, 'mse_val':MSE_v_DALVEN, 'mse_test':mse_test_DALVEN, 'yhat_train':yhat_train_DALVEN, 'yhat_test':yhat_test_DALVEN, 'final_list': final_list}
### model evaluation
if DALVEN_method == 'DALVEN':
DALVEN_mse_test_multi, DALVEN_yhat_test_multi= rm.DALVEN_testing_kstep(X, y, X_test, y_test, DALVEN_model,DALVEN_hyper['retain_index'], DALVEN_hyper['degree'], DALVEN_hyper['lag'] , steps,trans_type = 'auto',plot=True,round_number = str(round_number))
DALVEN_mse_train_multi, DALVEN_yhat_train_multi= rm.DALVEN_testing_kstep(X, y, X, y, DALVEN_model,DALVEN_hyper['retain_index'], DALVEN_hyper['degree'], DALVEN_hyper['lag'] , steps,trans_type = 'auto',plot=True,round_number = str(round_number))
else:
DALVEN_mse_test_multi, DALVEN_yhat_test_multi= rm.DALVEN_testing_kstep_full_nonlinear(X, y, X_test, y_test, DALVEN_model,DALVEN_hyper['retain_index'], DALVEN_hyper['degree'], DALVEN_hyper['lag'] , steps ,trans_type = 'auto', plot=True,round_number = str(round_number))
DALVEN_mse_train_multi, DALVEN_yhat_train_multi= rm.DALVEN_testing_kstep_full_nonlinear(X, y, X, y, DALVEN_model,DALVEN_hyper['retain_index'], DALVEN_hyper['degree'], DALVEN_hyper['lag'] , steps ,trans_type = 'auto', plot=True,round_number =str(round_number))
lag_number = DALVEN_hyper['lag']
scalery = StandardScaler()
scalery.fit(y[lag_number:])
yhat_test_DALVEN=scalery.inverse_transform(yhat_test_DALVEN)
residual_analysis(X_test[lag_number:], y_test[lag_number:],yhat_test_DALVEN, alpha =alpha, round_number = round_number)
print('--------------Analysis Is Done--------------')
else:
import timeseries_regression_matlab as t_matlab
maxorder = int(input('Maximum order number you want to consider: '))
print('------Model Construction------')
#matlab
matlab_params, matlab_myresults, matlab_MSE_train, matlab_MSE_val, matlab_MSE_test, matlab_y_predict_train, matlab_y_predict_val, matlab_y_predict_test, matlab_train_error, matlab_val_error, matlab_test_error = t_matlab.timeseries_matlab_single(X, y, X_test = X_test, y_test= y_test, train_ratio = 1,\
maxorder = maxorder, mynow = 1, steps = steps, plot = True)
#adaptx
ADAPTx = int(input('Do you installed ADAPTx software? [Yes: 1, No: 0] '))
if ADAPTx:
import timeseries_regression_Adaptx as t_Adaptx
url = input('Url for the ADAPTx software (e.g. C:\\Users\\Vicky\\Desktop\\AdaptX\\ADAPTX35M9\\): ')
data_url = input('Saved data file URL for the ADAPTx software (e.g. C:\\Users\\Vicky\\Desktop\\AdaptX\\ADAPTX35M9\\test\\): ')
mymaxlag = int(input('Maximum number of lags considered in ADAPTx: '))
mydegs = [int(x) for x in input('Degree of trend t in ADAPTx [if not known use default -1 0 1]: ').split()]
Adaptx_optimal_params, Adaptx_myresults, Adaptx_MSE_train, Adaptx_MSE_val, Adaptx_MSE_test, Adaptx_y_predict_train, Adaptx_y_predict_val, Adaptx_y_predict_test, Adaptx_train_error, Adaptx_val_error, Adaptx_test_error = t_Adaptx.Adaptx_matlab_single(X, y, data_url = data_url, url = url, X_test=X_test, y_test=y_test, train_ratio = 1,\
mymaxlag = mymaxlag, mydegs = mydegs, mynow = 1, steps = steps, plot = True)
if not ADAPTx:
print('The final state space model is fitted based on ' + matlab_params['method'][0] + ' using MATLAB.')
selected_model = matlab_params['method'][0]
yhat_test = matlab_y_predict_test.transpose()[:,0].reshape((-1,1))
yhat_test = scaler_y.inverse_transform(yhat_test)
fitting_result[selected_model] = {'model_hyper':matlab_params,'final_model':matlab_myresults, 'mse_train':matlab_MSE_train, 'mse_val':matlab_MSE_val, 'mse_test':matlab_MSE_test, 'yhat_train':matlab_y_predict_train, 'yhat_val':matlab_y_predict_val,'yhat_test':matlab_y_predict_test}
residual_analysis(X_test, y_test,yhat_test, alpha = alpha, round_number = round_number)
print('--------------Analysis Is Done--------------')
else:
print('The final state space model is selected based on minimum averaged MSE.')
if np.mean(matlab_MSE_train) <= np.mean(Adaptx_MSE_train):
print('State space model by Matlab is selected. Model parameters is stored in matlab_params.')
print('The final state space model is fitted based on ' + matlab_params['method'][0] + ' using MATLAB.')
selected_model = matlab_params['method'][0]
yhat_test = matlab_y_predict_test.transpose()[:,0].reshape((-1,1))
yhat_test = scaler_y.inverse_transform(yhat_test)
fitting_result[selected_model] = {'model_hyper':matlab_params,'final_model':matlab_myresults, 'mse_train':matlab_MSE_train, 'mse_val':matlab_MSE_val, 'mse_test':matlab_MSE_test, 'yhat_train':matlab_y_predict_train, 'yhat_val':matlab_y_predict_val,'yhat_test':matlab_y_predict_test}
residual_analysis(X_test, y_test,yhat_test, alpha = alpha, round_number = round_number)
print('--------------Analysis Is Done--------------')
else:
print('State space model by ADAPTx is selected. Model parameters is stored in Adaptx_optimal_params.')
selected_model = 'ADAPTx'
yhat_test = Adaptx_y_predict_test.transpose()[Adaptx_optimal_params['lag'][0][0]:,0].reshape((-1,1))
yhat_test = scaler_y.inverse_transform(yhat_test)
fitting_result[selected_model] = {'model_hyper':Adaptx_optimal_params,'final_model':Adaptx_myresults, 'mse_train':Adaptx_MSE_train, 'mse_val':Adaptx_MSE_val, 'mse_test':Adaptx_MSE_test, 'yhat_train':Adaptx_y_predict_train, 'yhat_val':Adaptx_y_predict_val,'yhat_test':Adaptx_y_predict_test}
residual_analysis(X_test[Adaptx_optimal_params['lag'][0][0]:,:], y_test[Adaptx_optimal_params['lag'][0][0]:,0].reshape((-1,1)),yhat_test, alpha = alpha, round_number = round_number)
print('--------------Analysis Is Done--------------')
| 67.631048
| 417
| 0.559316
| 16,439
| 134,180
| 4.24156
| 0.029564
| 0.031666
| 0.023506
| 0.023865
| 0.940396
| 0.931978
| 0.929955
| 0.923803
| 0.918195
| 0.914165
| 0
| 0.00539
| 0.337666
| 134,180
| 1,984
| 418
| 67.631048
| 0.779188
| 0.006245
| 0
| 0.886297
| 0
| 0.026239
| 0.208362
| 0.016754
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.039359
| 0
| 0.039359
| 0.164723
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
a2976ecc052c86bcdc8f689edcfb4a807d27e843
| 56,133
|
py
|
Python
|
spio/api/metric_providers_api.py
|
bsneade/statuspageio-python
|
30526a2984251885381e781b12b5070d46063537
|
[
"Apache-2.0"
] | 2
|
2020-03-02T20:32:32.000Z
|
2020-05-20T16:54:58.000Z
|
spio/api/metric_providers_api.py
|
bsneade/statuspageio-python
|
30526a2984251885381e781b12b5070d46063537
|
[
"Apache-2.0"
] | null | null | null |
spio/api/metric_providers_api.py
|
bsneade/statuspageio-python
|
30526a2984251885381e781b12b5070d46063537
|
[
"Apache-2.0"
] | null | null | null |
# coding: utf-8
"""
Statuspage API
# Code of Conduct Please don't abuse the API, and please report all feature requests and issues to https://help.statuspage.io/help/contact-us-30 # Rate Limiting Each API token is limited to 1 request / second as measured on a 60 second rolling window. To get this limit increased or lifted, please contact us at https://help.statuspage.io/help/contact-us-30 # Basics ## HTTPS It's required ## URL Prefix In order to maintain version integrity into the future, the API is versioned. All calls currently begin with the following prefix: https://api.statuspage.io/v1/ ## RESTful Interface Wherever possible, the API seeks to implement repeatable patterns with logical, representative URLs and descriptive HTTP verbs. Below are some examples and conventions you will see throughout the documentation. * Collections are buckets: https://api.statuspage.io/v1/pages/asdf123/incidents.json * Elements have unique IDs: https://api.statuspage.io/v1/pages/asdf123/incidents/jklm456.json * GET will retrieve information about a collection/element * POST will create an element in a collection * PATCH will update a single element * PUT will replace a single element in a collection (rarely used) * DELETE will destroy a single element ## Sending Data Information can be sent in the body as form urlencoded or JSON, but make sure the Content-Type header matches the body structure or the server gremlins will be angry. All examples are provided in JSON format, however they can easily be converted to form encoding if required. Some examples of how to convert things are below: // JSON { \"incident\": { \"name\": \"test incident\", \"components\": [\"8kbf7d35c070\", \"vtnh60py4yd7\"] } } // Form Encoded (using curl as an example): curl -X POST https://api.statuspage.io/v1/example \\ -d \"incident[name]=test incident\" \\ -d \"incident[components][]=8kbf7d35c070\" \\ -d \"incident[components][]=vtnh60py4yd7\" # Authentication <!-- ReDoc-Inject: <security-definitions> --> # noqa: E501
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import re # noqa: F401
# python 2 and python 3 compatibility library
import six
from spio.api_client import ApiClient
from spio.exceptions import (
ApiTypeError,
ApiValueError
)
class MetricProvidersApi(object):
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
def __init__(self, api_client=None):
if api_client is None:
api_client = ApiClient()
self.api_client = api_client
def delete_pages_page_id_metrics_providers_metrics_provider_id(self, page_id, metrics_provider_id, **kwargs): # noqa: E501
"""Delete a metric provider # noqa: E501
Delete a metric provider # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_pages_page_id_metrics_providers_metrics_provider_id(page_id, metrics_provider_id, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str page_id: Page identifier (required)
:param str metrics_provider_id: Metric Provider Identifier (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: MetricsProvider
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
return self.delete_pages_page_id_metrics_providers_metrics_provider_id_with_http_info(page_id, metrics_provider_id, **kwargs) # noqa: E501
def delete_pages_page_id_metrics_providers_metrics_provider_id_with_http_info(self, page_id, metrics_provider_id, **kwargs): # noqa: E501
"""Delete a metric provider # noqa: E501
Delete a metric provider # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_pages_page_id_metrics_providers_metrics_provider_id_with_http_info(page_id, metrics_provider_id, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str page_id: Page identifier (required)
:param str metrics_provider_id: Metric Provider Identifier (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: tuple(MetricsProvider, status_code(int), headers(HTTPHeaderDict))
If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
all_params = ['page_id', 'metrics_provider_id'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method delete_pages_page_id_metrics_providers_metrics_provider_id" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'page_id' is set
if self.api_client.client_side_validation and ('page_id' not in local_var_params or # noqa: E501
local_var_params['page_id'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `page_id` when calling `delete_pages_page_id_metrics_providers_metrics_provider_id`") # noqa: E501
# verify the required parameter 'metrics_provider_id' is set
if self.api_client.client_side_validation and ('metrics_provider_id' not in local_var_params or # noqa: E501
local_var_params['metrics_provider_id'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `metrics_provider_id` when calling `delete_pages_page_id_metrics_providers_metrics_provider_id`") # noqa: E501
collection_formats = {}
path_params = {}
if 'page_id' in local_var_params:
path_params['page_id'] = local_var_params['page_id'] # noqa: E501
if 'metrics_provider_id' in local_var_params:
path_params['metrics_provider_id'] = local_var_params['metrics_provider_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['api_key'] # noqa: E501
return self.api_client.call_api(
'/pages/{page_id}/metrics_providers/{metrics_provider_id}', 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='MetricsProvider', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
def get_pages_page_id_metrics_providers(self, page_id, **kwargs): # noqa: E501
"""Get a list of metric providers # noqa: E501
Get a list of metric providers # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_pages_page_id_metrics_providers(page_id, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str page_id: Page identifier (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: list[MetricsProvider]
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
return self.get_pages_page_id_metrics_providers_with_http_info(page_id, **kwargs) # noqa: E501
def get_pages_page_id_metrics_providers_with_http_info(self, page_id, **kwargs): # noqa: E501
"""Get a list of metric providers # noqa: E501
Get a list of metric providers # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_pages_page_id_metrics_providers_with_http_info(page_id, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str page_id: Page identifier (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: tuple(list[MetricsProvider], status_code(int), headers(HTTPHeaderDict))
If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
all_params = ['page_id'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method get_pages_page_id_metrics_providers" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'page_id' is set
if self.api_client.client_side_validation and ('page_id' not in local_var_params or # noqa: E501
local_var_params['page_id'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `page_id` when calling `get_pages_page_id_metrics_providers`") # noqa: E501
collection_formats = {}
path_params = {}
if 'page_id' in local_var_params:
path_params['page_id'] = local_var_params['page_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['api_key'] # noqa: E501
return self.api_client.call_api(
'/pages/{page_id}/metrics_providers', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='list[MetricsProvider]', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
def get_pages_page_id_metrics_providers_metrics_provider_id(self, page_id, metrics_provider_id, **kwargs): # noqa: E501
"""Get a metric provider # noqa: E501
Get a metric provider # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_pages_page_id_metrics_providers_metrics_provider_id(page_id, metrics_provider_id, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str page_id: Page identifier (required)
:param str metrics_provider_id: Metric Provider Identifier (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: MetricsProvider
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
return self.get_pages_page_id_metrics_providers_metrics_provider_id_with_http_info(page_id, metrics_provider_id, **kwargs) # noqa: E501
def get_pages_page_id_metrics_providers_metrics_provider_id_with_http_info(self, page_id, metrics_provider_id, **kwargs): # noqa: E501
"""Get a metric provider # noqa: E501
Get a metric provider # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_pages_page_id_metrics_providers_metrics_provider_id_with_http_info(page_id, metrics_provider_id, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str page_id: Page identifier (required)
:param str metrics_provider_id: Metric Provider Identifier (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: tuple(MetricsProvider, status_code(int), headers(HTTPHeaderDict))
If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
all_params = ['page_id', 'metrics_provider_id'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method get_pages_page_id_metrics_providers_metrics_provider_id" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'page_id' is set
if self.api_client.client_side_validation and ('page_id' not in local_var_params or # noqa: E501
local_var_params['page_id'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `page_id` when calling `get_pages_page_id_metrics_providers_metrics_provider_id`") # noqa: E501
# verify the required parameter 'metrics_provider_id' is set
if self.api_client.client_side_validation and ('metrics_provider_id' not in local_var_params or # noqa: E501
local_var_params['metrics_provider_id'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `metrics_provider_id` when calling `get_pages_page_id_metrics_providers_metrics_provider_id`") # noqa: E501
collection_formats = {}
path_params = {}
if 'page_id' in local_var_params:
path_params['page_id'] = local_var_params['page_id'] # noqa: E501
if 'metrics_provider_id' in local_var_params:
path_params['metrics_provider_id'] = local_var_params['metrics_provider_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['api_key'] # noqa: E501
return self.api_client.call_api(
'/pages/{page_id}/metrics_providers/{metrics_provider_id}', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='MetricsProvider', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
def get_pages_page_id_metrics_providers_metrics_provider_id_metrics(self, page_id, metrics_provider_id, **kwargs): # noqa: E501
"""List metrics for a metric provider # noqa: E501
List metrics for a metric provider # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_pages_page_id_metrics_providers_metrics_provider_id_metrics(page_id, metrics_provider_id, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str page_id: Page identifier (required)
:param str metrics_provider_id: Metric Provider Identifier (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: Metric
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
return self.get_pages_page_id_metrics_providers_metrics_provider_id_metrics_with_http_info(page_id, metrics_provider_id, **kwargs) # noqa: E501
def get_pages_page_id_metrics_providers_metrics_provider_id_metrics_with_http_info(self, page_id, metrics_provider_id, **kwargs): # noqa: E501
"""List metrics for a metric provider # noqa: E501
List metrics for a metric provider # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_pages_page_id_metrics_providers_metrics_provider_id_metrics_with_http_info(page_id, metrics_provider_id, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str page_id: Page identifier (required)
:param str metrics_provider_id: Metric Provider Identifier (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: tuple(Metric, status_code(int), headers(HTTPHeaderDict))
If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
all_params = ['page_id', 'metrics_provider_id'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method get_pages_page_id_metrics_providers_metrics_provider_id_metrics" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'page_id' is set
if self.api_client.client_side_validation and ('page_id' not in local_var_params or # noqa: E501
local_var_params['page_id'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `page_id` when calling `get_pages_page_id_metrics_providers_metrics_provider_id_metrics`") # noqa: E501
# verify the required parameter 'metrics_provider_id' is set
if self.api_client.client_side_validation and ('metrics_provider_id' not in local_var_params or # noqa: E501
local_var_params['metrics_provider_id'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `metrics_provider_id` when calling `get_pages_page_id_metrics_providers_metrics_provider_id_metrics`") # noqa: E501
collection_formats = {}
path_params = {}
if 'page_id' in local_var_params:
path_params['page_id'] = local_var_params['page_id'] # noqa: E501
if 'metrics_provider_id' in local_var_params:
path_params['metrics_provider_id'] = local_var_params['metrics_provider_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['api_key'] # noqa: E501
return self.api_client.call_api(
'/pages/{page_id}/metrics_providers/{metrics_provider_id}/metrics', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='Metric', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
def patch_pages_page_id_metrics_providers_metrics_provider_id(self, page_id, metrics_provider_id, patch_pages_page_id_metrics_providers, **kwargs): # noqa: E501
"""Update a metric provider # noqa: E501
Update a metric provider # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.patch_pages_page_id_metrics_providers_metrics_provider_id(page_id, metrics_provider_id, patch_pages_page_id_metrics_providers, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str page_id: Page identifier (required)
:param str metrics_provider_id: Metric Provider Identifier (required)
:param PatchPagesPageIdMetricsProviders patch_pages_page_id_metrics_providers: (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: MetricsProvider
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
return self.patch_pages_page_id_metrics_providers_metrics_provider_id_with_http_info(page_id, metrics_provider_id, patch_pages_page_id_metrics_providers, **kwargs) # noqa: E501
def patch_pages_page_id_metrics_providers_metrics_provider_id_with_http_info(self, page_id, metrics_provider_id, patch_pages_page_id_metrics_providers, **kwargs): # noqa: E501
"""Update a metric provider # noqa: E501
Update a metric provider # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.patch_pages_page_id_metrics_providers_metrics_provider_id_with_http_info(page_id, metrics_provider_id, patch_pages_page_id_metrics_providers, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str page_id: Page identifier (required)
:param str metrics_provider_id: Metric Provider Identifier (required)
:param PatchPagesPageIdMetricsProviders patch_pages_page_id_metrics_providers: (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: tuple(MetricsProvider, status_code(int), headers(HTTPHeaderDict))
If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
all_params = ['page_id', 'metrics_provider_id', 'patch_pages_page_id_metrics_providers'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method patch_pages_page_id_metrics_providers_metrics_provider_id" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'page_id' is set
if self.api_client.client_side_validation and ('page_id' not in local_var_params or # noqa: E501
local_var_params['page_id'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `page_id` when calling `patch_pages_page_id_metrics_providers_metrics_provider_id`") # noqa: E501
# verify the required parameter 'metrics_provider_id' is set
if self.api_client.client_side_validation and ('metrics_provider_id' not in local_var_params or # noqa: E501
local_var_params['metrics_provider_id'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `metrics_provider_id` when calling `patch_pages_page_id_metrics_providers_metrics_provider_id`") # noqa: E501
# verify the required parameter 'patch_pages_page_id_metrics_providers' is set
if self.api_client.client_side_validation and ('patch_pages_page_id_metrics_providers' not in local_var_params or # noqa: E501
local_var_params['patch_pages_page_id_metrics_providers'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `patch_pages_page_id_metrics_providers` when calling `patch_pages_page_id_metrics_providers_metrics_provider_id`") # noqa: E501
collection_formats = {}
path_params = {}
if 'page_id' in local_var_params:
path_params['page_id'] = local_var_params['page_id'] # noqa: E501
if 'metrics_provider_id' in local_var_params:
path_params['metrics_provider_id'] = local_var_params['metrics_provider_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'patch_pages_page_id_metrics_providers' in local_var_params:
body_params = local_var_params['patch_pages_page_id_metrics_providers']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['api_key'] # noqa: E501
return self.api_client.call_api(
'/pages/{page_id}/metrics_providers/{metrics_provider_id}', 'PATCH',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='MetricsProvider', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
def post_pages_page_id_metrics_providers(self, page_id, post_pages_page_id_metrics_providers, **kwargs): # noqa: E501
"""Create a metric provider # noqa: E501
Create a metric provider # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.post_pages_page_id_metrics_providers(page_id, post_pages_page_id_metrics_providers, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str page_id: Page identifier (required)
:param PostPagesPageIdMetricsProviders post_pages_page_id_metrics_providers: (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: MetricsProvider
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
return self.post_pages_page_id_metrics_providers_with_http_info(page_id, post_pages_page_id_metrics_providers, **kwargs) # noqa: E501
def post_pages_page_id_metrics_providers_with_http_info(self, page_id, post_pages_page_id_metrics_providers, **kwargs): # noqa: E501
"""Create a metric provider # noqa: E501
Create a metric provider # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.post_pages_page_id_metrics_providers_with_http_info(page_id, post_pages_page_id_metrics_providers, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str page_id: Page identifier (required)
:param PostPagesPageIdMetricsProviders post_pages_page_id_metrics_providers: (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: tuple(MetricsProvider, status_code(int), headers(HTTPHeaderDict))
If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
all_params = ['page_id', 'post_pages_page_id_metrics_providers'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method post_pages_page_id_metrics_providers" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'page_id' is set
if self.api_client.client_side_validation and ('page_id' not in local_var_params or # noqa: E501
local_var_params['page_id'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `page_id` when calling `post_pages_page_id_metrics_providers`") # noqa: E501
# verify the required parameter 'post_pages_page_id_metrics_providers' is set
if self.api_client.client_side_validation and ('post_pages_page_id_metrics_providers' not in local_var_params or # noqa: E501
local_var_params['post_pages_page_id_metrics_providers'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `post_pages_page_id_metrics_providers` when calling `post_pages_page_id_metrics_providers`") # noqa: E501
collection_formats = {}
path_params = {}
if 'page_id' in local_var_params:
path_params['page_id'] = local_var_params['page_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'post_pages_page_id_metrics_providers' in local_var_params:
body_params = local_var_params['post_pages_page_id_metrics_providers']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['api_key'] # noqa: E501
return self.api_client.call_api(
'/pages/{page_id}/metrics_providers', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='MetricsProvider', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
def post_pages_page_id_metrics_providers_metrics_provider_id_metrics(self, page_id, metrics_provider_id, post_pages_page_id_metrics_providers_metrics_provider_id_metrics, **kwargs): # noqa: E501
"""Create a metric for a metric provider # noqa: E501
Create a metric for a metric provider # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.post_pages_page_id_metrics_providers_metrics_provider_id_metrics(page_id, metrics_provider_id, post_pages_page_id_metrics_providers_metrics_provider_id_metrics, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str page_id: Page identifier (required)
:param str metrics_provider_id: Metric Provider Identifier (required)
:param PostPagesPageIdMetricsProvidersMetricsProviderIdMetrics post_pages_page_id_metrics_providers_metrics_provider_id_metrics: (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: Metric
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
return self.post_pages_page_id_metrics_providers_metrics_provider_id_metrics_with_http_info(page_id, metrics_provider_id, post_pages_page_id_metrics_providers_metrics_provider_id_metrics, **kwargs) # noqa: E501
def post_pages_page_id_metrics_providers_metrics_provider_id_metrics_with_http_info(self, page_id, metrics_provider_id, post_pages_page_id_metrics_providers_metrics_provider_id_metrics, **kwargs): # noqa: E501
"""Create a metric for a metric provider # noqa: E501
Create a metric for a metric provider # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.post_pages_page_id_metrics_providers_metrics_provider_id_metrics_with_http_info(page_id, metrics_provider_id, post_pages_page_id_metrics_providers_metrics_provider_id_metrics, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str page_id: Page identifier (required)
:param str metrics_provider_id: Metric Provider Identifier (required)
:param PostPagesPageIdMetricsProvidersMetricsProviderIdMetrics post_pages_page_id_metrics_providers_metrics_provider_id_metrics: (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: tuple(Metric, status_code(int), headers(HTTPHeaderDict))
If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
all_params = ['page_id', 'metrics_provider_id', 'post_pages_page_id_metrics_providers_metrics_provider_id_metrics'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method post_pages_page_id_metrics_providers_metrics_provider_id_metrics" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'page_id' is set
if self.api_client.client_side_validation and ('page_id' not in local_var_params or # noqa: E501
local_var_params['page_id'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `page_id` when calling `post_pages_page_id_metrics_providers_metrics_provider_id_metrics`") # noqa: E501
# verify the required parameter 'metrics_provider_id' is set
if self.api_client.client_side_validation and ('metrics_provider_id' not in local_var_params or # noqa: E501
local_var_params['metrics_provider_id'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `metrics_provider_id` when calling `post_pages_page_id_metrics_providers_metrics_provider_id_metrics`") # noqa: E501
# verify the required parameter 'post_pages_page_id_metrics_providers_metrics_provider_id_metrics' is set
if self.api_client.client_side_validation and ('post_pages_page_id_metrics_providers_metrics_provider_id_metrics' not in local_var_params or # noqa: E501
local_var_params['post_pages_page_id_metrics_providers_metrics_provider_id_metrics'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `post_pages_page_id_metrics_providers_metrics_provider_id_metrics` when calling `post_pages_page_id_metrics_providers_metrics_provider_id_metrics`") # noqa: E501
collection_formats = {}
path_params = {}
if 'page_id' in local_var_params:
path_params['page_id'] = local_var_params['page_id'] # noqa: E501
if 'metrics_provider_id' in local_var_params:
path_params['metrics_provider_id'] = local_var_params['metrics_provider_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'post_pages_page_id_metrics_providers_metrics_provider_id_metrics' in local_var_params:
body_params = local_var_params['post_pages_page_id_metrics_providers_metrics_provider_id_metrics']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['api_key'] # noqa: E501
return self.api_client.call_api(
'/pages/{page_id}/metrics_providers/{metrics_provider_id}/metrics', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='Metric', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
def put_pages_page_id_metrics_providers_metrics_provider_id(self, page_id, metrics_provider_id, put_pages_page_id_metrics_providers, **kwargs): # noqa: E501
"""Update a metric provider # noqa: E501
Update a metric provider # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.put_pages_page_id_metrics_providers_metrics_provider_id(page_id, metrics_provider_id, put_pages_page_id_metrics_providers, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str page_id: Page identifier (required)
:param str metrics_provider_id: Metric Provider Identifier (required)
:param PutPagesPageIdMetricsProviders put_pages_page_id_metrics_providers: (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: MetricsProvider
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
return self.put_pages_page_id_metrics_providers_metrics_provider_id_with_http_info(page_id, metrics_provider_id, put_pages_page_id_metrics_providers, **kwargs) # noqa: E501
def put_pages_page_id_metrics_providers_metrics_provider_id_with_http_info(self, page_id, metrics_provider_id, put_pages_page_id_metrics_providers, **kwargs): # noqa: E501
"""Update a metric provider # noqa: E501
Update a metric provider # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.put_pages_page_id_metrics_providers_metrics_provider_id_with_http_info(page_id, metrics_provider_id, put_pages_page_id_metrics_providers, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str page_id: Page identifier (required)
:param str metrics_provider_id: Metric Provider Identifier (required)
:param PutPagesPageIdMetricsProviders put_pages_page_id_metrics_providers: (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: tuple(MetricsProvider, status_code(int), headers(HTTPHeaderDict))
If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
all_params = ['page_id', 'metrics_provider_id', 'put_pages_page_id_metrics_providers'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method put_pages_page_id_metrics_providers_metrics_provider_id" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'page_id' is set
if self.api_client.client_side_validation and ('page_id' not in local_var_params or # noqa: E501
local_var_params['page_id'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `page_id` when calling `put_pages_page_id_metrics_providers_metrics_provider_id`") # noqa: E501
# verify the required parameter 'metrics_provider_id' is set
if self.api_client.client_side_validation and ('metrics_provider_id' not in local_var_params or # noqa: E501
local_var_params['metrics_provider_id'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `metrics_provider_id` when calling `put_pages_page_id_metrics_providers_metrics_provider_id`") # noqa: E501
# verify the required parameter 'put_pages_page_id_metrics_providers' is set
if self.api_client.client_side_validation and ('put_pages_page_id_metrics_providers' not in local_var_params or # noqa: E501
local_var_params['put_pages_page_id_metrics_providers'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `put_pages_page_id_metrics_providers` when calling `put_pages_page_id_metrics_providers_metrics_provider_id`") # noqa: E501
collection_formats = {}
path_params = {}
if 'page_id' in local_var_params:
path_params['page_id'] = local_var_params['page_id'] # noqa: E501
if 'metrics_provider_id' in local_var_params:
path_params['metrics_provider_id'] = local_var_params['metrics_provider_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'put_pages_page_id_metrics_providers' in local_var_params:
body_params = local_var_params['put_pages_page_id_metrics_providers']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['api_key'] # noqa: E501
return self.api_client.call_api(
'/pages/{page_id}/metrics_providers/{metrics_provider_id}', 'PUT',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='MetricsProvider', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
| 56.245491
| 2,064
| 0.650954
| 6,701
| 56,133
| 5.110431
| 0.044919
| 0.043802
| 0.063017
| 0.068331
| 0.946941
| 0.945656
| 0.945189
| 0.945189
| 0.940458
| 0.937538
| 0
| 0.014517
| 0.280869
| 56,133
| 997
| 2,065
| 56.301906
| 0.833825
| 0.442859
| 0
| 0.778022
| 0
| 0
| 0.250397
| 0.126345
| 0
| 0
| 0
| 0
| 0
| 1
| 0.037363
| false
| 0
| 0.010989
| 0
| 0.085714
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
a2c08970b30027bc6531880cf45ab9eb83efcf66
| 168
|
py
|
Python
|
sem_02/lab_04/src/queueing_system/__init__.py
|
bmstu-ics7/modeling
|
30f089cab44e8c56886acf6433abe8cc252ae722
|
[
"MIT"
] | 2
|
2020-06-08T18:50:29.000Z
|
2021-02-27T11:20:44.000Z
|
lab_2/code/queueing_system/__init__.py
|
Winterpuma/bmstu_experiment-planning
|
8d0ef45432c4d058a210d896ec3342b6b8b4182d
|
[
"MIT"
] | null | null | null |
lab_2/code/queueing_system/__init__.py
|
Winterpuma/bmstu_experiment-planning
|
8d0ef45432c4d058a210d896ec3342b6b8b4182d
|
[
"MIT"
] | 1
|
2020-10-22T10:49:42.000Z
|
2020-10-22T10:49:42.000Z
|
import queueing_system.exceptions
import queueing_system.distribution
import queueing_system.generator
import queueing_system.processor
import queueing_system.modeller
| 28
| 35
| 0.910714
| 20
| 168
| 7.4
| 0.4
| 0.472973
| 0.675676
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.059524
| 168
| 5
| 36
| 33.6
| 0.936709
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 7
|
a2c0bb0f1169524d813b1becbc92f670f6d1bf0d
| 4,406
|
py
|
Python
|
scripts/tests/test_misfit.py
|
mshodge/sparta
|
d64197d4f141269ef011525a78da5acde9d04aca
|
[
"MIT"
] | null | null | null |
scripts/tests/test_misfit.py
|
mshodge/sparta
|
d64197d4f141269ef011525a78da5acde9d04aca
|
[
"MIT"
] | 1
|
2022-03-02T12:16:15.000Z
|
2022-03-02T12:16:15.000Z
|
scripts/tests/test_misfit.py
|
mshodge/sparta
|
d64197d4f141269ef011525a78da5acde9d04aca
|
[
"MIT"
] | null | null | null |
import pytest
from scripts.tests.utils.create_data import create_profile_for_calculating_misfit, create_manual_profile_for_calculating_misfit
from scripts.misfit import misfit_calculation
def test_misfit_calculation_average():
profile = create_profile_for_calculating_misfit()
profile_manual = create_manual_profile_for_calculating_misfit()
misfit_df = misfit_calculation(profile, profile_manual,
method = "average", bin_max = 11, bin_min = 5, bin_step = 2, theta_T_max = 40,
theta_T_min = 30, theta_T_step = 2, phi_T = 5, plot = False, save_file = False)
misfit_df['misfit_height'] = misfit_df['misfit_height'].fillna(0).astype(int)
misfit_df['misfit_width'] = misfit_df['misfit_width'].fillna(0).astype(int)
misfit_df['misfit_slope'] = misfit_df['misfit_slope'].fillna(0).astype(int)
misfit_df['misfit_total'] = misfit_df['misfit_total'].fillna(0).astype(int)
assert misfit_df.loc[0].to_list() == [1, 'average', 1, 6, 1, 30, 5, 8]
def test_misfit_calculation_savgol():
profile = create_profile_for_calculating_misfit()
profile_manual = create_manual_profile_for_calculating_misfit()
misfit_df = misfit_calculation(profile, profile_manual,
method = "savgol", bin_max = 11, bin_min = 5, bin_step = 2, theta_T_max = 40,
theta_T_min = 30, theta_T_step = 2, phi_T = 5, plot = False, save_file = False)
misfit_df['misfit_height'] = misfit_df['misfit_height'].fillna(0).astype(int)
misfit_df['misfit_width'] = misfit_df['misfit_width'].fillna(0).astype(int)
misfit_df['misfit_slope'] = misfit_df['misfit_slope'].fillna(0).astype(int)
misfit_df['misfit_total'] = misfit_df['misfit_total'].fillna(0).astype(int)
assert misfit_df.loc[0].to_list() == [1, 'savgol', 1, 5, 4, 30, 5, 10]
def test_misfit_calculation_median():
profile = create_profile_for_calculating_misfit()
profile_manual = create_manual_profile_for_calculating_misfit()
misfit_df = misfit_calculation(profile, profile_manual,
method = "median", bin_max = 11, bin_min = 5, bin_step = 2, theta_T_max = 40,
theta_T_min = 30, theta_T_step = 2, phi_T = 5, plot = False, save_file = False)
misfit_df['misfit_height'] = misfit_df['misfit_height'].fillna(0).astype(int)
misfit_df['misfit_width'] = misfit_df['misfit_width'].fillna(0).astype(int)
misfit_df['misfit_slope'] = misfit_df['misfit_slope'].fillna(0).astype(int)
misfit_df['misfit_total'] = misfit_df['misfit_total'].fillna(0).astype(int)
assert misfit_df.loc[0].to_list() == [1, 'median', 0, 0, 0, 30, 5, 0]
def test_misfit_calculation_lowess():
profile = create_profile_for_calculating_misfit()
profile_manual = create_manual_profile_for_calculating_misfit()
misfit_df = misfit_calculation(profile, profile_manual,
method = "lowess", bin_max = 11, bin_min = 5, bin_step = 2, theta_T_max = 40,
theta_T_min = 30, theta_T_step = 2, phi_T = 5, plot = False, save_file = False)
misfit_df['misfit_height'] = misfit_df['misfit_height'].fillna(0).astype(int)
misfit_df['misfit_width'] = misfit_df['misfit_width'].fillna(0).astype(int)
misfit_df['misfit_slope'] = misfit_df['misfit_slope'].fillna(0).astype(int)
misfit_df['misfit_total'] = misfit_df['misfit_total'].fillna(0).astype(int)
assert misfit_df.loc[0].to_list() == [1, 'lowess', 1, 5, 4, 30, 5, 10]
def test_misfit_calculation_no_smoothing():
profile = create_profile_for_calculating_misfit()
profile_manual = create_manual_profile_for_calculating_misfit()
misfit_df = misfit_calculation(profile, profile_manual,
method = None, bin_max = 11, bin_min = 5, bin_step = 2, theta_T_max = 40,
theta_T_min = 30, theta_T_step = 2, phi_T = 5, plot = False, save_file = False)
misfit_df['misfit_height'] = misfit_df['misfit_height'].fillna(0).astype(int)
misfit_df['misfit_width'] = misfit_df['misfit_width'].fillna(0).astype(int)
misfit_df['misfit_slope'] = misfit_df['misfit_slope'].fillna(0).astype(int)
misfit_df['misfit_total'] = misfit_df['misfit_total'].fillna(0).astype(int)
assert misfit_df.loc[0].to_list() == [1, None, 0, 0, 0, 30, 5, 0]
| 56.487179
| 127
| 0.679528
| 627
| 4,406
| 4.397129
| 0.092504
| 0.145085
| 0.228509
| 0.116068
| 0.904969
| 0.893
| 0.873776
| 0.873776
| 0.873776
| 0.873776
| 0
| 0.032819
| 0.190876
| 4,406
| 78
| 128
| 56.487179
| 0.740533
| 0
| 0
| 0.689655
| 0
| 0
| 0.122532
| 0
| 0
| 0
| 0
| 0
| 0.086207
| 1
| 0.086207
| false
| 0
| 0.051724
| 0
| 0.137931
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
a73de6c9f5c71a05c1c906d1845f2be489761184
| 11,425
|
py
|
Python
|
mxnet_benchmarks/nn_operations/loss_operations.py
|
sandeep-krishnamurthy/dl-operator-benchmark
|
965797d2b847c840a4b8ef29c70c631f6642890a
|
[
"Apache-2.0"
] | 6
|
2019-05-01T22:05:05.000Z
|
2020-02-13T19:07:27.000Z
|
mxnet_benchmarks/nn_operations/loss_operations.py
|
sandeep-krishnamurthy/dl-operator-benchmark
|
965797d2b847c840a4b8ef29c70c631f6642890a
|
[
"Apache-2.0"
] | 2
|
2019-11-09T06:38:09.000Z
|
2019-11-09T06:41:44.000Z
|
mxnet_benchmarks/nn_operations/loss_operations.py
|
sandeep-krishnamurthy/dl-operator-benchmark
|
965797d2b847c840a4b8ef29c70c631f6642890a
|
[
"Apache-2.0"
] | null | null | null |
import mxnet as mx
import mxnet.ndarray as nd
from mxnet.gluon import loss
from utils.common_utils import get_class_members_in_module
from mxnet_benchmarks.MXNetOperatorBenchmark import MXNetOperatorBenchmarkBase
from mxnet_benchmarks.utils.gluon_utils import block_forward_and_time
from mxnet_benchmarks.utils.ndarray_utils import get_mx_ndarray
""" Performance benchmark tests for MXNet Gluon Loss Layers
1. L1Loss
2. L2Loss
3. SigmoidBinaryCrossEntropyLoss
4. SoftmaxCrossEntropyLoss
5. KLDivLoss (TODO)
6. HuberLoss (TODO)
7. HingeLoss (TODO)
8. SquaredHingeLoss (TODO)
9. LogisticLoss (TODO)
10. TripletLoss (TODO)
11. CTCLoss (TODO)
"""
class L1Loss(MXNetOperatorBenchmarkBase):
"""Helps to benchmark Gluon L1Loss Block.
By default, benchmarks both forward pass on the L1Loss block on pred tensor of shape
(32, 1000) and Label of shape (1000,1) to mimic batch_size=32 and 1000 class classification.
By default, use weight=1.0 just to force the weight computation.
By default, uses 'float32' precision.
"""
def __init__(self, ctx=mx.cpu(), warmup=10, runs=50, inputs=None):
# Set the default Inputs.
# Default prediction is (32, 1000, 1) to mimic a prediction of batch_size=32 and 1000 class classification.
default_parameters = {"pred": (32, 1000, 1),
"pred_initializer": nd.normal,
"label": (32, 1000, 1),
"label_initializer": nd.normal,
"weight": 1.0,
"run_backward": False,
"dtype": "float32"}
super().__init__(ctx=ctx, warmup=warmup, runs=runs, default_parameters=default_parameters,
custom_parameters=inputs)
# Create a random prediction and label tensor
self.pred = get_mx_ndarray(ctx=self.ctx, in_tensor=self.inputs["pred"],
dtype=self.inputs["dtype"],
initializer=self.inputs["pred_initializer"],
attach_grad=self.inputs["run_backward"])
self.label = get_mx_ndarray(ctx=self.ctx, in_tensor=self.inputs["label"],
dtype=self.inputs["dtype"],
initializer=self.inputs["label_initializer"],
attach_grad=self.inputs["run_backward"])
self.block = loss.L1Loss(weight=self.inputs["weight"], batch_axis=0)
self.block.initialize(ctx=self.ctx)
def run_benchmark(self):
# Warm up, ignore execution time value
_, _ = block_forward_and_time(block=self.block, runs=self.warmup, pred=self.pred, label=self.label)
# Run Benchmarks
exe_time, _ = block_forward_and_time(block=self.block, runs=self.runs, pred=self.pred, label=self.label)
self.results["MX_Gluon_Imperative_L1Loss_Forward_Time"] = exe_time / self.runs
class L2Loss(MXNetOperatorBenchmarkBase):
"""Helps to benchmark Gluon L2Loss Block.
By default, benchmarks both forward pass on the L2Loss block on pred tensor of shape
(32, 1000, 1) and Label of shape (32, 1000,1) to mimic batch_size=32 and 1000 class classification.
By default, use weight=1.0 just to force the weight computation.
By default, uses 'float32' precision.
"""
def __init__(self, ctx=mx.cpu(), warmup=10, runs=50, inputs=None):
# Set the default Inputs.
# Default prediction is (32, 1000, 1) to mimic a prediction of batch_size=32 and 1000 class classification.
default_parameters = {"pred": (32, 1000, 1),
"pred_initializer": nd.normal,
"label": (32, 1000, 1),
"label_initializer": nd.normal,
"weight": 1.0,
"run_backward": False,
"dtype": "float32"}
super().__init__(ctx=ctx, warmup=warmup, runs=runs, default_parameters=default_parameters,
custom_parameters=inputs)
# Create a random prediction and label tensor
self.pred = get_mx_ndarray(ctx=self.ctx, in_tensor=self.inputs["pred"],
dtype=self.inputs["dtype"],
initializer=self.inputs["pred_initializer"],
attach_grad=self.inputs["run_backward"])
self.label = get_mx_ndarray(ctx=self.ctx, in_tensor=self.inputs["label"],
dtype=self.inputs["dtype"],
initializer=self.inputs["label_initializer"],
attach_grad=self.inputs["run_backward"])
self.block = loss.L2Loss(weight=self.inputs["weight"], batch_axis=0)
self.block.initialize(ctx=self.ctx)
def run_benchmark(self):
# Warm up, ignore execution time value
_, _ = block_forward_and_time(block=self.block, runs=self.warmup, pred=self.pred, label=self.label)
# Run Benchmarks
exe_time, _ = block_forward_and_time(block=self.block, runs=self.runs, pred=self.pred, label=self.label)
self.results["MX_Gluon_Imperative_L2Loss_Forward_Time"] = exe_time / self.runs
class SigmoidBinaryCrossEntropyLoss(MXNetOperatorBenchmarkBase):
"""Helps to benchmark Gluon SigmoidBinaryCrossEntropyLoss Block.
By default, benchmarks both forward pass on the SigmoidBinaryCrossEntropyLoss block on pred tensor of shape
(32, 1000, 1) and Label of shape (32, 1000,1) to mimic batch_size=32 and 1000 class classification.
By default, use weight=1.0 just to force the weight computation.
By default, uses 'float32' precision.
"""
def __init__(self, ctx=mx.cpu(), warmup=10, runs=50, inputs=None):
# Set the default Inputs.
# Default prediction is (32, 1000, 1) to mimic a prediction of batch_size=32 and 1000 class classification.
default_parameters = {"pred": (32, 1000, 1),
"pred_initializer": nd.ones,
"label": (32, 1000, 1),
"label_initializer": nd.zeros,
"weight": 1.0,
"run_backward": False,
"dtype": "float32"}
super().__init__(ctx=ctx, warmup=warmup, runs=runs, default_parameters=default_parameters,
custom_parameters=inputs)
# Create a random prediction and label tensor
self.pred = get_mx_ndarray(ctx=self.ctx, in_tensor=self.inputs["pred"],
dtype=self.inputs["dtype"],
initializer=self.inputs["pred_initializer"],
attach_grad=self.inputs["run_backward"])
self.label = get_mx_ndarray(ctx=self.ctx, in_tensor=self.inputs["label"],
dtype=self.inputs["dtype"],
initializer=self.inputs["label_initializer"],
attach_grad=self.inputs["run_backward"])
self.block = loss.SigmoidBCELoss(from_sigmoid=False, weight=self.inputs["weight"], batch_axis=0)
self.block.initialize(ctx=self.ctx)
def run_benchmark(self):
# Warm up, ignore execution time value
_, _ = block_forward_and_time(block=self.block, runs=self.warmup, pred=self.pred, label=self.label)
# Run Benchmarks
exe_time, _ = block_forward_and_time(block=self.block, runs=self.runs, pred=self.pred, label=self.label)
self.results["MX_Gluon_Imperative_SigmoidBinaryCrossEntropyLoss_Forward_Time"] = exe_time / self.runs
class SoftmaxCrossEntropyLoss(MXNetOperatorBenchmarkBase):
"""Helps to benchmark Gluon SoftmaxCrossEntropyLoss Block.
By default, benchmarks both forward pass on the SoftmaxCrossEntropyLoss block on pred tensor of shape
(32, 1000, 1) and Label of shape (32, 1000,1) to mimic batch_size=32 and 1000 class classification.
By default, use weight=1.0 just to force the weight computation.
By default, uses 'float32' precision.
"""
def __init__(self, ctx=mx.cpu(), warmup=10, runs=50, inputs=None):
# Set the default Inputs.
# Default prediction is (32, 1000, 1) to mimic a prediction of batch_size=32 and 1000 class classification.
default_parameters = {"pred": (32, 1000, 1),
"pred_initializer": nd.normal,
"label": (32, 1000, 1),
"label_initializer": nd.normal,
"weight": 1.0,
"axis": -1,
"sparse_label": False,
"run_backward": False,
"dtype": "float32"}
super().__init__(ctx=ctx, warmup=warmup, runs=runs, default_parameters=default_parameters,
custom_parameters=inputs)
# Create a random prediction and label tensor
self.pred = get_mx_ndarray(ctx=self.ctx, in_tensor=self.inputs["pred"],
dtype=self.inputs["dtype"],
initializer=self.inputs["pred_initializer"],
attach_grad=self.inputs["run_backward"])
self.label = get_mx_ndarray(ctx=self.ctx, in_tensor=self.inputs["label"],
dtype=self.inputs["dtype"],
initializer=self.inputs["label_initializer"],
attach_grad=self.inputs["run_backward"])
self.block = loss.SoftmaxCrossEntropyLoss(axis=self.inputs["axis"],
sparse_label=self.inputs["sparse_label"],
from_logits=False,
weight=self.inputs["weight"],
batch_axis=0)
self.block.initialize(ctx=self.ctx)
def run_benchmark(self):
# Warm up, ignore execution time value
_, _ = block_forward_and_time(block=self.block, runs=self.warmup, pred=self.pred, label=self.label)
# Run Benchmarks
exe_time, _ = block_forward_and_time(block=self.block, runs=self.runs, pred=self.pred, label=self.label)
self.results["MX_Gluon_Imperative_SoftmaxCrossEntropyLoss_Forward_Time"] = exe_time / self.runs
# Utilities
def run_all_gluon_nn_loss_operations_benchmarks(ctx, inputs):
"""Helper to run all Gluon Loss Layer benchmarks. Just runs the benchmarks with default input values.
This is just a utility to run benchmarks with all default input values.
:return: list[dict], list of dictionary of benchmark results. Each item in the list is a dictionary of benchmark
results per operator.
"""
nn_loss_operations_results = []
members = get_class_members_in_module(__name__)
for _, cls in members:
benchmark_ref = cls(ctx=ctx, inputs=inputs)
benchmark_ref.run_benchmark()
benchmark_ref.print_benchmark_results()
nn_loss_operations_results.append(benchmark_ref.get_benchmark_results())
return nn_loss_operations_results
| 47.016461
| 116
| 0.602451
| 1,307
| 11,425
| 5.081867
| 0.111706
| 0.057212
| 0.01897
| 0.025745
| 0.780638
| 0.745408
| 0.741494
| 0.722975
| 0.718458
| 0.69196
| 0
| 0.033049
| 0.303457
| 11,425
| 242
| 117
| 47.210744
| 0.801583
| 0.229934
| 0
| 0.704918
| 0
| 0
| 0.101066
| 0.02347
| 0
| 0
| 0
| 0.028926
| 0
| 1
| 0.07377
| false
| 0
| 0.057377
| 0
| 0.172131
| 0.008197
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
a774c9cab86b1183c4d849c10340af62dbb3978d
| 19,190
|
py
|
Python
|
extensions/arcade/tests/test_xo_txn_family.py
|
jrineck/sawtooth-core
|
e3eb79f32c97a25993c87eda7f77a02fd2086c7c
|
[
"Apache-2.0"
] | null | null | null |
extensions/arcade/tests/test_xo_txn_family.py
|
jrineck/sawtooth-core
|
e3eb79f32c97a25993c87eda7f77a02fd2086c7c
|
[
"Apache-2.0"
] | null | null | null |
extensions/arcade/tests/test_xo_txn_family.py
|
jrineck/sawtooth-core
|
e3eb79f32c97a25993c87eda7f77a02fd2086c7c
|
[
"Apache-2.0"
] | null | null | null |
# Copyright 2016 Intel Corporation
#
# 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 logging
import unittest
from gossip import signed_object
from journal import global_store_manager
from sawtooth_xo.txn_family import XoTransaction
class TestSawtoothXoTxnFamily(unittest.TestCase):
@classmethod
def setUpClass(cls):
logger = logging.getLogger()
# We need DEBUG level since some is_valid() failures get logged with
# DEBUG
logger.setLevel(logging.DEBUG)
handler = logging.StreamHandler()
logger.addHandler(handler)
def test_xo_transaction_is_valid_no_signature(self):
store = global_store_manager.KeyValueStore()
transaction = XoTransaction({
'Action': 'CREATE',
'Name': 'game000'
})
self.assertFalse(transaction.is_valid(store))
def test_xo_transaction_is_valid_missing_name(self):
key = signed_object.generate_signing_key()
store = global_store_manager.KeyValueStore()
transaction = XoTransaction({
'Action': 'CREATE'
})
transaction.sign_object(key)
self.assertFalse(transaction.is_valid(store))
def test_xo_transaction_is_valid_missing_action(self):
key = signed_object.generate_signing_key()
store = global_store_manager.KeyValueStore()
transaction = XoTransaction({
'Name': 'game000'
})
transaction.sign_object(key)
self.assertFalse(transaction.is_valid(store))
def test_xo_transaction_is_valid_invalid_action(self):
key = signed_object.generate_signing_key()
store = global_store_manager.KeyValueStore()
transaction = XoTransaction({
'Action': 'INVALID',
'Name': 'game000'
})
transaction.sign_object(key)
self.assertFalse(transaction.is_valid(store))
def test_xo_transaction_is_valid_create_same_name(self):
key = signed_object.generate_signing_key()
store = global_store_manager.KeyValueStore()
store.set('game000', '{}')
transaction = XoTransaction({
'Action': 'CREATE',
'Name': 'game000'
})
transaction.sign_object(key)
self.assertFalse(transaction.is_valid(store))
def test_xo_transaction_is_valid_take_missing_space(self):
key = signed_object.generate_signing_key()
store = global_store_manager.KeyValueStore()
store.set('game000', '{}')
transaction = XoTransaction({
'Action': 'TAKE',
'Name': 'game000'
})
transaction.sign_object(key)
self.assertFalse(transaction.is_valid(store))
def test_xo_transaction_is_valid_invalid_space(self):
key = signed_object.generate_signing_key()
store = global_store_manager.KeyValueStore()
# Create the game
transaction = XoTransaction({
'Action': 'CREATE',
'Name': 'game000'
})
transaction.sign_object(key)
self.assertTrue(transaction.is_valid(store))
transaction.apply(store)
self.assertIn('game000', store)
self.assertIn('Board', store['game000'])
self.assertIn('State', store['game000'])
self.assertEquals(store['game000']['State'], 'P1-NEXT')
self.assertEquals(store['game000']['Board'], '---------')
for space in [0, 10]:
transaction = XoTransaction({
'Action': 'TAKE',
'Name': 'game000',
'Space': space
})
transaction.sign_object(key)
self.assertFalse(transaction.is_valid(store))
def test_xo_transaction_is_valid_no_game(self):
key = signed_object.generate_signing_key()
store = global_store_manager.KeyValueStore()
transaction = XoTransaction({
'Action': 'TAKE',
'Name': 'game000',
'Space': 1
})
transaction.sign_object(key)
self.assertFalse(transaction.is_valid(store))
def test_xo_transaction_game_p1_wins(self):
player1_key = signed_object.generate_signing_key()
player2_key = signed_object.generate_signing_key()
store = global_store_manager.KeyValueStore()
# Create the game
transaction = XoTransaction({
'Action': 'CREATE',
'Name': 'game000'
})
transaction.sign_object(player1_key)
self.assertTrue(transaction.is_valid(store))
transaction.apply(store)
self.assertIn('game000', store)
self.assertIn('Board', store['game000'])
self.assertIn('State', store['game000'])
self.assertEquals(store['game000']['State'], 'P1-NEXT')
self.assertEquals(store['game000']['Board'], '---------')
# Take space 1
transaction = XoTransaction({
'Action': 'TAKE',
'Name': 'game000',
'Space': 1
})
transaction.sign_object(player1_key)
self.assertTrue(transaction.is_valid(store))
transaction.apply(store)
self.assertIn('game000', store)
self.assertIn('Board', store['game000'])
self.assertIn('State', store['game000'])
self.assertEquals(store['game000']['State'], 'P2-NEXT')
self.assertEquals(store['game000']['Board'], 'X--------')
# Take space 2
transaction = XoTransaction({
'Action': 'TAKE',
'Name': 'game000',
'Space': 2
})
transaction.sign_object(player2_key)
self.assertTrue(transaction.is_valid(store))
transaction.apply(store)
self.assertIn('game000', store)
self.assertIn('Board', store['game000'])
self.assertIn('State', store['game000'])
self.assertEquals(store['game000']['State'], 'P1-NEXT')
self.assertEquals(store['game000']['Board'], 'XO-------')
# Make sure it isn't valid to take space 2 again
transaction = XoTransaction({
'Action': 'TAKE',
'Name': 'game000',
'Space': 2
})
transaction.sign_object(player1_key)
self.assertFalse(transaction.is_valid(store))
# Make sure Player 2 can't go on Player 1's turn.
transaction = XoTransaction({
'Action': 'TAKE',
'Name': 'game000',
'Space': 3
})
transaction.sign_object(player2_key)
self.assertFalse(transaction.is_valid(store))
# Take space 4
transaction = XoTransaction({
'Action': 'TAKE',
'Name': 'game000',
'Space': 4
})
transaction.sign_object(player1_key)
self.assertTrue(transaction.is_valid(store))
transaction.apply(store)
self.assertIn('game000', store)
self.assertIn('Board', store['game000'])
self.assertIn('State', store['game000'])
self.assertEquals(store['game000']['State'], 'P2-NEXT')
self.assertEquals(store['game000']['Board'], 'XO-X-----')
# Make sure Player 1 can't go on Player 2's turn.
transaction = XoTransaction({
'Action': 'TAKE',
'Name': 'game000',
'Space': 9
})
transaction.sign_object(player1_key)
self.assertFalse(transaction.is_valid(store))
# Take space 9
transaction = XoTransaction({
'Action': 'TAKE',
'Name': 'game000',
'Space': 9
})
transaction.sign_object(player2_key)
self.assertTrue(transaction.is_valid(store))
transaction.apply(store)
self.assertIn('game000', store)
self.assertIn('Board', store['game000'])
self.assertIn('State', store['game000'])
self.assertEquals(store['game000']['State'], 'P1-NEXT')
self.assertEquals(store['game000']['Board'], 'XO-X----O')
# Take space 7
transaction = XoTransaction({
'Action': 'TAKE',
'Name': 'game000',
'Space': 7
})
transaction.sign_object(player1_key)
self.assertTrue(transaction.is_valid(store))
transaction.apply(store)
self.assertIn('game000', store)
self.assertIn('Board', store['game000'])
self.assertIn('State', store['game000'])
self.assertEquals(store['game000']['State'], 'P1-WIN')
self.assertEquals(store['game000']['Board'], 'XO-X--X-O')
# Make sure we can't modify the game anymore
transaction = XoTransaction({
'Action': 'TAKE',
'Name': 'game000',
'Space': 3
})
transaction.sign_object(player2_key)
self.assertFalse(transaction.is_valid(store))
def test_xo_transaction_game_p2_wins(self):
player1_key = signed_object.generate_signing_key()
player2_key = signed_object.generate_signing_key()
store = global_store_manager.KeyValueStore()
# Create the game
transaction = XoTransaction({
'Action': 'CREATE',
'Name': 'game000'
})
transaction.sign_object(player1_key)
self.assertTrue(transaction.is_valid(store))
transaction.apply(store)
self.assertIn('game000', store)
self.assertIn('Board', store['game000'])
self.assertIn('State', store['game000'])
self.assertEquals(store['game000']['State'], 'P1-NEXT')
self.assertEquals(store['game000']['Board'], '---------')
# Take space 1
transaction = XoTransaction({
'Action': 'TAKE',
'Name': 'game000',
'Space': 1
})
transaction.sign_object(player1_key)
self.assertTrue(transaction.is_valid(store))
transaction.apply(store)
self.assertIn('game000', store)
self.assertIn('Board', store['game000'])
self.assertIn('State', store['game000'])
self.assertEquals(store['game000']['State'], 'P2-NEXT')
self.assertEquals(store['game000']['Board'], 'X--------')
# Take space 2
transaction = XoTransaction({
'Action': 'TAKE',
'Name': 'game000',
'Space': 2
})
transaction.sign_object(player2_key)
self.assertTrue(transaction.is_valid(store))
transaction.apply(store)
self.assertIn('game000', store)
self.assertIn('Board', store['game000'])
self.assertIn('State', store['game000'])
self.assertEquals(store['game000']['State'], 'P1-NEXT')
self.assertEquals(store['game000']['Board'], 'XO-------')
# Take space 4
transaction = XoTransaction({
'Action': 'TAKE',
'Name': 'game000',
'Space': 4
})
transaction.sign_object(player1_key)
self.assertTrue(transaction.is_valid(store))
transaction.apply(store)
self.assertIn('game000', store)
self.assertIn('Board', store['game000'])
self.assertIn('State', store['game000'])
self.assertEquals(store['game000']['State'], 'P2-NEXT')
self.assertEquals(store['game000']['Board'], 'XO-X-----')
# Take space 8
transaction = XoTransaction({
'Action': 'TAKE',
'Name': 'game000',
'Space': 8
})
transaction.sign_object(player2_key)
self.assertTrue(transaction.is_valid(store))
transaction.apply(store)
self.assertIn('game000', store)
self.assertIn('Board', store['game000'])
self.assertIn('State', store['game000'])
self.assertEquals(store['game000']['State'], 'P1-NEXT')
self.assertEquals(store['game000']['Board'], 'XO-X---O-')
# Take space 9
transaction = XoTransaction({
'Action': 'TAKE',
'Name': 'game000',
'Space': 9
})
transaction.sign_object(player1_key)
self.assertTrue(transaction.is_valid(store))
transaction.apply(store)
self.assertIn('game000', store)
self.assertIn('Board', store['game000'])
self.assertIn('State', store['game000'])
self.assertEquals(store['game000']['State'], 'P2-NEXT')
self.assertEquals(store['game000']['Board'], 'XO-X---OX')
# Take space 5
transaction = XoTransaction({
'Action': 'TAKE',
'Name': 'game000',
'Space': 5
})
transaction.sign_object(player2_key)
self.assertTrue(transaction.is_valid(store))
transaction.apply(store)
self.assertIn('game000', store)
self.assertIn('Board', store['game000'])
self.assertIn('State', store['game000'])
self.assertEquals(store['game000']['State'], 'P2-WIN')
self.assertEquals(store['game000']['Board'], 'XO-XO--OX')
def test_xo_transaction_game_tie(self):
player1_key = signed_object.generate_signing_key()
player2_key = signed_object.generate_signing_key()
store = global_store_manager.KeyValueStore()
# Create the game
transaction = XoTransaction({
'Action': 'CREATE',
'Name': 'game000'
})
transaction.sign_object(player1_key)
self.assertTrue(transaction.is_valid(store))
transaction.apply(store)
self.assertIn('game000', store)
self.assertIn('Board', store['game000'])
self.assertIn('State', store['game000'])
self.assertEquals(store['game000']['State'], 'P1-NEXT')
self.assertEquals(store['game000']['Board'], '---------')
# Take space 1
transaction = XoTransaction({
'Action': 'TAKE',
'Name': 'game000',
'Space': 1
})
transaction.sign_object(player1_key)
self.assertTrue(transaction.is_valid(store))
transaction.apply(store)
self.assertIn('game000', store)
self.assertIn('Board', store['game000'])
self.assertIn('State', store['game000'])
self.assertEquals(store['game000']['State'], 'P2-NEXT')
self.assertEquals(store['game000']['Board'], 'X--------')
# Take space 2
transaction = XoTransaction({
'Action': 'TAKE',
'Name': 'game000',
'Space': 2
})
transaction.sign_object(player2_key)
self.assertTrue(transaction.is_valid(store))
transaction.apply(store)
self.assertIn('game000', store)
self.assertIn('Board', store['game000'])
self.assertIn('State', store['game000'])
self.assertEquals(store['game000']['State'], 'P1-NEXT')
self.assertEquals(store['game000']['Board'], 'XO-------')
# Take space 4
transaction = XoTransaction({
'Action': 'TAKE',
'Name': 'game000',
'Space': 4
})
transaction.sign_object(player1_key)
self.assertTrue(transaction.is_valid(store))
transaction.apply(store)
self.assertIn('game000', store)
self.assertIn('Board', store['game000'])
self.assertIn('State', store['game000'])
self.assertEquals(store['game000']['State'], 'P2-NEXT')
self.assertEquals(store['game000']['Board'], 'XO-X-----')
# Take space 5
transaction = XoTransaction({
'Action': 'TAKE',
'Name': 'game000',
'Space': 5
})
transaction.sign_object(player2_key)
self.assertTrue(transaction.is_valid(store))
transaction.apply(store)
self.assertIn('game000', store)
self.assertIn('Board', store['game000'])
self.assertIn('State', store['game000'])
self.assertEquals(store['game000']['State'], 'P1-NEXT')
self.assertEquals(store['game000']['Board'], 'XO-XO----')
# Take space 8
transaction = XoTransaction({
'Action': 'TAKE',
'Name': 'game000',
'Space': 8
})
transaction.sign_object(player1_key)
self.assertTrue(transaction.is_valid(store))
transaction.apply(store)
self.assertIn('game000', store)
self.assertIn('Board', store['game000'])
self.assertIn('State', store['game000'])
self.assertEquals(store['game000']['State'], 'P2-NEXT')
self.assertEquals(store['game000']['Board'], 'XO-XO--X-')
# Take space 7
transaction = XoTransaction({
'Action': 'TAKE',
'Name': 'game000',
'Space': 7
})
transaction.sign_object(player2_key)
self.assertTrue(transaction.is_valid(store))
transaction.apply(store)
self.assertIn('game000', store)
self.assertIn('Board', store['game000'])
self.assertIn('State', store['game000'])
self.assertEquals(store['game000']['State'], 'P1-NEXT')
self.assertEquals(store['game000']['Board'], 'XO-XO-OX-')
# Take space 3
transaction = XoTransaction({
'Action': 'TAKE',
'Name': 'game000',
'Space': 3
})
transaction.sign_object(player1_key)
self.assertTrue(transaction.is_valid(store))
transaction.apply(store)
self.assertIn('game000', store)
self.assertIn('Board', store['game000'])
self.assertIn('State', store['game000'])
self.assertEquals(store['game000']['State'], 'P2-NEXT')
self.assertEquals(store['game000']['Board'], 'XOXXO-OX-')
# Take space 6
transaction = XoTransaction({
'Action': 'TAKE',
'Name': 'game000',
'Space': 6
})
transaction.sign_object(player2_key)
self.assertTrue(transaction.is_valid(store))
transaction.apply(store)
self.assertIn('game000', store)
self.assertIn('Board', store['game000'])
self.assertIn('State', store['game000'])
self.assertEquals(store['game000']['State'], 'P1-NEXT')
self.assertEquals(store['game000']['Board'], 'XOXXOOOX-')
# Take space 9
transaction = XoTransaction({
'Action': 'TAKE',
'Name': 'game000',
'Space': 9
})
transaction.sign_object(player1_key)
self.assertTrue(transaction.is_valid(store))
transaction.apply(store)
self.assertIn('game000', store)
self.assertIn('Board', store['game000'])
self.assertIn('State', store['game000'])
self.assertEquals(store['game000']['State'], 'TIE')
self.assertEquals(store['game000']['Board'], 'XOXXOOOXX')
| 35.602968
| 80
| 0.584106
| 1,891
| 19,190
| 5.803279
| 0.087784
| 0.104975
| 0.074358
| 0.122471
| 0.906233
| 0.898487
| 0.89712
| 0.881356
| 0.877438
| 0.869419
| 0
| 0.041972
| 0.267483
| 19,190
| 538
| 81
| 35.669145
| 0.738707
| 0.063366
| 0
| 0.903002
| 0
| 0
| 0.144905
| 0
| 0
| 0
| 0
| 0
| 0.360277
| 1
| 0.027714
| false
| 0
| 0.011547
| 0
| 0.04157
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
a7b8208580aaaeade5ddea41f34b194d503ce555
| 73
|
py
|
Python
|
taobao-tianmao/dingtalk/api/__init__.py
|
ScottLeeF/python-example
|
0b230ba80fe5020d70329a9d73e058013f0ca111
|
[
"Apache-2.0"
] | null | null | null |
taobao-tianmao/dingtalk/api/__init__.py
|
ScottLeeF/python-example
|
0b230ba80fe5020d70329a9d73e058013f0ca111
|
[
"Apache-2.0"
] | 7
|
2021-03-19T02:12:42.000Z
|
2022-03-12T00:25:28.000Z
|
taobao-tianmao/dingtalk/api/__init__.py
|
ScottLeeF/python-example
|
0b230ba80fe5020d70329a9d73e058013f0ca111
|
[
"Apache-2.0"
] | null | null | null |
from dingtalk.api.base import FileItem
from dingtalk.api.rest import *
| 24.333333
| 39
| 0.794521
| 11
| 73
| 5.272727
| 0.636364
| 0.413793
| 0.517241
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.136986
| 73
| 2
| 40
| 36.5
| 0.920635
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 7
|
38f3e902d95a584b7c067058683b4aaae2652e6e
| 3,362
|
py
|
Python
|
graphtheory/hamiltonian/tspmst.py
|
gitter-badger/graphs-dict
|
2be1a5b140feb050eec799d6cadf6de5eef01745
|
[
"BSD-3-Clause"
] | 36
|
2015-09-20T20:55:39.000Z
|
2021-09-20T05:49:03.000Z
|
graphtheory/hamiltonian/tspmst.py
|
gitter-badger/graphs-dict
|
2be1a5b140feb050eec799d6cadf6de5eef01745
|
[
"BSD-3-Clause"
] | 6
|
2016-03-25T21:41:46.000Z
|
2020-02-12T03:18:59.000Z
|
graphtheory/hamiltonian/tspmst.py
|
gitter-badger/graphs-dict
|
2be1a5b140feb050eec799d6cadf6de5eef01745
|
[
"BSD-3-Clause"
] | 9
|
2016-09-12T07:57:27.000Z
|
2022-03-21T16:15:39.000Z
|
#!/usr/bin/python
try:
integer_types = (int, long)
except NameError: # Python 3
integer_types = (int,)
xrange = range
from graphtheory.spanningtrees.prim import PrimMatrixMSTWithEdges
from graphtheory.traversing.dfs import SimpleDFS
class PrimTSPWithEdges:
"""The minimum spanning tree algorithm for Metric TSP.
Attributes
----------
graph : input weighted complete graph
hamiltonian_cycle : list of edges
source : starting node
"""
def __init__(self, graph):
"""The algorithm initialization."""
if graph.is_directed():
raise ValueError("the graph is directed")
self.graph = graph
self.hamiltonian_cycle = list()
self.source = None
def run(self, source=None):
"""Executable pseudocode."""
if source is None:
source = next(self.graph.iternodes())
self.source = source
algorithm = PrimMatrixMSTWithEdges(self.graph) # O(V**2) time
algorithm.run(self.source)
self.mst = algorithm.to_tree()
# Obchodzenie MST w kolejnosci preorder z uzyciem DFS.
# Hamiltonian cycle as a list of nodes.
order = list()
algorithm = SimpleDFS(self.mst) # O(V) time
algorithm.run(self.source, pre_action=lambda node: order.append(node))
order.append(self.source) # close cycle, length V+1
# Finding edges for the Hamiltonian cycle, O(V**2) time.
for i in xrange(self.graph.v()):
source = order[i]
target = order[i+1]
for edge in self.graph.iteroutedges(source):
if edge.target == target:
self.hamiltonian_cycle.append(edge)
break
class PrimTSPWithGraph:
"""The minimum spanning tree algorithm for Metric TSP.
Attributes
----------
graph : input weighted complete graph
hamiltonian_cycle : cycle graph
source : starting node
"""
def __init__(self, graph):
"""The algorithm initialization."""
if graph.is_directed():
raise ValueError("the graph is directed")
self.graph = graph
self.hamiltonian_cycle = self.graph.__class__(self.graph.v())
for node in self.graph.iternodes():
self.hamiltonian_cycle.add_node(node)
self.source = None
def run(self, source=None):
"""Executable pseudocode."""
if source is None:
source = next(self.graph.iternodes())
self.source = source
algorithm = PrimMatrixMSTWithEdges(self.graph) # O(V**2) time
algorithm.run(self.source)
self.mst = algorithm.to_tree()
# Obchodzenie MST w kolejnosci preorder z uzyciem DFS.
# Hamiltonian cycle as a list of nodes.
order = list()
algorithm = SimpleDFS(self.mst) # O(V) time
algorithm.run(self.source, pre_action=lambda node: order.append(node))
order.append(self.source) # close cycle, length V+1
# Finding edges for the Hamiltonian cycle, O(V**2) time.
for i in xrange(self.graph.v()):
source = order[i]
target = order[i+1]
for edge in self.graph.iteroutedges(source):
if edge.target == target:
self.hamiltonian_cycle.add_edge(edge)
break
# EOF
| 33.959596
| 78
| 0.6047
| 391
| 3,362
| 5.12532
| 0.237852
| 0.067365
| 0.038922
| 0.013972
| 0.816367
| 0.816367
| 0.816367
| 0.816367
| 0.816367
| 0.816367
| 0
| 0.003788
| 0.293278
| 3,362
| 98
| 79
| 34.306122
| 0.839646
| 0.255503
| 0
| 0.745763
| 0
| 0
| 0.0175
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.067797
| false
| 0
| 0.033898
| 0
| 0.135593
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
3bbbfcf1e5b7529c7dbe3aff0a1cf01e76d0faf8
| 5,778
|
py
|
Python
|
data/scripts/attributes/StaticNPCAttributeTemplate.py
|
obi-two/GameServer
|
7d37024e2291a97d49522610cd8f1dbe5666afc2
|
[
"MIT"
] | 20
|
2015-02-23T15:11:56.000Z
|
2022-03-18T20:56:48.000Z
|
data/scripts/attributes/StaticNPCAttributeTemplate.py
|
apathyboy/swganh
|
665128efe9154611dec4cb5efc61d246dd095984
|
[
"MIT"
] | null | null | null |
data/scripts/attributes/StaticNPCAttributeTemplate.py
|
apathyboy/swganh
|
665128efe9154611dec4cb5efc61d246dd095984
|
[
"MIT"
] | 20
|
2015-04-04T16:35:59.000Z
|
2022-03-24T14:54:37.000Z
|
import swgpy
from swgpy.object import *
from swgpy.attributes import *
from attributes.AttributeHelpers import SetOptionalAttribute
class StaticNPCAttributeTemplate(BaseAttributeTemplate):
def buildAttributeTemplate(self, object):
attribute_list_message = AttributeListMessage()
attribute_list_message.object_id = object.id
attributes = AttributeList()
if len(object.custom_name) > 0:
attributes.append("@obj_attr_n:original_name", "@" + object.stf_file + ":" + object.stf_name)
attributes.extend([
Attribute("@obj_attr_n:condition", str(object.max_condition-object.condition_damage) + "/" + str(object.max_condition)),
Attribute("@obj_attr_n:volume", str(object.volume)),
Attribute("@obj_attr_n:armor_rating", object.getStringAttribute("armor_rating"))
])
SetOptionalAttribute(attributes, "cat_armor_special_protection.@obj_attr_n:armor_eff_kinetic", "cat_armor_special_protection.armor_eff_kinetic", object, True);
SetOptionalAttribute(attributes, "cat_armor_special_protection.@obj_attr_n:armor_eff_energy", "cat_armor_special_protection.armor_eff_energy", object, True);
SetOptionalAttribute(attributes, "cat_armor_special_protection.@obj_attr_n:armor_eff_blast", "cat_armor_special_protection.armor_eff_blast", object, True);
SetOptionalAttribute(attributes, "cat_armor_special_protection.@obj_attr_n:armor_eff_stun", "cat_armor_special_protection.armor_eff_stun", object, True);
SetOptionalAttribute(attributes, "cat_armor_special_protection.@obj_attr_n:armor_eff_elemental_heat", "cat_armor_special_protection.armor_eff_elemental_heat", object, True);
SetOptionalAttribute(attributes, "cat_armor_special_protection.@obj_attr_n:armor_eff_elemental_cold", "cat_armor_special_protection.armor_eff_elemental_cold", object, True);
SetOptionalAttribute(attributes, "cat_armor_special_protection.@obj_attr_n:armor_eff_elemental_acid", "cat_armor_special_protection.armor_eff_elemental_acid", object, True);
SetOptionalAttribute(attributes, "cat_armor_special_protection.@obj_attr_n:armor_eff_elemental_electrical", "cat_armor_special_protection.armor_eff_elemental_electrical", object, True);
SetOptionalAttribute(attributes, "cat_armor_special_protection.@obj_attr_n:armor_eff_restraint", "cat_armor_special_protection.armor_eff_restraint", object, True);
SetOptionalAttribute(attributes, "cat_armor_effectiveness.@obj_attr_n:armor_eff_kinetic", "cat_armor_effectiveness.armor_eff_restraint", object, True);
SetOptionalAttribute(attributes, "cat_armor_effectiveness.@obj_attr_n:armor_eff_energy", "cat_armor_effectiveness.armor_eff_energy", object, True);
SetOptionalAttribute(attributes, "cat_armor_effectiveness.@obj_attr_n:armor_eff_blast", "cat_armor_effectiveness.armor_eff_blast", object, True);
SetOptionalAttribute(attributes, "cat_armor_effectiveness.@obj_attr_n:armor_eff_stun", "cat_armor_effectiveness.armor_eff_stun", object, True);
SetOptionalAttribute(attributes, "cat_armor_effectiveness.@obj_attr_n:armor_eff_elemental_heat", "cat_armor_effectiveness.armor_eff_elemental_heat", object, True);
SetOptionalAttribute(attributes, "cat_armor_effectiveness.@obj_attr_n:armor_eff_elemental_cold", "cat_armor_effectiveness.armor_eff_elemental_cold", object, True);
SetOptionalAttribute(attributes, "cat_armor_effectiveness.@obj_attr_n:armor_eff_elemental_acid", "cat_armor_effectiveness.armor_eff_elemental_acid", object, True);
SetOptionalAttribute(attributes, "cat_armor_effectiveness.@obj_attr_n:armor_eff_elemental_electrical", "cat_armor_effectiveness.armor_eff_elemental_electrical", object, True);
SetOptionalAttribute(attributes, "cat_armor_effectiveness.@obj_attr_n:armor_eff_restraint", "cat_armor_effectiveness.armor_eff_restraint", object, True);
SetOptionalAttribute(attributes, "cat_armor_vulnerability.@obj_attr_n:armor_eff_kinetic", "cat_armor_vulnerability.armor_eff_kinetic", object, True);
SetOptionalAttribute(attributes, "cat_armor_vulnerability.@obj_attr_n:armor_eff_energy", "cat_armor_vulnerability.armor_eff_energy", object, True);
SetOptionalAttribute(attributes, "cat_armor_vulnerability.@obj_attr_n:armor_eff_blast", "cat_armor_vulnerability.armor_eff_blast", object, True);
SetOptionalAttribute(attributes, "cat_armor_vulnerability.@obj_attr_n:armor_eff_stun", "cat_armor_vulnerability.armor_eff_stun", object, True);
SetOptionalAttribute(attributes, "cat_armor_vulnerability.@obj_attr_n:armor_eff_elemental_heat", "cat_armor_vulnerability.armor_eff_elemental_heat", object, True);
SetOptionalAttribute(attributes, "cat_armor_vulnerability.@obj_attr_n:armor_eff_elemental_cold", "cat_armor_vulnerability.armor_eff_elemental_cold", object, True);
SetOptionalAttribute(attributes, "cat_armor_vulnerability.@obj_attr_n:armor_eff_elemental_acid", "cat_armor_vulnerability.armor_eff_elemental_acid", object, True);
SetOptionalAttribute(attributes, "cat_armor_vulnerability.@obj_attr_n:armor_eff_elemental_electrical", "cat_armor_vulnerability.armor_eff_elemental_electrical", object, True);
SetOptionalAttribute(attributes, "cat_armor_vulnerability.@obj_attr_n:armor_eff_restraint", "cat_armor_vulnerability.armor_eff_restraint", object, True);
SetOptionalAttribute(attributes, "cat_armor_encumbrance.@obj_attr_n:armor_health_encumbrance", "cat_armor_encumbrance.armor_health_encumbrance", object, True);
SetOptionalAttribute(attributes, "cat_armor_encumbrance.@obj_attr_n:armor_action_encumbrance", "cat_armor_encumbrance.armor_action_encumbrance", object, True);
SetOptionalAttribute(attributes, "cat_armor_encumbrance.@obj_attr_n:armor_mind_encumbrance", "cat_armor_encumbrance.armor_mind_encumbrance", object, True);
attribute_list_message.attributes = attributes
return attribute_list_message
| 120.375
| 189
| 0.84441
| 711
| 5,778
| 6.344585
| 0.087201
| 0.106407
| 0.060297
| 0.089337
| 0.84305
| 0.796719
| 0.754822
| 0.739747
| 0.696076
| 0.623808
| 0
| 0.000184
| 0.061094
| 5,778
| 48
| 190
| 120.375
| 0.831336
| 0
| 0
| 0
| 0
| 0
| 0.557363
| 0.551653
| 0
| 0
| 0
| 0
| 0
| 1
| 0.020833
| false
| 0
| 0.083333
| 0
| 0.145833
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
3be7630c47b46a8431b379b65b99ea61bfb090a0
| 266
|
py
|
Python
|
spkcspider/apps/spider/views/__init__.py
|
devkral/spkbspider
|
97e448b4da412acebd66c4469c7fcdd07bf90ed2
|
[
"MIT"
] | 5
|
2019-06-24T14:15:54.000Z
|
2021-05-14T23:16:31.000Z
|
spkcspider/apps/spider/views/__init__.py
|
devkral/spkbspider
|
97e448b4da412acebd66c4469c7fcdd07bf90ed2
|
[
"MIT"
] | 2
|
2018-06-19T09:56:18.000Z
|
2018-11-20T12:02:44.000Z
|
spkcspider/apps/spider/views/__init__.py
|
devkral/spkbspider
|
97e448b4da412acebd66c4469c7fcdd07bf90ed2
|
[
"MIT"
] | null | null | null |
from ._components import * # noqa: F403, F401
from ._contents import * # noqa: F403, F401
from ._core import * # noqa: F403, F401
from ._deletion import * # noqa: F403, F401
from ._referrer import * # noqa: F403, F401
from ._tokens import * # noqa: F403, F401
| 38
| 46
| 0.684211
| 36
| 266
| 4.888889
| 0.305556
| 0.340909
| 0.477273
| 0.613636
| 0.625
| 0
| 0
| 0
| 0
| 0
| 0
| 0.169811
| 0.203008
| 266
| 6
| 47
| 44.333333
| 0.660377
| 0.379699
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 7
|
ce1a75b1b4e54e25d789423da3fddcbe6fc52b83
| 44,486
|
py
|
Python
|
test/hummingbot/strategy/test_hanging_orders_tracker.py
|
phbrgnomo/hummingbot
|
72382954a06a277248f44b321344186aef1c367c
|
[
"Apache-2.0"
] | 1
|
2021-08-23T03:18:26.000Z
|
2021-08-23T03:18:26.000Z
|
test/hummingbot/strategy/test_hanging_orders_tracker.py
|
phbrgnomo/hummingbot
|
72382954a06a277248f44b321344186aef1c367c
|
[
"Apache-2.0"
] | null | null | null |
test/hummingbot/strategy/test_hanging_orders_tracker.py
|
phbrgnomo/hummingbot
|
72382954a06a277248f44b321344186aef1c367c
|
[
"Apache-2.0"
] | 1
|
2021-12-09T20:58:26.000Z
|
2021-12-09T20:58:26.000Z
|
from datetime import datetime
import logging
import unittest
from decimal import Decimal
from mock import MagicMock, patch, PropertyMock
from hummingbot.core.event.events import MarketEvent, OrderCancelledEvent, BuyOrderCompletedEvent
from hummingbot.strategy.hanging_orders_tracker import HangingOrdersTracker, HangingOrdersAggregationType
from hummingbot.strategy.data_types import HangingOrder, OrderType
from hummingbot.core.data_type.limit_order import LimitOrder
class TestHangingOrdersTracker(unittest.TestCase):
def setUp(self) -> None:
super().setUp()
self.current_market_price = Decimal("100.0")
self.strategy = self.create_mock_strategy()
self.tracker = HangingOrdersTracker(self.strategy, hanging_orders_cancel_pct=Decimal("0.1"))
@staticmethod
def quantize_order_amount(trading_pair: str, amount: Decimal):
return amount.quantize(Decimal("0.00001"))
@staticmethod
def quantize_order_price(trading_pair: str, price: Decimal):
return price.quantize(Decimal("0.00001"))
def create_mock_strategy(self):
market = MagicMock()
market.quantize_order_amount.side_effect = self.quantize_order_amount
market.quantize_order_price.side_effect = self.quantize_order_price
market.get_maker_order_type.return_value = OrderType.LIMIT
market_info = MagicMock()
market_info.market = market
strategy = MagicMock()
type(strategy).max_order_age = PropertyMock(return_value=1800.0)
type(strategy).order_refresh_time = PropertyMock(return_value=45.0)
strategy.get_price.return_value = self.current_market_price
type(strategy).market_info = PropertyMock(return_value=market_info)
type(strategy).trading_pair = PropertyMock(return_value="BTC-USDT")
return strategy
def test_tracker_initialized(self):
self.assertEqual(self.tracker.trading_pair, "BTC-USDT")
self.assertEqual(self.tracker.original_orders, set())
self.assertEqual(self.tracker.strategy_current_hanging_orders, set())
self.assertEqual(self.tracker.current_created_pairs_of_orders, list())
def test_add_remove_limit_order(self):
order_to_add = LimitOrder("Order-number-1", "BTC-USDT", True, "BTC", "USDT", Decimal(100), Decimal(1))
self.tracker.add_order(order_to_add)
self.assertEqual(len(self.tracker.original_orders), 1)
order_that_doesnt_belong = LimitOrder("Order-number-2", "BTC-USDT", True, "BTC", "USDT", Decimal(100),
Decimal(1))
self.tracker.remove_order(order_that_doesnt_belong)
self.assertEqual(len(self.tracker.original_orders), 1)
self.tracker.remove_order(order_to_add)
self.assertEqual(len(self.tracker.original_orders), 0)
self.tracker.add_order(LimitOrder("Order-number-3", "BTC-USDT", True, "BTC", "USDT", Decimal(100), Decimal(1)))
self.tracker.add_order(LimitOrder("Order-number-4", "BTC-USDT", True, "BTC", "USDT", Decimal(100), Decimal(1)))
self.tracker.remove_all_orders()
self.assertEqual(len(self.tracker.original_orders), 0)
def test_renew_hanging_orders_past_max_order_age(self):
cancelled_orders_ids = []
strategy_active_orders = []
type(self.strategy).current_timestamp = PropertyMock(return_value=1234967891)
type(self.strategy).active_orders = PropertyMock(return_value=strategy_active_orders)
self.strategy.cancel_order.side_effect = lambda order_id: cancelled_orders_ids.append(order_id)
self.strategy.buy_with_specific_market.return_value = "Order-1234569990000000"
# Order just executed
new_order = LimitOrder("Order-1234567890000000",
"BTC-USDT",
True,
"BTC",
"USDT",
Decimal(101),
Decimal(1))
# Order executed 1900 seconds ago
old_order = LimitOrder("Order-1234565991000000",
"BTC-USDT",
True,
"BTC",
"USDT",
Decimal(105),
Decimal(1))
self.tracker.add_order(new_order)
strategy_active_orders.append(new_order)
self.tracker.add_order(old_order)
strategy_active_orders.append(old_order)
self.tracker.update_strategy_orders_with_equivalent_orders()
self.assertTrue(any(order.trading_pair == "BTC-USDT" and order.price == Decimal(105)
for order
in self.tracker.strategy_current_hanging_orders))
# When calling the renew logic, the old order should start the renew process (it should be canceled)
# but it will only stop being a current hanging order once the cancel confirmation arrives
self.tracker.process_tick()
self.assertTrue(old_order.client_order_id in cancelled_orders_ids)
self.assertTrue(any(order.trading_pair == "BTC-USDT" and order.price == Decimal(105)
for order
in self.tracker.strategy_current_hanging_orders))
# When the cancel is confirmed the order should no longer be considered a hanging order
strategy_active_orders.remove(old_order)
self.tracker._did_cancel_order(MarketEvent.OrderCancelled,
self,
OrderCancelledEvent(old_order.client_order_id, old_order.client_order_id))
self.assertFalse(any(order.order_id == old_order.client_order_id for order
in self.tracker.strategy_current_hanging_orders))
self.assertTrue(any(order.order_id == "Order-1234569990000000" for order
in self.tracker.strategy_current_hanging_orders))
def test_hanging_order_being_renewed_discarded_if_not_current_hanging_order_after_cancel(self):
cancelled_orders_ids = []
strategy_active_orders = []
newly_created_orders_ids = ["Order-1234569990000000", "Order-1234570000000000"]
type(self.strategy).current_timestamp = PropertyMock(return_value=1234900000)
type(self.strategy).active_orders = PropertyMock(return_value=strategy_active_orders)
self.strategy.cancel_order.side_effect = lambda order_id: cancelled_orders_ids.append(order_id)
self.strategy.buy_with_specific_market.side_effect = newly_created_orders_ids
self.tracker.set_aggregation_method(HangingOrdersAggregationType.VOLUME_TIME_WEIGHTED)
# Order just executed
new_order = LimitOrder("Order-1234567890000000",
"BTC-USDT",
True,
"BTC",
"USDT",
Decimal(101),
Decimal(1))
# Order executed 1900 seconds ago
old_order = LimitOrder("Order-1234565991000000",
"BTC-USDT",
True,
"BTC",
"USDT",
Decimal(105),
Decimal(1))
self.tracker.add_order(old_order)
strategy_active_orders.append(old_order)
self.tracker.update_strategy_orders_with_equivalent_orders()
# A new order should have been created.
self.assertTrue(any(order.order_id == newly_created_orders_ids[0] for order
in self.tracker.strategy_current_hanging_orders))
hanging_order = next(iter(self.tracker.strategy_current_hanging_orders))
strategy_active_orders.append(LimitOrder(hanging_order.order_id,
hanging_order.trading_pair,
hanging_order.is_buy,
hanging_order.base_asset,
hanging_order.quote_asset,
hanging_order.price,
hanging_order.amount))
# When calling the renew logic, the old order should start the renew process (it should be canceled)
# but it will only stop being a current hanging order once the cancel confirmation arrives
self.tracker.process_tick()
self.assertTrue(newly_created_orders_ids[0] in cancelled_orders_ids)
self.assertTrue(any(order.order_id == newly_created_orders_ids[0] for order
in self.tracker.strategy_current_hanging_orders))
# Before cancellation is confirmed a new order is added to the tracker, generating a new grouped hanging order
self.tracker.add_order(new_order)
strategy_active_orders.append(new_order)
self.tracker.update_strategy_orders_with_equivalent_orders()
# When the cancel is confirmed the order should no longer be considered a hanging order
strategy_active_orders.remove(old_order)
self.tracker._did_cancel_order(MarketEvent.OrderCancelled,
self,
OrderCancelledEvent(old_order.client_order_id, old_order.client_order_id))
self.assertFalse(any(order.order_id == old_order.client_order_id for order
in self.tracker.strategy_current_hanging_orders))
self.assertTrue(any(order.order_id == "Order-1234569990000000" for order
in self.tracker.strategy_current_hanging_orders))
def test_asymmetrical_volume_weighted(self):
# Asymmetrical in distance to mid-price and amounts
self.tracker.add_order(LimitOrder("Order-number-1", "BTC-USDT", True, "BTC", "USDT", Decimal(99), Decimal(2)))
self.tracker.add_order(LimitOrder("Order-number-2", "BTC-USDT", True, "BTC", "USDT", Decimal(95), Decimal(1)))
self.tracker.add_order(LimitOrder("Order-number-3", "BTC-USDT", False, "BTC", "USDT", Decimal(94), Decimal(6)))
self.tracker.add_order(LimitOrder("Order-number-4", "BTC-USDT", False, "BTC", "USDT", Decimal(109), Decimal(5)))
self.tracker.set_aggregation_method(HangingOrdersAggregationType.VOLUME_WEIGHTED)
self.tracker.update_strategy_orders_with_equivalent_orders()
self.assertEqual(self.tracker.strategy_current_hanging_orders,
{HangingOrder(order_id=None,
trading_pair='BTC-USDT',
is_buy=True,
price=Decimal('97.66667'),
amount=Decimal('3.00000')),
HangingOrder(order_id=None,
trading_pair='BTC-USDT',
is_buy=False,
price=Decimal('107.36364'),
amount=Decimal('11.00000'))})
def test_symmetrical_volume_weighted(self):
# Symmetrical in distance to mid-price and amounts
self.tracker.add_order(LimitOrder("Order-number-1", "BTC-USDT", True, "BTC", "USDT", Decimal(99), Decimal(6)))
self.tracker.add_order(LimitOrder("Order-number-2", "BTC-USDT", True, "BTC", "USDT", Decimal(91), Decimal(5)))
self.tracker.add_order(LimitOrder("Order-number-3", "BTC-USDT", False, "BTC", "USDT", Decimal(101), Decimal(6)))
self.tracker.add_order(LimitOrder("Order-number-4", "BTC-USDT", False, "BTC", "USDT", Decimal(109), Decimal(5)))
self.tracker.set_aggregation_method(HangingOrdersAggregationType.VOLUME_WEIGHTED)
self.tracker.update_strategy_orders_with_equivalent_orders()
self.assertEqual(self.tracker.strategy_current_hanging_orders,
{HangingOrder(order_id=None,
trading_pair='BTC-USDT',
is_buy=True,
price=Decimal('95.36364'),
amount=Decimal('11.00000')),
HangingOrder(order_id=None,
trading_pair='BTC-USDT',
is_buy=False,
price=Decimal('104.63636'),
amount=Decimal('11.00000'))})
def test_asymmetrical_volume_age_weighted(self):
current_time_mock = 1234567891
self.tracker.add_order(LimitOrder(f"Order-{current_time_mock - 500}000000",
"BTC-USDT", True, "BTC", "USDT", Decimal(99), Decimal(2)))
self.tracker.add_order(LimitOrder(f"Order-{current_time_mock - 600}000000",
"BTC-USDT", True, "BTC", "USDT", Decimal(95), Decimal(1)))
self.tracker.add_order(LimitOrder(f"Order-{current_time_mock - 700}000000",
"BTC-USDT", True, "BTC", "USDT", Decimal(94), Decimal(6)))
self.tracker.add_order(LimitOrder(f"Order-{current_time_mock - 800}000000",
"BTC-USDT", False, "BTC", "USDT", Decimal(109), Decimal(5)))
with patch('time.time', return_value=current_time_mock):
self.tracker.set_aggregation_method(HangingOrdersAggregationType.VOLUME_TIME_WEIGHTED)
self.tracker.update_strategy_orders_with_equivalent_orders()
self.assertEqual(self.tracker.strategy_current_hanging_orders,
{HangingOrder(order_id=None,
trading_pair='BTC-USDT',
is_buy=True,
price=Decimal('95.31641'),
amount=Decimal('9.00000')),
HangingOrder(order_id=None,
trading_pair='BTC-USDT',
is_buy=False,
price=Decimal('109.00000'),
amount=Decimal('5.00000'))})
def test_symmetrical_volume_age_weighted(self):
# Symmetrical in distance to mid-price and amounts, BUT different ages
current_time_mock = 1234567891
self.tracker.add_order(LimitOrder(f"Order-{current_time_mock - 300}000000",
"BTC-USDT", True, "BTC", "USDT", Decimal(99), Decimal(6)))
self.tracker.add_order(LimitOrder(f"Order-{current_time_mock - 600}000000",
"BTC-USDT", True, "BTC", "USDT", Decimal(91), Decimal(5)))
self.tracker.add_order(LimitOrder(f"Order-{current_time_mock - 800}000000",
"BTC-USDT", False, "BTC", "USDT", Decimal(101), Decimal(6)))
self.tracker.add_order(LimitOrder(f"Order-{current_time_mock - 1200}000000",
"BTC-USDT", False, "BTC", "USDT", Decimal(109), Decimal(5)))
with patch('time.time', return_value=current_time_mock):
self.tracker.set_aggregation_method(HangingOrdersAggregationType.VOLUME_TIME_WEIGHTED)
self.tracker.update_strategy_orders_with_equivalent_orders()
self.assertEqual(self.tracker.strategy_current_hanging_orders,
{HangingOrder(order_id=None,
trading_pair='BTC-USDT',
is_buy=True,
price=Decimal('95.69098'),
amount=Decimal('11.00000')),
HangingOrder(order_id=None,
trading_pair='BTC-USDT',
is_buy=False,
price=Decimal('104.20177'),
amount=Decimal('11.00000'))})
def test_asymmetrical_volume_distance_weighted(self):
# Asymmetrical in distance to mid-price and amounts, BUT with distance affecting the weight exponentially
self.tracker.add_order(LimitOrder("Order-number-1", "BTC-USDT", True, "BTC", "USDT", Decimal(99), Decimal(2)))
self.tracker.add_order(LimitOrder("Order-number-2", "BTC-USDT", True, "BTC", "USDT", Decimal(95), Decimal(1)))
self.tracker.add_order(LimitOrder("Order-number-3", "BTC-USDT", False, "BTC", "USDT", Decimal(94), Decimal(6)))
self.tracker.add_order(LimitOrder("Order-number-4", "BTC-USDT", False, "BTC", "USDT", Decimal(109), Decimal(5)))
self.tracker.set_aggregation_method(HangingOrdersAggregationType.VOLUME_DISTANCE_WEIGHTED)
self.tracker.update_strategy_orders_with_equivalent_orders()
self.assertEqual(self.tracker.strategy_current_hanging_orders,
{HangingOrder(order_id=None,
trading_pair='BTC-USDT',
is_buy=False,
price=Decimal('107.14511'),
amount=Decimal('11.00000')),
HangingOrder(order_id=None,
trading_pair='BTC-USDT',
is_buy=True,
price=Decimal('97.99590'),
amount=Decimal('3.00000'))})
def test_symmetrical_volume_distance_weighted(self):
# Symmetrical in distance to mid-price and amounts, BUT with distance affecting the weight exponentially
self.tracker.add_order(LimitOrder("Order-number-1", "BTC-USDT", True, "BTC", "USDT", Decimal(99), Decimal(6)))
self.tracker.add_order(LimitOrder("Order-number-2", "BTC-USDT", True, "BTC", "USDT", Decimal(91), Decimal(5)))
self.tracker.add_order(LimitOrder("Order-number-3", "BTC-USDT", False, "BTC", "USDT", Decimal(101), Decimal(6)))
self.tracker.add_order(LimitOrder("Order-number-4", "BTC-USDT", False, "BTC", "USDT", Decimal(109), Decimal(5)))
self.tracker.set_aggregation_method(HangingOrdersAggregationType.VOLUME_DISTANCE_WEIGHTED)
self.tracker.update_strategy_orders_with_equivalent_orders()
self.assertEqual(self.tracker.strategy_current_hanging_orders,
{HangingOrder(order_id=None,
trading_pair='BTC-USDT',
is_buy=True,
price=Decimal('96.82055'),
amount=Decimal('11.00000')),
HangingOrder(order_id=None,
trading_pair='BTC-USDT',
is_buy=False,
price=Decimal('103.17945'),
amount=Decimal('11.00000'))})
def test_hanging_order_removed_when_cancelled(self):
strategy_active_orders = []
strategy_logs = []
app_notifications = []
type(self.strategy).active_orders = PropertyMock(return_value=strategy_active_orders)
self.strategy.log_with_clock.side_effect = lambda log_type, message: strategy_logs.append((log_type, message))
self.strategy.notify_hb_app.side_effect = lambda message: app_notifications.append(message)
new_order = LimitOrder("Order-1234567890000000",
"BTC-USDT",
True,
"BTC",
"USDT",
Decimal(101),
Decimal(1))
self.tracker.add_order(new_order)
strategy_active_orders.append(new_order)
self.tracker.update_strategy_orders_with_equivalent_orders()
# Now we simulate the order is cancelled
self.tracker._did_cancel_order(MarketEvent.OrderCancelled,
self,
OrderCancelledEvent(new_order.client_order_id, new_order.client_order_id))
self.assertIn((logging.INFO, "(BTC-USDT) Hanging order Order-1234567890000000 cancelled."), strategy_logs)
self.assertIn("(BTC-USDT) Hanging order Order-1234567890000000 cancelled.", app_notifications)
self.assertTrue(len(self.tracker.strategy_current_hanging_orders) == 0)
self.assertNotIn(new_order, self.tracker.original_orders)
def test_grouped_hanging_order_and_original_orders_removed_when_hanging_order_completed(self):
strategy_active_orders = []
newly_created_buy_orders_ids = ["Order-1234570000000000",
"Order-1234570020000000",
"Order-1234570040000000",
"Order-1234570060000000"]
newly_created_sell_orders_ids = ["Order-1234570010000000",
"Order-1234570030000000",
"Order-1234570050000000",
"Order-1234570070000000"]
type(self.strategy).active_orders = PropertyMock(return_value=strategy_active_orders)
self.strategy.buy_with_specific_market.side_effect = newly_created_buy_orders_ids
self.strategy.sell_with_specific_market.side_effect = newly_created_sell_orders_ids
buy_order_1 = LimitOrder("Order-1234569960000000",
"BTC-USDT",
True,
"BTC",
"USDT",
Decimal(101),
Decimal(1))
buy_order_2 = LimitOrder("Order-1234569980000000",
"BTC-USDT",
True,
"BTC",
"USDT",
Decimal(105),
Decimal(1))
sell_order_1 = LimitOrder("Order-1234569970000000",
"BTC-USDT",
False,
"BTC",
"USDT",
Decimal(110),
Decimal(1))
sell_order_2 = LimitOrder("Order-1234569990000000",
"BTC-USDT",
False,
"BTC",
"USDT",
Decimal(115),
Decimal(1))
self.tracker.set_aggregation_method(HangingOrdersAggregationType.VOLUME_WEIGHTED)
self.tracker.add_order(buy_order_1)
strategy_active_orders.append(buy_order_1)
self.tracker.add_order(buy_order_2)
strategy_active_orders.append(buy_order_2)
self.tracker.add_order(sell_order_1)
strategy_active_orders.append(sell_order_1)
self.tracker.add_order(sell_order_2)
strategy_active_orders.append(sell_order_2)
self.tracker.update_strategy_orders_with_equivalent_orders()
buy_hanging_order = next(order for order in self.tracker.strategy_current_hanging_orders if order.is_buy)
sell_hanging_order = next(order for order in self.tracker.strategy_current_hanging_orders if not order.is_buy)
strategy_active_orders.remove(buy_order_1)
strategy_active_orders.remove(buy_order_2)
strategy_active_orders.append(buy_hanging_order)
strategy_active_orders.append(sell_hanging_order)
self.assertEqual(4, len(self.tracker.original_orders))
self.assertEqual(2, len(self.tracker.strategy_current_hanging_orders))
# Now we simulate the buy hanging order being fully filled
strategy_active_orders.remove(buy_hanging_order)
self.tracker._did_complete_buy_order(MarketEvent.BuyOrderCompleted,
self,
BuyOrderCompletedEvent(
timestamp=datetime.now().timestamp(),
order_id=buy_hanging_order.order_id,
base_asset="BTC",
quote_asset="USDT",
fee_asset="USDT",
base_asset_amount=buy_hanging_order.amount,
quote_asset_amount=buy_hanging_order.amount * buy_hanging_order.price,
fee_amount=Decimal(0),
order_type=OrderType.LIMIT))
self.assertEqual(1, len(self.tracker.strategy_current_hanging_orders))
self.assertNotIn(buy_hanging_order, self.tracker.strategy_current_hanging_orders)
self.assertEqual(2, len(self.tracker.original_orders))
self.assertTrue(all(not order.is_buy for order in self.tracker.original_orders))
# In this moment the only hanging order in the tracker is the generated by the two sells.
# We add a new buy hanging order to test that fully filling the sell hanging order only removes the sells
self.tracker.add_order(buy_order_1)
strategy_active_orders.append(buy_order_1)
self.tracker.update_strategy_orders_with_equivalent_orders()
buy_hanging_order = next(order for order in self.tracker.strategy_current_hanging_orders if order.is_buy)
strategy_active_orders.remove(buy_order_1)
strategy_active_orders.append(buy_hanging_order)
self.assertEqual(3, len(self.tracker.original_orders))
self.assertEqual(2, len(self.tracker.strategy_current_hanging_orders))
# Now we simulate the sell hanging order being fully filled
strategy_active_orders.remove(sell_hanging_order)
self.tracker._did_complete_sell_order(MarketEvent.BuyOrderCompleted,
self,
BuyOrderCompletedEvent(
timestamp=datetime.now().timestamp(),
order_id=sell_hanging_order.order_id,
base_asset="BTC",
quote_asset="USDT",
fee_asset="USDT",
base_asset_amount=sell_hanging_order.amount,
quote_asset_amount=sell_hanging_order.amount * sell_hanging_order.price,
fee_amount=Decimal(0),
order_type=OrderType.LIMIT))
self.assertEqual(1, len(self.tracker.strategy_current_hanging_orders))
self.assertNotIn(sell_hanging_order, self.tracker.strategy_current_hanging_orders)
self.assertEqual(1, len(self.tracker.original_orders))
self.assertTrue(all(order.is_buy for order in self.tracker.original_orders))
def test_non_grouped_hanging_order_and_original_order_removed_when_hanging_order_completed(self):
strategy_active_orders = []
newly_created_buy_orders_ids = ["Order-1234570000000000",
"Order-1234570020000000",
"Order-1234570040000000",
"Order-1234570060000000"]
newly_created_sell_orders_ids = ["Order-1234570010000000",
"Order-1234570030000000",
"Order-1234570050000000",
"Order-1234570070000000"]
type(self.strategy).active_orders = PropertyMock(return_value=strategy_active_orders)
self.strategy.buy_with_specific_market.side_effect = newly_created_buy_orders_ids
self.strategy.sell_with_specific_market.side_effect = newly_created_sell_orders_ids
buy_order_1 = LimitOrder("Order-1234569960000000",
"BTC-USDT",
True,
"BTC",
"USDT",
Decimal(101),
Decimal(1))
sell_order_1 = LimitOrder("Order-1234569970000000",
"BTC-USDT",
False,
"BTC",
"USDT",
Decimal(110),
Decimal(1))
self.tracker.set_aggregation_method(HangingOrdersAggregationType.NO_AGGREGATION)
self.tracker.add_order(buy_order_1)
strategy_active_orders.append(buy_order_1)
self.tracker.add_order(sell_order_1)
strategy_active_orders.append(sell_order_1)
self.tracker.update_strategy_orders_with_equivalent_orders()
buy_hanging_order = next(order for order in self.tracker.strategy_current_hanging_orders if order.is_buy)
sell_hanging_order = next(order for order in self.tracker.strategy_current_hanging_orders if not order.is_buy)
self.assertEqual(buy_order_1.client_order_id, buy_hanging_order.order_id)
self.assertEqual(sell_order_1.client_order_id, sell_hanging_order.order_id)
self.assertEqual(2, len(self.tracker.original_orders))
self.assertEqual(2, len(self.tracker.strategy_current_hanging_orders))
# Now we simulate the buy hanging order being fully filled
strategy_active_orders.remove(buy_order_1)
self.tracker._did_complete_buy_order(MarketEvent.BuyOrderCompleted,
self,
BuyOrderCompletedEvent(
timestamp=datetime.now().timestamp(),
order_id=buy_order_1.client_order_id,
base_asset="BTC",
quote_asset="USDT",
fee_asset="USDT",
base_asset_amount=buy_order_1.quantity,
quote_asset_amount=buy_order_1.quantity * buy_order_1.price,
fee_amount=Decimal(0),
order_type=OrderType.LIMIT))
self.assertEqual(1, len(self.tracker.strategy_current_hanging_orders))
self.assertNotIn(buy_hanging_order, self.tracker.strategy_current_hanging_orders)
self.assertEqual(1, len(self.tracker.original_orders))
self.assertNotIn(buy_order_1, self.tracker.original_orders)
def test_limit_order_added_to_grouping_tracker_is_potential_hanging_order(self):
strategy_active_orders = []
newly_created_buy_orders_ids = ["Order-1234570000000000",
"Order-1234570020000000",
"Order-1234570040000000",
"Order-1234570060000000"]
newly_created_sell_orders_ids = ["Order-1234570010000000",
"Order-1234570030000000",
"Order-1234570050000000",
"Order-1234570070000000"]
type(self.strategy).active_orders = PropertyMock(return_value=strategy_active_orders)
self.strategy.buy_with_specific_market.side_effect = newly_created_buy_orders_ids
self.strategy.sell_with_specific_market.side_effect = newly_created_sell_orders_ids
buy_order_1 = LimitOrder("Order-1234569960000000",
"BTC-USDT",
True,
"BTC",
"USDT",
Decimal(101),
Decimal(1))
buy_order_2 = LimitOrder("Order-1234569980000000",
"BTC-USDT",
True,
"BTC",
"USDT",
Decimal(105),
Decimal(1))
sell_order_1 = LimitOrder("Order-1234569970000000",
"BTC-USDT",
False,
"BTC",
"USDT",
Decimal(110),
Decimal(1))
self.tracker.set_aggregation_method(HangingOrdersAggregationType.VOLUME_WEIGHTED)
self.tracker.add_order(buy_order_1)
strategy_active_orders.append(buy_order_1)
self.tracker.add_order(buy_order_2)
strategy_active_orders.append(buy_order_2)
self.tracker.add_order(sell_order_1)
strategy_active_orders.append(sell_order_1)
self.tracker.update_strategy_orders_with_equivalent_orders()
self.assertTrue(self.tracker.is_potential_hanging_order(buy_order_1))
self.assertTrue(self.tracker.is_potential_hanging_order(buy_order_2))
self.assertTrue(self.tracker.is_potential_hanging_order(sell_order_1))
def test_limit_order_added_to_non_grouping_tracker_is_potential_hanging_order(self):
strategy_active_orders = []
newly_created_buy_orders_ids = ["Order-1234570000000000",
"Order-1234570020000000",
"Order-1234570040000000",
"Order-1234570060000000"]
newly_created_sell_orders_ids = ["Order-1234570010000000",
"Order-1234570030000000",
"Order-1234570050000000",
"Order-1234570070000000"]
type(self.strategy).active_orders = PropertyMock(return_value=strategy_active_orders)
self.strategy.buy_with_specific_market.side_effect = newly_created_buy_orders_ids
self.strategy.sell_with_specific_market.side_effect = newly_created_sell_orders_ids
buy_order_1 = LimitOrder("Order-1234569960000000",
"BTC-USDT",
True,
"BTC",
"USDT",
Decimal(101),
Decimal(1))
buy_order_2 = LimitOrder("Order-1234569980000000",
"BTC-USDT",
True,
"BTC",
"USDT",
Decimal(105),
Decimal(1))
sell_order_1 = LimitOrder("Order-1234569970000000",
"BTC-USDT",
False,
"BTC",
"USDT",
Decimal(110),
Decimal(1))
self.tracker.set_aggregation_method(HangingOrdersAggregationType.NO_AGGREGATION)
self.tracker.add_order(buy_order_1)
strategy_active_orders.append(buy_order_1)
self.tracker.add_order(buy_order_2)
strategy_active_orders.append(buy_order_2)
self.tracker.add_order(sell_order_1)
strategy_active_orders.append(sell_order_1)
self.tracker.update_strategy_orders_with_equivalent_orders()
self.assertTrue(self.tracker.is_potential_hanging_order(buy_order_1))
self.assertTrue(self.tracker.is_potential_hanging_order(buy_order_2))
self.assertTrue(self.tracker.is_potential_hanging_order(sell_order_1))
def test_non_grouping_tracker_cancels_order_when_removing_far_from_price(self):
cancelled_orders_ids = []
strategy_active_orders = []
newly_created_buy_orders_ids = ["Order-1234570000000000",
"Order-1234570020000000",
"Order-1234570040000000",
"Order-1234570060000000"]
newly_created_sell_orders_ids = ["Order-1234570010000000",
"Order-1234570030000000",
"Order-1234570050000000",
"Order-1234570070000000"]
type(self.strategy).active_orders = PropertyMock(return_value=strategy_active_orders)
self.strategy.cancel_order.side_effect = lambda order_id: cancelled_orders_ids.append(order_id)
self.strategy.buy_with_specific_market.side_effect = newly_created_buy_orders_ids
self.strategy.sell_with_specific_market.side_effect = newly_created_sell_orders_ids
self.tracker.set_aggregation_method(HangingOrdersAggregationType.NO_AGGREGATION)
buy_order_1 = LimitOrder("Order-1234569960000000",
"BTC-USDT",
True,
"BTC",
"USDT",
Decimal(101),
Decimal(1))
buy_order_2 = LimitOrder("Order-1234569980000000",
"BTC-USDT",
True,
"BTC",
"USDT",
Decimal(120),
Decimal(1))
self.tracker.add_order(buy_order_1)
strategy_active_orders.append(buy_order_1)
self.tracker.add_order(buy_order_2)
strategy_active_orders.append(buy_order_2)
self.tracker.update_strategy_orders_with_equivalent_orders()
# The hanging orders are created
hanging_order_1 = next(hanging_order for hanging_order in self.tracker.strategy_current_hanging_orders
if hanging_order.order_id == buy_order_1.client_order_id)
hanging_order_2 = next(hanging_order for hanging_order in self.tracker.strategy_current_hanging_orders
if hanging_order.order_id == buy_order_2.client_order_id)
# After removing orders far from price, the order 2 should be canceled
self.tracker.remove_orders_far_from_price()
self.assertEqual(1, len(cancelled_orders_ids))
self.assertIn(hanging_order_2.order_id, cancelled_orders_ids)
# We emulate the reception of the cancellation confirmation. After that the hanging order should not be present
# in the tracker, and the original order should not be considered a potential hanging order.
strategy_active_orders.remove(buy_order_2)
self.tracker._did_cancel_order(MarketEvent.OrderCancelled,
self,
OrderCancelledEvent(buy_order_2.client_order_id, buy_order_2.client_order_id))
self.assertNotIn(hanging_order_2, self.tracker.strategy_current_hanging_orders)
self.assertFalse(self.tracker.is_potential_hanging_order(buy_order_2))
self.assertIn(hanging_order_1, self.tracker.strategy_current_hanging_orders)
self.assertTrue(self.tracker.is_potential_hanging_order(buy_order_1))
def test_grouping_tracker_removes_original_order_when_removing_far_from_price(self):
cancelled_orders_ids = []
strategy_active_orders = []
newly_created_buy_orders_ids = ["Order-1234570000000000",
"Order-1234570020000000",
"Order-1234570040000000",
"Order-1234570060000000"]
newly_created_sell_orders_ids = ["Order-1234570010000000",
"Order-1234570030000000",
"Order-1234570050000000",
"Order-1234570070000000"]
type(self.strategy).active_orders = PropertyMock(return_value=strategy_active_orders)
self.strategy.cancel_order.side_effect = lambda order_id: cancelled_orders_ids.append(order_id)
self.strategy.buy_with_specific_market.side_effect = newly_created_buy_orders_ids
self.strategy.sell_with_specific_market.side_effect = newly_created_sell_orders_ids
self.tracker.set_aggregation_method(HangingOrdersAggregationType.VOLUME_WEIGHTED)
buy_order_1 = LimitOrder("Order-1234569960000000",
"BTC-USDT",
True,
"BTC",
"USDT",
Decimal(101),
Decimal(1))
buy_order_2 = LimitOrder("Order-1234569980000000",
"BTC-USDT",
True,
"BTC",
"USDT",
Decimal(120),
Decimal(1))
self.tracker.add_order(buy_order_1)
strategy_active_orders.append(buy_order_1)
self.tracker.add_order(buy_order_2)
strategy_active_orders.append(buy_order_2)
self.tracker.update_strategy_orders_with_equivalent_orders()
# The hanging orders are created
grouped_hanging_order = next(iter(self.tracker.strategy_current_hanging_orders))
strategy_active_orders.append(LimitOrder(grouped_hanging_order.order_id,
grouped_hanging_order.trading_pair,
grouped_hanging_order.is_buy,
"BTC",
"USDT",
grouped_hanging_order.price,
grouped_hanging_order.amount))
# After removing orders far from price, no order is cancelled, but buy_order_2 should no longer be considered
# a potential hanging order
self.tracker.remove_orders_far_from_price()
self.assertEqual(0, len(cancelled_orders_ids))
self.assertFalse(self.tracker.is_potential_hanging_order(buy_order_2))
self.assertTrue(self.tracker.is_potential_hanging_order(buy_order_1))
# The hanging order will still be the same, until it is recreated
self.assertIn(grouped_hanging_order, self.tracker.strategy_current_hanging_orders)
self.tracker.update_strategy_orders_with_equivalent_orders()
self.assertEqual(1, len(cancelled_orders_ids))
self.assertIn(grouped_hanging_order.order_id, cancelled_orders_ids)
self.tracker._did_cancel_order(MarketEvent.OrderCancelled,
self,
OrderCancelledEvent(grouped_hanging_order.order_id,
grouped_hanging_order.order_id))
new_grouped_hanging_order = next(iter(self.tracker.strategy_current_hanging_orders))
self.assertNotEqual(grouped_hanging_order, new_grouped_hanging_order)
self.assertNotIn(grouped_hanging_order, self.tracker.strategy_current_hanging_orders)
| 56.027708
| 122
| 0.564784
| 4,330
| 44,486
| 5.487298
| 0.064665
| 0.075
| 0.05303
| 0.039184
| 0.859217
| 0.837332
| 0.809007
| 0.793182
| 0.764268
| 0.732113
| 0
| 0.06461
| 0.356696
| 44,486
| 793
| 123
| 56.098361
| 0.765637
| 0.047341
| 0
| 0.75387
| 0
| 0
| 0.081657
| 0.044016
| 0
| 0
| 0
| 0
| 0.105263
| 1
| 0.032508
| false
| 0
| 0.013932
| 0.003096
| 0.052632
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
024bdc581fadab9dff49aa4236b1eb41cdd84366
| 192
|
py
|
Python
|
numerous/engine/system/__init__.py
|
amipy/numerous
|
46eb3806ad904c3c0b3dccad7f8f3ddb5582cbd9
|
[
"BSD-3-Clause"
] | 20
|
2019-12-11T18:19:39.000Z
|
2022-01-30T15:37:58.000Z
|
numerous/engine/system/__init__.py
|
amipy/numerous
|
46eb3806ad904c3c0b3dccad7f8f3ddb5582cbd9
|
[
"BSD-3-Clause"
] | 38
|
2020-04-11T22:25:58.000Z
|
2022-03-29T12:24:15.000Z
|
numerous/engine/system/__init__.py
|
amipy/numerous
|
46eb3806ad904c3c0b3dccad7f8f3ddb5582cbd9
|
[
"BSD-3-Clause"
] | 7
|
2019-12-21T12:12:09.000Z
|
2021-12-02T14:12:09.000Z
|
from .subsystem import *
from .item import *
from .binding import *
from .connector import *
from .connector_item import *
from .item_path import *
from .namespace import *
from .node import *
| 24
| 29
| 0.755208
| 26
| 192
| 5.5
| 0.346154
| 0.48951
| 0.195804
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.161458
| 192
| 8
| 30
| 24
| 0.888199
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 7
|
65f3aee756b0d178a5a2412bae89c1a75e8fdfa2
| 126
|
py
|
Python
|
Calculator/squareRoot.py
|
zc256/PythonCalculator
|
3267a0809dbc28e437337c68f93a9205c0532563
|
[
"MIT"
] | null | null | null |
Calculator/squareRoot.py
|
zc256/PythonCalculator
|
3267a0809dbc28e437337c68f93a9205c0532563
|
[
"MIT"
] | null | null | null |
Calculator/squareRoot.py
|
zc256/PythonCalculator
|
3267a0809dbc28e437337c68f93a9205c0532563
|
[
"MIT"
] | null | null | null |
# import math
# def squareRoot(a):
# return round(math.sqrt(float(a)),9)
def squareRoot(a):
return round(float(a)**(1/2),8)
| 21
| 38
| 0.666667
| 22
| 126
| 3.818182
| 0.590909
| 0.309524
| 0.333333
| 0.47619
| 0.595238
| 0
| 0
| 0
| 0
| 0
| 0
| 0.036036
| 0.119048
| 126
| 6
| 39
| 21
| 0.720721
| 0.531746
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0.5
| 1
| 0
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 8
|
5a00d4aa3e4ec97366305afaa66265f0acdd8e0a
| 5,304
|
py
|
Python
|
opennem/db/migrations/versions/659f03439631_trading_interval_indexes.py
|
tourdownunder/opennem
|
deec3e2079db9d9d84171010fd0c239170d1e7ce
|
[
"MIT"
] | null | null | null |
opennem/db/migrations/versions/659f03439631_trading_interval_indexes.py
|
tourdownunder/opennem
|
deec3e2079db9d9d84171010fd0c239170d1e7ce
|
[
"MIT"
] | 1
|
2020-09-06T04:17:59.000Z
|
2020-09-06T04:17:59.000Z
|
opennem/db/migrations/versions/659f03439631_trading_interval_indexes.py
|
tourdownunder/opennem
|
deec3e2079db9d9d84171010fd0c239170d1e7ce
|
[
"MIT"
] | null | null | null |
"""Trading interval indexes
Revision ID: 659f03439631
Revises: 9ee998713b18
Create Date: 2020-10-09 03:01:56.054462
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = "659f03439631"
down_revision = "9ee998713b18"
branch_labels = None
depends_on = None
def upgrade():
op.execute("COMMIT")
op.create_index(
"idx_facility_scada_trading_interval_perth_year",
"facility_scada",
[sa.text("date_trunc('year', trading_interval AT TIME ZONE 'AWST')")],
postgresql_concurrently=True,
)
op.create_index(
"idx_facility_scada_trading_interval_perth_month",
"facility_scada",
[sa.text("date_trunc('month', trading_interval AT TIME ZONE 'AWST')")],
postgresql_concurrently=True,
)
op.create_index(
"idx_facility_scada_trading_interval_perth_day",
"facility_scada",
[sa.text("date_trunc('day', trading_interval AT TIME ZONE 'AWST')")],
postgresql_concurrently=True,
)
op.create_index(
"idx_facility_scada_trading_interval_perth_hour",
"facility_scada",
[sa.text("date_trunc('hour', trading_interval AT TIME ZONE 'AWST')")],
postgresql_concurrently=True,
)
# wem balancing summary
op.create_index(
"idx_balancing_summary_trading_interval_perth_year",
"balancing_summary",
[sa.text("date_trunc('year', trading_interval AT TIME ZONE 'AWST')")],
postgresql_concurrently=True,
)
op.create_index(
"idx_balancing_summary_trading_interval_perth_month",
"balancing_summary",
[sa.text("date_trunc('month', trading_interval AT TIME ZONE 'AWST')")],
postgresql_concurrently=True,
)
op.create_index(
"idx_balancing_summary_trading_interval_perth_day",
"balancing_summary",
[sa.text("date_trunc('day', trading_interval AT TIME ZONE 'AWST')")],
postgresql_concurrently=True,
)
op.create_index(
"idx_balancing_summary_trading_interval_perth_hour",
"balancing_summary",
[sa.text("date_trunc('hour', trading_interval AT TIME ZONE 'AWST')")],
postgresql_concurrently=True,
)
# NEM timezone indexes
# facility scada
op.create_index(
"idx_facility_scada_trading_interval_sydney_year",
"facility_scada",
[sa.text("date_trunc('year', trading_interval AT TIME ZONE 'AEST')")],
postgresql_concurrently=True,
)
op.create_index(
"idx_facility_scada_trading_interval_sydney_month",
"facility_scada",
[sa.text("date_trunc('month', trading_interval AT TIME ZONE 'AEST')")],
postgresql_concurrently=True,
)
op.create_index(
"idx_facility_scada_trading_interval_sydney_day",
"facility_scada",
[sa.text("date_trunc('day', trading_interval AT TIME ZONE 'AEST')")],
postgresql_concurrently=True,
)
op.create_index(
"idx_facility_scada_trading_interval_sydney_hour",
"facility_scada",
[sa.text("date_trunc('hour', trading_interval AT TIME ZONE 'AEST')")],
postgresql_concurrently=True,
)
# NEM balancing summary
op.create_index(
"idx_balancing_summary_trading_interval_sydney_year",
"balancing_summary",
[sa.text("date_trunc('year', trading_interval AT TIME ZONE 'AEST')")],
postgresql_concurrently=True,
)
op.create_index(
"idx_balancing_summary_trading_interval_sydney_month",
"balancing_summary",
[sa.text("date_trunc('month', trading_interval AT TIME ZONE 'AEST')")],
postgresql_concurrently=True,
)
op.create_index(
"idx_balancing_summary_trading_interval_sydney_day",
"balancing_summary",
[sa.text("date_trunc('day', trading_interval AT TIME ZONE 'AEST')")],
postgresql_concurrently=True,
)
op.create_index(
"idx_balancing_summary_trading_interval_sydney_hour",
"balancing_summary",
[sa.text("date_trunc('hour', trading_interval AT TIME ZONE 'AEST')")],
postgresql_concurrently=True,
)
def downgrade():
op.drop_index("idx_facility_scada_trading_interval_perth_year")
op.drop_index("idx_facility_scada_trading_interval_perth_month")
op.drop_index("idx_facility_scada_trading_interval_perth_day")
op.drop_index("idx_facility_scada_trading_interval_perth_hour")
op.drop_index("idx_balancing_summary_trading_interval_perth_year")
op.drop_index("idx_fbalancing_summary_trading_interval_perth_month")
op.drop_index("idx_balancing_summary_trading_interval_perth_day")
op.drop_index("idx_balancing_summary_trading_interval_perth_hour")
op.drop_index("idx_facility_scada_trading_interval_sydney_year")
op.drop_index("idx_facility_scada_trading_interval_sydney_month")
op.drop_index("idx_facility_scada_trading_interval_sydney_day")
op.drop_index("idx_facility_scada_trading_interval_sydney_hour")
op.drop_index("idx_balancing_summary_trading_interval_sydney_year")
op.drop_index("idx_balancing_summary_trading_interval_sydney_month")
op.drop_index("idx_balancing_summary_trading_interval_sydney_day")
op.drop_index("idx_balancing_summary_trading_interval_sydney_hour")
| 36.328767
| 79
| 0.712481
| 635
| 5,304
| 5.492913
| 0.102362
| 0.210722
| 0.059633
| 0.073395
| 0.90797
| 0.905963
| 0.905963
| 0.905963
| 0.891628
| 0.635895
| 0
| 0.013905
| 0.186463
| 5,304
| 145
| 80
| 36.57931
| 0.794438
| 0.043929
| 0
| 0.528926
| 0
| 0
| 0.535877
| 0.303815
| 0
| 0
| 0
| 0
| 0
| 1
| 0.016529
| false
| 0
| 0.016529
| 0
| 0.033058
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
5a0b453b0ca0b40e5b85897cd96b1272b656b9a4
| 31,239
|
py
|
Python
|
src/ggrc/migrations/versions/20130529211629_459696baf6e4_initial_objects_migr.py
|
Smotko/ggrc-core
|
b3abb58b24e7559960d71a94ba79c75539e7fe29
|
[
"Apache-2.0"
] | null | null | null |
src/ggrc/migrations/versions/20130529211629_459696baf6e4_initial_objects_migr.py
|
Smotko/ggrc-core
|
b3abb58b24e7559960d71a94ba79c75539e7fe29
|
[
"Apache-2.0"
] | 12
|
2015-01-08T14:50:19.000Z
|
2017-11-29T19:37:53.000Z
|
src/ggrc/migrations/versions/20130529211629_459696baf6e4_initial_objects_migr.py
|
mikecb/ggrc-core
|
1cda560cb0920021416e07740c6cca1acba56268
|
[
"ECL-2.0",
"Apache-2.0"
] | 1
|
2015-01-08T13:25:09.000Z
|
2015-01-08T13:25:09.000Z
|
# Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: dan@reciprocitylabs.com
# Maintained By: dan@reciprocitylabs.com
"""Initial objects migration
Revision ID: 459696baf6e4
Revises: None
Create Date: 2013-05-29 21:16:29.330760
"""
# revision identifiers, used by Alembic.
revision = '459696baf6e4'
down_revision = None
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - please adjust! ###
op.create_table('risky_attributes',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('modified_by_id', sa.Integer(), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('updated_at', sa.DateTime(), nullable=True),
sa.Column('description', sa.Text(), nullable=True),
sa.Column('url', sa.String(length=250), nullable=True),
sa.Column('start_date', sa.DateTime(), nullable=True),
sa.Column('end_date', sa.DateTime(), nullable=True),
sa.Column('slug', sa.String(length=250), nullable=False),
sa.Column('title', sa.String(length=250), nullable=False),
sa.Column('type_string', sa.String(length=250), nullable=True),
sa.PrimaryKeyConstraint('id')
)
op.create_table('relationship_types',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('modified_by_id', sa.Integer(), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('updated_at', sa.DateTime(), nullable=True),
sa.Column('description', sa.Text(), nullable=True),
sa.Column('relationship_type', sa.String(length=250), nullable=True),
sa.Column('forward_phrase', sa.String(length=250), nullable=True),
sa.Column('backward_phrase', sa.String(length=250), nullable=True),
sa.Column('symmetric', sa.Boolean(), nullable=False),
sa.PrimaryKeyConstraint('id')
)
op.create_table('projects',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('modified_by_id', sa.Integer(), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('updated_at', sa.DateTime(), nullable=True),
sa.Column('description', sa.Text(), nullable=True),
sa.Column('url', sa.String(length=250), nullable=True),
sa.Column('start_date', sa.DateTime(), nullable=True),
sa.Column('end_date', sa.DateTime(), nullable=True),
sa.Column('slug', sa.String(length=250), nullable=False),
sa.Column('title', sa.String(length=250), nullable=False),
sa.PrimaryKeyConstraint('id')
)
op.create_table('org_groups',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('modified_by_id', sa.Integer(), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('updated_at', sa.DateTime(), nullable=True),
sa.Column('description', sa.Text(), nullable=True),
sa.Column('url', sa.String(length=250), nullable=True),
sa.Column('start_date', sa.DateTime(), nullable=True),
sa.Column('end_date', sa.DateTime(), nullable=True),
sa.Column('slug', sa.String(length=250), nullable=False),
sa.Column('title', sa.String(length=250), nullable=False),
sa.PrimaryKeyConstraint('id')
)
op.create_table('versions',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('item_type', sa.String(length=250), nullable=True),
sa.Column('item_id', sa.Integer(), nullable=True),
sa.Column('event', sa.String(length=250), nullable=True),
sa.Column('whodunnit', sa.String(length=250), nullable=True),
sa.Column('object', sa.Text(), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.PrimaryKeyConstraint('id')
)
op.create_table('markets',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('modified_by_id', sa.Integer(), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('updated_at', sa.DateTime(), nullable=True),
sa.Column('description', sa.Text(), nullable=True),
sa.Column('url', sa.String(length=250), nullable=True),
sa.Column('start_date', sa.DateTime(), nullable=True),
sa.Column('end_date', sa.DateTime(), nullable=True),
sa.Column('slug', sa.String(length=250), nullable=False),
sa.Column('title', sa.String(length=250), nullable=False),
sa.PrimaryKeyConstraint('id')
)
op.create_table('facilities',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('modified_by_id', sa.Integer(), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('updated_at', sa.DateTime(), nullable=True),
sa.Column('description', sa.Text(), nullable=True),
sa.Column('url', sa.String(length=250), nullable=True),
sa.Column('start_date', sa.DateTime(), nullable=True),
sa.Column('end_date', sa.DateTime(), nullable=True),
sa.Column('slug', sa.String(length=250), nullable=False),
sa.Column('title', sa.String(length=250), nullable=False),
sa.PrimaryKeyConstraint('id')
)
op.create_table('data_assets',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('modified_by_id', sa.Integer(), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('updated_at', sa.DateTime(), nullable=True),
sa.Column('description', sa.Text(), nullable=True),
sa.Column('url', sa.String(length=250), nullable=True),
sa.Column('start_date', sa.DateTime(), nullable=True),
sa.Column('end_date', sa.DateTime(), nullable=True),
sa.Column('slug', sa.String(length=250), nullable=False),
sa.Column('title', sa.String(length=250), nullable=False),
sa.PrimaryKeyConstraint('id')
)
op.create_table('options',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('modified_by_id', sa.Integer(), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('updated_at', sa.DateTime(), nullable=True),
sa.Column('description', sa.Text(), nullable=True),
sa.Column('role', sa.String(length=250), nullable=True),
sa.Column('title', sa.String(length=250), nullable=True),
sa.Column('required', sa.Boolean(), nullable=True),
sa.PrimaryKeyConstraint('id')
)
op.create_table('helps',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('modified_by_id', sa.Integer(), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('updated_at', sa.DateTime(), nullable=True),
sa.Column('slug', sa.String(length=250), nullable=False),
sa.Column('title', sa.String(length=250), nullable=False),
sa.Column('content', sa.Text(), nullable=True),
sa.PrimaryKeyConstraint('id')
)
op.create_table('relationships',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('modified_by_id', sa.Integer(), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('updated_at', sa.DateTime(), nullable=True),
sa.Column('source_id', sa.Integer(), nullable=True),
sa.Column('source_type', sa.String(length=250), nullable=True),
sa.Column('destination_id', sa.Integer(), nullable=True),
sa.Column('destination_type', sa.String(length=250), nullable=True),
sa.Column('relationship_type_id', sa.String(length=250), nullable=True),
sa.PrimaryKeyConstraint('id')
)
op.create_table('people',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('modified_by_id', sa.Integer(), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('updated_at', sa.DateTime(), nullable=True),
sa.Column('email', sa.String(length=250), nullable=True),
sa.Column('name', sa.String(length=250), nullable=True),
sa.Column('language_id', sa.Integer(), nullable=True),
sa.Column('company', sa.String(length=250), nullable=True),
sa.PrimaryKeyConstraint('id')
)
op.create_table('risks',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('modified_by_id', sa.Integer(), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('updated_at', sa.DateTime(), nullable=True),
sa.Column('description', sa.Text(), nullable=True),
sa.Column('url', sa.String(length=250), nullable=True),
sa.Column('start_date', sa.DateTime(), nullable=True),
sa.Column('end_date', sa.DateTime(), nullable=True),
sa.Column('slug', sa.String(length=250), nullable=False),
sa.Column('title', sa.String(length=250), nullable=False),
sa.Column('kind', sa.String(length=250), nullable=True),
sa.Column('likelihood', sa.Text(), nullable=True),
sa.Column('threat_vector', sa.Text(), nullable=True),
sa.Column('trigger', sa.Text(), nullable=True),
sa.Column('preconditions', sa.Text(), nullable=True),
sa.Column('likelihood_rating', sa.Integer(), nullable=True),
sa.Column('financial_impact_rating', sa.Integer(), nullable=True),
sa.Column('reputational_impact_rating', sa.Integer(), nullable=True),
sa.Column('operational_impact_rating', sa.Integer(), nullable=True),
sa.Column('inherent_risk', sa.Text(), nullable=True),
sa.Column('risk_mitigation', sa.Text(), nullable=True),
sa.Column('residual_risk', sa.Text(), nullable=True),
sa.Column('impact', sa.Text(), nullable=True),
sa.PrimaryKeyConstraint('id')
)
op.create_table('products',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('modified_by_id', sa.Integer(), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('updated_at', sa.DateTime(), nullable=True),
sa.Column('description', sa.Text(), nullable=True),
sa.Column('url', sa.String(length=250), nullable=True),
sa.Column('start_date', sa.DateTime(), nullable=True),
sa.Column('end_date', sa.DateTime(), nullable=True),
sa.Column('slug', sa.String(length=250), nullable=False),
sa.Column('title', sa.String(length=250), nullable=False),
sa.Column('type_id', sa.Integer(), nullable=True),
sa.Column('version', sa.String(length=250), nullable=True),
sa.PrimaryKeyConstraint('id')
)
op.create_table('directives',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('modified_by_id', sa.Integer(), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('updated_at', sa.DateTime(), nullable=True),
sa.Column('description', sa.Text(), nullable=True),
sa.Column('url', sa.String(length=250), nullable=True),
sa.Column('start_date', sa.DateTime(), nullable=True),
sa.Column('end_date', sa.DateTime(), nullable=True),
sa.Column('slug', sa.String(length=250), nullable=False),
sa.Column('title', sa.String(length=250), nullable=False),
sa.Column('company', sa.Boolean(), nullable=False),
sa.Column('version', sa.String(length=250), nullable=True),
sa.Column('organization', sa.String(length=250), nullable=True),
sa.Column('scope', sa.Text(), nullable=True),
sa.Column('kind_id', sa.Integer(), nullable=True),
sa.Column('audit_start_date', sa.DateTime(), nullable=True),
sa.Column('audit_frequency_id', sa.Integer(), nullable=True),
sa.Column('audit_duration_id', sa.Integer(), nullable=True),
sa.Column('kind', sa.String(length=250), nullable=True),
sa.PrimaryKeyConstraint('id')
)
op.create_table('programs',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('modified_by_id', sa.Integer(), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('updated_at', sa.DateTime(), nullable=True),
sa.Column('description', sa.Text(), nullable=True),
sa.Column('url', sa.String(length=250), nullable=True),
sa.Column('start_date', sa.DateTime(), nullable=True),
sa.Column('end_date', sa.DateTime(), nullable=True),
sa.Column('slug', sa.String(length=250), nullable=False),
sa.Column('title', sa.String(length=250), nullable=False),
sa.Column('kind', sa.String(length=250), nullable=True),
sa.PrimaryKeyConstraint('id')
)
op.create_table('documents',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('modified_by_id', sa.Integer(), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('updated_at', sa.DateTime(), nullable=True),
sa.Column('title', sa.String(length=250), nullable=True),
sa.Column('link', sa.String(length=250), nullable=True),
sa.Column('description', sa.Text(), nullable=True),
sa.Column('type_id', sa.Integer(), nullable=True),
sa.Column('kind_id', sa.Integer(), nullable=True),
sa.Column('year_id', sa.Integer(), nullable=True),
sa.Column('language_id', sa.Integer(), nullable=True),
sa.PrimaryKeyConstraint('id')
)
op.create_table('categories',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('modified_by_id', sa.Integer(), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('updated_at', sa.DateTime(), nullable=True),
sa.Column('name', sa.String(length=250), nullable=True),
sa.Column('lft', sa.Integer(), nullable=True),
sa.Column('rgt', sa.Integer(), nullable=True),
sa.Column('scope_id', sa.Integer(), nullable=True),
sa.Column('depth', sa.Integer(), nullable=True),
sa.Column('required', sa.Boolean(), nullable=True),
sa.Column('parent_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['parent_id'], ['categories.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_table('sections',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('modified_by_id', sa.Integer(), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('updated_at', sa.DateTime(), nullable=True),
sa.Column('description', sa.Text(), nullable=True),
sa.Column('url', sa.String(length=250), nullable=True),
sa.Column('slug', sa.String(length=250), nullable=False),
sa.Column('title', sa.String(length=250), nullable=False),
sa.Column('directive_id', sa.Integer(), nullable=True),
sa.Column('na', sa.Boolean(), nullable=False),
sa.Column('notes', sa.Text(), nullable=True),
sa.Column('parent_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['directive_id'], ['directives.id'], ),
sa.ForeignKeyConstraint(['parent_id'], ['sections.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_table('cycles',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('modified_by_id', sa.Integer(), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('updated_at', sa.DateTime(), nullable=True),
sa.Column('description', sa.Text(), nullable=True),
sa.Column('start_at', sa.Date(), nullable=True),
sa.Column('complete', sa.Boolean(), nullable=False),
sa.Column('title', sa.String(length=250), nullable=True),
sa.Column('audit_firm', sa.String(length=250), nullable=True),
sa.Column('audit_lead', sa.String(length=250), nullable=True),
sa.Column('status', sa.String(length=250), nullable=True),
sa.Column('notes', sa.Text(), nullable=True),
sa.Column('end_at', sa.Date(), nullable=True),
sa.Column('program_id', sa.Integer(), nullable=True),
sa.Column('report_due_at', sa.Date(), nullable=True),
sa.ForeignKeyConstraint(['program_id'], ['programs.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_table('program_directives',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('modified_by_id', sa.Integer(), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('updated_at', sa.DateTime(), nullable=True),
sa.Column('program_id', sa.Integer(), nullable=True),
sa.Column('directive_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['directive_id'], ['directives.id'], ),
sa.ForeignKeyConstraint(['program_id'], ['programs.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_table('object_people',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('modified_by_id', sa.Integer(), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('updated_at', sa.DateTime(), nullable=True),
sa.Column('start_date', sa.DateTime(), nullable=True),
sa.Column('end_date', sa.DateTime(), nullable=True),
sa.Column('role', sa.String(length=250), nullable=True),
sa.Column('notes', sa.Text(), nullable=True),
sa.Column('person_id', sa.Integer(), nullable=True),
sa.Column('personable_id', sa.Integer(), nullable=True),
sa.Column('personable_type', sa.String(length=250), nullable=True),
sa.ForeignKeyConstraint(['person_id'], ['people.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_table('object_documents',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('modified_by_id', sa.Integer(), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('updated_at', sa.DateTime(), nullable=True),
sa.Column('start_date', sa.DateTime(), nullable=True),
sa.Column('end_date', sa.DateTime(), nullable=True),
sa.Column('role', sa.String(length=250), nullable=True),
sa.Column('notes', sa.Text(), nullable=True),
sa.Column('document_id', sa.Integer(), nullable=True),
sa.Column('documentable_id', sa.Integer(), nullable=True),
sa.Column('documentable_type', sa.String(length=250), nullable=True),
sa.ForeignKeyConstraint(['document_id'], ['documents.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_table('controls',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('modified_by_id', sa.Integer(), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('updated_at', sa.DateTime(), nullable=True),
sa.Column('description', sa.Text(), nullable=True),
sa.Column('url', sa.String(length=250), nullable=True),
sa.Column('start_date', sa.DateTime(), nullable=True),
sa.Column('end_date', sa.DateTime(), nullable=True),
sa.Column('slug', sa.String(length=250), nullable=False),
sa.Column('title', sa.String(length=250), nullable=False),
sa.Column('directive_id', sa.Integer(), nullable=True),
sa.Column('type_id', sa.Integer(), nullable=True),
sa.Column('kind_id', sa.Integer(), nullable=True),
sa.Column('means_id', sa.Integer(), nullable=True),
sa.Column('version', sa.String(length=250), nullable=True),
sa.Column('documentation_description', sa.Text(), nullable=True),
sa.Column('verify_frequency_id', sa.Integer(), nullable=True),
sa.Column('fraud_related', sa.Boolean(), nullable=True),
sa.Column('key_control', sa.Boolean(), nullable=True),
sa.Column('active', sa.Boolean(), nullable=True),
sa.Column('notes', sa.Text(), nullable=True),
sa.Column('parent_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['directive_id'], ['directives.id'], ),
sa.ForeignKeyConstraint(['parent_id'], ['controls.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_table('risk_risky_attributes',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('modified_by_id', sa.Integer(), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('updated_at', sa.DateTime(), nullable=True),
sa.Column('risk_id', sa.Integer(), nullable=True),
sa.Column('risky_attribute_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['risk_id'], ['risks.id'], ),
sa.ForeignKeyConstraint(['risky_attribute_id'], ['risky_attributes.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_table('systems',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('modified_by_id', sa.Integer(), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('updated_at', sa.DateTime(), nullable=True),
sa.Column('description', sa.Text(), nullable=True),
sa.Column('url', sa.String(length=250), nullable=True),
sa.Column('start_date', sa.DateTime(), nullable=True),
sa.Column('end_date', sa.DateTime(), nullable=True),
sa.Column('slug', sa.String(length=250), nullable=False),
sa.Column('title', sa.String(length=250), nullable=False),
sa.Column('infrastructure', sa.Boolean(), nullable=True),
sa.Column('owner_id', sa.Integer(), nullable=True),
sa.Column('is_biz_process', sa.Boolean(), nullable=True),
sa.Column('type_id', sa.Integer(), nullable=True),
sa.Column('version', sa.String(length=250), nullable=True),
sa.Column('notes', sa.Text(), nullable=True),
sa.Column('network_zone_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['owner_id'], ['people.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_table('categorizations',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('modified_by_id', sa.Integer(), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('updated_at', sa.DateTime(), nullable=True),
sa.Column('category_id', sa.Integer(), nullable=True),
sa.Column('categorizable_id', sa.Integer(), nullable=True),
sa.Column('categorizable_type', sa.String(length=250), nullable=True),
sa.ForeignKeyConstraint(['category_id'], ['categories.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_table('system_systems',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('modified_by_id', sa.Integer(), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('updated_at', sa.DateTime(), nullable=True),
sa.Column('parent_id', sa.Integer(), nullable=True),
sa.Column('child_id', sa.Integer(), nullable=True),
sa.Column('type', sa.String(length=250), nullable=True),
sa.Column('order', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['child_id'], ['systems.id'], ),
sa.ForeignKeyConstraint(['parent_id'], ['systems.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_table('control_sections',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('modified_by_id', sa.Integer(), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('updated_at', sa.DateTime(), nullable=True),
sa.Column('control_id', sa.Integer(), nullable=True),
sa.Column('section_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['control_id'], ['controls.id'], ),
sa.ForeignKeyConstraint(['section_id'], ['sections.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_table('control_controls',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('modified_by_id', sa.Integer(), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('updated_at', sa.DateTime(), nullable=True),
sa.Column('control_id', sa.Integer(), nullable=True),
sa.Column('implemented_control_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['control_id'], ['controls.id'], ),
sa.ForeignKeyConstraint(['implemented_control_id'], ['controls.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_table('control_risks',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('modified_by_id', sa.Integer(), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('updated_at', sa.DateTime(), nullable=True),
sa.Column('control_id', sa.Integer(), nullable=True),
sa.Column('risk_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['control_id'], ['controls.id'], ),
sa.ForeignKeyConstraint(['risk_id'], ['risks.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_table('system_controls',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('modified_by_id', sa.Integer(), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('updated_at', sa.DateTime(), nullable=True),
sa.Column('system_id', sa.Integer(), nullable=True),
sa.Column('control_id', sa.Integer(), nullable=True),
sa.Column('state', sa.Integer(), nullable=False),
sa.Column('cycle_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['control_id'], ['controls.id'], ),
sa.ForeignKeyConstraint(['cycle_id'], ['cycles.id'], ),
sa.ForeignKeyConstraint(['system_id'], ['systems.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_table('pbc_lists',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('modified_by_id', sa.Integer(), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('updated_at', sa.DateTime(), nullable=True),
sa.Column('audit_cycle_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['audit_cycle_id'], ['cycles.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_table('transactions',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('modified_by_id', sa.Integer(), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('updated_at', sa.DateTime(), nullable=True),
sa.Column('description', sa.Text(), nullable=True),
sa.Column('title', sa.String(length=250), nullable=True),
sa.Column('system_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['system_id'], ['systems.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_table('control_assessments',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('modified_by_id', sa.Integer(), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('updated_at', sa.DateTime(), nullable=True),
sa.Column('pbc_list_id', sa.Integer(), nullable=True),
sa.Column('control_id', sa.Integer(), nullable=True),
sa.Column('control_version', sa.String(length=250), nullable=True),
sa.Column('internal_tod', sa.Boolean(), nullable=True),
sa.Column('internal_toe', sa.Boolean(), nullable=True),
sa.Column('external_tod', sa.Boolean(), nullable=True),
sa.Column('external_toe', sa.Boolean(), nullable=True),
sa.Column('notes', sa.Text(), nullable=True),
sa.ForeignKeyConstraint(['control_id'], ['controls.id'], ),
sa.ForeignKeyConstraint(['pbc_list_id'], ['pbc_lists.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_table('requests',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('modified_by_id', sa.Integer(), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('updated_at', sa.DateTime(), nullable=True),
sa.Column('pbc_list_id', sa.Integer(), nullable=True),
sa.Column('type_id', sa.Integer(), nullable=True),
sa.Column('pbc_control_code', sa.String(length=250), nullable=True),
sa.Column('pbc_control_desc', sa.Text(), nullable=True),
sa.Column('request', sa.Text(), nullable=True),
sa.Column('test', sa.Text(), nullable=True),
sa.Column('notes', sa.Text(), nullable=True),
sa.Column('company_responsible', sa.String(length=250), nullable=True),
sa.Column('auditor_responsible', sa.String(length=250), nullable=True),
sa.Column('date_requested', sa.DateTime(), nullable=True),
sa.Column('status', sa.String(length=250), nullable=True),
sa.Column('control_assessment_id', sa.Integer(), nullable=True),
sa.Column('response_due_at', sa.Date(), nullable=True),
sa.ForeignKeyConstraint(['control_assessment_id'], ['control_assessments.id'], ),
sa.ForeignKeyConstraint(['pbc_list_id'], ['pbc_lists.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_table('responses',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('modified_by_id', sa.Integer(), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('updated_at', sa.DateTime(), nullable=True),
sa.Column('request_id', sa.Integer(), nullable=True),
sa.Column('system_id', sa.Integer(), nullable=True),
sa.Column('status', sa.String(length=250), nullable=True),
sa.ForeignKeyConstraint(['request_id'], ['requests.id'], ),
sa.ForeignKeyConstraint(['system_id'], ['systems.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_table('population_samples',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('modified_by_id', sa.Integer(), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('updated_at', sa.DateTime(), nullable=True),
sa.Column('response_id', sa.Integer(), nullable=True),
sa.Column('population_document_id', sa.Integer(), nullable=True),
sa.Column('population', sa.Integer(), nullable=True),
sa.Column('sample_worksheet_document_id', sa.Integer(), nullable=True),
sa.Column('samples', sa.Integer(), nullable=True),
sa.Column('sample_evidence_document_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['population_document_id'], ['documents.id'], ),
sa.ForeignKeyConstraint(['response_id'], ['responses.id'], ),
sa.ForeignKeyConstraint(['sample_evidence_document_id'], ['documents.id'], ),
sa.ForeignKeyConstraint(['sample_worksheet_document_id'], ['documents.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_table('meetings',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('modified_by_id', sa.Integer(), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('updated_at', sa.DateTime(), nullable=True),
sa.Column('response_id', sa.Integer(), nullable=True),
sa.Column('start_at', sa.DateTime(), nullable=True),
sa.Column('calendar_url', sa.String(length=250), nullable=True),
sa.ForeignKeyConstraint(['response_id'], ['responses.id'], ),
sa.PrimaryKeyConstraint('id')
)
### end Alembic commands ###
def downgrade():
### commands auto generated by Alembic - please adjust! ###
op.drop_table('meetings')
op.drop_table('population_samples')
op.drop_table('responses')
op.drop_table('requests')
op.drop_table('control_assessments')
op.drop_table('transactions')
op.drop_table('pbc_lists')
op.drop_table('system_controls')
op.drop_table('control_risks')
op.drop_table('control_controls')
op.drop_table('control_sections')
op.drop_table('system_systems')
op.drop_table('categorizations')
op.drop_table('systems')
op.drop_table('risk_risky_attributes')
op.drop_table('controls')
op.drop_table('object_documents')
op.drop_table('object_people')
op.drop_table('program_directives')
op.drop_table('cycles')
op.drop_table('sections')
op.drop_table('categories')
op.drop_table('documents')
op.drop_table('programs')
op.drop_table('directives')
op.drop_table('products')
op.drop_table('risks')
op.drop_table('people')
op.drop_table('relationships')
op.drop_table('helps')
op.drop_table('options')
op.drop_table('data_assets')
op.drop_table('facilities')
op.drop_table('markets')
op.drop_table('versions')
op.drop_table('org_groups')
op.drop_table('projects')
op.drop_table('relationship_types')
op.drop_table('risky_attributes')
### end Alembic commands ###
| 49.822967
| 85
| 0.674573
| 4,092
| 31,239
| 5.033724
| 0.053763
| 0.156132
| 0.224294
| 0.288378
| 0.894504
| 0.881833
| 0.85217
| 0.805903
| 0.738081
| 0.685649
| 0
| 0.010895
| 0.127405
| 31,239
| 626
| 86
| 49.902556
| 0.744745
| 0.016774
| 0
| 0.599668
| 0
| 0
| 0.179744
| 0.013137
| 0
| 0
| 0
| 0
| 0
| 1
| 0.003322
| false
| 0
| 0.003322
| 0
| 0.006645
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
5a3d555d3fcd443e3da5cb8fb0b5dac02d2af0e3
| 74
|
py
|
Python
|
src/orders/admin/__init__.py
|
iNerV/education-backend
|
787c0d090eb6e4a9338812941b0246a6e1b8e7ad
|
[
"MIT"
] | 151
|
2020-04-21T09:58:57.000Z
|
2021-09-12T09:01:21.000Z
|
src/orders/admin/__init__.py
|
iNerV/education-backend
|
787c0d090eb6e4a9338812941b0246a6e1b8e7ad
|
[
"MIT"
] | 163
|
2020-05-29T20:52:00.000Z
|
2021-09-11T12:44:56.000Z
|
src/orders/admin/__init__.py
|
iNerV/education-backend
|
787c0d090eb6e4a9338812941b0246a6e1b8e7ad
|
[
"MIT"
] | 39
|
2020-04-21T12:28:16.000Z
|
2021-09-12T15:33:47.000Z
|
import orders.admin.orders # noqa
import orders.admin.promocodes # noqa
| 24.666667
| 38
| 0.783784
| 10
| 74
| 5.8
| 0.5
| 0.413793
| 0.586207
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.135135
| 74
| 2
| 39
| 37
| 0.90625
| 0.121622
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 7
|
5a49c981d8946a3270527aca43539de68213c017
| 6,507
|
py
|
Python
|
tagger-ds-temp/tagger/testing/test_retriever.py
|
filchyboy/TaggerMail
|
4166a49842817ad999a8fbb6262de7cb7e765a5a
|
[
"MIT"
] | null | null | null |
tagger-ds-temp/tagger/testing/test_retriever.py
|
filchyboy/TaggerMail
|
4166a49842817ad999a8fbb6262de7cb7e765a5a
|
[
"MIT"
] | 6
|
2021-01-28T21:23:23.000Z
|
2022-01-22T13:06:54.000Z
|
tagger-ds-temp/tagger/testing/test_retriever.py
|
filchyboy/TaggerMail
|
4166a49842817ad999a8fbb6262de7cb7e765a5a
|
[
"MIT"
] | null | null | null |
from __future__ import print_function
import pickle
import os.path
import base64
from bs4 import BeautifulSoup
import bleach
import re
from googleapiclient.discovery import build
from google_auth_oauthlib.flow import InstalledAppFlow
from google.auth.transport.requests import Request
import pytest
# If modifying these scopes, delete the file token.pickle.
SCOPES = ['https://www.googleapis.com/auth/gmail.readonly']
creds = None
# The file token.pickle stores the user's access and refresh tokens, and is
# created automatically when the authorization flow completes for the first
# time.
# In production this authorization method will be handled through a JSON
# retrieved from the BE server.
if os.path.exists('token.pickle'):
with open('token.pickle', 'rb') as token:
creds = pickle.load(token)
# If there are no (valid) credentials available, let the user log in.
if not creds or not creds.valid:
if creds and creds.expired and creds.refresh_token:
creds.refresh(Request())
else:
flow = InstalledAppFlow.from_client_secrets_file(
'credentials.json', SCOPES)
creds = flow.run_local_server(port=0)
# Save the credentials for the next run
with open('token.pickle', 'wb') as token:
pickle.dump(creds, token)
# Build the Google Service
service = build('gmail', 'v1', credentials=creds)
# Call the Gmail API
message = service.users().messages().list(userId='me').execute()
# Find most recent message
recent_msg_id = message['messages'][0]['id']
# Recent message list/this will be important when tracking
# which emails have been retrieved versus those that haven't.
recent_msg_list = message['messages']
# Call message content
message_content = service.users().messages().get(
userId='me', id=recent_msg_id).execute()
# Call message body
message_body = message_content['payload']['parts']
message_body_dict = dict(message_body[0])
# Decode base64 encoding
decode = message_body_dict['body']['data']
decodedContents = base64.urlsafe_b64decode(decode.encode('ASCII'))
# Clean the text
text = BeautifulSoup(decodedContents, 'html.parser')
text = str(text.text)
text = re.sub(r"http\S+", "", text)
# Output
#print("Recent Message: ", recent_msg_id, "\n\nRecent Message List: ", recent_msg_list, "\n\nMessage Body: ", text)
def generate_message():
# If modifying these scopes, delete the file token.pickle.
SCOPES = ['https://www.googleapis.com/auth/gmail.readonly']
creds = None
# The file token.pickle stores the user's access and refresh tokens, and is
# created automatically when the authorization flow completes for the first
# time.
# In production this authorization method will be handled through a JSON
# retrieved from the BE server.
if os.path.exists('token.pickle'):
with open('token.pickle', 'rb') as token:
creds = pickle.load(token)
# If there are no (valid) credentials available, let the user log in.
if not creds or not creds.valid:
if creds and creds.expired and creds.refresh_token:
creds.refresh(Request())
else:
flow = InstalledAppFlow.from_client_secrets_file(
'credentials.json', SCOPES)
creds = flow.run_local_server(port=0)
# Save the credentials for the next run
with open('token.pickle', 'wb') as token:
pickle.dump(creds, token)
# Build the Google Service
service = build('gmail', 'v1', credentials=creds)
# Call the Gmail API
message = service.users().messages().list(userId='me').execute()
message_count = len(message['messages'])
return message_count
def generate_message_body():
# If modifying these scopes, delete the file token.pickle.
SCOPES = ['https://www.googleapis.com/auth/gmail.readonly']
creds = None
# The file token.pickle stores the user's access and refresh tokens, and is
# created automatically when the authorization flow completes for the first
# time.
# In production this authorization method will be handled through a JSON
# retrieved from the BE server.
if os.path.exists('token.pickle'):
with open('token.pickle', 'rb') as token:
creds = pickle.load(token)
# If there are no (valid) credentials available, let the user log in.
if not creds or not creds.valid:
if creds and creds.expired and creds.refresh_token:
creds.refresh(Request())
else:
flow = InstalledAppFlow.from_client_secrets_file(
'credentials.json', SCOPES)
creds = flow.run_local_server(port=0)
# Save the credentials for the next run
with open('token.pickle', 'wb') as token:
pickle.dump(creds, token)
# Build the Google Service
service = build('gmail', 'v1', credentials=creds)
# Call the Gmail API
message = service.users().messages().list(userId='me').execute()
# Find most recent message
recent_msg_id = message['messages'][0]['id']
# Recent message list/this will be important when tracking
# which emails have been retrieved versus those that haven't.
recent_msg_list = message['messages']
# Call message content
message_content = service.users().messages().get(
userId='me', id=recent_msg_id).execute()
# Call message body
message_body = message_content['payload']['parts']
message_body_dict = dict(message_body[0])
# Decode base64 encoding
decode = message_body_dict['body']['data']
decodedContents = base64.urlsafe_b64decode(decode.encode('ASCII'))
# Clean the text
text = BeautifulSoup(decodedContents, 'html.parser')
text = str(text.text)
text = re.sub(r"http\S+", "", text)
# Output
return (recent_msg_id, recent_msg_list, text)
def test_gmail_api():
message_count = generate_message()
assert message_count == 100, 'test gmail api'
def test_gmail_content():
pack = generate_message_body()
recent_msg_id = pack[0]
recent_msg_list = pack[1]
text = pack[2]
assert type(recent_msg_id) == type("String")
assert len(recent_msg_list) == 100
assert type(text) == type("String")
#print("Recent Message: ", recent_msg_id, "\n\nRecent Message List: ", recent_msg_list, "\n\nMessage Body: ", text)
| 35.36413
| 121
| 0.671584
| 853
| 6,507
| 5.018757
| 0.19109
| 0.046251
| 0.023125
| 0.025228
| 0.856108
| 0.856108
| 0.856108
| 0.856108
| 0.856108
| 0.856108
| 0
| 0.006745
| 0.225296
| 6,507
| 183
| 122
| 35.557377
| 0.842492
| 0.317658
| 0
| 0.721649
| 0
| 0
| 0.117214
| 0
| 0
| 0
| 0
| 0
| 0.041237
| 1
| 0.041237
| false
| 0
| 0.113402
| 0
| 0.175258
| 0.010309
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
5a85b151921a3c27e60282d6d12f8f337bf9e5fa
| 1,208
|
py
|
Python
|
django_src/analysis/models.py
|
jup014/Walk-Data-Processing
|
5951df6e467702ab0bc3c2721cb5457b0a074aa4
|
[
"MIT"
] | null | null | null |
django_src/analysis/models.py
|
jup014/Walk-Data-Processing
|
5951df6e467702ab0bc3c2721cb5457b0a074aa4
|
[
"MIT"
] | null | null | null |
django_src/analysis/models.py
|
jup014/Walk-Data-Processing
|
5951df6e467702ab0bc3c2721cb5457b0a074aa4
|
[
"MIT"
] | null | null | null |
from django.db import models
# Create your models here.
class Aggregated1(models.Model):
index_day = models.IntegerField()
index_method = models.IntegerField()
key_n_days = models.IntegerField()
key_window_size = models.IntegerField()
key_threshold1 = models.FloatField()
key_threshold2 = models.FloatField()
TP = models.IntegerField()
TN = models.IntegerField()
FP = models.IntegerField()
FN = models.IntegerField()
class Meta:
indexes = [
models.Index(fields=['index_day', 'index_method', 'key_n_days', 'key_window_size', 'key_threshold1', 'key_threshold2',])
]
# class Aggregated2(models.Model):
# index_method = models.IntegerField()
# key_n_days = models.IntegerField()
# key_window_size = models.IntegerField()
# key_threshold1 = models.FloatField()
# key_threshold2 = models.FloatField()
# TP = models.IntegerField()
# TN = models.IntegerField()
# FP = models.IntegerField()
# FN = models.IntegerField()
# class Meta:
# indexes = [
# models.Index(fields=['index_method', 'key_n_days', 'key_window_size', 'key_threshold1', 'key_threshold2',])
# ]
| 34.514286
| 132
| 0.655629
| 127
| 1,208
| 6
| 0.244094
| 0.354331
| 0.165354
| 0.076115
| 0.833333
| 0.833333
| 0.833333
| 0.833333
| 0.833333
| 0.833333
| 0
| 0.010571
| 0.216887
| 1,208
| 35
| 133
| 34.514286
| 0.794926
| 0.457781
| 0
| 0
| 0
| 0
| 0.115625
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.0625
| 0
| 0.8125
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 8
|
ce747120ebd453ebad548b8be69986a6111203d2
| 902
|
py
|
Python
|
spoonerism.py
|
primelos/python-funcs
|
ef62b66017014fef199edcca4df818ae59561115
|
[
"MIT"
] | null | null | null |
spoonerism.py
|
primelos/python-funcs
|
ef62b66017014fef199edcca4df818ae59561115
|
[
"MIT"
] | null | null | null |
spoonerism.py
|
primelos/python-funcs
|
ef62b66017014fef199edcca4df818ae59561115
|
[
"MIT"
] | null | null | null |
# Write your make_spoonerism function here:
def make_spoonerism(word1, word2):
a = word1[0]
b = word2[0]
c = word1[0].replace(a,b) + word1[1:]
d = word2[0].replace(b,a) + word2[1:]
e = c + ' ' + d
return e
# Uncomment these function calls to test your function:
print(make_spoonerism("Codecademy", "Learn"))
# should print Lodecademy Cearn
print(make_spoonerism("Hello", "world!"))
# should print wello Horld!
print(make_spoonerism("a", "b"))
# should print b a
# OR
# OR
# # Write your make_spoonerism function here:
# def make_spoonerism(word1, word2):
# return word2[0]+word1[1:]+" "+word1[0]+word2[1:]
# # Uncomment these function calls to test your tip function:
# print(make_spoonerism("Codecademy", "Learn"))
# # should print Lodecademy Cearn
# print(make_spoonerism("Hello", "world!"))
# # should print wello Horld!
# print(make_spoonerism("a", "b"))
# # should print b a
| 25.771429
| 61
| 0.684035
| 131
| 902
| 4.633588
| 0.267176
| 0.230643
| 0.187809
| 0.075783
| 0.827018
| 0.827018
| 0.827018
| 0.705107
| 0.705107
| 0.705107
| 0
| 0.031662
| 0.159645
| 902
| 34
| 62
| 26.529412
| 0.769129
| 0.619734
| 0
| 0
| 0
| 0
| 0.090625
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.1
| false
| 0
| 0
| 0
| 0.2
| 0.3
| 0
| 0
| 0
| null | 1
| 1
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
0c9823b3c3b81d7cfe345f4378dc34733315a87a
| 2,693
|
py
|
Python
|
tests/test_frequency.py
|
apeyrard/lxd-backup
|
4577bf739de6b2a6cd660a940e0be423922b9d31
|
[
"MIT"
] | null | null | null |
tests/test_frequency.py
|
apeyrard/lxd-backup
|
4577bf739de6b2a6cd660a940e0be423922b9d31
|
[
"MIT"
] | 1
|
2021-06-01T22:46:55.000Z
|
2021-06-01T22:46:55.000Z
|
tests/test_frequency.py
|
apeyrard/lxd-backup
|
4577bf739de6b2a6cd660a940e0be423922b9d31
|
[
"MIT"
] | null | null | null |
from lxd_backup.frequencies import should_backup
from lxd_backup.frequencies import Frequency
def test_when_daily_and_monday_then_should_backup(mocker):
mocker.patch('lxd_backup.frequencies.weekday', return_value=0)
assert should_backup(Frequency.DAILY)
def test_when_weekly_and_tuesday_then_should_not_backup(mocker):
mocker.patch('lxd_backup.frequencies.weekday', return_value=1)
assert not should_backup(Frequency.WEEKLY)
def test_when_weekly_and_monday_then_should_backup(mocker):
mocker.patch('lxd_backup.frequencies.weekday', return_value=0)
assert should_backup(Frequency.WEEKLY)
def test_when_daily_and_saturday_then_should_backup(mocker):
mocker.patch('lxd_backup.frequencies.weekday', return_value=5)
assert should_backup(Frequency.DAILY)
def test_when_weekly_and_wednesday_and_chosen_day_is_wednesday_then_should_backup(mocker):
mocker.patch('lxd_backup.frequencies.weekday', return_value=2)
assert should_backup(Frequency.WEEKLY, target=2)
def test_when_monthly_and_first_day_then_should_backup(mocker):
mocker.patch('lxd_backup.frequencies.day', return_value=1)
assert should_backup(Frequency.MONTHLY)
def test_when_monthly_and_15_day_then_should_not_backup(mocker):
mocker.patch('lxd_backup.frequencies.day', return_value=15)
assert not should_backup(Frequency.MONTHLY)
def test_when_monthly_and_26_and_chosen_day_is_26_then_should_backup(mocker):
mocker.patch('lxd_backup.frequencies.day', return_value=26)
assert should_backup(Frequency.MONTHLY, target=26)
def test_when_bianually_and_january_first_then_should_backup(mocker):
mocker.patch('lxd_backup.frequencies.month', return_value=1)
mocker.patch('lxd_backup.frequencies.day', return_value=1)
assert should_backup(Frequency.BIANUALLY)
def test_when_bianually_and_november_5_then_should_not_backup(mocker):
mocker.patch('lxd_backup.frequencies.month', return_value=11)
mocker.patch('lxd_backup.frequencies.day', return_value=5)
assert not should_backup(Frequency.BIANUALLY)
def test_when_bianually_and_july_first_then_should_backup(mocker):
mocker.patch('lxd_backup.frequencies.month', return_value=7)
mocker.patch('lxd_backup.frequencies.day', return_value=1)
assert should_backup(Frequency.BIANUALLY)
def test_when_bianually_and_october_26_and_target_is_april_26_then_should_backup(mocker):
mocker.patch('lxd_backup.frequencies.month', return_value=10)
mocker.patch('lxd_backup.frequencies.day', return_value=26)
assert should_backup(Frequency.BIANUALLY, target={'day': 26, 'month': 4})
def test_when_unknown_frequency_then_should_not_backup(mocker):
assert not should_backup(42)
| 37.929577
| 90
| 0.821017
| 388
| 2,693
| 5.278351
| 0.128866
| 0.134766
| 0.175781
| 0.15625
| 0.884766
| 0.77002
| 0.77002
| 0.743164
| 0.721191
| 0.657715
| 0
| 0.016333
| 0.090605
| 2,693
| 70
| 91
| 38.471429
| 0.819927
| 0
| 0
| 0.25
| 0
| 0
| 0.167843
| 0.164872
| 0
| 0
| 0
| 0
| 0.295455
| 1
| 0.295455
| false
| 0
| 0.045455
| 0
| 0.340909
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
490262227b1b04b0803be5b654afb8f3b88aa5df
| 6,217
|
py
|
Python
|
src/comportamento.py
|
jssfernandes/monopoly-simulations-python
|
c73d6ecf0f1be5075ecdb66bcdf54d5617761da6
|
[
"MIT"
] | null | null | null |
src/comportamento.py
|
jssfernandes/monopoly-simulations-python
|
c73d6ecf0f1be5075ecdb66bcdf54d5617761da6
|
[
"MIT"
] | null | null | null |
src/comportamento.py
|
jssfernandes/monopoly-simulations-python
|
c73d6ecf0f1be5075ecdb66bcdf54d5617761da6
|
[
"MIT"
] | null | null | null |
from random import randint
def impulsivo(tabuleiro, jogadores, jogador_atual):
if tabuleiro[jogadores[jogador_atual]['posicao_atual']]['proprietario'] != jogadores[jogador_atual]['nome'] \
and jogadores[jogador_atual]['caixa'] > tabuleiro[jogadores[jogador_atual]['posicao_atual']]['custo_venda']:
print('Jogador = ', jogadores[jogador_atual]['nome'])
print('saldo na conta = ', jogadores[jogador_atual]['caixa'])
print('valor do imovel = ',
tabuleiro[jogadores[jogador_atual]['posicao_atual']]['custo_venda'])
print('A propriedade รฉ do =',
tabuleiro[jogadores[jogador_atual]['posicao_atual']]['proprietario'])
print('----' * 42)
print('Propriedade pode ser comprada')
print('----' * 42)
jogadores[jogador_atual]['caixa'] = (
jogadores[jogador_atual]['caixa'] - tabuleiro[jogadores[jogador_atual]['posicao_atual']]['custo_venda'])
jogadores[jogador_atual]['propriedades'].append(
jogadores[jogador_atual]['posicao_atual'])
tabuleiro[jogadores[jogador_atual]['posicao_atual']
]['proprietario'] = jogadores[jogador_atual]['nome']
print('Propriedade comprada!!!')
print('----' * 42)
print('NOVO SALDO = ', jogadores[jogador_atual]['caixa'])
print('Total de propriedades = ', len(
jogadores[jogador_atual]['propriedades']))
print('Detalhes = ', jogadores[jogador_atual])
print('----' * 42)
def exigente(tabuleiro, jogadores, jogador_atual):
if tabuleiro[jogadores[jogador_atual]['posicao_atual']]['proprietario'] != jogadores[jogador_atual]['nome'] \
and jogadores[jogador_atual]['caixa'] > tabuleiro[jogadores[jogador_atual]['posicao_atual']]['custo_venda'] \
and tabuleiro[jogadores[jogador_atual]['posicao_atual']]['valor_aluguel'] > 50:
print('Jogador = ', jogadores[jogador_atual]['nome'])
print('saldo na conta = ', jogadores[jogador_atual]['caixa'])
print('valor do imovel = ',
tabuleiro[jogadores[jogador_atual]['posicao_atual']]['custo_venda'])
print('A propriedade รฉ do =',
tabuleiro[jogadores[jogador_atual]['posicao_atual']]['proprietario'])
print('----' * 42)
print('Propriedade pode ser comprada')
print('----' * 42)
jogadores[jogador_atual]['caixa'] = (
jogadores[jogador_atual]['caixa'] - tabuleiro[jogadores[jogador_atual]['posicao_atual']]['custo_venda'])
jogadores[jogador_atual]['propriedades'].append(
jogadores[jogador_atual]['posicao_atual'])
tabuleiro[jogadores[jogador_atual]['posicao_atual']
]['proprietario'] = jogadores[jogador_atual]['nome']
print('Propriedade comprada!!!')
print('----' * 42)
print('NOVO SALDO = ', jogadores[jogador_atual]['caixa'])
print('Total de propriedades = ', len(
jogadores[jogador_atual]['propriedades']))
print('Detalhes = ', jogadores[jogador_atual])
print('----' * 42)
def cauteloso(tabuleiro, jogadores, jogador_atual):
if tabuleiro[jogadores[jogador_atual]['posicao_atual']]['proprietario'] != jogadores[jogador_atual]['nome'] \
and jogadores[jogador_atual]['caixa'] > tabuleiro[jogadores[jogador_atual]['posicao_atual']]['custo_venda'] \
and jogadores[jogador_atual]['caixa'] - tabuleiro[jogadores[jogador_atual]['posicao_atual']]['custo_venda'] >= 80:
print('Jogador = ', jogadores[jogador_atual]['nome'])
print('saldo na conta = ', jogadores[jogador_atual]['caixa'])
print('valor do imovel = ',
tabuleiro[jogadores[jogador_atual]['posicao_atual']]['custo_venda'])
print('A propriedade รฉ do =',
tabuleiro[jogadores[jogador_atual]['posicao_atual']]['proprietario'])
print('----' * 42)
print('Propriedade pode ser comprada')
print('----' * 42)
jogadores[jogador_atual]['caixa'] = (
jogadores[jogador_atual]['caixa'] - tabuleiro[jogadores[jogador_atual]['posicao_atual']]['custo_venda'])
jogadores[jogador_atual]['propriedades'].append(
jogadores[jogador_atual]['posicao_atual'])
tabuleiro[jogadores[jogador_atual]['posicao_atual']
]['proprietario'] = jogadores[jogador_atual]['nome']
print('Propriedade comprada!!!')
print('----' * 42)
print('NOVO SALDO = ', jogadores[jogador_atual]['caixa'])
print('Total de propriedades = ', len(
jogadores[jogador_atual]['propriedades']))
print('Detalhes = ', jogadores[jogador_atual])
print('----' * 42)
def aleatorio(tabuleiro, jogadores, jogador_atual):
if tabuleiro[jogadores[jogador_atual]['posicao_atual']]['proprietario'] != jogadores[jogador_atual]['nome'] \
and jogadores[jogador_atual]['caixa'] > tabuleiro[jogadores[jogador_atual]['posicao_atual']]['custo_venda'] \
and randint(0, 1) == 1:
print('Jogador = ', jogadores[jogador_atual]['nome'])
print('saldo na conta = ', jogadores[jogador_atual]['caixa'])
print('valor do imovel = ',
tabuleiro[jogadores[jogador_atual]['posicao_atual']]['custo_venda'])
print('A propriedade รฉ do =',
tabuleiro[jogadores[jogador_atual]['posicao_atual']]['proprietario'])
print('----' * 42)
print('Propriedade pode ser comprada')
print('----' * 42)
jogadores[jogador_atual]['caixa'] = (
jogadores[jogador_atual]['caixa'] - tabuleiro[jogadores[jogador_atual]['posicao_atual']]['custo_venda'])
jogadores[jogador_atual]['propriedades'].append(
jogadores[jogador_atual]['posicao_atual'])
tabuleiro[jogadores[jogador_atual]['posicao_atual']
]['proprietario'] = jogadores[jogador_atual]['nome']
print('Propriedade comprada!!!')
print('----' * 42)
print('NOVO SALDO = ', jogadores[jogador_atual]['caixa'])
print('Total de propriedades = ', len(
jogadores[jogador_atual]['propriedades']))
print('Detalhes = ', jogadores[jogador_atual])
print('----' * 42)
| 54.535088
| 126
| 0.627312
| 605
| 6,217
| 6.242975
| 0.077686
| 0.334657
| 0.439237
| 0.238284
| 0.976966
| 0.976966
| 0.965846
| 0.965846
| 0.965846
| 0.965846
| 0
| 0.007898
| 0.205726
| 6,217
| 113
| 127
| 55.017699
| 0.756987
| 0
| 0
| 0.913462
| 0
| 0
| 0.267492
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.038462
| false
| 0
| 0.009615
| 0
| 0.048077
| 0.5
| 0
| 0
| 0
| null | 1
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 11
|
0b268bc5bbe09790da00c10cf204d267c085009a
| 208
|
py
|
Python
|
core/models/utils.py
|
gabrielloliveira/flaskweet
|
0fc21bfb62c1335ee009ceb9cda9071ca13a8c76
|
[
"MIT"
] | null | null | null |
core/models/utils.py
|
gabrielloliveira/flaskweet
|
0fc21bfb62c1335ee009ceb9cda9071ca13a8c76
|
[
"MIT"
] | 5
|
2020-04-03T14:40:27.000Z
|
2020-04-05T15:24:49.000Z
|
core/models/utils.py
|
gabrielloliveira/flaskweet
|
0fc21bfb62c1335ee009ceb9cda9071ca13a8c76
|
[
"MIT"
] | null | null | null |
from passlib.hash import pbkdf2_sha256
def encrypt(password):
return pbkdf2_sha256.hash(password)
def verify(password, password_storaged):
return pbkdf2_sha256.verify(password, password_storaged)
| 20.8
| 60
| 0.802885
| 26
| 208
| 6.230769
| 0.461538
| 0.222222
| 0.222222
| 0.37037
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.065934
| 0.125
| 208
| 9
| 61
| 23.111111
| 0.824176
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.4
| false
| 1
| 0.2
| 0.4
| 1
| 0
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 9
|
0b52e72434672d32d39db08deb42542aaa16a864
| 112
|
py
|
Python
|
app/forms.py
|
ghoshd1/docker-django-webapp-linux
|
5ea81a3b9d9e2ec91fcf1663c94ee2c63ca03888
|
[
"MIT"
] | 48
|
2017-09-21T02:27:31.000Z
|
2022-03-21T13:40:59.000Z
|
app/forms.py
|
ghoshd1/docker-django-webapp-linux
|
5ea81a3b9d9e2ec91fcf1663c94ee2c63ca03888
|
[
"MIT"
] | 7
|
2017-08-21T11:16:17.000Z
|
2020-07-20T14:45:11.000Z
|
app/forms.py
|
ghoshd1/docker-django-webapp-linux
|
5ea81a3b9d9e2ec91fcf1663c94ee2c63ca03888
|
[
"MIT"
] | 161
|
2017-08-21T06:22:33.000Z
|
2022-03-31T15:36:08.000Z
|
"""
Definition of forms.
"""
from django import forms
from django.contrib.auth.forms import AuthenticationForm
| 16
| 56
| 0.785714
| 14
| 112
| 6.285714
| 0.642857
| 0.204545
| 0.340909
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.125
| 112
| 6
| 57
| 18.666667
| 0.897959
| 0.178571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 7
|
e8de833ef4df53a07a1cea8aae0dc39b85f4a4b2
| 99
|
py
|
Python
|
tmp/test_d.py
|
wiki918/python_pytest_demo
|
32180f726cabbd7685dda04e72aa111b00677930
|
[
"BSD-3-Clause"
] | null | null | null |
tmp/test_d.py
|
wiki918/python_pytest_demo
|
32180f726cabbd7685dda04e72aa111b00677930
|
[
"BSD-3-Clause"
] | null | null | null |
tmp/test_d.py
|
wiki918/python_pytest_demo
|
32180f726cabbd7685dda04e72aa111b00677930
|
[
"BSD-3-Clause"
] | null | null | null |
def test_d_1():
assert True
def test_d_2():
assert True
def test_d_3():
assert True
| 9.9
| 15
| 0.636364
| 18
| 99
| 3.166667
| 0.444444
| 0.368421
| 0.421053
| 0.596491
| 0.631579
| 0
| 0
| 0
| 0
| 0
| 0
| 0.041667
| 0.272727
| 99
| 9
| 16
| 11
| 0.75
| 0
| 0
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0.5
| true
| 0
| 0
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
e8e8869aa6d2f8035a5c9cb25f059494072c9011
| 125
|
py
|
Python
|
recognizer/__init__.py
|
RukNdf/MA-Landmark
|
4038ebe7edc9e353e1987479f5f9edc528a4bd2a
|
[
"Unlicense"
] | null | null | null |
recognizer/__init__.py
|
RukNdf/MA-Landmark
|
4038ebe7edc9e353e1987479f5f9edc528a4bd2a
|
[
"Unlicense"
] | null | null | null |
recognizer/__init__.py
|
RukNdf/MA-Landmark
|
4038ebe7edc9e353e1987479f5f9edc528a4bd2a
|
[
"Unlicense"
] | null | null | null |
from recognizer.ma_plan_recognizer import SATTeamPlanRecognizer
from recognizer.sat_plan_recognizer import SATPlanRecognizer
| 41.666667
| 63
| 0.92
| 14
| 125
| 7.928571
| 0.571429
| 0.252252
| 0.36036
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.064
| 125
| 2
| 64
| 62.5
| 0.948718
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 7
|
e8fc30ee308ece3ccfaac8fc5d5c6838afe37fa5
| 22,765
|
py
|
Python
|
sdk/python/pulumi_yandex/provider.py
|
pulumi/pulumi-yandex
|
559a0c82fd2b834bb5f1dc3abbf0dab689b13a3e
|
[
"ECL-2.0",
"Apache-2.0"
] | 9
|
2021-04-20T15:39:41.000Z
|
2022-02-20T09:14:39.000Z
|
sdk/python/pulumi_yandex/provider.py
|
pulumi/pulumi-yandex
|
559a0c82fd2b834bb5f1dc3abbf0dab689b13a3e
|
[
"ECL-2.0",
"Apache-2.0"
] | 56
|
2021-04-20T11:31:03.000Z
|
2022-03-31T15:53:06.000Z
|
sdk/python/pulumi_yandex/provider.py
|
pulumi/pulumi-yandex
|
559a0c82fd2b834bb5f1dc3abbf0dab689b13a3e
|
[
"ECL-2.0",
"Apache-2.0"
] | null | null | null |
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import _utilities
__all__ = ['ProviderArgs', 'Provider']
@pulumi.input_type
class ProviderArgs:
def __init__(__self__, *,
cloud_id: Optional[pulumi.Input[str]] = None,
endpoint: Optional[pulumi.Input[str]] = None,
folder_id: Optional[pulumi.Input[str]] = None,
insecure: Optional[pulumi.Input[bool]] = None,
max_retries: Optional[pulumi.Input[int]] = None,
plaintext: Optional[pulumi.Input[bool]] = None,
service_account_key_file: Optional[pulumi.Input[str]] = None,
storage_access_key: Optional[pulumi.Input[str]] = None,
storage_endpoint: Optional[pulumi.Input[str]] = None,
storage_secret_key: Optional[pulumi.Input[str]] = None,
token: Optional[pulumi.Input[str]] = None,
ymq_access_key: Optional[pulumi.Input[str]] = None,
ymq_endpoint: Optional[pulumi.Input[str]] = None,
ymq_secret_key: Optional[pulumi.Input[str]] = None,
zone: Optional[pulumi.Input[str]] = None):
"""
The set of arguments for constructing a Provider resource.
:param pulumi.Input[str] cloud_id: ID of Yandex.Cloud tenant.
:param pulumi.Input[str] endpoint: The API endpoint for Yandex.Cloud SDK client.
:param pulumi.Input[str] folder_id: The default folder ID where resources will be placed.
:param pulumi.Input[bool] insecure: Explicitly allow the provider to perform "insecure" SSL requests. If omitted,default value is `false`.
:param pulumi.Input[int] max_retries: The maximum number of times an API request is being executed. If the API request still fails, an error is thrown.
:param pulumi.Input[bool] plaintext: Disable use of TLS. Default value is `false`.
:param pulumi.Input[str] service_account_key_file: Either the path to or the contents of a Service Account key file in JSON format.
:param pulumi.Input[str] storage_access_key: Yandex.Cloud storage service access key. Used when a storage data/resource doesn't have an access key explicitly
specified.
:param pulumi.Input[str] storage_endpoint: Yandex.Cloud storage service endpoint. Default is storage.yandexcloud.net
:param pulumi.Input[str] storage_secret_key: Yandex.Cloud storage service secret key. Used when a storage data/resource doesn't have a secret key explicitly
specified.
:param pulumi.Input[str] token: The access token for API operations.
:param pulumi.Input[str] ymq_access_key: Yandex.Cloud Message Queue service access key. Used when a message queue resource doesn't have an access key explicitly
specified.
:param pulumi.Input[str] ymq_endpoint: Yandex.Cloud Message Queue service endpoint. Default is message-queue.api.cloud.yandex.net
:param pulumi.Input[str] ymq_secret_key: Yandex.Cloud Message Queue service secret key. Used when a message queue resource doesn't have a secret key explicitly
specified.
:param pulumi.Input[str] zone: The zone where operations will take place. Examples are ru-central1-a, ru-central2-c, etc.
"""
if cloud_id is not None:
pulumi.set(__self__, "cloud_id", cloud_id)
if endpoint is not None:
pulumi.set(__self__, "endpoint", endpoint)
if folder_id is not None:
pulumi.set(__self__, "folder_id", folder_id)
if insecure is not None:
pulumi.set(__self__, "insecure", insecure)
if max_retries is not None:
pulumi.set(__self__, "max_retries", max_retries)
if plaintext is not None:
pulumi.set(__self__, "plaintext", plaintext)
if service_account_key_file is not None:
pulumi.set(__self__, "service_account_key_file", service_account_key_file)
if storage_access_key is not None:
pulumi.set(__self__, "storage_access_key", storage_access_key)
if storage_endpoint is not None:
pulumi.set(__self__, "storage_endpoint", storage_endpoint)
if storage_secret_key is not None:
pulumi.set(__self__, "storage_secret_key", storage_secret_key)
if token is not None:
pulumi.set(__self__, "token", token)
if ymq_access_key is not None:
pulumi.set(__self__, "ymq_access_key", ymq_access_key)
if ymq_endpoint is not None:
pulumi.set(__self__, "ymq_endpoint", ymq_endpoint)
if ymq_secret_key is not None:
pulumi.set(__self__, "ymq_secret_key", ymq_secret_key)
if zone is not None:
pulumi.set(__self__, "zone", zone)
@property
@pulumi.getter(name="cloudId")
def cloud_id(self) -> Optional[pulumi.Input[str]]:
"""
ID of Yandex.Cloud tenant.
"""
return pulumi.get(self, "cloud_id")
@cloud_id.setter
def cloud_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "cloud_id", value)
@property
@pulumi.getter
def endpoint(self) -> Optional[pulumi.Input[str]]:
"""
The API endpoint for Yandex.Cloud SDK client.
"""
return pulumi.get(self, "endpoint")
@endpoint.setter
def endpoint(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "endpoint", value)
@property
@pulumi.getter(name="folderId")
def folder_id(self) -> Optional[pulumi.Input[str]]:
"""
The default folder ID where resources will be placed.
"""
return pulumi.get(self, "folder_id")
@folder_id.setter
def folder_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "folder_id", value)
@property
@pulumi.getter
def insecure(self) -> Optional[pulumi.Input[bool]]:
"""
Explicitly allow the provider to perform "insecure" SSL requests. If omitted,default value is `false`.
"""
return pulumi.get(self, "insecure")
@insecure.setter
def insecure(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "insecure", value)
@property
@pulumi.getter(name="maxRetries")
def max_retries(self) -> Optional[pulumi.Input[int]]:
"""
The maximum number of times an API request is being executed. If the API request still fails, an error is thrown.
"""
return pulumi.get(self, "max_retries")
@max_retries.setter
def max_retries(self, value: Optional[pulumi.Input[int]]):
pulumi.set(self, "max_retries", value)
@property
@pulumi.getter
def plaintext(self) -> Optional[pulumi.Input[bool]]:
"""
Disable use of TLS. Default value is `false`.
"""
return pulumi.get(self, "plaintext")
@plaintext.setter
def plaintext(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "plaintext", value)
@property
@pulumi.getter(name="serviceAccountKeyFile")
def service_account_key_file(self) -> Optional[pulumi.Input[str]]:
"""
Either the path to or the contents of a Service Account key file in JSON format.
"""
return pulumi.get(self, "service_account_key_file")
@service_account_key_file.setter
def service_account_key_file(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "service_account_key_file", value)
@property
@pulumi.getter(name="storageAccessKey")
def storage_access_key(self) -> Optional[pulumi.Input[str]]:
"""
Yandex.Cloud storage service access key. Used when a storage data/resource doesn't have an access key explicitly
specified.
"""
return pulumi.get(self, "storage_access_key")
@storage_access_key.setter
def storage_access_key(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "storage_access_key", value)
@property
@pulumi.getter(name="storageEndpoint")
def storage_endpoint(self) -> Optional[pulumi.Input[str]]:
"""
Yandex.Cloud storage service endpoint. Default is storage.yandexcloud.net
"""
return pulumi.get(self, "storage_endpoint")
@storage_endpoint.setter
def storage_endpoint(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "storage_endpoint", value)
@property
@pulumi.getter(name="storageSecretKey")
def storage_secret_key(self) -> Optional[pulumi.Input[str]]:
"""
Yandex.Cloud storage service secret key. Used when a storage data/resource doesn't have a secret key explicitly
specified.
"""
return pulumi.get(self, "storage_secret_key")
@storage_secret_key.setter
def storage_secret_key(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "storage_secret_key", value)
@property
@pulumi.getter
def token(self) -> Optional[pulumi.Input[str]]:
"""
The access token for API operations.
"""
return pulumi.get(self, "token")
@token.setter
def token(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "token", value)
@property
@pulumi.getter(name="ymqAccessKey")
def ymq_access_key(self) -> Optional[pulumi.Input[str]]:
"""
Yandex.Cloud Message Queue service access key. Used when a message queue resource doesn't have an access key explicitly
specified.
"""
return pulumi.get(self, "ymq_access_key")
@ymq_access_key.setter
def ymq_access_key(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "ymq_access_key", value)
@property
@pulumi.getter(name="ymqEndpoint")
def ymq_endpoint(self) -> Optional[pulumi.Input[str]]:
"""
Yandex.Cloud Message Queue service endpoint. Default is message-queue.api.cloud.yandex.net
"""
return pulumi.get(self, "ymq_endpoint")
@ymq_endpoint.setter
def ymq_endpoint(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "ymq_endpoint", value)
@property
@pulumi.getter(name="ymqSecretKey")
def ymq_secret_key(self) -> Optional[pulumi.Input[str]]:
"""
Yandex.Cloud Message Queue service secret key. Used when a message queue resource doesn't have a secret key explicitly
specified.
"""
return pulumi.get(self, "ymq_secret_key")
@ymq_secret_key.setter
def ymq_secret_key(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "ymq_secret_key", value)
@property
@pulumi.getter
def zone(self) -> Optional[pulumi.Input[str]]:
"""
The zone where operations will take place. Examples are ru-central1-a, ru-central2-c, etc.
"""
return pulumi.get(self, "zone")
@zone.setter
def zone(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "zone", value)
class Provider(pulumi.ProviderResource):
@overload
def __init__(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
cloud_id: Optional[pulumi.Input[str]] = None,
endpoint: Optional[pulumi.Input[str]] = None,
folder_id: Optional[pulumi.Input[str]] = None,
insecure: Optional[pulumi.Input[bool]] = None,
max_retries: Optional[pulumi.Input[int]] = None,
plaintext: Optional[pulumi.Input[bool]] = None,
service_account_key_file: Optional[pulumi.Input[str]] = None,
storage_access_key: Optional[pulumi.Input[str]] = None,
storage_endpoint: Optional[pulumi.Input[str]] = None,
storage_secret_key: Optional[pulumi.Input[str]] = None,
token: Optional[pulumi.Input[str]] = None,
ymq_access_key: Optional[pulumi.Input[str]] = None,
ymq_endpoint: Optional[pulumi.Input[str]] = None,
ymq_secret_key: Optional[pulumi.Input[str]] = None,
zone: Optional[pulumi.Input[str]] = None,
__props__=None):
"""
The provider type for the yandex package. By default, resources use package-wide configuration
settings, however an explicit `Provider` instance may be created and passed during resource
construction to achieve fine-grained programmatic control over provider settings. See the
[documentation](https://www.pulumi.com/docs/reference/programming-model/#providers) for more information.
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] cloud_id: ID of Yandex.Cloud tenant.
:param pulumi.Input[str] endpoint: The API endpoint for Yandex.Cloud SDK client.
:param pulumi.Input[str] folder_id: The default folder ID where resources will be placed.
:param pulumi.Input[bool] insecure: Explicitly allow the provider to perform "insecure" SSL requests. If omitted,default value is `false`.
:param pulumi.Input[int] max_retries: The maximum number of times an API request is being executed. If the API request still fails, an error is thrown.
:param pulumi.Input[bool] plaintext: Disable use of TLS. Default value is `false`.
:param pulumi.Input[str] service_account_key_file: Either the path to or the contents of a Service Account key file in JSON format.
:param pulumi.Input[str] storage_access_key: Yandex.Cloud storage service access key. Used when a storage data/resource doesn't have an access key explicitly
specified.
:param pulumi.Input[str] storage_endpoint: Yandex.Cloud storage service endpoint. Default is storage.yandexcloud.net
:param pulumi.Input[str] storage_secret_key: Yandex.Cloud storage service secret key. Used when a storage data/resource doesn't have a secret key explicitly
specified.
:param pulumi.Input[str] token: The access token for API operations.
:param pulumi.Input[str] ymq_access_key: Yandex.Cloud Message Queue service access key. Used when a message queue resource doesn't have an access key explicitly
specified.
:param pulumi.Input[str] ymq_endpoint: Yandex.Cloud Message Queue service endpoint. Default is message-queue.api.cloud.yandex.net
:param pulumi.Input[str] ymq_secret_key: Yandex.Cloud Message Queue service secret key. Used when a message queue resource doesn't have a secret key explicitly
specified.
:param pulumi.Input[str] zone: The zone where operations will take place. Examples are ru-central1-a, ru-central2-c, etc.
"""
...
@overload
def __init__(__self__,
resource_name: str,
args: Optional[ProviderArgs] = None,
opts: Optional[pulumi.ResourceOptions] = None):
"""
The provider type for the yandex package. By default, resources use package-wide configuration
settings, however an explicit `Provider` instance may be created and passed during resource
construction to achieve fine-grained programmatic control over provider settings. See the
[documentation](https://www.pulumi.com/docs/reference/programming-model/#providers) for more information.
:param str resource_name: The name of the resource.
:param ProviderArgs args: The arguments to use to populate this resource's properties.
:param pulumi.ResourceOptions opts: Options for the resource.
"""
...
def __init__(__self__, resource_name: str, *args, **kwargs):
resource_args, opts = _utilities.get_resource_args_opts(ProviderArgs, pulumi.ResourceOptions, *args, **kwargs)
if resource_args is not None:
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
else:
__self__._internal_init(resource_name, *args, **kwargs)
def _internal_init(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
cloud_id: Optional[pulumi.Input[str]] = None,
endpoint: Optional[pulumi.Input[str]] = None,
folder_id: Optional[pulumi.Input[str]] = None,
insecure: Optional[pulumi.Input[bool]] = None,
max_retries: Optional[pulumi.Input[int]] = None,
plaintext: Optional[pulumi.Input[bool]] = None,
service_account_key_file: Optional[pulumi.Input[str]] = None,
storage_access_key: Optional[pulumi.Input[str]] = None,
storage_endpoint: Optional[pulumi.Input[str]] = None,
storage_secret_key: Optional[pulumi.Input[str]] = None,
token: Optional[pulumi.Input[str]] = None,
ymq_access_key: Optional[pulumi.Input[str]] = None,
ymq_endpoint: Optional[pulumi.Input[str]] = None,
ymq_secret_key: Optional[pulumi.Input[str]] = None,
zone: Optional[pulumi.Input[str]] = None,
__props__=None):
if opts is None:
opts = pulumi.ResourceOptions()
if not isinstance(opts, pulumi.ResourceOptions):
raise TypeError('Expected resource options to be a ResourceOptions instance')
if opts.version is None:
opts.version = _utilities.get_version()
if opts.id is None:
if __props__ is not None:
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
__props__ = ProviderArgs.__new__(ProviderArgs)
__props__.__dict__["cloud_id"] = cloud_id
__props__.__dict__["endpoint"] = endpoint
__props__.__dict__["folder_id"] = folder_id
__props__.__dict__["insecure"] = pulumi.Output.from_input(insecure).apply(pulumi.runtime.to_json) if insecure is not None else None
__props__.__dict__["max_retries"] = pulumi.Output.from_input(max_retries).apply(pulumi.runtime.to_json) if max_retries is not None else None
__props__.__dict__["plaintext"] = pulumi.Output.from_input(plaintext).apply(pulumi.runtime.to_json) if plaintext is not None else None
__props__.__dict__["service_account_key_file"] = service_account_key_file
__props__.__dict__["storage_access_key"] = storage_access_key
__props__.__dict__["storage_endpoint"] = storage_endpoint
__props__.__dict__["storage_secret_key"] = storage_secret_key
__props__.__dict__["token"] = token
__props__.__dict__["ymq_access_key"] = ymq_access_key
__props__.__dict__["ymq_endpoint"] = ymq_endpoint
__props__.__dict__["ymq_secret_key"] = ymq_secret_key
__props__.__dict__["zone"] = zone
super(Provider, __self__).__init__(
'yandex',
resource_name,
__props__,
opts)
@property
@pulumi.getter(name="cloudId")
def cloud_id(self) -> pulumi.Output[Optional[str]]:
"""
ID of Yandex.Cloud tenant.
"""
return pulumi.get(self, "cloud_id")
@property
@pulumi.getter
def endpoint(self) -> pulumi.Output[Optional[str]]:
"""
The API endpoint for Yandex.Cloud SDK client.
"""
return pulumi.get(self, "endpoint")
@property
@pulumi.getter(name="folderId")
def folder_id(self) -> pulumi.Output[Optional[str]]:
"""
The default folder ID where resources will be placed.
"""
return pulumi.get(self, "folder_id")
@property
@pulumi.getter(name="serviceAccountKeyFile")
def service_account_key_file(self) -> pulumi.Output[Optional[str]]:
"""
Either the path to or the contents of a Service Account key file in JSON format.
"""
return pulumi.get(self, "service_account_key_file")
@property
@pulumi.getter(name="storageAccessKey")
def storage_access_key(self) -> pulumi.Output[Optional[str]]:
"""
Yandex.Cloud storage service access key. Used when a storage data/resource doesn't have an access key explicitly
specified.
"""
return pulumi.get(self, "storage_access_key")
@property
@pulumi.getter(name="storageEndpoint")
def storage_endpoint(self) -> pulumi.Output[Optional[str]]:
"""
Yandex.Cloud storage service endpoint. Default is storage.yandexcloud.net
"""
return pulumi.get(self, "storage_endpoint")
@property
@pulumi.getter(name="storageSecretKey")
def storage_secret_key(self) -> pulumi.Output[Optional[str]]:
"""
Yandex.Cloud storage service secret key. Used when a storage data/resource doesn't have a secret key explicitly
specified.
"""
return pulumi.get(self, "storage_secret_key")
@property
@pulumi.getter
def token(self) -> pulumi.Output[Optional[str]]:
"""
The access token for API operations.
"""
return pulumi.get(self, "token")
@property
@pulumi.getter(name="ymqAccessKey")
def ymq_access_key(self) -> pulumi.Output[Optional[str]]:
"""
Yandex.Cloud Message Queue service access key. Used when a message queue resource doesn't have an access key explicitly
specified.
"""
return pulumi.get(self, "ymq_access_key")
@property
@pulumi.getter(name="ymqEndpoint")
def ymq_endpoint(self) -> pulumi.Output[Optional[str]]:
"""
Yandex.Cloud Message Queue service endpoint. Default is message-queue.api.cloud.yandex.net
"""
return pulumi.get(self, "ymq_endpoint")
@property
@pulumi.getter(name="ymqSecretKey")
def ymq_secret_key(self) -> pulumi.Output[Optional[str]]:
"""
Yandex.Cloud Message Queue service secret key. Used when a message queue resource doesn't have a secret key explicitly
specified.
"""
return pulumi.get(self, "ymq_secret_key")
@property
@pulumi.getter
def zone(self) -> pulumi.Output[Optional[str]]:
"""
The zone where operations will take place. Examples are ru-central1-a, ru-central2-c, etc.
"""
return pulumi.get(self, "zone")
| 46.176471
| 168
| 0.65302
| 2,801
| 22,765
| 5.103534
| 0.076401
| 0.081567
| 0.082267
| 0.09234
| 0.868555
| 0.83057
| 0.776285
| 0.735362
| 0.711088
| 0.659881
| 0
| 0.000525
| 0.246431
| 22,765
| 492
| 169
| 46.270325
| 0.83276
| 0.323787
| 0
| 0.462069
| 1
| 0
| 0.090635
| 0.011373
| 0
| 0
| 0
| 0
| 0
| 1
| 0.162069
| false
| 0.003448
| 0.017241
| 0
| 0.27931
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
33052aaad10d8d7e42950e3406dcb710b5793260
| 3,885
|
py
|
Python
|
run_accuracy_tests.py
|
j3ygithub/hijson
|
ac4471f27edc23545ec06393cdb6b037aa0399d3
|
[
"MIT"
] | null | null | null |
run_accuracy_tests.py
|
j3ygithub/hijson
|
ac4471f27edc23545ec06393cdb6b037aa0399d3
|
[
"MIT"
] | null | null | null |
run_accuracy_tests.py
|
j3ygithub/hijson
|
ac4471f27edc23545ec06393cdb6b037aa0399d3
|
[
"MIT"
] | null | null | null |
import json
import unittest
from json_parsers import stringify, parse
class JsonStringifyTestCase(unittest.TestCase):
def test_null(self):
value = None
self.assertEqual(stringify(value), json.dumps(value))
def test_true(self):
value = True
self.assertEqual(stringify(value), json.dumps(value))
def test_false(self):
value = False
self.assertEqual(stringify(value), json.dumps(value))
def test_integer(self):
value = 6
self.assertEqual(stringify(value), json.dumps(value))
def test_negative_integer(self):
value = -8
self.assertEqual(stringify(value), json.dumps(value))
def test_empty_string(self):
value = ""
self.assertEqual(stringify(value), json.dumps(value))
def test_single_letter_string(self):
value = "f"
self.assertEqual(stringify(value), json.dumps(value))
def test_string(self):
value = "oo"
self.assertEqual(stringify(value), json.dumps(value))
def test_strange_string(self):
value = "\"'\\"
self.assertEqual(stringify(value), json.dumps(value))
def test_empty_(self):
value = []
self.assertEqual(stringify(value), json.dumps(value))
def test_array(self):
value = [None, True, False, 6, -8, "", "f", "oo"]
self.assertEqual(stringify(value), json.dumps(value))
def test_nested_array(self):
value = [
None,
True,
False,
6,
-8,
"",
"f",
"oo",
[None, True, False, 6, -8, "", "f", "oo"],
]
self.assertEqual(stringify(value), json.dumps(value))
def test_empty_object(self):
value = {}
self.assertEqual(stringify(value), json.dumps(value))
def test_object(self):
value = {
"None": None,
"True": True,
"False": False,
"": "",
"f": "f",
"oo": "oo",
"array": [None, True, False, 6, -8, "", "f", "oo"],
}
self.assertEqual(stringify(value), json.dumps(value))
def test_nested_object(self):
value = {
"None": None,
"True": True,
"False": False,
"": "",
"f": "f",
"oo": "oo",
"array": [None, True, False, 6, -8, "", "f", "oo"],
"object": {
"None": None,
"True": True,
"False": False,
"": "",
"f": "f",
"oo": "oo",
"array": [None, True, False, 6, -8, "", "f", "oo"],
},
}
self.assertEqual(stringify(value), json.dumps(value))
class JsonParseTestCase(unittest.TestCase):
def test_null(self):
value = "null"
self.assertEqual(parse(value), json.loads(value))
def test_true(self):
value = "true"
self.assertEqual(parse(value), json.loads(value))
def test_false(self):
value = "false"
self.assertEqual(parse(value), json.loads(value))
def test_integer(self):
value = "6"
self.assertEqual(parse(value), json.loads(value))
def test_negative_integer(self):
value = "-8"
self.assertEqual(parse(value), json.loads(value))
def test_empty_string(self):
value = '""'
self.assertEqual(parse(value), json.loads(value))
def test_single_letter_string(self):
value = '"f"'
self.assertEqual(parse(value), json.loads(value))
def test_string(self):
value = '"oo"'
self.assertEqual(parse(value), json.loads(value))
def test_strange_string(self):
value = '"\\"\'\\\\"'
self.assertEqual(parse(value), json.loads(value))
if __name__ == "__main__":
unittest.main()
| 26.979167
| 67
| 0.531532
| 414
| 3,885
| 4.874396
| 0.094203
| 0.083251
| 0.130823
| 0.21556
| 0.926165
| 0.926165
| 0.926165
| 0.890486
| 0.890486
| 0.563429
| 0
| 0.00602
| 0.31583
| 3,885
| 143
| 68
| 27.167832
| 0.753198
| 0
| 0
| 0.570175
| 0
| 0.035088
| 0.035521
| 0
| 0
| 0
| 0
| 0
| 0.210526
| 1
| 0.210526
| false
| 0
| 0.026316
| 0
| 0.254386
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
33328bfab76c8846d7da10e54cab6f816bf1cbe1
| 48,131
|
gyp
|
Python
|
library/openssl/1.0.1j.gyp
|
KjellSchubert/bru
|
dd70b721d07fbd27c57c845cc3a29cd8f2dfc587
|
[
"MIT"
] | 3
|
2015-01-06T15:22:16.000Z
|
2015-11-27T18:13:04.000Z
|
library/openssl/1.0.1j.gyp
|
KjellSchubert/bru
|
dd70b721d07fbd27c57c845cc3a29cd8f2dfc587
|
[
"MIT"
] | 7
|
2015-02-10T15:13:38.000Z
|
2021-05-30T07:51:13.000Z
|
library/openssl/1.0.1j.gyp
|
KjellSchubert/bru
|
dd70b721d07fbd27c57c845cc3a29cd8f2dfc587
|
[
"MIT"
] | 3
|
2015-01-29T17:19:53.000Z
|
2016-01-06T12:50:06.000Z
|
{
"targets": [
{
# OpenSSL has a lot of config options, with some default options
# enabling known insecure algorithms. What's a good combinations
# of openssl config options?
# ./config no-asm no-shared no-ssl2 no-ssl3 no-hw no-zlib no-threads
# ?
# See also http://codefromthe70s.org/sslimprov.aspx
"target_name": "openssl",
"type": "static_library",
# The list of sources I computed on Windows via:
# >cd bru_modules\openssl\1.0.1j\openssl-1.0.1j
# >perl Configure VC-WIN32 no-asm no-ssl2 no-ssl3 no-hw
# >call ms\\do_ms.bat
# >nmake /n /f ms\nt.mak > nmake.log
# >cd bru_modules\openssl # where the *.gyp is located
# >~\bru\makefile2gyp.py 1.0.1j\openssl-1.0.1j\nmake.log
"sources": [
"1.0.1j/openssl-1.0.1j/crypto/aes/aes_cbc.c",
"1.0.1j/openssl-1.0.1j/crypto/aes/aes_cfb.c",
"1.0.1j/openssl-1.0.1j/crypto/aes/aes_core.c",
"1.0.1j/openssl-1.0.1j/crypto/aes/aes_ctr.c",
"1.0.1j/openssl-1.0.1j/crypto/aes/aes_ecb.c",
"1.0.1j/openssl-1.0.1j/crypto/aes/aes_ige.c",
"1.0.1j/openssl-1.0.1j/crypto/aes/aes_misc.c",
"1.0.1j/openssl-1.0.1j/crypto/aes/aes_ofb.c",
"1.0.1j/openssl-1.0.1j/crypto/aes/aes_wrap.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/a_bitstr.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/a_bool.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/a_bytes.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/a_d2i_fp.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/a_digest.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/a_dup.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/a_enum.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/a_gentm.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/a_i2d_fp.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/a_int.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/a_mbstr.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/a_object.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/a_octet.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/a_print.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/a_set.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/a_sign.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/a_strex.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/a_strnid.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/a_time.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/a_type.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/a_utctm.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/a_utf8.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/a_verify.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/ameth_lib.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/asn1_err.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/asn1_gen.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/asn1_lib.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/asn1_par.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/asn_mime.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/asn_moid.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/asn_pack.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/bio_asn1.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/bio_ndef.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/d2i_pr.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/d2i_pu.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/evp_asn1.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/f_enum.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/f_int.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/f_string.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/i2d_pr.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/i2d_pu.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/n_pkey.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/nsseq.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/p5_pbe.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/p5_pbev2.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/p8_pkey.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/t_bitst.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/t_crl.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/t_pkey.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/t_req.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/t_spki.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/t_x509.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/t_x509a.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/tasn_dec.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/tasn_enc.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/tasn_fre.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/tasn_new.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/tasn_prn.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/tasn_typ.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/tasn_utl.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/x_algor.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/x_attrib.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/x_bignum.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/x_crl.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/x_exten.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/x_info.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/x_long.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/x_name.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/x_nx509.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/x_pkey.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/x_pubkey.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/x_req.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/x_sig.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/x_spki.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/x_val.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/x_x509.c",
"1.0.1j/openssl-1.0.1j/crypto/asn1/x_x509a.c",
"1.0.1j/openssl-1.0.1j/crypto/bf/bf_cfb64.c",
"1.0.1j/openssl-1.0.1j/crypto/bf/bf_ecb.c",
"1.0.1j/openssl-1.0.1j/crypto/bf/bf_enc.c",
"1.0.1j/openssl-1.0.1j/crypto/bf/bf_ofb64.c",
"1.0.1j/openssl-1.0.1j/crypto/bf/bf_skey.c",
"1.0.1j/openssl-1.0.1j/crypto/bf/bftest.c",
"1.0.1j/openssl-1.0.1j/crypto/bio/b_dump.c",
"1.0.1j/openssl-1.0.1j/crypto/bio/b_print.c",
"1.0.1j/openssl-1.0.1j/crypto/bio/b_sock.c",
"1.0.1j/openssl-1.0.1j/crypto/bio/bf_buff.c",
"1.0.1j/openssl-1.0.1j/crypto/bio/bf_nbio.c",
"1.0.1j/openssl-1.0.1j/crypto/bio/bf_null.c",
"1.0.1j/openssl-1.0.1j/crypto/bio/bio_cb.c",
"1.0.1j/openssl-1.0.1j/crypto/bio/bio_err.c",
"1.0.1j/openssl-1.0.1j/crypto/bio/bio_lib.c",
"1.0.1j/openssl-1.0.1j/crypto/bio/bss_acpt.c",
"1.0.1j/openssl-1.0.1j/crypto/bio/bss_bio.c",
"1.0.1j/openssl-1.0.1j/crypto/bio/bss_conn.c",
"1.0.1j/openssl-1.0.1j/crypto/bio/bss_dgram.c",
"1.0.1j/openssl-1.0.1j/crypto/bio/bss_fd.c",
"1.0.1j/openssl-1.0.1j/crypto/bio/bss_file.c",
"1.0.1j/openssl-1.0.1j/crypto/bio/bss_log.c",
"1.0.1j/openssl-1.0.1j/crypto/bio/bss_mem.c",
"1.0.1j/openssl-1.0.1j/crypto/bio/bss_null.c",
"1.0.1j/openssl-1.0.1j/crypto/bio/bss_sock.c",
"1.0.1j/openssl-1.0.1j/crypto/bn/bn_add.c",
"1.0.1j/openssl-1.0.1j/crypto/bn/bn_asm.c",
"1.0.1j/openssl-1.0.1j/crypto/bn/bn_blind.c",
"1.0.1j/openssl-1.0.1j/crypto/bn/bn_const.c",
"1.0.1j/openssl-1.0.1j/crypto/bn/bn_ctx.c",
"1.0.1j/openssl-1.0.1j/crypto/bn/bn_depr.c",
"1.0.1j/openssl-1.0.1j/crypto/bn/bn_div.c",
"1.0.1j/openssl-1.0.1j/crypto/bn/bn_err.c",
"1.0.1j/openssl-1.0.1j/crypto/bn/bn_exp.c",
"1.0.1j/openssl-1.0.1j/crypto/bn/bn_exp2.c",
"1.0.1j/openssl-1.0.1j/crypto/bn/bn_gcd.c",
"1.0.1j/openssl-1.0.1j/crypto/bn/bn_gf2m.c",
"1.0.1j/openssl-1.0.1j/crypto/bn/bn_kron.c",
"1.0.1j/openssl-1.0.1j/crypto/bn/bn_lib.c",
"1.0.1j/openssl-1.0.1j/crypto/bn/bn_mod.c",
"1.0.1j/openssl-1.0.1j/crypto/bn/bn_mont.c",
"1.0.1j/openssl-1.0.1j/crypto/bn/bn_mpi.c",
"1.0.1j/openssl-1.0.1j/crypto/bn/bn_mul.c",
"1.0.1j/openssl-1.0.1j/crypto/bn/bn_nist.c",
"1.0.1j/openssl-1.0.1j/crypto/bn/bn_prime.c",
"1.0.1j/openssl-1.0.1j/crypto/bn/bn_print.c",
"1.0.1j/openssl-1.0.1j/crypto/bn/bn_rand.c",
"1.0.1j/openssl-1.0.1j/crypto/bn/bn_recp.c",
"1.0.1j/openssl-1.0.1j/crypto/bn/bn_shift.c",
"1.0.1j/openssl-1.0.1j/crypto/bn/bn_sqr.c",
"1.0.1j/openssl-1.0.1j/crypto/bn/bn_sqrt.c",
"1.0.1j/openssl-1.0.1j/crypto/bn/bn_word.c",
"1.0.1j/openssl-1.0.1j/crypto/bn/bn_x931p.c",
"1.0.1j/openssl-1.0.1j/crypto/bn/bntest.c",
"1.0.1j/openssl-1.0.1j/crypto/bn/exptest.c",
"1.0.1j/openssl-1.0.1j/crypto/buffer/buf_err.c",
"1.0.1j/openssl-1.0.1j/crypto/buffer/buf_str.c",
"1.0.1j/openssl-1.0.1j/crypto/buffer/buffer.c",
"1.0.1j/openssl-1.0.1j/crypto/camellia/camellia.c",
"1.0.1j/openssl-1.0.1j/crypto/camellia/cmll_cbc.c",
"1.0.1j/openssl-1.0.1j/crypto/camellia/cmll_cfb.c",
"1.0.1j/openssl-1.0.1j/crypto/camellia/cmll_ctr.c",
"1.0.1j/openssl-1.0.1j/crypto/camellia/cmll_ecb.c",
"1.0.1j/openssl-1.0.1j/crypto/camellia/cmll_misc.c",
"1.0.1j/openssl-1.0.1j/crypto/camellia/cmll_ofb.c",
"1.0.1j/openssl-1.0.1j/crypto/camellia/cmll_utl.c",
"1.0.1j/openssl-1.0.1j/crypto/cast/c_cfb64.c",
"1.0.1j/openssl-1.0.1j/crypto/cast/c_ecb.c",
"1.0.1j/openssl-1.0.1j/crypto/cast/c_enc.c",
"1.0.1j/openssl-1.0.1j/crypto/cast/c_ofb64.c",
"1.0.1j/openssl-1.0.1j/crypto/cast/c_skey.c",
"1.0.1j/openssl-1.0.1j/crypto/cast/casttest.c",
"1.0.1j/openssl-1.0.1j/crypto/cmac/cm_ameth.c",
"1.0.1j/openssl-1.0.1j/crypto/cmac/cm_pmeth.c",
"1.0.1j/openssl-1.0.1j/crypto/cmac/cmac.c",
"1.0.1j/openssl-1.0.1j/crypto/cms/cms_asn1.c",
"1.0.1j/openssl-1.0.1j/crypto/cms/cms_att.c",
"1.0.1j/openssl-1.0.1j/crypto/cms/cms_cd.c",
"1.0.1j/openssl-1.0.1j/crypto/cms/cms_dd.c",
"1.0.1j/openssl-1.0.1j/crypto/cms/cms_enc.c",
"1.0.1j/openssl-1.0.1j/crypto/cms/cms_env.c",
"1.0.1j/openssl-1.0.1j/crypto/cms/cms_err.c",
"1.0.1j/openssl-1.0.1j/crypto/cms/cms_ess.c",
"1.0.1j/openssl-1.0.1j/crypto/cms/cms_io.c",
"1.0.1j/openssl-1.0.1j/crypto/cms/cms_lib.c",
"1.0.1j/openssl-1.0.1j/crypto/cms/cms_pwri.c",
"1.0.1j/openssl-1.0.1j/crypto/cms/cms_sd.c",
"1.0.1j/openssl-1.0.1j/crypto/cms/cms_smime.c",
"1.0.1j/openssl-1.0.1j/crypto/comp/c_rle.c",
"1.0.1j/openssl-1.0.1j/crypto/comp/c_zlib.c",
"1.0.1j/openssl-1.0.1j/crypto/comp/comp_err.c",
"1.0.1j/openssl-1.0.1j/crypto/comp/comp_lib.c",
"1.0.1j/openssl-1.0.1j/crypto/conf/conf_api.c",
"1.0.1j/openssl-1.0.1j/crypto/conf/conf_def.c",
"1.0.1j/openssl-1.0.1j/crypto/conf/conf_err.c",
"1.0.1j/openssl-1.0.1j/crypto/conf/conf_lib.c",
"1.0.1j/openssl-1.0.1j/crypto/conf/conf_mall.c",
"1.0.1j/openssl-1.0.1j/crypto/conf/conf_mod.c",
"1.0.1j/openssl-1.0.1j/crypto/conf/conf_sap.c",
"1.0.1j/openssl-1.0.1j/crypto/constant_time_test.c",
"1.0.1j/openssl-1.0.1j/crypto/cpt_err.c",
"1.0.1j/openssl-1.0.1j/crypto/cryptlib.c",
"1.0.1j/openssl-1.0.1j/crypto/cversion.c",
"1.0.1j/openssl-1.0.1j/crypto/des/cbc_cksm.c",
"1.0.1j/openssl-1.0.1j/crypto/des/cbc_enc.c",
"1.0.1j/openssl-1.0.1j/crypto/des/cfb64ede.c",
"1.0.1j/openssl-1.0.1j/crypto/des/cfb64enc.c",
"1.0.1j/openssl-1.0.1j/crypto/des/cfb_enc.c",
"1.0.1j/openssl-1.0.1j/crypto/des/des_enc.c",
"1.0.1j/openssl-1.0.1j/crypto/des/des_old.c",
"1.0.1j/openssl-1.0.1j/crypto/des/des_old2.c",
"1.0.1j/openssl-1.0.1j/crypto/des/destest.c",
"1.0.1j/openssl-1.0.1j/crypto/des/ecb3_enc.c",
"1.0.1j/openssl-1.0.1j/crypto/des/ecb_enc.c",
"1.0.1j/openssl-1.0.1j/crypto/des/ede_cbcm_enc.c",
"1.0.1j/openssl-1.0.1j/crypto/des/enc_read.c",
"1.0.1j/openssl-1.0.1j/crypto/des/enc_writ.c",
"1.0.1j/openssl-1.0.1j/crypto/des/fcrypt.c",
"1.0.1j/openssl-1.0.1j/crypto/des/fcrypt_b.c",
"1.0.1j/openssl-1.0.1j/crypto/des/ofb64ede.c",
"1.0.1j/openssl-1.0.1j/crypto/des/ofb64enc.c",
"1.0.1j/openssl-1.0.1j/crypto/des/ofb_enc.c",
"1.0.1j/openssl-1.0.1j/crypto/des/pcbc_enc.c",
"1.0.1j/openssl-1.0.1j/crypto/des/qud_cksm.c",
"1.0.1j/openssl-1.0.1j/crypto/des/rand_key.c",
"1.0.1j/openssl-1.0.1j/crypto/des/read2pwd.c",
"1.0.1j/openssl-1.0.1j/crypto/des/rpc_enc.c",
"1.0.1j/openssl-1.0.1j/crypto/des/set_key.c",
"1.0.1j/openssl-1.0.1j/crypto/des/str2key.c",
"1.0.1j/openssl-1.0.1j/crypto/des/xcbc_enc.c",
"1.0.1j/openssl-1.0.1j/crypto/dh/dh_ameth.c",
"1.0.1j/openssl-1.0.1j/crypto/dh/dh_asn1.c",
"1.0.1j/openssl-1.0.1j/crypto/dh/dh_check.c",
"1.0.1j/openssl-1.0.1j/crypto/dh/dh_depr.c",
"1.0.1j/openssl-1.0.1j/crypto/dh/dh_err.c",
"1.0.1j/openssl-1.0.1j/crypto/dh/dh_gen.c",
"1.0.1j/openssl-1.0.1j/crypto/dh/dh_key.c",
"1.0.1j/openssl-1.0.1j/crypto/dh/dh_lib.c",
"1.0.1j/openssl-1.0.1j/crypto/dh/dh_pmeth.c",
"1.0.1j/openssl-1.0.1j/crypto/dh/dh_prn.c",
"1.0.1j/openssl-1.0.1j/crypto/dh/dhtest.c",
"1.0.1j/openssl-1.0.1j/crypto/dsa/dsa_ameth.c",
"1.0.1j/openssl-1.0.1j/crypto/dsa/dsa_asn1.c",
"1.0.1j/openssl-1.0.1j/crypto/dsa/dsa_depr.c",
"1.0.1j/openssl-1.0.1j/crypto/dsa/dsa_err.c",
"1.0.1j/openssl-1.0.1j/crypto/dsa/dsa_gen.c",
"1.0.1j/openssl-1.0.1j/crypto/dsa/dsa_key.c",
"1.0.1j/openssl-1.0.1j/crypto/dsa/dsa_lib.c",
"1.0.1j/openssl-1.0.1j/crypto/dsa/dsa_ossl.c",
"1.0.1j/openssl-1.0.1j/crypto/dsa/dsa_pmeth.c",
"1.0.1j/openssl-1.0.1j/crypto/dsa/dsa_prn.c",
"1.0.1j/openssl-1.0.1j/crypto/dsa/dsa_sign.c",
"1.0.1j/openssl-1.0.1j/crypto/dsa/dsa_vrf.c",
"1.0.1j/openssl-1.0.1j/crypto/dsa/dsatest.c",
"1.0.1j/openssl-1.0.1j/crypto/dso/dso_beos.c",
"1.0.1j/openssl-1.0.1j/crypto/dso/dso_dl.c",
"1.0.1j/openssl-1.0.1j/crypto/dso/dso_dlfcn.c",
"1.0.1j/openssl-1.0.1j/crypto/dso/dso_err.c",
"1.0.1j/openssl-1.0.1j/crypto/dso/dso_lib.c",
"1.0.1j/openssl-1.0.1j/crypto/dso/dso_null.c",
"1.0.1j/openssl-1.0.1j/crypto/dso/dso_openssl.c",
"1.0.1j/openssl-1.0.1j/crypto/dso/dso_vms.c",
"1.0.1j/openssl-1.0.1j/crypto/dso/dso_win32.c",
"1.0.1j/openssl-1.0.1j/crypto/ebcdic.c",
"1.0.1j/openssl-1.0.1j/crypto/ec/ec2_mult.c",
"1.0.1j/openssl-1.0.1j/crypto/ec/ec2_oct.c",
"1.0.1j/openssl-1.0.1j/crypto/ec/ec2_smpl.c",
"1.0.1j/openssl-1.0.1j/crypto/ec/ec_ameth.c",
"1.0.1j/openssl-1.0.1j/crypto/ec/ec_asn1.c",
"1.0.1j/openssl-1.0.1j/crypto/ec/ec_check.c",
"1.0.1j/openssl-1.0.1j/crypto/ec/ec_curve.c",
"1.0.1j/openssl-1.0.1j/crypto/ec/ec_cvt.c",
"1.0.1j/openssl-1.0.1j/crypto/ec/ec_err.c",
"1.0.1j/openssl-1.0.1j/crypto/ec/ec_key.c",
"1.0.1j/openssl-1.0.1j/crypto/ec/ec_lib.c",
"1.0.1j/openssl-1.0.1j/crypto/ec/ec_mult.c",
"1.0.1j/openssl-1.0.1j/crypto/ec/ec_oct.c",
"1.0.1j/openssl-1.0.1j/crypto/ec/ec_pmeth.c",
"1.0.1j/openssl-1.0.1j/crypto/ec/ec_print.c",
"1.0.1j/openssl-1.0.1j/crypto/ec/eck_prn.c",
"1.0.1j/openssl-1.0.1j/crypto/ec/ecp_mont.c",
"1.0.1j/openssl-1.0.1j/crypto/ec/ecp_nist.c",
"1.0.1j/openssl-1.0.1j/crypto/ec/ecp_nistp224.c",
"1.0.1j/openssl-1.0.1j/crypto/ec/ecp_nistp256.c",
"1.0.1j/openssl-1.0.1j/crypto/ec/ecp_nistp521.c",
"1.0.1j/openssl-1.0.1j/crypto/ec/ecp_nistputil.c",
"1.0.1j/openssl-1.0.1j/crypto/ec/ecp_oct.c",
"1.0.1j/openssl-1.0.1j/crypto/ec/ecp_smpl.c",
"1.0.1j/openssl-1.0.1j/crypto/ec/ectest.c",
"1.0.1j/openssl-1.0.1j/crypto/ecdh/ecdhtest.c",
"1.0.1j/openssl-1.0.1j/crypto/ecdh/ech_err.c",
"1.0.1j/openssl-1.0.1j/crypto/ecdh/ech_key.c",
"1.0.1j/openssl-1.0.1j/crypto/ecdh/ech_lib.c",
"1.0.1j/openssl-1.0.1j/crypto/ecdh/ech_ossl.c",
"1.0.1j/openssl-1.0.1j/crypto/ecdsa/ecdsatest.c",
"1.0.1j/openssl-1.0.1j/crypto/ecdsa/ecs_asn1.c",
"1.0.1j/openssl-1.0.1j/crypto/ecdsa/ecs_err.c",
"1.0.1j/openssl-1.0.1j/crypto/ecdsa/ecs_lib.c",
"1.0.1j/openssl-1.0.1j/crypto/ecdsa/ecs_ossl.c",
"1.0.1j/openssl-1.0.1j/crypto/ecdsa/ecs_sign.c",
"1.0.1j/openssl-1.0.1j/crypto/ecdsa/ecs_vrf.c",
"1.0.1j/openssl-1.0.1j/crypto/engine/eng_all.c",
"1.0.1j/openssl-1.0.1j/crypto/engine/eng_cnf.c",
"1.0.1j/openssl-1.0.1j/crypto/engine/eng_cryptodev.c",
"1.0.1j/openssl-1.0.1j/crypto/engine/eng_ctrl.c",
"1.0.1j/openssl-1.0.1j/crypto/engine/eng_dyn.c",
"1.0.1j/openssl-1.0.1j/crypto/engine/eng_err.c",
"1.0.1j/openssl-1.0.1j/crypto/engine/eng_fat.c",
"1.0.1j/openssl-1.0.1j/crypto/engine/eng_init.c",
"1.0.1j/openssl-1.0.1j/crypto/engine/eng_lib.c",
"1.0.1j/openssl-1.0.1j/crypto/engine/eng_list.c",
"1.0.1j/openssl-1.0.1j/crypto/engine/eng_openssl.c",
"1.0.1j/openssl-1.0.1j/crypto/engine/eng_pkey.c",
"1.0.1j/openssl-1.0.1j/crypto/engine/eng_rdrand.c",
"1.0.1j/openssl-1.0.1j/crypto/engine/eng_rsax.c",
"1.0.1j/openssl-1.0.1j/crypto/engine/eng_table.c",
"1.0.1j/openssl-1.0.1j/crypto/engine/enginetest.c",
"1.0.1j/openssl-1.0.1j/crypto/engine/tb_asnmth.c",
"1.0.1j/openssl-1.0.1j/crypto/engine/tb_cipher.c",
"1.0.1j/openssl-1.0.1j/crypto/engine/tb_dh.c",
"1.0.1j/openssl-1.0.1j/crypto/engine/tb_digest.c",
"1.0.1j/openssl-1.0.1j/crypto/engine/tb_dsa.c",
"1.0.1j/openssl-1.0.1j/crypto/engine/tb_ecdh.c",
"1.0.1j/openssl-1.0.1j/crypto/engine/tb_ecdsa.c",
"1.0.1j/openssl-1.0.1j/crypto/engine/tb_pkmeth.c",
"1.0.1j/openssl-1.0.1j/crypto/engine/tb_rand.c",
"1.0.1j/openssl-1.0.1j/crypto/engine/tb_rsa.c",
"1.0.1j/openssl-1.0.1j/crypto/engine/tb_store.c",
"1.0.1j/openssl-1.0.1j/crypto/err/err.c",
"1.0.1j/openssl-1.0.1j/crypto/err/err_all.c",
"1.0.1j/openssl-1.0.1j/crypto/err/err_prn.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/bio_b64.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/bio_enc.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/bio_md.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/bio_ok.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/c_all.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/c_allc.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/c_alld.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/digest.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/e_aes.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/e_aes_cbc_hmac_sha1.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/e_bf.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/e_camellia.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/e_cast.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/e_des.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/e_des3.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/e_idea.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/e_null.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/e_old.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/e_rc2.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/e_rc4.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/e_rc4_hmac_md5.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/e_rc5.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/e_seed.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/e_xcbc_d.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/encode.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/evp_acnf.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/evp_cnf.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/evp_enc.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/evp_err.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/evp_fips.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/evp_key.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/evp_lib.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/evp_pbe.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/evp_pkey.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/evp_test.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/m_dss.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/m_dss1.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/m_ecdsa.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/m_md4.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/m_md5.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/m_mdc2.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/m_null.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/m_ripemd.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/m_sha.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/m_sha1.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/m_sigver.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/m_wp.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/names.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/p5_crpt.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/p5_crpt2.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/p_dec.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/p_enc.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/p_lib.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/p_open.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/p_seal.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/p_sign.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/p_verify.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/pmeth_fn.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/pmeth_gn.c",
"1.0.1j/openssl-1.0.1j/crypto/evp/pmeth_lib.c",
"1.0.1j/openssl-1.0.1j/crypto/ex_data.c",
"1.0.1j/openssl-1.0.1j/crypto/fips_ers.c",
"1.0.1j/openssl-1.0.1j/crypto/hmac/hm_ameth.c",
"1.0.1j/openssl-1.0.1j/crypto/hmac/hm_pmeth.c",
"1.0.1j/openssl-1.0.1j/crypto/hmac/hmac.c",
"1.0.1j/openssl-1.0.1j/crypto/hmac/hmactest.c",
"1.0.1j/openssl-1.0.1j/crypto/idea/i_cbc.c",
"1.0.1j/openssl-1.0.1j/crypto/idea/i_cfb64.c",
"1.0.1j/openssl-1.0.1j/crypto/idea/i_ecb.c",
"1.0.1j/openssl-1.0.1j/crypto/idea/i_ofb64.c",
"1.0.1j/openssl-1.0.1j/crypto/idea/i_skey.c",
"1.0.1j/openssl-1.0.1j/crypto/idea/ideatest.c",
"1.0.1j/openssl-1.0.1j/crypto/krb5/krb5_asn.c",
"1.0.1j/openssl-1.0.1j/crypto/lhash/lh_stats.c",
"1.0.1j/openssl-1.0.1j/crypto/lhash/lhash.c",
"1.0.1j/openssl-1.0.1j/crypto/md4/md4_dgst.c",
"1.0.1j/openssl-1.0.1j/crypto/md4/md4_one.c",
"1.0.1j/openssl-1.0.1j/crypto/md4/md4test.c",
"1.0.1j/openssl-1.0.1j/crypto/md5/md5_dgst.c",
"1.0.1j/openssl-1.0.1j/crypto/md5/md5_one.c",
"1.0.1j/openssl-1.0.1j/crypto/md5/md5test.c",
"1.0.1j/openssl-1.0.1j/crypto/mdc2/mdc2_one.c",
"1.0.1j/openssl-1.0.1j/crypto/mdc2/mdc2dgst.c",
"1.0.1j/openssl-1.0.1j/crypto/mdc2/mdc2test.c",
"1.0.1j/openssl-1.0.1j/crypto/mem.c",
"1.0.1j/openssl-1.0.1j/crypto/mem_clr.c",
"1.0.1j/openssl-1.0.1j/crypto/mem_dbg.c",
"1.0.1j/openssl-1.0.1j/crypto/modes/cbc128.c",
"1.0.1j/openssl-1.0.1j/crypto/modes/ccm128.c",
"1.0.1j/openssl-1.0.1j/crypto/modes/cfb128.c",
"1.0.1j/openssl-1.0.1j/crypto/modes/ctr128.c",
"1.0.1j/openssl-1.0.1j/crypto/modes/cts128.c",
"1.0.1j/openssl-1.0.1j/crypto/modes/gcm128.c",
"1.0.1j/openssl-1.0.1j/crypto/modes/ofb128.c",
"1.0.1j/openssl-1.0.1j/crypto/modes/xts128.c",
"1.0.1j/openssl-1.0.1j/crypto/o_dir.c",
"1.0.1j/openssl-1.0.1j/crypto/o_fips.c",
"1.0.1j/openssl-1.0.1j/crypto/o_init.c",
"1.0.1j/openssl-1.0.1j/crypto/o_str.c",
"1.0.1j/openssl-1.0.1j/crypto/o_time.c",
"1.0.1j/openssl-1.0.1j/crypto/objects/o_names.c",
"1.0.1j/openssl-1.0.1j/crypto/objects/obj_dat.c",
"1.0.1j/openssl-1.0.1j/crypto/objects/obj_err.c",
"1.0.1j/openssl-1.0.1j/crypto/objects/obj_lib.c",
"1.0.1j/openssl-1.0.1j/crypto/objects/obj_xref.c",
"1.0.1j/openssl-1.0.1j/crypto/ocsp/ocsp_asn.c",
"1.0.1j/openssl-1.0.1j/crypto/ocsp/ocsp_cl.c",
"1.0.1j/openssl-1.0.1j/crypto/ocsp/ocsp_err.c",
"1.0.1j/openssl-1.0.1j/crypto/ocsp/ocsp_ext.c",
"1.0.1j/openssl-1.0.1j/crypto/ocsp/ocsp_ht.c",
"1.0.1j/openssl-1.0.1j/crypto/ocsp/ocsp_lib.c",
"1.0.1j/openssl-1.0.1j/crypto/ocsp/ocsp_prn.c",
"1.0.1j/openssl-1.0.1j/crypto/ocsp/ocsp_srv.c",
"1.0.1j/openssl-1.0.1j/crypto/ocsp/ocsp_vfy.c",
"1.0.1j/openssl-1.0.1j/crypto/pem/pem_all.c",
"1.0.1j/openssl-1.0.1j/crypto/pem/pem_err.c",
"1.0.1j/openssl-1.0.1j/crypto/pem/pem_info.c",
"1.0.1j/openssl-1.0.1j/crypto/pem/pem_lib.c",
"1.0.1j/openssl-1.0.1j/crypto/pem/pem_oth.c",
"1.0.1j/openssl-1.0.1j/crypto/pem/pem_pk8.c",
"1.0.1j/openssl-1.0.1j/crypto/pem/pem_pkey.c",
"1.0.1j/openssl-1.0.1j/crypto/pem/pem_seal.c",
"1.0.1j/openssl-1.0.1j/crypto/pem/pem_sign.c",
"1.0.1j/openssl-1.0.1j/crypto/pem/pem_x509.c",
"1.0.1j/openssl-1.0.1j/crypto/pem/pem_xaux.c",
"1.0.1j/openssl-1.0.1j/crypto/pem/pvkfmt.c",
"1.0.1j/openssl-1.0.1j/crypto/pkcs12/p12_add.c",
"1.0.1j/openssl-1.0.1j/crypto/pkcs12/p12_asn.c",
"1.0.1j/openssl-1.0.1j/crypto/pkcs12/p12_attr.c",
"1.0.1j/openssl-1.0.1j/crypto/pkcs12/p12_crpt.c",
"1.0.1j/openssl-1.0.1j/crypto/pkcs12/p12_crt.c",
"1.0.1j/openssl-1.0.1j/crypto/pkcs12/p12_decr.c",
"1.0.1j/openssl-1.0.1j/crypto/pkcs12/p12_init.c",
"1.0.1j/openssl-1.0.1j/crypto/pkcs12/p12_key.c",
"1.0.1j/openssl-1.0.1j/crypto/pkcs12/p12_kiss.c",
"1.0.1j/openssl-1.0.1j/crypto/pkcs12/p12_mutl.c",
"1.0.1j/openssl-1.0.1j/crypto/pkcs12/p12_npas.c",
"1.0.1j/openssl-1.0.1j/crypto/pkcs12/p12_p8d.c",
"1.0.1j/openssl-1.0.1j/crypto/pkcs12/p12_p8e.c",
"1.0.1j/openssl-1.0.1j/crypto/pkcs12/p12_utl.c",
"1.0.1j/openssl-1.0.1j/crypto/pkcs12/pk12err.c",
"1.0.1j/openssl-1.0.1j/crypto/pkcs7/bio_pk7.c",
"1.0.1j/openssl-1.0.1j/crypto/pkcs7/pk7_asn1.c",
"1.0.1j/openssl-1.0.1j/crypto/pkcs7/pk7_attr.c",
"1.0.1j/openssl-1.0.1j/crypto/pkcs7/pk7_doit.c",
"1.0.1j/openssl-1.0.1j/crypto/pkcs7/pk7_lib.c",
"1.0.1j/openssl-1.0.1j/crypto/pkcs7/pk7_mime.c",
"1.0.1j/openssl-1.0.1j/crypto/pkcs7/pk7_smime.c",
"1.0.1j/openssl-1.0.1j/crypto/pkcs7/pkcs7err.c",
"1.0.1j/openssl-1.0.1j/crypto/pqueue/pqueue.c",
"1.0.1j/openssl-1.0.1j/crypto/rand/md_rand.c",
"1.0.1j/openssl-1.0.1j/crypto/rand/rand_egd.c",
"1.0.1j/openssl-1.0.1j/crypto/rand/rand_err.c",
"1.0.1j/openssl-1.0.1j/crypto/rand/rand_lib.c",
"1.0.1j/openssl-1.0.1j/crypto/rand/rand_nw.c",
"1.0.1j/openssl-1.0.1j/crypto/rand/rand_os2.c",
"1.0.1j/openssl-1.0.1j/crypto/rand/rand_unix.c",
"1.0.1j/openssl-1.0.1j/crypto/rand/rand_win.c",
"1.0.1j/openssl-1.0.1j/crypto/rand/randfile.c",
"1.0.1j/openssl-1.0.1j/crypto/rand/randtest.c",
"1.0.1j/openssl-1.0.1j/crypto/rc2/rc2_cbc.c",
"1.0.1j/openssl-1.0.1j/crypto/rc2/rc2_ecb.c",
"1.0.1j/openssl-1.0.1j/crypto/rc2/rc2_skey.c",
"1.0.1j/openssl-1.0.1j/crypto/rc2/rc2cfb64.c",
"1.0.1j/openssl-1.0.1j/crypto/rc2/rc2ofb64.c",
"1.0.1j/openssl-1.0.1j/crypto/rc2/rc2test.c",
#"1.0.1j/openssl-1.0.1j/crypto/rc4/rc4_enc.c",
#"1.0.1j/openssl-1.0.1j/crypto/rc4/rc4_skey.c",
#"1.0.1j/openssl-1.0.1j/crypto/rc4/rc4_utl.c",
"1.0.1j/openssl-1.0.1j/crypto/rc4/rc4test.c",
"1.0.1j/openssl-1.0.1j/crypto/ripemd/rmd_dgst.c",
"1.0.1j/openssl-1.0.1j/crypto/ripemd/rmd_one.c",
"1.0.1j/openssl-1.0.1j/crypto/ripemd/rmdtest.c",
"1.0.1j/openssl-1.0.1j/crypto/rsa/rsa_ameth.c",
"1.0.1j/openssl-1.0.1j/crypto/rsa/rsa_asn1.c",
"1.0.1j/openssl-1.0.1j/crypto/rsa/rsa_chk.c",
"1.0.1j/openssl-1.0.1j/crypto/rsa/rsa_crpt.c",
"1.0.1j/openssl-1.0.1j/crypto/rsa/rsa_depr.c",
"1.0.1j/openssl-1.0.1j/crypto/rsa/rsa_eay.c",
"1.0.1j/openssl-1.0.1j/crypto/rsa/rsa_err.c",
"1.0.1j/openssl-1.0.1j/crypto/rsa/rsa_gen.c",
"1.0.1j/openssl-1.0.1j/crypto/rsa/rsa_lib.c",
"1.0.1j/openssl-1.0.1j/crypto/rsa/rsa_none.c",
"1.0.1j/openssl-1.0.1j/crypto/rsa/rsa_null.c",
"1.0.1j/openssl-1.0.1j/crypto/rsa/rsa_oaep.c",
"1.0.1j/openssl-1.0.1j/crypto/rsa/rsa_pk1.c",
"1.0.1j/openssl-1.0.1j/crypto/rsa/rsa_pmeth.c",
"1.0.1j/openssl-1.0.1j/crypto/rsa/rsa_prn.c",
"1.0.1j/openssl-1.0.1j/crypto/rsa/rsa_pss.c",
"1.0.1j/openssl-1.0.1j/crypto/rsa/rsa_saos.c",
"1.0.1j/openssl-1.0.1j/crypto/rsa/rsa_sign.c",
"1.0.1j/openssl-1.0.1j/crypto/rsa/rsa_ssl.c",
"1.0.1j/openssl-1.0.1j/crypto/rsa/rsa_test.c",
"1.0.1j/openssl-1.0.1j/crypto/rsa/rsa_x931.c",
"1.0.1j/openssl-1.0.1j/crypto/seed/seed.c",
"1.0.1j/openssl-1.0.1j/crypto/seed/seed_cbc.c",
"1.0.1j/openssl-1.0.1j/crypto/seed/seed_cfb.c",
"1.0.1j/openssl-1.0.1j/crypto/seed/seed_ecb.c",
"1.0.1j/openssl-1.0.1j/crypto/seed/seed_ofb.c",
"1.0.1j/openssl-1.0.1j/crypto/sha/sha1_one.c",
"1.0.1j/openssl-1.0.1j/crypto/sha/sha1dgst.c",
"1.0.1j/openssl-1.0.1j/crypto/sha/sha1test.c",
"1.0.1j/openssl-1.0.1j/crypto/sha/sha256.c",
"1.0.1j/openssl-1.0.1j/crypto/sha/sha256t.c",
"1.0.1j/openssl-1.0.1j/crypto/sha/sha512.c",
"1.0.1j/openssl-1.0.1j/crypto/sha/sha512t.c",
"1.0.1j/openssl-1.0.1j/crypto/sha/sha_dgst.c",
"1.0.1j/openssl-1.0.1j/crypto/sha/sha_one.c",
"1.0.1j/openssl-1.0.1j/crypto/sha/shatest.c",
"1.0.1j/openssl-1.0.1j/crypto/srp/srp_lib.c",
"1.0.1j/openssl-1.0.1j/crypto/srp/srp_vfy.c",
"1.0.1j/openssl-1.0.1j/crypto/srp/srptest.c",
"1.0.1j/openssl-1.0.1j/crypto/stack/stack.c",
"1.0.1j/openssl-1.0.1j/crypto/ts/ts_asn1.c",
"1.0.1j/openssl-1.0.1j/crypto/ts/ts_conf.c",
"1.0.1j/openssl-1.0.1j/crypto/ts/ts_err.c",
"1.0.1j/openssl-1.0.1j/crypto/ts/ts_lib.c",
"1.0.1j/openssl-1.0.1j/crypto/ts/ts_req_print.c",
"1.0.1j/openssl-1.0.1j/crypto/ts/ts_req_utils.c",
"1.0.1j/openssl-1.0.1j/crypto/ts/ts_rsp_print.c",
"1.0.1j/openssl-1.0.1j/crypto/ts/ts_rsp_sign.c",
"1.0.1j/openssl-1.0.1j/crypto/ts/ts_rsp_utils.c",
"1.0.1j/openssl-1.0.1j/crypto/ts/ts_rsp_verify.c",
"1.0.1j/openssl-1.0.1j/crypto/ts/ts_verify_ctx.c",
"1.0.1j/openssl-1.0.1j/crypto/txt_db/txt_db.c",
"1.0.1j/openssl-1.0.1j/crypto/ui/ui_compat.c",
"1.0.1j/openssl-1.0.1j/crypto/ui/ui_err.c",
"1.0.1j/openssl-1.0.1j/crypto/ui/ui_lib.c",
"1.0.1j/openssl-1.0.1j/crypto/ui/ui_openssl.c",
"1.0.1j/openssl-1.0.1j/crypto/ui/ui_util.c",
"1.0.1j/openssl-1.0.1j/crypto/uid.c",
"1.0.1j/openssl-1.0.1j/crypto/whrlpool/wp_block.c",
"1.0.1j/openssl-1.0.1j/crypto/whrlpool/wp_dgst.c",
"1.0.1j/openssl-1.0.1j/crypto/whrlpool/wp_test.c",
"1.0.1j/openssl-1.0.1j/crypto/x509/by_dir.c",
"1.0.1j/openssl-1.0.1j/crypto/x509/by_file.c",
"1.0.1j/openssl-1.0.1j/crypto/x509/x509_att.c",
"1.0.1j/openssl-1.0.1j/crypto/x509/x509_cmp.c",
"1.0.1j/openssl-1.0.1j/crypto/x509/x509_d2.c",
"1.0.1j/openssl-1.0.1j/crypto/x509/x509_def.c",
"1.0.1j/openssl-1.0.1j/crypto/x509/x509_err.c",
"1.0.1j/openssl-1.0.1j/crypto/x509/x509_ext.c",
"1.0.1j/openssl-1.0.1j/crypto/x509/x509_lu.c",
"1.0.1j/openssl-1.0.1j/crypto/x509/x509_obj.c",
"1.0.1j/openssl-1.0.1j/crypto/x509/x509_r2x.c",
"1.0.1j/openssl-1.0.1j/crypto/x509/x509_req.c",
"1.0.1j/openssl-1.0.1j/crypto/x509/x509_set.c",
"1.0.1j/openssl-1.0.1j/crypto/x509/x509_trs.c",
"1.0.1j/openssl-1.0.1j/crypto/x509/x509_txt.c",
"1.0.1j/openssl-1.0.1j/crypto/x509/x509_v3.c",
"1.0.1j/openssl-1.0.1j/crypto/x509/x509_vfy.c",
"1.0.1j/openssl-1.0.1j/crypto/x509/x509_vpm.c",
"1.0.1j/openssl-1.0.1j/crypto/x509/x509cset.c",
"1.0.1j/openssl-1.0.1j/crypto/x509/x509name.c",
"1.0.1j/openssl-1.0.1j/crypto/x509/x509rset.c",
"1.0.1j/openssl-1.0.1j/crypto/x509/x509spki.c",
"1.0.1j/openssl-1.0.1j/crypto/x509/x509type.c",
"1.0.1j/openssl-1.0.1j/crypto/x509/x_all.c",
"1.0.1j/openssl-1.0.1j/crypto/x509v3/pcy_cache.c",
"1.0.1j/openssl-1.0.1j/crypto/x509v3/pcy_data.c",
"1.0.1j/openssl-1.0.1j/crypto/x509v3/pcy_lib.c",
"1.0.1j/openssl-1.0.1j/crypto/x509v3/pcy_map.c",
"1.0.1j/openssl-1.0.1j/crypto/x509v3/pcy_node.c",
"1.0.1j/openssl-1.0.1j/crypto/x509v3/pcy_tree.c",
"1.0.1j/openssl-1.0.1j/crypto/x509v3/v3_addr.c",
"1.0.1j/openssl-1.0.1j/crypto/x509v3/v3_akey.c",
"1.0.1j/openssl-1.0.1j/crypto/x509v3/v3_akeya.c",
"1.0.1j/openssl-1.0.1j/crypto/x509v3/v3_alt.c",
"1.0.1j/openssl-1.0.1j/crypto/x509v3/v3_asid.c",
"1.0.1j/openssl-1.0.1j/crypto/x509v3/v3_bcons.c",
"1.0.1j/openssl-1.0.1j/crypto/x509v3/v3_bitst.c",
"1.0.1j/openssl-1.0.1j/crypto/x509v3/v3_conf.c",
"1.0.1j/openssl-1.0.1j/crypto/x509v3/v3_cpols.c",
"1.0.1j/openssl-1.0.1j/crypto/x509v3/v3_crld.c",
"1.0.1j/openssl-1.0.1j/crypto/x509v3/v3_enum.c",
"1.0.1j/openssl-1.0.1j/crypto/x509v3/v3_extku.c",
"1.0.1j/openssl-1.0.1j/crypto/x509v3/v3_genn.c",
"1.0.1j/openssl-1.0.1j/crypto/x509v3/v3_ia5.c",
"1.0.1j/openssl-1.0.1j/crypto/x509v3/v3_info.c",
"1.0.1j/openssl-1.0.1j/crypto/x509v3/v3_int.c",
"1.0.1j/openssl-1.0.1j/crypto/x509v3/v3_lib.c",
"1.0.1j/openssl-1.0.1j/crypto/x509v3/v3_ncons.c",
"1.0.1j/openssl-1.0.1j/crypto/x509v3/v3_ocsp.c",
"1.0.1j/openssl-1.0.1j/crypto/x509v3/v3_pci.c",
"1.0.1j/openssl-1.0.1j/crypto/x509v3/v3_pcia.c",
"1.0.1j/openssl-1.0.1j/crypto/x509v3/v3_pcons.c",
"1.0.1j/openssl-1.0.1j/crypto/x509v3/v3_pku.c",
"1.0.1j/openssl-1.0.1j/crypto/x509v3/v3_pmaps.c",
"1.0.1j/openssl-1.0.1j/crypto/x509v3/v3_prn.c",
"1.0.1j/openssl-1.0.1j/crypto/x509v3/v3_purp.c",
"1.0.1j/openssl-1.0.1j/crypto/x509v3/v3_skey.c",
"1.0.1j/openssl-1.0.1j/crypto/x509v3/v3_sxnet.c",
"1.0.1j/openssl-1.0.1j/crypto/x509v3/v3_utl.c",
"1.0.1j/openssl-1.0.1j/crypto/x509v3/v3err.c",
"1.0.1j/openssl-1.0.1j/engines/ccgost/e_gost_err.c",
"1.0.1j/openssl-1.0.1j/engines/ccgost/gost2001.c",
"1.0.1j/openssl-1.0.1j/engines/ccgost/gost2001_keyx.c",
"1.0.1j/openssl-1.0.1j/engines/ccgost/gost89.c",
"1.0.1j/openssl-1.0.1j/engines/ccgost/gost94_keyx.c",
"1.0.1j/openssl-1.0.1j/engines/ccgost/gost_ameth.c",
"1.0.1j/openssl-1.0.1j/engines/ccgost/gost_asn1.c",
"1.0.1j/openssl-1.0.1j/engines/ccgost/gost_crypt.c",
"1.0.1j/openssl-1.0.1j/engines/ccgost/gost_ctl.c",
"1.0.1j/openssl-1.0.1j/engines/ccgost/gost_eng.c",
"1.0.1j/openssl-1.0.1j/engines/ccgost/gost_keywrap.c",
"1.0.1j/openssl-1.0.1j/engines/ccgost/gost_md.c",
"1.0.1j/openssl-1.0.1j/engines/ccgost/gost_params.c",
"1.0.1j/openssl-1.0.1j/engines/ccgost/gost_pmeth.c",
"1.0.1j/openssl-1.0.1j/engines/ccgost/gost_sign.c",
"1.0.1j/openssl-1.0.1j/engines/ccgost/gosthash.c",
"1.0.1j/openssl-1.0.1j/engines/e_4758cca.c",
"1.0.1j/openssl-1.0.1j/engines/e_aep.c",
"1.0.1j/openssl-1.0.1j/engines/e_atalla.c",
"1.0.1j/openssl-1.0.1j/engines/e_capi.c",
"1.0.1j/openssl-1.0.1j/engines/e_chil.c",
"1.0.1j/openssl-1.0.1j/engines/e_cswift.c",
"1.0.1j/openssl-1.0.1j/engines/e_gmp.c",
"1.0.1j/openssl-1.0.1j/engines/e_nuron.c",
"1.0.1j/openssl-1.0.1j/engines/e_padlock.c",
"1.0.1j/openssl-1.0.1j/engines/e_sureware.c",
"1.0.1j/openssl-1.0.1j/engines/e_ubsec.c",
# these are from ssl/Makefile, not sure why these didn't
# show up in the Windows nt.mak file.
"1.0.1j/openssl-1.0.1j/ssl/*.c"
],
"sources!": [
# exclude various tests that provide an impl of main():
"1.0.1j/openssl-1.0.1j/crypto/*/*test.c",
"1.0.1j/openssl-1.0.1j/crypto/sha/sha256t.c",
"1.0.1j/openssl-1.0.1j/crypto/sha/sha512t.c",
"1.0.1j/openssl-1.0.1j/crypto/*test.c",
"1.0.1j/openssl-1.0.1j/ssl/*test.c",
"1.0.1j/openssl-1.0.1j/ssl/ssl_task*.c"
],
"direct_dependent_settings": {
"include_dirs": [
"1.0.1j/openssl-1.0.1j/include"
]
},
"include_dirs": [
"1.0.1j/openssl-1.0.1j/include",
"1.0.1j/openssl-1.0.1j/crypto", # e.g. cryptlib.h
"1.0.1j/openssl-1.0.1j/crypto/asn1", # e.g. asn1_locl.h
"1.0.1j/openssl-1.0.1j/crypto/evp", # e.g. evp_locl.h
"1.0.1j/openssl-1.0.1j/crypto/modes",
"1.0.1j/openssl-1.0.1j" # e.g. e_os.h
],
"defines": [
# #defines shared across platforms copied from ms\nt.mak
"OPENSSL_NO_RC4",
"OPENSSL_NO_RC5",
"OPENSSL_NO_MD2",
"OPENSSL_NO_SSL2",
"OPENSSL_NO_SSL3",
"OPENSSL_NO_KRB5",
"OPENSSL_NO_HW",
"OPENSSL_NO_JPAKE",
"OPENSSL_NO_DYNAMIC_ENGINE"
],
"conditions": [
["OS=='win'", {
"defines": [
# from ms\nt.mak
"OPENSSL_THREADS",
"DSO_WIN32",
"OPENSSL_SYSNAME_WIN32",
"WIN32_LEAN_AND_MEAN",
"L_ENDIAN",
"_CRT_SECURE_NO_DEPRECATE",
"NO_WINDOWS_BRAINDEATH" # for cversion.c
],
"link_settings" : {
"libraries" : [
# external libs (from nt.mak)
"-lws2_32.lib",
"-lgdi32.lib",
"-ladvapi32.lib",
"-lcrypt32.lib",
"-luser32.lib"
]
}
}],
["OS=='mac'", {
"defines": [
"OPENSSL_NO_EC_NISTP_64_GCC_128",
"OPENSSL_NO_GMP",
"OPENSSL_NO_JPAKE",
"OPENSSL_NO_MD2",
"OPENSSL_NO_RC5",
"OPENSSL_NO_RFC3779",
"OPENSSL_NO_SCTP",
"OPENSSL_NO_SSL2",
"OPENSSL_NO_SSL3",
"OPENSSL_NO_STORE",
"OPENSSL_NO_UNIT_TEST",
"NO_WINDOWS_BRAINDEATH"
]
}],
["OS=='iOS'", {
"defines": [
"OPENSSL_NO_EC_NISTP_64_GCC_128",
"OPENSSL_NO_GMP",
"OPENSSL_NO_JPAKE",
"OPENSSL_NO_MD2",
"OPENSSL_NO_RC5",
"OPENSSL_NO_RFC3779",
"OPENSSL_NO_SCTP",
"OPENSSL_NO_SSL2",
"OPENSSL_NO_SSL3",
"OPENSSL_NO_STORE",
"OPENSSL_NO_UNIT_TEST",
"NO_WINDOWS_BRAINDEATH"
]
}],
["OS=='linux'", {
"defines": [
# from Linux Makefile after ./configure
"DSO_DLFCN",
"HAVE_DLFCN_H",
"L_ENDIAN", # TODO: revisit!
"TERMIO",
# otherwise with clang 3.5 on Ubuntu it get errors around
# ROTATE() macro's inline asm. Error I had not got on
# Centos with clang 3.4.
# Note that this is only a problem with cflags -no-integrated-as
# which was necessary for clang 3.4. Messy. TODO: revisit
"OPENSSL_NO_INLINE_ASM",
"NO_WINDOWS_BRAINDEATH" # for cversion.c, otherwise error (where is buildinf.h?)
],
"link_settings" : {
"libraries" : [ "-ldl" ]
}
}]
]
},
{
"target_name": "ssltest",
"type": "executable",
"test": {
"cwd": "1.0.1j/openssl-1.0.1j/test"
},
"defines": [
# without these we get linker errors since the test assumes
# by default that SSL2 & 3 was built
"OPENSSL_NO_RC4",
"OPENSSL_NO_RC5",
"OPENSSL_NO_MD2",
"OPENSSL_NO_SSL2",
"OPENSSL_NO_SSL3",
"OPENSSL_NO_KRB5",
"OPENSSL_NO_HW",
"OPENSSL_NO_JPAKE",
"OPENSSL_NO_DYNAMIC_ENGINE"
],
"include_dirs": [
"1.0.1j/openssl-1.0.1j" # e.g. e_os.h
],
"sources": [
# note how the ssl test depends on many #defines set via
# ./configure. Do these need to be passed to the test build
# explicitly? Apparently not.
"1.0.1j/openssl-1.0.1j/ssl/ssltest.c"
],
"dependencies": [ "openssl" ],
# this disables building the example on iOS
"conditions": [
["OS=='iOS'",
{
"type": "none"
}
]
]
}
# compile one of the (interactive) openssl demo apps to verify correct
# compiler & linker settings in upstream gyp target:
# P.S.: I dont think this test can compile on Windows, so this is not
# suitable as a cross-platform test.
#{
# "target_name": "demos-easy_tls",
# "type": "executable",
# not suitable as a test, just building this to see if it links
#"test": {
# "cwd": "1.0.1j/openssl-1.0.1j/demos/easy_tls"
#},
# "include_dir": [ "1.0.1j/openssl-1.0.1j/demos/easy_tls" ],
# "sources": [
# "1.0.1j/openssl-1.0.1j/demos/easy_tls/test.c",
# "1.0.1j/openssl-1.0.1j/demos/easy_tls/easy-tls.c"
# ],
# "dependencies": [ "openssl" ]
#}
]
}
| 57.504182
| 104
| 0.506368
| 8,375
| 48,131
| 2.823522
| 0.07797
| 0.111811
| 0.223622
| 0.307946
| 0.861082
| 0.859855
| 0.85588
| 0.854612
| 0.851609
| 0.840825
| 0
| 0.140884
| 0.303484
| 48,131
| 836
| 105
| 57.572967
| 0.564491
| 0.048534
| 0
| 0.101673
| 0
| 0.785071
| 0.637511
| 0.61525
| 0
| 0
| 0
| 0.001196
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0.007722
| 0
| 0
| 0
| null | 0
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 12
|
3336f6b72554e5a50eef69d3f80865d290c3202d
| 23,637
|
py
|
Python
|
test/test_schema_validation.py
|
rob-earwaker/jsch
|
adb0efb531a1fd75a156e19a78f2be83f9326a17
|
[
"MIT"
] | null | null | null |
test/test_schema_validation.py
|
rob-earwaker/jsch
|
adb0efb531a1fd75a156e19a78f2be83f9326a17
|
[
"MIT"
] | null | null | null |
test/test_schema_validation.py
|
rob-earwaker/jsch
|
adb0efb531a1fd75a156e19a78f2be83f9326a17
|
[
"MIT"
] | null | null | null |
import unittest
import jsch
class SchemaValidationTestCase(unittest.TestCase):
def assertRaisesSchemaValidationError(self, message):
regex = '^{0}$'.format(message)
return self.assertRaisesRegex(jsch.SchemaValidationError, regex)
class TestAdditionalItemsValidation(SchemaValidationTestCase):
def test_passes_when_bool(self):
jsch.Schema(additional_items=True)
def test_passes_when_schema(self):
jsch.Schema(additional_items=jsch.Schema())
def test_fails_when_not_bool_or_schema(self):
message = "'additional_items' must be a bool or a schema"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(additional_items='False')
class TestAdditionalPropertiesValidation(SchemaValidationTestCase):
def test_passes_when_bool(self):
jsch.Schema(additional_properties=True)
def test_passes_when_schema(self):
jsch.Schema(additional_properties=jsch.Schema())
def test_fails_when_not_bool_or_schema(self):
message = "'additional_properties' must be a bool or a schema"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(additional_properties='False')
class TestAllOfValidation(SchemaValidationTestCase):
def test_passes_when_list(self):
jsch.Schema(all_of=[jsch.Schema(), jsch.Schema()])
def test_fails_when_not_list(self):
message = "'all_of' must be a list"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(all_of='[]')
def test_fails_when_list_empty(self):
message = "'all_of' list must not be empty"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(all_of=[])
def test_fails_when_list_item_not_schema(self):
message = "'all_of' list item must be a schema"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(all_of=[jsch.Schema(), '{}'])
class TestAnyOfValidation(SchemaValidationTestCase):
def test_passes_when_list(self):
jsch.Schema(any_of=[jsch.Schema(), jsch.Schema()])
def test_fails_when_not_list(self):
message = "'any_of' must be a list"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(any_of='[]')
def test_fails_when_list_empty(self):
message = "'any_of' list must not be empty"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(any_of=[])
def test_fails_when_list_item_not_schema(self):
message = "'any_of' list item must be a schema"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(any_of=[jsch.Schema(), '{}'])
class TestDefaultValidation(SchemaValidationTestCase):
def test_passes_when_list(self):
jsch.Schema(default=['a', {}, 8])
def test_passes_when_bool(self):
jsch.Schema(default=True)
def test_passes_when_int(self):
jsch.Schema(default=6)
def test_passes_when_float(self):
jsch.Schema(default=5.9)
def test_passes_when_dict(self):
jsch.Schema(default={'h': [7], 9: {'g': []}})
def test_passes_when_str(self):
jsch.Schema(default='name')
def test_fails_when_not_primitive_type(self):
message = "'default' must be a primitive type"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(default=('a', 'b'))
def test_fails_when_list_item_not_primitive_type(self):
message = "'default' must be a primitive type"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(default=[{'a', 'b'}])
def test_fails_when_dict_key_not_primitive_type(self):
message = "'default' must be a primitive type"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(default={8j: 'value'})
def test_fails_when_dict_value_not_primitive_type(self):
message = "'default' must be a primitive type"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(default={'name': b'\xff\xde'})
class TestDefinitionsValidation(SchemaValidationTestCase):
def test_passes_when_dict(self):
jsch.Schema(definitions={'name': jsch.Schema()})
def test_fails_when_not_dict(self):
message = "'definitions' must be a dict"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(definitions=True)
def test_fails_when_dict_key_not_str(self):
message = "'definitions' dict key must be a str"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(definitions={7: jsch.Schema()})
def test_fails_when_dict_value_not_schema(self):
message = "'definitions' dict value must be a schema"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(definitions={'name': '{}'})
class TestDependenciesValidation(SchemaValidationTestCase):
def test_passes_when_dict_with_schema_values(self):
jsch.Schema(dependencies={'name': jsch.Schema()})
def test_passes_when_dict_with_list_values(self):
jsch.Schema(dependencies={'name': ['age', 'height']})
def test_fails_when_not_dict(self):
message = "'dependencies' must be a dict"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(dependencies=['name'])
def test_fails_when_dict_key_not_str(self):
message = "'dependencies' dict key must be a str"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(dependencies={7: jsch.Schema()})
def test_fails_when_dict_value_not_schema_or_list(self):
message = "'dependencies' dict value must be a schema or a list"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(dependencies={'name': False})
def test_fails_when_dict_list_value_empty(self):
message = "'dependencies' dict value list must not be empty"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(dependencies={'name': []})
def test_fails_when_dict_list_value_item_not_str(self):
message = "'dependencies' dict value list item must be a str"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(dependencies={'name': [7]})
def test_fails_when_dict_list_value_item_str_not_unique(self):
message = "'dependencies' dict value list item str must be unique"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(dependencies={'name': ['a', 'b', 'a']})
class TestDescriptionValidation(SchemaValidationTestCase):
def test_passes_when_str(self):
jsch.Schema(description='Height in cm')
def test_fails_when_not_str(self):
message = "'description' must be a str"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(description=90)
class TestEnumValidation(SchemaValidationTestCase):
def test_passes_when_list(self):
jsch.Schema(enum=['name', True, None, 8, {}, ['a']])
def test_fails_when_not_list(self):
message = "'enum' must be a list"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(enum='[]')
def test_fails_when_list_empty(self):
message = "'enum' list must not be empty"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(enum=[])
def test_fails_when_list_item_not_primitive_type(self):
message = "'enum' list item must be a primitive type"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(enum=[('a', 'b')])
def test_fails_when_list_item_list_item_not_primitive_type(self):
message = "'enum' list item must be a primitive type"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(enum=[[{'a', 'b'}]])
def test_fails_when_list_item_dict_key_not_primitive_type(self):
message = "'enum' list item must be a primitive type"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(enum=[{8j: 'value'}])
def test_fails_when_list_item_dict_value_not_primitive_type(self):
message = "'enum' list item must be a primitive type"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(enum=[{'name': b'\xff\xde'}])
def test_fails_when_list_item_list_not_unique(self):
message = "'enum' list item must be unique"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(enum=[['a', 'b'], ['a', 'b'], ['b', 'c']])
def test_fails_when_list_item_bool_not_unique(self):
message = "'enum' list item must be unique"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(enum=[True, True, False])
def test_fails_when_list_item_int_not_unique(self):
message = "'enum' list item must be unique"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(enum=[5, 5, 67])
def test_fails_when_list_item_null_not_unique(self):
message = "'enum' list item must be unique"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(enum=[None, None])
def test_fails_when_list_item_float_not_unique(self):
message = "'enum' list item must be unique"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(enum=[4.8, 4.8, 1.9])
def test_fails_when_list_item_dict_not_unique(self):
message = "'enum' list item must be unique"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(enum=[{'a': 'b'}, {'a': 'b'}, {'b': 'c'}])
def test_fails_when_list_item_str_not_unique(self):
message = "'enum' list item must be unique"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(enum=['name', 'name', 'age'])
class TestExclusiveMaximumValidation(SchemaValidationTestCase):
def test_passes_when_bool(self):
jsch.Schema(maximum=1, exclusive_maximum=True)
def test_fails_when_not_bool(self):
message = "'exclusive_maximum' must be a bool"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(maximum=1, exclusive_maximum='True')
class TestExclusiveMinimumValidation(SchemaValidationTestCase):
def test_passes_when_bool(self):
jsch.Schema(minimum=1, exclusive_minimum=True)
def test_fails_when_not_bool(self):
message = "'exclusive_minimum' must be a bool"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(minimum=1, exclusive_minimum='True')
class TestIdValidation(SchemaValidationTestCase):
def test_passes_when_str(self):
jsch.Schema(id='#def')
def test_fails_when_not_str(self):
message = "'id' must be a str"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(id=90)
class TestItemsValidation(SchemaValidationTestCase):
def test_passes_when_schema(self):
jsch.Schema(items=jsch.Schema())
def test_passes_when_list(self):
jsch.Schema(items=[jsch.Schema(), jsch.Schema()])
def test_fails_when_not_schema_or_list(self):
message = "'items' must be a schema or a list"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(items=9.6)
def test_fails_when_list_item_not_schema(self):
message = "'items' list must contain only schemas"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(items=[jsch.Schema(), '{}'])
class TestMaximumValidation(SchemaValidationTestCase):
def test_passes_when_int(self):
jsch.Schema(maximum=5)
def test_passes_when_float(self):
jsch.Schema(maximum=7.6)
def test_fails_when_not_int_or_float(self):
message = "'maximum' must be an int or float"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(maximum='5')
def test_fails_when_not_present_with_exclusive_maximum_defined(self):
message = "'maximum' must be present if 'exclusive_maximum' is defined"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(exclusive_maximum=True)
class TestMaxItemsValidation(SchemaValidationTestCase):
def test_passes_when_int(self):
jsch.Schema(max_items=5)
def test_fails_when_not_int(self):
message = "'max_items' must be an int"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(max_items=0.5)
def test_fails_when_less_than_zero(self):
message = "'max_items' must be greater than or equal to zero"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(max_items=-1)
class TestMaxLengthValidation(SchemaValidationTestCase):
def test_passes_when_int(self):
jsch.Schema(max_length=5)
def test_fails_when_not_int(self):
message = "'max_length' must be an int"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(max_length=0.5)
def test_fails_when_less_than_zero(self):
message = "'max_length' must be greater than or equal to zero"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(max_length=-1)
class TestMaxPropertiesValidation(SchemaValidationTestCase):
def test_passes_when_int(self):
jsch.Schema(max_properties=5)
def test_fails_when_not_int(self):
message = "'max_properties' must be an int"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(max_properties=0.5)
def test_fails_when_less_than_zero(self):
message = "'max_properties' must be greater than or equal to zero"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(max_properties=-1)
class TestMinimumValidation(SchemaValidationTestCase):
def test_passes_when_int(self):
jsch.Schema(minimum=5)
def test_passes_when_float(self):
jsch.Schema(minimum=7.6)
def test_fails_when_not_int_or_float(self):
message = "'minimum' must be an int or float"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(minimum='5')
def test_fails_when_not_present_with_exclusive_minimum_defined(self):
message = "'minimum' must be present if 'exclusive_minimum' is defined"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(exclusive_minimum=True)
class TestMinItemsValidation(SchemaValidationTestCase):
def test_passes_when_int(self):
jsch.Schema(min_items=5)
def test_fails_when_not_int(self):
message = "'min_items' must be an int"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(min_items=0.5)
def test_fails_when_less_than_zero(self):
message = "'min_items' must be greater than or equal to zero"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(min_items=-1)
class TestMinLengthValidation(SchemaValidationTestCase):
def test_passes_when_int(self):
jsch.Schema(min_length=5)
def test_fails_when_not_int(self):
message = "'min_length' must be an int"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(min_length=0.5)
def test_fails_when_less_than_zero(self):
message = "'min_length' must be greater than or equal to zero"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(min_length=-1)
class TestMinPropertiesValidation(SchemaValidationTestCase):
def test_passes_when_int(self):
jsch.Schema(min_properties=5)
def test_fails_when_not_int(self):
message = "'min_properties' must be an int"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(min_properties=0.5)
def test_fails_when_less_than_zero(self):
message = "'min_properties' must be greater than or equal to zero"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(min_properties=-1)
class TestMultipleOfValidation(SchemaValidationTestCase):
def test_passes_when_int(self):
jsch.Schema(multiple_of=5)
def test_passes_when_float(self):
jsch.Schema(multiple_of=7.6)
def test_fails_when_not_int_or_float(self):
message = "'multiple_of' must be an int or float"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(multiple_of='2.3')
def test_fails_when_not_greater_then_zero(self):
message = "'multiple_of' must be greater than zero"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(multiple_of=0)
class TestNotValidation(SchemaValidationTestCase):
def test_passes_when_schema(self):
jsch.Schema(not_=jsch.Schema())
def test_fails_when_not_schema(self):
message = "'not_' must be a schema"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(not_='{}')
class TestOneOfValidation(SchemaValidationTestCase):
def test_passes_when_list(self):
jsch.Schema(one_of=[jsch.Schema(), jsch.Schema()])
def test_fails_when_not_list(self):
message = "'one_of' must be a list"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(one_of='[]')
def test_fails_when_list_empty(self):
message = "'one_of' list must not be empty"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(one_of=[])
def test_fails_when_list_item_not_schema(self):
message = "'one_of' list item must be a schema"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(one_of=[jsch.Schema(), '{}'])
class TestPatternValidation(SchemaValidationTestCase):
def test_passes_when_str(self):
jsch.Schema(pattern='^name$')
def test_fails_when_not_str(self):
message = "'pattern' must be a str"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(pattern=8)
class TestPatternPropertiesValidation(SchemaValidationTestCase):
def test_passes_when_dict(self):
jsch.Schema(pattern_properties={'^name$': jsch.Schema()})
def test_fails_when_not_dict(self):
message = "'pattern_properties' must be a dict"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(pattern_properties=[9])
def test_fails_when_dict_key_not_str(self):
message = "'pattern_properties' dict key must be a str"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(pattern_properties={8: jsch.Schema()})
def test_fails_when_dict_value_not_schema(self):
message = "'pattern_properties' dict value must be a schema"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(pattern_properties={'name': '{}'})
class TestPropertiesValidation(SchemaValidationTestCase):
def test_passes_when_dict(self):
jsch.Schema(properties={'name': jsch.Schema()})
def test_fails_when_not_dict(self):
message = "'properties' must be a dict"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(properties=[9])
def test_fails_when_dict_key_not_str(self):
message = "'properties' dict key must be a str"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(properties={8: jsch.Schema()})
def test_fails_when_dict_value_not_schema(self):
message = "'properties' dict value must be a schema"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(properties={'name': '{}'})
class TestRefValidation(SchemaValidationTestCase):
def test_passes_when_str(self):
jsch.Schema(ref='#/definitions/name')
def test_fails_when_not_str(self):
message = "'ref' must be a str"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(ref=90)
class TestRequiredValidation(SchemaValidationTestCase):
def test_passes_when_list(self):
jsch.Schema(required=['name', 'age'])
def test_fails_when_not_list(self):
message = "'required' must be a list"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(required='[]')
def test_fails_when_list_empty(self):
message = "'required' list must not be empty"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(required=[])
def test_fails_when_list_item_not_str(self):
message = "'required' list item must be a str"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(required=[8])
def test_fails_when_list_str_item_not_unique(self):
message = "'required' list item str must be unique"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(required=['a', 'b', 'c', 'a'])
class TestSchemaValidation(SchemaValidationTestCase):
def test_passes_when_str(self):
jsch.Schema().asdict(root=True, schema='http://org/sch#')
def test_fails_when_not_str(self):
message = "'schema' must be a str"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema().asdict(root=True, schema=76)
class TestTitleValidation(SchemaValidationTestCase):
def test_passes_when_str(self):
jsch.Schema(title='Height')
def test_fails_when_not_str(self):
message = "'title' must be a str"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(title=90)
class TestTypeValidation(SchemaValidationTestCase):
def test_passes_when_str(self):
jsch.Schema(type='number')
def test_passes_when_list(self):
jsch.Schema(type=['array', 'object', 'integer', 'null', 'string'])
def test_fails_when_not_str_or_list(self):
message = "'type' must be a str or a list"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(type=45)
def test_fails_when_str_not_primitive_type(self):
message = "'type' str must be a primitive type"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(type='float')
def test_fails_when_list_item_not_str(self):
message = "'type' list item must be a str"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(type=['string', 7])
def test_fails_when_list_item_str_not_primitive_type(self):
message = "'type' list item str must be a primitive type"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(type=['string', 'float'])
def test_fails_when_list_item_str_not_unique(self):
message = "'type' list item str must be unique"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(type=['string', 'null', 'null'])
class TestUniqueItemsValidation(SchemaValidationTestCase):
def test_passes_when_bool(self):
jsch.Schema(unique_items=False)
def test_fails_when_not_bool(self):
message = "'unique_items' must be a bool"
with self.assertRaisesSchemaValidationError(message):
jsch.Schema(unique_items='True')
if __name__ == '__main__':
unittest.main()
| 37.638535
| 79
| 0.697847
| 2,776
| 23,637
| 5.689842
| 0.055115
| 0.096233
| 0.062298
| 0.083064
| 0.879709
| 0.859006
| 0.824122
| 0.790503
| 0.732447
| 0.607154
| 0
| 0.004562
| 0.202521
| 23,637
| 627
| 80
| 37.698565
| 0.833369
| 0
| 0
| 0.429501
| 0
| 0
| 0.137242
| 0.000973
| 0
| 0
| 0
| 0
| 0.182213
| 1
| 0.279826
| false
| 0.099783
| 0.004338
| 0
| 0.360087
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 8
|
681e11237047f4322573e8b2999928b99fca4f59
| 59,732
|
py
|
Python
|
Processing/plotter.py
|
dr1315/AHINN
|
2ad6a466ce5c796a38ebc516ad108755f42f90e0
|
[
"MIT"
] | null | null | null |
Processing/plotter.py
|
dr1315/AHINN
|
2ad6a466ce5c796a38ebc516ad108755f42f90e0
|
[
"MIT"
] | null | null | null |
Processing/plotter.py
|
dr1315/AHINN
|
2ad6a466ce5c796a38ebc516ad108755f42f90e0
|
[
"MIT"
] | null | null | null |
"""
Contains the code to plot the outputs of the neural networks and
RGB images of a scene.
"""
import sys
import os
import click
import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid1 import make_axes_locatable
import cartopy.crs as ccrs
import cartopy.feature as feature
import numpy as np
from datetime import datetime as dt
import netCDF4 as nc
from matplotlib.colors import LinearSegmentedColormap
main_dir = os.sep.join(os.path.dirname(os.path.abspath(__file__)).split(os.sep)[:-1])
sys.path.append(main_dir)
from Processing.preprocessor import read_h8_folder, downsample_array
plt.rcParams.update({'font.size': 22})
def plot_nn_output(dataset, variable_name, dataset_datetime, apply_mask=False, mask_area='Australia'):
"""
Takes a neural network output as a 2d array and plots the
values in a standard format map over the AHI observable area
or over Australia.
:param dataset:
:param variable_name:
:param dataset_datetime:
:param apply_mask:
:return:
"""
if 'binary' in variable_name:
colors = [
(0., 0., 0.8),
(0.8, 0., 0.)
]
cmap = LinearSegmentedColormap.from_list('nn_rgb', colors, N=2)
else:
cmap = plt.get_cmap('bwr')
cmap.set_bad(color='k', alpha=1.)
# if variable_name == 'cloud_binary_mask':
# v_data = np.array(dataset['cloud_continuous_mask'])
# v_data[v_data == dataset[variable_name]._FillValue] = np.nan
# mask = v_data > 0.8
# v_data[mask] = 1.
# v_data[~mask] = 0.
# else:
# v_data = np.array(dataset[variable_name])
# v_data[v_data == dataset[variable_name]._FillValue] = np.nan
v_data = np.array(dataset[variable_name])
v_data[v_data == dataset[variable_name]._FillValue] = np.nan
if 'cloud' in variable_name and 'mask' not in variable_name:
cloud_mask = np.array(dataset['cloud_binary_mask']) == 1
v_data[~cloud_mask] = np.nan
if 'aerosol' in variable_name:
cloud_mask = np.array(dataset['cloud_binary_mask']) == 1
if 'mask' in variable_name:
v_data[cloud_mask] = np.nan
else:
aerosol_mask = np.array(dataset['aerosol_binary_mask']) == 1
v_data[cloud_mask & ~aerosol_mask] = np.nan
if apply_mask:
if mask_area == 'Australia':
fsize = (15, 10)
xmin, xmax = 2900 * 1000 - 5500000, 8250 * 1000 - 5500000
ymin, ymax = 5500000 - 9750 * 1000, 5500000 - 6500 * 1000
mask = np.full(v_data.shape, False)
min_y, max_y = int(6500 / 11000 * v_data.shape[0]), int(9750 / 11000 * v_data.shape[0])
min_x, max_x = int(2900 / 11000 * v_data.shape[0]), int(8250 / 11000 * v_data.shape[0])
mask[min_y:max_y, min_x:max_x] = True
new_shape = (int(max_y - min_y), int(max_x - min_x))
v_data = v_data[mask].reshape(new_shape)
elif mask_area == 'Cape York':
fsize = (10, 10)
xmin, xmax = 5000 * 1000 - 5500000, 6000 * 1000 - 5500000
ymin, ymax = 5500000 - 7500 * 1000, 5500000 - 6500 * 1000
mask = np.full(v_data.shape, False)
min_y, max_y = int(6500 / 11000 * v_data.shape[0]), int(7500 / 11000 * v_data.shape[0])
min_x, max_x = int(5000 / 11000 * v_data.shape[0]), int(6000 / 11000 * v_data.shape[0])
mask[min_y:max_y, min_x:max_x] = True
new_shape = (int(max_y - min_y), int(max_x - min_x))
v_data = v_data[mask].reshape(new_shape)
elif mask_area == 'SE Coast of Australia':
fsize = (10, 10)
xmin, xmax = 5750 * 1000 - 5500000, 6750 * 1000 - 5500000
ymin, ymax = 5500000 - 9750 * 1000, 5500000 - 8750 * 1000
mask = np.full(v_data.shape, False)
min_y, max_y = int(8750 / 11000 * v_data.shape[0]), int(9750 / 11000 * v_data.shape[0])
min_x, max_x = int(5750 / 11000 * v_data.shape[0]), int(6750 / 11000 * v_data.shape[0])
mask[min_y:max_y, min_x:max_x] = True
new_shape = (int(max_y - min_y), int(max_x - min_x))
v_data = v_data[mask].reshape(new_shape)
elif mask_area == 'East Coast of Australia':
fsize = (10, 10)
xmin, xmax = 6500 * 1000 - 5500000, 7500 * 1000 - 5500000
ymin, ymax = 5500000 - 8750 * 1000, 5500000 - 7750 * 1000
mask = np.full(v_data.shape, False)
min_y, max_y = int(7750 / 11000 * v_data.shape[0]), int(8750 / 11000 * v_data.shape[0])
min_x, max_x = int(6500 / 11000 * v_data.shape[0]), int(7500 / 11000 * v_data.shape[0])
mask[min_y:max_y, min_x:max_x] = True
new_shape = (int(max_y - min_y), int(max_x - min_x))
v_data = v_data[mask].reshape(new_shape)
elif mask_area == 'Central Australia':
fsize = (10, 10)
xmin, xmax = 4750 * 1000 - 5500000, 5750 * 1000 - 5500000
ymin, ymax = 5500000 - 8750 * 1000, 5500000 - 7750 * 1000
mask = np.full(v_data.shape, False)
min_y, max_y = int(7750 / 11000 * v_data.shape[0]), int(8750 / 11000 * v_data.shape[0])
min_x, max_x = int(4750 / 11000 * v_data.shape[0]), int(5750 / 11000 * v_data.shape[0])
mask[min_y:max_y, min_x:max_x] = True
new_shape = (int(max_y - min_y), int(max_x - min_x))
v_data = v_data[mask].reshape(new_shape)
elif mask_area == 'China':
fsize = (10, 10)
xmin, xmax = 750, 4750
ymin, ymax = 4000, 0
mask = np.full(v_data.shape, False)
min_y, max_y = int(ymax / 11000 * v_data.shape[0]), int(ymin / 11000 * v_data.shape[0])
min_x, max_x = int(xmin / 11000 * v_data.shape[0]), int(xmax / 11000 * v_data.shape[0])
xmin, xmax = xmin * 1000 - 5500000, xmax * 1000 - 5500000
ymin, ymax = 5500000 - ymin * 1000, 5500000 - ymax * 1000
mask[min_y:max_y, min_x:max_x] = True
new_shape = (int(max_y - min_y), int(max_x - min_x))
v_data = v_data[mask].reshape(new_shape)
else:
fsize = (15, 15)
xmin, xmax = -5500000, 5500000
ymin, ymax = -5500000, 5500000
fig = plt.figure(figsize=fsize)
ax = fig.add_subplot(1, 1, 1, projection=ccrs.Geostationary(140.735785863))
ax.add_feature(feature.COASTLINE, edgecolor='black')
im = ax.imshow(
v_data,
origin='upper',
transform=ccrs.Geostationary(140.735785863),
extent=(xmin, xmax, ymin, ymax),
cmap=cmap,
vmin=dataset[variable_name].valid_min,
vmax=dataset[variable_name].valid_max if dataset[variable_name].valid_max < 31 else 10
)
gl = ax.gridlines(
draw_labels=True,
color='black',
linestyle='--',
alpha=0.7
)
gl.top_labels = False
gl.right_labels = False
gl.xlabel_style = {'rotation': 0}
gl.ylabel_style = {'rotation': 0}
ax.set_title(
'NN ' + ' '.join([
a[0].upper() + a[1:]
if len(a) > 2
else a.upper()
if len(a) == 1
else a
for a
in variable_name.split('_')
]),
fontweight='bold',
loc='left',
fontsize=22
)
string_time = dataset_datetime.strftime('%d %B %Y %H:%M UTC')
ax.set_title(
string_time,
loc='right',
fontsize=22
)
ax.text(
0.5,
-0.05,
' ',
size=12,
ha='center',
transform=ax.transAxes
)
divider = make_axes_locatable(ax)
cbaxes = divider.append_axes("right", size="5%", pad=0.05, axes_class=plt.Axes)
vlabel = ' '.join([
a[0].upper() + a[1:]
if len(a) > 2
else a.upper()
if len(a) == 1
else a
for a
in variable_name.split('_')
])
if dataset[variable_name].units != 'None':
cbar_label = r'%s [%s]' % (vlabel, dataset[variable_name].units)
else:
cbar_label = None
cbar = plt.colorbar(
im,
cax=cbaxes,
orientation='vertical',
label=cbar_label
)
if 'binary' in variable_name and 'cloud' in variable_name:
cbar.set_ticks([0.25, 0.75])
cbar.set_ticklabels([
'\nNon-Cloud',
'\nCloud'
],
rotation=90,
va='center',
ha='center'
)
return fig
def plot_full_analysis(path_to_dataset, save_dir, aus_only=False):
"""
Takes a .nc file of NN outputs from the full analysis of
an AHI scene and plots them in standard format. Can be
applied only over Australia.
:param path_to_dataset:
:param save_dir:
:param aus_only:
:return:
"""
fname_stringtime = os.path.basename(path_to_dataset)
fname_stringtime = '_'.join(fname_stringtime.split('_')[-3:-1])
dst = nc.Dataset(path_to_dataset)
plottables = [
vname
for vname
in dst.variables.keys()
if vname not in ['longitudes', 'latitudes']
]
for plottable in plottables:
print(plottable)
fig_name = '_'.join([plottable, fname_stringtime])
if aus_only:
for region in ['Australia','Cape York','SE Coast of Australia','East Coast of Australia','Central Australia', 'China']:
fig = plot_nn_output(
dataset=dst,
variable_name=plottable,
dataset_datetime=dt.strptime(fname_stringtime, '%Y%m%d_%H%M'),
apply_mask=aus_only,
mask_area=region
)
region_fig_name = '_'.join([fig_name, f'{"-".join(region.split(" "))}_only'])
region_fig_name = region_fig_name + '.png'
plt.savefig(
os.path.join(save_dir, region_fig_name),
format='png',
bbox_inches='tight',
dpi=300
)
plt.clf()
else:
fig = plot_nn_output(
dataset=dst,
variable_name=plottable,
dataset_datetime=dt.strptime(fname_stringtime, '%Y%m%d_%H%M'),
apply_mask=aus_only
)
fig_name = fig_name + '.png'
plt.savefig(
os.path.join(save_dir, fig_name),
format='png',
bbox_inches='tight',
dpi=300
)
return None
def plot_single_channel(ahi_scn, band_number=3, apply_mask=False, mask_area='Australia'):
"""
Plots a single channel's data
:param ahi_scn:
:param band_number:
:param apply_mask:
:return:
"""
band_wavelengths = [
'0.455',
'0.510',
'0.645',
'0.860',
'1.61',
'2.26',
'3.85',
'6.25',
'6.95',
'7.35',
'8.60',
'9.63',
'10.45',
'11.2',
'12.35',
'13.3'
]
band_indicator = f"B{int(band_number):02d}"
band_values = np.array(ahi_scn[band_indicator])
if apply_mask:
if mask_area == 'Australia':
fsize = (15, 10)
xmin, xmax = 2900 * 1000 - 5500000, 8250 * 1000 - 5500000
ymin, ymax = 5500000 - 9750 * 1000, 5500000 - 6500 * 1000
mask = np.full(band_values.shape, False)
min_y, max_y = int(6500 / 11000 * band_values.shape[0]), int(9750 / 11000 * band_values.shape[0])
min_x, max_x = int(2900 / 11000 * band_values.shape[0]), int(8250 / 11000 * band_values.shape[0])
mask[min_y:max_y, min_x:max_x] = True
new_shape = (int(max_y - min_y), int(max_x - min_x))
band_values = band_values[mask].reshape(new_shape)
elif mask_area == 'Cape York':
fsize = (10, 10)
xmin, xmax = 5000 * 1000 - 5500000, 6000 * 1000 - 5500000
ymin, ymax = 5500000 - 7500 * 1000, 5500000 - 6500 * 1000
mask = np.full(band_values.shape, False)
min_y, max_y = int(6500 / 11000 * band_values.shape[0]), int(7500 / 11000 * band_values.shape[0])
min_x, max_x = int(5000 / 11000 * band_values.shape[0]), int(6000 / 11000 * band_values.shape[0])
mask[min_y:max_y, min_x:max_x] = True
new_shape = (int(max_y - min_y), int(max_x - min_x))
band_values = band_values[mask].reshape(new_shape)
elif mask_area == 'SE Coast of Australia':
fsize = (10, 10)
xmin, xmax = 5750 * 1000 - 5500000, 6750 * 1000 - 5500000
ymin, ymax = 5500000 - 9750 * 1000, 5500000 - 8750 * 1000
mask = np.full(band_values.shape, False)
min_y, max_y = int(8750 / 11000 * band_values.shape[0]), int(9750 / 11000 * band_values.shape[0])
min_x, max_x = int(5750 / 11000 * band_values.shape[0]), int(6750 / 11000 * band_values.shape[0])
mask[min_y:max_y, min_x:max_x] = True
new_shape = (int(max_y - min_y), int(max_x - min_x))
band_values = band_values[mask].reshape(new_shape)
elif mask_area == 'East Coast of Australia':
fsize = (10, 10)
xmin, xmax = 6500 * 1000 - 5500000, 7500 * 1000 - 5500000
ymin, ymax = 5500000 - 8750 * 1000, 5500000 - 7750 * 1000
mask = np.full(band_values.shape, False)
min_y, max_y = int(7750 / 11000 * band_values.shape[0]), int(8750 / 11000 * band_values.shape[0])
min_x, max_x = int(6500 / 11000 * band_values.shape[0]), int(7500 / 11000 * band_values.shape[0])
mask[min_y:max_y, min_x:max_x] = True
new_shape = (int(max_y - min_y), int(max_x - min_x))
band_values = band_values[mask].reshape(new_shape)
elif mask_area == 'Central Australia':
fsize = (10, 10)
xmin, xmax = 4750 * 1000 - 5500000, 5750 * 1000 - 5500000
ymin, ymax = 5500000 - 8750 * 1000, 5500000 - 7750 * 1000
mask = np.full(band_values.shape, False)
min_y, max_y = int(7750 / 11000 * band_values.shape[0]), int(8750 / 11000 * band_values.shape[0])
min_x, max_x = int(4750 / 11000 * band_values.shape[0]), int(5750 / 11000 * band_values.shape[0])
mask[min_y:max_y, min_x:max_x] = True
new_shape = (int(max_y - min_y), int(max_x - min_x))
band_values = band_values[mask].reshape(new_shape)
elif mask_area == 'China':
fsize = (10, 10)
xmin, xmax = 750, 4750
ymin, ymax = 4000, 0
mask = np.full(band_values.shape, False)
min_y, max_y = int(ymax / 11000 * band_values.shape[0]), int(ymin / 11000 * band_values.shape[0])
min_x, max_x = int(xmin / 11000 * band_values.shape[0]), int(xmax / 11000 * band_values.shape[0])
xmin, xmax = xmin * 1000 - 5500000, xmax * 1000 - 5500000
ymin, ymax = 5500000 - ymin * 1000, 5500000 - ymax * 1000
mask[min_y:max_y, min_x:max_x] = True
new_shape = (int(max_y - min_y), int(max_x - min_x))
if band_values.shape != new_shape:
band_values = band_values.reshape(new_shape)
else:
fsize = (15, 15)
xmin, xmax = -5500000, 5500000
ymin, ymax = -5500000, 5500000
fig = plt.figure(figsize=fsize)
ax = fig.add_subplot(1, 1, 1, projection=ccrs.Geostationary(140.735785863))
ax.add_feature(feature.COASTLINE, edgecolor='yellow')
low_perc = np.nanpercentile(band_values.flatten(), 5)
high_perc = np.nanpercentile(band_values.flatten(), 95)
im = ax.imshow(
band_values,
origin='upper',
transform=ccrs.Geostationary(140.735785863),
extent=(xmin, xmax, ymin, ymax),
cmap='magma',
vmin=low_perc,
vmax=high_perc
)
ax.set_title(
f'Band {str(int(band_number))}',
fontweight='bold',
loc='left',
fontsize=22
)
string_time = ahi_scn.start_time.strftime('%d %B %Y %H:%M UTC')
ax.set_title(
string_time,
loc='right',
fontsize=22
)
ax.text(
0.5,
-0.05,
'Band Central Wavelength: ' + str(band_wavelengths[int(int(band_number) - 1)]) + r'$\mu m$',
size=12,
ha='center',
transform=ax.transAxes
)
divider = make_axes_locatable(ax)
cbaxes = divider.append_axes("right", size="5%", pad=0.05, axes_class=plt.Axes)
plt.colorbar(
im,
cax=cbaxes,
extend='both',
orientation='vertical',
label=r'%s [%s]' % ('Reflectance' if int(band_number) < 7 else 'BT', '%' if int(band_number) < 7 else 'K')
)
return fig
def plot_channel_difference(ahi_scn, primary_band_number=14, secondary_band_number=15, apply_mask=False, mask_area='Australia'):
"""
Plots the difference between 2 channels:
primary_band - secondary_band
:param ahi_scn:
:param primary_band_number:
:param secondary_band_number:
:param apply_mask:
:return:
"""
band_wavelengths = [
'0.455',
'0.510',
'0.645',
'0.860',
'1.61',
'2.26',
'3.85',
'6.25',
'6.95',
'7.35',
'8.60',
'9.63',
'10.45',
'11.2',
'12.35',
'13.3'
]
primary_band_indicator = f"B{int(primary_band_number):02d}"
primary_band = np.array(ahi_scn[primary_band_indicator])
secondary_band_indicator = f"B{int(secondary_band_number):02d}"
secondary_band = np.array(ahi_scn[secondary_band_indicator])
if primary_band.shape != secondary_band.shape:
primary_to_secondary = primary_band.shape[0] / secondary_band.shape[0]
if primary_to_secondary < 1.:
secondary_band = downsample_array(secondary_band, int(1/primary_to_secondary))[0]
else:
primary_band = downsample_array(primary_band, int(primary_to_secondary))[0]
band_values = primary_band - secondary_band
if apply_mask:
if mask_area == 'Australia':
fsize = (15, 10)
xmin, xmax = 2900 * 1000 - 5500000, 8250 * 1000 - 5500000
ymin, ymax = 5500000 - 9750 * 1000, 5500000 - 6500 * 1000
mask = np.full(band_values.shape, False)
min_y, max_y = int(6500 / 11000 * band_values.shape[0]), int(9750 / 11000 * band_values.shape[0])
min_x, max_x = int(2900 / 11000 * band_values.shape[0]), int(8250 / 11000 * band_values.shape[0])
mask[min_y:max_y, min_x:max_x] = True
new_shape = (int(max_y - min_y), int(max_x - min_x))
band_values = band_values[mask].reshape(new_shape)
elif mask_area == 'Cape York':
fsize = (10, 10)
xmin, xmax = 5000 * 1000 - 5500000, 6000 * 1000 - 5500000
ymin, ymax = 5500000 - 7500 * 1000, 5500000 - 6500 * 1000
mask = np.full(band_values.shape, False)
min_y, max_y = int(6500 / 11000 * band_values.shape[0]), int(7500 / 11000 * band_values.shape[0])
min_x, max_x = int(5000 / 11000 * band_values.shape[0]), int(6000 / 11000 * band_values.shape[0])
mask[min_y:max_y, min_x:max_x] = True
new_shape = (int(max_y - min_y), int(max_x - min_x))
band_values = band_values[mask].reshape(new_shape)
elif mask_area == 'SE Coast of Australia':
fsize = (10, 10)
xmin, xmax = 5750 * 1000 - 5500000, 6750 * 1000 - 5500000
ymin, ymax = 5500000 - 9750 * 1000, 5500000 - 8750 * 1000
mask = np.full(band_values.shape, False)
min_y, max_y = int(8750 / 11000 * band_values.shape[0]), int(9750 / 11000 * band_values.shape[0])
min_x, max_x = int(5750 / 11000 * band_values.shape[0]), int(6750 / 11000 * band_values.shape[0])
mask[min_y:max_y, min_x:max_x] = True
new_shape = (int(max_y - min_y), int(max_x - min_x))
band_values = band_values[mask].reshape(new_shape)
elif mask_area == 'East Coast of Australia':
fsize = (10, 10)
xmin, xmax = 6500 * 1000 - 5500000, 7500 * 1000 - 5500000
ymin, ymax = 5500000 - 8750 * 1000, 5500000 - 7750 * 1000
mask = np.full(band_values.shape, False)
min_y, max_y = int(7750 / 11000 * band_values.shape[0]), int(8750 / 11000 * band_values.shape[0])
min_x, max_x = int(6500 / 11000 * band_values.shape[0]), int(7500 / 11000 * band_values.shape[0])
mask[min_y:max_y, min_x:max_x] = True
new_shape = (int(max_y - min_y), int(max_x - min_x))
band_values = band_values[mask].reshape(new_shape)
elif mask_area == 'Central Australia':
fsize = (10, 10)
xmin, xmax = 4750 * 1000 - 5500000, 5750 * 1000 - 5500000
ymin, ymax = 5500000 - 8750 * 1000, 5500000 - 7750 * 1000
mask = np.full(band_values.shape, False)
min_y, max_y = int(7750 / 11000 * band_values.shape[0]), int(8750 / 11000 * band_values.shape[0])
min_x, max_x = int(4750 / 11000 * band_values.shape[0]), int(5750 / 11000 * band_values.shape[0])
mask[min_y:max_y, min_x:max_x] = True
new_shape = (int(max_y - min_y), int(max_x - min_x))
band_values = band_values[mask].reshape(new_shape)
elif mask_area == 'China':
fsize = (10, 10)
xmin, xmax = 750, 4750
ymin, ymax = 4000, 0
mask = np.full(band_values.shape, False)
min_y, max_y = int(ymax / 11000 * band_values.shape[0]), int(ymin / 11000 * band_values.shape[0])
min_x, max_x = int(xmin / 11000 * band_values.shape[0]), int(xmax / 11000 * band_values.shape[0])
xmin, xmax = xmin * 1000 - 5500000, xmax * 1000 - 5500000
ymin, ymax = 5500000 - ymin * 1000, 5500000 - ymax * 1000
mask[min_y:max_y, min_x:max_x] = True
new_shape = (int(max_y - min_y), int(max_x - min_x))
if band_values.shape != new_shape:
band_values = band_values.reshape(new_shape)
else:
fsize = (15, 15)
xmin, xmax = -5500000, 5500000
ymin, ymax = -5500000, 5500000
fig = plt.figure(figsize=fsize)
ax = fig.add_subplot(1, 1, 1, projection=ccrs.Geostationary(140.735785863))
ax.add_feature(feature.COASTLINE, edgecolor='yellow')
mod_max = max([abs(np.nanmin(band_values)), abs(np.nanmax(band_values))])
im = ax.imshow(
band_values,
origin='upper',
transform=ccrs.Geostationary(140.735785863),
extent=(xmin, xmax, ymin, ymax),
cmap='bwr',
vmin=-mod_max,
vmax=mod_max
)
ax.set_title(
f'Band Difference: {str(int(primary_band_number))} - {str(int(secondary_band_number))}',
fontweight='bold',
loc='left',
fontsize=22
)
string_time = ahi_scn.start_time.strftime('%d %B %Y %H:%M UTC')
ax.set_title(
string_time,
loc='right',
fontsize=22
)
ax.text(
0.5,
-0.05,
'Band Central Wavelengths: ' + \
str(band_wavelengths[int(int(primary_band_number) - 1)]) + r'$\mu m$' + \
' - ' + str(band_wavelengths[int(int(secondary_band_number) - 1)]) + r'$\mu m$',
size=12,
ha='center',
transform=ax.transAxes
)
divider = make_axes_locatable(ax)
cbaxes = divider.append_axes("right", size="5%", pad=0.05, axes_class=plt.Axes)
plt.colorbar(
im,
cax=cbaxes,
orientation='vertical',
label=r'%s [%s]' % ('Difference in Reflectance' if int(primary_band_number) < 7 else 'Difference in BT', '%' if int(primary_band_number) < 7 else 'K')
)
return fig
def true_colour_rgb(ahi_scn, apply_mask=False, mask_area='Australia'):
gamma = 2.
bands = {
'r': downsample_array(np.array(ahi_scn['B03']), 4)[0],
'g': downsample_array(np.array(ahi_scn['B02']), 2)[0],
'b': downsample_array(np.array(ahi_scn['B01']), 2)[0],
}
if apply_mask:
band_values = bands['r']
if mask_area == 'Australia':
fsize = (15, 10)
xmin, xmax = 2900 * 1000 - 5500000, 8250 * 1000 - 5500000
ymin, ymax = 5500000 - 9750 * 1000, 5500000 - 6500 * 1000
mask = np.full(band_values.shape, False)
min_y, max_y = int(6500 / 11000 * band_values.shape[0]), int(9750 / 11000 * band_values.shape[0])
min_x, max_x = int(2900 / 11000 * band_values.shape[0]), int(8250 / 11000 * band_values.shape[0])
mask[min_y:max_y, min_x:max_x] = True
new_shape = (int(max_y - min_y), int(max_x - min_x))
elif mask_area == 'Cape York':
fsize = (10, 10)
xmin, xmax = 5000 * 1000 - 5500000, 6000 * 1000 - 5500000
ymin, ymax = 5500000 - 7500 * 1000, 5500000 - 6500 * 1000
mask = np.full(band_values.shape, False)
min_y, max_y = int(6500 / 11000 * band_values.shape[0]), int(7500 / 11000 * band_values.shape[0])
min_x, max_x = int(5000 / 11000 * band_values.shape[0]), int(6000 / 11000 * band_values.shape[0])
mask[min_y:max_y, min_x:max_x] = True
new_shape = (int(max_y - min_y), int(max_x - min_x))
elif mask_area == 'SE Coast of Australia':
fsize = (10, 10)
xmin, xmax = 5750 * 1000 - 5500000, 6750 * 1000 - 5500000
ymin, ymax = 5500000 - 9750 * 1000, 5500000 - 8750 * 1000
mask = np.full(band_values.shape, False)
min_y, max_y = int(8750 / 11000 * band_values.shape[0]), int(9750 / 11000 * band_values.shape[0])
min_x, max_x = int(5750 / 11000 * band_values.shape[0]), int(6750 / 11000 * band_values.shape[0])
mask[min_y:max_y, min_x:max_x] = True
new_shape = (int(max_y - min_y), int(max_x - min_x))
elif mask_area == 'East Coast of Australia':
fsize = (10, 10)
xmin, xmax = 6500 * 1000 - 5500000, 7500 * 1000 - 5500000
ymin, ymax = 5500000 - 8750 * 1000, 5500000 - 7750 * 1000
mask = np.full(band_values.shape, False)
min_y, max_y = int(7750 / 11000 * band_values.shape[0]), int(8750 / 11000 * band_values.shape[0])
min_x, max_x = int(6500 / 11000 * band_values.shape[0]), int(7500 / 11000 * band_values.shape[0])
mask[min_y:max_y, min_x:max_x] = True
new_shape = (int(max_y - min_y), int(max_x - min_x))
elif mask_area == 'Central Australia':
fsize = (10, 10)
xmin, xmax = 4750 * 1000 - 5500000, 5750 * 1000 - 5500000
ymin, ymax = 5500000 - 8750 * 1000, 5500000 - 7750 * 1000
mask = np.full(band_values.shape, False)
min_y, max_y = int(7750 / 11000 * band_values.shape[0]), int(8750 / 11000 * band_values.shape[0])
min_x, max_x = int(4750 / 11000 * band_values.shape[0]), int(5750 / 11000 * band_values.shape[0])
mask[min_y:max_y, min_x:max_x] = True
new_shape = (int(max_y - min_y), int(max_x - min_x))
elif mask_area == 'China':
fsize = (10, 10)
xmin, xmax = 750, 4750
ymin, ymax = 4000, 0
mask = np.full(band_values.shape, False)
min_y, max_y = int(ymax / 11000 * band_values.shape[0]), int(ymin / 11000 * band_values.shape[0])
min_x, max_x = int(xmin / 11000 * band_values.shape[0]), int(xmax / 11000 * band_values.shape[0])
xmin, xmax = xmin * 1000 - 5500000, xmax * 1000 - 5500000
ymin, ymax = 5500000 - ymin * 1000, 5500000 - ymax * 1000
mask[min_y:max_y, min_x:max_x] = True
new_shape = (int(max_y - min_y), int(max_x - min_x))
for band, band_values in bands.items():
bands[band] = band_values[mask].reshape(new_shape)
for band, band_values in bands.items():
band_values[band_values > 100.] = 100.
band_values[band_values < 0.] = 0.
band_values = band_values / 100.
band_values = band_values ** (1 / gamma)
bands[band] = band_values
rgb_array = np.dstack((
bands['r'],
bands['g'],
bands['b']
))
return rgb_array
def natural_colour_rgb(ahi_scn, apply_mask=False, mask_area='Australia'):
gamma = 2.
bands = {
'r': np.array(ahi_scn['B05']),
'g': downsample_array(np.array(ahi_scn['B04']), 2)[0],
'b': downsample_array(np.array(ahi_scn['B03']), 4)[0],
}
if apply_mask:
band_values = bands['r']
if mask_area == 'Australia':
fsize = (15, 10)
xmin, xmax = 2900 * 1000 - 5500000, 8250 * 1000 - 5500000
ymin, ymax = 5500000 - 9750 * 1000, 5500000 - 6500 * 1000
mask = np.full(band_values.shape, False)
min_y, max_y = int(6500 / 11000 * band_values.shape[0]), int(9750 / 11000 * band_values.shape[0])
min_x, max_x = int(2900 / 11000 * band_values.shape[0]), int(8250 / 11000 * band_values.shape[0])
mask[min_y:max_y, min_x:max_x] = True
new_shape = (int(max_y - min_y), int(max_x - min_x))
elif mask_area == 'Cape York':
fsize = (10, 10)
xmin, xmax = 5000 * 1000 - 5500000, 6000 * 1000 - 5500000
ymin, ymax = 5500000 - 7500 * 1000, 5500000 - 6500 * 1000
mask = np.full(band_values.shape, False)
min_y, max_y = int(6500 / 11000 * band_values.shape[0]), int(7500 / 11000 * band_values.shape[0])
min_x, max_x = int(5000 / 11000 * band_values.shape[0]), int(6000 / 11000 * band_values.shape[0])
mask[min_y:max_y, min_x:max_x] = True
new_shape = (int(max_y - min_y), int(max_x - min_x))
elif mask_area == 'SE Coast of Australia':
fsize = (10, 10)
xmin, xmax = 5750 * 1000 - 5500000, 6750 * 1000 - 5500000
ymin, ymax = 5500000 - 9750 * 1000, 5500000 - 8750 * 1000
mask = np.full(band_values.shape, False)
min_y, max_y = int(8750 / 11000 * band_values.shape[0]), int(9750 / 11000 * band_values.shape[0])
min_x, max_x = int(5750 / 11000 * band_values.shape[0]), int(6750 / 11000 * band_values.shape[0])
mask[min_y:max_y, min_x:max_x] = True
new_shape = (int(max_y - min_y), int(max_x - min_x))
elif mask_area == 'East Coast of Australia':
fsize = (10, 10)
xmin, xmax = 6500 * 1000 - 5500000, 7500 * 1000 - 5500000
ymin, ymax = 5500000 - 8750 * 1000, 5500000 - 7750 * 1000
mask = np.full(band_values.shape, False)
min_y, max_y = int(7750 / 11000 * band_values.shape[0]), int(8750 / 11000 * band_values.shape[0])
min_x, max_x = int(6500 / 11000 * band_values.shape[0]), int(7500 / 11000 * band_values.shape[0])
mask[min_y:max_y, min_x:max_x] = True
new_shape = (int(max_y - min_y), int(max_x - min_x))
elif mask_area == 'Central Australia':
fsize = (10, 10)
xmin, xmax = 4750 * 1000 - 5500000, 5750 * 1000 - 5500000
ymin, ymax = 5500000 - 8750 * 1000, 5500000 - 7750 * 1000
mask = np.full(band_values.shape, False)
min_y, max_y = int(7750 / 11000 * band_values.shape[0]), int(8750 / 11000 * band_values.shape[0])
min_x, max_x = int(4750 / 11000 * band_values.shape[0]), int(5750 / 11000 * band_values.shape[0])
mask[min_y:max_y, min_x:max_x] = True
new_shape = (int(max_y - min_y), int(max_x - min_x))
elif mask_area == 'China':
fsize = (10, 10)
xmin, xmax = 750, 4750
ymin, ymax = 4000, 0
mask = np.full(band_values.shape, False)
min_y, max_y = int(ymax / 11000 * band_values.shape[0]), int(ymin / 11000 * band_values.shape[0])
min_x, max_x = int(xmin / 11000 * band_values.shape[0]), int(xmax / 11000 * band_values.shape[0])
xmin, xmax = xmin * 1000 - 5500000, xmax * 1000 - 5500000
ymin, ymax = 5500000 - ymin * 1000, 5500000 - ymax * 1000
mask[min_y:max_y, min_x:max_x] = True
new_shape = (int(max_y - min_y), int(max_x - min_x))
for band, band_values in bands.items():
bands[band] = band_values[mask].reshape(new_shape)
for band, band_values in bands.items():
band_values[band_values > 100.] = 100.
band_values[band_values < 0.] = 0.
band_values = band_values / 100.
band_values = band_values ** (1 / gamma)
bands[band] = band_values
rgb_array = np.dstack((
bands['r'],
bands['g'],
bands['b']
))
return rgb_array
def eumetsat_dust_rgb(ahi_scn, apply_mask=False, mask_area='Australia'):
bands = {
'r': np.array(ahi_scn['B15']),
'g': np.array(ahi_scn['B13']),
'b': np.array(ahi_scn['B11'])
}
if apply_mask:
band_values = bands['r']
if mask_area == 'Australia':
fsize = (15, 10)
xmin, xmax = 2900 * 1000 - 5500000, 8250 * 1000 - 5500000
ymin, ymax = 5500000 - 9750 * 1000, 5500000 - 6500 * 1000
mask = np.full(band_values.shape, False)
min_y, max_y = int(6500 / 11000 * band_values.shape[0]), int(9750 / 11000 * band_values.shape[0])
min_x, max_x = int(2900 / 11000 * band_values.shape[0]), int(8250 / 11000 * band_values.shape[0])
mask[min_y:max_y, min_x:max_x] = True
new_shape = (int(max_y - min_y), int(max_x - min_x))
elif mask_area == 'Cape York':
fsize = (10, 10)
xmin, xmax = 5000 * 1000 - 5500000, 6000 * 1000 - 5500000
ymin, ymax = 5500000 - 7500 * 1000, 5500000 - 6500 * 1000
mask = np.full(band_values.shape, False)
min_y, max_y = int(6500 / 11000 * band_values.shape[0]), int(7500 / 11000 * band_values.shape[0])
min_x, max_x = int(5000 / 11000 * band_values.shape[0]), int(6000 / 11000 * band_values.shape[0])
mask[min_y:max_y, min_x:max_x] = True
new_shape = (int(max_y - min_y), int(max_x - min_x))
elif mask_area == 'SE Coast of Australia':
fsize = (10, 10)
xmin, xmax = 5750 * 1000 - 5500000, 6750 * 1000 - 5500000
ymin, ymax = 5500000 - 9750 * 1000, 5500000 - 8750 * 1000
mask = np.full(band_values.shape, False)
min_y, max_y = int(8750 / 11000 * band_values.shape[0]), int(9750 / 11000 * band_values.shape[0])
min_x, max_x = int(5750 / 11000 * band_values.shape[0]), int(6750 / 11000 * band_values.shape[0])
mask[min_y:max_y, min_x:max_x] = True
new_shape = (int(max_y - min_y), int(max_x - min_x))
elif mask_area == 'East Coast of Australia':
fsize = (10, 10)
xmin, xmax = 6500 * 1000 - 5500000, 7500 * 1000 - 5500000
ymin, ymax = 5500000 - 8750 * 1000, 5500000 - 7750 * 1000
mask = np.full(band_values.shape, False)
min_y, max_y = int(7750 / 11000 * band_values.shape[0]), int(8750 / 11000 * band_values.shape[0])
min_x, max_x = int(6500 / 11000 * band_values.shape[0]), int(7500 / 11000 * band_values.shape[0])
mask[min_y:max_y, min_x:max_x] = True
new_shape = (int(max_y - min_y), int(max_x - min_x))
elif mask_area == 'Central Australia':
fsize = (10, 10)
xmin, xmax = 4750 * 1000 - 5500000, 5750 * 1000 - 5500000
ymin, ymax = 5500000 - 8750 * 1000, 5500000 - 7750 * 1000
mask = np.full(band_values.shape, False)
min_y, max_y = int(7750 / 11000 * band_values.shape[0]), int(8750 / 11000 * band_values.shape[0])
min_x, max_x = int(4750 / 11000 * band_values.shape[0]), int(5750 / 11000 * band_values.shape[0])
mask[min_y:max_y, min_x:max_x] = True
new_shape = (int(max_y - min_y), int(max_x - min_x))
elif mask_area == 'China':
fsize = (10, 10)
xmin, xmax = 750, 4750
ymin, ymax = 4000, 0
mask = np.full(band_values.shape, False)
min_y, max_y = int(ymax / 11000 * band_values.shape[0]), int(ymin / 11000 * band_values.shape[0])
min_x, max_x = int(xmin / 11000 * band_values.shape[0]), int(xmax / 11000 * band_values.shape[0])
xmin, xmax = xmin * 1000 - 5500000, xmax * 1000 - 5500000
ymin, ymax = 5500000 - ymin * 1000, 5500000 - ymax * 1000
mask[min_y:max_y, min_x:max_x] = True
new_shape = (int(max_y - min_y), int(max_x - min_x))
for band, band_values in bands.items():
bands[band] = band_values[mask].reshape(new_shape)
# Make r = limited B15 - B13 #
pseudo_r = bands['r'] - bands['g']
pseudo_r[pseudo_r > 2.] = 2.
pseudo_r[pseudo_r < -4.] = -4.
pseudo_r = (pseudo_r + 4.) / 6.
# Make g = limited B13 - B11 #
pseudo_g = bands['g'] - bands['b']
pseudo_g[pseudo_g > 15.] = 15.
pseudo_g[pseudo_g < 0.] = 0.
pseudo_g = pseudo_g / 15.
pseudo_g = pseudo_g ** (1 / 2.5)
# Make b = limited B11 ###
pseudo_b = bands['b']
pseudo_b[pseudo_b > 289.] = 289.
pseudo_b[pseudo_b < 261.] = 261.
pseudo_b = (pseudo_b - 261.) / (289. - 261.)
# Correct rgb arrays in dict #
bands['r'] = pseudo_r
bands['g'] = pseudo_g
bands['b'] = pseudo_b
rgb_array = np.dstack((
bands['r'],
bands['g'],
bands['b']
))
return rgb_array
def plot_rgb(ahi_scn, rgb_name='true_colour', apply_mask=False, mask_area='Australia'):
available_rgbs = { # 'RGB Name': ['Red', 'Green', 'Blue']
'true_colour': [
'R: ' + r'$0.64 \mu m$',
'G: ' + r'$0.51 \mu m$',
'B: ' + r'$0.47 \mu m$'
],
'EUMetSat_dust': [
'R: ' + r'$12.4 \mu m$' + ' - ' + r'$10.4 \mu m$',
'G: ' + r'$10.4 \mu m$' + ' - ' + r'$8.6 \mu m$',
'B: ' + r'$10.4 \mu m$'
],
'natural_colour': [
'R: ' + r'$1.6 \mu m$',
'G: ' + r'$0.86 \mu m$',
'B: ' + r'$0.64 \mu m$'
]
}
rgb_array = None
if rgb_name not in available_rgbs.keys():
raise Exception(
f'Given rgb_name {rgb_name} is not available. \n' +
f'Available RGBs are: \n' +
'\n'.join([
'\t' + key + ': ' + str(item)
for key, item
in available_rgbs.items()
])
)
elif rgb_name == 'true_colour':
rgb_array = true_colour_rgb(
ahi_scn=ahi_scn,
apply_mask=apply_mask,
mask_area=mask_area
)
elif rgb_name == 'EUMetSat_dust':
rgb_array = eumetsat_dust_rgb(
ahi_scn=ahi_scn,
apply_mask=apply_mask,
mask_area=mask_area
)
elif rgb_name == 'natural_colour':
rgb_array = natural_colour_rgb(
ahi_scn=ahi_scn,
apply_mask=apply_mask,
mask_area=mask_area
)
if apply_mask:
if mask_area == 'Australia':
fsize = (15, 10)
xmin, xmax = 2900 * 1000 - 5500000, 8250 * 1000 - 5500000
ymin, ymax = 5500000 - 9750 * 1000, 5500000 - 6500 * 1000
elif mask_area == 'Cape York':
fsize = (10, 10)
xmin, xmax = 5000 * 1000 - 5500000, 6000 * 1000 - 5500000
ymin, ymax = 5500000 - 7500 * 1000, 5500000 - 6500 * 1000
elif mask_area == 'SE Coast of Australia':
fsize = (10, 10)
xmin, xmax = 5750 * 1000 - 5500000, 6750 * 1000 - 5500000
ymin, ymax = 5500000 - 9750 * 1000, 5500000 - 8750 * 1000
elif mask_area == 'East Coast of Australia':
fsize = (10, 10)
xmin, xmax = 6500 * 1000 - 5500000, 7500 * 1000 - 5500000
ymin, ymax = 5500000 - 8750 * 1000, 5500000 - 7750 * 1000
elif mask_area == 'Central Australia':
fsize = (10, 10)
xmin, xmax = 4750 * 1000 - 5500000, 5750 * 1000 - 5500000
ymin, ymax = 5500000 - 8750 * 1000, 5500000 - 7750 * 1000
elif mask_area == 'China':
fsize = (10, 10)
xmin, xmax = 750 * 1000 - 5500000, 4750 * 1000 - 5500000
ymin, ymax = 5500000 - 4000 * 1000, 5500000 - 0 * 1000
else:
fsize = (15, 15)
xmin, xmax = -5500000, 5500000
ymin, ymax = -5500000, 5500000
fig = plt.figure(figsize=fsize)
ax = fig.add_subplot(1, 1, 1, projection=ccrs.Geostationary(140.735785863))
ax.add_feature(feature.COASTLINE, edgecolor='black')
im = ax.imshow(
rgb_array,
origin='upper',
transform=ccrs.Geostationary(140.735785863),
extent=(xmin, xmax, ymin, ymax)
)
gl = ax.gridlines(
draw_labels=True,
color='black',
linestyle='--',
alpha=0.7
)
gl.top_labels = False
gl.right_labels = False
gl.xlabel_style = {'rotation': 0}
gl.ylabel_style = {'rotation': 0}
ax.set_title(
' '.join([
a[0].upper() + a[1:]
if len(a) > 2
else a.upper()
if len(a) == 1
else a
for a
in rgb_name.split('_')
]) + ' RGB',
fontweight='bold',
loc='left',
fontsize=22
)
string_time = ahi_scn.start_time.strftime('%d %B %Y %H:%M UTC')
ax.set_title(
string_time,
loc='right',
fontsize=22
)
ax.text(
0.5,
-0.05,
' | '.join(available_rgbs[rgb_name]),
fontsize=22,
ha='center',
transform=ax.transAxes
)
divider = make_axes_locatable(ax)
cbaxes = divider.append_axes("right", size="5%", pad=0.05, axes_class=plt.Axes)
cbaxes.axis('off')
return fig
def plot_smoke_analysis(ahi_scn, dataset):
"""
Plots a 6 panel figure loking at the SE coast of Australia.
"""
fig, axs = plt.subplots(
2,
3,
subplot_kw={'projection': ccrs.Geostationary(140.735785863)},
figsize=(16,9)
)
string_time = ahi_scn.start_time.strftime('%d %B %Y %H:%M UTC')
fig.suptitle(string_time)
mask_area = 'SE Coast of Australia'
xmin, xmax = 5750 * 1000 - 5500000, 6750 * 1000 - 5500000
ymin, ymax = 5500000 - 9750 * 1000, 5500000 - 8750 * 1000
# Top left panel
variable_name = 'cloud_continuous_mask'
cmap = plt.get_cmap('bwr')
cmap.set_bad(color='k', alpha=1.)
v_data = np.array(dataset[variable_name])
v_data[v_data == dataset[variable_name]._FillValue] = np.nan
mask = np.full(v_data.shape, False)
min_y, max_y = int(8750 / 11000 * v_data.shape[0]), int(9750 / 11000 * v_data.shape[0])
min_x, max_x = int(5750 / 11000 * v_data.shape[0]), int(6750 / 11000 * v_data.shape[0])
mask[min_y:max_y, min_x:max_x] = True
new_shape = (int(max_y - min_y), int(max_x - min_x))
v_data = v_data[mask].reshape(new_shape)
im1 = axs[0,0].imshow(
v_data,
origin='upper',
transform=ccrs.Geostationary(140.735785863),
extent=(xmin, xmax, ymin, ymax),
cmap=cmap,
vmin=dataset[variable_name].valid_min,
vmax=dataset[variable_name].valid_max
)
axs[0,0].coastlines()
divider = make_axes_locatable(axs[0,0])
cbaxes = divider.append_axes("right", size="5%", pad=0.05, axes_class=plt.Axes)
vlabel = ' '.join([
a[0].upper() + a[1:]
if len(a) > 2
else a.upper()
if len(a) == 1
else a
for a
in variable_name.split('_')
])
cbar1 = plt.colorbar(
im1,
cax=cbaxes,
orientation='vertical',
label=r'%s [%s]' % (vlabel, dataset[variable_name].units)
)
# Top centre panel
variable_name = 'cloud_binary_mask'
colors = [
(0., 0., 1.),
(1., 0., 0.)
]
cmap = LinearSegmentedColormap.from_list('nn_rgb', colors, N=2)
cmap.set_bad(color='k', alpha=1.)
v_data = np.array(dataset[variable_name])
v_data[v_data == dataset[variable_name]._FillValue] = np.nan
mask = np.full(v_data.shape, False)
min_y, max_y = int(8750 / 11000 * v_data.shape[0]), int(9750 / 11000 * v_data.shape[0])
min_x, max_x = int(5750 / 11000 * v_data.shape[0]), int(6750 / 11000 * v_data.shape[0])
mask[min_y:max_y, min_x:max_x] = True
new_shape = (int(max_y - min_y), int(max_x - min_x))
v_data = v_data[mask].reshape(new_shape)
im2 = axs[0,1].imshow(
v_data,
origin='upper',
transform=ccrs.Geostationary(140.735785863),
extent=(xmin, xmax, ymin, ymax),
cmap=cmap,
vmin=dataset[variable_name].valid_min,
vmax=dataset[variable_name].valid_max
)
axs[0,1].coastlines()
divider = make_axes_locatable(axs[0,1])
cbaxes = divider.append_axes("right", size="5%", pad=0.05, axes_class=plt.Axes)
vlabel = ' '.join([
a[0].upper() + a[1:]
if len(a) > 2
else a.upper()
if len(a) == 1
else a
for a
in variable_name.split('_')
])
cbar2 = plt.colorbar(
im2,
cax=cbaxes,
orientation='vertical',
label=r'%s [%s]' % (vlabel, dataset[variable_name].units)
)
cbar2.set_ticks([0.25, 0.75])
cbar2.ax.set_yticklabels([
'Non-Cloud',
'Cloud'
],
rotation=90,
verticalalignment='center'
)
# Top right panel
band_values = np.array(ahi_scn['B13'])
mask = np.full(band_values.shape, False)
min_y, max_y = int(8750 / 11000 * band_values.shape[0]), int(9750 / 11000 * band_values.shape[0])
min_x, max_x = int(5750 / 11000 * band_values.shape[0]), int(6750 / 11000 * band_values.shape[0])
mask[min_y:max_y, min_x:max_x] = True
new_shape = (int(max_y - min_y), int(max_x - min_x))
band_values = band_values[mask].reshape(new_shape)
im3 = axs[0,2].imshow(
band_values,
origin='upper',
transform=ccrs.Geostationary(140.735785863),
extent=(xmin, xmax, ymin, ymax),
cmap='binary',
vmin=250,
vmax=300
)
axs[0,2].imshow(
v_data,
alpha=0.5*v_data,
origin='upper',
transform=ccrs.Geostationary(140.735785863),
extent=(xmin, xmax, ymin, ymax),
cmap='bwr'
)
axs[0,2].coastlines()
divider = make_axes_locatable(axs[0,2])
cbaxes = divider.append_axes("right", size="5%", pad=0.05, axes_class=plt.Axes)
cbar3 = plt.colorbar(
im3,
extend='both',
cax=cbaxes,
orientation='vertical',
label='%s [%s]' % (r'10.45$\mu m$ BT', 'K')
)
# Mid left panel
img_arr = natural_colour_rgb(ahi_scn, apply_mask=True, mask_area=mask_area)
axs[1,0].imshow(
img_arr,
origin='upper',
transform=ccrs.Geostationary(140.735785863),
extent=(xmin, xmax, ymin, ymax)
)
axs[1,0].coastlines()
divider = make_axes_locatable(axs[1,0])
cbaxes = divider.append_axes("right", size="5%", pad=0.05, axes_class=plt.Axes)
cbaxes.axis('off')
# Mid centre panel
img_arr = eumetsat_dust_rgb(ahi_scn, apply_mask=True, mask_area=mask_area)
axs[1,1].imshow(
img_arr,
origin='upper',
transform=ccrs.Geostationary(140.735785863),
extent=(xmin, xmax, ymin, ymax)
)
axs[1,1].coastlines()
divider = make_axes_locatable(axs[1,1])
cbaxes = divider.append_axes("right", size="5%", pad=0.05, axes_class=plt.Axes)
cbaxes.axis('off')
# Mid right panel
img_arr = true_colour_rgb(ahi_scn, apply_mask=True, mask_area=mask_area)
axs[1,2].imshow(
img_arr,
origin='upper',
transform=ccrs.Geostationary(140.735785863),
extent=(xmin, xmax, ymin, ymax)
)
axs[1,2].coastlines()
divider = make_axes_locatable(axs[1,2])
cbaxes = divider.append_axes("right", size="5%", pad=0.05, axes_class=plt.Axes)
cbaxes.axis('off')
# # Bottom left panel
# variable_name = 'aerosol_continuous_mask'
# cmap = plt.get_cmap('bwr')
# cmap.set_bad(color='k', alpha=1.)
# v_data = np.array(dataset[variable_name])
# v_data[v_data == dataset[variable_name]._FillValue] = np.nan
# mask = np.full(v_data.shape, False)
# min_y, max_y = int(8750 / 11000 * v_data.shape[0]), int(9750 / 11000 * v_data.shape[0])
# min_x, max_x = int(5750 / 11000 * v_data.shape[0]), int(6750 / 11000 * v_data.shape[0])
# mask[min_y:max_y, min_x:max_x] = True
# new_shape = (int(max_y - min_y), int(max_x - min_x))
# v_data = v_data[mask].reshape(new_shape)
# im1 = axs[2,0].imshow(
# v_data,
# origin='upper',
# transform=ccrs.Geostationary(140.735785863),
# extent=(xmin, xmax, ymin, ymax),
# cmap=cmap,
# vmin=dataset[variable_name].valid_min,
# vmax=dataset[variable_name].valid_max
# )
# axs[2,0].coastlines()
# divider = make_axes_locatable(axs[2,0])
# cbaxes = divider.append_axes("right", size="5%", pad=0.05, axes_class=plt.Axes)
# vlabel = ' '.join([
# a[0].upper() + a[1:]
# if len(a) > 2
# else a.upper()
# if len(a) == 1
# else a
# for a
# in variable_name.split('_')
# ])
# cbar1 = plt.colorbar(
# im1,
# cax=cbaxes,
# orientation='vertical',
# label=r'%s [%s]' % (vlabel, dataset[variable_name].units)
# )
# # Bottom centre panel
# variable_name = 'aerosol_binary_mask'
# colors = [
# (0., 0., 1.),
# (1., 0., 0.)
# ]
# cmap = LinearSegmentedColormap.from_list('nn_rgb', colors, N=2)
# cmap.set_bad(color='k', alpha=1.)
# v_data = np.array(dataset[variable_name])
# v_data[v_data == dataset[variable_name]._FillValue] = np.nan
# mask = np.full(v_data.shape, False)
# min_y, max_y = int(8750 / 11000 * v_data.shape[0]), int(9750 / 11000 * v_data.shape[0])
# min_x, max_x = int(5750 / 11000 * v_data.shape[0]), int(6750 / 11000 * v_data.shape[0])
# mask[min_y:max_y, min_x:max_x] = True
# new_shape = (int(max_y - min_y), int(max_x - min_x))
# v_data = v_data[mask].reshape(new_shape)
# im2 = axs[2,1].imshow(
# v_data,
# origin='upper',
# transform=ccrs.Geostationary(140.735785863),
# extent=(xmin, xmax, ymin, ymax),
# cmap=cmap,
# vmin=dataset[variable_name].valid_min,
# vmax=dataset[variable_name].valid_max
# )
# axs[2,1].coastlines()
# divider = make_axes_locatable(axs[2,1])
# cbaxes = divider.append_axes("right", size="5%", pad=0.05, axes_class=plt.Axes)
# vlabel = ' '.join([
# a[0].upper() + a[1:]
# if len(a) > 2
# else a.upper()
# if len(a) == 1
# else a
# for a
# in variable_name.split('_')
# ])
# cbar2 = plt.colorbar(
# im2,
# cax=cbaxes,
# orientation='vertical',
# label=r'%s [%s]' % (vlabel, dataset[variable_name].units)
# )
# cbar2.set_ticks([0.25, 0.75])
# cbar2.ax.set_yticklabels([
# 'Non Thick Aerosol',
# 'Thick Aerosol'
# ],
# rotation=90,
# verticalalignment='center'
# )
# # Bottom right panel
# band_values = np.array(ahi_scn['B13'])
# mask = np.full(band_values.shape, False)
# min_y, max_y = int(8750 / 11000 * band_values.shape[0]), int(9750 / 11000 * band_values.shape[0])
# min_x, max_x = int(5750 / 11000 * band_values.shape[0]), int(6750 / 11000 * band_values.shape[0])
# mask[min_y:max_y, min_x:max_x] = True
# new_shape = (int(max_y - min_y), int(max_x - min_x))
# band_values = band_values[mask].reshape(new_shape)
# im3 = axs[2,2].imshow(
# band_values,
# origin='upper',
# transform=ccrs.Geostationary(140.735785863),
# extent=(xmin, xmax, ymin, ymax),
# cmap='binary',
# vmin=250,
# vmax=300
# )
# axs[2,2].imshow(
# v_data,
# alpha=0.5*v_data,
# origin='upper',
# transform=ccrs.Geostationary(140.735785863),
# extent=(xmin, xmax, ymin, ymax),
# cmap='bwr'
# )
# axs[2,2].coastlines()
# divider = make_axes_locatable(axs[2,2])
# cbaxes = divider.append_axes("right", size="5%", pad=0.05, axes_class=plt.Axes)
# cbar3 = plt.colorbar(
# im3,
# extend='both',
# cax=cbaxes,
# orientation='vertical',
# label='%s [%s]' % (r'10.45$\mu m$ BT', 'K')
# )
fig.tight_layout()
return fig
@click.command()
@click.option(
'--path_to_nc_file', '-pnc',
default=os.path.join(main_dir, 'Example', 'ahi_nn_analysis_20200105_0500_wo-era.nc'),
help='The full/path/to/nc_file, where the .nc file has the format ' +
'ahi_nn_annalysis_<YYYYmmdd>_<HHMM>_<w/wo-era>.nc'
)
@click.option(
'--save_dir', '-s',
default=os.path.join(main_dir, 'Example', 'Images'),
help='The directory where the images will be saved.'
)
@click.option(
'--aus_only', '-a',
default='True',
help='Boolean indicating whether to produce graphs covering Australia only.'
)
@click.option(
'--with_rgbs_and_channels', '-w',
default='False',
help='Boolean indicating whether to produce RGB images of the specified region.'
)
@click.option(
'--path_to_scene', '-ps',
default=os.path.join(main_dir, 'Example', '20200105_0500'),
help='The full/path/to/scene, including the name of the folder ' +
'that contains the scene data to be analysed. The scene folder ' +
'has the format YYYYmmdd_HHMM.'
)
@click.option(
'--smoke_analysis_only', '-sao',
default='False',
help='Plots smoke analysis figure if True'
)
def main(path_to_nc_file, save_dir, aus_only, with_rgbs_and_channels, path_to_scene, smoke_analysis_only):
if smoke_analysis_only in ['True', 'true', '1', 'yes', 'Yes']:
dst = nc.Dataset(path_to_nc_file)
ahi_scn = read_h8_folder(path_to_scene)
scene_stringtime = ahi_scn.start_time.strftime('%Y%m%d_%H%M')
fig = plot_smoke_analysis(
ahi_scn=ahi_scn,
dataset=dst
)
fig_name = '_'.join(['smoke_analysis_panels', scene_stringtime]) + '.png'
fig.savefig(
os.path.join(save_dir, fig_name),
format='png',
bbox_inches='tight'
)
plt.clf()
plt.close(fig)
else:
if aus_only not in ['True', 'true', '1', 'yes', 'Yes']:
plot_full_analysis(
path_to_nc_file,
save_dir
)
else:
plot_full_analysis(
path_to_nc_file,
save_dir,
aus_only=True
)
if with_rgbs_and_channels in ['True', 'true', '1', 'yes', 'Yes']:
print('Plotting RGBs...')
ahi_scn = read_h8_folder(path_to_scene)
scene_stringtime = ahi_scn.start_time.strftime('%Y%m%d_%H%M')
for rgb_name in ['true_colour', 'natural_colour', 'EUMetSat_dust']:
if aus_only not in ['True', 'true', '1', 'yes', 'Yes']:
fig = plot_rgb(
ahi_scn=ahi_scn,
rgb_name=rgb_name,
apply_mask=False
)
fig_name = '_'.join([rgb_name, scene_stringtime]) + '.png'
fig.savefig(
os.path.join(save_dir, fig_name),
format='png',
bbox_inches='tight',
dpi=300
)
plt.clf()
plt.close(fig)
else:
for region in ['Australia','Cape York','SE Coast of Australia','East Coast of Australia','Central Australia', 'China']:
fig = plot_rgb(
ahi_scn=ahi_scn,
rgb_name=rgb_name,
apply_mask=True,
mask_area=region
)
fig_name = '_'.join([rgb_name, scene_stringtime, f'{"-".join(region.split(" "))}_only']) + '.png'
fig.savefig(
os.path.join(save_dir, fig_name),
format='png',
bbox_inches='tight',
dpi=300
)
plt.clf()
plt.close(fig)
# fig = plot_channel_difference(
# ahi_scn=ahi_scn,
# apply_mask=True,
# mask_area=region
# )
# fig_name = '_'.join(['11-12micron_diff', scene_stringtime, f'{"-".join(region.split(" "))}_only']) + '.png'
# fig.savefig(
# os.path.join(save_dir, fig_name),
# format='png',
# bbox_inches='tight'
# )
# plt.clf()
# plt.close(fig)
# fig = plot_channel_difference(
# ahi_scn=ahi_scn,
# primary_band_number=4,
# secondary_band_number=5,
# apply_mask=True,
# mask_area=region
# )
# fig_name = '_'.join(['B04-B05_diff', scene_stringtime, f'{"-".join(region.split(" "))}_only']) + '.png'
# fig.savefig(
# os.path.join(save_dir, fig_name),
# format='png',
# bbox_inches='tight'
# )
# plt.clf()
# plt.close(fig)
# for bnum in range(1, 16 + 1):
# if aus_only not in ['True', 'true', '1', 'yes', 'Yes']:
# fig = plot_single_channel(
# ahi_scn=ahi_scn,
# band_number=bnum,
# apply_mask=False
# )
# fig_name = '_'.join([f"B{int(bnum):02d}", scene_stringtime]) + '.png'
# fig.savefig(
# os.path.join(save_dir, fig_name),
# format='png',
# bbox_inches='tight'
# )
# else:
# for region in ['Australia','Cape York','SE Coast of Australia','East Coast of Australia','Central Australia']:
# fig = plot_single_channel(
# ahi_scn=ahi_scn,
# band_number=bnum,
# apply_mask=True,
# mask_area=region
# )
# fig_name = '_'.join([f"B{int(bnum):02d}", scene_stringtime, f'{"-".join(region.split(" "))}_only']) + '.png'
# fig.savefig(
# os.path.join(save_dir, fig_name),
# format='png',
# bbox_inches='tight'
# )
if __name__ == '__main__':
main()
| 42.035186
| 158
| 0.549052
| 8,063
| 59,732
| 3.857745
| 0.053454
| 0.074265
| 0.078122
| 0.082302
| 0.857901
| 0.829738
| 0.813374
| 0.789905
| 0.783379
| 0.770037
| 0
| 0.130201
| 0.314404
| 59,732
| 1,420
| 159
| 42.064789
| 0.629347
| 0.123217
| 0
| 0.717637
| 0
| 0
| 0.066668
| 0.008021
| 0
| 0
| 0
| 0
| 0
| 1
| 0.008688
| false
| 0
| 0.010426
| 0
| 0.026933
| 0.001738
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
6822f00deebbc76ed2fd96e0c78de432c88f4020
| 19,086
|
py
|
Python
|
[Execute01]fund_extractXLSXfromFAS.py
|
tooget/Fund-NAV-Calculator
|
91b02512c5a080621d5bfb75eceae0ecee487de6
|
[
"Apache-2.0"
] | 1
|
2018-11-16T09:50:48.000Z
|
2018-11-16T09:50:48.000Z
|
[Execute01]fund_extractXLSXfromFAS.py
|
tooget/Fund-NAV-Calculator
|
91b02512c5a080621d5bfb75eceae0ecee487de6
|
[
"Apache-2.0"
] | 1
|
2020-11-13T18:04:36.000Z
|
2020-11-13T18:04:36.000Z
|
[Execute01]fund_extractXLSXfromFAS.py
|
tooget/Fund-NAV-Calculator
|
91b02512c5a080621d5bfb75eceae0ecee487de6
|
[
"Apache-2.0"
] | null | null | null |
#-*- coding:utf-8 -*-
from Modules import Fund_settings
from Modules import Fund_modules
import time
fas_gui = Fund_modules.fund.fund_extractXLSXfromFAS()
fasLoginID = Fund_settings.fasLoginId
fasLoginPW = Fund_settings.fasLoginPw
fas_ExePath = Fund_settings.fasExePath
fasGuiImage_path = Fund_modules.general_func.filesInDirectory(Fund_settings.fasGuiImagePath)
#fromNdaysBefore = int(input("Export xlsx files from N days before : "))
dateToExtract = str(input("Input Date to export xlsx files : "))
dateToExtract = dateToExtract.replace('-','')
#datelist = Fund_modules.general_func.create_datelist(fromNdaysBefore,'filename')
datelist = [dateToExtract]
fundcode = Fund_settings.codeAvailable(datelist[0])
fas_tr_list = Fund_settings.fasExtractTRList
print("-"*50)
print("Start date : ",datelist[0])
print("End Date : ",datelist[-1])
print("Target Funds : ",fundcode)
print("Target FAS TR Numbers : ",fas_tr_list)
print("-"*50)
startTimeStamp = time.time()
print("START : ",time.ctime(startTimeStamp))
print("-"*50)
from threading import Thread
from subprocess import run as srun
class fas_execute(Thread):
def __init__(self,exepath):
Thread.__init__(self)
self.exepath = exepath
def run(self):
srun(self.exepath)
t1 = fas_execute(fas_ExePath)
t1.start()
print('FAS executed.')
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[0],'exist',10)
fas_gui.imageRightSideClick(fasGuiImage_path[0])
fas_gui.pasteKey(fasLoginID)
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[1],'exist',10)
fas_gui.imageRightSideClick(fasGuiImage_path[1])
fas_gui.pasteKey(fasLoginPW)
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[2],'exist',10)
fas_gui.imageCenterClick(fasGuiImage_path[2])
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[3],'exist',10)
fas_gui.imageCenterDoubleClick(fasGuiImage_path[4])
saveComplete = []
for fas_tr_num in fas_tr_list:
try:
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[5],'exist',5)
fas_gui.imageCenterClick(fasGuiImage_path[5])
except TypeError:
print('PASS : Find another TR Empty inputbox.')
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[15],'exist',5)
fas_gui.imageCenterClick(fasGuiImage_path[15])
time.sleep(0.3)
fas_gui.pasteKey(fas_tr_num)
fas_gui.inputKeys('enter')
#<declassified>
if fas_tr_num in ['<declassified>']:
for date in datelist[0:1]:
print('START: ',fas_tr_num,date)
# 04 ์กฐํ ๋ฒํผ ํด๋ฆญ
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[25],'exist',10)
fas_gui.imageCenterClick(fasGuiImage_path[25])
# 05 ์ฒ๋ฆฌ์ค ๋์๊ฐ๋ ์ด๋ฏธ์ง๊ฐ ์๋์ง ํ์ธ
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[9],'notexist',10)
# 07 ์์
์ถ์ถ ๋ฒํผ ํด๋ฆญ
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[21],'exist',10)
fas_gui.imageCenterClick(fasGuiImage_path[21])
# 08 ์์
X ๋ฒํผ ํด๋ฆญ
# ์์
์ฐฝ ๋จ๋ ๊ฒ ์ ๋ํ ์ค๋ ๊ฑธ๋ฆผ.
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[11],'exist',25)
fas_gui.imageCenterClick(fasGuiImage_path[11])
# 09 ์์
์ข
๋ฃ ํ์ธ์ฐฝ ํ์
์ ์ ์ฅ ๋ฒํผ ํด๋ฆญ
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[12],'exist',10)
fas_gui.imageCenterClick(fasGuiImage_path[12])
# 10 ๋ค๋ฅธ์ด๋ฆ์ผ๋ก ์ ์ฅ ์์ด์ฝ ์ด๋ฏธ์ง๊ฐ ๋จ๋์ง ํ์ธ
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[13],'exist',10)
fas_gui.imageCenterClick(fasGuiImage_path[13])
# 11 ๊ฒฝ๋ก ๋ฐ ํ์ผ์ด๋ฆ ๋ถ์ฌ๋ฃ๊ธฐ
fileNamenPath = Fund_settings.fundXlsxFile_path+'<declassified>'+fas_tr_num+'_'+date+'.xlsx'
#fileNamenPath = Fund_settings.fundXlsxFile_path+'fas'+fas_tr_num+'_'+date+'.xlsx'
fas_gui.pasteKey(fileNamenPath)
saveComplete.append(fileNamenPath)
# 12 ์ ์ฅ ๋ฒํผ ํด๋ฆญ
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[14],'exist',10)
fas_gui.imageCenterClick(fasGuiImage_path[14])
print('COMPLETE: <declassified>',saveComplete[-1])
time.sleep(1)
#<declassified>
elif fas_tr_num in ['<declassified>']:
for code in fundcode:
for date in datelist:
print('START: ',fas_tr_num,code['<declassified>'],date)
# 01 ๋ฌ๋ ฅ ์์ด์ฝ ๋๋ฅด๊ณ ์ํฐ
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[6],'exist',10)
fas_gui.imageCenterClick(fasGuiImage_path[6])
time.sleep(0.3)
fas_gui.inputKeys('enter')
# 02 ๋ ์ง ์์๋๋ก ์
๋ ฅํ๊ณ ์ํฐ
for keys in date:
fas_gui.inputKeys(keys)
time.sleep(0.15)
fas_gui.inputKeys('enter')
# 03 ํ๋ ์
๋ ฅ๋ถ์ ํ๋์ฝ๋๋ฅผ ๋ถ์ฌ๋ฃ๊ธฐ
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[17],'exist',10)
fas_gui.imageRightSideClick(fasGuiImage_path[17])
fas_gui.inputHotkeys('ctrl','a')
fas_gui.pasteKey(code['<declassified>'][1:])
# 04 ์กฐํ ๋ฒํผ ํด๋ฆญ
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[20],'exist',10)
fas_gui.imageCenterClick(fasGuiImage_path[20])
# 05 ์ฒ๋ฆฌ์ค ๋์๊ฐ๋ ์ด๋ฏธ์ง๊ฐ ์๋์ง ํ์ธ
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[9],'notexist',10)
try:
# 06 ์๋ฃ ์์ ๋ฉ์ธ์ง๊ฐ ์๋์ง ํ์ธ ํ ํ์ธ ๋ฒํผ ํด๋ฆญ > ๋ค์์ผ๋ก ๋์ด๊ฐ
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[18],'exist',5)
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[19],'exist',1)
fas_gui.imageCenterClick(fasGuiImage_path[19])
print('PASS: Skip ', fas_tr_num, code['<declassified>'], date)
except TypeError:
# 06 ์๋ฃ ์์ ๋ฉ์ธ์ง๊ฐ ์๋์ง ํ์ธ ํ ์์ผ๋ฉด > ๊ณ์ ์งํ
# 07 ์์
์ถ์ถ ๋ฒํผ ํด๋ฆญ
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[21],'exist',10)
fas_gui.imageCenterClick(fasGuiImage_path[21])
# 08 ์์
X ๋ฒํผ ํด๋ฆญ
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[11],'exist',10)
fas_gui.imageCenterClick(fasGuiImage_path[11])
# 09 ์์
์ข
๋ฃ ํ์ธ์ฐฝ ํ์
์ ์ ์ฅ ๋ฒํผ ํด๋ฆญ
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[12],'exist',10)
fas_gui.imageCenterClick(fasGuiImage_path[12])
# 10 ๋ค๋ฅธ์ด๋ฆ์ผ๋ก ์ ์ฅ ์์ด์ฝ ์ด๋ฏธ์ง๊ฐ ๋จ๋์ง ํ์ธ
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[13],'exist',10)
fas_gui.imageCenterClick(fasGuiImage_path[13])
# 11 ๊ฒฝ๋ก ๋ฐ ํ์ผ์ด๋ฆ ๋ถ์ฌ๋ฃ๊ธฐ
fileNamenPath = Fund_settings.fundXlsxFile_path+'<declassified>'+fas_tr_num+'_'+code['<declassified>']+'_'+date+'.xlsx'
#fileNamenPath = Fund_settings.fundXlsxFile_path+'fas'+fas_tr_num+'_'+date+'.xlsx'
fas_gui.pasteKey(fileNamenPath)
saveComplete.append(fileNamenPath)
# 12 ์ ์ฅ ๋ฒํผ ํด๋ฆญ
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[14],'exist',10)
fas_gui.imageCenterClick(fasGuiImage_path[14])
print('COMPLETE: <declassified>',saveComplete[-1])
time.sleep(1)
#<declassified>
elif fas_tr_num in ['<declassified>']:
for date in datelist:
print('START: ',fas_tr_num,date)
# 01 ๊ธฐ์ค์ผ์(์์) ์์ด์ฝ ๋๋ฅด๊ณ ์ํฐ
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[22],'exist',10)
fas_gui.imageCenterClick(fasGuiImage_path[22])
time.sleep(0.3)
for keys in date:
fas_gui.inputKeys(keys)
time.sleep(0.15)
fas_gui.inputKeys('enter')
# 02 ๊ธฐ์ค์ผ์(๋) ์์ด์ฝ ๋๋ฅด๊ณ ์ํฐ
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[23],'exist',10)
fas_gui.imageCenterClick(fasGuiImage_path[23])
time.sleep(0.3)
for keys in date:
fas_gui.inputKeys(keys)
time.sleep(0.15)
fas_gui.inputKeys('enter')
# 03 ์กฐํ ๋ฒํผ ํด๋ฆญ
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[8],'exist',10)
fas_gui.imageCenterClick(fasGuiImage_path[8])
# 04 ์ฒ๋ฆฌ์ค ๋์๊ฐ๋ ์ด๋ฏธ์ง๊ฐ ์๋์ง ํ์ธ
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[9],'notexist',10)
# 05 ์์
์ถ์ถ ๋ฒํผ ํด๋ฆญ
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[24],'exist',10)
fas_gui.imageCenterClick(fasGuiImage_path[24])
# 06 ์์
X ๋ฒํผ ํด๋ฆญ
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[11],'exist',10)
fas_gui.imageCenterClick(fasGuiImage_path[11])
# 07 ์์
์ข
๋ฃ ํ์ธ์ฐฝ ํ์
์ ์ ์ฅ ๋ฒํผ ํด๋ฆญ
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[12],'exist',10)
fas_gui.imageCenterClick(fasGuiImage_path[12])
# 08 ๋ค๋ฅธ์ด๋ฆ์ผ๋ก ์ ์ฅ ์์ด์ฝ ์ด๋ฏธ์ง๊ฐ ๋จ๋์ง ํ์ธ
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[13],'exist',10)
fas_gui.imageCenterClick(fasGuiImage_path[13])
# 09 ๊ฒฝ๋ก ๋ฐ ํ์ผ์ด๋ฆ ๋ถ์ฌ๋ฃ๊ธฐ
fileNamenPath = Fund_settings.fundXlsxFile_path+'<declassified>'+fas_tr_num+'_'+date+'.xlsx'
#fileNamenPath = Fund_settings.fundXlsxFile_path+'<declassified>'+fas_tr_num+'_'+date+'.xlsx'
fas_gui.pasteKey(fileNamenPath)
saveComplete.append(fileNamenPath)
# 12 ์ ์ฅ ๋ฒํผ ํด๋ฆญ
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[14],'exist',10)
fas_gui.imageCenterClick(fasGuiImage_path[14])
print('COMPLETE: <declassified>',saveComplete[-1])
time.sleep(1)
#<declassified>
elif fas_tr_num in ['<declassified>']:
for date in datelist:
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[6],'exist',10)
fas_gui.imageCenterClick(fasGuiImage_path[6])
time.sleep(0.3)
fas_gui.inputKeys('enter')
for keys in date:
fas_gui.inputKeys(keys)
time.sleep(0.15)
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[8],'exist',10)
fas_gui.imageCenterClick(fasGuiImage_path[8])
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[9],'notexist',10)
time.sleep(0.5)
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[10],'exist',10)
fas_gui.imageCenterClick(fasGuiImage_path[10])
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[11],'exist',15)
fas_gui.imageCenterClick(fasGuiImage_path[11])
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[12],'exist',10)
fas_gui.imageCenterClick(fasGuiImage_path[12])
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[13],'exist',10)
fas_gui.imageCenterClick(fasGuiImage_path[13])
fileNamenPath = Fund_settings.fundXlsxFile_path+'<declassified>'+fas_tr_num+'_'+date+'.xlsx'
fas_gui.pasteKey(fileNamenPath)
saveComplete.append(fileNamenPath)
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[14],'exist',10)
fas_gui.imageCenterClick(fasGuiImage_path[14])
print('COMPLETE: <declassified>',saveComplete[-1])
time.sleep(1)
#<declassified>
elif fas_tr_num in ['<declassified>']:
for code in fundcode:
for date in datelist:
print('START: ',fas_tr_num,code['<declassified>'],date)
time.sleep(0.5)
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[6],'exist',10)
fas_gui.imageCenterClick(fasGuiImage_path[6])
time.sleep(0.5)
fas_gui.inputKeys('enter')
for keys in date:
fas_gui.inputKeys(keys)
time.sleep(0.15)
fas_gui.inputKeys('enter')
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[16],'exist',10)
fas_gui.imageRightSideClick(fasGuiImage_path[16])
fas_gui.inputHotkeys('ctrl','a')
fas_gui.pasteKey(code['<declassified>'][1:])
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[8],'exist',10)
fas_gui.imageCenterClick(fasGuiImage_path[8])
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[9],'notexist',10)
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[10],'exist',10)
fas_gui.imageCenterClick(fasGuiImage_path[10])
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[11],'exist',15)
fas_gui.imageCenterClick(fasGuiImage_path[11])
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[12],'exist',10)
fas_gui.imageCenterClick(fasGuiImage_path[12])
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[13],'exist',10)
fileNamenPath = Fund_settings.fundXlsxFile_path+'<declassified>'+fas_tr_num+'_'+code['<declassified>']+'_'+date+'.xlsx'
#fileNamenPath = Fund_settings.fundXlsxFile_path+'fas'+fas_tr_num+'_'+date+'.xlsx'
fas_gui.pasteKey(fileNamenPath)
saveComplete.append(fileNamenPath)
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[14],'exist',10)
fas_gui.imageCenterClick(fasGuiImage_path[14])
print('COMPLETE: <declassified>',saveComplete[-1])
time.sleep(1)
#<declassified>
elif fas_tr_num in ['<declassified>']:
for code in fundcode:
for date in datelist:
print('START: ',fas_tr_num,code['<declassified>'],date)
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[6],'exist',10)
fas_gui.imageCenterClick(fasGuiImage_path[6])
time.sleep(0.3)
fas_gui.inputKeys('enter')
for keys in date:
fas_gui.inputKeys(keys)
time.sleep(0.15)
fas_gui.inputKeys('enter')
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[7],'exist',10)
fas_gui.imageRightSideClick(fasGuiImage_path[7])
fas_gui.inputHotkeys('ctrl','a')
fas_gui.pasteKey(code['<declassified>'][1:])
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[8],'exist',10)
fas_gui.imageCenterClick(fasGuiImage_path[8])
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[9],'notexist',10)
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[10],'exist',10)
fas_gui.imageCenterClick(fasGuiImage_path[10])
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[11],'exist',15)
fas_gui.imageCenterClick(fasGuiImage_path[11])
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[12],'exist',10)
fas_gui.imageCenterClick(fasGuiImage_path[12])
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[13],'exist',10)
fileNamenPath = Fund_settings.fundXlsxFile_path+'<declassified>'+fas_tr_num+'_'+code['<declassified>']+'_'+date+'.xlsx'
#fileNamenPath = Fund_settings.fundXlsxFile_path+'fas'+fas_tr_num+'_'+date+'.xlsx'
fas_gui.pasteKey(fileNamenPath)
saveComplete.append(fileNamenPath)
fas_gui.imageCenterClick(fasGuiImage_path[14])
print('COMPLETE: <declassified>',saveComplete[-1])
time.sleep(1)
#<declassified>
elif fas_tr_num in ['<declassified>']:
for date in datelist:
print('START: ',fas_tr_num,date)
# 01 ๊ธฐ์ค์ผ์(์์) ์์ด์ฝ ๋๋ฅด๊ณ ์ํฐ
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[26],'exist',10)
fas_gui.imageCenterClick(fasGuiImage_path[26])
time.sleep(0.3)
for keys in date:
fas_gui.inputKeys(keys)
time.sleep(0.15)
fas_gui.inputKeys('enter')
# 02 ๊ธฐ์ค์ผ์(๋) ์์ด์ฝ ๋๋ฅด๊ณ ์ํฐ
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[27],'exist',10)
fas_gui.imageCenterClick(fasGuiImage_path[27])
time.sleep(0.3)
for keys in date:
fas_gui.inputKeys(keys)
time.sleep(0.15)
fas_gui.inputKeys('enter')
# 03 ์กฐํ ๋ฒํผ ํด๋ฆญ
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[28],'exist',10)
fas_gui.imageCenterClick(fasGuiImage_path[28])
# 04 ์ฒ๋ฆฌ์ค ๋์๊ฐ๋ ์ด๋ฏธ์ง๊ฐ ์๋์ง ํ์ธ
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[9],'notexist',10)
try:
# 06 ์๋ฃ ์์ ๋ฉ์ธ์ง๊ฐ ์๋์ง ํ์ธ ํ ์์ผ๋ฉด > ๊ณ์ ์งํ
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[18],'notexist',5)
# 07 ์์
์ถ์ถ ๋ฒํผ ํด๋ฆญ
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[10],'exist',10)
fas_gui.imageCenterClick(fasGuiImage_path[10])
# 08 ์์
X ๋ฒํผ ํด๋ฆญ
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[11],'exist',10)
fas_gui.imageCenterClick(fasGuiImage_path[11])
# 09 ์์
์ข
๋ฃ ํ์ธ์ฐฝ ํ์
์ ์ ์ฅ ๋ฒํผ ํด๋ฆญ
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[12],'exist',10)
fas_gui.imageCenterClick(fasGuiImage_path[12])
# 10 ๋ค๋ฅธ์ด๋ฆ์ผ๋ก ์ ์ฅ ์์ด์ฝ ์ด๋ฏธ์ง๊ฐ ๋จ๋์ง ํ์ธ
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[13],'exist',10)
fas_gui.imageCenterClick(fasGuiImage_path[13])
# 11 ๊ฒฝ๋ก ๋ฐ ํ์ผ์ด๋ฆ ๋ถ์ฌ๋ฃ๊ธฐ
fileNamenPath = Fund_settings.fundXlsxFile_path+'<declassified>'+fas_tr_num+'_'+date+'.xlsx'
#fileNamenPath = Fund_settings.fundXlsxFile_path+'fas'+fas_tr_num+'_'+date+'.xlsx'
fas_gui.pasteKey(fileNamenPath)
saveComplete.append(fileNamenPath)
# 12 ์ ์ฅ ๋ฒํผ ํด๋ฆญ
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[14],'exist',10)
fas_gui.imageCenterClick(fasGuiImage_path[14])
print('COMPLETE: <declassified>',saveComplete[-1])
except TypeError:
# 06 ์๋ฃ ์์ ๋ฉ์ธ์ง๊ฐ ์๋์ง ํ์ธ ํ ํ์ธ ๋ฒํผ ํด๋ฆญ > ๋ค์์ผ๋ก ๋์ด๊ฐ
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[18],'exist',5)
fas_gui.checkImagesOnscreenLoop(fasGuiImage_path[19],'exist',1)
fas_gui.imageCenterClick(fasGuiImage_path[19])
print('PASS: Skip ', fas_tr_num, date)
time.sleep(1)
#fas_gui.inputHotkeys('alt','f4')
[print(x, saveComplete[x]) for x in range(len(saveComplete))]
endTimeStamp = time.time()
print("-"*50)
print("END : ",time.ctime(endTimeStamp))
print("Running Time : ",round(endTimeStamp-startTimeStamp,2))
print("-"*50)
| 48.19697
| 140
| 0.609347
| 2,043
| 19,086
| 5.481155
| 0.095448
| 0.08948
| 0.181282
| 0.250045
| 0.86444
| 0.836757
| 0.827291
| 0.758707
| 0.757993
| 0.735935
| 0
| 0.038538
| 0.286231
| 19,086
| 396
| 141
| 48.19697
| 0.783454
| 0.090276
| 0
| 0.726962
| 0
| 0
| 0.073634
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.006826
| false
| 0.010239
| 0.017065
| 0
| 0.027304
| 0.102389
| 0
| 0
| 0
| null | 0
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 9
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.