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
a9d45eb05c9359b65567439a4e9669f107f2efde
19,605
py
Python
firedpy/create_readme.py
earthlab/firedpy
7576fcf72b029421703873b95a8994152d63ea4e
[ "MIT" ]
14
2019-10-21T04:32:08.000Z
2022-03-10T19:24:41.000Z
firedpy/create_readme.py
earthlab/firedpy
7576fcf72b029421703873b95a8994152d63ea4e
[ "MIT" ]
63
2020-05-20T20:41:56.000Z
2022-03-30T19:14:47.000Z
firedpy/create_readme.py
earthlab/firedpy
7576fcf72b029421703873b95a8994152d63ea4e
[ "MIT" ]
10
2019-10-11T20:22:55.000Z
2022-02-23T12:40:14.000Z
import csv import datetime as dt import re import os import pandas as pd def makeReadMe(proj_dir, tilename, file_base, input, first_date, last_date, ecoregion_type, ecoregion_level, landcover_type, daily, spatial_param, temporal_param, shapefile, shp_type): read_path = os.path.join(proj_dir, 'outputs',file_base+"_README.txt") last_date = str(last_date) first_date = str(first_date) file_name = file_base+"_to"+last_date last_year = dt.datetime(year=int(last_date[:4]), month=1, day=1) last_date = last_year + dt.timedelta(int(last_date[4:])) first_year = dt.datetime(year=int(first_date[:4]), month=1, day=1) first_date = first_year + dt.timedelta(int(first_date[4:])) first_event = first_date.strftime("%B %Y") last_event = last_date.strftime("%B %Y") if input == 3: name = tilename else: tilename = tilename.upper() name = tilename.split("_") with open(read_path, "w") as text_file: print("-------------------\n", file=text_file) print("ABSTRACT\n", file=text_file) print("-------------------\n", file=text_file) if input == 3: print("This is event-level polygons for the fire event delineation (FIRED) product for MODIS grid tiles", *name , "from {} to {}. It is derived from the MODIS MCD64A1 burned area product (see https://lpdaac.usgs.gov/products/mcd64a1v006/ for more details). The MCD64A1 is a monthly raster grid of estimated burned dates. Firedpy (www.github.com/earthlab/firedpy) is an algorithm that converts these rasters into events by stacking the entire time series into a spatial-temporal data cube, then uses an algorithm to assign event identification numbers to pixels that fit into the same 3-dimensional spatial temporal window. This particular dataset was created using a spatial parameter of {} pixels and {} days. If daily polygons are included, the event identification numbers are the same for both files, but the event-level product has only single polygons for each entire event, while the daily product has separate polygons for each date per event. See the associated paper for more details on the methods and more:\n".format(first_event, last_event, spatial_param, temporal_param), file=text_file) else: print("This is event-level polygons for the fire event delineation (FIRED) product for", *name , "from {} to {}. It is derived from the MODIS MCD64A1 burned area product (see https://lpdaac.usgs.gov/products/mcd64a1v006/ for more details). The MCD64A1 is a monthly raster grid of estimated burned dates. Firedpy (www.github.com/earthlab/firedpy) is an algorithm that converts these rasters into events by stacking the entire time series into a spatial-temporal data cube, then uses an algorithm to assign event identification numbers to pixels that fit into the same 3-dimensional spatial temporal window. This particular dataset was created using a spatial parameter of {} pixels and {} days. If daily polygons are included, the event identification numbers are the same for both files, but the event-level product has only single polygons for each entire event, while the daily product has separate polygons for each date per event. See the associated paper for more details on the methods and more:\n".format(first_event, last_event, spatial_param, temporal_param), file=text_file) print("Balch, J.K.; St. Denis, L.A.; Mahood, A.L.; Mietkiewicz, N.P.; Williams, T.M.; McGlinchy, J.; Cook, M.C. FIRED (Fire Events Delineation): An Open, Flexible Algorithm and Database of US Fire Events Derived from the MODIS Burned Area Product (2001–2019). Remote Sens. 2020, 12, 3498. https://doi.org/10.3390/rs12213498 \n", file=text_file) print("""-------------------\n GENERAL INFORMATION\n -------------------\n 1. Title of Dataset:  FIRED """, *name, """\n 2. Authors: Jennifer K. Balch, Lise A. St. Denis, Adam L. Mahood, Nathan P.  Mietkiewicz, Travis Williams, Joe McGlinchy, Maxwell C. Cook, Estelle J. Lindrooth.\n 3. Contact information: jennifer.balch@colorado.edu; adam.mahood@colorado.edu\n 4. Date of data collection:{} - {}\n --------------------------\n SHARING/ACCESS INFORMATION\n --------------------------\n 1. Licenses/restrictions placed on the data: MIT\n 2. Links to publications that cite or use the data: TBD\n 3. Links to other publicly accessible locations of the data: None\n 4. Recommended citation for the data: \n Balch, J.K.; St. Denis, L.A.; Mahood, A.L.; Mietkiewicz, N.P.; Williams, T.M.; McGlinchy, J.; Cook, M.C. FIRED (Fire Events Delineation): An Open, Flexible Algorithm and Database of US Fire Events Derived from the MODIS Burned Area Product (2001–2019). Remote Sens. 2020, 12, 3498. https://doi.org/10.3390/rs12213498\n """.format(first_event, last_event), file = text_file) print("-------------------\n", file=text_file) print("DATA & FILE OVERVIEW\n", file=text_file) print("-------------------\n", file=text_file) print("1. File List: \n", file=text_file) if daily == 'yes' and shapefile: print(" 1. Tables: ", file=text_file) print(" A. {}_events.csv\n".format(file_name), file=text_file) print(" B. {}_daily.csv\n".format(file_name), file=text_file) print(" i. This is each fired event split into daily polygons. Each polygon will have an id for the event (which may encompass multiple polygons), and a unique date.\n", file=text_file) print(" 2. Shapefiles: \n ", file=text_file) if shp_type == 'gpkg': print(" A. {}_events.gpkg\n".format(file_name, last_date), file=text_file) print(" B. {}_daily.gpkg\n".format(file_name), file=text_file) print(" i. This is each fired event split into daily polygons. Each polygon will have an id for the event (which may encompass multiple polygons), and a unique date.\n", file=text_file) if shp_type == 'shp': print(" A. {}_events.shp\n".format(file_name), file=text_file) print(" B. {}_daily.shp\n".format(file_name), file=text_file) print(" i. This is each fired event split into daily polygons. Each polygon will have an id for the event (which may encompass multiple polygons), and a unique date.\n", file=text_file) if shp_type == 'both': print(" A. {}_events.shp\n".format(file_name), file=text_file) print(" B. {}_daily.shp\n".format(file_name), file=text_file) print(" i. This is each fired event split into daily polygons. Each polygon will have an id for the event (which may encompass multiple polygons), and a unique date.\n", file=text_file) print(" C. {}_events.gpkg\n".format(file_name), file=text_file) print(" D. {}_daily.gpkg\n".format(file_name), file=text_file) print(" i. This is each fired event split into daily polygons. Each polygon will have an id for the event (which may encompass multiple polygons), and a unique date.\n", file=text_file) elif daily == 'yes' and shapefile == False: print(" 1. Tables:\n ", file=text_file) print(" A. {}_events.csv\n".format(file_name), file=text_file) print(" B. {}_daily.csv\n".format(file_name), file=text_file) print(" i. This is each fired event split into daily polygons. Each polygon will have an id for the event (which may encompass multiple polygons), and a unique date.\n", file=text_file) elif daily == 'no' and shapefile: print(" 1. Table:\n ", file=text_file) print(" A. {}_events.csv\n".format(file_name), file=text_file) print(" 2. Shapefile: \n", file=text_file) if shp_type == 'gpkg': print(" A. {}_events.gpkg\n".format(file_name), file=text_file) if shp_type == 'shp': print(" A. {}_events.shp\n".format(file_name), file=text_file) if shp_type == 'both': print(" A. {}_events.shp\n".format(file_name), file=text_file) print(" B. {}_events.gpkg\n".format(file_name), file=text_file) else: print(" 1. Table:\n ", file=text_file) print(" A. {}_events.csv\n".format(file_name), file=text_file) print("-------------------\n", file=text_file) print("METHODOLOGICAL INFORMATION\n", file=text_file) print("-------------------\n", file=text_file) print(" 1. Spatial window: {} \n".format(spatial_param), file=text_file) print(" 2. Temporal window: {} \n".format(temporal_param), file=text_file) print("See Balch et al 2020 for complete methods. DOI: https://doi.org/10.3390/rs12213498\n", file=text_file) print("-------------------\n", file=text_file) if shapefile: if shp_type == 'gpkg': print("DATA-SPECIFIC INFORMATION FOR: {}_events.csv and {}_events.gpkg".format(file_name, file_name), file=text_file) if shp_type == 'shp': print("DATA-SPECIFIC INFORMATION FOR: {}_events.csv and {}_events.shp".format(file_name, file_name), file=text_file) if shp_type == 'both': print("DATA-SPECIFIC INFORMATION FOR: {}_events.csv, {}_events.gpkg, {}_events.shp".format(file_name, file_name,file_name), file=text_file) else: print("DATA-SPECIFIC INFORMATION FOR: {}_events.csv".format(file_name), file=text_file) print("-------------------\n", file=text_file) filepath = os.path.join(proj_dir, 'outputs', 'tables', file_name+"_events.csv") reader = pd.read_csv(filepath) row_count = len(reader) print("1. Number of variables: 24\n", file=text_file) print("2. Number of cases/rows: {}\n".format(row_count), file=text_file) print("3. Projection information (proj4 string): +proj=sinu +lon_0=0 +x_0=0 +y_0=0 +a=6371007.181 +b=6371007.181 +units=m +no_defs\n", file = text_file) print("3.1. The projection is the native projection from the MODIS MCD64A1 burned area product from which this dataset is derived. The MCD64A1 product is a raster grid with a resolution of 463 meters. More info at https://lpdaac.usgs.gov/products/mcd64a1v006/ \n", file = text_file) print("""4. Variable List: \n A. Name: id
 \n i. Description: Unique identifier of the fire event.
\n B. Name: ig_date
\n i. Description: The earliest date contained in the event
 \n C. Name: ig_day 
\n i. Description: The day of the year of the earliest date contained in the event
 \n D. Name: ig_month 
\n i. Description: The month of the earliest date contained in the event
 \n E. Name: ig_year
\n i. Description: The year of the earliest date contained in the event.
 \n F. Name: last_date
 \n i. Description: The latest date contained in the event
 \n G. Name: event_day 
 \n i. Description: Days since ignition date + 1 (ignition date is day 1)
 \n H. Name: pixels
 \n i. Description: Total number of pixels burned that day. 
 \n I. Name: tot_px 
 \n i. Description:  Total pixels burned for the entire event. 
 \n J. Name: tot_ar_km2
 \n i. Description: Area burned in square kilometers for the entire event. 
 \n K. Name: fsr_px_dy
 \n i. Description: Total pixels burned for the entire event divided by the duration of the fire event. 
 \n L. Name: fsr_km2_dy
 \n i. Description: Total kilometers burned for the entire event divided by the duration of the fire event. 
 \n M. Name: mx_grw_px
 \n i. Description: maximum growth in pixels
 \n N. Name: mn_grw_px
 \n i. Description: minimum growth in pixels
 \n O. Name: mu_grw_px
 \n i. Description: mean growth in pixels
 \n P. Name: mx_grw_km2
 \n i. Description: maximum growth in square kilometers
 \n Q. Name: mn_grw_km2
 \n i. Description: minimum growth in square kilometers 
 \n R. Name: mu_grw_km2
 \n i. Description: mean growth in square kilometers
 \n S. Name: mx_grw_dte
 \n i. Description: date of maximum
 \n T. Name: lc_code
 \n i. Description: Numeric code for the landcover type extracted from the MODIS landcover product for the year preceding the fire.  \n
 U. Name: lc_mode
 \n i. Description: Numeric code for the landcover type extracted from the MODIS landcover product for the year preceding the fire. 
 \n V. Name: lc_name
 \n i. Description: Character string of the landcover type from the year before the fire. 
 \n W. Name: lc_desc
 \n i. Description: Character string description of the landcover type from the year before the fire. 
 \n X. Name: lc_type
 \n i. Description: Which landcover classification type was used from the MCD12Q1 product? Default is IGBP global vegetation classification scheme
 \n Y. Name: eco_mode
 \n i. Description: Modal ecoregion code
 \n Z. Name: eco_type
 \n i. Description: Which type and level of ecoregion classification was used (North america EPA (levels 1-3) vs World Wildlife Federation)
 \n AA. Name: eco_name
 \n i. Description: Character string of the ecoregion type where the event occurred. 
 \n BB. Name: ig_utm_x
 \n i. Description: estimated ignition x coordinate
 \n CC. Name: ig_utm_y
 \n i. Description: estimated ignition y coordinate
 \n DD. Name: tot_perim
 \n i. Description: Total perimeter of the fire event. \n""", file = text_file) if daily == 'yes': print("-------------------\n", file=text_file) if shapefile: if shp_type == 'gpkg': print("DATA-SPECIFIC INFORMATION FOR: {}_daily.csv and {}_daily.gpkg".format(file_name, file_name), file=text_file) if shp_type == 'shp': print("DATA-SPECIFIC INFORMATION FOR: {}_daily.csv and {}_daily.shp".format(file_name, file_name), file=text_file) if shp_type == 'both': print("DATA-SPECIFIC INFORMATION FOR: {}_daily.csv, {}_daily.gpkg, {}_daily.shp".format(file_name, file_name,file_name), file=text_file) else: print("DATA-SPECIFIC INFORMATION FOR: {}_daily.csv".format(file_name), file=text_file) print("-------------------\n", file=text_file) filepath = os.path.join(proj_dir, 'outputs', 'tables', file_name+"_daily.csv") reader = pd.read_csv(filepath) row_count = len(reader) print("1. Number of variables: 29\n", file=text_file) print("2. Number of cases/rows: {}\n".format(row_count), file=text_file) print("3. Projection information (proj4 string): +proj=sinu +lon_0=0 +x_0=0 +y_0=0 +a=6371007.181 +b=6371007.181 +units=m +no_defs\n", file = text_file) print("3.1. The projection is the native projection from the MODIS MCD64A1 burned area product from which this dataset is derived. The MCD64A1 product is a raster grid with a resolution of 463 meters. More info at https://lpdaac.usgs.gov/products/mcd64a1v006/ \n", file = text_file) print("""4. Variable list: \n EE. Name: id \n i. Description: Unique identifier of the fire event. \n FF. Name: did
 \n i. Description: unique identifier of the day within the event
 \n GG. Name: date 
 \n i. Description: date that the area burned
 \n HH. Name: ig_date
 \n i. Description: The earliest date contained in the event
 \n II. Name: ig_day 
 \n i. Description: The day of the year of the earliest date contained in the event
 \n JJ. Name: ig_month 
 \n i. Description: The month of the earliest date contained in the event
 \n KK. Name: ig_year
 \n i. Description: The year of the earliest date contained in the event.
 \n LL. Name: last_date
 \n i. Description: The latest date contained in the event
 \n MM. Name: event_day 
 \n i. Description: Days since ignition date + 1 (ignition date is day 1)
 \n NN. Name: pixels
 \n i. Description: Total number of pixels burned that day. 
 \n OO. Name: tot_px 
 \n i. Description:  Total pixels burned for the entire event. 
 \n PP. Name: dy_ar_km2 - \n i. Description:  Area burned in square kilometers that day. 
 \n QQ. Name: tot_ar_km2
 \n i. Description: Area burned in square kilometers for the entire event.  \n
 RR. Name: fsr_px_dy
 \n i. Description: Total pixels burned for the entire event divided by the duration of the fire event. 
 \n SS. Name: fsr_km2_dy
 \n i. Description: Total kilometers burned for the entire event divided by the duration of the fire event. 
 \n TT. Name: mx_grw_px
 \n i. Description: Maximum daily fire growth per event in pixels
 \n UU. Name: mn_grw_px
 \n i. Description: Minimum daily fire growth per event in pixels
 \n VV. Name: mu_grw_px
 \n i. Description: Mean daily fire growth per event in pixels
 \n WW. Name: mx_grw_km2
 \n i. Description: Maximum daily fire growth per event in square kilometers
 \n XX. Name: mn_grw_km2
 \n i. Description: Minimum daily fire growth per event in square kilometers
 \n YY. Name: mu_grw_km2
 \n i. Description: Mean daily fire growth per event in square kilometers
 \n ZZ. Name: mx_grw_dte
 \n i. Description: Date of maximum fire growth
 \n AAA. Name: lc_code
 \n i. Description: Numeric code for the landcover type extracted from the MODIS landcover product for the year preceding the fire. 
 \n BBB. Name: lc_mode
 \n i. Description: Numeric code for the landcover type extracted from the MODIS landcover product for the year preceding the fire.
 \n CCC. Name: lc_name
 \n i. Description: Character string of the landcover type from the year before the fire. 
 \n DDD. Name: lc_desc
 \n i. Description: Character string description of the landcover type from the year before the fire. 
 \n EEE. Name: lc_type
 \n i. Description: The landcover classification scheme used
 \n FFF. Name: eco_mode
 \n i. Description: modal ecoregion type
 \n GGG. Name: eco_type
 \n i. Description: modal ecoregion type
 \n HHH. Name: eco_name
 \n i. Description: Character string of the landcover type from the year before the fire. 
 \n III. Name: ig_utm_x
 \n i. Description: estimated ignition x coordinate
 \n JJJ. Name: ig_utm_y
 \n i. Description: estimated ignition y coordinate
""", file = text_file)
68.072917
1,114
0.628513
2,837
19,605
4.237575
0.135354
0.046581
0.068874
0.063633
0.85094
0.836383
0.81459
0.802196
0.769672
0.749875
0
0.017685
0.264524
19,605
287
1,115
68.310105
0.815937
0
0
0.392308
0
0.103846
0.720632
0.022902
0
0
0
0
0
1
0.003846
false
0.023077
0.019231
0
0.023077
0.265385
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
a9ec950c55b192b6ce1277176c70bc172e59f1fc
895
py
Python
background.py
robijn112/opseilen
f17a95cd5166a0ae4ca0929081f4f0311e6b9f82
[ "MIT" ]
2
2017-01-17T12:53:41.000Z
2017-02-02T08:59:10.000Z
background.py
robijn112/opseilen
f17a95cd5166a0ae4ca0929081f4f0311e6b9f82
[ "MIT" ]
null
null
null
background.py
robijn112/opseilen
f17a95cd5166a0ae4ca0929081f4f0311e6b9f82
[ "MIT" ]
null
null
null
import pygame import math import sys import tower class frontlayer1: def __init__(self, x1, y1, x2, y2): self.x1 = x1 self.y1 = y1 self.x2 = x2 self.y2 = y2 def update(self): pass def draw(self, screen): pygame.draw.rect(screen, tower.white, (int(self.x1), int(self.y1), int(self.x2), int(self.y2))) class frontlayer2: def __init__(self, x1, y1, x2, y2): self.x1 = x1 self.y1 = y1 self.x2 = x2 self.y2 = y2 def update(self): pass def draw(self, screen): pygame.draw.rect(screen, tower.white, (int(self.x1), int(self.y1), int(self.x2), int(self.y2))) class frontlayer3: def __init__(self, x1, y1, x2, y2): self.x1 = x1 self.y1 = y1 self.x2 = x2 self.y2 = y2 def update(self): pass def draw(self, screen): pygame.draw.rect(screen, tower.white, (int(self.x1), int(self.y1), int(self.x2), int(self.y2)))
20.813953
98
0.620112
149
895
3.644295
0.154362
0.154696
0.060773
0.071823
0.85267
0.85267
0.85267
0.85267
0.85267
0.85267
0
0.073276
0.222346
895
42
99
21.309524
0.706897
0
0
0.794118
0
0
0
0
0
0
0
0
0
1
0.264706
false
0.088235
0.117647
0
0.470588
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
1
0
1
0
0
0
0
0
9
e72b626a364c28a41fe7aa2526924f83f39d279f
5,589
py
Python
tuta/model/pretrains.py
PseudoLabs-Demo/TUTA_table_understanding
d0f3fe2f15c56a5ea9f593b210296f170fc74558
[ "MIT" ]
36
2021-06-15T01:04:27.000Z
2022-03-19T16:36:54.000Z
tuta/model/pretrains.py
PseudoLabs-Demo/TUTA_table_understanding
d0f3fe2f15c56a5ea9f593b210296f170fc74558
[ "MIT" ]
6
2021-09-03T11:29:36.000Z
2021-12-15T11:33:57.000Z
tuta/model/pretrains.py
PseudoLabs-Demo/TUTA_table_understanding
d0f3fe2f15c56a5ea9f593b210296f170fc74558
[ "MIT" ]
8
2021-11-03T04:32:36.000Z
2022-02-02T13:43:47.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Aggregated Model Frameworks for Pre-Training. """ import torch.nn as nn import model.heads as hds import model.backbones as bbs # %% Pre-training Models class TUTAbase(nn.Module): def __init__(self, config): super(TUTAbase, self).__init__() self.backbone = bbs.BbForBase(config) self.mlm_head = hds.MlmHead(config) self.clc_head = hds.ClcHead(config) self.tcr_head = hds.TcrHead(config) def forward(self, token_id, num_mag, num_pre, num_top, num_low, token_order, pos_top, pos_left, format_vec, indicator, mlm_label, clc_label, tcr_label ): encoded_states = self.backbone( token_id=token_id, num_mag=num_mag, num_pre=num_pre, num_top=num_top, num_low=num_low, token_order=token_order, pos_top=pos_top, pos_left=pos_left, format_vec=format_vec, indicator=indicator) mlm_triple = self.mlm_head(encoded_states, mlm_label) sep_triple, tok_triple = self.clc_head(encoded_states, indicator, clc_label) tcr_triple = self.tcr_head(encoded_states, indicator, tcr_label) return mlm_triple, sep_triple, tok_triple, tcr_triple class TUTA(nn.Module): def __init__(self, config): super(TUTA, self).__init__() self.backbone = bbs.BACKBONES[config.target](config) self.mlm_head = hds.MlmHead(config) self.clc_head = hds.ClcHead(config) self.tcr_head = hds.TcrHead(config) def forward(self, token_id, num_mag, num_pre, num_top, num_low, token_order, pos_row, pos_col, pos_top, pos_left, format_vec, indicator, mlm_label, clc_label, tcr_label ): encoded_states = self.backbone( token_id=token_id, num_mag=num_mag, num_pre=num_pre, num_top=num_top, num_low=num_low, token_order=token_order, pos_row=pos_row, pos_col=pos_col, pos_top=pos_top, pos_left=pos_left, format_vec=format_vec, indicator=indicator) mlm_triple = self.mlm_head(encoded_states, mlm_label) sep_triple, tok_triple = self.clc_head(encoded_states, indicator, clc_label) tcr_triple = self.tcr_head(encoded_states, indicator, tcr_label) return mlm_triple, sep_triple, tok_triple, tcr_triple MODELS = { "tuta": TUTA, "tuta_explicit": TUTA, "base": TUTAbase } # %% Dowsntream Models class TUTAforCTC(nn.Module): def __init__(self, config): super(TUTAforCTC, self).__init__() self.backbone = bbs.BBS[config.target](config) self.ctc_head = hds.CtcHead(config) def forward(self, token_id, num_mag, num_pre, num_top, num_low, token_order, pos_top, pos_left, format_vec, indicator, ctc_label ): encoded_states = self.backbone( token_id, num_mag, num_pre, num_top, num_low, token_order, pos_top, pos_left, format_vec, indicator ) sep_triple, tok_triple = self.ctc_head(encoded_states, indicator, ctc_label) return sep_triple, tok_triple class TUTAbaseforCTC(nn.Module): def __init__(self, config): super(nn.Module, self).__init__() self.backbone = bbs.BBS[config.target](config) self.ctc_head = hds.CtcHead(config) def forward(self, token_id, num_mag, num_pre, num_top, num_low, token_order, pos_row, pos_col, pos_top, pos_left, format_vec, indicator, ctc_label ): encoded_states = self.backbone( token_id, num_mag, num_pre, num_top, num_low, token_order, pos_row, pos_col, pos_top, pos_left, format_vec, indicator ) sep_triple, tok_triple = self.ctc_head(encoded_states, indicator, ctc_label) return sep_triple, tok_triple class TUTAForTTC(nn.Module): def __init__(self, config): super(TutaForTTC, self).__init__() self.backbone = bbs.BACKBONES[config.target](config) self.ttc_head = hds.TtcHead(config) def forward( self, token_id, num_mag, num_pre, num_top, num_low, token_order, pos_row, pos_col, pos_top, pos_left, format_vec, indicator, ttc_label ): encoded_states = self.backbone( token_id, num_mag, num_pre, num_top, num_low, token_order, pos_row, pos_col, pos_top, pos_left, format_vec, indicator ) loss, prediction = self.ttc_head(encoded_states, ttc_label) return loss, prediction, ttc_label class TUTAbaseforTTC(nn.Module): def __init__(self, config): super(TUTAbaseforTTC, self).__init__() self.backbone = bbs.BACKBONES[config.target](config) self.ttc_head = hds.TtcHead(config) def forward( self, token_id, num_mag, num_pre, num_top, num_low, token_order, pos_top, pos_left, format_vec, indicator, ttc_label ): encoded_states = self.backbone( token_id, num_mag, num_pre, num_top, num_low, token_order, pos_top, pos_left, format_vec, indicator ) loss, prediction = self.ttc_head(encoded_states, ttc_label) return loss, prediction, ttc_label
34.5
86
0.616926
712
5,589
4.462079
0.106742
0.065471
0.03966
0.049103
0.891092
0.877243
0.877243
0.820585
0.820585
0.820585
0
0.000507
0.293612
5,589
161
87
34.714286
0.804205
0.023976
0
0.732824
0
0
0.003974
0
0
0
0
0
0
1
0.091603
false
0
0.022901
0
0.206107
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
e7350f8ee4263b0943b308ef6ac203543d920844
128,126
py
Python
infoblox_netmri/api/broker/v3_6_0/device_setting_broker.py
IngmarVG-IB/infoblox-netmri
b0c725fd64aee1890d83917d911b89236207e564
[ "Apache-2.0" ]
null
null
null
infoblox_netmri/api/broker/v3_6_0/device_setting_broker.py
IngmarVG-IB/infoblox-netmri
b0c725fd64aee1890d83917d911b89236207e564
[ "Apache-2.0" ]
null
null
null
infoblox_netmri/api/broker/v3_6_0/device_setting_broker.py
IngmarVG-IB/infoblox-netmri
b0c725fd64aee1890d83917d911b89236207e564
[ "Apache-2.0" ]
null
null
null
from ..broker import Broker class DeviceSettingBroker(Broker): controller = "device_settings" def index(self, **kwargs): """Lists the available device settings. Any of the inputs listed may be be used to narrow the list; other inputs will be ignored. Of the various ways to query lists, using this method is most efficient. **Inputs** | ``api version min:`` 2.4 | ``api version max:`` 2.4 | ``required:`` False | ``default:`` None :param DeviceID: The internal NetMRI identifier of each device from which device setting was collected. :type DeviceID: Integer | ``api version min:`` 2.5 | ``api version max:`` None | ``required:`` False | ``default:`` None :param DeviceID: The internal NetMRI identifier of each device from which device setting was collected. :type DeviceID: Array of Integer | ``api version min:`` 2.4 | ``api version max:`` 2.4 | ``required:`` False | ``default:`` None :param DeviceSNMPCommunityReadSecure: The read operation of each device in SNMP community. :type DeviceSNMPCommunityReadSecure: String | ``api version min:`` 2.5 | ``api version max:`` None | ``required:`` False | ``default:`` None :param DeviceSNMPCommunityReadSecure: The read operation of each device in SNMP community. :type DeviceSNMPCommunityReadSecure: Array of String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param DeviceGroupID: The internal NetMRI identifier of the device groups to which to limit the results. :type DeviceGroupID: Array of Integer | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param timestamp: The data returned will represent the device settings as of this date and time. If omitted, the result will indicate the most recently collected data. :type timestamp: DateTime | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param methods: A list of device setting methods. The listed methods will be called on each device setting returned and included in the output. Available methods are: data_source. :type methods: Array of String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param include: A list of associated object types to include in the output. The listed associations will be returned as outputs named according to the association name (see outputs below). Available includes are: data_source. :type include: Array of String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` 0 :param start: The record number to return in the selected page of data. It will always appear, although it may not be the first record. See the :limit for more information. :type start: Integer | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` 1000 :param limit: The size of the page of data, that is, the maximum number of records returned. The limit size will be used to break the data up into pages and the first page with the start record will be returned. So if you have 100 records and use a :limit of 10 and a :start of 10, you will get records 10-19. The maximum limit is 10000. :type limit: Integer | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` DeviceID :param sort: The data field(s) to use for sorting the output. Default is DeviceID. Valid values are DataSourceID, DeviceID, DevSetStartTime, DevSetEndTime, DevSetChangedCols, DevSetTimestamp, DeviceSNMPVersion, DeviceSNMP3AuthProto, DeviceSNMP3PrivProto, DeviceSNMPTimestamp, DeviceSNMPCommunityReadSource, DeviceRespTime, DeviceRank, DeviceConfigLockLastChangeBy, DeviceConfigLockLastChangedTime, DeviceConfigLockedInd, DevicePrivilegedPollingInd, DeviceSNMPPollingInd, DeviceCLIPollingInd, DeviceConfigPollingInd, DevicePortScanningInd, DeviceSNMPAnalysisInd, DeviceFingerPrintInd, DeviceCCSCollectionInd, DeviceVendorDefaultCollectionInd, DeviceStandardsComplianceInd, DeviceLicensedInd, DeviceManagedInd, DeviceNetBIOSScanningInd, DevicePerfEnvPollingInd, SPMLicensedInd, ARPCacheRefreshInd, DeviceCommunitySecure, DeviceSNMPCommunityReadSecure, DeviceSNMPCommunityWriteSecure, DeviceSNMP3AuthPWSecure, DeviceSNMP3PrivPWSecure, SecureVersion, SAMLicensedInd, UseGlobalPolFreq, PolFreqModifier. :type sort: Array of String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` asc :param dir: The direction(s) in which to sort the data. Default is 'asc'. Valid values are 'asc' and 'desc'. :type dir: Array of String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param select: The list of attributes to return for each DeviceSetting. Valid values are DataSourceID, DeviceID, DevSetStartTime, DevSetEndTime, DevSetChangedCols, DevSetTimestamp, DeviceSNMPVersion, DeviceSNMP3AuthProto, DeviceSNMP3PrivProto, DeviceSNMPTimestamp, DeviceSNMPCommunityReadSource, DeviceRespTime, DeviceRank, DeviceConfigLockLastChangeBy, DeviceConfigLockLastChangedTime, DeviceConfigLockedInd, DevicePrivilegedPollingInd, DeviceSNMPPollingInd, DeviceCLIPollingInd, DeviceConfigPollingInd, DevicePortScanningInd, DeviceSNMPAnalysisInd, DeviceFingerPrintInd, DeviceCCSCollectionInd, DeviceVendorDefaultCollectionInd, DeviceStandardsComplianceInd, DeviceLicensedInd, DeviceManagedInd, DeviceNetBIOSScanningInd, DevicePerfEnvPollingInd, SPMLicensedInd, ARPCacheRefreshInd, DeviceCommunitySecure, DeviceSNMPCommunityReadSecure, DeviceSNMPCommunityWriteSecure, DeviceSNMP3AuthPWSecure, DeviceSNMP3PrivPWSecure, SecureVersion, SAMLicensedInd, UseGlobalPolFreq, PolFreqModifier. If empty or omitted, all attributes will be returned. :type select: Array | ``api version min:`` 2.8 | ``api version max:`` None | ``required:`` False | ``default:`` None :param goto_field: The field name for NIOS GOTO that is used for locating a row position of records. :type goto_field: String | ``api version min:`` 2.8 | ``api version max:`` None | ``required:`` False | ``default:`` None :param goto_value: The value of goto_field for NIOS GOTO that is used for locating a row position of records. :type goto_value: String **Outputs** | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :return device_settings: An array of the DeviceSetting objects that match the specified input criteria. :rtype device_settings: Array of DeviceSetting """ return self.api_list_request(self._get_method_fullname("index"), kwargs) def show(self, **kwargs): """Shows the details for the specified device setting. **Inputs** | ``api version min:`` None | ``api version max:`` None | ``required:`` True | ``default:`` None :param DeviceID: The internal NetMRI identifier of each device from which device setting was collected. :type DeviceID: Integer | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param methods: A list of device setting methods. The listed methods will be called on each device setting returned and included in the output. Available methods are: data_source. :type methods: Array of String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param include: A list of associated object types to include in the output. The listed associations will be returned as outputs named according to the association name (see outputs below). Available includes are: data_source. :type include: Array of String **Outputs** | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :return device_setting: The device setting identified by the specified DeviceID. :rtype device_setting: DeviceSetting """ return self.api_request(self._get_method_fullname("show"), kwargs) def search(self, **kwargs): """Lists the available device settings matching the input criteria. This method provides a more flexible search interface than the index method, but searching using this method is more demanding on the system and will not perform to the same level as the index method. The input fields listed below will be used as in the index method, to filter the result, along with the optional query string and XML filter described below. **Inputs** | ``api version min:`` 2.4 | ``api version max:`` 2.4 | ``required:`` False | ``default:`` None :param ARPCacheRefreshInd: A flag indicating if NetMRI refreshes ARP caches to aid in switch-port data collection. :type ARPCacheRefreshInd: Boolean | ``api version min:`` 2.5 | ``api version max:`` None | ``required:`` False | ``default:`` None :param ARPCacheRefreshInd: A flag indicating if NetMRI refreshes ARP caches to aid in switch-port data collection. :type ARPCacheRefreshInd: Array of Boolean | ``api version min:`` 2.4 | ``api version max:`` 2.4 | ``required:`` False | ``default:`` None :param DataSourceID: The internal NetMRI identifier for the collector NetMRI that collected this data record. :type DataSourceID: Integer | ``api version min:`` 2.5 | ``api version max:`` None | ``required:`` False | ``default:`` None :param DataSourceID: The internal NetMRI identifier for the collector NetMRI that collected this data record. :type DataSourceID: Array of Integer | ``api version min:`` 2.4 | ``api version max:`` 2.4 | ``required:`` False | ``default:`` None :param DevSetChangedCols: The fields that changed between this revision of the record and the previous revision. :type DevSetChangedCols: String | ``api version min:`` 2.5 | ``api version max:`` None | ``required:`` False | ``default:`` None :param DevSetChangedCols: The fields that changed between this revision of the record and the previous revision. :type DevSetChangedCols: Array of String | ``api version min:`` 2.4 | ``api version max:`` 2.4 | ``required:`` False | ``default:`` None :param DevSetEndTime: The ending effective time of this record, or empty if still in effect. :type DevSetEndTime: DateTime | ``api version min:`` 2.5 | ``api version max:`` None | ``required:`` False | ``default:`` None :param DevSetEndTime: The ending effective time of this record, or empty if still in effect. :type DevSetEndTime: Array of DateTime | ``api version min:`` 2.4 | ``api version max:`` 2.4 | ``required:`` False | ``default:`` None :param DevSetStartTime: The starting effective time of this record. :type DevSetStartTime: DateTime | ``api version min:`` 2.5 | ``api version max:`` None | ``required:`` False | ``default:`` None :param DevSetStartTime: The starting effective time of this record. :type DevSetStartTime: Array of DateTime | ``api version min:`` 2.4 | ``api version max:`` 2.4 | ``required:`` False | ``default:`` None :param DevSetTimestamp: The date and time this record was collected or calculated. :type DevSetTimestamp: DateTime | ``api version min:`` 2.5 | ``api version max:`` None | ``required:`` False | ``default:`` None :param DevSetTimestamp: The date and time this record was collected or calculated. :type DevSetTimestamp: Array of DateTime | ``api version min:`` 2.4 | ``api version max:`` 2.4 | ``required:`` False | ``default:`` None :param DeviceCCSCollectionInd: If true, then CCS scripts may be executed against the device. :type DeviceCCSCollectionInd: Boolean | ``api version min:`` 2.5 | ``api version max:`` None | ``required:`` False | ``default:`` None :param DeviceCCSCollectionInd: If true, then CCS scripts may be executed against the device. :type DeviceCCSCollectionInd: Array of Boolean | ``api version min:`` 2.4 | ``api version max:`` 2.4 | ``required:`` False | ``default:`` None :param DeviceCLIPollingInd: If true, than NetMRI CLI polling is enabled for the device. :type DeviceCLIPollingInd: Boolean | ``api version min:`` 2.5 | ``api version max:`` None | ``required:`` False | ``default:`` None :param DeviceCLIPollingInd: If true, than NetMRI CLI polling is enabled for the device. :type DeviceCLIPollingInd: Array of Boolean | ``api version min:`` 2.4 | ``api version max:`` 2.4 | ``required:`` False | ``default:`` None :param DeviceCommunitySecure: The SNMP read community string for the device. :type DeviceCommunitySecure: String | ``api version min:`` 2.5 | ``api version max:`` None | ``required:`` False | ``default:`` None :param DeviceCommunitySecure: The SNMP read community string for the device. :type DeviceCommunitySecure: Array of String | ``api version min:`` 2.4 | ``api version max:`` 2.4 | ``required:`` False | ``default:`` None :param DeviceConfigLockLastChangeBy: The user that last changed the configuration locked status of the device. :type DeviceConfigLockLastChangeBy: String | ``api version min:`` 2.5 | ``api version max:`` None | ``required:`` False | ``default:`` None :param DeviceConfigLockLastChangeBy: The user that last changed the configuration locked status of the device. :type DeviceConfigLockLastChangeBy: Array of String | ``api version min:`` 2.4 | ``api version max:`` 2.4 | ``required:`` False | ``default:`` None :param DeviceConfigLockLastChangedTime: The date/time of the last change to the configuration locked status of the device. :type DeviceConfigLockLastChangedTime: DateTime | ``api version min:`` 2.5 | ``api version max:`` None | ``required:`` False | ``default:`` None :param DeviceConfigLockLastChangedTime: The date/time of the last change to the configuration locked status of the device. :type DeviceConfigLockLastChangedTime: Array of DateTime | ``api version min:`` 2.4 | ``api version max:`` 2.4 | ``required:`` False | ``default:`` None :param DeviceConfigLockedInd: If true, then changes detected will be considered unauthorized. :type DeviceConfigLockedInd: Boolean | ``api version min:`` 2.5 | ``api version max:`` None | ``required:`` False | ``default:`` None :param DeviceConfigLockedInd: If true, then changes detected will be considered unauthorized. :type DeviceConfigLockedInd: Array of Boolean | ``api version min:`` 2.4 | ``api version max:`` 2.4 | ``required:`` False | ``default:`` None :param DeviceConfigPollingInd: If true, than NetMRI configuration collection is enabled for the device. :type DeviceConfigPollingInd: Boolean | ``api version min:`` 2.5 | ``api version max:`` None | ``required:`` False | ``default:`` None :param DeviceConfigPollingInd: If true, than NetMRI configuration collection is enabled for the device. :type DeviceConfigPollingInd: Array of Boolean | ``api version min:`` 2.4 | ``api version max:`` 2.4 | ``required:`` False | ``default:`` None :param DeviceFingerPrintInd: If true, then NetMRI fingerprinting is enabled for the device. :type DeviceFingerPrintInd: Boolean | ``api version min:`` 2.5 | ``api version max:`` None | ``required:`` False | ``default:`` None :param DeviceFingerPrintInd: If true, then NetMRI fingerprinting is enabled for the device. :type DeviceFingerPrintInd: Array of Boolean | ``api version min:`` 2.4 | ``api version max:`` 2.4 | ``required:`` False | ``default:`` None :param DeviceID: The internal NetMRI identifier of each device from which device setting was collected. :type DeviceID: Integer | ``api version min:`` 2.5 | ``api version max:`` None | ``required:`` False | ``default:`` None :param DeviceID: The internal NetMRI identifier of each device from which device setting was collected. :type DeviceID: Array of Integer | ``api version min:`` 2.4 | ``api version max:`` 2.4 | ``required:`` False | ``default:`` None :param DeviceLicensedInd: If true, then this device is licensed as a network device by NetMRI. :type DeviceLicensedInd: Boolean | ``api version min:`` 2.5 | ``api version max:`` None | ``required:`` False | ``default:`` None :param DeviceLicensedInd: If true, then this device is licensed as a network device by NetMRI. :type DeviceLicensedInd: Array of Boolean | ``api version min:`` 2.4 | ``api version max:`` 2.4 | ``required:`` False | ``default:`` None :param DeviceManagedInd: If true, then this device is managed. :type DeviceManagedInd: Boolean | ``api version min:`` 2.5 | ``api version max:`` None | ``required:`` False | ``default:`` None :param DeviceManagedInd: If true, then this device is managed. :type DeviceManagedInd: Array of Boolean | ``api version min:`` 2.4 | ``api version max:`` 2.4 | ``required:`` False | ``default:`` None :param DeviceNetBIOSScanningInd: A flag indicating if NetMRI scans for the NetBIOS name. :type DeviceNetBIOSScanningInd: Boolean | ``api version min:`` 2.5 | ``api version max:`` None | ``required:`` False | ``default:`` None :param DeviceNetBIOSScanningInd: A flag indicating if NetMRI scans for the NetBIOS name. :type DeviceNetBIOSScanningInd: Array of Boolean | ``api version min:`` 2.4 | ``api version max:`` 2.4 | ``required:`` False | ``default:`` None :param DevicePerfEnvPollingInd: A flag that indicates if Performance and Environment polling is enabled for this device. :type DevicePerfEnvPollingInd: Boolean | ``api version min:`` 2.5 | ``api version max:`` None | ``required:`` False | ``default:`` None :param DevicePerfEnvPollingInd: A flag that indicates if Performance and Environment polling is enabled for this device. :type DevicePerfEnvPollingInd: Array of Boolean | ``api version min:`` 2.4 | ``api version max:`` 2.4 | ``required:`` False | ``default:`` None :param DevicePortScanningInd: If true, than NetMRI port scanning is enabled for the device. :type DevicePortScanningInd: Boolean | ``api version min:`` 2.5 | ``api version max:`` None | ``required:`` False | ``default:`` None :param DevicePortScanningInd: If true, than NetMRI port scanning is enabled for the device. :type DevicePortScanningInd: Array of Boolean | ``api version min:`` 2.4 | ``api version max:`` 2.4 | ``required:`` False | ``default:`` None :param DevicePrivilegedPollingInd: A flag indicated that NetMRI should send enable command when interacting with device :type DevicePrivilegedPollingInd: Boolean | ``api version min:`` 2.5 | ``api version max:`` None | ``required:`` False | ``default:`` None :param DevicePrivilegedPollingInd: A flag indicated that NetMRI should send enable command when interacting with device :type DevicePrivilegedPollingInd: Array of Boolean | ``api version min:`` 2.4 | ``api version max:`` 2.4 | ``required:`` False | ``default:`` None :param DeviceRank: The device rank as set on the Device Viewer settings screen. :type DeviceRank: Integer | ``api version min:`` 2.5 | ``api version max:`` None | ``required:`` False | ``default:`` None :param DeviceRank: The device rank as set on the Device Viewer settings screen. :type DeviceRank: Array of Integer | ``api version min:`` 2.4 | ``api version max:`` 2.4 | ``required:`` False | ``default:`` None :param DeviceRespTime: The response time of the devices. :type DeviceRespTime: DateTime | ``api version min:`` 2.5 | ``api version max:`` None | ``required:`` False | ``default:`` None :param DeviceRespTime: The response time of the devices. :type DeviceRespTime: Array of DateTime | ``api version min:`` 2.4 | ``api version max:`` 2.4 | ``required:`` False | ``default:`` None :param DeviceSNMP3AuthPWSecure: The SNMP3 authentication password of the device. :type DeviceSNMP3AuthPWSecure: String | ``api version min:`` 2.5 | ``api version max:`` None | ``required:`` False | ``default:`` None :param DeviceSNMP3AuthPWSecure: The SNMP3 authentication password of the device. :type DeviceSNMP3AuthPWSecure: Array of String | ``api version min:`` 2.4 | ``api version max:`` 2.4 | ``required:`` False | ``default:`` None :param DeviceSNMP3AuthProto: The SNMP3 authentication protocol of the device. :type DeviceSNMP3AuthProto: String | ``api version min:`` 2.5 | ``api version max:`` None | ``required:`` False | ``default:`` None :param DeviceSNMP3AuthProto: The SNMP3 authentication protocol of the device. :type DeviceSNMP3AuthProto: Array of String | ``api version min:`` 2.4 | ``api version max:`` 2.4 | ``required:`` False | ``default:`` None :param DeviceSNMP3PrivPWSecure: The SNMP3 privilege password of the device. :type DeviceSNMP3PrivPWSecure: String | ``api version min:`` 2.5 | ``api version max:`` None | ``required:`` False | ``default:`` None :param DeviceSNMP3PrivPWSecure: The SNMP3 privilege password of the device. :type DeviceSNMP3PrivPWSecure: Array of String | ``api version min:`` 2.4 | ``api version max:`` 2.4 | ``required:`` False | ``default:`` None :param DeviceSNMP3PrivProto: The SNMP3 privilege protocol of the device. :type DeviceSNMP3PrivProto: String | ``api version min:`` 2.5 | ``api version max:`` None | ``required:`` False | ``default:`` None :param DeviceSNMP3PrivProto: The SNMP3 privilege protocol of the device. :type DeviceSNMP3PrivProto: Array of String | ``api version min:`` 2.4 | ``api version max:`` 2.4 | ``required:`` False | ``default:`` None :param DeviceSNMPAnalysisInd: If true, than NetMRI performs analysis on the device. NOTE: Despite the 'SNMP' in the name, this represents all analysis. :type DeviceSNMPAnalysisInd: Boolean | ``api version min:`` 2.5 | ``api version max:`` None | ``required:`` False | ``default:`` None :param DeviceSNMPAnalysisInd: If true, than NetMRI performs analysis on the device. NOTE: Despite the 'SNMP' in the name, this represents all analysis. :type DeviceSNMPAnalysisInd: Array of Boolean | ``api version min:`` 2.4 | ``api version max:`` 2.4 | ``required:`` False | ``default:`` None :param DeviceSNMPCommunityReadSecure: The read operation of each device in SNMP community. :type DeviceSNMPCommunityReadSecure: String | ``api version min:`` 2.5 | ``api version max:`` None | ``required:`` False | ``default:`` None :param DeviceSNMPCommunityReadSecure: The read operation of each device in SNMP community. :type DeviceSNMPCommunityReadSecure: Array of String | ``api version min:`` 2.4 | ``api version max:`` 2.4 | ``required:`` False | ``default:`` None :param DeviceSNMPCommunityReadSource: The read source of the SNMP community of devices. :type DeviceSNMPCommunityReadSource: String | ``api version min:`` 2.5 | ``api version max:`` None | ``required:`` False | ``default:`` None :param DeviceSNMPCommunityReadSource: The read source of the SNMP community of devices. :type DeviceSNMPCommunityReadSource: Array of String | ``api version min:`` 2.4 | ``api version max:`` 2.4 | ``required:`` False | ``default:`` None :param DeviceSNMPCommunityWriteSecure: The write operation of each device in SNMP community. :type DeviceSNMPCommunityWriteSecure: String | ``api version min:`` 2.5 | ``api version max:`` None | ``required:`` False | ``default:`` None :param DeviceSNMPCommunityWriteSecure: The write operation of each device in SNMP community. :type DeviceSNMPCommunityWriteSecure: Array of String | ``api version min:`` 2.4 | ``api version max:`` 2.4 | ``required:`` False | ``default:`` None :param DeviceSNMPPollingInd: If true, than NetMRI SNMP polling is enabled for the device. :type DeviceSNMPPollingInd: Boolean | ``api version min:`` 2.5 | ``api version max:`` None | ``required:`` False | ``default:`` None :param DeviceSNMPPollingInd: If true, than NetMRI SNMP polling is enabled for the device. :type DeviceSNMPPollingInd: Array of Boolean | ``api version min:`` 2.4 | ``api version max:`` 2.4 | ``required:`` False | ``default:`` None :param DeviceSNMPTimestamp: The date and time this record was collected or calculated. :type DeviceSNMPTimestamp: DateTime | ``api version min:`` 2.5 | ``api version max:`` None | ``required:`` False | ``default:`` None :param DeviceSNMPTimestamp: The date and time this record was collected or calculated. :type DeviceSNMPTimestamp: Array of DateTime | ``api version min:`` 2.4 | ``api version max:`` 2.4 | ``required:`` False | ``default:`` None :param DeviceSNMPVersion: The SNMP version of the device. :type DeviceSNMPVersion: String | ``api version min:`` 2.5 | ``api version max:`` None | ``required:`` False | ``default:`` None :param DeviceSNMPVersion: The SNMP version of the device. :type DeviceSNMPVersion: Array of String | ``api version min:`` 2.4 | ``api version max:`` 2.4 | ``required:`` False | ``default:`` None :param DeviceStandardsComplianceInd: If true, than this device should be considered during standards compliance checks. :type DeviceStandardsComplianceInd: Boolean | ``api version min:`` 2.5 | ``api version max:`` None | ``required:`` False | ``default:`` None :param DeviceStandardsComplianceInd: If true, than this device should be considered during standards compliance checks. :type DeviceStandardsComplianceInd: Array of Boolean | ``api version min:`` 2.4 | ``api version max:`` 2.4 | ``required:`` False | ``default:`` None :param DeviceVendorDefaultCollectionInd: If true, then NetMRI vendor default credential checking is enabled for the device. :type DeviceVendorDefaultCollectionInd: Boolean | ``api version min:`` 2.5 | ``api version max:`` None | ``required:`` False | ``default:`` None :param DeviceVendorDefaultCollectionInd: If true, then NetMRI vendor default credential checking is enabled for the device. :type DeviceVendorDefaultCollectionInd: Array of Boolean | ``api version min:`` 2.4 | ``api version max:`` 2.4 | ``required:`` False | ``default:`` None :param PolFreqModifier: Polling frequency modifier for this device. Actual polling frequency intervals for the device are calculated by multiplying the default intervals by this value. :type PolFreqModifier: Integer | ``api version min:`` 2.5 | ``api version max:`` None | ``required:`` False | ``default:`` None :param PolFreqModifier: Polling frequency modifier for this device. Actual polling frequency intervals for the device are calculated by multiplying the default intervals by this value. :type PolFreqModifier: Array of Integer | ``api version min:`` 2.4 | ``api version max:`` 2.4 | ``required:`` False | ``default:`` None :param SAMLicensedInd: This flag indicating if the Device Security Control enabled. :type SAMLicensedInd: String | ``api version min:`` 2.5 | ``api version max:`` None | ``required:`` False | ``default:`` None :param SAMLicensedInd: This flag indicating if the Device Security Control enabled. :type SAMLicensedInd: Array of String | ``api version min:`` 2.4 | ``api version max:`` 2.4 | ``required:`` False | ``default:`` None :param SPMLicensedInd: A flag indicating if the Device is licensed under the Switch Port Management module. :type SPMLicensedInd: Boolean | ``api version min:`` 2.5 | ``api version max:`` None | ``required:`` False | ``default:`` None :param SPMLicensedInd: A flag indicating if the Device is licensed under the Switch Port Management module. :type SPMLicensedInd: Array of Boolean | ``api version min:`` 2.4 | ``api version max:`` 2.4 | ``required:`` False | ``default:`` None :param SecureVersion: The encryption version of the username and passwords. :type SecureVersion: Integer | ``api version min:`` 2.5 | ``api version max:`` None | ``required:`` False | ``default:`` None :param SecureVersion: The encryption version of the username and passwords. :type SecureVersion: Array of Integer | ``api version min:`` 2.4 | ``api version max:`` 2.4 | ``required:`` False | ``default:`` None :param UseGlobalPolFreq: A flag indicating if Global Polling Frequency should be used instead Device Group Polling Frequency. :type UseGlobalPolFreq: Boolean | ``api version min:`` 2.5 | ``api version max:`` None | ``required:`` False | ``default:`` None :param UseGlobalPolFreq: A flag indicating if Global Polling Frequency should be used instead Device Group Polling Frequency. :type UseGlobalPolFreq: Array of Boolean | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param DeviceGroupID: The internal NetMRI identifier of the device groups to which to limit the results. :type DeviceGroupID: Array of Integer | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param timestamp: The data returned will represent the device settings as of this date and time. If omitted, the result will indicate the most recently collected data. :type timestamp: DateTime | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param methods: A list of device setting methods. The listed methods will be called on each device setting returned and included in the output. Available methods are: data_source. :type methods: Array of String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param include: A list of associated object types to include in the output. The listed associations will be returned as outputs named according to the association name (see outputs below). Available includes are: data_source. :type include: Array of String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` 0 :param start: The record number to return in the selected page of data. It will always appear, although it may not be the first record. See the :limit for more information. :type start: Integer | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` 1000 :param limit: The size of the page of data, that is, the maximum number of records returned. The limit size will be used to break the data up into pages and the first page with the start record will be returned. So if you have 100 records and use a :limit of 10 and a :start of 10, you will get records 10-19. The maximum limit is 10000. :type limit: Integer | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` DeviceID :param sort: The data field(s) to use for sorting the output. Default is DeviceID. Valid values are DataSourceID, DeviceID, DevSetStartTime, DevSetEndTime, DevSetChangedCols, DevSetTimestamp, DeviceSNMPVersion, DeviceSNMP3AuthProto, DeviceSNMP3PrivProto, DeviceSNMPTimestamp, DeviceSNMPCommunityReadSource, DeviceRespTime, DeviceRank, DeviceConfigLockLastChangeBy, DeviceConfigLockLastChangedTime, DeviceConfigLockedInd, DevicePrivilegedPollingInd, DeviceSNMPPollingInd, DeviceCLIPollingInd, DeviceConfigPollingInd, DevicePortScanningInd, DeviceSNMPAnalysisInd, DeviceFingerPrintInd, DeviceCCSCollectionInd, DeviceVendorDefaultCollectionInd, DeviceStandardsComplianceInd, DeviceLicensedInd, DeviceManagedInd, DeviceNetBIOSScanningInd, DevicePerfEnvPollingInd, SPMLicensedInd, ARPCacheRefreshInd, DeviceCommunitySecure, DeviceSNMPCommunityReadSecure, DeviceSNMPCommunityWriteSecure, DeviceSNMP3AuthPWSecure, DeviceSNMP3PrivPWSecure, SecureVersion, SAMLicensedInd, UseGlobalPolFreq, PolFreqModifier. :type sort: Array of String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` asc :param dir: The direction(s) in which to sort the data. Default is 'asc'. Valid values are 'asc' and 'desc'. :type dir: Array of String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param select: The list of attributes to return for each DeviceSetting. Valid values are DataSourceID, DeviceID, DevSetStartTime, DevSetEndTime, DevSetChangedCols, DevSetTimestamp, DeviceSNMPVersion, DeviceSNMP3AuthProto, DeviceSNMP3PrivProto, DeviceSNMPTimestamp, DeviceSNMPCommunityReadSource, DeviceRespTime, DeviceRank, DeviceConfigLockLastChangeBy, DeviceConfigLockLastChangedTime, DeviceConfigLockedInd, DevicePrivilegedPollingInd, DeviceSNMPPollingInd, DeviceCLIPollingInd, DeviceConfigPollingInd, DevicePortScanningInd, DeviceSNMPAnalysisInd, DeviceFingerPrintInd, DeviceCCSCollectionInd, DeviceVendorDefaultCollectionInd, DeviceStandardsComplianceInd, DeviceLicensedInd, DeviceManagedInd, DeviceNetBIOSScanningInd, DevicePerfEnvPollingInd, SPMLicensedInd, ARPCacheRefreshInd, DeviceCommunitySecure, DeviceSNMPCommunityReadSecure, DeviceSNMPCommunityWriteSecure, DeviceSNMP3AuthPWSecure, DeviceSNMP3PrivPWSecure, SecureVersion, SAMLicensedInd, UseGlobalPolFreq, PolFreqModifier. If empty or omitted, all attributes will be returned. :type select: Array | ``api version min:`` 2.8 | ``api version max:`` None | ``required:`` False | ``default:`` None :param goto_field: The field name for NIOS GOTO that is used for locating a row position of records. :type goto_field: String | ``api version min:`` 2.8 | ``api version max:`` None | ``required:`` False | ``default:`` None :param goto_value: The value of goto_field for NIOS GOTO that is used for locating a row position of records. :type goto_value: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param query: This value will be matched against device settings, looking to see if one or more of the listed attributes contain the passed value. You may also surround the value with '/' and '/' to perform a regular expression search rather than a containment operation. Any record that matches will be returned. The attributes searched are: ARPCacheRefreshInd, DataSourceID, DevSetChangedCols, DevSetEndTime, DevSetStartTime, DevSetTimestamp, DeviceCCSCollectionInd, DeviceCLIPollingInd, DeviceCommunitySecure, DeviceConfigLockLastChangeBy, DeviceConfigLockLastChangedTime, DeviceConfigLockedInd, DeviceConfigPollingInd, DeviceFingerPrintInd, DeviceID, DeviceLicensedInd, DeviceManagedInd, DeviceNetBIOSScanningInd, DevicePerfEnvPollingInd, DevicePortScanningInd, DevicePrivilegedPollingInd, DeviceRank, DeviceRespTime, DeviceSNMP3AuthPWSecure, DeviceSNMP3AuthProto, DeviceSNMP3PrivPWSecure, DeviceSNMP3PrivProto, DeviceSNMPAnalysisInd, DeviceSNMPCommunityReadSecure, DeviceSNMPCommunityReadSource, DeviceSNMPCommunityWriteSecure, DeviceSNMPPollingInd, DeviceSNMPTimestamp, DeviceSNMPVersion, DeviceStandardsComplianceInd, DeviceVendorDefaultCollectionInd, PolFreqModifier, SAMLicensedInd, SPMLicensedInd, SecureVersion, UseGlobalPolFreq. :type query: String | ``api version min:`` 2.3 | ``api version max:`` None | ``required:`` False | ``default:`` None :param xml_filter: A SetFilter XML structure to further refine the search. The SetFilter will be applied AFTER any search query or field values, but before any limit options. The limit and pagination will be enforced after the filter. Remind that this kind of filter may be costly and inefficient if not associated with a database filtering. :type xml_filter: String **Outputs** | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :return device_settings: An array of the DeviceSetting objects that match the specified input criteria. :rtype device_settings: Array of DeviceSetting """ return self.api_list_request(self._get_method_fullname("search"), kwargs) def find(self, **kwargs): """Lists the available device settings matching the input specification. This provides the most flexible search specification of all the query mechanisms, enabling searching using comparison operations other than equality. However, it is more complex to use and will not perform as efficiently as the index or search methods. In the input descriptions below, 'field names' refers to the following fields: ARPCacheRefreshInd, DataSourceID, DevSetChangedCols, DevSetEndTime, DevSetStartTime, DevSetTimestamp, DeviceCCSCollectionInd, DeviceCLIPollingInd, DeviceCommunitySecure, DeviceConfigLockLastChangeBy, DeviceConfigLockLastChangedTime, DeviceConfigLockedInd, DeviceConfigPollingInd, DeviceFingerPrintInd, DeviceID, DeviceLicensedInd, DeviceManagedInd, DeviceNetBIOSScanningInd, DevicePerfEnvPollingInd, DevicePortScanningInd, DevicePrivilegedPollingInd, DeviceRank, DeviceRespTime, DeviceSNMP3AuthPWSecure, DeviceSNMP3AuthProto, DeviceSNMP3PrivPWSecure, DeviceSNMP3PrivProto, DeviceSNMPAnalysisInd, DeviceSNMPCommunityReadSecure, DeviceSNMPCommunityReadSource, DeviceSNMPCommunityWriteSecure, DeviceSNMPPollingInd, DeviceSNMPTimestamp, DeviceSNMPVersion, DeviceStandardsComplianceInd, DeviceVendorDefaultCollectionInd, PolFreqModifier, SAMLicensedInd, SPMLicensedInd, SecureVersion, UseGlobalPolFreq. **Inputs** | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param op_ARPCacheRefreshInd: The operator to apply to the field ARPCacheRefreshInd. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. ARPCacheRefreshInd: A flag indicating if NetMRI refreshes ARP caches to aid in switch-port data collection. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values. :type op_ARPCacheRefreshInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_f_ARPCacheRefreshInd: If op_ARPCacheRefreshInd is specified, the field named in this input will be compared to the value in ARPCacheRefreshInd using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_ARPCacheRefreshInd must be specified if op_ARPCacheRefreshInd is specified. :type val_f_ARPCacheRefreshInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_c_ARPCacheRefreshInd: If op_ARPCacheRefreshInd is specified, this value will be compared to the value in ARPCacheRefreshInd using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_ARPCacheRefreshInd must be specified if op_ARPCacheRefreshInd is specified. :type val_c_ARPCacheRefreshInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param op_DataSourceID: The operator to apply to the field DataSourceID. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. DataSourceID: The internal NetMRI identifier for the collector NetMRI that collected this data record. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values. :type op_DataSourceID: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_f_DataSourceID: If op_DataSourceID is specified, the field named in this input will be compared to the value in DataSourceID using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_DataSourceID must be specified if op_DataSourceID is specified. :type val_f_DataSourceID: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_c_DataSourceID: If op_DataSourceID is specified, this value will be compared to the value in DataSourceID using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_DataSourceID must be specified if op_DataSourceID is specified. :type val_c_DataSourceID: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param op_DevSetChangedCols: The operator to apply to the field DevSetChangedCols. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. DevSetChangedCols: The fields that changed between this revision of the record and the previous revision. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values. :type op_DevSetChangedCols: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_f_DevSetChangedCols: If op_DevSetChangedCols is specified, the field named in this input will be compared to the value in DevSetChangedCols using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_DevSetChangedCols must be specified if op_DevSetChangedCols is specified. :type val_f_DevSetChangedCols: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_c_DevSetChangedCols: If op_DevSetChangedCols is specified, this value will be compared to the value in DevSetChangedCols using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_DevSetChangedCols must be specified if op_DevSetChangedCols is specified. :type val_c_DevSetChangedCols: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param op_DevSetEndTime: The operator to apply to the field DevSetEndTime. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. DevSetEndTime: The ending effective time of this record, or empty if still in effect. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values. :type op_DevSetEndTime: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_f_DevSetEndTime: If op_DevSetEndTime is specified, the field named in this input will be compared to the value in DevSetEndTime using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_DevSetEndTime must be specified if op_DevSetEndTime is specified. :type val_f_DevSetEndTime: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_c_DevSetEndTime: If op_DevSetEndTime is specified, this value will be compared to the value in DevSetEndTime using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_DevSetEndTime must be specified if op_DevSetEndTime is specified. :type val_c_DevSetEndTime: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param op_DevSetStartTime: The operator to apply to the field DevSetStartTime. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. DevSetStartTime: The starting effective time of this record. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values. :type op_DevSetStartTime: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_f_DevSetStartTime: If op_DevSetStartTime is specified, the field named in this input will be compared to the value in DevSetStartTime using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_DevSetStartTime must be specified if op_DevSetStartTime is specified. :type val_f_DevSetStartTime: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_c_DevSetStartTime: If op_DevSetStartTime is specified, this value will be compared to the value in DevSetStartTime using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_DevSetStartTime must be specified if op_DevSetStartTime is specified. :type val_c_DevSetStartTime: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param op_DevSetTimestamp: The operator to apply to the field DevSetTimestamp. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. DevSetTimestamp: The date and time this record was collected or calculated. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values. :type op_DevSetTimestamp: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_f_DevSetTimestamp: If op_DevSetTimestamp is specified, the field named in this input will be compared to the value in DevSetTimestamp using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_DevSetTimestamp must be specified if op_DevSetTimestamp is specified. :type val_f_DevSetTimestamp: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_c_DevSetTimestamp: If op_DevSetTimestamp is specified, this value will be compared to the value in DevSetTimestamp using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_DevSetTimestamp must be specified if op_DevSetTimestamp is specified. :type val_c_DevSetTimestamp: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param op_DeviceCCSCollectionInd: The operator to apply to the field DeviceCCSCollectionInd. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. DeviceCCSCollectionInd: If true, then CCS scripts may be executed against the device. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values. :type op_DeviceCCSCollectionInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_f_DeviceCCSCollectionInd: If op_DeviceCCSCollectionInd is specified, the field named in this input will be compared to the value in DeviceCCSCollectionInd using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_DeviceCCSCollectionInd must be specified if op_DeviceCCSCollectionInd is specified. :type val_f_DeviceCCSCollectionInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_c_DeviceCCSCollectionInd: If op_DeviceCCSCollectionInd is specified, this value will be compared to the value in DeviceCCSCollectionInd using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_DeviceCCSCollectionInd must be specified if op_DeviceCCSCollectionInd is specified. :type val_c_DeviceCCSCollectionInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param op_DeviceCLIPollingInd: The operator to apply to the field DeviceCLIPollingInd. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. DeviceCLIPollingInd: If true, than NetMRI CLI polling is enabled for the device. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values. :type op_DeviceCLIPollingInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_f_DeviceCLIPollingInd: If op_DeviceCLIPollingInd is specified, the field named in this input will be compared to the value in DeviceCLIPollingInd using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_DeviceCLIPollingInd must be specified if op_DeviceCLIPollingInd is specified. :type val_f_DeviceCLIPollingInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_c_DeviceCLIPollingInd: If op_DeviceCLIPollingInd is specified, this value will be compared to the value in DeviceCLIPollingInd using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_DeviceCLIPollingInd must be specified if op_DeviceCLIPollingInd is specified. :type val_c_DeviceCLIPollingInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param op_DeviceCommunitySecure: The operator to apply to the field DeviceCommunitySecure. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. DeviceCommunitySecure: The SNMP read community string for the device. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values. :type op_DeviceCommunitySecure: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_f_DeviceCommunitySecure: If op_DeviceCommunitySecure is specified, the field named in this input will be compared to the value in DeviceCommunitySecure using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_DeviceCommunitySecure must be specified if op_DeviceCommunitySecure is specified. :type val_f_DeviceCommunitySecure: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_c_DeviceCommunitySecure: If op_DeviceCommunitySecure is specified, this value will be compared to the value in DeviceCommunitySecure using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_DeviceCommunitySecure must be specified if op_DeviceCommunitySecure is specified. :type val_c_DeviceCommunitySecure: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param op_DeviceConfigLockLastChangeBy: The operator to apply to the field DeviceConfigLockLastChangeBy. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. DeviceConfigLockLastChangeBy: The user that last changed the configuration locked status of the device. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values. :type op_DeviceConfigLockLastChangeBy: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_f_DeviceConfigLockLastChangeBy: If op_DeviceConfigLockLastChangeBy is specified, the field named in this input will be compared to the value in DeviceConfigLockLastChangeBy using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_DeviceConfigLockLastChangeBy must be specified if op_DeviceConfigLockLastChangeBy is specified. :type val_f_DeviceConfigLockLastChangeBy: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_c_DeviceConfigLockLastChangeBy: If op_DeviceConfigLockLastChangeBy is specified, this value will be compared to the value in DeviceConfigLockLastChangeBy using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_DeviceConfigLockLastChangeBy must be specified if op_DeviceConfigLockLastChangeBy is specified. :type val_c_DeviceConfigLockLastChangeBy: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param op_DeviceConfigLockLastChangedTime: The operator to apply to the field DeviceConfigLockLastChangedTime. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. DeviceConfigLockLastChangedTime: The date/time of the last change to the configuration locked status of the device. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values. :type op_DeviceConfigLockLastChangedTime: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_f_DeviceConfigLockLastChangedTime: If op_DeviceConfigLockLastChangedTime is specified, the field named in this input will be compared to the value in DeviceConfigLockLastChangedTime using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_DeviceConfigLockLastChangedTime must be specified if op_DeviceConfigLockLastChangedTime is specified. :type val_f_DeviceConfigLockLastChangedTime: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_c_DeviceConfigLockLastChangedTime: If op_DeviceConfigLockLastChangedTime is specified, this value will be compared to the value in DeviceConfigLockLastChangedTime using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_DeviceConfigLockLastChangedTime must be specified if op_DeviceConfigLockLastChangedTime is specified. :type val_c_DeviceConfigLockLastChangedTime: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param op_DeviceConfigLockedInd: The operator to apply to the field DeviceConfigLockedInd. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. DeviceConfigLockedInd: If true, then changes detected will be considered unauthorized. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values. :type op_DeviceConfigLockedInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_f_DeviceConfigLockedInd: If op_DeviceConfigLockedInd is specified, the field named in this input will be compared to the value in DeviceConfigLockedInd using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_DeviceConfigLockedInd must be specified if op_DeviceConfigLockedInd is specified. :type val_f_DeviceConfigLockedInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_c_DeviceConfigLockedInd: If op_DeviceConfigLockedInd is specified, this value will be compared to the value in DeviceConfigLockedInd using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_DeviceConfigLockedInd must be specified if op_DeviceConfigLockedInd is specified. :type val_c_DeviceConfigLockedInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param op_DeviceConfigPollingInd: The operator to apply to the field DeviceConfigPollingInd. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. DeviceConfigPollingInd: If true, than NetMRI configuration collection is enabled for the device. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values. :type op_DeviceConfigPollingInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_f_DeviceConfigPollingInd: If op_DeviceConfigPollingInd is specified, the field named in this input will be compared to the value in DeviceConfigPollingInd using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_DeviceConfigPollingInd must be specified if op_DeviceConfigPollingInd is specified. :type val_f_DeviceConfigPollingInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_c_DeviceConfigPollingInd: If op_DeviceConfigPollingInd is specified, this value will be compared to the value in DeviceConfigPollingInd using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_DeviceConfigPollingInd must be specified if op_DeviceConfigPollingInd is specified. :type val_c_DeviceConfigPollingInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param op_DeviceFingerPrintInd: The operator to apply to the field DeviceFingerPrintInd. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. DeviceFingerPrintInd: If true, then NetMRI fingerprinting is enabled for the device. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values. :type op_DeviceFingerPrintInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_f_DeviceFingerPrintInd: If op_DeviceFingerPrintInd is specified, the field named in this input will be compared to the value in DeviceFingerPrintInd using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_DeviceFingerPrintInd must be specified if op_DeviceFingerPrintInd is specified. :type val_f_DeviceFingerPrintInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_c_DeviceFingerPrintInd: If op_DeviceFingerPrintInd is specified, this value will be compared to the value in DeviceFingerPrintInd using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_DeviceFingerPrintInd must be specified if op_DeviceFingerPrintInd is specified. :type val_c_DeviceFingerPrintInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param op_DeviceID: The operator to apply to the field DeviceID. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. DeviceID: The internal NetMRI identifier of each device from which device setting was collected. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values. :type op_DeviceID: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_f_DeviceID: If op_DeviceID is specified, the field named in this input will be compared to the value in DeviceID using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_DeviceID must be specified if op_DeviceID is specified. :type val_f_DeviceID: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_c_DeviceID: If op_DeviceID is specified, this value will be compared to the value in DeviceID using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_DeviceID must be specified if op_DeviceID is specified. :type val_c_DeviceID: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param op_DeviceLicensedInd: The operator to apply to the field DeviceLicensedInd. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. DeviceLicensedInd: If true, then this device is licensed as a network device by NetMRI. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values. :type op_DeviceLicensedInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_f_DeviceLicensedInd: If op_DeviceLicensedInd is specified, the field named in this input will be compared to the value in DeviceLicensedInd using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_DeviceLicensedInd must be specified if op_DeviceLicensedInd is specified. :type val_f_DeviceLicensedInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_c_DeviceLicensedInd: If op_DeviceLicensedInd is specified, this value will be compared to the value in DeviceLicensedInd using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_DeviceLicensedInd must be specified if op_DeviceLicensedInd is specified. :type val_c_DeviceLicensedInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param op_DeviceManagedInd: The operator to apply to the field DeviceManagedInd. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. DeviceManagedInd: If true, then this device is managed. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values. :type op_DeviceManagedInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_f_DeviceManagedInd: If op_DeviceManagedInd is specified, the field named in this input will be compared to the value in DeviceManagedInd using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_DeviceManagedInd must be specified if op_DeviceManagedInd is specified. :type val_f_DeviceManagedInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_c_DeviceManagedInd: If op_DeviceManagedInd is specified, this value will be compared to the value in DeviceManagedInd using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_DeviceManagedInd must be specified if op_DeviceManagedInd is specified. :type val_c_DeviceManagedInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param op_DeviceNetBIOSScanningInd: The operator to apply to the field DeviceNetBIOSScanningInd. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. DeviceNetBIOSScanningInd: A flag indicating if NetMRI scans for the NetBIOS name. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values. :type op_DeviceNetBIOSScanningInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_f_DeviceNetBIOSScanningInd: If op_DeviceNetBIOSScanningInd is specified, the field named in this input will be compared to the value in DeviceNetBIOSScanningInd using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_DeviceNetBIOSScanningInd must be specified if op_DeviceNetBIOSScanningInd is specified. :type val_f_DeviceNetBIOSScanningInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_c_DeviceNetBIOSScanningInd: If op_DeviceNetBIOSScanningInd is specified, this value will be compared to the value in DeviceNetBIOSScanningInd using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_DeviceNetBIOSScanningInd must be specified if op_DeviceNetBIOSScanningInd is specified. :type val_c_DeviceNetBIOSScanningInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param op_DevicePerfEnvPollingInd: The operator to apply to the field DevicePerfEnvPollingInd. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. DevicePerfEnvPollingInd: A flag that indicates if Performance and Environment polling is enabled for this device. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values. :type op_DevicePerfEnvPollingInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_f_DevicePerfEnvPollingInd: If op_DevicePerfEnvPollingInd is specified, the field named in this input will be compared to the value in DevicePerfEnvPollingInd using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_DevicePerfEnvPollingInd must be specified if op_DevicePerfEnvPollingInd is specified. :type val_f_DevicePerfEnvPollingInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_c_DevicePerfEnvPollingInd: If op_DevicePerfEnvPollingInd is specified, this value will be compared to the value in DevicePerfEnvPollingInd using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_DevicePerfEnvPollingInd must be specified if op_DevicePerfEnvPollingInd is specified. :type val_c_DevicePerfEnvPollingInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param op_DevicePortScanningInd: The operator to apply to the field DevicePortScanningInd. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. DevicePortScanningInd: If true, than NetMRI port scanning is enabled for the device. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values. :type op_DevicePortScanningInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_f_DevicePortScanningInd: If op_DevicePortScanningInd is specified, the field named in this input will be compared to the value in DevicePortScanningInd using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_DevicePortScanningInd must be specified if op_DevicePortScanningInd is specified. :type val_f_DevicePortScanningInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_c_DevicePortScanningInd: If op_DevicePortScanningInd is specified, this value will be compared to the value in DevicePortScanningInd using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_DevicePortScanningInd must be specified if op_DevicePortScanningInd is specified. :type val_c_DevicePortScanningInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param op_DevicePrivilegedPollingInd: The operator to apply to the field DevicePrivilegedPollingInd. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. DevicePrivilegedPollingInd: A flag indicated that NetMRI should send enable command when interacting with device For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values. :type op_DevicePrivilegedPollingInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_f_DevicePrivilegedPollingInd: If op_DevicePrivilegedPollingInd is specified, the field named in this input will be compared to the value in DevicePrivilegedPollingInd using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_DevicePrivilegedPollingInd must be specified if op_DevicePrivilegedPollingInd is specified. :type val_f_DevicePrivilegedPollingInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_c_DevicePrivilegedPollingInd: If op_DevicePrivilegedPollingInd is specified, this value will be compared to the value in DevicePrivilegedPollingInd using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_DevicePrivilegedPollingInd must be specified if op_DevicePrivilegedPollingInd is specified. :type val_c_DevicePrivilegedPollingInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param op_DeviceRank: The operator to apply to the field DeviceRank. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. DeviceRank: The device rank as set on the Device Viewer settings screen. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values. :type op_DeviceRank: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_f_DeviceRank: If op_DeviceRank is specified, the field named in this input will be compared to the value in DeviceRank using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_DeviceRank must be specified if op_DeviceRank is specified. :type val_f_DeviceRank: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_c_DeviceRank: If op_DeviceRank is specified, this value will be compared to the value in DeviceRank using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_DeviceRank must be specified if op_DeviceRank is specified. :type val_c_DeviceRank: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param op_DeviceRespTime: The operator to apply to the field DeviceRespTime. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. DeviceRespTime: The response time of the devices. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values. :type op_DeviceRespTime: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_f_DeviceRespTime: If op_DeviceRespTime is specified, the field named in this input will be compared to the value in DeviceRespTime using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_DeviceRespTime must be specified if op_DeviceRespTime is specified. :type val_f_DeviceRespTime: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_c_DeviceRespTime: If op_DeviceRespTime is specified, this value will be compared to the value in DeviceRespTime using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_DeviceRespTime must be specified if op_DeviceRespTime is specified. :type val_c_DeviceRespTime: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param op_DeviceSNMP3AuthPWSecure: The operator to apply to the field DeviceSNMP3AuthPWSecure. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. DeviceSNMP3AuthPWSecure: The SNMP3 authentication password of the device. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values. :type op_DeviceSNMP3AuthPWSecure: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_f_DeviceSNMP3AuthPWSecure: If op_DeviceSNMP3AuthPWSecure is specified, the field named in this input will be compared to the value in DeviceSNMP3AuthPWSecure using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_DeviceSNMP3AuthPWSecure must be specified if op_DeviceSNMP3AuthPWSecure is specified. :type val_f_DeviceSNMP3AuthPWSecure: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_c_DeviceSNMP3AuthPWSecure: If op_DeviceSNMP3AuthPWSecure is specified, this value will be compared to the value in DeviceSNMP3AuthPWSecure using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_DeviceSNMP3AuthPWSecure must be specified if op_DeviceSNMP3AuthPWSecure is specified. :type val_c_DeviceSNMP3AuthPWSecure: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param op_DeviceSNMP3AuthProto: The operator to apply to the field DeviceSNMP3AuthProto. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. DeviceSNMP3AuthProto: The SNMP3 authentication protocol of the device. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values. :type op_DeviceSNMP3AuthProto: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_f_DeviceSNMP3AuthProto: If op_DeviceSNMP3AuthProto is specified, the field named in this input will be compared to the value in DeviceSNMP3AuthProto using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_DeviceSNMP3AuthProto must be specified if op_DeviceSNMP3AuthProto is specified. :type val_f_DeviceSNMP3AuthProto: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_c_DeviceSNMP3AuthProto: If op_DeviceSNMP3AuthProto is specified, this value will be compared to the value in DeviceSNMP3AuthProto using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_DeviceSNMP3AuthProto must be specified if op_DeviceSNMP3AuthProto is specified. :type val_c_DeviceSNMP3AuthProto: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param op_DeviceSNMP3PrivPWSecure: The operator to apply to the field DeviceSNMP3PrivPWSecure. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. DeviceSNMP3PrivPWSecure: The SNMP3 privilege password of the device. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values. :type op_DeviceSNMP3PrivPWSecure: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_f_DeviceSNMP3PrivPWSecure: If op_DeviceSNMP3PrivPWSecure is specified, the field named in this input will be compared to the value in DeviceSNMP3PrivPWSecure using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_DeviceSNMP3PrivPWSecure must be specified if op_DeviceSNMP3PrivPWSecure is specified. :type val_f_DeviceSNMP3PrivPWSecure: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_c_DeviceSNMP3PrivPWSecure: If op_DeviceSNMP3PrivPWSecure is specified, this value will be compared to the value in DeviceSNMP3PrivPWSecure using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_DeviceSNMP3PrivPWSecure must be specified if op_DeviceSNMP3PrivPWSecure is specified. :type val_c_DeviceSNMP3PrivPWSecure: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param op_DeviceSNMP3PrivProto: The operator to apply to the field DeviceSNMP3PrivProto. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. DeviceSNMP3PrivProto: The SNMP3 privilege protocol of the device. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values. :type op_DeviceSNMP3PrivProto: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_f_DeviceSNMP3PrivProto: If op_DeviceSNMP3PrivProto is specified, the field named in this input will be compared to the value in DeviceSNMP3PrivProto using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_DeviceSNMP3PrivProto must be specified if op_DeviceSNMP3PrivProto is specified. :type val_f_DeviceSNMP3PrivProto: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_c_DeviceSNMP3PrivProto: If op_DeviceSNMP3PrivProto is specified, this value will be compared to the value in DeviceSNMP3PrivProto using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_DeviceSNMP3PrivProto must be specified if op_DeviceSNMP3PrivProto is specified. :type val_c_DeviceSNMP3PrivProto: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param op_DeviceSNMPAnalysisInd: The operator to apply to the field DeviceSNMPAnalysisInd. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. DeviceSNMPAnalysisInd: If true, than NetMRI performs analysis on the device. NOTE: Despite the 'SNMP' in the name, this represents all analysis. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values. :type op_DeviceSNMPAnalysisInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_f_DeviceSNMPAnalysisInd: If op_DeviceSNMPAnalysisInd is specified, the field named in this input will be compared to the value in DeviceSNMPAnalysisInd using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_DeviceSNMPAnalysisInd must be specified if op_DeviceSNMPAnalysisInd is specified. :type val_f_DeviceSNMPAnalysisInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_c_DeviceSNMPAnalysisInd: If op_DeviceSNMPAnalysisInd is specified, this value will be compared to the value in DeviceSNMPAnalysisInd using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_DeviceSNMPAnalysisInd must be specified if op_DeviceSNMPAnalysisInd is specified. :type val_c_DeviceSNMPAnalysisInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param op_DeviceSNMPCommunityReadSecure: The operator to apply to the field DeviceSNMPCommunityReadSecure. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. DeviceSNMPCommunityReadSecure: The read operation of each device in SNMP community. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values. :type op_DeviceSNMPCommunityReadSecure: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_f_DeviceSNMPCommunityReadSecure: If op_DeviceSNMPCommunityReadSecure is specified, the field named in this input will be compared to the value in DeviceSNMPCommunityReadSecure using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_DeviceSNMPCommunityReadSecure must be specified if op_DeviceSNMPCommunityReadSecure is specified. :type val_f_DeviceSNMPCommunityReadSecure: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_c_DeviceSNMPCommunityReadSecure: If op_DeviceSNMPCommunityReadSecure is specified, this value will be compared to the value in DeviceSNMPCommunityReadSecure using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_DeviceSNMPCommunityReadSecure must be specified if op_DeviceSNMPCommunityReadSecure is specified. :type val_c_DeviceSNMPCommunityReadSecure: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param op_DeviceSNMPCommunityReadSource: The operator to apply to the field DeviceSNMPCommunityReadSource. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. DeviceSNMPCommunityReadSource: The read source of the SNMP community of devices. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values. :type op_DeviceSNMPCommunityReadSource: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_f_DeviceSNMPCommunityReadSource: If op_DeviceSNMPCommunityReadSource is specified, the field named in this input will be compared to the value in DeviceSNMPCommunityReadSource using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_DeviceSNMPCommunityReadSource must be specified if op_DeviceSNMPCommunityReadSource is specified. :type val_f_DeviceSNMPCommunityReadSource: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_c_DeviceSNMPCommunityReadSource: If op_DeviceSNMPCommunityReadSource is specified, this value will be compared to the value in DeviceSNMPCommunityReadSource using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_DeviceSNMPCommunityReadSource must be specified if op_DeviceSNMPCommunityReadSource is specified. :type val_c_DeviceSNMPCommunityReadSource: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param op_DeviceSNMPCommunityWriteSecure: The operator to apply to the field DeviceSNMPCommunityWriteSecure. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. DeviceSNMPCommunityWriteSecure: The write operation of each device in SNMP community. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values. :type op_DeviceSNMPCommunityWriteSecure: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_f_DeviceSNMPCommunityWriteSecure: If op_DeviceSNMPCommunityWriteSecure is specified, the field named in this input will be compared to the value in DeviceSNMPCommunityWriteSecure using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_DeviceSNMPCommunityWriteSecure must be specified if op_DeviceSNMPCommunityWriteSecure is specified. :type val_f_DeviceSNMPCommunityWriteSecure: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_c_DeviceSNMPCommunityWriteSecure: If op_DeviceSNMPCommunityWriteSecure is specified, this value will be compared to the value in DeviceSNMPCommunityWriteSecure using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_DeviceSNMPCommunityWriteSecure must be specified if op_DeviceSNMPCommunityWriteSecure is specified. :type val_c_DeviceSNMPCommunityWriteSecure: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param op_DeviceSNMPPollingInd: The operator to apply to the field DeviceSNMPPollingInd. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. DeviceSNMPPollingInd: If true, than NetMRI SNMP polling is enabled for the device. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values. :type op_DeviceSNMPPollingInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_f_DeviceSNMPPollingInd: If op_DeviceSNMPPollingInd is specified, the field named in this input will be compared to the value in DeviceSNMPPollingInd using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_DeviceSNMPPollingInd must be specified if op_DeviceSNMPPollingInd is specified. :type val_f_DeviceSNMPPollingInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_c_DeviceSNMPPollingInd: If op_DeviceSNMPPollingInd is specified, this value will be compared to the value in DeviceSNMPPollingInd using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_DeviceSNMPPollingInd must be specified if op_DeviceSNMPPollingInd is specified. :type val_c_DeviceSNMPPollingInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param op_DeviceSNMPTimestamp: The operator to apply to the field DeviceSNMPTimestamp. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. DeviceSNMPTimestamp: The date and time this record was collected or calculated. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values. :type op_DeviceSNMPTimestamp: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_f_DeviceSNMPTimestamp: If op_DeviceSNMPTimestamp is specified, the field named in this input will be compared to the value in DeviceSNMPTimestamp using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_DeviceSNMPTimestamp must be specified if op_DeviceSNMPTimestamp is specified. :type val_f_DeviceSNMPTimestamp: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_c_DeviceSNMPTimestamp: If op_DeviceSNMPTimestamp is specified, this value will be compared to the value in DeviceSNMPTimestamp using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_DeviceSNMPTimestamp must be specified if op_DeviceSNMPTimestamp is specified. :type val_c_DeviceSNMPTimestamp: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param op_DeviceSNMPVersion: The operator to apply to the field DeviceSNMPVersion. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. DeviceSNMPVersion: The SNMP version of the device. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values. :type op_DeviceSNMPVersion: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_f_DeviceSNMPVersion: If op_DeviceSNMPVersion is specified, the field named in this input will be compared to the value in DeviceSNMPVersion using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_DeviceSNMPVersion must be specified if op_DeviceSNMPVersion is specified. :type val_f_DeviceSNMPVersion: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_c_DeviceSNMPVersion: If op_DeviceSNMPVersion is specified, this value will be compared to the value in DeviceSNMPVersion using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_DeviceSNMPVersion must be specified if op_DeviceSNMPVersion is specified. :type val_c_DeviceSNMPVersion: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param op_DeviceStandardsComplianceInd: The operator to apply to the field DeviceStandardsComplianceInd. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. DeviceStandardsComplianceInd: If true, than this device should be considered during standards compliance checks. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values. :type op_DeviceStandardsComplianceInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_f_DeviceStandardsComplianceInd: If op_DeviceStandardsComplianceInd is specified, the field named in this input will be compared to the value in DeviceStandardsComplianceInd using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_DeviceStandardsComplianceInd must be specified if op_DeviceStandardsComplianceInd is specified. :type val_f_DeviceStandardsComplianceInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_c_DeviceStandardsComplianceInd: If op_DeviceStandardsComplianceInd is specified, this value will be compared to the value in DeviceStandardsComplianceInd using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_DeviceStandardsComplianceInd must be specified if op_DeviceStandardsComplianceInd is specified. :type val_c_DeviceStandardsComplianceInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param op_DeviceVendorDefaultCollectionInd: The operator to apply to the field DeviceVendorDefaultCollectionInd. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. DeviceVendorDefaultCollectionInd: If true, then NetMRI vendor default credential checking is enabled for the device. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values. :type op_DeviceVendorDefaultCollectionInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_f_DeviceVendorDefaultCollectionInd: If op_DeviceVendorDefaultCollectionInd is specified, the field named in this input will be compared to the value in DeviceVendorDefaultCollectionInd using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_DeviceVendorDefaultCollectionInd must be specified if op_DeviceVendorDefaultCollectionInd is specified. :type val_f_DeviceVendorDefaultCollectionInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_c_DeviceVendorDefaultCollectionInd: If op_DeviceVendorDefaultCollectionInd is specified, this value will be compared to the value in DeviceVendorDefaultCollectionInd using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_DeviceVendorDefaultCollectionInd must be specified if op_DeviceVendorDefaultCollectionInd is specified. :type val_c_DeviceVendorDefaultCollectionInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param op_PolFreqModifier: The operator to apply to the field PolFreqModifier. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. PolFreqModifier: Polling frequency modifier for this device. Actual polling frequency intervals for the device are calculated by multiplying the default intervals by this value. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values. :type op_PolFreqModifier: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_f_PolFreqModifier: If op_PolFreqModifier is specified, the field named in this input will be compared to the value in PolFreqModifier using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_PolFreqModifier must be specified if op_PolFreqModifier is specified. :type val_f_PolFreqModifier: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_c_PolFreqModifier: If op_PolFreqModifier is specified, this value will be compared to the value in PolFreqModifier using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_PolFreqModifier must be specified if op_PolFreqModifier is specified. :type val_c_PolFreqModifier: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param op_SAMLicensedInd: The operator to apply to the field SAMLicensedInd. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. SAMLicensedInd: This flag indicating if the Device Security Control enabled. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values. :type op_SAMLicensedInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_f_SAMLicensedInd: If op_SAMLicensedInd is specified, the field named in this input will be compared to the value in SAMLicensedInd using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_SAMLicensedInd must be specified if op_SAMLicensedInd is specified. :type val_f_SAMLicensedInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_c_SAMLicensedInd: If op_SAMLicensedInd is specified, this value will be compared to the value in SAMLicensedInd using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_SAMLicensedInd must be specified if op_SAMLicensedInd is specified. :type val_c_SAMLicensedInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param op_SPMLicensedInd: The operator to apply to the field SPMLicensedInd. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. SPMLicensedInd: A flag indicating if the Device is licensed under the Switch Port Management module. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values. :type op_SPMLicensedInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_f_SPMLicensedInd: If op_SPMLicensedInd is specified, the field named in this input will be compared to the value in SPMLicensedInd using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_SPMLicensedInd must be specified if op_SPMLicensedInd is specified. :type val_f_SPMLicensedInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_c_SPMLicensedInd: If op_SPMLicensedInd is specified, this value will be compared to the value in SPMLicensedInd using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_SPMLicensedInd must be specified if op_SPMLicensedInd is specified. :type val_c_SPMLicensedInd: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param op_SecureVersion: The operator to apply to the field SecureVersion. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. SecureVersion: The encryption version of the username and passwords. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values. :type op_SecureVersion: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_f_SecureVersion: If op_SecureVersion is specified, the field named in this input will be compared to the value in SecureVersion using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_SecureVersion must be specified if op_SecureVersion is specified. :type val_f_SecureVersion: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_c_SecureVersion: If op_SecureVersion is specified, this value will be compared to the value in SecureVersion using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_SecureVersion must be specified if op_SecureVersion is specified. :type val_c_SecureVersion: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param op_UseGlobalPolFreq: The operator to apply to the field UseGlobalPolFreq. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. UseGlobalPolFreq: A flag indicating if Global Polling Frequency should be used instead Device Group Polling Frequency. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values. :type op_UseGlobalPolFreq: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_f_UseGlobalPolFreq: If op_UseGlobalPolFreq is specified, the field named in this input will be compared to the value in UseGlobalPolFreq using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_UseGlobalPolFreq must be specified if op_UseGlobalPolFreq is specified. :type val_f_UseGlobalPolFreq: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param val_c_UseGlobalPolFreq: If op_UseGlobalPolFreq is specified, this value will be compared to the value in UseGlobalPolFreq using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_UseGlobalPolFreq must be specified if op_UseGlobalPolFreq is specified. :type val_c_UseGlobalPolFreq: String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param DeviceGroupID: The internal NetMRI identifier of the device groups to which to limit the results. :type DeviceGroupID: Array of Integer | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param timestamp: The data returned will represent the device settings as of this date and time. If omitted, the result will indicate the most recently collected data. :type timestamp: DateTime | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param methods: A list of device setting methods. The listed methods will be called on each device setting returned and included in the output. Available methods are: data_source. :type methods: Array of String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param include: A list of associated object types to include in the output. The listed associations will be returned as outputs named according to the association name (see outputs below). Available includes are: data_source. :type include: Array of String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` 0 :param start: The record number to return in the selected page of data. It will always appear, although it may not be the first record. See the :limit for more information. :type start: Integer | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` 1000 :param limit: The size of the page of data, that is, the maximum number of records returned. The limit size will be used to break the data up into pages and the first page with the start record will be returned. So if you have 100 records and use a :limit of 10 and a :start of 10, you will get records 10-19. The maximum limit is 10000. :type limit: Integer | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` DeviceID :param sort: The data field(s) to use for sorting the output. Default is DeviceID. Valid values are DataSourceID, DeviceID, DevSetStartTime, DevSetEndTime, DevSetChangedCols, DevSetTimestamp, DeviceSNMPVersion, DeviceSNMP3AuthProto, DeviceSNMP3PrivProto, DeviceSNMPTimestamp, DeviceSNMPCommunityReadSource, DeviceRespTime, DeviceRank, DeviceConfigLockLastChangeBy, DeviceConfigLockLastChangedTime, DeviceConfigLockedInd, DevicePrivilegedPollingInd, DeviceSNMPPollingInd, DeviceCLIPollingInd, DeviceConfigPollingInd, DevicePortScanningInd, DeviceSNMPAnalysisInd, DeviceFingerPrintInd, DeviceCCSCollectionInd, DeviceVendorDefaultCollectionInd, DeviceStandardsComplianceInd, DeviceLicensedInd, DeviceManagedInd, DeviceNetBIOSScanningInd, DevicePerfEnvPollingInd, SPMLicensedInd, ARPCacheRefreshInd, DeviceCommunitySecure, DeviceSNMPCommunityReadSecure, DeviceSNMPCommunityWriteSecure, DeviceSNMP3AuthPWSecure, DeviceSNMP3PrivPWSecure, SecureVersion, SAMLicensedInd, UseGlobalPolFreq, PolFreqModifier. :type sort: Array of String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` asc :param dir: The direction(s) in which to sort the data. Default is 'asc'. Valid values are 'asc' and 'desc'. :type dir: Array of String | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :param select: The list of attributes to return for each DeviceSetting. Valid values are DataSourceID, DeviceID, DevSetStartTime, DevSetEndTime, DevSetChangedCols, DevSetTimestamp, DeviceSNMPVersion, DeviceSNMP3AuthProto, DeviceSNMP3PrivProto, DeviceSNMPTimestamp, DeviceSNMPCommunityReadSource, DeviceRespTime, DeviceRank, DeviceConfigLockLastChangeBy, DeviceConfigLockLastChangedTime, DeviceConfigLockedInd, DevicePrivilegedPollingInd, DeviceSNMPPollingInd, DeviceCLIPollingInd, DeviceConfigPollingInd, DevicePortScanningInd, DeviceSNMPAnalysisInd, DeviceFingerPrintInd, DeviceCCSCollectionInd, DeviceVendorDefaultCollectionInd, DeviceStandardsComplianceInd, DeviceLicensedInd, DeviceManagedInd, DeviceNetBIOSScanningInd, DevicePerfEnvPollingInd, SPMLicensedInd, ARPCacheRefreshInd, DeviceCommunitySecure, DeviceSNMPCommunityReadSecure, DeviceSNMPCommunityWriteSecure, DeviceSNMP3AuthPWSecure, DeviceSNMP3PrivPWSecure, SecureVersion, SAMLicensedInd, UseGlobalPolFreq, PolFreqModifier. If empty or omitted, all attributes will be returned. :type select: Array | ``api version min:`` 2.8 | ``api version max:`` None | ``required:`` False | ``default:`` None :param goto_field: The field name for NIOS GOTO that is used for locating a row position of records. :type goto_field: String | ``api version min:`` 2.8 | ``api version max:`` None | ``required:`` False | ``default:`` None :param goto_value: The value of goto_field for NIOS GOTO that is used for locating a row position of records. :type goto_value: String | ``api version min:`` 2.3 | ``api version max:`` None | ``required:`` False | ``default:`` None :param xml_filter: A SetFilter XML structure to further refine the search. The SetFilter will be applied AFTER any search query or field values, but before any limit options. The limit and pagination will be enforced after the filter. Remind that this kind of filter may be costly and inefficient if not associated with a database filtering. :type xml_filter: String **Outputs** | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :return device_settings: An array of the DeviceSetting objects that match the specified input criteria. :rtype device_settings: Array of DeviceSetting """ return self.api_list_request(self._get_method_fullname("find"), kwargs) def data_source(self, **kwargs): """The collector NetMRI that collected this data record. **Inputs** | ``api version min:`` None | ``api version max:`` None | ``required:`` True | ``default:`` None :param DeviceID: The internal NetMRI identifier of each device from which device setting was collected. :type DeviceID: Integer **Outputs** | ``api version min:`` None | ``api version max:`` None | ``required:`` False | ``default:`` None :return : The collector NetMRI that collected this data record. :rtype : DataSource """ return self.api_request(self._get_method_fullname("data_source"), kwargs)
60.809682
1,310
0.646762
14,529
128,126
5.648565
0.027393
0.0619
0.040235
0.070186
0.963871
0.962872
0.918933
0.903653
0.898462
0.897183
0
0.004983
0.277992
128,126
2,107
1,311
60.809682
0.882162
0.848766
0
0
0
0
0.051487
0
0
0
0
0
0
1
0.384615
false
0
0.076923
0
1
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
10
e7564bb09b5b3f02110e7481fa5b750dce9871aa
42,095
py
Python
convex_code/experiment_epsilon_final.py
theUltraMarine19/ChocoSGD
46e375422e1c1059c2dd0304a17a4ab0631c8c40
[ "Apache-2.0" ]
null
null
null
convex_code/experiment_epsilon_final.py
theUltraMarine19/ChocoSGD
46e375422e1c1059c2dd0304a17a4ab0631c8c40
[ "Apache-2.0" ]
null
null
null
convex_code/experiment_epsilon_final.py
theUltraMarine19/ChocoSGD
46e375422e1c1059c2dd0304a17a4ab0631c8c40
[ "Apache-2.0" ]
null
null
null
import argparse import multiprocessing as mp import os import pickle from sklearn.datasets import load_svmlight_file import numpy as np from logistic import LogisticDecentralizedSGD from parameters import Parameters from utils import pickle_it from experiment import run_logistic, run_experiment A, b = None, None if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument('experiment', type=str) args = parser.parse_args() print(args) assert args.experiment in ['final'] dataset_path = os.path.expanduser('../data/epsilon.joblib') n, d = 400000, 2000 ############################################### ### RANDOM DATA PARTITION ##################### ############################################### n_cores = 40 ################### FINAL ################################ # split_way = 'random' # split_name = split_way # num_epoch = 10 # n_repeat = 5 # if args.experiment in ['final']: # params = [] # for random_seed in np.arange(1, n_repeat + 1): # params += [ # Parameters(name="decentralized-exact", num_epoch=num_epoch, # lr_type='decay', initial_lr=0.1, tau=d, # regularizer=1 / n, quantization='full', # n_cores=n_cores, method='plain', # split_data_random_seed=random_seed, # distribute_data=True, split_data_strategy=split_name, # topology='ring', estimate='final'), # ] # run_experiment("dump/epsilon-final-decentralized-" + split_way + "-" +\ # str(n_cores) + "/", dataset_path, params, nproc=10) # if args.experiment in ['final']: # params = [] # for random_seed in np.arange(1, n_repeat + 1): # params += [ # Parameters(name="centralized", num_epoch=num_epoch, # lr_type='decay', initial_lr=0.1, tau=d, # regularizer=1 / n, quantization='full', # n_cores=n_cores, method='plain', # split_data_random_seed=random_seed, # distribute_data=True, split_data_strategy=split_name, # topology='centralized', estimate='final')] # run_experiment("dump/epsilon-final-centralized-" + split_way + "-" + str(n_cores)\ # + "/", dataset_path, params, nproc=10) # if args.experiment in ['final']: # params = [] # for random_seed in np.arange(1, n_repeat + 1): # params += [ # Parameters(name="decentralized-top-20", num_epoch=num_epoch, # lr_type='decay', initial_lr=0.1, tau=d, # regularizer=1 / n, consensus_lr=0.04, # quantization='top', coordinates_to_keep=20, # n_cores=n_cores, method='choco', topology='ring', # estimate='final', split_data_random_seed=random_seed, # distribute_data=True, split_data_strategy=split_name)] # run_experiment("dump/epsilon-final-choco-top-20-" + split_way + "-" + str(n_cores)\ # + "/", dataset_path, params, nproc=10) # if args.experiment in ['final']: # params = [] # for random_seed in np.arange(1, n_repeat + 1): # params += [ # Parameters(name="decentralized-random-20", num_epoch=num_epoch, # lr_type='decay', initial_lr=0.1, tau=d, # regularizer=1 / n, consensus_lr=0.01, # quantization='random-biased', coordinates_to_keep=20, # n_cores=n_cores, method='choco', topology='ring', # estimate='final', split_data_random_seed=random_seed, # distribute_data=True, split_data_strategy=split_name)] # run_experiment("dump/epsilon-final-choco-random-20-" + split_way+ "-" + str(n_cores)\ # + "/", dataset_path, params, nproc=10) # if args.experiment in ['final']: # params = [] # for random_seed in np.arange(1, n_repeat + 1): # params += [ # Parameters(name="decentralized-qsgd-8", num_epoch=num_epoch, # lr_type='decay', initial_lr=0.1, tau=d, # regularizer=1 / n, consensus_lr=0.34, # quantization='qsgd-biased', num_levels=16, # n_cores=n_cores, method='choco', topology='ring', # estimate='final', split_data_random_seed=random_seed, # distribute_data=True, split_data_strategy=split_name)] # run_experiment("dump/epsilon-final-choco-qsgd-4bit-" + split_way + "-" + str(n_cores)\ # + "/", dataset_path, params, nproc=10) # if args.experiment in ['final']: # params = [] # for random_seed in np.arange(1, n_repeat + 1): # params += [Parameters(name="dcd-psgd-random-20", # num_epoch=num_epoch, lr_type='decay', # initial_lr=1e-15, tau=d, regularizer=1 / n, # quantization='random-unbiased', coordinates_to_keep=20, # n_cores=n_cores, method='dcd-psgd', # split_data_random_seed=random_seed, # distribute_data=True, split_data_strategy=split_name, # topology='ring', estimate='final')] # run_experiment("dump/epsilon-final-dcd-random-20-" + split_way + "-" + str(n_cores)\ # + "/", dataset_path, params, nproc=10) # if args.experiment in ['final']: # params = [] # for random_seed in np.arange(1, n_repeat + 1): # params += [Parameters(name="ecd-psgd-random", num_epoch=num_epoch, # lr_type='decay', initial_lr=1e-6, tau=d, # regularizer=1 / n, consensus_lr=None, # quantization='random-unbiased', # coordinates_to_keep=20, n_cores=n_cores, # method='ecd-psgd', split_data_random_seed=random_seed, # distribute_data=True, split_data_strategy=split_name, # topology='ring', estimate='final')] # run_experiment("dump/epsilon-final-ecd-random-20-" + split_way + "-" + str(n_cores)\ # + "/", dataset_path, params, nproc=10) # ###################### qsgd quantization ##################################### # if args.experiment in ['final']: # params = [] # for random_seed in np.arange(1, n_repeat + 1): # params += [Parameters(name="dcd-psgd-qsgd", num_epoch=num_epoch, # lr_type='decay', initial_lr=0.01, tau=d, # regularizer=1 / n, quantization='qsgd-unbiased', # num_levels=16, n_cores=n_cores, method='dcd-psgd', # split_data_random_seed=random_seed, # distribute_data=True, split_data_strategy=split_name, # topology='ring', estimate='final')] # run_experiment("dump/epsilon-final-dcd-qsgd-4bit-" + split_way + "-" + str(n_cores)\ # + "/", dataset_path, params, nproc=10) # if args.experiment in ['final']: # params = [] # for random_seed in np.arange(1, n_repeat + 1): # params += [Parameters(name="ecd-psgd-qsgd", num_epoch=num_epoch, # lr_type='decay', initial_lr=1e-06, tau=d, # regularizer=1 / n, quantization='qsgd-unbiased', # num_levels=16, n_cores=n_cores, method='ecd-psgd', # split_data_random_seed=random_seed, # distribute_data=True, split_data_strategy=split_name, # topology='ring', estimate='final')] # run_experiment("dump/epsilon-final-ecd-qsgd-4bit-" + split_way + "-" + str(n_cores)\ # + "/", dataset_path, params, nproc=10) ############################################### ### SORTED DATA PARTITION ##################### ############################################### ################################ FINAL #################################### split_way = 'sorted' split_name = split_way if split_way == 'sorted': split_name = 'label-sorted' n_repeat = 5 num_epoch = 10 # # D-PSGD on ring topology (1 round of ring-reduce) with top 1% # if args.experiment in ['final']: # params = [] # for random_seed in np.arange(1, n_repeat + 1): # params += [ # Parameters(name="decentralized-top-20", num_epoch=num_epoch, # lr_type='decay', initial_lr=0.1, tau=d, # regularizer=1 / n, quantization='top', # coordinates_to_keep=20, # n_cores=n_cores, method='plain', # split_data_random_seed=random_seed, # distribute_data=True, split_data_strategy=split_name, # topology='ring', estimate='final')] # run_experiment("dump/epsilon-final-decentralized-ring-" + split_way+ "-" + str(n_cores)\ # + "/", dataset_path, params, nproc=10) # # D-PSGD on ring topology (1 round of ring-reduce) with random 1% # if args.experiment in ['final']: # params = [] # for random_seed in np.arange(1, n_repeat + 1): # params += [ # Parameters(name="decentralized-random", num_epoch=num_epoch, # lr_type='decay', initial_lr=0.1, tau=d, # regularizer=1 / n, quantization='random-unbiased', # coordinates_to_keep=20, # n_cores=n_cores, method='plain', # split_data_random_seed=random_seed, # distribute_data=True, split_data_strategy=split_name, # topology='ring', estimate='final')] # run_experiment("dump/epsilon-final-decentralized-ring-" + split_way+ "-" + str(n_cores)\ # + "/", dataset_path, params, nproc=10) # # ChocoSGD on ring topology with top 1% # if args.experiment in ['final']: # params = [] # for random_seed in np.arange(1, n_repeat + 1): # params += [ # Parameters(name="decentralized-top-20", num_epoch=num_epoch, # lr_type='decay', initial_lr=0.1, tau=d, # regularizer=1 / n, quantization='top', # consensus_lr=0.04, coordinates_to_keep=20, # n_cores=n_cores, method='choco', # split_data_random_seed=random_seed, # distribute_data=True, split_data_strategy=split_name, # topology='ring', estimate='final', # random_seed=40 + random_seed)] # run_experiment("dump/epsilon-final-choco-top-20-ring-" + split_way+ "-" + str(n_cores) + "/", # dataset_path, params, nproc=10) # # ChocoSGD on ring topology with random-unbiased 1% # if args.experiment in ['final']: # params = [] # for random_seed in np.arange(1, n_repeat + 1): # params += [ # Parameters(name="decentralized-random-un-20", num_epoch=num_epoch, # lr_type='decay', initial_lr=0.1, tau=d, # regularizer=1 / n, quantization='random-unbiased', # consensus_lr=0.01, coordinates_to_keep=20, # n_cores=n_cores, method='choco', # split_data_random_seed=random_seed, # distribute_data=True, split_data_strategy=split_name, # topology='ring', estimate='final', # random_seed=60 + random_seed)] # run_experiment("dump/epsilon-final-choco-random-20-" + split_way+ "-" + str(n_cores) + "/", # dataset_path, params, nproc=10) # # ChocoSGD on ring topology with random-biased 1% # if args.experiment in ['final']: # params = [] # for random_seed in np.arange(1, n_repeat + 1): # params += [ # Parameters(name="decentralized-random-20", num_epoch=num_epoch, # lr_type='decay', initial_lr=0.1, tau=d, # regularizer=1 / n, quantization='random-biased', # consensus_lr=0.01, coordinates_to_keep=20, # n_cores=n_cores, method='choco', # split_data_random_seed=random_seed, # distribute_data=True, split_data_strategy=split_name, # topology='ring', estimate='final', # random_seed=60 + random_seed)] # run_experiment("dump/epsilon-final-choco-random-20-" + split_way+ "-" + str(n_cores) + "/", # dataset_path, params, nproc=10) # # DCD-PSGD on ring topology with random 1% # if args.experiment in ['final']: # params = [] # for random_seed in np.arange(1, n_repeat + 1): # params += [Parameters(name="dcd-psgd-random-20", num_epoch=num_epoch, # lr_type='decay', initial_lr=1e-15, tau=d, # regularizer=1 / n, quantization='random-unbiased', # coordinates_to_keep=20, # n_cores=n_cores, method='dcd-psgd', # split_data_random_seed=random_seed, # distribute_data=True, split_data_strategy=split_name, # topology='ring', estimate='final')] # run_experiment("dump/epsilon-final-dcd-random-20-" + split_way + "-" + str(n_cores) + "/", # dataset_path, params, nproc=10) # # ECD-PSGD on ring topology with random 1% # if args.experiment in ['final']: # params = [] # for random_seed in np.arange(1, n_repeat + 1): # params += [Parameters(name="ecd-psgd-random", num_epoch=num_epoch, # lr_type='decay', initial_lr=1e-10, tau=d, # regularizer=1 / n, quantization='random-unbiased', # coordinates_to_keep=20, # n_cores=n_cores, method='ecd-psgd', # split_data_random_seed=random_seed, # distribute_data=True, split_data_strategy=split_name, # topology='ring', estimate='final')] # run_experiment("dump/epsilon-final-ecd-random-20-" + split_way + "-" + str(n_cores) + "/", # dataset_path, params, nproc=10) ###################### qsgd quantization ##################################### # # D-PSGD on ring topology (1 round of ring-reduce) with qsgd 4-bit # if args.experiment in ['final']: # params = [] # for random_seed in np.arange(1, n_repeat + 1): # params += [ # Parameters(name="dpsgd-qsgd-4-unbiased", num_epoch=num_epoch, # lr_type='decay', initial_lr=0.1, tau=d, # regularizer=1 / n, quantization='qsgd-unbiased', # num_levels=16, # n_cores=n_cores, method='plain', # split_data_random_seed=random_seed, # distribute_data=True, split_data_strategy=split_name, # topology='ring', estimate='final')] # run_experiment("dump/epsilon-final-decentralized-ring-" + split_way+ "-" + str(n_cores)\ # + "/", dataset_path, params, nproc=10) # # D-PSGD on ring topology (1 round of ring-reduce) with qsgd 8-bit # if args.experiment in ['final']: # params = [] # for random_seed in np.arange(1, n_repeat + 1): # params += [ # Parameters(name="dpsgd-qsgd-8-unbiased", num_epoch=num_epoch, # lr_type='decay', initial_lr=0.1, tau=d, # regularizer=1 / n, quantization='qsgd-unbiased', # num_levels=256, # n_cores=n_cores, method='plain', # split_data_random_seed=random_seed, # distribute_data=True, split_data_strategy=split_name, # topology='ring', estimate='final')] # run_experiment("dump/epsilon-final-decentralized-ring-" + split_way+ "-" + str(n_cores)\ # + "/", dataset_path, params, nproc=10) # # ChocoSGD with 4-bit biased quantization # if args.experiment in ['final']: # params = [] # for random_seed in np.arange(1, n_repeat + 1): # params += [ # Parameters(name="decentralized-qsgd-4-biased", num_epoch=num_epoch, # lr_type='decay', initial_lr=0.1, tau=d, # regularizer=1 / n, quantization='qsgd-biased', # consensus_lr=0.34, num_levels=16, # n_cores=n_cores, method='choco', # split_data_random_seed=random_seed, # distribute_data=True, split_data_strategy=split_name, # topology='ring', estimate='final')] # run_experiment("dump/epsilon-final-choco-qsgd-4bit-" + split_way + "-" + str(n_cores) + "/", # dataset_path, params, nproc=10) # # ChocoSGD with 4-bit unbiased quantization # if args.experiment in ['final']: # params = [] # for random_seed in np.arange(1, n_repeat + 1): # params += [ # Parameters(name="decentralized-qsgd-4-unbiased", num_epoch=num_epoch, # lr_type='decay', initial_lr=0.1, tau=d, # regularizer=1 / n, quantization='qsgd-unbiased', # consensus_lr=0.34, num_levels=16, # n_cores=n_cores, method='choco', # split_data_random_seed=random_seed, # distribute_data=True, split_data_strategy=split_name, # topology='ring', estimate='final')] # run_experiment("dump/epsilon-final-choco-qsgd-4bit-" + split_way + "-" + str(n_cores) + "/", # dataset_path, params, nproc=10) # # DCD-PSGD with 4-bit unbiased qunatization # if args.experiment in ['final']: # params = [] # for random_seed in np.arange(1, n_repeat + 1): # params += [Parameters(name="dcd-psgd-qsgd-4", num_epoch=num_epoch, # lr_type='decay', initial_lr=0.01, tau=d, # regularizer=1 / n, quantization='qsgd-unbiased', # num_levels=16, # n_cores=n_cores, method='dcd-psgd', # split_data_random_seed=random_seed, # distribute_data=True, split_data_strategy=split_name, # topology='ring', estimate='final', )] # run_experiment("dump/epsilon-final-dcd-qsgd-4bit-" + split_way + "-" + str(n_cores) + "/", # dataset_path, params, nproc=10) # # ECD-PSGD with 4-bit unbiased qunatization # if args.experiment in ['final']: # params = [] # for random_seed in np.arange(1, n_repeat + 1): # params += [Parameters(name="ecd-psgd-qsgd-4", num_epoch=num_epoch, # lr_type='decay', initial_lr=1e-12, tau=d, # regularizer=1 / n, quantization='qsgd-unbiased', # num_levels=16, # n_cores=n_cores, method='ecd-psgd', # split_data_random_seed=random_seed, # distribute_data=True, split_data_strategy=split_name, # topology='ring', estimate='final')] # run_experiment("dump/epsilon-final-ecd-qsgd-4bit-" + split_way + "-" + str(n_cores) + "/", # dataset_path, params, nproc=10) # # ChocoSGD with 8-bit biased quantization # if args.experiment in ['final']: # params = [] # for random_seed in np.arange(1, n_repeat + 1): # params += [ # Parameters(name="decentralized-qsgd-8-biased", num_epoch=num_epoch, # lr_type='decay', initial_lr=0.1, tau=d, # regularizer=1 / n, quantization='qsgd-biased', # consensus_lr=0.34, num_levels=256, # n_cores=n_cores, method='choco', # split_data_random_seed=random_seed, # distribute_data=True, split_data_strategy=split_name, # topology='ring', estimate='final')] # run_experiment("dump/epsilon-final-choco-qsgd-4bit-" + split_way + "-" + str(n_cores) + "/", # dataset_path, params, nproc=10) # # DCD-PSGD with 8-bit unbiased qunatization # if args.experiment in ['final']: # params = [] # for random_seed in np.arange(1, n_repeat + 1): # params += [Parameters(name="dcd-psgd-qsgd-8", num_epoch=num_epoch, # lr_type='decay', initial_lr=0.01, tau=d, # regularizer=1 / n, quantization='qsgd-unbiased', # num_levels=256, # n_cores=n_cores, method='dcd-psgd', # split_data_random_seed=random_seed, # distribute_data=True, split_data_strategy=split_name, # topology='ring', estimate='final', )] # run_experiment("dump/epsilon-final-dcd-qsgd-4bit-" + split_way + "-" + str(n_cores) + "/", # dataset_path, params, nproc=10) # # ECD-PSGD with 8-bit unbiased qunatization # if args.experiment in ['final']: # params = [] # for random_seed in np.arange(1, n_repeat + 1): # params += [Parameters(name="ecd-psgd-qsgd-8", num_epoch=num_epoch, # lr_type='decay', initial_lr=1e-12, tau=d, # regularizer=1 / n, quantization='qsgd-unbiased', # num_levels=256, # n_cores=n_cores, method='ecd-psgd', # split_data_random_seed=random_seed, # distribute_data=True, split_data_strategy=split_name, # topology='ring', estimate='final')] # run_experiment("dump/epsilon-final-ecd-qsgd-4bit-" + split_way + "-" + str(n_cores) + "/", # dataset_path, params, nproc=10) ############## Comparison among all algorithms ################################### # D-PSGD on ring topology (1 round of ring-reduce) # if args.experiment in ['final']: # params = [] # for random_seed in np.arange(1, n_repeat + 1): # params += [ # Parameters(name="dpgd-top", num_epoch=num_epoch, # lr_type='decay', initial_lr=0.1, tau=d, # regularizer=1 / n, quantization='top', # coordinates_to_keep=20, # n_cores=n_cores, method='plain', # split_data_random_seed=random_seed, # distribute_data=True, split_data_strategy=split_name, # topology='ring', estimate='final')] # run_experiment("dump/epsilon-final-decentralized-ring-" + split_way+ "-" + str(n_cores)\ # + "/", dataset_path, params, nproc=10) # # D-PSGD on ring topology (1 round of ring-reduce) # if args.experiment in ['final']: # params = [] # for random_seed in np.arange(1, n_repeat + 1): # params += [ # Parameters(name="dpsgd-random", num_epoch=num_epoch, # lr_type='decay', initial_lr=0.1, tau=d, # regularizer=1 / n, quantization='random-unbiased', # coordinates_to_keep=20, # n_cores=n_cores, method='plain', # split_data_random_seed=random_seed, # distribute_data=True, split_data_strategy=split_name, # topology='ring', estimate='final')] # run_experiment("dump/epsilon-final-decentralized-ring-" + split_way+ "-" + str(n_cores)\ # + "/", dataset_path, params, nproc=10) # # D-PSGD on ring topology (1 round of ring-reduce) # if args.experiment in ['final']: # params = [] # for random_seed in np.arange(1, n_repeat + 1): # params += [ # Parameters(name="dpsgd-qsgd", num_epoch=num_epoch, # lr_type='decay', initial_lr=0.1, tau=d, # regularizer=1 / n, quantization='qsgd-unbiased', # num_levels=16, # n_cores=n_cores, method='plain', # split_data_random_seed=random_seed, # distribute_data=True, split_data_strategy=split_name, # topology='ring', estimate='final')] # run_experiment("dump/epsilon-final-decentralized-ring-" + split_way+ "-" + str(n_cores)\ # + "/", dataset_path, params, nproc=10) # # All-Reduce SGD (Param-server like) # if args.experiment in ['final']: # params = [] # for random_seed in np.arange(1, n_repeat + 1): # params += [ # Parameters(name="centralized-random", num_epoch=num_epoch, # lr_type='decay', initial_lr=0.1, tau=d, # regularizer=1 / n, quantization='random-unbiased', # coordinates_to_keep=20, # n_cores=n_cores, method='plain', # split_data_random_seed=random_seed, # distribute_data=True, split_data_strategy=split_name, # topology='centralized', estimate='final')] # run_experiment("dump/epsilon-final-centralized-" + split_way+ "-" + str(n_cores)\ # + "/", dataset_path, params, nproc=10) # # All-Reduce SGD (Param-server like) # if args.experiment in ['final']: # params = [] # for random_seed in np.arange(1, n_repeat + 1): # params += [ # Parameters(name="centralized-top", num_epoch=num_epoch, # lr_type='decay', initial_lr=0.1, tau=d, # regularizer=1 / n, quantization='top', # coordinates_to_keep=20, # n_cores=n_cores, method='plain', # split_data_random_seed=random_seed, # distribute_data=True, split_data_strategy=split_name, # topology='centralized', estimate='final')] # run_experiment("dump/epsilon-final-centralized-" + split_way+ "-" + str(n_cores)\ # + "/", dataset_path, params, nproc=10) # # All-Reduce SGD (Param-server like) # if args.experiment in ['final']: # params = [] # for random_seed in np.arange(1, n_repeat + 1): # params += [ # Parameters(name="centralized-qsgd", num_epoch=num_epoch, # lr_type='decay', initial_lr=0.1, tau=d, # regularizer=1 / n, quantization='qsgd-unbiased', # num_levels=16, # n_cores=n_cores, method='plain', # split_data_random_seed=random_seed, # distribute_data=True, split_data_strategy=split_name, # topology='centralized', estimate='final')] # run_experiment("dump/epsilon-final-centralized-" + split_way+ "-" + str(n_cores)\ # + "/", dataset_path, params, nproc=10) # # EAMSGD on fully-connected topology (Sync) # if args.experiment in ['final']: # params = [] # for random_seed in np.arange(1, n_repeat + 1): # params += [ # Parameters(name="EAMSGD-sync", num_epoch=num_epoch, # lr_type='decay', initial_lr=0.1, tau=d, # regularizer=1 / n, quantization='full', # n_cores=n_cores, method='ea-sgd', # momentum=0.9, comm_period=1, elasticity=0.9/(n_cores*0.1), # split_data_random_seed=random_seed, # distribute_data=True, split_data_strategy=split_name, # topology='centralized', estimate='final')] # run_experiment("dump/epsilon-final-decentralized-ring-" + split_way+ "-" + str(n_cores)\ # + "/", dataset_path, params, nproc=10) # # EAMSGD on fully-connected topology (Sync) -constant lr # if args.experiment in ['final']: # params = [] # for random_seed in np.arange(1, n_repeat + 1): # params += [ # Parameters(name="EAMSGD-sync", num_epoch=num_epoch, # lr_type='constant', initial_lr=0.1, # regularizer=1 / n, quantization='full', # n_cores=n_cores, method='ea-sgd', # momentum=0.9, comm_period=1, elasticity=0.9/(n_cores*0.1), # split_data_random_seed=random_seed, # distribute_data=True, split_data_strategy=split_name, # topology='centralized', estimate='final')] # run_experiment("dump/epsilon-final-decentralized-ring-" + split_way+ "-" + str(n_cores)\ # + "/", dataset_path, params, nproc=10) # EAMSGD on fully-connected topology (Async) # if args.experiment in ['final']: # params = [] # for random_seed in np.arange(1, n_repeat + 1): # params += [ # Parameters(name="EAMSGD-async", num_epoch=num_epoch, # lr_type='constant', initial_lr=0.1, # regularizer=1 / n, quantization='full', # n_cores=n_cores, method='ea-sgd', # momentum=0.9, comm_period=16, elasticity=0.9/(n_cores*0.1), # split_data_random_seed=random_seed, # distribute_data=True, split_data_strategy=split_name, # topology='centralized', estimate='final')] # run_experiment("dump/epsilon-final-decentralized-ring-" + split_way+ "-" + str(n_cores)\ # + "/", dataset_path, params, nproc=10) # # SGP With momentum on ring topology # if args.experiment in ['final']: # params = [] # for random_seed in np.arange(1, n_repeat + 1): # params += [ # Parameters(name="SGP-top", num_epoch=num_epoch, # lr_type='decay', initial_lr=0.1, tau=d, # regularizer=1 / n, quantization='top', # coordinates_to_keep=20, # n_cores=n_cores, method='SGP', # momentum=0.9, # split_data_random_seed=random_seed, # distribute_data=True, split_data_strategy=split_name, # topology='ring', estimate='final')] # run_experiment("dump/epsilon-final-decentralized-ring-" + split_way+ "-" + str(n_cores)\ # + "/", dataset_path, params, nproc=10) # # SGP With momentum on ring topology # if args.experiment in ['final']: # params = [] # for random_seed in np.arange(1, n_repeat + 1): # params += [ # Parameters(name="SGP-random", num_epoch=num_epoch, # lr_type='decay', initial_lr=0.1, tau=d, # regularizer=1 / n, quantization='random-unbiased', # coordinates_to_keep=20, # n_cores=n_cores, method='SGP', # momentum=0.9, # split_data_random_seed=random_seed, # distribute_data=True, split_data_strategy=split_name, # topology='ring', estimate='final')] # run_experiment("dump/epsilon-final-decentralized-ring-" + split_way+ "-" + str(n_cores)\ # + "/", dataset_path, params, nproc=10) # # SGP With momentum on ring topology # if args.experiment in ['final']: # params = [] # for random_seed in np.arange(1, n_repeat + 1): # params += [ # Parameters(name="SGP-qsgd", num_epoch=num_epoch, # lr_type='decay', initial_lr=0.1, tau=d, # regularizer=1 / n, quantization='qsgd-unbiased', # num_levels=16, # n_cores=n_cores, method='SGP', # momentum=0.9, # split_data_random_seed=random_seed, # distribute_data=True, split_data_strategy=split_name, # topology='ring', estimate='final')] # run_experiment("dump/epsilon-final-decentralized-ring-" + split_way+ "-" + str(n_cores)\ # + "/", dataset_path, params, nproc=10) # # SGP With momentum on ring topology with different lr # if args.experiment in ['final']: # params = [] # for random_seed in np.arange(1, n_repeat + 1): # params += [ # Parameters(name="SGP-ImageNet", num_epoch=num_epoch, # lr_type='epoch-decay', epoch_decay_lr=0.93, initial_lr=0.1, # regularizer=1 / n, quantization='full', # n_cores=n_cores, method='SGP', # momentum=0.9, # split_data_random_seed=random_seed, # distribute_data=True, split_data_strategy=split_name, # topology='ring', estimate='final')] # run_experiment("dump/epsilon-final-decentralized-ring-" + split_way+ "-" + str(n_cores)\ # + "/", dataset_path, params, nproc=10) # AD-PSGD on ring topology if args.experiment in ['final']: params = [] for random_seed in np.arange(1, n_repeat + 1): params += [ Parameters(name="AD-PSGD", num_epoch=num_epoch, lr_type='decay', initial_lr=0.1, tau=d, regularizer=1 / n, quantization='full', # coordinates_to_keep=20, n_cores=n_cores, method='ad-psgd', split_data_random_seed=random_seed, distribute_data=True, split_data_strategy=split_name, topology='ring', estimate='final')] run_experiment("dump/epsilon-final-decentralized-ring-" + split_way+ "-" + str(n_cores)\ + "/", dataset_path, params, nproc=10) # AD-PSGD on ring topology if args.experiment in ['final']: params = [] for random_seed in np.arange(1, n_repeat + 1): params += [ Parameters(name="AD-PSGD-random", num_epoch=num_epoch, lr_type='decay', initial_lr=0.1, tau=d, regularizer=1 / n, quantization='random-unbiased', coordinates_to_keep=20, n_cores=n_cores, method='ad-psgd', split_data_random_seed=random_seed, distribute_data=True, split_data_strategy=split_name, topology='ring', estimate='final')] run_experiment("dump/epsilon-final-decentralized-ring-" + split_way+ "-" + str(n_cores)\ + "/", dataset_path, params, nproc=10) # AD-PSGD on ring topology if args.experiment in ['final']: params = [] for random_seed in np.arange(1, n_repeat + 1): params += [ Parameters(name="AD-PSGD-qsgd", num_epoch=num_epoch, lr_type='decay', initial_lr=0.1, tau=d, regularizer=1 / n, quantization='qsgd-unbiased', num_levels=16, n_cores=n_cores, method='ad-psgd', split_data_random_seed=random_seed, distribute_data=True, split_data_strategy=split_name, topology='ring', estimate='final')] run_experiment("dump/epsilon-final-decentralized-ring-" + split_way+ "-" + str(n_cores)\ + "/", dataset_path, params, nproc=10) ############################# Topo and #workers ################################### # for workers in [36, 25, 16, 9]: # for topo in ['centralized', 'ring', 'torus', 'disconnected', 'partly-connected']: # # D-PSGD on ring topology (1 round of ring-reduce) # if args.experiment in ['final']: # params = [] # for random_seed in np.arange(1, n_repeat + 1): # params += [ # Parameters(name="dpsgd-exact-"+topo+str(workers)+"-", num_epoch=num_epoch, # lr_type='decay', initial_lr=0.1, tau=d, # regularizer=1 / n, quantization='full', # n_cores=workers, method='plain', # split_data_random_seed=random_seed, # distribute_data=True, split_data_strategy=split_name, # topology=topo, estimate='final')] # run_experiment("dump/epsilon-final-decentralized-ring-" + split_way+ "-" + str(n_cores)\ # + "/", dataset_path, params, nproc=10) # # ChocoSGD with 4-bit biased quantization # if args.experiment in ['final']: # params = [] # for random_seed in np.arange(1, n_repeat + 1): # params += [ # Parameters(name="Choco-qsgd-"+topo+str(workers)+"-", num_epoch=num_epoch, # lr_type='decay', initial_lr=0.1, tau=d, # regularizer=1 / n, quantization='qsgd-biased', # consensus_lr=0.34, num_levels=16, # n_cores=workers, method='choco', # split_data_random_seed=random_seed, # distribute_data=True, split_data_strategy=split_name, # topology=topo, estimate='final')] # run_experiment("dump/epsilon-final-choco-qsgd-4bit-" + split_way + "-" + str(n_cores) + "/", # dataset_path, params, nproc=10) # # ChocoSGD with random-biased 1% # if args.experiment in ['final']: # params = [] # for random_seed in np.arange(1, n_repeat + 1): # params += [ # Parameters(name="Choco-random-"+topo+str(workers)+"-", num_epoch=num_epoch, # lr_type='decay', initial_lr=0.1, tau=d, # regularizer=1 / n, quantization='random-biased', # consensus_lr=0.01, coordinates_to_keep=20, # n_cores=workers, method='choco', # split_data_random_seed=random_seed, # distribute_data=True, split_data_strategy=split_name, # topology=topo, estimate='final', # random_seed=60 + random_seed)] # run_experiment("dump/epsilon-final-choco-random-20-" + split_way+ "-" + str(n_cores) + "/", # dataset_path, params, nproc=10) # # SGP With momentum # if args.experiment in ['final']: # params = [] # for random_seed in np.arange(1, n_repeat + 1): # params += [ # Parameters(name="SGP-"+topo+str(workers)+"-", num_epoch=num_epoch, # lr_type='decay', initial_lr=0.1, tau=d, # regularizer=1 / n, quantization='full', # n_cores=workers, method='SGP', # momentum=0.9, # split_data_random_seed=random_seed, # distribute_data=True, split_data_strategy=split_name, # topology=topo, estimate='final')] # run_experiment("dump/epsilon-final-decentralized-ring-" + split_way+ "-" + str(n_cores)\ # + "/", dataset_path, params, nproc=10) # # AD-PSGD # if args.experiment in ['final']: # params = [] # for random_seed in np.arange(1, n_repeat + 1): # params += [ # Parameters(name="AD-PSGD-"+topo+str(workers)+"-", num_epoch=num_epoch, # lr_type='decay', initial_lr=0.1, tau=d, # regularizer=1 / n, quantization='full', # n_cores=workers, method='ad-psgd', # split_data_random_seed=random_seed, # distribute_data=True, split_data_strategy=split_name, # topology=topo, estimate='final')] # run_experiment("dump/epsilon-final-decentralized-ring-" + split_way+ "-" + str(n_cores)\ # + "/", dataset_path, params, nproc=10)
52.883166
102
0.510845
4,467
42,095
4.583613
0.036042
0.071306
0.036728
0.048205
0.956288
0.954042
0.952967
0.9516
0.948913
0.948376
0
0.021701
0.350849
42,095
795
103
52.949686
0.727585
0.853094
0
0.492537
0
0
0.067466
0.027637
0
0
0
0
0.014925
1
0
false
0
0.149254
0
0.149254
0.014925
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
e7bac6909986c04f4dad15bb68d40d9eae2fdfbe
35,472
py
Python
examples/clusters/Plotting/ExoplanetsSysSim_optimize_plotting.py
keirtheashby/ExoplanetsSysSim.jl-1
b039911a7bd6ab8df40766baed526d65c6d07652
[ "MIT" ]
1
2019-10-07T13:47:40.000Z
2019-10-07T13:47:40.000Z
examples/clusters/Plotting/ExoplanetsSysSim_optimize_plotting.py
keirtheashby/ExoplanetsSysSim.jl-1
b039911a7bd6ab8df40766baed526d65c6d07652
[ "MIT" ]
6
2018-02-23T15:47:33.000Z
2018-09-07T19:08:29.000Z
examples/clusters/Plotting/ExoplanetsSysSim_optimize_plotting.py
keirtheashby/ExoplanetsSysSim.jl-1
b039911a7bd6ab8df40766baed526d65c6d07652
[ "MIT" ]
5
2017-10-12T00:03:37.000Z
2019-04-21T22:43:31.000Z
#To import required modules: import numpy as np import time import matplotlib import matplotlib.cm as cm #for color maps import matplotlib.pyplot as plt from matplotlib.gridspec import GridSpec #for specifying plot attributes from matplotlib import ticker #for setting contour plots to log scale import scipy.integrate #for numerical integration import scipy.misc #for factorial function #matplotlib.rc('text', usetex=True) ##### This module will be used to plot simulated data generated from the ExoplanetsSysSim (Eric's version of the clustering method) #To define some useful constants: AU = 1.496*10.**13. #AU in cm Msun = 1.989*10.**30. #Solar mass in kg Rsun = 6.957*10.**10. #Solar radius in cm Rearth = 6.371*10.**8. #Earth radius in cm #CHECK THESE NUMBERS!!! Nstars_Kepler = 150061. Nstars_sim = 150061. Nplanets_Kepler = 2712. cos_factor = np.cos(80.*np.pi/180.) ##### savefigures = False savefigures_directory = 'Clustering_Method_Figures/ExoplanetsSysSim/' model_name = 'ExoplanetsSysSim_Clustered_Model' ##### To load arrays/grids with model fit statistics (including KS distances): #NOTE: in Julia, saving a 2D array into a file actually transposes the array! Thus the naming '...A_B_grid' actually refers to the varied parameters on the x (cols) and y (rows) of the saved arrays respectively; we will transpose them back after loading so that A refers to the parameter along y (rows) and B refers to the parameter along x (cols) ''' Model_stats_P_r_grid = [] #list to be filled with grids (2D arrays) of model statistics with open('Clustering_Method_Figures/ExoplanetsSysSim/Power_law_r/Model_stats_P_r_grid.out', 'r') as file: #ExoplanetsSysSim.jl-master/examples/clusters/ for line in file: if line[0] != '#': grid = [] #list to be filled with lists (rows of the grid) line = line[1:-2] line_per_row = line.split('; ') #print len(line_per_sys) for x in line_per_row: run_list = x.split() run_list = [float(i) for i in run_list] grid.append(run_list) grid = np.transpose(np.array(grid)) Model_stats_P_r_grid.append(grid) print np.shape(grid) Model_stats_P_r_grid = np.array(Model_stats_P_r_grid) ''' #''' Model_stats_Nhill_sigma_grid = [] #list to be filled with grids (2D arrays) of model statistics with open('Clustering_Method_Figures/ExoplanetsSysSim/Power_law_r1_r2_sigma_r/Model_stats_Nhill_sigmaP_grid.out', 'r') as file: for line in file: if line[0] != '#': grid = [] #list to be filled with lists (rows of the grid) line = line[1:-2] line_per_row = line.split('; ') #print len(line_per_sys) for x in line_per_row: run_list = x.split() run_list = [float(i) for i in run_list] grid.append(run_list) grid = np.transpose(np.array(grid)) Model_stats_Nhill_sigma_grid.append(grid) print np.shape(grid) Model_stats_Nhill_sigma_grid = np.array(Model_stats_Nhill_sigma_grid) #''' #''' Model_stats_sigma_incl_sigma_hk_grid = [] #list to be filled with grids (2D arrays) of model statistics with open('Clustering_Method_Figures/ExoplanetsSysSim/Power_law_r1_r2_sigma_r/Model_stats_sigma_incl_sigma_hk_grid.out', 'r') as file: for line in file: if line[0] != '#': grid = [] #list to be filled with lists (rows of the grid) line = line[1:-2] line_per_row = line.split('; ') #print len(line_per_sys) for x in line_per_row: run_list = x.split() run_list = [float(i) for i in run_list] grid.append(run_list) grid = np.transpose(np.array(grid)) Model_stats_sigma_incl_sigma_hk_grid.append(grid) print np.shape(grid) Model_stats_sigma_incl_sigma_hk_grid = np.array(Model_stats_sigma_incl_sigma_hk_grid) #''' ''' Model_stats_max_radius_mr_grid = [] #list to be filled with grids (2D arrays) of model statistics with open('Clustering_Method_Figures/ExoplanetsSysSim/Power_law_r/Model_stats_max_radius_mr_grid.out', 'r') as file: for line in file: if line[0] != '#': grid = [] #list to be filled with lists (rows of the grid) line = line[1:-2] line_per_row = line.split('; ') #print len(line_per_sys) for x in line_per_row: run_list = x.split() run_list = [float(i) for i in run_list] grid.append(run_list) grid = np.transpose(np.array(grid)) Model_stats_max_radius_mr_grid.append(grid) print np.shape(grid) Model_stats_max_radius_mr_grid = np.array(Model_stats_max_radius_mr_grid) ''' #''' Model_stats_mr_sigmaR_grid = [] #list to be filled with grids (2D arrays) of model statistics with open('Clustering_Method_Figures/ExoplanetsSysSim/Power_law_r1_r2_sigma_r/Model_stats_mr_sigmaR_grid.out', 'r') as file: for line in file: if line[0] != '#': grid = [] #list to be filled with lists (rows of the grid) line = line[1:-2] line_per_row = line.split('; ') #print len(line_per_sys) for x in line_per_row: run_list = x.split() run_list = [float(i) for i in run_list] grid.append(run_list) grid = np.transpose(np.array(grid)) Model_stats_mr_sigmaR_grid.append(grid) print np.shape(grid) Model_stats_mr_sigmaR_grid = np.array(Model_stats_mr_sigmaR_grid) #''' #''' Model_stats_Nc_Np_grid = [] #list to be filled with grids (2D arrays) of model statistics with open('Clustering_Method_Figures/ExoplanetsSysSim/Power_law_r1_r2_sigma_r/Model_stats_Nc_Np_grid.out', 'r') as file: for line in file: if line[0] != '#': grid = [] #list to be filled with lists (rows of the grid) line = line[1:-2] line_per_row = line.split('; ') #print len(line_per_sys) for x in line_per_row: run_list = x.split() run_list = [float(i) for i in run_list] grid.append(run_list) grid = np.transpose(np.array(grid)) Model_stats_Nc_Np_grid.append(grid) print np.shape(grid) Model_stats_Nc_Np_grid = np.array(Model_stats_Nc_Np_grid) #''' #''' Model_stats_r1_r2_grid = [] #list to be filled with grids (2D arrays) of model statistics with open('Clustering_Method_Figures/ExoplanetsSysSim/Power_law_r1_r2_sigma_r/Model_stats_r1_r2_rbreak2_grid.out', 'r') as file: for line in file: if line[0] != '#': grid = [] #list to be filled with lists (rows of the grid) line = line[1:-2] line_per_row = line.split('; ') #print len(line_per_sys) for x in line_per_row: run_list = x.split() run_list = [float(i) for i in run_list] grid.append(run_list) grid = np.transpose(np.array(grid)) Model_stats_r1_r2_grid.append(grid) print np.shape(grid) Model_stats_r1_r2_grid = np.array(Model_stats_r1_r2_grid) #''' ''' Model_stats_r1_r2_rbreak3_grid = [] #list to be filled with grids (2D arrays) of model statistics with open('Clustering_Method_Figures/ExoplanetsSysSim/Power_law_r1_r2/Model_stats_r1_r2_rbreak3_grid.out', 'r') as file: for line in file: if line[0] != '#': grid = [] #list to be filled with lists (rows of the grid) line = line[1:-2] line_per_row = line.split('; ') #print len(line_per_sys) for x in line_per_row: run_list = x.split() run_list = [float(i) for i in run_list] grid.append(run_list) grid = np.transpose(np.array(grid)) Model_stats_r1_r2_rbreak3_grid.append(grid) print np.shape(grid) Model_stats_r1_r2_rbreak3_grid = np.array(Model_stats_r1_r2_rbreak3_grid) ''' ''' Model_stats_r_sigma_r_grid = [] #list to be filled with grids (2D arrays) of model statistics with open('Clustering_Method_Figures/ExoplanetsSysSim/Power_law_r_sigma_r/Model_stats_r_sigma_r_grid.out', 'r') as file: for line in file: if line[0] != '#': grid = [] #list to be filled with lists (rows of the grid) line = line[1:-2] line_per_row = line.split('; ') #print len(line_per_sys) for x in line_per_row: run_list = x.split() run_list = [float(i) for i in run_list] grid.append(run_list) grid = np.transpose(np.array(grid)) Model_stats_r_sigma_r_grid.append(grid) print np.shape(grid) Model_stats_r_sigma_r_grid = np.array(Model_stats_r_sigma_r_grid) ''' Model_stats_fields = [r'$f_{\rm sim}/f_{\rm Kepler}$', 'K-S multiplicities', 'K-S periods', 'K-S period ratios', 'K-S transit durations', 'K-S xi', 'K-S transit depths', 'K-S transit depth ratios'] #names of the fields associated with the 'Model_stats_...' arrays ''' ##### To plot the 2D arrays of model fit statistics (N_obs, KS multiplicities, KS periods, KS period ratios, KS transit depths, KS xi) on the parameter space grids: #To plot the 2D arrays of model fit statistics on the grid of 'power_law_P' vs. 'power_law_r': power_law_P_range = np.linspace(-0.5, 0.5, 11) power_law_r_range = np.linspace(-3., -1.2, 11) d_y = np.diff(power_law_P_range)[0] d_x = np.diff(power_law_r_range)[0] xmin, xmax, ymin, ymax = power_law_r_range[0] - d_x/2., power_law_r_range[-1] + d_x/2., power_law_P_range[0] - d_y/2., power_law_P_range[-1] + d_y/2. xy_ratio = (xmax - xmin)/(ymax - ymin) fig = plt.figure(figsize=(16,8)) plot = GridSpec(2,3,left=0.075,bottom=0.115,right=0.95,top=0.925,wspace=0.15,hspace=0.4) plot_rows = [0,0,0,1,1,1] plot_cols = [0,1,2,0,1,2] for i,name in enumerate(Model_stats_fields): ax = plt.subplot(plot[plot_rows[i],plot_cols[i]]) plt.title(name, fontsize=20) data_array = Model_stats_P_r_grid[i] if i==0: data_array = (data_array/Nstars_sim)/(Nplanets_Kepler/Nstars_Kepler) plt.imshow(data_array, aspect=xy_ratio, origin='lower', extent=(xmin, xmax, ymin, ymax)) plt.colorbar() plt.xlabel(r'power_law_r', fontsize=20) plt.ylabel(r'power_law_P', fontsize=20) if savefigures == True: plt.savefig(savefigures_directory + 'Power_law_r/' + model_name + '_P_r_stats.pdf') else: plt.show() plt.close() ''' ''' #To plot the 2D arrays of model fit statistics on the grid of 'num_mutual_hill_radii' vs. 'sigma_logperiod_per_pl_in_cluster': num_mutual_hill_radii_range = np.linspace(5., 20., 11) sigma_logperiod_per_pl_in_cluster_range = np.linspace(0.05, 0.5, 11) d_y = np.diff(num_mutual_hill_radii_range)[0] d_x = np.diff(sigma_logperiod_per_pl_in_cluster_range)[0] xmin, xmax, ymin, ymax = sigma_logperiod_per_pl_in_cluster_range[0] - d_x/2., sigma_logperiod_per_pl_in_cluster_range[-1] + d_x/2., num_mutual_hill_radii_range[0] - d_y/2., num_mutual_hill_radii_range[-1] + d_y/2. xy_ratio = (xmax - xmin)/(ymax - ymin) fig = plt.figure(figsize=(16,8)) plot = GridSpec(2,4,left=0.075,bottom=0.115,right=0.95,top=0.925,wspace=0.15,hspace=0.4) plot_rows = [0,0,0,0,1,1,1,1] plot_cols = [0,1,2,3,0,1,2,3] for i,name in enumerate(Model_stats_fields): ax = plt.subplot(plot[plot_rows[i],plot_cols[i]]) plt.title(name, fontsize=20) data_array = Model_stats_Nhill_sigma_grid[i] if i==0: data_array = (data_array/Nstars_sim)/(Nplanets_Kepler/Nstars_Kepler) plt.imshow(data_array, aspect=xy_ratio, origin='lower', extent=(xmin, xmax, ymin, ymax)) plt.colorbar() plt.xlabel(r'sigma_logperiod_per_pl_in_cluster', fontsize=20) plt.ylabel(r'num_mutual_hill_radii', fontsize=20) if savefigures == True: plt.savefig(savefigures_directory + 'Power_law_r1_r2_sigma_r/' + model_name + '_Nhill_sigma_stats.pdf') else: plt.show() plt.close() ''' ''' #To plot the 2D arrays of model fit statistics on the grid of 'sigma_incl' vs. 'sigma_hk': sigma_incl_range = np.linspace(0., 5., 11) sigma_hk_range = np.linspace(0., 0.2, 11) d_y = np.diff(sigma_incl_range)[0] d_x = np.diff(sigma_hk_range)[0] xmin, xmax, ymin, ymax = sigma_hk_range[0] - d_x/2., sigma_hk_range[-1] + d_x/2., sigma_incl_range[0] - d_y/2., sigma_incl_range[-1] + d_y/2. xy_ratio = (xmax - xmin)/(ymax - ymin) fig = plt.figure(figsize=(16,8)) plot = GridSpec(2,4,left=0.075,bottom=0.115,right=0.95,top=0.925,wspace=0.15,hspace=0.4) plot_rows = [0,0,0,0,1,1,1,1] plot_cols = [0,1,2,3,0,1,2,3] for i,name in enumerate(Model_stats_fields): ax = plt.subplot(plot[plot_rows[i],plot_cols[i]]) plt.title(name, fontsize=20) data_array = Model_stats_sigma_incl_sigma_hk_grid[i] if i==0: data_array = (data_array/Nstars_sim)/(Nplanets_Kepler/Nstars_Kepler) plt.imshow(data_array, aspect=xy_ratio, origin='lower', extent=(xmin, xmax, ymin, ymax)) plt.colorbar() plt.xlabel(r'sigma_hk', fontsize=20) plt.ylabel(r'sigma_incl', fontsize=20) if savefigures == True: plt.savefig(savefigures_directory + 'Power_law_r1_r2_sigma_r/' + model_name + '_sigma_incl_sigma_hk_stats.pdf') else: plt.show() plt.close() ''' ''' #To plot the 2D arrays of model fit statistics on the grid of 'max_radius' vs. 'mr_power_law': max_radius_range = np.linspace(2., 12., 11) mr_range = np.linspace(1.5, 3.5, 11) d_y = np.diff(max_radius_range)[0] d_x = np.diff(mr_range)[0] xmin, xmax, ymin, ymax = mr_range[0] - d_x/2., mr_range[-1] + d_x/2., max_radius_range[0] - d_y/2., max_radius_range[-1] + d_y/2. xy_ratio = (xmax - xmin)/(ymax - ymin) fig = plt.figure(figsize=(16,8)) plot = GridSpec(2,3,left=0.075,bottom=0.115,right=0.95,top=0.925,wspace=0.15,hspace=0.4) plot_rows = [0,0,0,1,1,1] plot_cols = [0,1,2,0,1,2] for i,name in enumerate(Model_stats_fields): ax = plt.subplot(plot[plot_rows[i],plot_cols[i]]) plt.title(name, fontsize=20) data_array = Model_stats_max_radius_mr_grid[i] if i==0: data_array = (data_array/Nstars_sim)/(Nplanets_Kepler/Nstars_Kepler) plt.imshow(data_array, aspect=xy_ratio, origin='lower', extent=(xmin, xmax, ymin, ymax)) plt.colorbar() plt.xlabel(r'mr_power_law', fontsize=20) plt.ylabel(r'max_radius (R_earth)', fontsize=20) if savefigures == True: plt.savefig(savefigures_directory + 'Power_law_r/' + model_name + '_max_radius_mr_stats.pdf') else: plt.show() plt.close() ''' ''' #To plot the 2D arrays of model fit statistics on the grid of 'mr_power_law' vs. 'sigma_log_radius_in_cluster': mr_range = np.linspace(1.5, 3.5, 11) sigmaR_range = np.linspace(0.1, 1.0, 11) d_y = np.diff(mr_range)[0] d_x = np.diff(sigmaR_range)[0] xmin, xmax, ymin, ymax = sigmaR_range[0] - d_x/2., sigmaR_range[-1] + d_x/2., mr_range[0] - d_y/2., mr_range[-1] + d_y/2. xy_ratio = (xmax - xmin)/(ymax - ymin) fig = plt.figure(figsize=(16,8)) plot = GridSpec(2,4,left=0.075,bottom=0.115,right=0.95,top=0.925,wspace=0.15,hspace=0.4) plot_rows = [0,0,0,0,1,1,1,1] plot_cols = [0,1,2,3,0,1,2,3] for i,name in enumerate(Model_stats_fields): ax = plt.subplot(plot[plot_rows[i],plot_cols[i]]) plt.title(name, fontsize=20) data_array = Model_stats_mr_sigmaR_grid[i] if i==0: data_array = (data_array/Nstars_sim)/(Nplanets_Kepler/Nstars_Kepler) plt.imshow(data_array, aspect=xy_ratio, origin='lower', extent=(xmin, xmax, ymin, ymax)) plt.colorbar() plt.xlabel(r'sigma_log_radius_in_cluster', fontsize=20) plt.ylabel(r'mr_power_law', fontsize=20) if savefigures == True: plt.savefig(savefigures_directory + 'Power_law_r1_r2_sigma_r/' + model_name + '_mr_sigmaR_stats.pdf') else: plt.show() plt.close() ''' ''' #To plot the 2D arrays of model fit statistics on the grid of 'log_rate_clusters' vs. 'log_rate_planets_per_cluster': Model_stats_fields = [r'$f_{\rm sim}/f_{\rm Kepler}$', 'Number of observed singles', 'K-S multiplicities', 'K-S periods', 'K-S period ratios', 'K-S transit durations', 'K-S xi', 'K-S transit depths', 'K-S transit depth ratios'] #names of the fields associated with the 'Model_stats_...' arrays Nc_range = np.linspace(1., 5., 11) Np_range = np.linspace(1., 5., 11) d_y = np.diff(Nc_range)[0] d_x = np.diff(Np_range)[0] xmin, xmax, ymin, ymax = Np_range[0] - d_x/2., Np_range[-1] + d_x/2., Nc_range[0] - d_y/2., Nc_range[-1] + d_y/2. xy_ratio = (xmax - xmin)/(ymax - ymin) fig = plt.figure(figsize=(16,8)) plot = GridSpec(3,3,left=0.075,bottom=0.115,right=0.95,top=0.925,wspace=0.25,hspace=0.4) plot_rows = [0,0,0,1,1,1,2,2,2] plot_cols = [0,1,2,0,1,2,0,1,2] for i,name in enumerate(Model_stats_fields): ax = plt.subplot(plot[plot_rows[i],plot_cols[i]]) plt.title(name, fontsize=20) data_array = Model_stats_Nc_Np_grid[i] if i==0: data_array = (data_array/Nstars_sim)/(Nplanets_Kepler/Nstars_Kepler) plt.imshow(data_array, aspect=xy_ratio, origin='lower', extent=(xmin, xmax, ymin, ymax)) plt.colorbar() plt.xlabel(r'rate_planets_per_cluster', fontsize=20) plt.ylabel(r'rate_clusters', fontsize=20) if savefigures == True: plt.savefig(savefigures_directory + 'Power_law_r1_r2_sigma_r/' + model_name + '_Nc_Np_stats.pdf') else: plt.show() plt.close() ''' ''' ##### To re-make each of the above grid plots as single panels for 2nd year paper: Model_stats_fields = [r'$f_{\rm sim}/f_{\rm Kepler}$', 'Planet Multiplicities', r'$P$', r'$P_{i+1}/P_i$', r'$\delta$', r'$\/xi$'] #names of the fields associated with the 'Model_stats_...' arrays #To plot the 2D arrays of model fit statistics on the grid of 'power_law_P' vs. 'power_law_r': power_law_P_range = np.linspace(-0.5, 0.5, 11) power_law_r_range = np.linspace(-3., -1.2, 11) d_y = np.diff(power_law_P_range)[0] d_x = np.diff(power_law_r_range)[0] xmin, xmax, ymin, ymax = power_law_r_range[0] - d_x/2., power_law_r_range[-1] + d_x/2., power_law_P_range[0] - d_y/2., power_law_P_range[-1] + d_y/2. xy_ratio = (xmax - xmin)/(ymax - ymin) for i,name in enumerate(Model_stats_fields): fig = plt.figure(figsize=(5,4)) plot = GridSpec(1,1,left=0.05,bottom=0.15,right=0.95,top=0.9,wspace=0.1,hspace=0.1) ax = plt.subplot(plot[0,0]) plt.title(name, fontsize=20) data_array = Model_stats_P_r_grid[i] if i==0: data_array = (data_array/Nstars_sim)/(Nplanets_Kepler/Nstars_Kepler) plt.imshow(data_array, aspect=xy_ratio, origin='lower', extent=(xmin, xmax, ymin, ymax)) plt.colorbar() plt.xlabel(r'$\alpha_R$', fontsize=20) plt.ylabel(r'$\alpha_P$', fontsize=20) if savefigures == True: plt.savefig(savefigures_directory + 'Power_law_r/Paper_Figures/KS_grids/' + model_name + '_P_r_stats_%s.pdf' % i) plt.close() plt.show() #To plot the 2D arrays of model fit statistics on the grid of 'num_mutual_hill_radii' vs. 'sigma_logperiod_per_pl_in_cluster': num_mutual_hill_radii_range = np.linspace(10., 20., 11) sigma_logperiod_per_pl_in_cluster_range = np.linspace(0.1, 0.4, 11) d_y = np.diff(num_mutual_hill_radii_range)[0] d_x = np.diff(sigma_logperiod_per_pl_in_cluster_range)[0] xmin, xmax, ymin, ymax = sigma_logperiod_per_pl_in_cluster_range[0] - d_x/2., sigma_logperiod_per_pl_in_cluster_range[-1] + d_x/2., num_mutual_hill_radii_range[0] - d_y/2., num_mutual_hill_radii_range[-1] + d_y/2. xy_ratio = (xmax - xmin)/(ymax - ymin) for i,name in enumerate(Model_stats_fields): fig = plt.figure(figsize=(5,4)) plot = GridSpec(1,1,left=0.05,bottom=0.15,right=0.95,top=0.9,wspace=0.1,hspace=0.1) ax = plt.subplot(plot[0,0]) plt.title(name, fontsize=20) data_array = Model_stats_Nhill_sigma_grid[i] if i==0: data_array = (data_array/Nstars_sim)/(Nplanets_Kepler/Nstars_Kepler) plt.imshow(data_array, aspect=xy_ratio, origin='lower', extent=(xmin, xmax, ymin, ymax)) plt.colorbar() plt.xlabel(r'$\sigma_N$', fontsize=20) plt.ylabel(r'$\Delta_c$', fontsize=20) if savefigures == True: plt.savefig(savefigures_directory + 'Power_law_r/Paper_Figures/KS_grids/' + model_name + '_Nhill_sigma_stats_%s.pdf' % i) plt.close() plt.show() #To plot the 2D arrays of model fit statistics on the grid of 'sigma_incl' vs. 'sigma_hk': sigma_incl_range = np.linspace(0., 3., 11) sigma_hk_range = np.linspace(0., 0.1, 11) d_y = np.diff(sigma_incl_range)[0] d_x = np.diff(sigma_hk_range)[0] xmin, xmax, ymin, ymax = sigma_hk_range[0] - d_x/2., sigma_hk_range[-1] + d_x/2., sigma_incl_range[0] - d_y/2., sigma_incl_range[-1] + d_y/2. xy_ratio = (xmax - xmin)/(ymax - ymin) for i,name in enumerate(Model_stats_fields): fig = plt.figure(figsize=(5,4)) plot = GridSpec(1,1,left=0.05,bottom=0.15,right=0.95,top=0.9,wspace=0.1,hspace=0.1) ax = plt.subplot(plot[0,0]) plt.title(name, fontsize=20) data_array = Model_stats_sigma_incl_sigma_hk_grid[i] if i==0: data_array = (data_array/Nstars_sim)/(Nplanets_Kepler/Nstars_Kepler) plt.imshow(data_array, aspect=xy_ratio, origin='lower', extent=(xmin, xmax, ymin, ymax)) plt.colorbar() plt.xlabel(r'$\sigma_e$', fontsize=20) plt.ylabel(r'$\sigma_i$', fontsize=20) if savefigures == True: plt.savefig(savefigures_directory + 'Power_law_r/Paper_Figures/KS_grids/' + model_name + '_sigma_incl_sigma_hk_stats_%s.pdf' % i) plt.close() plt.show() #To plot the 2D arrays of model fit statistics on the grid of 'max_radius' vs. 'mr_power_law': max_radius_range = np.linspace(2., 12., 11) mr_range = np.linspace(1.5, 3.5, 11) d_y = np.diff(max_radius_range)[0] d_x = np.diff(mr_range)[0] xmin, xmax, ymin, ymax = mr_range[0] - d_x/2., mr_range[-1] + d_x/2., max_radius_range[0] - d_y/2., max_radius_range[-1] + d_y/2. xy_ratio = (xmax - xmin)/(ymax - ymin) for i,name in enumerate(Model_stats_fields): fig = plt.figure(figsize=(5,4)) plot = GridSpec(1,1,left=0.05,bottom=0.15,right=0.95,top=0.9,wspace=0.1,hspace=0.1) ax = plt.subplot(plot[0,0]) plt.title(name, fontsize=20) data_array = Model_stats_max_radius_mr_grid[i] if i==0: data_array = (data_array/Nstars_sim)/(Nplanets_Kepler/Nstars_Kepler) plt.imshow(data_array, aspect=xy_ratio, origin='lower', extent=(xmin, xmax, ymin, ymax)) plt.colorbar() plt.xlabel(r'$\alpha_{mr}$', fontsize=20) plt.ylabel(r'$R_{p,\rm max}$ $(R_\odot)$', fontsize=20) if savefigures == True: plt.savefig(savefigures_directory + 'Power_law_r/Paper_Figures/KS_grids/' + model_name + '_max_radius_mr_stats_%s.pdf' % i) plt.close() plt.show() #To plot the 2D arrays of model fit statistics on the grid of 'log_rate_clusters' vs. 'log_rate_planets_per_cluster': Model_stats_fields = [r'$f_{\rm sim}/f_{\rm Kepler}$', r'$N_{\rm obs,singles}$', 'Planet Multiplicities', r'$P$', r'$P_{i+1}/P_i$', r'$\delta$', r'$\/xi$'] #names of the fields associated with the 'Model_stats_...' arrays Nc_range = np.linspace(1., 3., 11) Np_range = np.linspace(1., 3., 11) d_y = np.diff(Nc_range)[0] d_x = np.diff(Np_range)[0] xmin, xmax, ymin, ymax = Np_range[0] - d_x/2., Np_range[-1] + d_x/2., Nc_range[0] - d_y/2., Nc_range[-1] + d_y/2. xy_ratio = (xmax - xmin)/(ymax - ymin) for i,name in enumerate(Model_stats_fields): fig = plt.figure(figsize=(5,4)) plot = GridSpec(1,1,left=0.05,bottom=0.15,right=0.95,top=0.9,wspace=0.1,hspace=0.1) ax = plt.subplot(plot[0,0]) plt.title(name, fontsize=20) data_array = Model_stats_Nc_Np_grid[i] if i==0: data_array = (data_array/Nstars_sim)/(Nplanets_Kepler/Nstars_Kepler) plt.imshow(data_array, aspect=xy_ratio, origin='lower', extent=(xmin, xmax, ymin, ymax)) plt.colorbar() plt.xlabel(r'$\lambda_p$', fontsize=20) plt.ylabel(r'$\lambda_c$', fontsize=20) if savefigures == True: plt.savefig(savefigures_directory + 'Power_law_r/Paper_Figures/KS_grids/' + model_name + '_Nc_Np_stats_%s.pdf' % i) plt.close() plt.show() ''' ''' #To plot the 2D arrays of model fit statistics on the grid of 'power_law_r1' vs. 'power_law_r2' for broken power law model of radii: Model_stats_fields = ['Number of observed planets', 'K-S multiplicities', 'K-S periods', 'K-S period ratios', 'K-S transit durations', 'K-S xi', 'K-S transit depths', 'K-S transit depth ratios'] #names of the fields associated with the 'Model_stats_...' arrays r1_range = np.linspace(-6., 3., 11) r2_range = np.linspace(-6., 3., 11) d_y = np.diff(r1_range)[0] d_x = np.diff(r2_range)[0] xmin, xmax, ymin, ymax = r2_range[0] - d_x/2., r2_range[-1] + d_x/2., r1_range[0] - d_y/2., r1_range[-1] + d_y/2. xy_ratio = (xmax - xmin)/(ymax - ymin) fig = plt.figure(figsize=(16,8)) plot = GridSpec(2,4,left=0.075,bottom=0.115,right=0.95,top=0.925,wspace=0.25,hspace=0.4) plot_rows = [0,0,0,0,1,1,1,1] plot_cols = [0,1,2,3,0,1,2,3] for i,name in enumerate(Model_stats_fields): ax = plt.subplot(plot[plot_rows[i],plot_cols[i]]) plt.title(name, fontsize=20) plt.imshow(Model_stats_r1_r2_grid[i], aspect=xy_ratio, origin='lower', extent=(xmin, xmax, ymin, ymax)) plt.colorbar() plt.xlabel(r'power_law_r2', fontsize=20) plt.ylabel(r'power_law_r1', fontsize=20) if savefigures == True: plt.savefig(savefigures_directory + 'Power_law_r1_r2_sigma_r/' + model_name + '_r1_r2_rbreak2_stats.pdf') else: plt.show() plt.close() ''' ''' #To plot the 2D arrays of model fit statistics on the grid of 'power_law_r1' vs. 'power_law_r2' for broken power law model of radii: r1_range = np.linspace(-3., 3., 11) r2_range = np.linspace(-3., 3., 11) d_y = np.diff(r1_range)[0] d_x = np.diff(r2_range)[0] xmin, xmax, ymin, ymax = r2_range[0] - d_x/2., r2_range[-1] + d_x/2., r1_range[0] - d_y/2., r1_range[-1] + d_y/2. xy_ratio = (xmax - xmin)/(ymax - ymin) fig = plt.figure(figsize=(16,8)) plot = GridSpec(2,4,left=0.075,bottom=0.115,right=0.95,top=0.925,wspace=0.25,hspace=0.4) plot_rows = [0,0,0,0,1,1,1] plot_cols = [0,1,2,3,0,1,2] for i,name in enumerate(Model_stats_fields): ax = plt.subplot(plot[plot_rows[i],plot_cols[i]]) plt.title(name, fontsize=20) plt.imshow(Model_stats_r1_r2_rbreak3_grid[i], aspect=xy_ratio, origin='lower', extent=(xmin, xmax, ymin, ymax)) plt.colorbar() plt.xlabel(r'power_law_r2', fontsize=20) plt.ylabel(r'power_law_r1', fontsize=20) if savefigures == True: plt.savefig(savefigures_directory + 'Power_law_r1_r2/' + model_name + '_r1_r2_rbreak3_stats.pdf') else: plt.show() plt.close() ''' ''' #To plot the 2D arrays of model fit statistics on the grid of 'power_law_r' vs. 'sigma_log_radius_in_cluster' for clustered (lognormal) radii, but still a single power law: Model_stats_fields = ['Number of observed planets', 'Number of observed singles', 'K-S multiplicities', 'K-S periods', 'K-S period ratios', 'K-S transit depths', 'K-S xi'] #names of the fields associated with the 'Model_stats_...' arrays r_range = np.linspace(-3., -1.2, 11) sigma_r_range = np.linspace(0.05, 0.5, 11) d_y = np.diff(r_range)[0] d_x = np.diff(sigma_r_range)[0] xmin, xmax, ymin, ymax = sigma_r_range[0] - d_x/2., sigma_r_range[-1] + d_x/2., r_range[0] - d_y/2., r_range[-1] + d_y/2. xy_ratio = (xmax - xmin)/(ymax - ymin) fig = plt.figure(figsize=(16,8)) plot = GridSpec(2,4,left=0.075,bottom=0.115,right=0.95,top=0.925,wspace=0.25,hspace=0.4) plot_rows = [0,0,0,0,1,1,1] plot_cols = [0,1,2,3,0,1,2] for i,name in enumerate(Model_stats_fields): ax = plt.subplot(plot[plot_rows[i],plot_cols[i]]) plt.title(name, fontsize=20) plt.imshow(Model_stats_r_sigma_r_grid[i], aspect=xy_ratio, origin='lower', extent=(xmin, xmax, ymin, ymax)) plt.colorbar() plt.xlabel(r'sigma_log_radius_in_cluster', fontsize=20) plt.ylabel(r'power_law_r', fontsize=20) if savefigures == True: plt.savefig(savefigures_directory + 'Power_law_r_sigma_r/' + model_name + '_r_sigma_r_stats.pdf') else: plt.show() plt.close() ''' #''' ##### To re-make each of the above grid plots as single panels for Comprehensive exam paper: Model_stats_fields = [r'$f_{\rm sim}/f_{\rm Kepler}$', 'Planet Multiplicities', r'$P$', r'$P_{i+1}/P_i$', r'$t_{\rm dur}$', r'$\xi$', r'$\delta$', r'$\delta_{i+1}/\delta_i$'] #names of the fields associated with the 'Model_stats_...' arrays #To plot the 2D arrays of model fit statistics on the grid of 'power_law_r1' vs. 'power_law_r2': r1_range = np.linspace(-6., 3., 11) r2_range = np.linspace(-6., 3., 11) d_y = np.diff(r1_range)[0] d_x = np.diff(r2_range)[0] xmin, xmax, ymin, ymax = r2_range[0] - d_x/2., r2_range[-1] + d_x/2., r1_range[0] - d_y/2., r1_range[-1] + d_y/2. xy_ratio = (xmax - xmin)/(ymax - ymin) for i,name in enumerate(Model_stats_fields): fig = plt.figure(figsize=(5,4)) plot = GridSpec(1,1,left=0.05,bottom=0.15,right=0.95,top=0.9,wspace=0.1,hspace=0.1) ax = plt.subplot(plot[0,0]) plt.title(name, fontsize=20) data_array = Model_stats_r1_r2_grid[i] if i==0: data_array = (data_array/(Nstars_sim/cos_factor))/(Nplanets_Kepler/Nstars_Kepler) plt.imshow(data_array, aspect=xy_ratio, vmin=0.5, vmax=2., origin='lower', extent=(xmin, xmax, ymin, ymax)) else: plt.imshow(data_array, aspect=xy_ratio, vmin=0., vmax=0.2, origin='lower', extent=(xmin, xmax, ymin, ymax)) plt.colorbar() plt.xlabel(r'$\alpha_{R2}$', fontsize=20) plt.ylabel(r'$\alpha_{R1}$', fontsize=20) if savefigures == True: plt.savefig(savefigures_directory + 'Power_law_r1_r2_sigma_r/Paper_Figures/KS_grids/' + model_name + '_r1_r2_rbreak2_stats_%s.pdf' % i) plt.close() plt.show() #To plot the 2D arrays of model fit statistics on the grid of 'num_mutual_hill_radii' vs. 'sigma_logperiod_per_pl_in_cluster': num_mutual_hill_radii_range = np.linspace(5., 20., 11) sigma_logperiod_per_pl_in_cluster_range = np.linspace(0.05, 0.5, 11) d_y = np.diff(num_mutual_hill_radii_range)[0] d_x = np.diff(sigma_logperiod_per_pl_in_cluster_range)[0] xmin, xmax, ymin, ymax = sigma_logperiod_per_pl_in_cluster_range[0] - d_x/2., sigma_logperiod_per_pl_in_cluster_range[-1] + d_x/2., num_mutual_hill_radii_range[0] - d_y/2., num_mutual_hill_radii_range[-1] + d_y/2. xy_ratio = (xmax - xmin)/(ymax - ymin) for i,name in enumerate(Model_stats_fields): fig = plt.figure(figsize=(5,4)) plot = GridSpec(1,1,left=0.05,bottom=0.15,right=0.95,top=0.9,wspace=0.1,hspace=0.1) ax = plt.subplot(plot[0,0]) plt.title(name, fontsize=20) data_array = Model_stats_Nhill_sigma_grid[i] if i==0: data_array = (data_array/(Nstars_sim/cos_factor))/(Nplanets_Kepler/Nstars_Kepler) plt.imshow(data_array, aspect=xy_ratio, vmin=0.5, vmax=2., origin='lower', extent=(xmin, xmax, ymin, ymax)) else: plt.imshow(data_array, aspect=xy_ratio, vmin=0., vmax=0.2, origin='lower', extent=(xmin, xmax, ymin, ymax)) plt.colorbar() plt.xlabel(r'$\sigma_N$', fontsize=20) plt.ylabel(r'$\Delta_c$', fontsize=20) if savefigures == True: plt.savefig(savefigures_directory + 'Power_law_r1_r2_sigma_r/Paper_Figures/KS_grids/' + model_name + '_Nhill_sigma_stats_%s.pdf' % i) plt.close() plt.show() #To plot the 2D arrays of model fit statistics on the grid of 'sigma_incl' vs. 'sigma_hk': sigma_incl_range = np.linspace(0., 5., 11) sigma_hk_range = np.linspace(0., 0.2, 11) d_y = np.diff(sigma_incl_range)[0] d_x = np.diff(sigma_hk_range)[0] xmin, xmax, ymin, ymax = sigma_hk_range[0] - d_x/2., sigma_hk_range[-1] + d_x/2., sigma_incl_range[0] - d_y/2., sigma_incl_range[-1] + d_y/2. xy_ratio = (xmax - xmin)/(ymax - ymin) for i,name in enumerate(Model_stats_fields): fig = plt.figure(figsize=(5,4)) plot = GridSpec(1,1,left=0.05,bottom=0.15,right=0.95,top=0.9,wspace=0.1,hspace=0.1) ax = plt.subplot(plot[0,0]) plt.title(name, fontsize=20) data_array = Model_stats_sigma_incl_sigma_hk_grid[i] if i==0: data_array = (data_array/(Nstars_sim/cos_factor))/(Nplanets_Kepler/Nstars_Kepler) plt.imshow(data_array, aspect=xy_ratio, vmin=0.5, vmax=2., origin='lower', extent=(xmin, xmax, ymin, ymax)) else: plt.imshow(data_array, aspect=xy_ratio, vmin=0., vmax=0.2, origin='lower', extent=(xmin, xmax, ymin, ymax)) plt.colorbar() plt.xlabel(r'$\sigma_e$', fontsize=20) plt.ylabel(r'$\sigma_i$', fontsize=20) if savefigures == True: plt.savefig(savefigures_directory + 'Power_law_r1_r2_sigma_r/Paper_Figures/KS_grids/' + model_name + '_sigma_incl_sigma_hk_stats_%s.pdf' % i) plt.close() plt.show() #To plot the 2D arrays of model fit statistics on the grid of 'mr_power_law' vs. 'sigma_log_radius_in_cluster': mr_range = np.linspace(1.5, 3.5, 11) sigmaR_range = np.linspace(0.1, 1.0, 11) d_y = np.diff(mr_range)[0] d_x = np.diff(sigmaR_range)[0] xmin, xmax, ymin, ymax = sigmaR_range[0] - d_x/2., sigmaR_range[-1] + d_x/2., mr_range[0] - d_y/2., mr_range[-1] + d_y/2. xy_ratio = (xmax - xmin)/(ymax - ymin) for i,name in enumerate(Model_stats_fields): fig = plt.figure(figsize=(5,4)) plot = GridSpec(1,1,left=0.05,bottom=0.15,right=0.95,top=0.9,wspace=0.1,hspace=0.1) ax = plt.subplot(plot[0,0]) plt.title(name, fontsize=20) data_array = Model_stats_mr_sigmaR_grid[i] if i==0: data_array = (data_array/(Nstars_sim/cos_factor))/(Nplanets_Kepler/Nstars_Kepler) plt.imshow(data_array, aspect=xy_ratio, vmin=0.5, vmax=2., origin='lower', extent=(xmin, xmax, ymin, ymax)) else: plt.imshow(data_array, aspect=xy_ratio, vmin=0., vmax=0.2, origin='lower', extent=(xmin, xmax, ymin, ymax)) plt.colorbar() plt.xlabel(r'$\sigma_R$', fontsize=20) plt.ylabel(r'$\alpha_{mr}$', fontsize=20) if savefigures == True: plt.savefig(savefigures_directory + 'Power_law_r1_r2_sigma_r/Paper_Figures/KS_grids/' + model_name + '_mr_sigmaR_stats_%s.pdf' % i) plt.close() plt.show() #To plot the 2D arrays of model fit statistics on the grid of 'log_rate_clusters' vs. 'log_rate_planets_per_cluster': Model_stats_fields = [r'$f_{\rm sim}/f_{\rm Kepler}$', r'$N_{p,\rm obs,singles}$', 'Planet Multiplicities', r'$P$', r'$P_{i+1}/P_i$', r'$t_{\rm dur}$', r'$\xi$', r'$\delta$', r'$\delta_{i+1}/\delta_i$'] #names of the fields associated with the 'Model_stats_...' arrays Nc_range = np.linspace(1., 5., 11) Np_range = np.linspace(1., 5., 11) d_y = np.diff(Nc_range)[0] d_x = np.diff(Np_range)[0] xmin, xmax, ymin, ymax = Np_range[0] - d_x/2., Np_range[-1] + d_x/2., Nc_range[0] - d_y/2., Nc_range[-1] + d_y/2. xy_ratio = (xmax - xmin)/(ymax - ymin) for i,name in enumerate(Model_stats_fields): fig = plt.figure(figsize=(5,4)) plot = GridSpec(1,1,left=0.05,bottom=0.15,right=0.95,top=0.9,wspace=0.1,hspace=0.1) ax = plt.subplot(plot[0,0]) plt.title(name, fontsize=20) data_array = Model_stats_Nc_Np_grid[i] if i==0: data_array = (data_array/(Nstars_sim/cos_factor))/(Nplanets_Kepler/Nstars_Kepler) plt.imshow(data_array, aspect=xy_ratio, vmin=0.5, vmax=2., origin='lower', extent=(xmin, xmax, ymin, ymax)) else: plt.imshow(data_array, aspect=xy_ratio, vmin=0., vmax=0.2, origin='lower', extent=(xmin, xmax, ymin, ymax)) plt.colorbar() plt.xlabel(r'$\lambda_p$', fontsize=20) plt.ylabel(r'$\lambda_c$', fontsize=20) if savefigures == True: plt.savefig(savefigures_directory + 'Power_law_r1_r2_sigma_r/Paper_Figures/KS_grids/' + model_name + '_Nc_Np_stats_%s.pdf' % i) plt.close() plt.show() #'''
43.523926
347
0.678056
6,222
35,472
3.617969
0.047091
0.043979
0.017725
0.030563
0.937719
0.930301
0.901559
0.88037
0.873306
0.864333
0
0.045393
0.169035
35,472
814
348
43.577396
0.718313
0.066221
0
0.59633
0
0
0.136726
0.087106
0
0
0
0
0
0
null
null
0
0.041284
null
null
0.022936
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
1
0
0
0
0
0
0
0
0
7
e7e0607548dfc7214da93330eb087c16c14d12a0
66
py
Python
whyis/decorator/__init__.py
tolulomo/whyis
eb50ab3301eb7efd27a1a3f6fb2305dedd910397
[ "Apache-2.0" ]
31
2018-05-30T02:41:23.000Z
2021-10-17T01:25:20.000Z
whyis/decorator/__init__.py
tolulomo/whyis
eb50ab3301eb7efd27a1a3f6fb2305dedd910397
[ "Apache-2.0" ]
115
2018-04-07T00:59:11.000Z
2022-03-02T03:06:45.000Z
whyis/decorator/__init__.py
tolulomo/whyis
eb50ab3301eb7efd27a1a3f6fb2305dedd910397
[ "Apache-2.0" ]
25
2018-04-07T00:49:55.000Z
2021-09-28T14:29:18.000Z
from .conditional_login_required import conditional_login_required
66
66
0.939394
8
66
7.25
0.625
0.551724
0.827586
0
0
0
0
0
0
0
0
0
0.045455
66
1
66
66
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
99d9cf233e740e3c81b48a8e27032cb71aec7103
5,063
py
Python
selenium_lib/common.py
sudotong/slack-end-to-end-testing
6cbdf118b908b7d6fd72ff75e817584d44d07aae
[ "Apache-2.0" ]
null
null
null
selenium_lib/common.py
sudotong/slack-end-to-end-testing
6cbdf118b908b7d6fd72ff75e817584d44d07aae
[ "Apache-2.0" ]
null
null
null
selenium_lib/common.py
sudotong/slack-end-to-end-testing
6cbdf118b908b7d6fd72ff75e817584d44d07aae
[ "Apache-2.0" ]
null
null
null
import time from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as EC from selenium.common.exceptions import TimeoutException from selenium.webdriver.support.ui import WebDriverWait class SeleniumLib(object): def wait_for_id(self, object_id): driver = self.driver try: element = WebDriverWait(driver, self.wait_time).until( EC.presence_of_element_located((By.ID, object_id)) ) except TimeoutException: print 'loading took to much time for: ', object_id assert False def wait_for_xpath(self, path, should_assert=False): driver = self.driver try: element = WebDriverWait(driver, self.wait_time).until( EC.presence_of_element_located((By.XPATH, path)) ) return True except TimeoutException: print 'loading took to much time for: ', path #if should_assert: # assert False # should this assert? return False def wait_for_css_path(self, path, should_assert=False): driver = self.driver try: element = WebDriverWait(driver, self.wait_time).until( EC.presence_of_element_located((By.CSS_SELECTOR, path)) ) driver.find_element_by_css_selector(path) return True except TimeoutException: print 'loading took to much time for: ', path #if should_assert: assert False # should this assert? return False def wait_for_css_path_to_be_visible(self, path, should_assert=False): driver = self.driver try: element = WebDriverWait(driver, self.wait_time).until( EC.visibility_of_element_located((By.CSS_SELECTOR, path)) ) driver.find_element_by_css_selector(path) return True except TimeoutException: print 'loading took to much time for: ', path #if should_assert: assert False # should this assert? return False def wait_for_id_to_be_clickable(self, object_id): driver = self.driver try: element = WebDriverWait(driver, self.wait_time).until( EC.element_to_be_clickable((By.ID, object_id)) ) time.sleep(1) driver.find_element_by_id(object_id).click() except TimeoutException: print 'loading took too much time for: ', object_id assert False def wait_for_xpath_to_be_clickable(self, object_path, should_assert=True): driver = self.driver try: element = WebDriverWait(driver, self.wait_time).until( EC.element_to_be_clickable((By.XPATH, object_path)) ) time.sleep(1) driver.find_element_by_xpath(object_path).click() except TimeoutException: print 'loading took too much time for: ', object_path if should_assert: assert False def wait_for_css_path_to_be_clickable(self, object_path): driver = self.driver try: element = WebDriverWait(driver, self.wait_time).until( EC.element_to_be_clickable((By.CSS_SELECTOR, object_path)) ) time.sleep(1) driver.find_element_by_css_selector(object_path).click() except TimeoutException: print 'loading took too much time for: ', object_path assert False def wait_for_text_in_xpath(self, path, wait_text, should_assert=True): driver = self.driver try: element = WebDriverWait(driver, self.wait_time).until( EC.text_to_be_present_in_element((By.XPATH, path), wait_text) ) except TimeoutException: print "loading took too much time for: ", wait_text, " in ", path if should_assert: assert False def wait_for_text_in_css_path(self, path, wait_text, should_assert=True): driver = self.driver try: element = WebDriverWait(driver, self.wait_time).until( EC.text_to_be_present_in_element((By.CSS_SELECTOR, path), wait_text) ) except TimeoutException: print "loading took too much time for: ", wait_text, " in ", path if should_assert: assert False def get_attribute_in_css_path(self, path, attribute): driver = self.driver try: element = WebDriverWait(driver, self.wait_time).until( EC.element_to_be_clickable((By.CSS_SELECTOR, path)) ) time.sleep(1) return element.get_attribute(attribute) except TimeoutException: print 'loading took too much time for: ', object_path assert False def __init__(self, driver, wait_time=10): self.driver = driver self.wait_time = wait_time
37.503704
84
0.610113
591
5,063
4.969543
0.108291
0.071502
0.052434
0.067416
0.850528
0.834185
0.813415
0.797072
0.791965
0.737487
0
0.001733
0.316216
5,063
134
85
37.783582
0.84662
0.025281
0
0.615385
0
0
0.065747
0
0
0
0
0
0.153846
0
null
null
0
0.042735
null
null
0.08547
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
1
0
0
0
0
0
0
0
0
7
8211a7e940b58993b1602b315ba350c973d8e3a6
1,621
py
Python
test/TestEventIsEmpty.py
ruchidesai/redi
562706805fb6bb472f38ba79094a57c72848492e
[ "BSD-3-Clause" ]
null
null
null
test/TestEventIsEmpty.py
ruchidesai/redi
562706805fb6bb472f38ba79094a57c72848492e
[ "BSD-3-Clause" ]
null
null
null
test/TestEventIsEmpty.py
ruchidesai/redi
562706805fb6bb472f38ba79094a57c72848492e
[ "BSD-3-Clause" ]
null
null
null
import unittest from lxml import etree from form import Form class TestEventIsEmpty(unittest.TestCase): def test_is_empty(self): raw_xml = """ <person_form_event> <person> <study_id>60</study_id> <all_form_events> <form> <name>hcv_rna_results</name> <event> <name>1_arm_1</name> <field><name/><value/></field> <field><name>hcv_lbdtc</name><value/></field> </event> </form> </all_form_events> </person> </person_form_event>""" form = Form(etree.fromstring(raw_xml)) event = form.events().next() self.assertTrue(event.is_empty()) def test_is_not_empty(self): raw_xml = """ <person_form_event> <person> <study_id>60</study_id> <all_form_events> <form> <name>hcv_rna_results</name> <event> <name>1_arm_1</name> <field><name/><value>o hai</value></field> <field><name>hcv_lbdtc</name><value/></field> </event> </form> </all_form_events> </person> </person_form_event>""" form = Form(etree.fromstring(raw_xml)) event = form.events().next() self.assertFalse(event.is_empty()) if __name__ == "__main__": unittest.main()
28.946429
67
0.456508
155
1,621
4.458065
0.264516
0.086831
0.086831
0.043415
0.739508
0.739508
0.739508
0.739508
0.739508
0.739508
0
0.008511
0.420111
1,621
55
68
29.472727
0.726596
0
0
0.73913
0
0
0.681061
0.150524
0
0
0
0
0.043478
1
0.043478
false
0
0.065217
0
0.130435
0
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
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
415922cdd9da6e402e62e21750a6c6ac935fc57d
27
py
Python
minimax/minimax.py
LenniDev/minimax
e56b3f2a2f6ac448596e382fb2e4b1d327b26470
[ "MIT" ]
1
2021-11-28T15:13:11.000Z
2021-11-28T15:13:11.000Z
minimax/minimax.py
LenniDev/minimax
e56b3f2a2f6ac448596e382fb2e4b1d327b26470
[ "MIT" ]
null
null
null
minimax/minimax.py
LenniDev/minimax
e56b3f2a2f6ac448596e382fb2e4b1d327b26470
[ "MIT" ]
null
null
null
def minimax(): return 0
13.5
14
0.62963
4
27
4.25
1
0
0
0
0
0
0
0
0
0
0
0.05
0.259259
27
2
15
13.5
0.8
0
0
0
0
0
0
0
0
0
0
0
0
1
0.5
true
0
0
0.5
1
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
1
1
0
0
1
1
0
0
7
41a921b19cfa4db22d0f43be9be5e36f0f268098
8,387
py
Python
a10sdk/core/cgnv6/cgnv6_pcp.py
deepfield/a10sdk-python
bfaa58099f51f085d5e91652d1d1a3fd5c529d5d
[ "Apache-2.0" ]
16
2015-05-20T07:26:30.000Z
2021-01-23T11:56:57.000Z
a10sdk/core/cgnv6/cgnv6_pcp.py
deepfield/a10sdk-python
bfaa58099f51f085d5e91652d1d1a3fd5c529d5d
[ "Apache-2.0" ]
6
2015-03-24T22:07:11.000Z
2017-03-28T21:31:18.000Z
a10sdk/core/cgnv6/cgnv6_pcp.py
deepfield/a10sdk-python
bfaa58099f51f085d5e91652d1d1a3fd5c529d5d
[ "Apache-2.0" ]
23
2015-03-29T15:43:01.000Z
2021-06-02T17:12:01.000Z
from a10sdk.common.A10BaseClass import A10BaseClass class SamplingEnable(A10BaseClass): """This class does not support CRUD Operations please use parent. :param counters1: {"enum": ["all", "packets-rcv", "lsn-map-process-success", "dslite-map-process-success", "nat64-map-process-success", "lsn-peer-process-success", "dslite-peer-process-success", "nat64-peer-process-success", "lsn-announce-process-success", "dslite-announce-process-success", "nat64-announce-process-success", "pkt-not-request-drop", "pkt-too-short-drop", "noroute-drop", "unsupported-version", "not-authorized", "malform-request", "unsupp-opcode", "unsupp-option", "malform-option", "no-resources", "unsupp-protocol", "user-quota-exceeded", "cannot-provide-suggest", "address-mismatch", "excessive-remote-peers", "pkt-not-from-nat-inside", "l4-process-error", "internal-error-drop", "unsol_ance_sent_succ", "unsol_ance_sent_fail", "ha_sync_epoch_sent", "ha_sync_epoch_rcv", "fullcone-ext-alloc", "fullcone-ext-free", "fullcone-ext-alloc-failure", "fullcone-ext-notfound", "fullcone-ext-reuse", "client-nonce-mismatch", "map-filter-set", "map-filter-deny"], "type": "string", "description": "'all': all; 'packets-rcv': Packets Received; 'lsn-map-process-success': PCP MAP Request Processing Success (NAT44); 'dslite-map-process-success': PCP MAP Request Processing Success (DS-Lite); 'nat64-map-process-success': PCP MAP Request Processing Success (NAT64); 'lsn-peer-process-success': PCP PEER Request Processing Success (NAT44); 'dslite-peer-process-success': PCP PEER Request Processing Success (DS-Lite); 'nat64-peer-process-success': PCP PEER Request Processing Success (NAT64); 'lsn-announce-process-success': PCP ANNOUNCE Request Processing Success (NAT44); 'dslite-announce-process-success': PCP ANNOUNCE Request Processing Success (DS-Lite); 'nat64-announce-process-success': PCP ANNOUNCE Request Processing Success (NAT64); 'pkt-not-request-drop': Packet Not a PCP Request; 'pkt-too-short-drop': Packet Too Short; 'noroute-drop': Response No Route; 'unsupported-version': Unsupported PCP version; 'not-authorized': PCP Request Not Authorized; 'malform-request': PCP Request Malformed; 'unsupp-opcode': Unsupported PCP Opcode; 'unsupp-option': Unsupported PCP Option; 'malform-option': PCP Option Malformed; 'no-resources': No System or NAT Resources; 'unsupp-protocol': Unsupported Mapping Protocol; 'user-quota-exceeded': User Quota Exceeded; 'cannot-provide-suggest': Cannot Provide Suggested Port When PREFER_FAILURE; 'address-mismatch': PCP Client Address Mismatch; 'excessive-remote-peers': Excessive Remote Peers; 'pkt-not-from-nat-inside': Packet Dropped For Not Coming From NAT Inside; 'l4-process-error': L3/L4 Process Error; 'internal-error-drop': Internal Error; 'unsol_ance_sent_succ': Unsolicited Announce Sent; 'unsol_ance_sent_fail': Unsolicited Announce Send Failure; 'ha_sync_epoch_sent': HA Sync PCP Epoch Sent; 'ha_sync_epoch_rcv': HA Sync PCP Epoch Recv; 'fullcone-ext-alloc': PCP Fullcone Extension Alloc; 'fullcone-ext-free': PCP Fullcone Extension Free; 'fullcone-ext-alloc-failure': PCP Fullcone Extension Alloc Failure; 'fullcone-ext-notfound': PCP Fullcone Extension Not Found; 'fullcone-ext-reuse': PCP Fullcone Extension Reuse; 'client-nonce-mismatch': PCP Client Nonce Mismatch; 'map-filter-set': PCP MAP Filter Set; 'map-filter-deny': PCP MAP Filter Deny Inbound; ", "format": "enum"} :param DeviceProxy: The device proxy for REST operations and session handling. Refer to `common/device_proxy.py` """ def __init__(self, **kwargs): self.ERROR_MSG = "" self.b_key = "sampling-enable" self.DeviceProxy = "" self.counters1 = "" for keys, value in kwargs.items(): setattr(self,keys, value) class Pcp(A10BaseClass): """ :param sampling_enable: {"minItems": 1, "items": {"type": "object"}, "uniqueItems": true, "type": "array", "array": [{"properties": {"optional": true, "counters1": {"enum": ["all", "packets-rcv", "lsn-map-process-success", "dslite-map-process-success", "nat64-map-process-success", "lsn-peer-process-success", "dslite-peer-process-success", "nat64-peer-process-success", "lsn-announce-process-success", "dslite-announce-process-success", "nat64-announce-process-success", "pkt-not-request-drop", "pkt-too-short-drop", "noroute-drop", "unsupported-version", "not-authorized", "malform-request", "unsupp-opcode", "unsupp-option", "malform-option", "no-resources", "unsupp-protocol", "user-quota-exceeded", "cannot-provide-suggest", "address-mismatch", "excessive-remote-peers", "pkt-not-from-nat-inside", "l4-process-error", "internal-error-drop", "unsol_ance_sent_succ", "unsol_ance_sent_fail", "ha_sync_epoch_sent", "ha_sync_epoch_rcv", "fullcone-ext-alloc", "fullcone-ext-free", "fullcone-ext-alloc-failure", "fullcone-ext-notfound", "fullcone-ext-reuse", "client-nonce-mismatch", "map-filter-set", "map-filter-deny"], "type": "string", "description": "'all': all; 'packets-rcv': Packets Received; 'lsn-map-process-success': PCP MAP Request Processing Success (NAT44); 'dslite-map-process-success': PCP MAP Request Processing Success (DS-Lite); 'nat64-map-process-success': PCP MAP Request Processing Success (NAT64); 'lsn-peer-process-success': PCP PEER Request Processing Success (NAT44); 'dslite-peer-process-success': PCP PEER Request Processing Success (DS-Lite); 'nat64-peer-process-success': PCP PEER Request Processing Success (NAT64); 'lsn-announce-process-success': PCP ANNOUNCE Request Processing Success (NAT44); 'dslite-announce-process-success': PCP ANNOUNCE Request Processing Success (DS-Lite); 'nat64-announce-process-success': PCP ANNOUNCE Request Processing Success (NAT64); 'pkt-not-request-drop': Packet Not a PCP Request; 'pkt-too-short-drop': Packet Too Short; 'noroute-drop': Response No Route; 'unsupported-version': Unsupported PCP version; 'not-authorized': PCP Request Not Authorized; 'malform-request': PCP Request Malformed; 'unsupp-opcode': Unsupported PCP Opcode; 'unsupp-option': Unsupported PCP Option; 'malform-option': PCP Option Malformed; 'no-resources': No System or NAT Resources; 'unsupp-protocol': Unsupported Mapping Protocol; 'user-quota-exceeded': User Quota Exceeded; 'cannot-provide-suggest': Cannot Provide Suggested Port When PREFER_FAILURE; 'address-mismatch': PCP Client Address Mismatch; 'excessive-remote-peers': Excessive Remote Peers; 'pkt-not-from-nat-inside': Packet Dropped For Not Coming From NAT Inside; 'l4-process-error': L3/L4 Process Error; 'internal-error-drop': Internal Error; 'unsol_ance_sent_succ': Unsolicited Announce Sent; 'unsol_ance_sent_fail': Unsolicited Announce Send Failure; 'ha_sync_epoch_sent': HA Sync PCP Epoch Sent; 'ha_sync_epoch_rcv': HA Sync PCP Epoch Recv; 'fullcone-ext-alloc': PCP Fullcone Extension Alloc; 'fullcone-ext-free': PCP Fullcone Extension Free; 'fullcone-ext-alloc-failure': PCP Fullcone Extension Alloc Failure; 'fullcone-ext-notfound': PCP Fullcone Extension Not Found; 'fullcone-ext-reuse': PCP Fullcone Extension Reuse; 'client-nonce-mismatch': PCP Client Nonce Mismatch; 'map-filter-set': PCP MAP Filter Set; 'map-filter-deny': PCP MAP Filter Deny Inbound; ", "format": "enum"}}}]} :param uuid: {"description": "uuid of the object", "format": "string", "minLength": 1, "modify-not-allowed": 1, "optional": true, "maxLength": 64, "type": "string"} :param default_template: {"description": "Bind the default template for PCP (Bind a PCP template)", "format": "string-rlx", "minLength": 1, "optional": true, "maxLength": 63, "type": "string"} :param DeviceProxy: The device proxy for REST operations and session handling. Refer to `common/device_proxy.py` Class Description:: Set Port Control Protocol parameters. Class pcp supports CRUD Operations and inherits from `common/A10BaseClass`. This class is the `"PARENT"` class for this module.` URL for this object:: `https://<Hostname|Ip address>//axapi/v3/cgnv6/pcp`. """ def __init__(self, **kwargs): self.ERROR_MSG = "" self.required=[] self.b_key = "pcp" self.a10_url="/axapi/v3/cgnv6/pcp" self.DeviceProxy = "" self.sampling_enable = [] self.uuid = "" self.default_template = "" for keys, value in kwargs.items(): setattr(self,keys, value)
135.274194
3,400
0.734828
1,111
8,387
5.485149
0.156616
0.082704
0.050213
0.014769
0.86298
0.86298
0.86298
0.86298
0.85215
0.85215
0
0.011485
0.117563
8,387
61
3,401
137.491803
0.811917
0.905807
0
0.47619
0
0
0.049465
0
0
0
0
0
0
1
0.095238
false
0
0.047619
0
0.238095
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
1
1
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
9
68ce2f532e1e21081d34bbc194efd0acd470ff55
467
py
Python
app/schemas/product.py
MrHenryD/microservice
c85f9d5ac644b1c8e8118a64f661f7a267bf0d90
[ "MIT" ]
null
null
null
app/schemas/product.py
MrHenryD/microservice
c85f9d5ac644b1c8e8118a64f661f7a267bf0d90
[ "MIT" ]
null
null
null
app/schemas/product.py
MrHenryD/microservice
c85f9d5ac644b1c8e8118a64f661f7a267bf0d90
[ "MIT" ]
null
null
null
from typing import Optional from pydantic import BaseModel class ProductBase(BaseModel): name: Optional[str] = None price: Optional[float] = None description: Optional[str] = None class ProductCreate(ProductBase): name: Optional[str] = None price: Optional[float] = None description: Optional[str] = None class Product(ProductBase): name: Optional[str] = None price: Optional[float] = None description: Optional[str] = None
21.227273
37
0.704497
53
467
6.207547
0.301887
0.200608
0.273556
0.173252
0.708207
0.708207
0.708207
0.708207
0.708207
0.708207
0
0
0.199143
467
21
38
22.238095
0.879679
0
0
0.642857
0
0
0
0
0
0
0
0
0
1
0
true
0
0.142857
0
1
0
0
0
0
null
1
1
1
0
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
1
0
0
0
1
0
0
10
68d06a9d412c3df6271dd31e88d8d04d80ad1940
4,330
py
Python
function/basic_atoms.py
facebookresearch/task_bench
1a75797d635d2b2e79336b5c02af654f1bec7013
[ "CC0-1.0" ]
1
2022-03-20T22:09:25.000Z
2022-03-20T22:09:25.000Z
function/basic_atoms.py
facebookresearch/task_bench
1a75797d635d2b2e79336b5c02af654f1bec7013
[ "CC0-1.0" ]
null
null
null
function/basic_atoms.py
facebookresearch/task_bench
1a75797d635d2b2e79336b5c02af654f1bec7013
[ "CC0-1.0" ]
null
null
null
# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. import json import os from function import Function, FUNCTION_REGISTRY, WordFunction from function import get_lang_vocab class AllWordPredicate(WordFunction): """ Maps word -> true X -> true """ def __init__(self, fn_tree, function, inner_fns, lang, **kwargs): super().__init__(fn_tree=fn_tree, inner_fns=inner_fns) # Getting pre-computed relations self.function = function self.lang = lang @classmethod def get_func_name(cls): return ['acceptall'] def get_universe(self): # TODO if not hasattr(self, 'universe'): self.universe = super().get_universe() if self.universe is None: self.universe = get_lang_vocab(self.input_lang) return self.universe def to_nl(self): return str(True) def __call__(self, inputs: list=None): """ get all words lexically related to any words in word_set """ assert len(inputs) == 1 return {'out': True, 'inner': self.compute_inner_fns(inputs)} @classmethod def build(cls, fn_tree, inner_fns, **kwargs): curr_function = fn_tree.get_base_fn() function = str(fn_tree) lang = fn_tree.bracket_children[0] return cls( fn_tree=fn_tree, function=curr_function, inner_fns=inner_fns, lang=lang, **kwargs, ) class NoWordPredicate(WordFunction): """ Maps word -> false X -> false """ def __init__(self, fn_tree, function, inner_fns, lang, **kwargs): super().__init__(fn_tree=fn_tree, inner_fns=inner_fns) # Getting pre-computed relations self.function = function self.lang = lang @classmethod def get_func_name(cls): return ['rejectall'] def get_universe(self): # TODO if not hasattr(self, 'universe'): self.universe = super().get_universe() if self.universe is None: self.universe = get_lang_vocab(self.input_lang) return self.universe def to_nl(self): return str(False) def __call__(self, inputs: list=None): """ get all words lexically related to any words in word_set """ assert len(inputs) == 1 return {'out': False, 'inner': self.compute_inner_fns(inputs)} @classmethod def build(cls, fn_tree, inner_fns, **kwargs): curr_function = fn_tree.get_base_fn() function = str(fn_tree) lang = fn_tree.bracket_children[0] return cls( fn_tree=fn_tree, function=curr_function, inner_fns=inner_fns, lang=lang, **kwargs, ) class WordIdentityMapping(WordFunction): """ Maps word -> singleton set of a same word X -> {X} """ def __init__(self, fn_tree, function, inner_fns, lang, **kwargs): super().__init__(fn_tree=fn_tree, inner_fns=inner_fns) # Getting pre-computed relations self.function = function self.lang = lang @classmethod def get_func_name(cls): return ['identity'] def get_universe(self): # TODO if not hasattr(self, 'universe'): self.universe = super().get_universe() if self.universe is None: self.universe = get_lang_vocab(self.input_lang) return self.universe def to_nl(self): inner_nls = [inner_fn.to_nl() for inner_fn in self.inner_fns] assert len(inner_nls) == 1 inner_nl = inner_nls[0] return f"same word as {inner_nl}".strip() def __call__(self, inputs: list=None): """ get all words lexically related to any words in word_set """ assert len(inputs) == 1 return {'out': inputs[0], 'inner': self.compute_inner_fns(inputs)} @classmethod def build(cls, fn_tree, inner_fns, **kwargs): curr_function = fn_tree.get_base_fn() function = str(fn_tree) lang = fn_tree.bracket_children[0] return cls( fn_tree=fn_tree, function=curr_function, inner_fns=inner_fns, lang=lang, **kwargs, )
27.75641
74
0.593533
529
4,330
4.591682
0.170132
0.066694
0.034582
0.029642
0.804446
0.804446
0.804446
0.804446
0.804446
0.804446
0
0.002989
0.304619
4,330
155
75
27.935484
0.80372
0.106236
0
0.78
0
0
0.025964
0
0
0
0
0.019355
0.04
1
0.18
false
0
0.04
0.05
0.4
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
1
0
0
0
0
0
0
0
0
0
0
8
d433da4ab832f36ae015ad663ddb197fa61d7cab
187
py
Python
engines/not_conns.py
djjohns/postgres_examples
c3e54dfa870e4cb457272beef8f4fc17d85c30c6
[ "MIT" ]
null
null
null
engines/not_conns.py
djjohns/postgres_examples
c3e54dfa870e4cb457272beef8f4fc17d85c30c6
[ "MIT" ]
null
null
null
engines/not_conns.py
djjohns/postgres_examples
c3e54dfa870e4cb457272beef8f4fc17d85c30c6
[ "MIT" ]
null
null
null
import sqlalchemy # db_name = sqlalchemy.create_engine('postgresql://user:password@host:port/db_name') db_name = sqlalchemy.create_engine('postgresql://user:password@host:port/db_name')
37.4
84
0.802139
26
187
5.538462
0.423077
0.166667
0.222222
0.305556
0.888889
0.888889
0.888889
0.888889
0.888889
0.888889
0
0
0.053476
187
5
85
37.4
0.813559
0.438503
0
0
0
0
0.423077
0.423077
0
0
0
0
0
1
0
false
0.5
0.5
0
0.5
0
1
0
0
null
0
1
1
1
1
1
1
1
1
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
null
0
0
0
0
0
0
0
1
1
0
0
0
0
13
d478efe3bdf917a495dd99db29f0aa89406b3599
182
py
Python
hermes_fix/message_lib/__init__.py
yabov/hermes_fix
0a5e89fd15903a7ee0929e82b39879362e2e1008
[ "Apache-2.0" ]
2
2020-02-20T15:00:35.000Z
2020-02-21T19:27:53.000Z
hermes_fix/message_lib/__init__.py
yabov/hermes_fix
0a5e89fd15903a7ee0929e82b39879362e2e1008
[ "Apache-2.0" ]
3
2020-02-21T03:25:35.000Z
2020-02-21T18:37:42.000Z
hermes_fix/message_lib/__init__.py
yabov/hermes_fix
0a5e89fd15903a7ee0929e82b39879362e2e1008
[ "Apache-2.0" ]
null
null
null
from . import FIX_4_0 from . import FIX_4_1 from . import FIX_4_2 from . import FIX_4_3 from . import FIX_4_4 from . import FIX_5_0 from . import FIX_5_0SP1 from . import FIX_5_0SP2
20.222222
24
0.78022
40
182
3.15
0.275
0.634921
0.825397
0.555556
0
0
0
0
0
0
0
0.12
0.175824
182
8
25
22.75
0.72
0
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
2e1aa3fbbb96ff4e040d2a0741d9579ec947195d
40,955
py
Python
end_of_month/migrations/0009_create_views_20200620_0842.py
uktrade/fadmin2
0f774400fb816c9ca30e30b25ae542135966e185
[ "MIT" ]
3
2020-01-05T16:46:42.000Z
2021-08-02T08:08:39.000Z
end_of_month/migrations/0009_create_views_20200620_0842.py
uktrade/fadmin2
0f774400fb816c9ca30e30b25ae542135966e185
[ "MIT" ]
30
2019-11-28T15:16:35.000Z
2021-08-16T14:49:58.000Z
end_of_month/migrations/0009_create_views_20200620_0842.py
uktrade/fadmin2
0f774400fb816c9ca30e30b25ae542135966e185
[ "MIT" ]
null
null
null
# Generated by Django 2.2.10 on 2020-06-20 08:42 from django.db import migrations def generate_view_forecast_drop_query(archived_period_name): return f"DROP VIEW if exists budget_forecast_{archived_period_name}_view CASCADE;" def generate_create_view_forecast_query(archived_period_name, archived_period_id): drop_query = generate_view_forecast_drop_query(archived_period_name) query = f'Create view budget_forecast_{archived_period_name}_view as '\ f'SELECT ROW_NUMBER () ' \ f'OVER (ORDER BY coalesce(b.financial_code_id, f.financial_code_id)) as id,' \ f'coalesce(b.financial_code_id, f.financial_code_id) as financial_code_id,' \ f'coalesce(b.financial_year_id, f.financial_year_id) as financial_year, ' \ f'coalesce(f.archived_period_id, b.archived_period_id) as archived_period_id, ' \ f'coalesce(amount, 0) as budget, ' \ f'coalesce(apr, 0) as apr, ' \ f'coalesce(may, 0) as may, ' \ f'coalesce(jun, 0) as jun, ' \ f'coalesce(jul, 0) as jul, ' \ f'coalesce(aug, 0) as aug, ' \ f'coalesce(sep, 0) as sep, ' \ f'coalesce(oct, 0) as oct, ' \ f'coalesce(nov, 0) as nov, ' \ f'coalesce("dec", 0) as "dec", ' \ f'coalesce(jan, 0) as jan, ' \ f'coalesce(feb, 0) as feb, ' \ f'coalesce(mar, 0) as mar, ' \ f'coalesce(adj1, 0) as adj1, ' \ f'coalesce(adj2, 0) as adj2, ' \ f'coalesce(adj3, 0) as adj3 ' \ f'FROM monthly_forecast_{archived_period_name} f ' \ f'FULL OUTER JOIN public.end_of_month_monthlytotalbudget b ' \ f'on b.financial_code_id = f.financial_code_id ' \ f'and b.financial_year_id = f.financial_year_id ' \ f'and b.archived_period_id = f.archived_period_id ' \ f'WHERE coalesce(f.archived_period_id, b.archived_period_id) = {archived_period_id};' return f'{drop_query} {query}' class Migration(migrations.Migration): dependencies = [ ('end_of_month', '0008_merge_20200527_1737'), ] operations = [ migrations.RunSQL( """ DROP VIEW if exists monthly_forecast_apr CASCADE; DROP VIEW if exists monthly_forecast_may CASCADE; DROP VIEW if exists monthly_forecast_jun CASCADE; DROP VIEW if exists monthly_forecast_jul CASCADE; DROP VIEW if exists monthly_forecast_aug CASCADE; DROP VIEW if exists monthly_forecast_sep CASCADE; DROP VIEW if exists monthly_forecast_oct CASCADE; DROP VIEW if exists monthly_forecast_nov CASCADE; DROP VIEW if exists monthly_forecast_dec CASCADE; DROP VIEW if exists monthly_forecast_jan CASCADE; DROP VIEW if exists monthly_forecast_feb CASCADE; DROP VIEW if exists monthly_forecast_mar CASCADE; DROP VIEW if exists monthly_forecast_adj1 CASCADE; DROP VIEW if exists monthly_forecast_adj2 CASCADE; DROP VIEW if exists monthly_forecast_adj3 CASCADE; CREATE VIEW monthly_forecast_apr as SELECT 1 as archived_period_id, financial_code_id, financial_year_id, SUM(CASE WHEN financial_period_id = 1 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS apr, SUM(CASE WHEN financial_period_id = 2 and a.archived_period_id = 1 THEN amount ELSE NULL END) AS may, SUM(CASE WHEN financial_period_id = 3 and a.archived_period_id = 1 THEN amount ELSE NULL END) AS jun, SUM(CASE WHEN financial_period_id = 4 and a.archived_period_id = 1 THEN amount ELSE NULL END) AS jul, SUM(CASE WHEN financial_period_id = 5 and a.archived_period_id = 1 THEN amount ELSE NULL END) AS aug, SUM(CASE WHEN financial_period_id = 6 and a.archived_period_id = 1 THEN amount ELSE NULL END) AS sep, SUM(CASE WHEN financial_period_id = 7 and a.archived_period_id = 1 THEN amount ELSE NULL END) AS oct, SUM(CASE WHEN financial_period_id = 8 and a.archived_period_id = 1 THEN amount ELSE NULL END) AS nov, SUM(CASE WHEN financial_period_id = 9 and a.archived_period_id = 1 THEN amount ELSE NULL END) AS "dec", SUM(CASE WHEN financial_period_id = 10 and a.archived_period_id = 1 THEN amount ELSE NULL END) AS jan, SUM(CASE WHEN financial_period_id = 11 and a.archived_period_id = 1 THEN amount ELSE NULL END) AS feb, SUM(CASE WHEN financial_period_id = 12 and a.archived_period_id = 1 THEN amount ELSE NULL END) AS mar, SUM(CASE WHEN financial_period_id = 13 and a.archived_period_id = 1 THEN amount ELSE NULL END) AS adj1 , SUM(CASE WHEN financial_period_id = 14 and a.archived_period_id = 1 THEN amount ELSE NULL END) AS adj2 , SUM(CASE WHEN financial_period_id = 15 and a.archived_period_id = 1 THEN amount ELSE NULL END) AS adj3 FROM forecast_forecastmonthlyfigure left outer join public.end_of_month_endofmonthstatus a on forecast_forecastmonthlyfigure.archived_status_id = a.id GROUP BY financial_code_id, financial_year_id; CREATE VIEW monthly_forecast_may as SELECT 2 as archived_period_id, financial_code_id, financial_year_id, SUM(CASE WHEN financial_period_id = 1 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS apr, SUM(CASE WHEN financial_period_id = 2 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS may, SUM(CASE WHEN financial_period_id = 3 and a.archived_period_id = 2 THEN amount ELSE NULL END) AS jun, SUM(CASE WHEN financial_period_id = 4 and a.archived_period_id = 2 THEN amount ELSE NULL END) AS jul, SUM(CASE WHEN financial_period_id = 5 and a.archived_period_id = 2 THEN amount ELSE NULL END) AS aug, SUM(CASE WHEN financial_period_id = 6 and a.archived_period_id = 2 THEN amount ELSE NULL END) AS sep, SUM(CASE WHEN financial_period_id = 7 and a.archived_period_id = 2 THEN amount ELSE NULL END) AS oct, SUM(CASE WHEN financial_period_id = 8 and a.archived_period_id = 2 THEN amount ELSE NULL END) AS nov, SUM(CASE WHEN financial_period_id = 9 and a.archived_period_id = 2 THEN amount ELSE NULL END) AS "dec", SUM(CASE WHEN financial_period_id = 10 and a.archived_period_id = 2 THEN amount ELSE NULL END) AS jan, SUM(CASE WHEN financial_period_id = 11 and a.archived_period_id = 2 THEN amount ELSE NULL END) AS feb, SUM(CASE WHEN financial_period_id = 12 and a.archived_period_id = 2 THEN amount ELSE NULL END) AS mar, SUM(CASE WHEN financial_period_id = 13 and a.archived_period_id = 2 THEN amount ELSE NULL END) AS adj1 , SUM(CASE WHEN financial_period_id = 14 and a.archived_period_id = 2 THEN amount ELSE NULL END) AS adj2 , SUM(CASE WHEN financial_period_id = 15 and a.archived_period_id = 2 THEN amount ELSE NULL END) AS adj3 FROM forecast_forecastmonthlyfigure left outer join public.end_of_month_endofmonthstatus a on forecast_forecastmonthlyfigure.archived_status_id = a.id GROUP BY financial_code_id, financial_year_id; CREATE VIEW monthly_forecast_jun as SELECT 3 as archived_period_id, financial_code_id, financial_year_id, SUM(CASE WHEN financial_period_id = 1 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS apr, SUM(CASE WHEN financial_period_id = 2 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS may, SUM(CASE WHEN financial_period_id = 3 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS jun, SUM(CASE WHEN financial_period_id = 4 and a.archived_period_id = 3 THEN amount ELSE NULL END) AS jul, SUM(CASE WHEN financial_period_id = 5 and a.archived_period_id = 3 THEN amount ELSE NULL END) AS aug, SUM(CASE WHEN financial_period_id = 6 and a.archived_period_id = 3 THEN amount ELSE NULL END) AS sep, SUM(CASE WHEN financial_period_id = 7 and a.archived_period_id = 3 THEN amount ELSE NULL END) AS oct, SUM(CASE WHEN financial_period_id = 8 and a.archived_period_id = 3 THEN amount ELSE NULL END) AS nov, SUM(CASE WHEN financial_period_id = 9 and a.archived_period_id = 3 THEN amount ELSE NULL END) AS "dec", SUM(CASE WHEN financial_period_id = 10 and a.archived_period_id = 3 THEN amount ELSE NULL END) AS jan, SUM(CASE WHEN financial_period_id = 11 and a.archived_period_id = 3 THEN amount ELSE NULL END) AS feb, SUM(CASE WHEN financial_period_id = 12 and a.archived_period_id = 3 THEN amount ELSE NULL END) AS mar, SUM(CASE WHEN financial_period_id = 13 and a.archived_period_id = 3 THEN amount ELSE NULL END) AS adj1 , SUM(CASE WHEN financial_period_id = 14 and a.archived_period_id = 3 THEN amount ELSE NULL END) AS adj2 , SUM(CASE WHEN financial_period_id = 15 and a.archived_period_id = 3 THEN amount ELSE NULL END) AS adj3 FROM forecast_forecastmonthlyfigure left outer join public.end_of_month_endofmonthstatus a on forecast_forecastmonthlyfigure.archived_status_id = a.id GROUP BY financial_code_id, financial_year_id; CREATE VIEW monthly_forecast_jul as SELECT 4 as archived_period_id, financial_code_id, financial_year_id, SUM(CASE WHEN financial_period_id = 1 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS apr, SUM(CASE WHEN financial_period_id = 2 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS may, SUM(CASE WHEN financial_period_id = 3 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS jun, SUM(CASE WHEN financial_period_id = 4 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS jul, SUM(CASE WHEN financial_period_id = 5 and a.archived_period_id = 4 THEN amount ELSE NULL END) AS aug, SUM(CASE WHEN financial_period_id = 6 and a.archived_period_id = 4 THEN amount ELSE NULL END) AS sep, SUM(CASE WHEN financial_period_id = 7 and a.archived_period_id = 4 THEN amount ELSE NULL END) AS oct, SUM(CASE WHEN financial_period_id = 8 and a.archived_period_id = 4 THEN amount ELSE NULL END) AS nov, SUM(CASE WHEN financial_period_id = 9 and a.archived_period_id = 4 THEN amount ELSE NULL END) AS "dec", SUM(CASE WHEN financial_period_id = 10 and a.archived_period_id = 4 THEN amount ELSE NULL END) AS jan, SUM(CASE WHEN financial_period_id = 11 and a.archived_period_id = 4 THEN amount ELSE NULL END) AS feb, SUM(CASE WHEN financial_period_id = 12 and a.archived_period_id = 4 THEN amount ELSE NULL END) AS mar, SUM(CASE WHEN financial_period_id = 13 and a.archived_period_id = 4 THEN amount ELSE NULL END) AS adj1 , SUM(CASE WHEN financial_period_id = 14 and a.archived_period_id = 4 THEN amount ELSE NULL END) AS adj2 , SUM(CASE WHEN financial_period_id = 15 and a.archived_period_id = 4 THEN amount ELSE NULL END) AS adj3 FROM forecast_forecastmonthlyfigure left outer join public.end_of_month_endofmonthstatus a on forecast_forecastmonthlyfigure.archived_status_id = a.id GROUP BY financial_code_id, financial_year_id; CREATE VIEW monthly_forecast_aug as SELECT 5 as archived_period_id, financial_code_id, financial_year_id, SUM(CASE WHEN financial_period_id = 1 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS apr, SUM(CASE WHEN financial_period_id = 2 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS may, SUM(CASE WHEN financial_period_id = 3 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS jun, SUM(CASE WHEN financial_period_id = 4 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS jul, SUM(CASE WHEN financial_period_id = 5 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS aug, SUM(CASE WHEN financial_period_id = 6 and a.archived_period_id = 5 THEN amount ELSE NULL END) AS sep, SUM(CASE WHEN financial_period_id = 7 and a.archived_period_id = 5 THEN amount ELSE NULL END) AS oct, SUM(CASE WHEN financial_period_id = 8 and a.archived_period_id = 5 THEN amount ELSE NULL END) AS nov, SUM(CASE WHEN financial_period_id = 9 and a.archived_period_id = 5 THEN amount ELSE NULL END) AS "dec", SUM(CASE WHEN financial_period_id = 10 and a.archived_period_id = 5 THEN amount ELSE NULL END) AS jan, SUM(CASE WHEN financial_period_id = 11 and a.archived_period_id = 5 THEN amount ELSE NULL END) AS feb, SUM(CASE WHEN financial_period_id = 12 and a.archived_period_id = 5 THEN amount ELSE NULL END) AS mar, SUM(CASE WHEN financial_period_id = 13 and a.archived_period_id = 5 THEN amount ELSE NULL END) AS adj1 , SUM(CASE WHEN financial_period_id = 14 and a.archived_period_id = 5 THEN amount ELSE NULL END) AS adj2 , SUM(CASE WHEN financial_period_id = 15 and a.archived_period_id = 5 THEN amount ELSE NULL END) AS adj3 FROM forecast_forecastmonthlyfigure left outer join public.end_of_month_endofmonthstatus a on forecast_forecastmonthlyfigure.archived_status_id = a.id GROUP BY financial_code_id, financial_year_id; CREATE VIEW monthly_forecast_sep as SELECT 6 as archived_period_id, financial_code_id, financial_year_id, SUM(CASE WHEN financial_period_id = 1 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS apr, SUM(CASE WHEN financial_period_id = 2 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS may, SUM(CASE WHEN financial_period_id = 3 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS jun, SUM(CASE WHEN financial_period_id = 4 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS jul, SUM(CASE WHEN financial_period_id = 5 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS aug, SUM(CASE WHEN financial_period_id = 6 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS sep, SUM(CASE WHEN financial_period_id = 7 and a.archived_period_id = 6 THEN amount ELSE NULL END) AS oct, SUM(CASE WHEN financial_period_id = 8 and a.archived_period_id = 6 THEN amount ELSE NULL END) AS nov, SUM(CASE WHEN financial_period_id = 9 and a.archived_period_id = 6 THEN amount ELSE NULL END) AS "dec", SUM(CASE WHEN financial_period_id = 10 and a.archived_period_id = 6 THEN amount ELSE NULL END) AS jan, SUM(CASE WHEN financial_period_id = 11 and a.archived_period_id = 6 THEN amount ELSE NULL END) AS feb, SUM(CASE WHEN financial_period_id = 12 and a.archived_period_id = 6 THEN amount ELSE NULL END) AS mar, SUM(CASE WHEN financial_period_id = 13 and a.archived_period_id = 6 THEN amount ELSE NULL END) AS adj1 , SUM(CASE WHEN financial_period_id = 14 and a.archived_period_id = 6 THEN amount ELSE NULL END) AS adj2 , SUM(CASE WHEN financial_period_id = 15 and a.archived_period_id = 6 THEN amount ELSE NULL END) AS adj3 FROM forecast_forecastmonthlyfigure left outer join public.end_of_month_endofmonthstatus a on forecast_forecastmonthlyfigure.archived_status_id = a.id GROUP BY financial_code_id, financial_year_id; CREATE VIEW monthly_forecast_oct as SELECT 7 as archived_period_id, financial_code_id, financial_year_id, SUM(CASE WHEN financial_period_id = 1 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS apr, SUM(CASE WHEN financial_period_id = 2 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS may, SUM(CASE WHEN financial_period_id = 3 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS jun, SUM(CASE WHEN financial_period_id = 4 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS jul, SUM(CASE WHEN financial_period_id = 5 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS aug, SUM(CASE WHEN financial_period_id = 6 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS sep, SUM(CASE WHEN financial_period_id = 7 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS oct, SUM(CASE WHEN financial_period_id = 8 and a.archived_period_id = 7 THEN amount ELSE NULL END) AS nov, SUM(CASE WHEN financial_period_id = 9 and a.archived_period_id = 7 THEN amount ELSE NULL END) AS "dec", SUM(CASE WHEN financial_period_id = 10 and a.archived_period_id = 7 THEN amount ELSE NULL END) AS jan, SUM(CASE WHEN financial_period_id = 11 and a.archived_period_id = 7 THEN amount ELSE NULL END) AS feb, SUM(CASE WHEN financial_period_id = 12 and a.archived_period_id = 7 THEN amount ELSE NULL END) AS mar, SUM(CASE WHEN financial_period_id = 13 and a.archived_period_id = 7 THEN amount ELSE NULL END) AS adj1 , SUM(CASE WHEN financial_period_id = 14 and a.archived_period_id = 7 THEN amount ELSE NULL END) AS adj2 , SUM(CASE WHEN financial_period_id = 15 and a.archived_period_id = 7 THEN amount ELSE NULL END) AS adj3 FROM forecast_forecastmonthlyfigure left outer join public.end_of_month_endofmonthstatus a on forecast_forecastmonthlyfigure.archived_status_id = a.id GROUP BY financial_code_id, financial_year_id; CREATE VIEW monthly_forecast_nov as SELECT 8 as archived_period_id, financial_code_id, financial_year_id, SUM(CASE WHEN financial_period_id = 1 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS apr, SUM(CASE WHEN financial_period_id = 2 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS may, SUM(CASE WHEN financial_period_id = 3 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS jun, SUM(CASE WHEN financial_period_id = 4 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS jul, SUM(CASE WHEN financial_period_id = 5 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS aug, SUM(CASE WHEN financial_period_id = 6 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS sep, SUM(CASE WHEN financial_period_id = 7 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS oct, SUM(CASE WHEN financial_period_id = 8 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS nov, SUM(CASE WHEN financial_period_id = 9 and a.archived_period_id = 8 THEN amount ELSE NULL END) AS "dec", SUM(CASE WHEN financial_period_id = 10 and a.archived_period_id = 8 THEN amount ELSE NULL END) AS jan, SUM(CASE WHEN financial_period_id = 11 and a.archived_period_id = 8 THEN amount ELSE NULL END) AS feb, SUM(CASE WHEN financial_period_id = 12 and a.archived_period_id = 8 THEN amount ELSE NULL END) AS mar, SUM(CASE WHEN financial_period_id = 13 and a.archived_period_id = 8 THEN amount ELSE NULL END) AS adj1 , SUM(CASE WHEN financial_period_id = 14 and a.archived_period_id = 8 THEN amount ELSE NULL END) AS adj2 , SUM(CASE WHEN financial_period_id = 15 and a.archived_period_id = 8 THEN amount ELSE NULL END) AS adj3 FROM forecast_forecastmonthlyfigure left outer join public.end_of_month_endofmonthstatus a on forecast_forecastmonthlyfigure.archived_status_id = a.id GROUP BY financial_code_id, financial_year_id; CREATE VIEW monthly_forecast_dec as SELECT 9 as archived_period_id, financial_code_id, financial_year_id, SUM(CASE WHEN financial_period_id = 1 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS apr, SUM(CASE WHEN financial_period_id = 2 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS may, SUM(CASE WHEN financial_period_id = 3 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS jun, SUM(CASE WHEN financial_period_id = 4 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS jul, SUM(CASE WHEN financial_period_id = 5 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS aug, SUM(CASE WHEN financial_period_id = 6 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS sep, SUM(CASE WHEN financial_period_id = 7 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS oct, SUM(CASE WHEN financial_period_id = 8 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS nov, SUM(CASE WHEN financial_period_id = 9 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS "dec", SUM(CASE WHEN financial_period_id = 10 and a.archived_period_id = 9 THEN amount ELSE NULL END) AS jan, SUM(CASE WHEN financial_period_id = 11 and a.archived_period_id = 9 THEN amount ELSE NULL END) AS feb, SUM(CASE WHEN financial_period_id = 12 and a.archived_period_id = 9 THEN amount ELSE NULL END) AS mar, SUM(CASE WHEN financial_period_id = 13 and a.archived_period_id = 9 THEN amount ELSE NULL END) AS adj1 , SUM(CASE WHEN financial_period_id = 14 and a.archived_period_id = 9 THEN amount ELSE NULL END) AS adj2 , SUM(CASE WHEN financial_period_id = 15 and a.archived_period_id = 9 THEN amount ELSE NULL END) AS adj3 FROM forecast_forecastmonthlyfigure left outer join public.end_of_month_endofmonthstatus a on forecast_forecastmonthlyfigure.archived_status_id = a.id GROUP BY financial_code_id, financial_year_id; CREATE VIEW monthly_forecast_jan as SELECT 10 as archived_period_id, financial_code_id, financial_year_id, SUM(CASE WHEN financial_period_id = 1 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS apr, SUM(CASE WHEN financial_period_id = 2 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS may, SUM(CASE WHEN financial_period_id = 3 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS jun, SUM(CASE WHEN financial_period_id = 4 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS jul, SUM(CASE WHEN financial_period_id = 5 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS aug, SUM(CASE WHEN financial_period_id = 6 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS sep, SUM(CASE WHEN financial_period_id = 7 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS oct, SUM(CASE WHEN financial_period_id = 8 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS nov, SUM(CASE WHEN financial_period_id = 9 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS "dec", SUM(CASE WHEN financial_period_id = 10 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS jan, SUM(CASE WHEN financial_period_id = 11 and a.archived_period_id = 10 THEN amount ELSE NULL END) AS feb, SUM(CASE WHEN financial_period_id = 12 and a.archived_period_id = 10 THEN amount ELSE NULL END) AS mar, SUM(CASE WHEN financial_period_id = 13 and a.archived_period_id = 10 THEN amount ELSE NULL END) AS adj1 , SUM(CASE WHEN financial_period_id = 14 and a.archived_period_id = 10 THEN amount ELSE NULL END) AS adj2 , SUM(CASE WHEN financial_period_id = 15 and a.archived_period_id = 10 THEN amount ELSE NULL END) AS adj3 FROM forecast_forecastmonthlyfigure left outer join public.end_of_month_endofmonthstatus a on forecast_forecastmonthlyfigure.archived_status_id = a.id GROUP BY financial_code_id, financial_year_id; CREATE VIEW monthly_forecast_feb as SELECT 11 as archived_period_id, financial_code_id, financial_year_id, SUM(CASE WHEN financial_period_id = 1 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS apr, SUM(CASE WHEN financial_period_id = 2 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS may, SUM(CASE WHEN financial_period_id = 3 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS jun, SUM(CASE WHEN financial_period_id = 4 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS jul, SUM(CASE WHEN financial_period_id = 5 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS aug, SUM(CASE WHEN financial_period_id = 6 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS sep, SUM(CASE WHEN financial_period_id = 7 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS oct, SUM(CASE WHEN financial_period_id = 8 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS nov, SUM(CASE WHEN financial_period_id = 9 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS "dec", SUM(CASE WHEN financial_period_id = 10 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS jan, SUM(CASE WHEN financial_period_id = 11 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS feb, SUM(CASE WHEN financial_period_id = 12 and a.archived_period_id = 11 THEN amount ELSE NULL END) AS mar, SUM(CASE WHEN financial_period_id = 13 and a.archived_period_id = 11 THEN amount ELSE NULL END) AS adj1 , SUM(CASE WHEN financial_period_id = 14 and a.archived_period_id = 11 THEN amount ELSE NULL END) AS adj2 , SUM(CASE WHEN financial_period_id = 15 and a.archived_period_id = 11 THEN amount ELSE NULL END) AS adj3 FROM forecast_forecastmonthlyfigure left outer join public.end_of_month_endofmonthstatus a on forecast_forecastmonthlyfigure.archived_status_id = a.id GROUP BY financial_code_id, financial_year_id; CREATE VIEW monthly_forecast_mar as SELECT 12 as archived_period_id, financial_code_id, financial_year_id, SUM(CASE WHEN financial_period_id = 1 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS apr, SUM(CASE WHEN financial_period_id = 2 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS may, SUM(CASE WHEN financial_period_id = 3 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS jun, SUM(CASE WHEN financial_period_id = 4 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS jul, SUM(CASE WHEN financial_period_id = 5 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS aug, SUM(CASE WHEN financial_period_id = 6 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS sep, SUM(CASE WHEN financial_period_id = 7 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS oct, SUM(CASE WHEN financial_period_id = 8 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS nov, SUM(CASE WHEN financial_period_id = 9 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS "dec", SUM(CASE WHEN financial_period_id = 10 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS jan, SUM(CASE WHEN financial_period_id = 11 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS feb, SUM(CASE WHEN financial_period_id = 12 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS mar, SUM(CASE WHEN financial_period_id = 13 and a.archived_period_id = 12 THEN amount ELSE NULL END) AS adj1 , SUM(CASE WHEN financial_period_id = 14 and a.archived_period_id = 12 THEN amount ELSE NULL END) AS adj2 , SUM(CASE WHEN financial_period_id = 15 and a.archived_period_id = 12 THEN amount ELSE NULL END) AS adj3 FROM forecast_forecastmonthlyfigure left outer join public.end_of_month_endofmonthstatus a on forecast_forecastmonthlyfigure.archived_status_id = a.id GROUP BY financial_code_id, financial_year_id; CREATE VIEW monthly_forecast_adj1 as SELECT 13 as archived_period_id, financial_code_id, financial_year_id, SUM(CASE WHEN financial_period_id = 1 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS apr, SUM(CASE WHEN financial_period_id = 2 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS may, SUM(CASE WHEN financial_period_id = 3 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS jun, SUM(CASE WHEN financial_period_id = 4 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS jul, SUM(CASE WHEN financial_period_id = 5 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS aug, SUM(CASE WHEN financial_period_id = 6 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS sep, SUM(CASE WHEN financial_period_id = 7 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS oct, SUM(CASE WHEN financial_period_id = 8 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS nov, SUM(CASE WHEN financial_period_id = 9 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS "dec", SUM(CASE WHEN financial_period_id = 10 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS jan, SUM(CASE WHEN financial_period_id = 11 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS feb, SUM(CASE WHEN financial_period_id = 12 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS mar, SUM(CASE WHEN financial_period_id = 13 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS adj1 , SUM(CASE WHEN financial_period_id = 14 and a.archived_period_id = 13 THEN amount ELSE NULL END) AS adj2 , SUM(CASE WHEN financial_period_id = 15 and a.archived_period_id = 13 THEN amount ELSE NULL END) AS adj3 FROM forecast_forecastmonthlyfigure left outer join public.end_of_month_endofmonthstatus a on forecast_forecastmonthlyfigure.archived_status_id = a.id GROUP BY financial_code_id, financial_year_id; CREATE VIEW monthly_forecast_adj2 as SELECT 14 as archived_period_id, financial_code_id, financial_year_id, SUM(CASE WHEN financial_period_id = 1 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS apr, SUM(CASE WHEN financial_period_id = 2 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS may, SUM(CASE WHEN financial_period_id = 3 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS jun, SUM(CASE WHEN financial_period_id = 4 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS jul, SUM(CASE WHEN financial_period_id = 5 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS aug, SUM(CASE WHEN financial_period_id = 6 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS sep, SUM(CASE WHEN financial_period_id = 7 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS oct, SUM(CASE WHEN financial_period_id = 8 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS nov, SUM(CASE WHEN financial_period_id = 9 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS "dec", SUM(CASE WHEN financial_period_id = 10 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS jan, SUM(CASE WHEN financial_period_id = 11 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS feb, SUM(CASE WHEN financial_period_id = 12 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS mar, SUM(CASE WHEN financial_period_id = 13 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS adj1 , SUM(CASE WHEN financial_period_id = 14 and a.archived_period_id = 14 THEN amount ELSE NULL END) AS adj2 , SUM(CASE WHEN financial_period_id = 15 and a.archived_period_id = 14 THEN amount ELSE NULL END) AS adj3 FROM forecast_forecastmonthlyfigure left outer join public.end_of_month_endofmonthstatus a on forecast_forecastmonthlyfigure.archived_status_id = a.id GROUP BY financial_code_id, financial_year_id; CREATE VIEW monthly_forecast_adj3 as SELECT 15 as archived_period_id, financial_code_id, financial_year_id, SUM(CASE WHEN financial_period_id = 1 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS apr, SUM(CASE WHEN financial_period_id = 2 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS may, SUM(CASE WHEN financial_period_id = 3 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS jun, SUM(CASE WHEN financial_period_id = 4 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS jul, SUM(CASE WHEN financial_period_id = 5 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS aug, SUM(CASE WHEN financial_period_id = 6 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS sep, SUM(CASE WHEN financial_period_id = 7 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS oct, SUM(CASE WHEN financial_period_id = 8 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS nov, SUM(CASE WHEN financial_period_id = 9 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS "dec", SUM(CASE WHEN financial_period_id = 10 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS jan, SUM(CASE WHEN financial_period_id = 11 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS feb, SUM(CASE WHEN financial_period_id = 12 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS mar, SUM(CASE WHEN financial_period_id = 13 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS adj1 , SUM(CASE WHEN financial_period_id = 14 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS adj2 , SUM(CASE WHEN financial_period_id = 15 and a.archived_period_id IS NULL THEN amount ELSE NULL END) AS adj3 FROM forecast_forecastmonthlyfigure left outer join public.end_of_month_endofmonthstatus a on forecast_forecastmonthlyfigure.archived_status_id = a.id GROUP BY financial_code_id, financial_year_id; """, """ DROP VIEW if exists monthly_forecast_apr CASCADE; DROP VIEW if exists monthly_forecast_may CASCADE; DROP VIEW if exists monthly_forecast_jun CASCADE; DROP VIEW if exists monthly_forecast_jul CASCADE; DROP VIEW if exists monthly_forecast_aug CASCADE; DROP VIEW if exists monthly_forecast_sep CASCADE; DROP VIEW if exists monthly_forecast_oct CASCADE; DROP VIEW if exists monthly_forecast_nov CASCADE; DROP VIEW if exists monthly_forecast_dec CASCADE; DROP VIEW if exists monthly_forecast_jan CASCADE; DROP VIEW if exists monthly_forecast_feb CASCADE; DROP VIEW if exists monthly_forecast_mar CASCADE; DROP VIEW if exists monthly_forecast_adj1 CASCADE; DROP VIEW if exists monthly_forecast_adj2 CASCADE; DROP VIEW if exists monthly_forecast_adj3 CASCADE; """, ), migrations.RunSQL(generate_create_view_forecast_query('apr', 1), generate_view_forecast_drop_query('apr')), migrations.RunSQL(generate_create_view_forecast_query('may', 2), generate_view_forecast_drop_query('may')), migrations.RunSQL(generate_create_view_forecast_query('jun', 3), generate_view_forecast_drop_query('jun')), migrations.RunSQL(generate_create_view_forecast_query('jul', 4), generate_view_forecast_drop_query('jul')), migrations.RunSQL(generate_create_view_forecast_query('aug', 5), generate_view_forecast_drop_query('aug')), migrations.RunSQL(generate_create_view_forecast_query('sep', 6), generate_view_forecast_drop_query('sep')), migrations.RunSQL(generate_create_view_forecast_query('oct', 7), generate_view_forecast_drop_query('oct')), migrations.RunSQL(generate_create_view_forecast_query('nov', 8), generate_view_forecast_drop_query('nov')), migrations.RunSQL(generate_create_view_forecast_query('dec', 9), generate_view_forecast_drop_query('dec')), migrations.RunSQL(generate_create_view_forecast_query('jan', 10), generate_view_forecast_drop_query('jan')), migrations.RunSQL(generate_create_view_forecast_query('feb', 11), generate_view_forecast_drop_query('feb')), migrations.RunSQL(generate_create_view_forecast_query('mar', 12), generate_view_forecast_drop_query('mar')), migrations.RunSQL(generate_create_view_forecast_query('adj1', 13), generate_view_forecast_drop_query('adj1')), migrations.RunSQL(generate_create_view_forecast_query('adj2', 14), generate_view_forecast_drop_query('adj2')), migrations.RunSQL(generate_create_view_forecast_query('adj3', 15), generate_view_forecast_drop_query('adj3')), ]
94.584296
131
0.655598
6,084
40,955
4.175049
0.017423
0.149285
0.156844
0.177158
0.955947
0.93705
0.933231
0.905476
0.897996
0.894689
0
0.020635
0.298327
40,955
432
132
94.803241
0.863277
0.001123
0
0
1
0
0.299283
0.093638
0
0
0
0
0
1
0.027027
false
0
0.013514
0.013514
0.108108
0
0
0
0
null
0
0
1
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
8
cf479ec08dc3f39a5da686cb3993e3d805474472
5,798
py
Python
tests/test_spectrum_similarity_functions.py
adelabriere/matchms
a580539e6db3f4f00e12097983b85b2d494159ba
[ "Apache-2.0" ]
64
2020-06-22T14:59:21.000Z
2022-03-30T00:50:13.000Z
tests/test_spectrum_similarity_functions.py
adelabriere/matchms
a580539e6db3f4f00e12097983b85b2d494159ba
[ "Apache-2.0" ]
561
2020-03-19T14:35:59.000Z
2022-03-29T10:11:12.000Z
tests/test_spectrum_similarity_functions.py
adelabriere/matchms
a580539e6db3f4f00e12097983b85b2d494159ba
[ "Apache-2.0" ]
32
2020-05-06T07:35:59.000Z
2022-03-10T09:03:45.000Z
"""Test function to collect matching peaks. Run tests both on numba compiled and pure Python version.""" import numpy import pytest from matchms.similarity.spectrum_similarity_functions import collect_peak_pairs from matchms.similarity.spectrum_similarity_functions import find_matches from matchms.similarity.spectrum_similarity_functions import score_best_matches @pytest.mark.parametrize("shift, expected_pairs, expected_matches", [(0.0, [[2., 2., 1.], [3., 3., 1.]], (2, 3)), (-5.0, [[0., 0., 0.01], [1., 1., 0.01]], (2, 3))]) def test_collect_peak_pairs_compiled(shift, expected_pairs, expected_matches): """Test finding expected peak matches for given tolerance.""" spec1 = numpy.array([[100, 200, 300, 500], [0.1, 0.1, 1.0, 1.0]], dtype="float").T spec2 = numpy.array([[105, 205.1, 300, 500.1], [0.1, 0.1, 1.0, 1.0]], dtype="float").T matching_pairs = numpy.array(collect_peak_pairs(spec1, spec2, tolerance=0.2, shift=shift)) assert matching_pairs.shape == expected_matches, "Expected different number of matching peaks" assert numpy.allclose(matching_pairs, numpy.array(expected_pairs), atol=1e-8), "Expected different values." @pytest.mark.parametrize("shift, expected_pairs, expected_matches", [(0.0, [[2., 2., 1.], [3., 3., 1.]], (2, 3)), (-5.0, [[0., 0., 0.01], [1., 1., 0.01]], (2, 3))]) def test_collect_peak_pairs(shift, expected_pairs, expected_matches): """Test finding expected peak matches for tolerance=0.2 and given shift.""" spec1 = numpy.array([[100, 200, 300, 500], [0.1, 0.1, 1.0, 1.0]], dtype="float").T spec2 = numpy.array([[105, 205.1, 300, 500.1], [0.1, 0.1, 1.0, 1.0]], dtype="float").T matching_pairs = numpy.array(collect_peak_pairs.py_func(spec1, spec2, tolerance=0.2, shift=shift)) assert matching_pairs.shape == expected_matches, "Expected different number of matching peaks" assert numpy.allclose(matching_pairs, numpy.array(expected_pairs), atol=1e-8), "Expected different values." @pytest.mark.parametrize("numba_compiled", [True, False]) def test_collect_peak_pairs_no_matches(numba_compiled): """Test function for no matching peaks.""" shift = -20.0 spec1 = numpy.array([[100, 200, 300, 500], [0.1, 0.1, 1.0, 1.0]], dtype="float").T spec2 = numpy.array([[105, 205.1, 300, 500.1], [0.1, 0.1, 1.0, 1.0]], dtype="float").T if numba_compiled: matching_pairs = collect_peak_pairs(spec1, spec2, tolerance=0.2, shift=shift) else: matching_pairs = collect_peak_pairs.py_func(spec1, spec2, tolerance=0.2, shift=shift) assert matching_pairs is None, "Expected pairs to be None." @pytest.mark.parametrize("numba_compiled", [True, False]) def test_find_matches_shifted(numba_compiled): """Test finding matches with shifted peaks.""" shift = -5.0 spec1_mz = numpy.array([100, 200, 300, 500], dtype="float") spec2_mz = numpy.array([105, 205.1, 300, 304.99, 500.1], dtype="float") expected_matches = [(0, 0), (1, 1), (2, 3)] if numba_compiled: matches = find_matches(spec1_mz, spec2_mz, tolerance=0.2, shift=shift) else: matches = find_matches.py_func(spec1_mz, spec2_mz, tolerance=0.2, shift=shift) assert expected_matches == matches, "Expected different matches." @pytest.mark.parametrize("numba_compiled", [True, False]) def test_find_matches_no_matches(numba_compiled): """Test function for no matching peaks.""" shift = -20.0 spec1_mz = numpy.array([100, 200, 300, 500], dtype="float") spec2_mz = numpy.array([105, 205.1, 300, 500.1], dtype="float") if numba_compiled: matches = find_matches(spec1_mz, spec2_mz, tolerance=0.2, shift=shift) else: matches = find_matches.py_func(spec1_mz, spec2_mz, tolerance=0.2, shift=shift) assert matches == [], "Expected empty list of matches." @pytest.mark.parametrize("matching_pairs, expected_score", [([[2., 2., 1.], [3., 3., 1.]], (0.990099009900, 2)), ([[0., 0., 0.01], [1., 1., 0.01]], (0.009900990099, 2))]) def test_score_best_matches_compiled(matching_pairs, expected_score): """Test finding expected peak matches for given tolerance.""" matching_pairs = numpy.array(matching_pairs) spec1 = numpy.array([[100, 200, 300, 500], [0.1, 0.1, 1.0, 1.0]], dtype="float").T spec2 = numpy.array([[105, 205.1, 300, 500.1], [0.1, 0.1, 1.0, 1.0]], dtype="float").T score, matches = score_best_matches(matching_pairs, spec1, spec2) assert score == pytest.approx(expected_score[0], 1e-6), "Expected different score" assert matches == expected_score[1], "Expected different matches." @pytest.mark.parametrize("matching_pairs, expected_score", [([[2., 2., 1.], [3., 3., 1.]], (0.990099009900, 2)), ([[0., 0., 0.01], [1., 1., 0.01]], (0.009900990099, 2))]) def test_score_best_matches(matching_pairs, expected_score): """Test finding expected peak matches for given tolerance.""" matching_pairs = numpy.array(matching_pairs) spec1 = numpy.array([[100, 200, 300, 500], [0.1, 0.1, 1.0, 1.0]], dtype="float").T spec2 = numpy.array([[105, 205.1, 300, 500.1], [0.1, 0.1, 1.0, 1.0]], dtype="float").T score, matches = score_best_matches.py_func(matching_pairs, spec1, spec2) assert score == pytest.approx(expected_score[0], 1e-6), "Expected different score" assert matches == expected_score[1], "Expected different matches."
48.316667
111
0.627113
825
5,798
4.261818
0.107879
0.023322
0.021331
0.017065
0.888225
0.87628
0.868316
0.822241
0.817122
0.808874
0
0.105321
0.212315
5,798
119
112
48.722689
0.66455
0.077785
0
0.702381
0
0
0.108179
0
0
0
0
0
0.130952
1
0.083333
false
0
0.059524
0
0.142857
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
cf5cb7a758b08bd5660d7d5510aaeeaabe086674
57,349
py
Python
pm/models/coach_social_activity_friends.py
aosojnik/pipeline-manager-features-models
e5232f1c1b2073253a1c505dc9fff0d3d839dd6c
[ "MIT" ]
null
null
null
pm/models/coach_social_activity_friends.py
aosojnik/pipeline-manager-features-models
e5232f1c1b2073253a1c505dc9fff0d3d839dd6c
[ "MIT" ]
null
null
null
pm/models/coach_social_activity_friends.py
aosojnik/pipeline-manager-features-models
e5232f1c1b2073253a1c505dc9fff0d3d839dd6c
[ "MIT" ]
null
null
null
################################################################################## ##########--this is an autogenerated python model definition for proDEX--######### ##--original file: Friends_Coaching_v05_forprodex.dxi --## ################################################################################## from .lib.proDEX import * coach_social_activity_friends = Node() situ_social_activity_friends = Atrib() feat_social_activity_friends_qualitative_lowest = Atrib() profile_social_invite_possible_friends = Atrib() profile_social_interaction_preferrence = Atrib() coach_social_activity_friends.setName('coach_social_activity_friends') situ_social_activity_friends.setName('situ_social_activity_friends') feat_social_activity_friends_qualitative_lowest.setName('feat_social_activity_friends_qualitative_lowest') profile_social_invite_possible_friends.setName('profile_social_invite_possible_friends') profile_social_interaction_preferrence.setName('profile_social_interaction_preferrence') coach_social_activity_friends.setValues(['Suggest_going_out_to_an_event_or_social_place_together', 'Suggest_calling', 'Suggest_visit', 'no_action', 'Suggest_going_out_to_an_event_or_social_place', 'Send_positive_message']) situ_social_activity_friends.setValues(['very_low', 'low', 'medium', 'high', 'very_high']) feat_social_activity_friends_qualitative_lowest.setValues(['calls', 'visits', 'together_outside', 'none']) profile_social_invite_possible_friends.setValues(['yes', 'no']) profile_social_interaction_preferrence.setValues(['to_PU', 'to_SU', 'no_preference']) coach_social_activity_friends.addChild(situ_social_activity_friends) situ_social_activity_friends.setParent(coach_social_activity_friends) coach_social_activity_friends.addChild(feat_social_activity_friends_qualitative_lowest) feat_social_activity_friends_qualitative_lowest.setParent(coach_social_activity_friends) coach_social_activity_friends.addChild(profile_social_invite_possible_friends) profile_social_invite_possible_friends.setParent(coach_social_activity_friends) coach_social_activity_friends.addChild(profile_social_interaction_preferrence) profile_social_interaction_preferrence.setParent(coach_social_activity_friends) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'to_PU', feat_social_activity_friends_qualitative_lowest:'calls', situ_social_activity_friends:'very_low'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 1.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'to_SU', feat_social_activity_friends_qualitative_lowest:'calls', situ_social_activity_friends:'very_low'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 1.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'no_preference', feat_social_activity_friends_qualitative_lowest:'calls', situ_social_activity_friends:'very_low'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 1.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'to_PU', feat_social_activity_friends_qualitative_lowest:'calls', situ_social_activity_friends:'very_low'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 1.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'to_SU', feat_social_activity_friends_qualitative_lowest:'calls', situ_social_activity_friends:'very_low'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 1.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'no_preference', feat_social_activity_friends_qualitative_lowest:'calls', situ_social_activity_friends:'very_low'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 1.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'to_PU', feat_social_activity_friends_qualitative_lowest:'visits', situ_social_activity_friends:'very_low'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 1.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'to_SU', feat_social_activity_friends_qualitative_lowest:'visits', situ_social_activity_friends:'very_low'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 1.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'no_preference', feat_social_activity_friends_qualitative_lowest:'visits', situ_social_activity_friends:'very_low'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 1.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'to_PU', feat_social_activity_friends_qualitative_lowest:'visits', situ_social_activity_friends:'very_low'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 1.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'to_SU', feat_social_activity_friends_qualitative_lowest:'visits', situ_social_activity_friends:'very_low'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.5, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.5, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'no_preference', feat_social_activity_friends_qualitative_lowest:'visits', situ_social_activity_friends:'very_low'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.3333333333333333, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.6666666666666666, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'to_PU', feat_social_activity_friends_qualitative_lowest:'together_outside', situ_social_activity_friends:'very_low'}, {'Suggest_going_out_to_an_event_or_social_place_together': 1.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'to_SU', feat_social_activity_friends_qualitative_lowest:'together_outside', situ_social_activity_friends:'very_low'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 1.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'no_preference', feat_social_activity_friends_qualitative_lowest:'together_outside', situ_social_activity_friends:'very_low'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.5, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.5, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'to_PU', feat_social_activity_friends_qualitative_lowest:'together_outside', situ_social_activity_friends:'very_low'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 1.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'to_SU', feat_social_activity_friends_qualitative_lowest:'together_outside', situ_social_activity_friends:'very_low'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.3333333333333333, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.6666666666666666, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'no_preference', feat_social_activity_friends_qualitative_lowest:'together_outside', situ_social_activity_friends:'very_low'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 1.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'to_PU', feat_social_activity_friends_qualitative_lowest:'none', situ_social_activity_friends:'very_low'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 1.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'to_SU', feat_social_activity_friends_qualitative_lowest:'none', situ_social_activity_friends:'very_low'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 1.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'no_preference', feat_social_activity_friends_qualitative_lowest:'none', situ_social_activity_friends:'very_low'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 1.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'to_PU', feat_social_activity_friends_qualitative_lowest:'none', situ_social_activity_friends:'very_low'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.5, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.5, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'to_SU', feat_social_activity_friends_qualitative_lowest:'none', situ_social_activity_friends:'very_low'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.3333333333333333, 'Suggest_calling': 0.3333333333333333, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.3333333333333333, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'no_preference', feat_social_activity_friends_qualitative_lowest:'none', situ_social_activity_friends:'very_low'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.2, 'Suggest_calling': 0.4, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.4, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'to_PU', feat_social_activity_friends_qualitative_lowest:'calls', situ_social_activity_friends:'low'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 1.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'to_SU', feat_social_activity_friends_qualitative_lowest:'calls', situ_social_activity_friends:'low'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 1.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'no_preference', feat_social_activity_friends_qualitative_lowest:'calls', situ_social_activity_friends:'low'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 1.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'to_PU', feat_social_activity_friends_qualitative_lowest:'calls', situ_social_activity_friends:'low'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 1.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'to_SU', feat_social_activity_friends_qualitative_lowest:'calls', situ_social_activity_friends:'low'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 1.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'no_preference', feat_social_activity_friends_qualitative_lowest:'calls', situ_social_activity_friends:'low'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 1.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'to_PU', feat_social_activity_friends_qualitative_lowest:'visits', situ_social_activity_friends:'low'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 1.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'to_SU', feat_social_activity_friends_qualitative_lowest:'visits', situ_social_activity_friends:'low'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 1.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'no_preference', feat_social_activity_friends_qualitative_lowest:'visits', situ_social_activity_friends:'low'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 1.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'to_PU', feat_social_activity_friends_qualitative_lowest:'visits', situ_social_activity_friends:'low'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 1.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'to_SU', feat_social_activity_friends_qualitative_lowest:'visits', situ_social_activity_friends:'low'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.5, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.5, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'no_preference', feat_social_activity_friends_qualitative_lowest:'visits', situ_social_activity_friends:'low'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.3333333333333333, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.6666666666666666, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'to_PU', feat_social_activity_friends_qualitative_lowest:'together_outside', situ_social_activity_friends:'low'}, {'Suggest_going_out_to_an_event_or_social_place_together': 1.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'to_SU', feat_social_activity_friends_qualitative_lowest:'together_outside', situ_social_activity_friends:'low'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 1.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'no_preference', feat_social_activity_friends_qualitative_lowest:'together_outside', situ_social_activity_friends:'low'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.5, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.5, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'to_PU', feat_social_activity_friends_qualitative_lowest:'together_outside', situ_social_activity_friends:'low'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 1.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'to_SU', feat_social_activity_friends_qualitative_lowest:'together_outside', situ_social_activity_friends:'low'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.3333333333333333, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.6666666666666666, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'no_preference', feat_social_activity_friends_qualitative_lowest:'together_outside', situ_social_activity_friends:'low'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 1.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'to_PU', feat_social_activity_friends_qualitative_lowest:'none', situ_social_activity_friends:'low'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 1.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'to_SU', feat_social_activity_friends_qualitative_lowest:'none', situ_social_activity_friends:'low'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 1.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'no_preference', feat_social_activity_friends_qualitative_lowest:'none', situ_social_activity_friends:'low'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 1.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'to_PU', feat_social_activity_friends_qualitative_lowest:'none', situ_social_activity_friends:'low'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.5, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.5, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'to_SU', feat_social_activity_friends_qualitative_lowest:'none', situ_social_activity_friends:'low'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.3333333333333333, 'Suggest_calling': 0.3333333333333333, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.3333333333333333, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'no_preference', feat_social_activity_friends_qualitative_lowest:'none', situ_social_activity_friends:'low'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.2, 'Suggest_calling': 0.4, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.4, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'to_PU', feat_social_activity_friends_qualitative_lowest:'calls', situ_social_activity_friends:'medium'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 1.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'to_SU', feat_social_activity_friends_qualitative_lowest:'calls', situ_social_activity_friends:'medium'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 1.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'no_preference', feat_social_activity_friends_qualitative_lowest:'calls', situ_social_activity_friends:'medium'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 1.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'to_PU', feat_social_activity_friends_qualitative_lowest:'calls', situ_social_activity_friends:'medium'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 1.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'to_SU', feat_social_activity_friends_qualitative_lowest:'calls', situ_social_activity_friends:'medium'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 1.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'no_preference', feat_social_activity_friends_qualitative_lowest:'calls', situ_social_activity_friends:'medium'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 1.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'to_PU', feat_social_activity_friends_qualitative_lowest:'visits', situ_social_activity_friends:'medium'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 1.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'to_SU', feat_social_activity_friends_qualitative_lowest:'visits', situ_social_activity_friends:'medium'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 1.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'no_preference', feat_social_activity_friends_qualitative_lowest:'visits', situ_social_activity_friends:'medium'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 1.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'to_PU', feat_social_activity_friends_qualitative_lowest:'visits', situ_social_activity_friends:'medium'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 1.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'to_SU', feat_social_activity_friends_qualitative_lowest:'visits', situ_social_activity_friends:'medium'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.5, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.5, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'no_preference', feat_social_activity_friends_qualitative_lowest:'visits', situ_social_activity_friends:'medium'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.3333333333333333, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.6666666666666666, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'to_PU', feat_social_activity_friends_qualitative_lowest:'together_outside', situ_social_activity_friends:'medium'}, {'Suggest_going_out_to_an_event_or_social_place_together': 1.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'to_SU', feat_social_activity_friends_qualitative_lowest:'together_outside', situ_social_activity_friends:'medium'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 1.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'no_preference', feat_social_activity_friends_qualitative_lowest:'together_outside', situ_social_activity_friends:'medium'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.5, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.5, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'to_PU', feat_social_activity_friends_qualitative_lowest:'together_outside', situ_social_activity_friends:'medium'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 1.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'to_SU', feat_social_activity_friends_qualitative_lowest:'together_outside', situ_social_activity_friends:'medium'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.3333333333333333, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.6666666666666666, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'no_preference', feat_social_activity_friends_qualitative_lowest:'together_outside', situ_social_activity_friends:'medium'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 1.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'to_PU', feat_social_activity_friends_qualitative_lowest:'none', situ_social_activity_friends:'medium'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 1.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'to_SU', feat_social_activity_friends_qualitative_lowest:'none', situ_social_activity_friends:'medium'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 1.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'no_preference', feat_social_activity_friends_qualitative_lowest:'none', situ_social_activity_friends:'medium'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 1.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'to_PU', feat_social_activity_friends_qualitative_lowest:'none', situ_social_activity_friends:'medium'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.5, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.5, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'to_SU', feat_social_activity_friends_qualitative_lowest:'none', situ_social_activity_friends:'medium'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.3333333333333333, 'Suggest_calling': 0.3333333333333333, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.3333333333333333, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'no_preference', feat_social_activity_friends_qualitative_lowest:'none', situ_social_activity_friends:'medium'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.2, 'Suggest_calling': 0.4, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.4, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'to_PU', feat_social_activity_friends_qualitative_lowest:'calls', situ_social_activity_friends:'high'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 1.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'to_SU', feat_social_activity_friends_qualitative_lowest:'calls', situ_social_activity_friends:'high'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 1.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'no_preference', feat_social_activity_friends_qualitative_lowest:'calls', situ_social_activity_friends:'high'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 1.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'to_PU', feat_social_activity_friends_qualitative_lowest:'calls', situ_social_activity_friends:'high'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 1.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'to_SU', feat_social_activity_friends_qualitative_lowest:'calls', situ_social_activity_friends:'high'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 1.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'no_preference', feat_social_activity_friends_qualitative_lowest:'calls', situ_social_activity_friends:'high'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 1.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'to_PU', feat_social_activity_friends_qualitative_lowest:'visits', situ_social_activity_friends:'high'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 1.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'to_SU', feat_social_activity_friends_qualitative_lowest:'visits', situ_social_activity_friends:'high'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 1.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'no_preference', feat_social_activity_friends_qualitative_lowest:'visits', situ_social_activity_friends:'high'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 1.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'to_PU', feat_social_activity_friends_qualitative_lowest:'visits', situ_social_activity_friends:'high'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 1.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'to_SU', feat_social_activity_friends_qualitative_lowest:'visits', situ_social_activity_friends:'high'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 1.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'no_preference', feat_social_activity_friends_qualitative_lowest:'visits', situ_social_activity_friends:'high'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 1.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'to_PU', feat_social_activity_friends_qualitative_lowest:'together_outside', situ_social_activity_friends:'high'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 1.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'to_SU', feat_social_activity_friends_qualitative_lowest:'together_outside', situ_social_activity_friends:'high'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 1.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'no_preference', feat_social_activity_friends_qualitative_lowest:'together_outside', situ_social_activity_friends:'high'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 1.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'to_PU', feat_social_activity_friends_qualitative_lowest:'together_outside', situ_social_activity_friends:'high'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 1.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'to_SU', feat_social_activity_friends_qualitative_lowest:'together_outside', situ_social_activity_friends:'high'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 1.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'no_preference', feat_social_activity_friends_qualitative_lowest:'together_outside', situ_social_activity_friends:'high'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 1.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'to_PU', feat_social_activity_friends_qualitative_lowest:'none', situ_social_activity_friends:'high'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 1.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'to_SU', feat_social_activity_friends_qualitative_lowest:'none', situ_social_activity_friends:'high'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 1.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'no_preference', feat_social_activity_friends_qualitative_lowest:'none', situ_social_activity_friends:'high'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 1.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'to_PU', feat_social_activity_friends_qualitative_lowest:'none', situ_social_activity_friends:'high'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 1.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'to_SU', feat_social_activity_friends_qualitative_lowest:'none', situ_social_activity_friends:'high'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 1.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'no_preference', feat_social_activity_friends_qualitative_lowest:'none', situ_social_activity_friends:'high'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 0.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 1.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'to_PU', feat_social_activity_friends_qualitative_lowest:'calls', situ_social_activity_friends:'very_high'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 1.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'to_SU', feat_social_activity_friends_qualitative_lowest:'calls', situ_social_activity_friends:'very_high'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 1.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'no_preference', feat_social_activity_friends_qualitative_lowest:'calls', situ_social_activity_friends:'very_high'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 1.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'to_PU', feat_social_activity_friends_qualitative_lowest:'calls', situ_social_activity_friends:'very_high'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 1.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'to_SU', feat_social_activity_friends_qualitative_lowest:'calls', situ_social_activity_friends:'very_high'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 1.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'no_preference', feat_social_activity_friends_qualitative_lowest:'calls', situ_social_activity_friends:'very_high'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 1.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'to_PU', feat_social_activity_friends_qualitative_lowest:'visits', situ_social_activity_friends:'very_high'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 1.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'to_SU', feat_social_activity_friends_qualitative_lowest:'visits', situ_social_activity_friends:'very_high'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 1.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'no_preference', feat_social_activity_friends_qualitative_lowest:'visits', situ_social_activity_friends:'very_high'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 1.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'to_PU', feat_social_activity_friends_qualitative_lowest:'visits', situ_social_activity_friends:'very_high'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 1.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'to_SU', feat_social_activity_friends_qualitative_lowest:'visits', situ_social_activity_friends:'very_high'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 1.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'no_preference', feat_social_activity_friends_qualitative_lowest:'visits', situ_social_activity_friends:'very_high'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 1.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'to_PU', feat_social_activity_friends_qualitative_lowest:'together_outside', situ_social_activity_friends:'very_high'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 1.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'to_SU', feat_social_activity_friends_qualitative_lowest:'together_outside', situ_social_activity_friends:'very_high'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 1.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'no_preference', feat_social_activity_friends_qualitative_lowest:'together_outside', situ_social_activity_friends:'very_high'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 1.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'to_PU', feat_social_activity_friends_qualitative_lowest:'together_outside', situ_social_activity_friends:'very_high'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 1.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'to_SU', feat_social_activity_friends_qualitative_lowest:'together_outside', situ_social_activity_friends:'very_high'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 1.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'no_preference', feat_social_activity_friends_qualitative_lowest:'together_outside', situ_social_activity_friends:'very_high'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 1.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'to_PU', feat_social_activity_friends_qualitative_lowest:'none', situ_social_activity_friends:'very_high'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 1.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'to_SU', feat_social_activity_friends_qualitative_lowest:'none', situ_social_activity_friends:'very_high'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 1.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'yes', profile_social_interaction_preferrence:'no_preference', feat_social_activity_friends_qualitative_lowest:'none', situ_social_activity_friends:'very_high'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 1.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'to_PU', feat_social_activity_friends_qualitative_lowest:'none', situ_social_activity_friends:'very_high'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 1.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'to_SU', feat_social_activity_friends_qualitative_lowest:'none', situ_social_activity_friends:'very_high'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 1.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}]) coach_social_activity_friends.addFunctionRow([{profile_social_invite_possible_friends:'no', profile_social_interaction_preferrence:'no_preference', feat_social_activity_friends_qualitative_lowest:'none', situ_social_activity_friends:'very_high'}, {'Suggest_going_out_to_an_event_or_social_place_together': 0.0, 'Suggest_calling': 0.0, 'Suggest_visit': 0.0, 'no_action': 1.0, 'Suggest_going_out_to_an_event_or_social_place': 0.0, 'Send_positive_message': 0.0}])
369.993548
496
0.846257
8,611
57,349
5.037394
0.008361
0.02642
0.185905
0.094843
0.984762
0.98045
0.974641
0.970814
0.970814
0.969154
0
0.03174
0.034752
57,349
154
497
372.396104
0.751861
0.00204
0
0
1
0
0.388045
0.257691
0
0
0
0
0
1
0
false
0
0.006944
0
0.006944
0
0
0
0
null
0
1
0
1
1
1
1
1
1
0
0
0
0
0
0
1
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
9
cf6c13ff57f888a1044e534bb772001c78f7178f
254
py
Python
datagym/models/__init__.py
datagym-ai/datagym-python
65b5b2edaba1d401b08007e86a787585a88b33ae
[ "BSD-3-Clause" ]
4
2020-04-28T23:00:15.000Z
2022-03-21T19:34:10.000Z
datagym/models/__init__.py
datagym-ai/datagym-python
65b5b2edaba1d401b08007e86a787585a88b33ae
[ "BSD-3-Clause" ]
2
2022-02-07T10:34:33.000Z
2022-02-07T10:53:46.000Z
datagym/models/__init__.py
datagym-ai/datagym-python
65b5b2edaba1d401b08007e86a787585a88b33ae
[ "BSD-3-Clause" ]
null
null
null
from datagym.models.project import Project # noqa from datagym.models.dataset import Dataset # noqa from datagym.models.image import Image # noqa from datagym.models.video import Video # noqa from datagym.models.label_config import LabelConfig # noqa
42.333333
59
0.811024
36
254
5.694444
0.333333
0.268293
0.414634
0.409756
0
0
0
0
0
0
0
0
0.129921
254
5
60
50.8
0.927602
0.094488
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
cf7e911e4e428a628eacc34743555f22d5348a6c
11,088
py
Python
simpletwitter/__init__.py
Abipravi1/Twitter_bot_module
ed10656277585e6e0fe04b176d879a4d4ca0f0a7
[ "MIT" ]
null
null
null
simpletwitter/__init__.py
Abipravi1/Twitter_bot_module
ed10656277585e6e0fe04b176d879a4d4ca0f0a7
[ "MIT" ]
null
null
null
simpletwitter/__init__.py
Abipravi1/Twitter_bot_module
ed10656277585e6e0fe04b176d879a4d4ca0f0a7
[ "MIT" ]
null
null
null
from selenium.webdriver.common.keys import Keys from selenium import webdriver from webdriver_manager.chrome import ChromeDriverManager from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from bs4 import BeautifulSoup import requests from lxml import etree import time class SimpleTwitter: def __init__(self, email, password, no_of_tweets, user_name): self.email = email self.password = password self.no_of_tweets = no_of_tweets self.user_name = user_name self.s = ChromeDriverManager().install() self.bot = webdriver.Chrome(self.s) self.wait = WebDriverWait(self.bot, 20) def login(self): bot = self.bot bot.get("https://twitter.com/i/flow/login") print("Attempt1") try: email_path = self.wait.until(EC.presence_of_element_located( (By.XPATH, '//*[@id="react-root"]/div/div/div[2]/main/div/div/div/div[2]/div[2]/div[1]/div/div[5]/label/div/div[2]/div/input'))).send_keys(self.email) next_button = self.wait.until(EC.presence_of_element_located( (By.XPATH, '//*[@id = "layers"]/div/div/div/div/div/div/div[2]/div[2]/div/div/div[2]/div[2]/div[1]/div/div[6]/div'))).click() try: username = self.wait.until(EC.presence_of_element_located( (By.XPATH, '//*[@id="layers"]/div/div/div/div/div/div/div[2]/div[2]/div/div/div[2]/div[2]/div[1]/div/div[2]/label/div/div[2]/div/input'))).send_keys(self.user_name) next_button = self.wait.until(EC.presence_of_element_located( (By.XPATH, '//*[@id="layers"]/div/div/div/div/div/div/div[2]/div[2]/div/div/div[2]/div[2]/div[2]/div'))).click() except: pass password = self.wait.until(EC.presence_of_element_located( (By.XPATH, '//*[@id="layers"]/div/div/div/div/div/div/div[2]/div[2]/div/div/div[2]/div[2]/div[1]/div/div[3]/div/label/div/div[2]/div[1]/input'))).send_keys(self.password) next_button = self.wait.until(EC.presence_of_element_located( (By.XPATH, '//*[@id="layers"]/div/div/div/div/div/div/div[2]/div[2]/div/div/div[2]/div[2]/div[2]/div/div'))).click() except: print("Attempt2") email = self.wait.until(EC.presence_of_element_located( (By.XPATH, '//*[@id = "layers"]/div/div/div/div/div/div/div[2]/div[2]/div/div/div[2]/div[2]/div[1]/div/div[5]/label/div/div[2]/div/input'))).send_keys(self.email) next_button = self.wait.until(EC.presence_of_element_located( (By.XPATH, '//*[@id = "layers"]/div/div/div/div/div/div/div[2]/div[2]/div/div/div[2]/div[2]/div[1]/div/div[6]/div'))).click() try: username = self.wait.until(EC.presence_of_element_located( (By.XPATH, '//*[@id="layers"]/div/div/div/div/div/div/div[2]/div[2]/div/div/div[2]/div[2]/div[1]/div/div[2]/label/div/div[2]/div/input'))).send_keys(self.user_name) next_button = self.wait.until(EC.presence_of_element_located( (By.XPATH, '//*[@id="layers"]/div/div/div/div/div/div/div[2]/div[2]/div/div/div[2]/div[2]/div[2]/div'))).click() except: pass password = self.wait.until(EC.presence_of_element_located( (By.XPATH, '//*[@id="layers"]/div/div/div/div/div/div/div[2]/div[2]/div/div/div[2]/div[2]/div[1]/div/div[3]/div/label/div/div[2]/div[1]/input'))).send_keys(self.password) next_button = self.wait.until(EC.presence_of_element_located( (By.XPATH, '//*[@id="layers"]/div/div/div/div/div/div/div[2]/div[2]/div/div/div[2]/div[2]/div[2]/div/div'))).click() time.sleep(5) def like_tweet(self, hashtag): for x in hashtag: tweet_button_XPATH = self.wait.until(EC.presence_of_element_located(( By.XPATH, '//*[@id="react-root"]/div/div/div[2]/header/div/div/div/div[1]/div[2]/nav/a[2]'))).click() search_button_XPATH = self.wait.until(EC.presence_of_element_located( (By.XPATH, '//*[@id="react-root"]/div/div/div[2]/main/div/div/div/div/div/div[1]/div[1]/div/div/div/div/div[1]/div[2]/div/div/div/form/div[1]/div/div/label/div[2]/div/input'))).send_keys(x) search_button_Click_XPATH = self.wait.until(EC.presence_of_element_located( (By.XPATH, '//*[@id="react-root"]/div/div/div[2]/main/div/div/div/div/div/div[1]/div[1]/div/div/div/div/div[1]/div[2]/div/div/div/form/div[1]/div/div/label/div[2]/div/input'))).send_keys(Keys.ENTER) time.sleep(1) go_to_photos_XPATH = self.wait.until(EC.presence_of_element_located( (By.XPATH, '//*[@id="react-root"]/div/div/div[2]/main/div/div/div/div/div/div[1]/div[2]/nav/div/div[2]/div/div[4]/a'))).click() time.sleep(5) print("sleeping") for i in range(self.no_of_tweets): print(i) try: like = self.wait.until(EC.presence_of_element_located( (By.XPATH, "//div[@data-testid='like']"))).click() print('liked_image') time.sleep(1) except: time.sleep(1) print('liked_image_failed_except') self.bot.execute_script( "window.scrollTo(0, document.body.scrollHeight/1.5);") time.sleep(1) time.sleep(1) print("Next hashtag") def only_like_top_tweet(self, hashtag): for x in hashtag: tweet_button_XPATH = self.wait.until(EC.presence_of_element_located(( By.XPATH, '//*[@id="react-root"]/div/div/div[2]/header/div/div/div/div[1]/div[2]/nav/a[2]'))).click() search_button_XPATH = self.wait.until(EC.presence_of_element_located( (By.XPATH, '//*[@id="react-root"]/div/div/div[2]/main/div/div/div/div/div/div[1]/div[1]/div/div/div/div/div[1]/div[2]/div/div/div/form/div[1]/div/div/label/div[2]/div/input'))).send_keys(x) search_button_Click_XPATH = self.wait.until(EC.presence_of_element_located( (By.XPATH, '//*[@id="react-root"]/div/div/div[2]/main/div/div/div/div/div/div[1]/div[1]/div/div/div/div/div[1]/div[2]/div/div/div/form/div[1]/div/div/label/div[2]/div/input'))).send_keys(Keys.ENTER) time.sleep(5) print("sleeping") for i in range(self.no_of_tweets): print(i) try: like = self.wait.until(EC.presence_of_element_located( (By.XPATH, "//div[@data-testid='like']"))).click() print('liked_image') time.sleep(1) except: time.sleep(1) print('liked_image_failed_except') self.bot.execute_script( "window.scrollTo(0, document.body.scrollHeight/1.5);") time.sleep(1) time.sleep(1) print("Next hashtag") def tweet(self, tweet_body): tweet_button_XPATH = self.wait.until(EC.presence_of_element_located(( By.XPATH, '//*[@id="react-root"]/div/div/div[2]/header/div/div/div/div[1]/div[3]/a/div/span/div/div/span/span'))).click() print("Tweet Button Clicked", tweet_body) message_XPATH = self.wait.until(EC.presence_of_element_located( (By.XPATH, '//*[@id="layers"]/div[2]/div/div/div/div/div/div[2]/div[2]/div/div[3]/div/div/div/div[1]/div/div/div/div/div[2]/div[1]/div/div/div/div/div/div/div/div/div/label/div[1]/div/div/div/div/div/div/div/div/div'))).send_keys(tweet_body) send_tweet_XPATH = self.wait.until(EC.presence_of_element_located(( By.XPATH, '//*[@id="layers"]/div[2]/div/div/div/div/div/div[2]/div[2]/div/div[3]/div/div/div/div[1]/div/div/div/div/div[2]/div[3]/div/div/div[2]/div[4]'))).click() def Unlike_liked_tweets(self, length): goto_profile_XPATH = self.wait.until(EC.presence_of_element_located( (By.XPATH, '//*[@id="react-root"]/div/div/div[2]/header/div/div/div/div[1]/div[2]/nav/a[5]'))).click() goto_liked_tweets_XPATH = self.wait.until(EC.presence_of_element_located( (By.XPATH, '//*[@id="react-root"]/div/div/div[2]/main/div/div/div/div/div/div[2]/div/div/nav/div/div[2]/div/div[4]/a'))).click() for i in range(length): try: unlike = self.wait.until(EC.presence_of_element_located( (By.XPATH, "//div[@data-testid='unlike']"))).click() print('unliked_image') time.sleep(1) except: time.sleep(1) print('unliked_image_failed_except') self.bot.execute_script( "window.scrollTo(0, document.body.scrollHeight/1.5);") time.sleep(1) time.sleep(1) print("Next hashtag") def retweet(self, hashtag): for x in hashtag: tweet_button_XPATH = self.wait.until(EC.presence_of_element_located(( By.XPATH, '//*[@id="react-root"]/div/div/div[2]/header/div/div/div/div[1]/div[2]/nav/a[2]'))).click() search_button_XPATH = self.wait.until(EC.presence_of_element_located( (By.XPATH, '//*[@id="react-root"]/div/div/div[2]/main/div/div/div/div/div/div[1]/div[1]/div/div/div/div/div[1]/div[2]/div/div/div/form/div[1]/div/div/label/div[2]/div/input'))).send_keys(x) search_button_Click_XPATH = self.wait.until(EC.presence_of_element_located( (By.XPATH, '//*[@id="react-root"]/div/div/div[2]/main/div/div/div/div/div/div[1]/div[1]/div/div/div/div/div[1]/div[2]/div/div/div/form/div[1]/div/div/label/div[2]/div/input'))).send_keys(Keys.ENTER) time.sleep(1) go_to_latest_XPATH = self.wait.until(EC.presence_of_element_located( (By.XPATH, '//*[@id="react-root"]/div/div/div[2]/main/div/div/div/div/div/div[1]/div[2]/nav/div/div[2]/div/div[2]/a'))).click() time.sleep(5) print("sleeping") for i in range(self.no_of_tweets): print(i) try: retweet = self.wait.until(EC.presence_of_element_located( (By.XPATH, "//div[@data-testid='retweet']"))).click() retweet_click = self.wait.until(EC.presence_of_element_located( (By.XPATH, "//div[@data-testid='retweetConfirm']"))).click() print('retweet') time.sleep(1) except: time.sleep(1) print('retweet_tweet_failed_except') self.bot.execute_script( "window.scrollTo(0, document.body.scrollHeight/1.5);") time.sleep(1) time.sleep(1) print("Next hashtag")
63
253
0.582612
1,665
11,088
3.754955
0.073273
0.279271
0.267754
0.216891
0.836852
0.834133
0.834133
0.834133
0.828535
0.818938
0
0.024094
0.228896
11,088
175
254
63.36
0.707135
0
0
0.652695
0
0.167665
0.356962
0.330988
0
0
0
0
0
1
0.041916
false
0.047904
0.05988
0
0.107784
0.125749
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
d8fdb3e8374a63778081445bdb67911b90dbf5b9
7,525
py
Python
benches/cm4_performance/fchashmap.py
Simsys/fchashmap
3a4e620031e56af80e8815792f03395f12c2bba7
[ "Apache-2.0", "MIT" ]
2
2021-06-02T09:09:00.000Z
2021-08-02T02:03:06.000Z
benches/cm4_performance/fchashmap.py
Simsys/fchashmap
3a4e620031e56af80e8815792f03395f12c2bba7
[ "Apache-2.0", "MIT" ]
null
null
null
benches/cm4_performance/fchashmap.py
Simsys/fchashmap
3a4e620031e56af80e8815792f03395f12c2bba7
[ "Apache-2.0", "MIT" ]
null
null
null
data = [[93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 125, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 125, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 159, 93, 93, 154, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 182, 93, 93, 93, 125, 93, 93, 93, 93, 93, 93, 93, 125, 93, 159, 93, 93, 93, 93, 93, 93, 125, 93, 93, 93, 93, 93, 159, 154, 182, 93, 93, 93, 93, 125, 93, 93, 93, 93, 183, 93, 125, 93, 93, 93, 93, 93, 125, 154, 159, 159, 93, 159, 93, 93, 93, 93, 125, 93, 93, 93, 125, 93, 188, 93, 93, 93, 125, 93, 93, 125, 93, 93, 93, 93, 93, 93, 93, 125, 125, 93, 93, 93, 125, 125, 93, 93, 93, 93, 93, 182, 93, 93, 93, 135, 93, 93, 93, 93, 93, 93, 93, 125, 125, 93, 93, 125, 93, 125, 93, 93, 93, 93, 93, 93, 182, 93, 93, 228, 93, 159, 125, 93, 93, 183, 125, 93, 159, 93, 154, 93, 93, 188, 93, 93, 188, 93, 154, 93, 303, 93, 93, 125, 93, 93, 93, 93, 93, 93, 154, 93, 93, 93, 93, 93, 93, 93, 93, 234, 159, 93, 93, 93, 93, 125, 154, 159, 93, 93, 93, 125, 93, 263, 125, 93, 93, 93, 125, 183, 93, 93, 93, 93, 205, 93, 93, 93, 93, 93, 93, 188, 257, 93, 188, 234, 241, 93, 182, 93, 125, 93, 93, 309, 93, 93, 183, 159, 93, 338, 93, 93, 183, 182, 93, 343, 125, 154, 361, 93, 269, 125, 159, 125, 93, 251, 93, 182, 159, 159, 93, 93, 154, 93, 188, 378, 234, 125, 93, 93, 390, 125, 93, 93, 159, 93, 211, 159, 93, 159, 470, 93, 93, 93, 125, 93, 93, 93, 93, 93, 93, 125, 93, 125, 93, 93, 419, 93, 93, 93, 93, 240, 93, 93, 159, 93, 93, 309, 389, 93, 125, 125, 125, 182, 631, 159, 286, 182, 125, 298, 125, 93, 93, 280, 476, 93, 292, 441, 182, 534, 562, 125, 447, 188, 125, 355, 93, 93, 205, 390, 159, 93, 505, 182, 338, 93, 557, 183, 234, 580, 93, 125, 188, 188, 125, 418, 724, 654, 93, 228, 93, 183, 286, 154, 534, 211, 217, 228, 1068, 217, 309, 257, 182, 93, 93, 500, 93, 211, 580, 211, 125, 931, 597, 234, 93, 677, 804, 159, 93, 309, 154, 125, 568, 591, 1092, 724, 603, 539, 1040, 234, 366, 1575, 1264, 384, 487, 430, 988, 257, 159, 1392, 261, 3116, 93, 182, 93, 2190, 93, 510, 159, 93, 1470, 93, 125, 1593, 384, 960, 93, 742, 1920, 321, 93, 413, 93, 580, 809, 1223, 2047, 93, 188, 93, 1612, 959, 3317, 303, 125, 1819, 539, 1246, 685, 494, 1207, 493, 2414, 932, 93, 2541, 125, 1345, 982, 2249, 677, 769, 367, 1482, 3501, 2709, 4547, 321, 2484, 5901, 9239, 7959, 6207, 1127, 7723, 11632, 1570], [139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 165, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 165, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 165, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 165, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 165, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 165, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 165, 139, 139, 139, 165, 139, 139, 139, 191, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 191, 139, 139, 139, 165, 139, 139, 139, 139, 139, 139, 165, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 217, 139, 139, 139, 165, 139, 139, 139, 139, 139, 139, 165, 139, 139, 139, 191, 139, 139, 139, 139, 139, 165, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 165, 139, 165, 191, 139, 165, 139, 139, 165, 139, 139, 165, 165, 139, 191, 165, 139, 191, 139, 139, 139, 139, 191, 165, 139, 191, 165, 165, 139, 139, 139, 139, 139, 139, 217, 139, 165, 139, 139, 191, 165, 243, 139, 165, 139, 139, 165, 139, 139, 139, 139, 139, 139, 139, 139, 165, 139, 243, 139, 139, 217, 139, 191, 139, 139, 295, 243, 139, 139, 243, 165, 243, 139, 139, 139, 139, 139, 139, 139, 165, 139, 139, 139, 139, 139, 139, 217, 139, 139, 165, 139, 269, 139, 139, 139, 243, 139, 165, 139, 191, 139, 165, 139, 165, 191, 269, 139, 139, 321, 139, 139, 165, 217, 295, 139, 139, 165, 139, 191, 139, 191, 139, 139, 243, 139, 191, 295, 165, 139, 165, 191, 139, 191, 165, 165, 269, 165, 139, 217, 165, 191, 191, 191, 165, 269, 295, 243, 139, 191, 139, 191, 243, 139, 191, 191, 165, 295, 139, 165, 217, 165, 217, 295, 321, 217, 165, 165, 399, 217, 139, 555, 425, 139, 347, 139, 191, 295, 165, 373, 295, 243, 269, 399, 373, 295, 321, 347, 217, 581, 217, 503, 269, 347, 425, 529, 321, 321, 217, 633], [360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 394, 360, 360, 360, 360, 360, 372, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 372, 360, 372, 360, 360, 360, 360, 372, 360, 372, 360, 360, 360, 360, 360, 360, 372, 360, 360, 360, 394, 360, 360, 360, 372, 372, 360, 360, 360, 372, 394, 360, 360, 360, 360, 360, 360, 426, 360, 360, 360, 360, 394, 360, 360, 360, 360, 372, 360, 360, 360, 372, 360, 360, 360, 360, 360, 394, 360, 360, 360, 372, 394, 360, 421, 360, 360, 360, 360, 421, 360, 360, 360, 360, 360, 372, 360, 360, 386, 360, 394, 360, 360, 394, 360, 394, 394, 360, 394, 360, 394, 360, 425, 360, 372, 360, 360, 426, 453, 360, 394, 421, 360, 372, 360, 360, 360, 360, 372, 360, 386, 394, 372, 502, 360, 421, 372, 360, 372, 360, 372, 360, 360, 421, 360, 360, 360, 360, 360, 386, 372, 360, 394, 360, 360, 360, 426, 372, 360, 360, 360, 360, 372, 394, 360, 360, 372, 360, 360, 394, 360, 399, 421, 360, 360, 372, 360, 360, 394, 501, 360, 360, 372, 399, 372, 448, 360, 360, 372, 421, 398, 360, 360, 372, 372, 360, 360, 372, 372, 399, 372, 360, 372, 394, 561, 360, 372, 587, 448, 421, 372, 474, 360, 360, 360, 446, 502, 480, 372, 360, 453, 360, 360, 372, 372, 360, 583, 360, 394, 360, 372, 500, 360, 360, 534, 614, 360, 399, 372, 401, 428, 401, 468, 401, 389, 423, 539, 389, 477, 401, 389, 423, 389, 389, 408, 389, 423, 461, 401, 389, 389, 401, 427, 695, 420, 428, 408, 535, 566, 428, 793, 408, 389, 450, 427, 423, 455, 389, 502, 482, 408, 482, 423, 501, 473, 389, 389, 442, 446, 408, 401, 423, 420, 428, 427, 389, 415, 906, 434, 529, 401, 778, 408, 401, 670, 401, 509, 476, 427, 401, 742, 554, 428, 580, 465, 389, 914, 401, 745, 530, 401, 502, 581, 476, 389, 408, 523, 428, 515, 523, 693, 488, 994, 389, 439, 580, 446, 978, 401, 508, 442, 493, 587, 408, 561, 408, 550, 569, 488, 879, 423, 473, 439, 597, 482, 455, 1073, 458, 588, 477, 504, 865, 1024, 401, 577, 997, 522, 708, 447, 447, 469, 439, 420, 488, 496, 711, 428, 509, 423, 465, 1271, 1090, 731, 442, 466, 527, 439, 1609, 401, 1203, 563, 1434, 389, 541, 428, 626, 569, 1345, 447, 1670, 645, 1090, 420, 593, 1180, 420, 389, 484, 620, 1678, 427, 599, 541, 634, 794, 484, 602, 474, 1103, 722, 496, 1531, 800, 743, 496, 641, 761, 610, 1142, 484, 1688, 947, 427, 447, 820, 1086, 526, 853, 1822, 1075, 1085, 1400, 1159, 575, 1069, 553, 664, 1456, 428, 1342, 2473, 1273, 995, 515, 806, 2963, 622, 3984, 2538, 2784, 1271, 453, 4094, 1894, 839, 439, 2098, 2821, 564, 1498, 477, 838, 1446, 2083, 2647, 1138, 2020, 3378, 2851, 4121, 2037, 1739, 2805, 688, 1629, 763, 6182, 11819, 8642, 3340, 8083, 10037, 6130, 11161, 7754]]
3,762.5
7,524
0.590432
1,537
7,525
2.890696
0.184776
0.42944
0.571236
0.696826
0.503264
0.465451
0.43124
0.403556
0.372721
0.32298
0
0.74144
0.204385
7,525
1
7,525
7,525
0.000668
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
1
0
0
1
1
1
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
8
2b2e90be17253e33d1f86cf63f7db3e6ae52b719
14,099
py
Python
nonlincausality_test.py
jackchua/Nonlincausality
ef0ea0ea66f740f83bf643aa02e6762d873ee08a
[ "MIT" ]
null
null
null
nonlincausality_test.py
jackchua/Nonlincausality
ef0ea0ea66f740f83bf643aa02e6762d873ee08a
[ "MIT" ]
null
null
null
nonlincausality_test.py
jackchua/Nonlincausality
ef0ea0ea66f740f83bf643aa02e6762d873ee08a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Fri Jan 28 21:12:00 2022 @author: Maciej Rosoł """ import pytest import numpy as np import keras import nonlincausality_new03022022 as nlc #%% Test check input class TestCheckInput: test_data_ok = [ (np.zeros([1000,2]), [5], 2, [10,10], 2, [10,10], [], 1, [], [], True, 0.1, 10, 0.01, 8, False, False, 'LSTM'), (np.zeros([1000,2]), [5], 2, [10,10], 2, [10,10], [], 1, [], [], True, 0.1, [10,10], [0.01,0.001], 8, False, False, 'LSTM'), (np.zeros([1000,2]), [4,5], 1, [10], 2, [10,10], np.zeros([100,2]), 1, [], [], True, 0.1, 10, 0.01, 8, False, False, 'LSTM'), (np.zeros([1000,2]), [4,5], 1, [10], 2, [10,10], np.zeros([100,2]), 1, np.ones([1000,5]), np.ones([100,2]), True, 0.1, 10, 0.01, 8, False, False, 'LSTM'), (np.zeros([1000,2]), [4,5], 1, [10], 2, [10,10], np.zeros([100,2]), 1, [], [], True, 0.1, 10, 0.01, 8, True, False, 'GRU'), (np.zeros([1000,2]), [4,5], 1, [10], 2, [10,10], np.zeros([100,2]), 1, [], [], True, 0.1, 10, 0.01, 8, False, True, 'GRU'), (np.zeros([1000,2]), 5, 1, [10], 2, [10,10], np.zeros([100,2]), 1, [], [], True, 0.1, 10, 0.01, 8, False, False, 'GRU'), (np.zeros([1000,2]), [5], ['d','dr','l','dr','g','dr'], [10, 0.1, 10, 0.1, 10, 0.1], None, None, np.zeros([100,2]), 1, [], [], True, 0.1, 10, 0.01, 8, False, False, 'NN'), (np.zeros([1000,2]), [5], None, None, 2, [10,10], np.zeros([100,2]), 1, [], [], True, 0.1, 10, 0.01, 8, False, False, 'MLP'), ] @pytest.mark.parametrize('x, maxlag, Network_layers, Network_neurons, Dense_layers, Dense_neurons, xtest, run, z, ztest, add_Dropout, Dropout_rate, epochs_num, learning_rate, batch_size_num, verbose, plot, functin_type',test_data_ok) def test_check_input_ok(self,x, maxlag, Network_layers, Network_neurons, Dense_layers, Dense_neurons, xtest, run, z, ztest, add_Dropout, Dropout_rate, epochs_num, learning_rate, batch_size_num, verbose, plot, functin_type): print(nlc.check_input(x, maxlag, Network_layers, Network_neurons, Dense_layers, Dense_neurons, xtest, run, z, ztest, add_Dropout, Dropout_rate, epochs_num, learning_rate, batch_size_num, verbose, plot, functin_type)) test_data_not_ok = [ # to many columns in x (np.zeros([1000,3]), [5], 2, [10,10], 2, [10,10], 1, [], [], [], True, 0.1, 10, 0.01, 8, False, False, 'LSTM'), # epoch_num is list and learning_rate is int (np.zeros([1000,2]), [5], 2, [10,10], 2, [10,10], 1, [], [], [], True, 0.1, [10,10], 0.01, 8, False, False, 'LSTM'), # epoch_num and learning_rate have different length (np.zeros([1000,2]), [5], 2, [10,10], 2, [10,10], 1, [], [], [], True, 0.1, [10,10], [0.01,0.001,0.001], 8, False, False, 'LSTM'), # negative epochs_num (np.zeros([1000,2]), [5], 2, [10,10], 2, [10,10], 1, [], [], [], True, 0.1, [-10,10], [0.01,0.001], 8, False, False, 'LSTM'), # negative learning_rate (np.zeros([1000,2]), [5], 2, [10,10], 2, [10,10], 1, [], [], [], True, 0.1, [10,10], [-0.01,0.001], 8, False, False, 'LSTM'), # run = 0 (np.zeros([1000,2]), [4,5], 1, [10], 2, [10,10], 0, np.zeros([100,2]), [], [], True, 0.1, 10, 0.01, 8, False, False, 'LSTM'), # run <0 (np.zeros([1000,2]), [4,5], 1, [10], 2, [10,10], -1, np.zeros([100,2]), [], [], True, 0.1, 10, 0.01, 8, False, False, 'LSTM'), # z is to short (np.zeros([1000,2]), [4,5], 1, [10], 2, [10,10], 1, np.zeros([100,2]), np.ones([5000,5]), np.ones([100,2]), True, 0.1, 10, 0.01, 8, False, False, 'LSTM'), # ztest is to short (np.zeros([1000,2]), [4,5], 1, [10], 2, [10,10], 1, np.zeros([100,2]), np.ones([1000,5]), np.ones([50,2]), True, 0.1, 10, 0.01, 8, False, False, 'LSTM'), # batch_size = 0 (np.zeros([1000,2]), [4,5], 1, [10], 2, [10,10], 1, np.zeros([100,2]), [], [], True, 0.1, 10, 0.01, 0, True, False, 'LSTM'), # batch_size <0 (np.zeros([1000,2]), [4,5], 1, [10], 2, [10,10], 1, np.zeros([100,2]), [], [], True, 0.1, 10, 0.01, -8, True, False, 'LSTM'), # maxlag = 0 (np.zeros([1000,2]), 0, 1, [10], 2, [10,10], 1, np.zeros([100,2]), [], [], True, 0.1, 10, 0.01, 8, False, False, 'LSTM'), # maxlag < 0 (np.zeros([1000,2]), -5, 1, [10], 2, [10,10], 1, np.zeros([100,2]), [], [], True, 0.1, 10, 0.01, 8, False, False, 'LSTM'), # incorrect functin_type (np.zeros([1000,2]), 5, 1, [10], 2, [10,10], 1, np.zeros([100,2]), [], [], True, 0.1, 10, 0.01, 8, False, False, 'AAA'), # incorrect NN_config (np.zeros([1000,2]), 5, ['a','1'], [10,10], None, None, 1, np.zeros([100,2]), [], [], True, 0.1, 10, 0.01, 8, False, False, 'NN'), # incorrect NN_config Dense=0.1 (np.zeros([1000,2]), 5, ['d'], [0.1], None, None, 1, np.zeros([100,2]), [], [], True, 0.1, 10, 0.01, 8, False, False, 'NN'), # incorrect NN_config dr>1 (np.zeros([1000,2]), 5, ['dr'], [1.1], None, None, 1, np.zeros([100,2]), [], [], True, 0.1, 10, 0.01, 8, False, False, 'NN'), # incorrect NN_config dr<0 (np.zeros([1000,2]), 5, ['dr'], [-0.1], None, None, 1, np.zeros([100,2]), [], [], True, 0.1, 10, 0.01, 8, False, False, 'NN'), # incorrect NN_config (np.zeros([1000,2]), 5, ['g'], [0.1], None, None, 1, np.zeros([100,2]), [], [], True, 0.1, 10, 0.01, 8, False, False, 'NN'), # incorrect NN_config (np.zeros([1000,2]), 5, ['l'], [0.1], None, None, 1, np.zeros([100,2]), [], [], True, 0.1, 10, 0.01, 8, False, False, 'NN'), # incorrect NN_config (np.zeros([1000,2]), 5, ['g'], [-0.1], None, None, 1, np.zeros([100,2]), [], [], True, 0.1, 10, 0.01, 8, False, False, 'NN'), # incorrect NN_config (np.zeros([1000,2]), 5, ['l'], [-0.1], None, None, 1, np.zeros([100,2]), [], [], True, 0.1, 10, 0.01, 8, False, False, 'NN'), # incorrect NN_config (np.zeros([1000,2]), 5, None, None, None, None, 1, np.zeros([100,2]), [], [], True, 0.1, 10, 0.01, 8, False, False, 'NN'), ] @pytest.mark.parametrize('x, maxlag, Network_layers, Network_neurons, run, Dense_layers, Dense_neurons, xtest, z, ztest, add_Dropout, Dropout_rate, epochs_num, learning_rate, batch_size_num, verbose, plot, functin_type',test_data_not_ok) def test_check_input_not_ok(self,x, maxlag, Network_layers, Network_neurons, Dense_layers, Dense_neurons, xtest, run, z, ztest, add_Dropout, Dropout_rate, epochs_num, learning_rate, batch_size_num, verbose, plot, functin_type): error = False try: nlc.check_input(x, maxlag, Network_layers, Network_neurons, Dense_layers, Dense_neurons, xtest, run, z, ztest, add_Dropout, Dropout_rate, epochs_num, learning_rate, batch_size_num, verbose, plot, functin_type) except: error = True assert error #%% test MLP_architecture class TestMLPArchitecture(): test_data = [ (2, [10,10], True, 0.1, [100, 5, 1], 7, 181), (2, [10,10], True, 0.1, [100, 5, 2], 7, 191), (2, [10,10], False, 0.1, [100, 5, 1], 5, 181), (2, [10,10], False, 0.1, [100, 5, 2], 5, 191), (1, [10], True, 0.1, [100, 5, 1], 5, 71), (1, [10], False, 0.1, [100, 5, 1], 4, 71), (1, [10], True, 0.1, [100, 5, 2], 5, 81), (1, [10], False, 0.1, [100, 5, 2], 4, 81), (3, [10,10,10], True, 0.1, [100, 5, 1], 9, 291), (3, [10,10,10], False, 0.1, [100, 5, 1], 6, 291), (3, [10,10,10], True, 0.1, [100, 5, 2], 9, 301), (3, [10,10,10], False, 0.1, [100, 5, 2], 6, 301), ] @pytest.mark.parametrize('Dense_layers, Dense_neurons, add_Dropout, Dropout_rate, data_shape, expected_layers_number, expected_parameters', test_data) def test_MLP_architecture(self, Dense_layers, Dense_neurons, add_Dropout, Dropout_rate, data_shape, expected_layers_number, expected_parameters): mdl = nlc.MLP_architecture(Dense_layers, Dense_neurons, add_Dropout, Dropout_rate, data_shape) assert len(mdl.layers) == expected_layers_number assert mdl.count_params() == expected_parameters #%% test GRU_architecture class TestGRUArchitecture(): test_data = [ (2, [10,10], 1, [10], True, 0.1, [100, 5, 1], 8, 1111), (2, [10,10], 2, [10,10], True, 0.1, [100, 5, 2], 10, 1251), (2, [10,10], 3, [10,10, 10], False, 0.1, [100, 5, 1], 7, 1331), (2, [10,10], 0, [], False, 0.1, [100, 5, 2], 4, 1031), (1, [10], 1, [10], True, 0.1, [100, 5, 1], 5, 481), (1, [10], 2, [10,10], False, 0.1, [100, 5, 1], 5, 591), (1, [10], 3, [10,10, 10], True, 0.1, [100, 5, 2], 9, 731), (1, [10], 0, [], False, 0.1, [100, 5, 2], 3, 401), (3, [10,10,10], 1, [10], True, 0.1, [100, 5, 1], 10, 1741), (3, [10,10,10], 2, [10,10], False, 0.1, [100, 5, 1], 7, 1851), (3, [10,10,10], 3, [10,10, 10], True, 0.1, [100, 5, 2], 14, 1991), (3, [10,10,10], 0, [], False, 0.1, [100, 5, 2], 5, 1661), ] @pytest.mark.parametrize('GRU_layers, GRU_neurons, Dense_layers, Dense_neurons, add_Dropout, Dropout_rate, data_shape, expected_layers_number, expected_parameters', test_data) def test_GRU_architecture(self, GRU_layers, GRU_neurons, Dense_layers, Dense_neurons, add_Dropout, Dropout_rate, data_shape, expected_layers_number, expected_parameters): mdl = nlc.GRU_architecture(GRU_layers, GRU_neurons, Dense_layers, Dense_neurons, add_Dropout, Dropout_rate, data_shape) assert len(mdl.layers) == expected_layers_number assert mdl.count_params() == expected_parameters #%% class TestLSTMArchitecture(): test_data = [ (2, [10,10], 1, [10], True, 0.1, [100, 5, 1], 8, 1441), (2, [10,10], 2, [10,10], True, 0.1, [100, 5, 2], 10, 1591), (2, [10,10], 3, [10,10, 10], False, 0.1, [100, 5, 1], 7, 1661), (2, [10,10], 0, [], False, 0.1, [100, 5, 2], 4, 1371), (1, [10], 1, [10], True, 0.1, [100, 5, 1], 5, 601), (1, [10], 2, [10,10], False, 0.1, [100, 5, 1], 5, 711), (1, [10], 3, [10,10, 10], True, 0.1, [100, 5, 2], 9, 861), (1, [10], 0, [], False, 0.1, [100, 5, 2], 3, 531), (3, [10,10,10], 1, [10], True, 0.1, [100, 5, 1], 10, 2281), (3, [10,10,10], 2, [10,10], False, 0.1, [100, 5, 1], 7, 2391), (3, [10,10,10], 3, [10,10, 10], True, 0.1, [100, 5, 2], 14, 2541), (3, [10,10,10], 0, [], False, 0.1, [100, 5, 2], 5, 2211), ] @pytest.mark.parametrize('LSTM_layers, LSTM_neurons, Dense_layers, Dense_neurons, add_Dropout, Dropout_rate, data_shape, expected_layers_number, expected_parameters', test_data) def test_LSTM_arcgitecture(self, LSTM_layers, LSTM_neurons, Dense_layers, Dense_neurons, add_Dropout, Dropout_rate, data_shape, expected_layers_number, expected_parameters): mdl = mdl = nlc.LSTM_architecture(LSTM_layers, LSTM_neurons, Dense_layers, Dense_neurons, add_Dropout, Dropout_rate, data_shape) assert expected_layers_number == len(mdl.layers) assert expected_parameters == mdl.count_params() ''' for i in range(len(test_data)): LSTM_layers, LSTM_neurons, Dense_layers, Dense_neurons, add_Dropout, Dropout_rate, data_shape, exp_l, exp_par = test_data[i] mdl = nlc.LSTM_architecture(LSTM_layers, LSTM_neurons, Dense_layers, Dense_neurons, add_Dropout, Dropout_rate, data_shape) print(exp_l == len(mdl.layers)) print(exp_par == mdl.count_params()) ''' #%% test NN architecture class TestNNArchitecture(): test_data = [ (['d'], [10], [100, 5, 1], 4, 71), (['d','d'], [10, 10], [100, 5, 1], 5, 181), (['d'], [10], [100, 5, 2], 4, 81), (['d','d'], [10, 10], [100, 5, 2], 5, 191), (['d','dr'], [10,0.1], [100, 5, 1], 5, 71), (['d','dr','d','dr'], [10, 0.1, 10, 0.1], [100, 5, 1], 7, 181), (['d', 'dr'], [10, 0.1], [100, 5, 2], 5, 81), (['d','dr','d','dr'], [10, 0.1, 10, 0.1], [100, 5, 2], 7, 191), (['g'], [10], [100, 5, 1], 3, 371), (['g','d'], [10, 10], [100, 5, 1], 4, 481), (['g','d','g'], [10, 10, 10], [100, 5, 1], 5, 1111), (['d','g','d'], [10, 10, 10], [100, 5, 1], 5, 771), (['d','dr','g','dr','d','dr'], [10, 0.1, 10, 0.1, 10, 0.1], [100, 5, 1], 8, 771), (['g','d','g'], [10, 10, 10], [100, 5, 2], 5, 1141), (['d','g','d'], [10, 10, 10], [100, 5, 2], 5, 781), (['d','dr','g','dr','d','dr'], [10, 0.1, 10, 0.1, 10, 0.1], [100, 5, 2], 8, 781), (['l'], [10], [100, 5, 1], 3, 491), (['l','d'], [10, 10], [100, 5, 1], 4, 601), (['l','d','l'], [10, 10, 10], [100, 5, 1], 5, 1441), (['d','l','d'], [10, 10, 10], [100, 5, 1], 5, 981), (['d','dr','l','dr','d','dr'], [10, 0.1, 10, 0.1, 10, 0.1], [100, 5, 1], 8, 981), (['l','d','l'], [10, 10, 10], [100, 5, 2], 5, 1481), (['d','l','d'], [10, 10, 10], [100, 5, 2], 5, 991), (['d','dr','l','dr','d','dr'], [10, 0.1, 10, 0.1, 10, 0.1], [100, 5, 2], 8, 991), (['g','dr','l','dr','d','dr'], [10, 0.1, 10, 0.1, 10, 0.1], [100, 5, 1], 8, 1321), (['d','dr','l','dr','g','dr'], [10, 0.1, 10, 0.1, 10, 0.1], [100, 5, 1], 8, 1501), (['d','dr','l','dr','g','dr','d'], [10, 0.1, 10, 0.1, 10, 0.1, 10], [100, 5, 1], 9, 1611), (['g','dr','l','dr','d','dr'], [10, 0.1, 10, 0.1, 10, 0.1], [100, 5, 2], 8, 1351), (['d','dr','l','dr','g','dr'], [10, 0.1, 10, 0.1, 10, 0.1], [100, 5, 2], 8, 1511), (['d','dr','l','dr','g','dr','d'], [10, 0.1, 10, 0.1, 10, 0.1, 10], [100, 5, 2], 9, 1621), ] @pytest.mark.parametrize('NN_config, NN_neurons, data_shape, expected_layers_number, expected_parameters', test_data) def test_NN_arcgitecture(self, NN_config, NN_neurons, data_shape, expected_layers_number, expected_parameters): mdl = mdl = nlc.NN_architecture(NN_config, NN_neurons, data_shape) assert expected_layers_number == len(mdl.layers) assert expected_parameters == mdl.count_params() #%% if __name__ == "__main__": pytest.main([__file__])
65.576744
241
0.52564
2,415
14,099
2.958592
0.073292
0.03219
0.03303
0.035689
0.851505
0.83345
0.815115
0.788383
0.759412
0.7324
0
0.188462
0.216824
14,099
214
242
65.883178
0.458613
0.046386
0
0.078947
0
0.013158
0.086223
0.007057
0
0
0
0
0.059211
1
0.039474
false
0
0.026316
0
0.138158
0.006579
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
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
7
999f28043f047130bc2b2cc0deb6b8da35ac36d7
7,205
py
Python
problem/01000~09999/02814/2814.pypy3.py
njw1204/BOJ-AC
1de41685725ae4657a7ff94e413febd97a888567
[ "MIT" ]
1
2019-04-19T16:37:44.000Z
2019-04-19T16:37:44.000Z
problem/01000~09999/02814/2814.pypy3.py
njw1204/BOJ-AC
1de41685725ae4657a7ff94e413febd97a888567
[ "MIT" ]
1
2019-04-20T11:42:44.000Z
2019-04-20T11:42:44.000Z
problem/01000~09999/02814/2814.pypy3.py
njw1204/BOJ-AC
1de41685725ae4657a7ff94e413febd97a888567
[ "MIT" ]
3
2019-04-19T16:37:47.000Z
2021-10-25T00:45:00.000Z
import sys n=1000000 sosu=[True]*(n+5) sosu[1],sosu[2]=False,True i=2 while i*i<=n: if sosu[i]==False: i+=1 continue j=i*i while j<=n: sosu[j]=False j+=i i+=1 N,P=map(int,input().split()) if N==1: print(P) sys.exit() if P*P>10**9: print(0) sys.exit() ss=[] for i in range(2,n+1): if sosu[i] and i<P: ss.append(i) left,right=1,10**9+1 while left<right: cnt=cnt2=0 mid=(left+right)//2 lenss=len(ss) for val in ss: if val*P>mid: break cnt2+=mid//(val*P) for i1 in range(lenss): s1=True for i2 in range(i1+1,lenss): val=ss[i1]*ss[i2]*P if val>mid: break cnt2+=(mid//val)*(-1) s1=False if s1: break for i1 in range(lenss): s1=True for i2 in range(i1+1,lenss): s2=True for i3 in range(i2+1,lenss): val=ss[i1]*ss[i2]*ss[i3]*P if val>mid: break cnt2+=mid//val s2=False if s2: break s1=False if s1: break for i1 in range(lenss): s1=True for i2 in range(i1+1,lenss): s2=True for i3 in range(i2+1,lenss): s3=True for i4 in range(i3+1,lenss): val=ss[i1]*ss[i2]*ss[i3]*ss[i4]*P if val>mid: break cnt2+=(mid//val)*(-1) s3=False if s3: break s2=False if s2: break s1=False if s1: break for i1 in range(lenss): s1=True for i2 in range(i1+1,lenss): s2=True for i3 in range(i2+1,lenss): s3=True for i4 in range(i3+1,lenss): s4=True for i5 in range(i4+1,lenss): val=ss[i1]*ss[i2]*ss[i3]*ss[i4]*ss[i5]*P if val>mid: break cnt2+=mid//val s4=False if s4: break s3=False if s3: break s2=False if s2: break s1=False if s1: break for i1 in range(lenss): s1=True for i2 in range(i1+1,lenss): s2=True for i3 in range(i2+1,lenss): s3=True for i4 in range(i3+1,lenss): s4=True for i5 in range(i4+1,lenss): s5=True for i6 in range(i5+1,lenss): val=ss[i1]*ss[i2]*ss[i3]*ss[i4]*ss[i5]*ss[i6]*P if val>mid: break cnt2+=(mid//val)*(-1) s5=False if s5: break s4=False if s4: break s3=False if s3: break s2=False if s2: break s1=False if s1: break for i1 in range(lenss): s1=True for i2 in range(i1+1,lenss): s2=True for i3 in range(i2+1,lenss): s3=True for i4 in range(i3+1,lenss): s4=True for i5 in range(i4+1,lenss): s5=True for i6 in range(i5+1,lenss): s6=True for i7 in range(i6+1,lenss): val=ss[i1]*ss[i2]*ss[i3]*ss[i4]*ss[i5]*ss[i6]*ss[i7]*P if val>mid: break cnt2+=mid//val s6=False if s6: break s5=False if s5: break s4=False if s4: break s3=False if s3: break s2=False if s2: break s1=False if s1: break for i1 in range(lenss): s1=True for i2 in range(i1+1,lenss): s2=True for i3 in range(i2+1,lenss): s3=True for i4 in range(i3+1,lenss): s4=True for i5 in range(i4+1,lenss): s5=True for i6 in range(i5+1,lenss): s6=True for i7 in range(i6+1,lenss): s7=True for i8 in range(i7+1,lenss): val=ss[i1]*ss[i2]*ss[i3]*ss[i4]*ss[i5]*ss[i6]*ss[i7]*ss[i8]*P if val>mid: break cnt2+=(mid//val)*(-1) s7=False if s7: break s6=False if s6: break s5=False if s5: break s4=False if s4: break s3=False if s3: break s2=False if s2: break s1=False if s1: break for i1 in range(lenss): s1=True for i2 in range(i1+1,lenss): s2=True for i3 in range(i2+1,lenss): s3=True for i4 in range(i3+1,lenss): s4=True for i5 in range(i4+1,lenss): s5=True for i6 in range(i5+1,lenss): s6=True for i7 in range(i6+1,lenss): s7=True for i8 in range(i7+1,lenss): s8=True for i9 in range(i8+1,lenss): val=ss[i1]*ss[i2]*ss[i3]*ss[i4]*ss[i5]*ss[i6]*ss[i7]*ss[i8]*ss[i9]*P if val>mid: break cnt2+=mid//val s8=False if s8: break s7=False if s7: break s6=False if s6: break s5=False if s5: break s4=False if s4: break s3=False if s3: break s2=False if s2: break s1=False if s1: break cnt=mid//P-cnt2 if cnt<N: left=mid+1 elif cnt>N: right=mid-1 else: ans=True for v in ss: if mid%v==0: ans=False break if ans and mid%P==0: left=right=mid break else: right=mid-1 print(left if left<=10**9 else 0)
29.896266
108
0.344067
871
7,205
2.846154
0.070034
0.127067
0.043566
0.054457
0.815651
0.80839
0.80839
0.803953
0.765228
0.718838
0
0.10127
0.562804
7,205
241
109
29.896266
0.685714
0
0
0.769912
0
0
0
0
0
0
0
0
0
1
0
false
0
0.004425
0
0.004425
0.013274
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
1
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
8
41ffb9a029d1f77d62925d681ad14b5173036d21
21,422
py
Python
tests/model/test_model.py
Shinkai125/RecBole
2e156473267d8b869fbeffc92b409ce474390f6d
[ "MIT" ]
17
2021-04-27T09:45:57.000Z
2022-03-16T04:00:58.000Z
tests/model/test_model.py
Limore0129/RecBole
2e156473267d8b869fbeffc92b409ce474390f6d
[ "MIT" ]
2
2021-07-03T02:30:45.000Z
2021-11-18T07:24:15.000Z
tests/model/test_model.py
Limore0129/RecBole
2e156473267d8b869fbeffc92b409ce474390f6d
[ "MIT" ]
4
2021-06-01T03:37:41.000Z
2021-08-11T20:16:56.000Z
# -*- coding: utf-8 -*- # @Time : 2020/10/24 # @Author : Shanlei Mu # @Email : slmu@ruc.edu.cn import unittest from recbole.quick_start import objective_function class TestGeneralRecommender(unittest.TestCase): def test_pop(self): config_dict = { 'model': 'Pop', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_itemknn(self): config_dict = { 'model': 'ItemKNN', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_bpr(self): config_dict = { 'model': 'BPR', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_neumf(self): config_dict = { 'model': 'NeuMF', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_convncf(self): config_dict = { 'model': 'ConvNCF', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_dmf(self): config_dict = { 'model': 'DMF', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_fism(self): config_dict = { 'model': 'FISM', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_nais(self): config_dict = { 'model': 'NAIS', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_spectralcf(self): config_dict = { 'model': 'SpectralCF', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_gcmc(self): config_dict = { 'model': 'GCMC', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_ngcf(self): config_dict = { 'model': 'NGCF', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_lightgcn(self): config_dict = { 'model': 'LightGCN', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_dgcf(self): config_dict = { 'model': 'DGCF', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) class TestContextRecommender(unittest.TestCase): # todo: more complex context information should be test, such as criteo dataset def test_lr(self): config_dict = { 'model': 'LR', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_fm(self): config_dict = { 'model': 'FM', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_nfm(self): config_dict = { 'model': 'NFM', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_deepfm(self): config_dict = { 'model': 'DeepFM', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_xdeepfm(self): config_dict = { 'model': 'xDeepFM', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_afm(self): config_dict = { 'model': 'AFM', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_fnn(self): config_dict = { 'model': 'FNN', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_pnn(self): config_dict = { 'model': 'PNN', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_dssm(self): config_dict = { 'model': 'DSSM', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_widedeep(self): config_dict = { 'model': 'WideDeep', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_dcn(self): config_dict = { 'model': 'DCN', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_autoint(self): config_dict = { 'model': 'AutoInt', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_ffm(self): config_dict = { 'model': 'FFM', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_fwfm(self): config_dict = { 'model': 'FwFM', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) # def test_din(self): # config_dict = { # 'model': 'DIN', # } # objective_function(config_dict=config_dict, # config_file_list=['test_model.yaml'], saved=False) class TestSequentialRecommender(unittest.TestCase): def test_fpmc(self): config_dict = { 'model': 'FPMC', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_gru4rec(self): config_dict = { 'model': 'GRU4Rec', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_narm(self): config_dict = { 'model': 'NARM', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_stamp(self): config_dict = { 'model': 'STAMP', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_caser(self): config_dict = { 'model': 'Caser', 'MAX_ITEM_LIST_LENGTH': 10, 'reproducibility': False, } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_nextitnet(self): config_dict = { 'model': 'NextItNet', 'reproducibility': False, } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_transrec(self): config_dict = { 'model': 'TransRec', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_sasrec(self): config_dict = { 'model': 'SASRec', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_bert4rec(self): config_dict = { 'model': 'BERT4Rec', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_srgnn(self): config_dict = { 'model': 'SRGNN', 'MAX_ITEM_LIST_LENGTH': 3, } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_gcsan(self): config_dict = { 'model': 'GCSAN', 'MAX_ITEM_LIST_LENGTH': 3, } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_gru4recf(self): config_dict = { 'model': 'GRU4RecF', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_sasrecf(self): config_dict = { 'model': 'SASRecF', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_fdsa(self): config_dict = { 'model': 'FDSA', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) # def test_gru4reckg(self): # config_dict = { # 'model': 'GRU4RecKG', # } # objective_function(config_dict=config_dict, # config_file_list=['test_model.yaml'], saved=False) def test_s3rec(self): config_dict = { 'model': 'S3Rec', 'train_stage': 'pretrain', 'save_step': 1, } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) config_dict = { 'model': 'S3Rec', 'train_stage': 'finetune', 'pre_model_path': './saved/S3Rec-ml-100k-1.pth', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) class TestKnowledgeRecommender(unittest.TestCase): def test_cke(self): config_dict = { 'model': 'CKE', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_cfkg(self): config_dict = { 'model': 'CFKG', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_ktup(self): config_dict = { 'model': 'KTUP', 'train_rec_step': 1, 'train_kg_step': 1, 'epochs': 2, } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_kgat(self): config_dict = { 'model': 'KGAT', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_ripplenet(self): config_dict = { 'model': 'RippleNet', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_mkr(self): config_dict = { 'model': 'MKR', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_kgcn(self): config_dict = { 'model': 'KGCN', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_kgnnls(self): config_dict = { 'model': 'KGNNLS', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) class TestGeneralRecommender2(unittest.TestCase): def test_dmf(self): config_dict = { 'model': 'DMF', 'inter_matrix_type': 'rating', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_fism(self): config_dict = { 'model': 'FISM', 'split_to': 10, 'alpha': 0.5, } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_nais(self): config_dict = { 'model': 'NAIS', 'algorithm': 'concat', 'split_to': 10, 'alpha': 0.5, 'beta': 0.1, } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_gcmc(self): config_dict = { 'model': 'GCMC', 'accum': 'stack', 'sparse_feature': False, } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) class TestKnowledgeRecommender2(unittest.TestCase): def test_cfkg(self): config_dict = { 'model': 'CFKG', 'loss_function': 'transe', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_ktup(self): config_dict = { 'model': 'KTUP', 'use_st_gumbel': False, 'L1_flag': True, } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_kgat(self): config_dict = { 'model': 'KGAT', 'aggregator_type': 'gcn', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) config_dict = { 'model': 'KGAT', 'aggregator_type': 'graphsage', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_mkr(self): config_dict = { 'model': 'MKR', 'use_inner_product': False, } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_kgcn(self): config_dict = { 'model': 'KGCN', 'aggregator': 'neighbor', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) config_dict = { 'model': 'KGCN', 'aggregator': 'concat', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_kgnnls(self): config_dict = { 'model': 'KGNNLS', 'aggregator': 'neighbor', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) config_dict = { 'model': 'KGNNLS', 'aggregator': 'concat', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) class TestContextRecommender2(unittest.TestCase): def test_xdeepfm(self): config_dict = { 'model': 'xDeepFM', 'direct': True, } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_pnn(self): config_dict = { 'model': 'PNN', 'use_inner': True, 'use_outer': True, } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) config_dict = { 'model': 'PNN', 'use_inner': False, 'use_outer': False, } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) class TestSequentialRecommender2(unittest.TestCase): def test_gru4rec(self): config_dict = { 'model': 'GRU4Rec', 'loss_type': 'BPR', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_narm(self): config_dict = { 'model': 'NARM', 'loss_type': 'BPR', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_stamp(self): config_dict = { 'model': 'STAMP', 'loss_type': 'BPR', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_caser(self): config_dict = { 'model': 'Caser', 'loss_type': 'BPR', 'MAX_ITEM_LIST_LENGTH': 10, 'reproducibility': False, } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_nextitnet(self): config_dict = { 'model': 'NextItNet', 'loss_type': 'BPR', 'reproducibility': False, } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_srgnn(self): config_dict = { 'model': 'SRGNN', 'loss_type': 'BPR', 'MAX_ITEM_LIST_LENGTH': 3, } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_sasrec(self): config_dict = { 'model': 'SASRec', 'loss_type': 'BPR', 'hidden_act': 'relu' } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) config_dict = { 'model': 'SASRec', 'loss_type': 'BPR', 'hidden_act': 'sigmoid' } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_bert4rec(self): config_dict = { 'model': 'BERT4Rec', 'loss_type': 'BPR', 'hidden_act': 'swish' } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_gcsan(self): config_dict = { 'model': 'GCSAN', 'loss_type': 'BPR', 'hidden_act': 'tanh', 'MAX_ITEM_LIST_LENGTH': 3, } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_gru4recf(self): config_dict = { 'model': 'GRU4RecF', 'pooling_mode': 'max', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) config_dict = { 'model': 'GRU4RecF', 'pooling_mode': 'sum', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_sasrecf(self): config_dict = { 'model': 'SASRecF', 'pooling_mode': 'max', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) config_dict = { 'model': 'SASRecF', 'pooling_mode': 'sum', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) def test_fdsa(self): config_dict = { 'model': 'FDSA', 'pooling_mode': 'max', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) config_dict = { 'model': 'FDSA', 'pooling_mode': 'sum', } objective_function(config_dict=config_dict, config_file_list=['test_model.yaml'], saved=False) if __name__ == '__main__': unittest.main()
31.59587
83
0.53235
2,101
21,422
5.073298
0.081866
0.239234
0.255183
0.215311
0.84811
0.843419
0.829628
0.827564
0.802796
0.79848
0
0.004271
0.355196
21,422
677
84
31.642541
0.767393
0.026281
0
0.692171
0
0
0.142028
0.001296
0
0
0
0.001477
0
1
0.131673
false
0
0.003559
0
0.149466
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
51087c2b09dec827b72cf85084a75e7d18b25db2
173
py
Python
payments/models/mpesa_models.py
Shopyangu-engineering/Shopyangu-Payments
2a9d0b4583f2b8cc473c6e2b3a36bc4aad1194bb
[ "BSD-3-Clause" ]
null
null
null
payments/models/mpesa_models.py
Shopyangu-engineering/Shopyangu-Payments
2a9d0b4583f2b8cc473c6e2b3a36bc4aad1194bb
[ "BSD-3-Clause" ]
null
null
null
payments/models/mpesa_models.py
Shopyangu-engineering/Shopyangu-Payments
2a9d0b4583f2b8cc473c6e2b3a36bc4aad1194bb
[ "BSD-3-Clause" ]
null
null
null
from payments.models.abstract_models import AbstractMpesaExpressRequest class MpesaExpressRequest(AbstractMpesaExpressRequest): """Handles Online Checkout""" pass
24.714286
71
0.820809
14
173
10.071429
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.115607
173
6
72
28.833333
0.921569
0.132948
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.333333
0.333333
0
0.666667
0
1
0
1
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
511e5e1eba264de12e568591b4e4afd840a0f57d
295,165
py
Python
version/app_constants.py
rabaarabaa/happypanda
e35fe4b32ea4fd5f373f226c4d6026e0d6d11e80
[ "Apache-2.0" ]
null
null
null
version/app_constants.py
rabaarabaa/happypanda
e35fe4b32ea4fd5f373f226c4d6026e0d6d11e80
[ "Apache-2.0" ]
4
2020-11-10T01:43:50.000Z
2021-01-14T21:14:38.000Z
version/app_constants.py
rabaarabaa/happypanda
e35fe4b32ea4fd5f373f226c4d6026e0d6d11e80
[ "Apache-2.0" ]
null
null
null
# This file is part of Happypanda. # Happypanda is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 of the License, or # any later version. # Happypanda 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 General Public License for more details. # You should have received a copy of the GNU General Public License # along with Happypanda. If not, see <http://www.gnu.org/licenses/>. """Contains constants to be used by several modules""" from __future__ import annotations import enum import os import sys from typing import Set, TYPE_CHECKING import qtawesome as qta from PyQt5.QtGui import QIcon from . import settings from .database import db_constants if TYPE_CHECKING: from . import gallerydb # Version number vs = '1.1' DEBUG = False OS_NAME = '' if sys.platform.startswith('darwin'): OS_NAME = "darwin" elif os.name == 'nt': OS_NAME = "windows" elif os.name == 'posix': OS_NAME = "linux" APP_RESTART_CODE = 0 get = settings.get posix_program_dir = os.path.dirname(os.path.realpath(__file__)) if os.name == 'posix': static_dir = os.path.join(posix_program_dir, '../res') bin_dir = os.path.join(posix_program_dir, 'bin') temp_dir = os.path.join(posix_program_dir, 'temp') else: bin_dir = os.path.join(os.getcwd(), 'bin') static_dir = os.path.join(os.getcwd(), "res") temp_dir = os.path.join('temp') # path to unrar tool binary unrar_tool_path = get('', 'Application', 'unrar tool path') # type of download needed by download manager for each site parser # NOTE define here if any new type will be supported in the future. DOWNLOAD_TYPE_ARCHIVE = 0 DOWNLOAD_TYPE_TORRENT = 1 # Note: With this type, file will be sent to torrent program DOWNLOAD_TYPE_OTHER = 2 VALID_GALLERY_CATEGORY = ( 'Doujinshi', 'Manga', 'Artist CG', 'Game CG', 'Western', 'Non-H', 'Image Set', 'Cosplay', 'Miscellaneous', 'Private' ) # default stylesheet path default_stylesheet_path = os.path.join(static_dir, "style.css") user_stylesheet_path = "" INTERNAL_LEVEL = 8 FIRST_TIME_LEVEL = get(INTERNAL_LEVEL, 'Application', 'first time level', int) UPDATE_VERSION = get('0.30', 'Application', 'version', str) FORCE_HIGH_DPI_SUPPORT = get(False, 'Advanced', 'force high dpi support', bool) # sizes MAIN_W = 1061 # main window MAIN_H = 650 # main window SIZE_FACTOR = get(10, 'Visual', 'size factor', int) GRID_SPACING = get(15, 'Visual', 'grid spacing', int) LISTBOX_H_SIZE = 190 LISTBOX_W_SIZE = 950 GRIDBOX_LBL_H = 60 THUMB_H_SIZE = 190 + SIZE_FACTOR THUMB_W_SIZE = 133 + SIZE_FACTOR THUMB_DEFAULT = (THUMB_W_SIZE, THUMB_H_SIZE) THUMB_SMALL = (140, 93) # Columns COLUMNS = tuple(range(11)) TITLE = 0 ARTIST = 1 DESCR = 2 TAGS = 3 TYPE = 4 FAV = 5 CHAPTERS = 6 LANGUAGE = 7 LINK = 8 PUB_DATE = 9 DATE_ADDED = 10 @enum.unique class ViewType(enum.IntEnum): Default = 1 Addition = 2 Duplicate = 3 @enum.unique class ProfileType(enum.Enum): Default = 1 Small = 2 # Application SYSTEM_TRAY = None NOTIF_BAR = None NOTIF_BUBBLE = None STAT_MSG_METHOD = None GENERAL_THREAD = None WHEEL_SCROLL_EFFECT = 10 DOWNLOAD_MANAGER = None # ICONS G_LISTS_ICON_WH: QIcon G_LISTS_ICON: QIcon LIST_ICON: QIcon ARTISTS_ICON: QIcon ARTIST_ICON: QIcon NSTAGS_ICON: QIcon PLUS_ICON: QIcon ARROW_RIGHT_ICON: QIcon ARROW_LEFT_ICON: QIcon GRID_ICON: QIcon GRIDL_ICON: QIcon SEARCH_ICON: QIcon CROSS_ICON: QIcon CROSS_ICON_WH: QIcon MANAGER_ICON: QIcon DOWNLOAD_ICON: QIcon RANDOM_ICON: QIcon DUPLICATE_ICON: QIcon SORT_ICON_DESC: QIcon SORT_ICON_ASC: QIcon REFRESH_ICON: QIcon STAR_ICON: QIcon CIRCLE_ICON: QIcon INBOX_ICON: QIcon SPINNER_ICON: QIcon # IMPORTANT: Neccessary because qtawesome can't function without an instanced QApplication # IMPORTANT: called after instancing qApplication in main.py def load_icons(): global G_LISTS_ICON_WH global G_LISTS_ICON global LIST_ICON global ARTISTS_ICON global ARTIST_ICON global NSTAGS_ICON global PLUS_ICON global ARROW_RIGHT_ICON global ARROW_LEFT_ICON global GRID_ICON global GRIDL_ICON global SEARCH_ICON global CROSS_ICON global CROSS_ICON_WH global MANAGER_ICON global DOWNLOAD_ICON global RANDOM_ICON global DUPLICATE_ICON global SORT_ICON_DESC global SORT_ICON_ASC global REFRESH_ICON global STAR_ICON global CIRCLE_ICON global INBOX_ICON global SPINNER_ICON G_LISTS_ICON_WH = qta.icon("fa.bars", color="white") G_LISTS_ICON = qta.icon("fa.bars", color="black") LIST_ICON = qta.icon("fa.bars", color="white") ARTISTS_ICON = qta.icon("fa.users", color="white") ARTIST_ICON = qta.icon("fa.user", color="black") NSTAGS_ICON = qta.icon("fa.sitemap", color="white") PLUS_ICON = qta.icon("fa.plus", color="white") ARROW_RIGHT_ICON = qta.icon("fa.angle-double-right", color="white") ARROW_LEFT_ICON = qta.icon("fa.angle-double-left", color="white") GRID_ICON = qta.icon("fa.th", color="white") GRIDL_ICON = qta.icon("fa.th-large", color="white") SEARCH_ICON = qta.icon("fa.search", color="white") CROSS_ICON = qta.icon("fa.times", color="black") CROSS_ICON_WH = qta.icon("fa.times", color="white") MANAGER_ICON = qta.icon("fa.tasks", color="white") DOWNLOAD_ICON = qta.icon("fa.arrow-circle-o-down", color="white") RANDOM_ICON = qta.icon("fa.random", color="white") DUPLICATE_ICON = qta.icon("fa.files-o", color="white") SORT_ICON_DESC = qta.icon("fa.sort-amount-desc", color="white") SORT_ICON_ASC = qta.icon("fa.sort-amount-asc", color="white") REFRESH_ICON = qta.icon("fa.refresh", color="black") STAR_ICON = qta.icon("fa.star", color="white") CIRCLE_ICON = qta.icon("fa.circle", color="white") INBOX_ICON = qta.icon("fa.inbox", color="white") SPINNER_ICON = qta.icon("fa.spinner", color="white") # image paths GALLERY_DEF_ICO_PATH = os.path.join(static_dir, "gallery_def_ico.ico") GALLERY_EXT_ICO_PATH = os.path.join(static_dir, "gallery_ext_ico.ico") APP_ICO_PATH = os.path.join(static_dir, "happypanda.ico") SETTINGS_PATH = os.path.join(static_dir, "settings.png") NO_IMAGE_PATH = os.path.join(static_dir, "default.jpg") # Monitored Paths OVERRIDE_MONITOR = False # set true to make watchers to ignore next item (will be set to False) LOOK_NEW_GALLERY_STARTUP = get(True, 'Application', 'look new gallery startup', bool) ENABLE_MONITOR = get(True, 'Application', 'enable monitor', bool) MONITOR_PATHS = [p for p in get([], 'Application', 'monitor paths', list) if os.path.exists(p)] IGNORE_PATHS = get([], 'Application', 'ignore paths', list) IGNORE_EXTS = get([], 'Application', 'ignore exts', list) SCANNING_FOR_GALLERIES = False # if a scan for new galleries is being done TEMP_PATH_IGNORE = [] # GENERAL # set to true to make a fetch instance ignore moving files (will be set to false) OVERRIDE_MOVE_IMPORTED_IN_FETCH = False MOVE_IMPORTED_GALLERIES = get(False, 'Application', 'move imported galleries', bool) IMPORTED_GALLERY_DEF_PATH = get('', 'Application', 'imported gallery def path', str) OPEN_RANDOM_GALLERY_CHAPTERS = get(False, 'Application', 'open random gallery chapters', bool) # set to true to make a fetch instance treat subfolder as galleries (will be set to false) OVERRIDE_SUBFOLDER_AS_GALLERY = False SUBFOLDER_AS_GALLERY = get(False, 'Application', 'subfolder as gallery', bool) RENAME_GALLERY_SOURCE = get(False, 'Application', 'rename gallery source', bool) EXTRACT_CHAPTER_BEFORE_OPENING = get(True, 'Application', 'extract chapter before opening', bool) OPEN_GALLERIES_SEQUENTIALLY = get(False, 'Application', 'open galleries sequentially', bool) SEND_FILES_TO_TRASH = get(True, 'Application', 'send files to trash', bool) SHOW_SIDEBAR_WIDGET = get(False, 'Application', 'show sidebar widget', bool) # ADVANCED GALLERY_DATA_FIX_REGEX = get("", 'Advanced', 'gallery data fix regex', str) GALLERY_DATA_FIX_TITLE = get(True, 'Advanced', 'gallery data fix title', bool) GALLERY_DATA_FIX_ARTIST = get(True, 'Advanced', 'gallery data fix artist', bool) GALLERY_DATA_FIX_REPLACE = get("", 'Advanced', 'gallery data fix replace', str) EXTERNAL_VIEWER_ARGS = get("{$file}", 'Advanced', 'external viewer args', str) # Import/Export EXPORT_FORMAT = get(1, 'Advanced', 'export format', int) EXPORT_PATH = '' # HASH HASH_GALLERY_PAGES = get('all', 'Advanced', 'hash gallery pages', int, str) # WEB INCLUDE_EH_EXPUNGED = get(False, 'Web', 'include eh expunged', bool) GLOBAL_EHEN_TIME = get(5, 'Web', 'global ehen time offset', int) GLOBAL_EHEN_LOCK = False DEFAULT_EHEN_URL = get('https://e-hentai.org/', 'Web', 'default ehen url', str) REPLACE_METADATA = get(False, 'Web', 'replace metadata', bool) ALWAYS_CHOOSE_FIRST_HIT = get(False, 'Web', 'always choose first hit', bool) USE_GALLERY_LINK = get(True, 'Web', 'use gallery link', bool) USE_JPN_TITLE = get(False, 'Web', 'use jpn title', bool) CONTINUE_AUTO_METADATA_FETCHER = get(True, 'Web', 'continue auto metadata fetcher', bool) HEN_DOWNLOAD_TYPE = get(DOWNLOAD_TYPE_ARCHIVE, 'Web', 'hen download type', int) DOWNLOAD_DIRECTORY = get('downloads', 'Web', 'download directory', str) TORRENT_CLIENT = get('', 'Web', 'torrent client', str) HEN_LIST = get(['chaikahen'], 'Web', 'hen list', list) DOWNLOAD_GALLERY_TO_LIB = get(False, 'Web', 'download galleries to library', bool) # External Viewer EXTERNAL_VIEWER_SUPPORT = {'honeyview': ['Honeyview.exe']} USE_EXTERNAL_VIEWER = get(False, 'Application', 'use external viewer', bool) EXTERNAL_VIEWER_PATH = os.path.normcase(get('', 'Application', 'external viewer path', str)) _REFRESH_EXTERNAL_VIEWER = False # controls THUMBNAIL_CACHE_SIZE = (1024, get(200, 'Advanced', 'cache size', int)) # 1024 is 1mib PREFETCH_ITEM_AMOUNT = get(50, 'Advanced', 'prefetch item amount', int) # amount of items to prefetch SCROLL_SPEED = get(7, 'Advanced', 'scroll speed', int) # controls how many steps it takes when scrolling # POPUP POPUP_WIDTH = get(500, 'Visual', 'popup.w', int) POPUP_HEIGHT = get(300, 'Visual', 'popup.h', int) # Gallery APPEND_TAGS_GALLERIES = get(True, 'Application', 'append tags to gallery', bool) KEEP_ADDED_GALLERIES = get(True, 'Application', 'keep added galleries', bool) GALLERY_METAFILE_KEYWORDS = ('info.json', 'info.txt') CURRENT_SORT = get('title', 'General', 'current sort') HIGH_QUALITY_THUMBS = get(False, 'Visual', 'high quality thumbs', bool) DISPLAY_RATING = get(True, 'Visual', 'display gallery rating', bool) DISPLAY_GALLERY_TYPE = get(False, 'Visual', 'display gallery type', bool) if not sys.platform.startswith( 'darwin') else False DISPLAY_GALLERY_RIBBON = get(True, 'Visual', 'display gallery ribbon', bool) GALLERY_FONT = (get('Segoe UI', 'Visual', 'gallery font family', str), get(11, 'Visual', 'gallery font size', int)) GALLERY_FONT_ELIDE = get(True, 'Visual', 'gallery font elide', bool) G_DEF_LANGUAGE = get('English', 'General', 'gallery default language', str) G_CUSTOM_LANGUAGES = get([], 'General', 'gallery custom languages', list) G_DEF_STATUS = get('Completed', 'General', 'gallery default status', str) G_DEF_TYPE = get('Doujinshi', 'General', 'gallery default type', str) G_LANGUAGES = ["English", "Japanese", "Chinese", "Other"] G_STATUS = ["Ongoing", "Completed", "Unknown"] G_TYPES = ["Manga", "Doujinshi", "Artist CG Sets", "Game CG Sets", "Western", "Image Sets", "Non-H", "Cosplay", "Other"] @enum.unique class GalleryState(enum.Enum): Default = 1 New = 2 # Colors GRID_VIEW_TITLE_COLOR = get('#ffffff', 'Visual', 'grid view title color', str) GRID_VIEW_ARTIST_COLOR = get('#e2e2e2', 'Visual', 'grid view artist color', str) GRID_VIEW_LABEL_COLOR = get('#d64933', 'Visual', 'grid view label color', str) GRID_VIEW_T_MANGA_COLOR = get('#3498db', 'Visual', 'grid view t manga color', str) GRID_VIEW_T_DOUJIN_COLOR = get('#e74c3c', 'Visual', 'grid view t doujin color', str) GRID_VIEW_T_ARTIST_CG_COLOR = get('#16a085', 'Visual', 'grid view t artist cg color', str) GRID_VIEW_T_GAME_CG_COLOR = get('#2ecc71', 'Visual', 'grid view t game cg color', str) GRID_VIEW_T_WESTERN_COLOR = get('#ecf0f1', 'Visual', 'grid view t western color', str) GRID_VIEW_T_IMAGE_COLOR = get('#f39c12', 'Visual', 'grid view t image color', str) GRID_VIEW_T_NON_H_COLOR = get('#f1c40f', 'Visual', 'grid view t non-h color', str) GRID_VIEW_T_COSPLAY_COLOR = get('#9b59b6', 'Visual', 'grid view t cosplay color', str) GRID_VIEW_T_OTHER_COLOR = get('#34495e', 'Visual', 'grid view t other color', str) # Search SEARCH_AUTOCOMPLETE = get(True, 'Application', 'search autocomplete', bool) GALLERY_SEARCH_REGEX = get(False, 'Application', 'allow search regex', bool) SEARCH_ON_ENTER = get(False, 'Application', 'search on enter', bool) GALLERY_SEARCH_STRICT = get(False, 'Application', 'gallery search strict', bool) GALLERY_SEARCH_CASE = get(False, 'Application', 'gallery search case', bool) @enum.unique class Search(enum.Enum): Strict = 1 Case = 2 Regex = 3 # Grid Tooltip GRID_TOOLTIP = get(True, 'Visual', 'grid tooltip', bool) TOOLTIP_TITLE = get(False, 'Visual', 'tooltip title', bool) TOOLTIP_AUTHOR = get(False, 'Visual', 'tooltip author', bool) TOOLTIP_CHAPTERS = get(True, 'Visual', 'tooltip chapters', bool) TOOLTIP_STATUS = get(True, 'Visual', 'tooltip status', bool) TOOLTIP_TYPE = get(True, 'Visual', 'tooltip type', bool) TOOLTIP_LANG = get(False, 'Visual', 'tooltip lang', bool) TOOLTIP_DESCR = get(False, 'Visual', 'tooltip descr', bool) TOOLTIP_TAGS = get(False, 'Visual', 'tooltip tags', bool) TOOLTIP_LAST_READ = get(True, 'Visual', 'tooltip last read', bool) TOOLTIP_TIMES_READ = get(True, 'Visual', 'tooltip times read', bool) TOOLTIP_PUB_DATE = get(False, 'Visual', 'tooltip pub date', bool) TOOLTIP_DATE_ADDED = get(True, 'Visual', 'tooltip date added', bool) GALLERY_ADDITION_DATA = [] GALLERY_DATA = [] # contains the most up to date gallery data GALLERY_LISTS: Set[gallerydb.GalleryList] = set() # contains the most up to dat gallery lists # Exceptions class MetadataFetchFail(Exception): pass class InternalPagesMismatch(Exception): pass class ChapterExists(Exception): pass class ChapterWrongParentGallery(Exception): pass class CreateArchiveFail(Exception): pass class FileNotFoundInArchive(Exception): pass class WrongURL(Exception): pass class NeedLogin(Exception): pass class WrongLogin(Exception): pass class HTMLParsing(Exception): pass class GNotAvailable(Exception): pass class TitleParsingError(Exception): pass EXTERNAL_VIEWER_INFO = ( """{$folder} = path to folder {$file} = path to first image Tip: IrfanView uses {$file} """ ) WHAT_IS_FILTER = ( """[FILTER] Filters are basically predefined gallery search terms. Every time a gallery matches the specific filter it gets automatically added to the list! Filter works the same way a gallery search does so make sure to read the guide in Settings -> About -> Search Guide. You can write any valid gallery search term. [ENFORCE] With Enforce enabled the list will only allow galleries that match the specified filter into the list. """ ) SUPPORTED_DOWNLOAD_URLS = ( """Supported URLs: - exhentai/g.e-hentai/e-hentai gallery urls, e.g.: https://e-hentai.org/g/618395/0439fa3666/ - panda.chaika.moe gallery and archive urls http://panda.chaika.moe/[0]/[1]/ where [0] is 'gallery' or 'archive' and [1] are numbers - asmhentai.com gallery urls, e.g: http://asmhentai.com/g/102845/ """ ) SUPPORTED_METADATA_URLS = ( """Supported gallery URLs: - exhentai/g.e-hentai gallery urls, e.g.: http://g.e-hentai.org/g/618395/0439fa3666/ - panda.chaika.moe gallery and archive urls http://panda.chaika.moe/[0]/[1]/ where [0] is 'gallery' or 'archive' and [1] is numbers """ ) EXHEN_COOKIE_TUTORIAL = ( """ How do I find these two values? <br \> <b>All browsers</b> <br \> 1. Navigate to e-hentai.org (needs to be logged in) or exhentai.org <br \> 2. Right click on page --> Inspect element <br \> 3. Go on 'Console' tab <br \> 4. Write : 'document.cookie' <br \> 5. A line of values should appear that correspond to active cookies <br \> 6. Look for the 'ipb_member_id' and 'ipb_pass_hash' values <br \> """ ) REGEXCHEAT = ( """ <!DOCTYPE html><html><head><meta charset="utf-8"><title>Untitled Document.md</title><style>@import 'https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.2.0/katex.min.css';code{color:#c7254e;background-color:#f9f2f4;border-radius:4px}code,kbd{padding:2px 4px}kbd{color:#fff;background-color:#333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;box-shadow:none}pre{display:block;margin:0 0 10px;word-break:break-all;word-wrap:break-word;color:#333;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}fieldset{border:0;min-width:0}legend{display:block;width:100%;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type="radio"],input[type="checkbox"]{margin:1px 0 0;line-height:normal}input[type="file"]{display:block}input[type="range"]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{padding-top:7px}output,.form-control{display:block;font-size:14px;line-height:1.4285714;color:#555}.form-control{width:100%;height:34px;padding:6px 12px;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#777;opacity:1}.form-control:-ms-input-placeholder{color:#777}.form-control::-webkit-input-placeholder{color:#777}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee;opacity:1}textarea.form-control{height:auto}input[type="date"],input[type="time"],input[type="datetime-local"],input[type="month"]{line-height:34px;line-height:1.4285714 \0}input[type="date"].input-sm,.form-horizontal .form-group-sm input[type="date"].form-control,.input-group-sm>input[type="date"].form-control,.input-group-sm>input[type="date"].input-group-addon,.input-group-sm>.input-group-btn>input[type="date"].btn,input[type="time"].input-sm,.form-horizontal .form-group-sm input[type="time"].form-control,.input-group-sm>input[type="time"].form-control,.input-group-sm>input[type="time"].input-group-addon,.input-group-sm>.input-group-btn>input[type="time"].btn,input[type="datetime-local"].input-sm,.form-horizontal .form-group-sm input[type="datetime-local"].form-control,.input-group-sm>input[type="datetime-local"].form-control,.input-group-sm>input[type="datetime-local"].input-group-addon,.input-group-sm>.input-group-btn>input[type="datetime-local"].btn,input[type="month"].input-sm,.form-horizontal .form-group-sm input[type="month"].form-control,.input-group-sm>input[type="month"].form-control,.input-group-sm>input[type="month"].input-group-addon,.input-group-sm>.input-group-btn>input[type="month"].btn{line-height:30px}input[type="date"].input-lg,.form-horizontal .form-group-lg input[type="date"].form-control,.input-group-lg>input[type="date"].form-control,.input-group-lg>input[type="date"].input-group-addon,.input-group-lg>.input-group-btn>input[type="date"].btn,input[type="time"].input-lg,.form-horizontal .form-group-lg input[type="time"].form-control,.input-group-lg>input[type="time"].form-control,.input-group-lg>input[type="time"].input-group-addon,.input-group-lg>.input-group-btn>input[type="time"].btn,input[type="datetime-local"].input-lg,.form-horizontal .form-group-lg input[type="datetime-local"].form-control,.input-group-lg>input[type="datetime-local"].form-control,.input-group-lg>input[type="datetime-local"].input-group-addon,.input-group-lg>.input-group-btn>input[type="datetime-local"].btn,input[type="month"].input-lg,.form-horizontal .form-group-lg input[type="month"].form-control,.input-group-lg>input[type="month"].form-control,.input-group-lg>input[type="month"].input-group-addon,.input-group-lg>.input-group-btn>input[type="month"].btn{line-height:46px}.form-group{margin-bottom:15px}.radio,.checkbox{position:relative;display:block;min-height:20px;margin-top:10px;margin-bottom:10px}.radio label,.checkbox label{padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.radio input[type="radio"],.radio-inline input[type="radio"],.checkbox input[type="checkbox"],.checkbox-inline input[type="checkbox"]{position:absolute;margin-left:-20px;margin-top:4px \9}.radio+.radio,.checkbox+.checkbox{margin-top:-5px}.radio-inline,.checkbox-inline{display:inline-block;padding-left:20px;margin-bottom:0;vertical-align:middle;font-weight:400;cursor:pointer}.radio-inline+.radio-inline,.checkbox-inline+.checkbox-inline{margin-top:0;margin-left:10px}input[type="radio"][disabled],input[type="radio"].disabled,fieldset[disabled] input[type="radio"],input[type="checkbox"][disabled],input[type="checkbox"].disabled,fieldset[disabled] input[type="checkbox"],.radio-inline.disabled,fieldset[disabled] .radio-inline,.checkbox-inline.disabled,fieldset[disabled] .checkbox-inline,.radio.disabled label,fieldset[disabled] .radio label,.checkbox.disabled label,fieldset[disabled] .checkbox label{cursor:not-allowed}.form-control-static{padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-horizontal .form-group-lg .form-control-static.form-control,.input-group-lg>.form-control-static.form-control,.input-group-lg>.form-control-static.input-group-addon,.input-group-lg>.input-group-btn>.form-control-static.btn,.form-control-static.input-sm,.form-horizontal .form-group-sm .form-control-static.form-control,.input-group-sm>.form-control-static.form-control,.input-group-sm>.form-control-static.input-group-addon,.input-group-sm>.input-group-btn>.form-control-static.btn{padding-left:0;padding-right:0}.input-sm,.form-horizontal .form-group-sm .form-control,.input-group-sm>.form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.input-group-sm>.input-group-addon{height:30px;line-height:1.5}.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm,.form-horizontal .form-group-sm select.form-control,.input-group-sm>select.form-control,.input-group-sm>select.input-group-addon,.input-group-sm>.input-group-btn>select.btn{height:30px;line-height:30px}textarea.input-sm,.form-horizontal .form-group-sm textarea.form-control,.input-group-sm>textarea.form-control,.input-group-sm>textarea.input-group-addon,.input-group-sm>.input-group-btn>textarea.btn,select[multiple].input-sm,.form-horizontal .form-group-sm select[multiple].form-control,.input-group-sm>select[multiple].form-control,.input-group-sm>select[multiple].input-group-addon,.input-group-sm>.input-group-btn>select[multiple].btn{height:auto}.input-lg,.form-horizontal .form-group-lg .form-control,.input-group-lg>.form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.input-group-lg>.input-group-addon{height:46px;line-height:1.33}.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-lg,.form-horizontal .form-group-lg select.form-control,.input-group-lg>select.form-control,.input-group-lg>select.input-group-addon,.input-group-lg>.input-group-btn>select.btn{height:46px;line-height:46px}textarea.input-lg,.form-horizontal .form-group-lg textarea.form-control,.input-group-lg>textarea.form-control,.input-group-lg>textarea.input-group-addon,.input-group-lg>.input-group-btn>textarea.btn,select[multiple].input-lg,.form-horizontal .form-group-lg select[multiple].form-control,.input-group-lg>select[multiple].form-control,.input-group-lg>select[multiple].input-group-addon,.input-group-lg>.input-group-btn>select[multiple].btn{height:auto}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:25px;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center}.input-lg+.form-control-feedback,.form-horizontal .form-group-lg .form-control+.form-control-feedback,.input-group-lg>.form-control+.form-control-feedback,.input-group-lg>.input-group-addon+.form-control-feedback,.input-group-lg>.input-group-btn>.btn+.form-control-feedback{width:46px;height:46px;line-height:46px}.input-sm+.form-control-feedback,.form-horizontal .form-group-sm .form-control+.form-control-feedback,.input-group-sm>.form-control+.form-control-feedback,.input-group-sm>.input-group-addon+.form-control-feedback,.input-group-sm>.input-group-btn>.btn+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .help-block,.has-success .control-label,.has-success .radio,.has-success .checkbox,.has-success .radio-inline,.has-success .checkbox-inline{color:#3c763d}.has-success .form-control{border-color:#3c763d;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;border-color:#3c763d;background-color:#dff0d8}.has-success .form-control-feedback{color:#3c763d}.has-warning .help-block,.has-warning .control-label,.has-warning .radio,.has-warning .checkbox,.has-warning .radio-inline,.has-warning .checkbox-inline{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;border-color:#8a6d3b;background-color:#fcf8e3}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .help-block,.has-error .control-label,.has-error .radio,.has-error .checkbox,.has-error .radio-inline,.has-error .checkbox-inline{color:#a94442}.has-error .form-control{border-color:#a94442;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;border-color:#a94442;background-color:#f2dede}.has-error .form-control-feedback{color:#a94442}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}.form-horizontal .radio,.form-horizontal .checkbox,.form-horizontal .radio-inline,.form-horizontal .checkbox-inline{margin-top:0;margin-bottom:0;padding-top:7px}.form-horizontal .radio,.form-horizontal .checkbox{min-height:27px}.form-horizontal .form-group{margin-left:-15px;margin-right:-15px}.form-horizontal .form-group:before{content:" ";display:table}.form-horizontal .form-group:after{content:" ";display:table;clear:both}.form-horizontal .has-feedback .form-control-feedback{top:0;right:15px}.btn{display:inline-block;vertical-align:middle;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn:focus,.btn:active:focus,.btn.active:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:hover,.btn:focus{color:#333;text-decoration:none}.btn:active,.btn.active{outline:0;background-image:none;box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;pointer-events:none;opacity:.65;filter:alpha(opacity=65);box-shadow:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default:hover,.btn-default:focus,.btn-default:active,.btn-default.active,.open>.btn-default.dropdown-toggle{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default:active,.btn-default.active,.open>.btn-default.dropdown-toggle{background-image:none}.btn-default.disabled,.btn-default.disabled:hover,.btn-default.disabled:focus,.btn-default.disabled:active,.btn-default.disabled.active,.btn-default[disabled],.btn-default[disabled]:hover,.btn-default[disabled]:focus,.btn-default[disabled]:active,.btn-default[disabled].active,fieldset[disabled] .btn-default,fieldset[disabled] .btn-default:hover,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:active,fieldset[disabled] .btn-default.active{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#428bca;border-color:#357ebd}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.open>.btn-primary.dropdown-toggle{color:#fff;background-color:#3071a9;border-color:#285e8e}.btn-primary:active,.btn-primary.active,.open>.btn-primary.dropdown-toggle{background-image:none}.btn-primary.disabled,.btn-primary.disabled:hover,.btn-primary.disabled:focus,.btn-primary.disabled:active,.btn-primary.disabled.active,.btn-primary[disabled],.btn-primary[disabled]:hover,.btn-primary[disabled]:focus,.btn-primary[disabled]:active,.btn-primary[disabled].active,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-primary:hover,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:active,fieldset[disabled] .btn-primary.active{background-color:#428bca;border-color:#357ebd}.btn-primary .badge{color:#428bca;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.open>.btn-success.dropdown-toggle{color:#fff;background-color:#449d44;border-color:#398439}.btn-success:active,.btn-success.active,.open>.btn-success.dropdown-toggle{background-image:none}.btn-success.disabled,.btn-success.disabled:hover,.btn-success.disabled:focus,.btn-success.disabled:active,.btn-success.disabled.active,.btn-success[disabled],.btn-success[disabled]:hover,.btn-success[disabled]:focus,.btn-success[disabled]:active,.btn-success[disabled].active,fieldset[disabled] .btn-success,fieldset[disabled] .btn-success:hover,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:active,fieldset[disabled] .btn-success.active{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.open>.btn-info.dropdown-toggle{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info:active,.btn-info.active,.open>.btn-info.dropdown-toggle{background-image:none}.btn-info.disabled,.btn-info.disabled:hover,.btn-info.disabled:focus,.btn-info.disabled:active,.btn-info.disabled.active,.btn-info[disabled],.btn-info[disabled]:hover,.btn-info[disabled]:focus,.btn-info[disabled]:active,.btn-info[disabled].active,fieldset[disabled] .btn-info,fieldset[disabled] .btn-info:hover,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:active,fieldset[disabled] .btn-info.active{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.open>.btn-warning.dropdown-toggle{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning:active,.btn-warning.active,.open>.btn-warning.dropdown-toggle{background-image:none}.btn-warning.disabled,.btn-warning.disabled:hover,.btn-warning.disabled:focus,.btn-warning.disabled:active,.btn-warning.disabled.active,.btn-warning[disabled],.btn-warning[disabled]:hover,.btn-warning[disabled]:focus,.btn-warning[disabled]:active,.btn-warning[disabled].active,fieldset[disabled] .btn-warning,fieldset[disabled] .btn-warning:hover,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:active,fieldset[disabled] .btn-warning.active{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.open>.btn-danger.dropdown-toggle{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger:active,.btn-danger.active,.open>.btn-danger.dropdown-toggle{background-image:none}.btn-danger.disabled,.btn-danger.disabled:hover,.btn-danger.disabled:focus,.btn-danger.disabled:active,.btn-danger.disabled.active,.btn-danger[disabled],.btn-danger[disabled]:hover,.btn-danger[disabled]:focus,.btn-danger[disabled]:active,.btn-danger[disabled].active,fieldset[disabled] .btn-danger,fieldset[disabled] .btn-danger:hover,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:active,fieldset[disabled] .btn-danger.active{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{color:#428bca;font-weight:400;cursor:pointer;border-radius:0}.btn-link,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;box-shadow:none}.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active{border-color:transparent}.btn-link:hover,.btn-link:focus{color:#2a6496;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,.btn-link[disabled]:focus,fieldset[disabled] .btn-link:hover,fieldset[disabled] .btn-link:focus{color:#777;text-decoration:none}.btn-lg{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.btn-sm{padding:5px 10px}.btn-sm,.btn-xs{font-size:12px;line-height:1.5;border-radius:3px}.btn-xs{padding:1px 5px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;transition:height .35s ease}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*="col-"]{float:none;padding-left:0;padding-right:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon{white-space:nowrap}.input-group-addon,.input-group-btn{width:1%;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm,.form-horizontal .form-group-sm .input-group-addon.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.input-group-addon.btn{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg,.form-horizontal .form-group-lg .input-group-addon.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.input-group-addon.btn{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type="radio"],.input-group-addon input[type="checkbox"]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group-btn:last-child>.btn-group:not(:last-child)>.btn{border-bottom-right-radius:0;border-top-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:first-child>.btn-group:not(:first-child)>.btn{border-bottom-left-radius:0;border-top-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{font-size:0;white-space:nowrap}.input-group-btn,.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:hover,.input-group-btn>.btn:focus,.input-group-btn>.btn:active{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{margin-left:-1px}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;line-height:1.4285714;text-decoration:none;color:#428bca;background-color:#fff;border:1px solid #ddd;margin-left:-1px}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-bottom-left-radius:4px;border-top-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-bottom-right-radius:4px;border-top-right-radius:4px}.pagination>li>a:hover,.pagination>li>a:focus,.pagination>li>span:hover,.pagination>li>span:focus{color:#2a6496;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:hover,.pagination>.active>a:focus,.pagination>.active>span,.pagination>.active>span:hover,.pagination>.active>span:focus{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca;cursor:default}.pagination>.disabled>span,.pagination>.disabled>span:hover,.pagination>.disabled>span:focus,.pagination>.disabled>a,.pagination>.disabled>a:hover,.pagination>.disabled>a:focus{color:#777;background-color:#fff;border-color:#ddd;cursor:not-allowed}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-bottom-left-radius:6px;border-top-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-bottom-right-radius:6px;border-top-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-bottom-left-radius:3px;border-top-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-bottom-right-radius:3px;border-top-right-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;opacity:.5;filter:alpha(opacity=50)}button.close{padding:0;cursor:pointer;background:0 0;border:0;-webkit-appearance:none}.modal-open,.modal{overflow:hidden}.modal{display:none;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transform:translate3d(0,-25%,0);transform:translate3d(0,-25%,0);-webkit-transition:-webkit-transform .3s ease-out;transition:transform .3s ease-out}.modal.in .modal-dialog{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 3px 9px rgba(0,0,0,.5);background-clip:padding-box;outline:0}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0;filter:alpha(opacity=0)}.modal-backdrop.in{opacity:.5;filter:alpha(opacity=50)}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5;min-height:16.4285714px}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.4285714}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer:before,.modal-footer:after{content:" ";display:table}.modal-footer:after{clear:both}.modal-footer .btn+.btn{margin-left:5px;margin-bottom:0}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.clearfix:before,.clearfix:after{content:" ";display:table}.clearfix:after{clear:both}.center-block{display:block;margin-left:auto;margin-right:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important;visibility:hidden!important}.affix{position:fixed;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.hljs{display:block;overflow-x:auto;padding:.5em;background:#002b36;color:#839496;-webkit-text-size-adjust:none}.hljs-comment,.hljs-template_comment,.diff .hljs-header,.hljs-doctype,.hljs-pi,.lisp .hljs-string,.hljs-javadoc{color:#586e75}.hljs-keyword,.hljs-winutils,.method,.hljs-addition,.css .hljs-tag,.hljs-request,.hljs-status,.nginx .hljs-title{color:#859900}.hljs-number,.hljs-command,.hljs-string,.hljs-tag .hljs-value,.hljs-rules .hljs-value,.hljs-phpdoc,.hljs-dartdoc,.tex .hljs-formula,.hljs-regexp,.hljs-hexcolor,.hljs-link_url{color:#2aa198}.hljs-title,.hljs-localvars,.hljs-chunk,.hljs-decorator,.hljs-built_in,.hljs-identifier,.vhdl .hljs-literal,.hljs-id,.css .hljs-function{color:#268bd2}.hljs-attribute,.hljs-variable,.lisp .hljs-body,.smalltalk .hljs-number,.hljs-constant,.hljs-class .hljs-title,.hljs-parent,.hljs-type,.hljs-link_reference{color:#b58900}.hljs-preprocessor,.hljs-preprocessor .hljs-keyword,.hljs-pragma,.hljs-shebang,.hljs-symbol,.hljs-symbol .hljs-string,.diff .hljs-change,.hljs-special,.hljs-attr_selector,.hljs-subst,.hljs-cdata,.css .hljs-pseudo,.hljs-header{color:#cb4b16}.hljs-deletion,.hljs-important{color:#dc322f}.hljs-link_label{color:#6c71c4}.tex .hljs-formula{background:#073642}*,*:before,*:after{box-sizing:border-box}html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:0 0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}images{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd{font-size:1em}code,kbd,pre,samp{font-family:monospace,monospace}samp{font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}.debug{background-color:#ffc0cb!important}.ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ir{background-color:transparent;border:0;overflow:hidden}.ir::before{content:'';display:block;height:150%;width:0}html{font-size:.875em;background:#fafafa;color:#373D49}html,body{font-family:Georgia,Cambria,serif;height:100%}body{font-size:1rem;font-weight:400;line-height:2rem}ul,ol{margin-bottom:.83999rem;padding-top:.16001rem}li{-webkit-font-feature-settings:'kern' 1,'onum' 1,'liga' 1;-moz-font-feature-settings:'kern' 1,'onum' 1,'liga' 1;font-feature-settings:'kern' 1,'onum' 1,'liga' 1;margin-left:1rem}li>ul,li>ol{margin-bottom:0}p{padding-top:.66001rem;-webkit-font-feature-settings:'kern' 1,'onum' 1,'liga' 1;-moz-font-feature-settings:'kern' 1,'onum' 1,'liga' 1;font-feature-settings:'kern' 1,'onum' 1,'liga' 1;margin-top:0}p,pre{margin-bottom:1.33999rem}pre{font-size:1rem;padding:.66001rem 9.5px 9.5px;line-height:2rem;background:-webkit-linear-gradient(top,#fff 0,#fff .75rem,#f5f7fa .75rem,#f5f7fa 2.75rem,#fff 2.75rem,#fff 4rem);background:linear-gradient(to bottom,#fff 0,#fff .75rem,#f5f7fa .75rem,#f5f7fa 2.75rem,#fff 2.75rem,#fff 4rem);background-size:100% 4rem;border-color:#D3DAEA}blockquote{margin:0}blockquote p{font-size:1rem;margin-bottom:.33999rem;font-style:italic;padding:.66001rem 1rem 1rem;border-left:3px solid #A0AABF}th,td{padding:12px}h1,h2,h3,h4,h5,h6{font-family:"Source Sans Pro","Helvetica Neue",Helvetica,Arial,sans-serif;-webkit-font-feature-settings:'dlig' 1,'liga' 1,'lnum' 1,'kern' 1;-moz-font-feature-settings:'dlig' 1,'liga' 1,'lnum' 1,'kern' 1;font-feature-settings:'dlig' 1,'liga' 1,'lnum' 1,'kern' 1;font-style:normal;font-weight:600;margin-top:0}h1{line-height:3rem;font-size:2.0571429rem;margin-bottom:.21999rem;padding-top:.78001rem}h2{font-size:1.953125rem;margin-bottom:.1835837rem;padding-top:.8164163rem}h2,h3{line-height:3rem}h3{font-size:1.6457143rem;margin-bottom:.07599rem;padding-top:.92401rem}h4{font-size:1.5625rem;margin-bottom:.546865rem;padding-top:.453135rem}h5{font-size:1.25rem;margin-bottom:-.56251rem;padding-top:.56251rem}h6{font-size:1rem;margin-bottom:-.65001rem;padding-top:.65001rem}a{cursor:pointer;color:#35D7BB;text-decoration:none}a:hover,a:focus{border-bottom-color:#35D7BB;color:#dff9f4}img{height:auto;max-width:100%}.g{display:block}.g:after{clear:both;content:'';display:table}.g-b{float:left;margin:0;width:100%}.g{margin-left:-16px;margin-right:-16px}.g-b{padding-left:16px;padding-right:16px}.g-b--center{display:block;float:none;margin:0 auto}.g-b--right{float:right}.g-b--1of1{width:100%}.g-b--1of2,.g-b--2of4,.g-b--3of6,.g-b--4of8,.g-b--5of10,.g-b--6of12{width:50%}.g-b--1of3,.g-b--2of6,.g-b--4of12{width:33.333%}.g-b--2of3,.g-b--4of6,.g-b--8of12{width:66.666%}.g-b--1of4,.g-b--2of8,.g-b--3of12{width:25%}.g-b--3of4,.g-b--6of8,.g-b--9of12{width:75%}.g-b--1of5,.g-b--2of10{width:20%}.g-b--2of5,.g-b--4of10{width:40%}.g-b--3of5,.g-b--6of10{width:60%}.g-b--4of5,.g-b--8of10{width:80%}.g-b--1of6,.g-b--2of12{width:16.666%}.g-b--5of6,.g-b--10of12{width:83.333%}.g-b--1of8{width:12.5%}.g-b--3of8{width:37.5%}.g-b--5of8{width:62.5%}.g-b--7of8{width:87.5%}.g-b--1of10{width:10%}.g-b--3of10{width:30%}.g-b--7of10{width:70%}.g-b--9of10{width:90%}.g-b--1of12{width:8.333%}.g-b--5of12{width:41.666%}.g-b--7of12{width:58.333%}.g-b--11of12{width:91.666%}.g-b--push--1of1{margin-left:100%}.g-b--push--1of2,.g-b--push--2of4,.g-b--push--3of6,.g-b--push--4of8,.g-b--push--5of10,.g-b--push--6of12{margin-left:50%}.g-b--push--1of3,.g-b--push--2of6,.g-b--push--4of12{margin-left:33.333%}.g-b--push--2of3,.g-b--push--4of6,.g-b--push--8of12{margin-left:66.666%}.g-b--push--1of4,.g-b--push--2of8,.g-b--push--3of12{margin-left:25%}.g-b--push--3of4,.g-b--push--6of8,.g-b--push--9of12{margin-left:75%}.g-b--push--1of5,.g-b--push--2of10{margin-left:20%}.g-b--push--2of5,.g-b--push--4of10{margin-left:40%}.g-b--push--3of5,.g-b--push--6of10{margin-left:60%}.g-b--push--4of5,.g-b--push--8of10{margin-left:80%}.g-b--push--1of6,.g-b--push--2of12{margin-left:16.666%}.g-b--push--5of6,.g-b--push--10of12{margin-left:83.333%}.g-b--push--1of8{margin-left:12.5%}.g-b--push--3of8{margin-left:37.5%}.g-b--push--5of8{margin-left:62.5%}.g-b--push--7of8{margin-left:87.5%}.g-b--push--1of10{margin-left:10%}.g-b--push--3of10{margin-left:30%}.g-b--push--7of10{margin-left:70%}.g-b--push--9of10{margin-left:90%}.g-b--push--1of12{margin-left:8.333%}.g-b--push--5of12{margin-left:41.666%}.g-b--push--7of12{margin-left:58.333%}.g-b--push--11of12{margin-left:91.666%}.g-b--pull--1of1{margin-right:100%}.g-b--pull--1of2,.g-b--pull--2of4,.g-b--pull--3of6,.g-b--pull--4of8,.g-b--pull--5of10,.g-b--pull--6of12{margin-right:50%}.g-b--pull--1of3,.g-b--pull--2of6,.g-b--pull--4of12{margin-right:33.333%}.g-b--pull--2of3,.g-b--pull--4of6,.g-b--pull--8of12{margin-right:66.666%}.g-b--pull--1of4,.g-b--pull--2of8,.g-b--pull--3of12{margin-right:25%}.g-b--pull--3of4,.g-b--pull--6of8,.g-b--pull--9of12{margin-right:75%}.g-b--pull--1of5,.g-b--pull--2of10{margin-right:20%}.g-b--pull--2of5,.g-b--pull--4of10{margin-right:40%}.g-b--pull--3of5,.g-b--pull--6of10{margin-right:60%}.g-b--pull--4of5,.g-b--pull--8of10{margin-right:80%}.g-b--pull--1of6,.g-b--pull--2of12{margin-right:16.666%}.g-b--pull--5of6,.g-b--pull--10of12{margin-right:83.333%}.g-b--pull--1of8{margin-right:12.5%}.g-b--pull--3of8{margin-right:37.5%}.g-b--pull--5of8{margin-right:62.5%}.g-b--pull--7of8{margin-right:87.5%}.g-b--pull--1of10{margin-right:10%}.g-b--pull--3of10{margin-right:30%}.g-b--pull--7of10{margin-right:70%}.g-b--pull--9of10{margin-right:90%}.g-b--pull--1of12{margin-right:8.333%}.g-b--pull--5of12{margin-right:41.666%}.g-b--pull--7of12{margin-right:58.333%}.g-b--pull--11of12{margin-right:91.666%}.splashscreen{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#373D49;z-index:22}.splashscreen-dillinger{width:260px;height:auto;display:block;margin:0 auto;padding-bottom:3rem}.splashscreen p{font-size:1.25rem;padding-top:.56251rem;font-family:"Source Sans Pro","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;text-align:center;max-width:500px;margin:0 auto;color:#FFF}.sp-center{position:relative;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);top:50%}.open-menu>.wrapper{overflow-x:hidden}.page{margin:0 auto;position:relative;top:0;left:0;width:100%;height:100%;z-index:2;-webkit-transition:all .25s ease-in-out;transition:all .25s ease-in-out;background-color:#fff;padding-top:51px;will-change:left}.open-menu .page{left:270px}.title{line-height:1rem;font-size:.8rem;margin-bottom:.77999rem;padding-top:.22001rem;font-weight:500;color:#A0AABF;letter-spacing:1px;text-transform:uppercase;padding-left:16px;padding-right:16px;margin-top:1rem}.split-preview .title{padding-left:0}.title-document{line-height:1rem;font-size:1.25rem;margin-bottom:.89999rem;padding-top:.10001rem;font-weight:400;font-family:"Ubuntu Mono",Monaco;color:#373D49;padding-left:16px;padding-right:16px;width:80%;min-width:300px;outline:0;border:none}.icon{display:block;margin:0 auto;width:36px;height:36px;border-radius:3px;text-align:center}.icon svg{display:inline-block;margin-left:auto;margin-right:auto}.icon-preview{background-color:#373D49;line-height:40px}.icon-preview svg{width:19px;height:12px}.icon-settings{background-color:#373D49;line-height:44px}.icon-settings svg{width:18px;height:18px}.icon-link{width:16px;height:16px;line-height:1;margin-right:24px;text-align:right}.navbar{background-color:#373D49;height:51px;width:100%;position:fixed;top:0;left:0;z-index:6;-webkit-transition:all .25s ease-in-out;transition:all .25s ease-in-out;will-change:left}.navbar:after{content:"";display:table;clear:both}.open-menu .navbar{left:270px}.navbar-brand{float:left;margin:0 0 0 24px;padding:0;line-height:42px}.navbar-brand svg{width:85px;height:11px}.nav-left{float:left}.nav-right{float:right}.nav-sidebar{width:100%}.menu{list-style:none;margin:0;padding:0}.menu a{border:0;color:#A0AABF;font-family:"Source Sans Pro","Helvetica Neue",Helvetica,Arial,sans-serif;outline:none;text-transform:uppercase}.menu a:hover{color:#35D7BB}.menu .menu-item{border:0;display:none;float:left;margin:0;position:relative}.menu .menu-item>a{display:block;font-size:12px;height:51px;letter-spacing:1px;line-height:51px;padding:0 24px}.menu .menu-item--settings,.menu .menu-item--preview,.menu .menu-item--save-to.in-sidebar,.menu .menu-item--import-from.in-sidebar,.menu .menu-item--link-unlink.in-sidebar,.menu .menu-item--documents.in-sidebar{display:block}.menu .menu-item--documents{padding-bottom:1rem}.menu .menu-item.open>a{background-color:#1D212A}.menu .menu-item-icon>a{height:auto;padding:0}.menu .menu-item-icon:hover>a{background-color:transparent}.menu .menu-link.open i{background-color:#1D212A}.menu .menu-link.open g{fill:#35D7BB}.menu .menu-link-preview,.menu .menu-link-settings{margin-top:8px;width:51px}.menu-sidebar{width:100%}.menu-sidebar .menu-item{float:none;margin-bottom:1px;width:100%}.menu-sidebar .menu-item.open>a{background-color:#373D49}.menu-sidebar .open .caret{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.menu-sidebar>.menu-item:hover .dropdown a,.menu-sidebar>.menu-item:hover .settings a{background-color:transparent}.menu-sidebar .menu-link{background-color:#373D49;font-weight:600}.menu-sidebar .menu-link:after{content:"";display:table;clear:both}.menu-sidebar .menu-link>span{float:left}.menu-sidebar .menu-link>.caret{float:right;text-align:right;top:22px}.menu-sidebar .dropdown,.menu-sidebar .settings{background-color:transparent;position:static;width:100%}.dropdown{position:absolute;right:0;top:51px;width:188px}.dropdown,.settings{display:none;background-color:#1D212A}.dropdown{padding:0}.dropdown,.settings,.sidebar-list{list-style:none;margin:0}.sidebar-list{padding:0}.dropdown li{margin:32px 0;padding:0 0 0 32px}.dropdown li,.settings li{line-height:1}.sidebar-list li{line-height:1;margin:32px 0;padding:0 0 0 32px}.dropdown a{color:#D0D6E2}.dropdown a,.settings a,.sidebar-list a{display:block;text-transform:none}.sidebar-list a{color:#D0D6E2}.dropdown a:after,.settings a:after,.sidebar-list a:after{content:"";display:table;clear:both}.dropdown .icon,.settings .icon,.sidebar-list .icon{float:right}.open .dropdown,.open .settings,.open .sidebar-list{display:block}.open .dropdown.collapse,.open .collapse.settings,.open .sidebar-list.collapse{display:none}.open .dropdown.collapse.in,.open .collapse.in.settings,.open .sidebar-list.collapse.in{display:block}.dropdown .unlinked .icon,.settings .unlinked .icon,.sidebar-list .unlinked .icon{opacity:.3}.dropdown.documents li,.documents.settings li,.sidebar-list.documents li{background-image:url("../img/icons/file.svg");background-position:240px center;background-repeat:no-repeat;background-size:14px 16px;padding:3px 32px}.dropdown.documents li.octocat,.documents.settings li.octocat,.sidebar-list.documents li.octocat{background-image:url("../img/icons/octocat.svg");background-position:234px center;background-size:24px 24px}.dropdown.documents li:last-child,.documents.settings li:last-child,.sidebar-list.documents li:last-child{margin-bottom:1rem}.dropdown.documents li.active a,.documents.settings li.active a,.sidebar-list.documents li.active a{color:#35D7BB}.settings{position:fixed;top:67px;right:16px;border-radius:3px;width:288px;background-color:#373D49;padding:16px;z-index:7}.show-settings .settings{display:block}.settings .has-checkbox{float:left}.settings a{font-size:1.25rem;font-family:"Source Sans Pro","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;-webkit-font-smoothing:antialiased;line-height:28px;color:#D0D6E2}.settings a:after{content:"";display:table;clear:both}.settings a:hover{color:#35D7BB}.settings li{border-bottom:1px solid #4F535B;margin:0;padding:16px 0}.settings li:last-child{border-bottom:none}.brand{border:none;display:block}.brand:hover g{fill:#35D7BB}.toggle{display:block;float:left;height:16px;padding:25px 16px 26px;width:40px}.toggle span:after,.toggle span:before{content:'';left:0;position:absolute;top:-6px}.toggle span:after{top:6px}.toggle span{display:block;position:relative}.toggle span,.toggle span:after,.toggle span:before{-webkit-backface-visibility:hidden;backface-visibility:hidden;background-color:#D3DAEA;height:2px;-webkit-transition:all .3s;transition:all .3s;width:20px}.open-menu .toggle span{background-color:transparent}.open-menu .toggle span:before{-webkit-transform:rotate(45deg)translate(3px,3px);-ms-transform:rotate(45deg)translate(3px,3px);transform:rotate(45deg)translate(3px,3px)}.open-menu .toggle span:after{-webkit-transform:rotate(-45deg)translate(5px,-6px);-ms-transform:rotate(-45deg)translate(5px,-6px);transform:rotate(-45deg)translate(5px,-6px)}.caret{display:inline-block;width:0;height:0;margin-left:6px;vertical-align:middle;position:relative;top:-1px;border-top:4px solid;border-right:4px solid transparent;border-left:4px solid transparent}.sidebar{overflow:auto;height:100%;padding-right:15px;padding-bottom:15px;width:285px}.sidebar-wrapper{-webkit-overflow-scrolling:touch;background-color:#2B2F36;left:0;height:100%;overflow-y:hidden;position:fixed;top:0;width:285px;z-index:1}.sidebar-branding{width:160px;padding:0;margin:16px auto}.header{border-bottom:1px solid #E8E8E8;position:relative}.words{line-height:1rem;font-size:.8rem;margin-bottom:.77999rem;padding-top:.22001rem;font-weight:500;font-family:"Source Sans Pro","Helvetica Neue",Helvetica,Arial,sans-serif;color:#A0AABF;letter-spacing:1px;text-transform:uppercase;z-index:5;position:absolute;right:16px;top:0}.words span{color:#000}.btn{text-align:center;display:inline-block;width:100%;text-transform:uppercase;font-weight:600;font-family:"Source Sans Pro","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;text-shadow:0 1px 0 #1b8b77;padding:16px 24px;background-color:#35D7BB;border-radius:3px;margin:0 auto 16px;line-height:1;color:#fff;-webkit-transition:all .15s linear;transition:all .15s linear;-webkit-font-smoothing:antialiased}.btn--new,.btn--save{display:block;width:238px}.btn--new:hover,.btn--new:focus,.btn--save:hover,.btn--save:focus{color:#fff;border-bottom-color:transparent;box-shadow:0 1px 3px #24b59c;text-shadow:0 1px 0 #24b59c}.btn--save{background-color:#4A5261;text-shadow:0 1px 1px #1e2127}.btn--save:hover,.btn--save:focus{color:#fff;border-bottom-color:transparent;box-shadow:0 1px 5px #08090a;text-shadow:none}.btn--delete{display:block;width:238px;background-color:transparent;font-size:12px;text-shadow:none}.btn--delete:hover,.btn--delete:focus{color:#fff;border-bottom-color:transparent;text-shadow:0 1px 0 #08090a;opacity:.8}.btn--ok,.btn--close{border-top:0;background-color:#4A5261;text-shadow:0 1px 0 #08090a;margin:0}.btn--ok:hover,.btn--ok:focus,.btn--close:hover,.btn--close:focus{color:#fff;background-color:#292d36;text-shadow:none}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(55,61,73,.8);-webkit-transition:all .25s ease-in-out;transition:all .25s ease-in-out;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out;will-change:left,opacity,visibility;z-index:5;opacity:0;visibility:hidden}.show-settings .overlay{visibility:visible;opacity:1}.switch{float:right;line-height:1}.switch input{display:none}.switch small{display:inline-block;cursor:pointer;padding:0 24px 0 0;-webkit-transition:all ease .2s;transition:all ease .2s;background-color:#2B2F36;border-color:#2B2F36}.switch small,.switch small:before{border-radius:30px;box-shadow:inset 0 0 2px 0 #14171F}.switch small:before{display:block;content:'';width:28px;height:28px;background:#fff}.switch.checked small{padding-right:0;padding-left:24px;background-color:#35D7BB;box-shadow:none}.modal--dillinger.about .modal-dialog{font-size:1.25rem;max-width:500px}.modal--dillinger .modal-dialog{max-width:600px;width:auto;margin:5rem auto}.modal--dillinger .modal-content{background:#373D49;border-radius:3px;box-shadow:0 2px 5px 0 #2C3B59;color:#fff;font-family:"Source Sans Pro","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;padding:2rem}.modal--dillinger ul{list-style-type:disc;margin:1rem 0;padding:0 0 0 1rem}.modal--dillinger li{padding:0;margin:0}.modal--dillinger .modal-header{border:0;padding:0}.modal--dillinger .modal-body{padding:0}.modal--dillinger .modal-footer{border:0;padding:0}.modal--dillinger .close{color:#fff;opacity:1}.modal-backdrop{background-color:#373D49}.pagination--dillinger{padding:0!important;margin:1.5rem 0!important;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-align-content:stretch;-ms-flex-line-pack:stretch;align-content:stretch}.pagination--dillinger,.pagination--dillinger li{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.pagination--dillinger li{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;text-align:center}.pagination--dillinger li:first-child>a,.pagination--dillinger li.disabled>a,.pagination--dillinger li.disabled>a:hover,.pagination--dillinger li.disabled>a:focus,.pagination--dillinger li>a{background-color:transparent;border-color:#4F535B;border-right-color:transparent}.pagination--dillinger li.active>a,.pagination--dillinger li.active>a:hover,.pagination--dillinger li.active>a:focus{border-color:#4A5261;background-color:#4A5261;color:#fff}.pagination--dillinger li>a{float:none;color:#fff;width:100%;display:block;text-align:center;margin:0;border-right-color:transparent;padding:6px}.pagination--dillinger li>a:hover,.pagination--dillinger li>a:focus{border-color:#35D7BB;background-color:#35D7BB;color:#fff}.pagination--dillinger li:last-child a{border-color:#4F535B}.pagination--dillinger li:first-child a{border-right-color:transparent}.diNotify{position:absolute;z-index:9999;left:0;right:0;top:0;margin:0 auto;max-width:400px;text-align:center;-webkit-transition:top .5s ease-in-out,opacity .5s ease-in-out;transition:top .5s ease-in-out,opacity .5s ease-in-out;visibility:hidden}.diNotify-body{-webkit-font-smoothing:antialiased;background-color:#35D7BB;background:#666E7F;border-radius:3px;color:#fff;font-family:"Source Sans Pro","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;overflow:hidden;padding:1rem 2rem .5rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:baseline;-webkit-align-items:baseline;-ms-flex-align:baseline;align-items:baseline;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.diNotify-icon{display:block;width:16px;height:16px;line-height:16px;position:relative;top:3px}.diNotify-message{padding-left:1rem}.zen-wrapper{position:fixed;top:0;left:0;right:0;bottom:0;width:100%;height:100%;z-index:10;background-color:#FFF;opacity:0;-webkit-transition:opacity .25s ease-in-out;transition:opacity .25s ease-in-out}.zen-wrapper.on{opacity:1}.enter-zen-mode{background-image:url("../img/icons/enter-zen.svg");right:.5rem;top:.5rem;display:none}.enter-zen-mode,.close-zen-mode{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0;background-repeat:no-repeat;width:32px;height:32px;display:block;position:absolute}.close-zen-mode{background-image:url("../img/icons/exit-zen.svg");right:1rem;top:1rem}.zen-page{position:relative;top:0;bottom:0;z-index:11;height:100%;width:100%}#zen{font-size:1.25rem;width:300px;height:80%;margin:0 auto;position:relative;top:10%}#zen:before,#zen:after{content:"";position:absolute;height:10%;width:100%;z-index:12;pointer-events:none}.split{overflow:scroll;padding:0!important}.split-editor{padding-left:0;padding-right:0;position:relative}.show-preview .split-editor{display:none}.split-preview{background-color:#fff;display:none;top:0;position:relative;z-index:4}.show-preview .split-preview{display:block}#editor{font-size:1rem;font-family:"Ubuntu Mono",Monaco;font-weight:400;line-height:2rem;width:100%;height:100%}#editor .ace_gutter{-webkit-font-smoothing:antialiased}#preview a{color:#A0AABF;text-decoration:underline}.sr-only{visibility:hidden;text-overflow:110%;overflow:hidden;top:-100px;position:absolute}.mnone{margin:0!important}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn,.form-inline .input-group .form-control{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .radio,.form-inline .checkbox{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .radio label,.form-inline .checkbox label{padding-left:0}.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}.form-horizontal .control-label{text-align:right;margin-bottom:0;padding-top:7px}.form-horizontal .form-group-lg .control-label{padding-top:14.3px}.form-horizontal .form-group-sm .control-label{padding-top:6px}.modal-dialog{width:600px;margin:30px auto}.modal-content{box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}@media screen and (min-width:27.5em){html{font-size:.875em}body{font-size:1rem}ul,ol{margin-bottom:.83999rem;padding-top:.16001rem}p{padding-top:.66001rem}p,pre{margin-bottom:1.33999rem}pre,blockquote p{font-size:1rem;padding-top:.66001rem}blockquote p{margin-bottom:.33999rem}h1{font-size:2.0571429rem;margin-bottom:.21999rem;padding-top:.78001rem}h2{font-size:1.953125rem;margin-bottom:.1835837rem;padding-top:.8164163rem}h3{font-size:1.6457143rem;margin-bottom:.07599rem;padding-top:.92401rem}h4{font-size:1.5625rem;margin-bottom:.546865rem;padding-top:.453135rem}h5{font-size:1.25rem;margin-bottom:-.56251rem;padding-top:.56251rem}h6{font-size:1rem;margin-bottom:-.65001rem;padding-top:.65001rem}.g{margin-left:-16px;margin-right:-16px}.g-b{padding-left:16px;padding-right:16px}.g-b--m1of1{width:100%}.g-b--m1of2,.g-b--m2of4,.g-b--m3of6,.g-b--m4of8,.g-b--m5of10,.g-b--m6of12{width:50%}.g-b--m1of3,.g-b--m2of6,.g-b--m4of12{width:33.333%}.g-b--m2of3,.g-b--m4of6,.g-b--m8of12{width:66.666%}.g-b--m1of4,.g-b--m2of8,.g-b--m3of12{width:25%}.g-b--m3of4,.g-b--m6of8,.g-b--m9of12{width:75%}.g-b--m1of5,.g-b--m2of10{width:20%}.g-b--m2of5,.g-b--m4of10{width:40%}.g-b--m3of5,.g-b--m6of10{width:60%}.g-b--m4of5,.g-b--m8of10{width:80%}.g-b--m1of6,.g-b--m2of12{width:16.666%}.g-b--m5of6,.g-b--m10of12{width:83.333%}.g-b--m1of8{width:12.5%}.g-b--m3of8{width:37.5%}.g-b--m5of8{width:62.5%}.g-b--m7of8{width:87.5%}.g-b--m1of10{width:10%}.g-b--m3of10{width:30%}.g-b--m7of10{width:70%}.g-b--m9of10{width:90%}.g-b--m1of12{width:8.333%}.g-b--m5of12{width:41.666%}.g-b--m7of12{width:58.333%}.g-b--m11of12{width:91.666%}.g-b--push--m1of1{margin-left:100%}.g-b--push--m1of2,.g-b--push--m2of4,.g-b--push--m3of6,.g-b--push--m4of8,.g-b--push--m5of10,.g-b--push--m6of12{margin-left:50%}.g-b--push--m1of3,.g-b--push--m2of6,.g-b--push--m4of12{margin-left:33.333%}.g-b--push--m2of3,.g-b--push--m4of6,.g-b--push--m8of12{margin-left:66.666%}.g-b--push--m1of4,.g-b--push--m2of8,.g-b--push--m3of12{margin-left:25%}.g-b--push--m3of4,.g-b--push--m6of8,.g-b--push--m9of12{margin-left:75%}.g-b--push--m1of5,.g-b--push--m2of10{margin-left:20%}.g-b--push--m2of5,.g-b--push--m4of10{margin-left:40%}.g-b--push--m3of5,.g-b--push--m6of10{margin-left:60%}.g-b--push--m4of5,.g-b--push--m8of10{margin-left:80%}.g-b--push--m1of6,.g-b--push--m2of12{margin-left:16.666%}.g-b--push--m5of6,.g-b--push--m10of12{margin-left:83.333%}.g-b--push--m1of8{margin-left:12.5%}.g-b--push--m3of8{margin-left:37.5%}.g-b--push--m5of8{margin-left:62.5%}.g-b--push--m7of8{margin-left:87.5%}.g-b--push--m1of10{margin-left:10%}.g-b--push--m3of10{margin-left:30%}.g-b--push--m7of10{margin-left:70%}.g-b--push--m9of10{margin-left:90%}.g-b--push--m1of12{margin-left:8.333%}.g-b--push--m5of12{margin-left:41.666%}.g-b--push--m7of12{margin-left:58.333%}.g-b--push--m11of12{margin-left:91.666%}.g-b--pull--m1of1{margin-right:100%}.g-b--pull--m1of2,.g-b--pull--m2of4,.g-b--pull--m3of6,.g-b--pull--m4of8,.g-b--pull--m5of10,.g-b--pull--m6of12{margin-right:50%}.g-b--pull--m1of3,.g-b--pull--m2of6,.g-b--pull--m4of12{margin-right:33.333%}.g-b--pull--m2of3,.g-b--pull--m4of6,.g-b--pull--m8of12{margin-right:66.666%}.g-b--pull--m1of4,.g-b--pull--m2of8,.g-b--pull--m3of12{margin-right:25%}.g-b--pull--m3of4,.g-b--pull--m6of8,.g-b--pull--m9of12{margin-right:75%}.g-b--pull--m1of5,.g-b--pull--m2of10{margin-right:20%}.g-b--pull--m2of5,.g-b--pull--m4of10{margin-right:40%}.g-b--pull--m3of5,.g-b--pull--m6of10{margin-right:60%}.g-b--pull--m4of5,.g-b--pull--m8of10{margin-right:80%}.g-b--pull--m1of6,.g-b--pull--m2of12{margin-right:16.666%}.g-b--pull--m5of6,.g-b--pull--m10of12{margin-right:83.333%}.g-b--pull--m1of8{margin-right:12.5%}.g-b--pull--m3of8{margin-right:37.5%}.g-b--pull--m5of8{margin-right:62.5%}.g-b--pull--m7of8{margin-right:87.5%}.g-b--pull--m1of10{margin-right:10%}.g-b--pull--m3of10{margin-right:30%}.g-b--pull--m7of10{margin-right:70%}.g-b--pull--m9of10{margin-right:90%}.g-b--pull--m1of12{margin-right:8.333%}.g-b--pull--m5of12{margin-right:41.666%}.g-b--pull--m7of12{margin-right:58.333%}.g-b--pull--m11of12{margin-right:91.666%}.splashscreen p{font-size:1.25rem;margin-bottom:1.43749rem;padding-top:.56251rem}.title{font-size:.8rem;margin-bottom:.77999rem;padding-top:.22001rem}.title-document{margin-bottom:.89999rem;padding-top:.10001rem}.title-document,.settings a{font-size:1.25rem}.words{font-size:.8rem;margin-bottom:.77999rem;padding-top:.22001rem}.modal--dillinger.about .modal-dialog,#zen{font-size:1.25rem}#zen{width:400px}#editor{font-size:1rem}}@media screen and (min-width:46.25em){html{font-size:.875em}body{font-size:1rem}ul,ol{margin-bottom:.83999rem;padding-top:.16001rem}p{padding-top:.66001rem}p,pre{margin-bottom:1.33999rem}pre,blockquote p{font-size:1rem;padding-top:.66001rem}blockquote p{margin-bottom:.33999rem}h1{font-size:2.0571429rem;margin-bottom:.21999rem;padding-top:.78001rem}h2{font-size:1.953125rem;margin-bottom:.1835837rem;padding-top:.8164163rem}h3{font-size:1.6457143rem;margin-bottom:.07599rem;padding-top:.92401rem}h4{font-size:1.5625rem;margin-bottom:.546865rem;padding-top:.453135rem}h5{font-size:1.25rem;margin-bottom:-.56251rem;padding-top:.56251rem}h6{font-size:1rem;margin-bottom:-.65001rem;padding-top:.65001rem}.g{margin-left:-16px;margin-right:-16px}.g-b{padding-left:16px;padding-right:16px}.g-b--t1of1{width:100%}.g-b--t1of2,.g-b--t2of4,.g-b--t3of6,.g-b--t4of8,.g-b--t5of10,.g-b--t6of12{width:50%}.g-b--t1of3,.g-b--t2of6,.g-b--t4of12{width:33.333%}.g-b--t2of3,.g-b--t4of6,.g-b--t8of12{width:66.666%}.g-b--t1of4,.g-b--t2of8,.g-b--t3of12{width:25%}.g-b--t3of4,.g-b--t6of8,.g-b--t9of12{width:75%}.g-b--t1of5,.g-b--t2of10{width:20%}.g-b--t2of5,.g-b--t4of10{width:40%}.g-b--t3of5,.g-b--t6of10{width:60%}.g-b--t4of5,.g-b--t8of10{width:80%}.g-b--t1of6,.g-b--t2of12{width:16.666%}.g-b--t5of6,.g-b--t10of12{width:83.333%}.g-b--t1of8{width:12.5%}.g-b--t3of8{width:37.5%}.g-b--t5of8{width:62.5%}.g-b--t7of8{width:87.5%}.g-b--t1of10{width:10%}.g-b--t3of10{width:30%}.g-b--t7of10{width:70%}.g-b--t9of10{width:90%}.g-b--t1of12{width:8.333%}.g-b--t5of12{width:41.666%}.g-b--t7of12{width:58.333%}.g-b--t11of12{width:91.666%}.g-b--push--t1of1{margin-left:100%}.g-b--push--t1of2,.g-b--push--t2of4,.g-b--push--t3of6,.g-b--push--t4of8,.g-b--push--t5of10,.g-b--push--t6of12{margin-left:50%}.g-b--push--t1of3,.g-b--push--t2of6,.g-b--push--t4of12{margin-left:33.333%}.g-b--push--t2of3,.g-b--push--t4of6,.g-b--push--t8of12{margin-left:66.666%}.g-b--push--t1of4,.g-b--push--t2of8,.g-b--push--t3of12{margin-left:25%}.g-b--push--t3of4,.g-b--push--t6of8,.g-b--push--t9of12{margin-left:75%}.g-b--push--t1of5,.g-b--push--t2of10{margin-left:20%}.g-b--push--t2of5,.g-b--push--t4of10{margin-left:40%}.g-b--push--t3of5,.g-b--push--t6of10{margin-left:60%}.g-b--push--t4of5,.g-b--push--t8of10{margin-left:80%}.g-b--push--t1of6,.g-b--push--t2of12{margin-left:16.666%}.g-b--push--t5of6,.g-b--push--t10of12{margin-left:83.333%}.g-b--push--t1of8{margin-left:12.5%}.g-b--push--t3of8{margin-left:37.5%}.g-b--push--t5of8{margin-left:62.5%}.g-b--push--t7of8{margin-left:87.5%}.g-b--push--t1of10{margin-left:10%}.g-b--push--t3of10{margin-left:30%}.g-b--push--t7of10{margin-left:70%}.g-b--push--t9of10{margin-left:90%}.g-b--push--t1of12{margin-left:8.333%}.g-b--push--t5of12{margin-left:41.666%}.g-b--push--t7of12{margin-left:58.333%}.g-b--push--t11of12{margin-left:91.666%}.g-b--pull--t1of1{margin-right:100%}.g-b--pull--t1of2,.g-b--pull--t2of4,.g-b--pull--t3of6,.g-b--pull--t4of8,.g-b--pull--t5of10,.g-b--pull--t6of12{margin-right:50%}.g-b--pull--t1of3,.g-b--pull--t2of6,.g-b--pull--t4of12{margin-right:33.333%}.g-b--pull--t2of3,.g-b--pull--t4of6,.g-b--pull--t8of12{margin-right:66.666%}.g-b--pull--t1of4,.g-b--pull--t2of8,.g-b--pull--t3of12{margin-right:25%}.g-b--pull--t3of4,.g-b--pull--t6of8,.g-b--pull--t9of12{margin-right:75%}.g-b--pull--t1of5,.g-b--pull--t2of10{margin-right:20%}.g-b--pull--t2of5,.g-b--pull--t4of10{margin-right:40%}.g-b--pull--t3of5,.g-b--pull--t6of10{margin-right:60%}.g-b--pull--t4of5,.g-b--pull--t8of10{margin-right:80%}.g-b--pull--t1of6,.g-b--pull--t2of12{margin-right:16.666%}.g-b--pull--t5of6,.g-b--pull--t10of12{margin-right:83.333%}.g-b--pull--t1of8{margin-right:12.5%}.g-b--pull--t3of8{margin-right:37.5%}.g-b--pull--t5of8{margin-right:62.5%}.g-b--pull--t7of8{margin-right:87.5%}.g-b--pull--t1of10{margin-right:10%}.g-b--pull--t3of10{margin-right:30%}.g-b--pull--t7of10{margin-right:70%}.g-b--pull--t9of10{margin-right:90%}.g-b--pull--t1of12{margin-right:8.333%}.g-b--pull--t5of12{margin-right:41.666%}.g-b--pull--t7of12{margin-right:58.333%}.g-b--pull--t11of12{margin-right:91.666%}.splashscreen-dillinger{width:500px}.splashscreen p{font-size:1.25rem;margin-bottom:1.43749rem;padding-top:.56251rem}.title{font-size:.8rem;margin-bottom:.77999rem;padding-top:.22001rem}.title-document{font-size:1.25rem;margin-bottom:.89999rem;padding-top:.10001rem}.menu .menu-item--save-to,.menu .menu-item--import-from{display:block}.menu .menu-item--preview,.menu .menu-item--save-to.in-sidebar,.menu .menu-item--import-from.in-sidebar{display:none}.settings a{font-size:1.25rem}.words{font-size:.8rem;margin-bottom:.77999rem;padding-top:.22001rem}.modal--dillinger.about .modal-dialog{font-size:1.25rem}.enter-zen-mode{display:block}.close-zen-mode{right:3rem;top:3rem}#zen{font-size:1.25rem;width:500px}.split-editor{border-right:1px solid #E8E8E8;float:left;height:calc(100vh - 130px);-webkit-overflow-scrolling:touch;padding-right:16px;width:50%}.show-preview .split-editor{display:block}.split-preview{display:block;float:right;height:calc(100vh - 130px);-webkit-overflow-scrolling:touch;position:relative;top:0;width:50%}#editor{font-size:1rem}}@media screen and (min-width:62.5em){html{font-size:.875em}body{font-size:1rem}ul,ol{margin-bottom:.83999rem;padding-top:.16001rem}p{padding-top:.66001rem}p,pre{margin-bottom:1.33999rem}pre,blockquote p{font-size:1rem;padding-top:.66001rem}blockquote p{margin-bottom:.33999rem}h1{font-size:2.0571429rem;margin-bottom:.21999rem;padding-top:.78001rem}h2{font-size:1.953125rem;margin-bottom:.1835837rem;padding-top:.8164163rem}h3{font-size:1.6457143rem;margin-bottom:.07599rem;padding-top:.92401rem}h4{font-size:1.5625rem;margin-bottom:.546865rem;padding-top:.453135rem}h5{font-size:1.25rem;margin-bottom:-.56251rem;padding-top:.56251rem}h6{font-size:1rem;margin-bottom:-.65001rem;padding-top:.65001rem}.g{margin-left:-16px;margin-right:-16px}.g-b{padding-left:16px;padding-right:16px}.g-b--d1of1{width:100%}.g-b--d1of2,.g-b--d2of4,.g-b--d3of6,.g-b--d4of8,.g-b--d5of10,.g-b--d6of12{width:50%}.g-b--d1of3,.g-b--d2of6,.g-b--d4of12{width:33.333%}.g-b--d2of3,.g-b--d4of6,.g-b--d8of12{width:66.666%}.g-b--d1of4,.g-b--d2of8,.g-b--d3of12{width:25%}.g-b--d3of4,.g-b--d6of8,.g-b--d9of12{width:75%}.g-b--d1of5,.g-b--d2of10{width:20%}.g-b--d2of5,.g-b--d4of10{width:40%}.g-b--d3of5,.g-b--d6of10{width:60%}.g-b--d4of5,.g-b--d8of10{width:80%}.g-b--d1of6,.g-b--d2of12{width:16.666%}.g-b--d5of6,.g-b--d10of12{width:83.333%}.g-b--d1of8{width:12.5%}.g-b--d3of8{width:37.5%}.g-b--d5of8{width:62.5%}.g-b--d7of8{width:87.5%}.g-b--d1of10{width:10%}.g-b--d3of10{width:30%}.g-b--d7of10{width:70%}.g-b--d9of10{width:90%}.g-b--d1of12{width:8.333%}.g-b--d5of12{width:41.666%}.g-b--d7of12{width:58.333%}.g-b--d11of12{width:91.666%}.g-b--push--d1of1{margin-left:100%}.g-b--push--d1of2,.g-b--push--d2of4,.g-b--push--d3of6,.g-b--push--d4of8,.g-b--push--d5of10,.g-b--push--d6of12{margin-left:50%}.g-b--push--d1of3,.g-b--push--d2of6,.g-b--push--d4of12{margin-left:33.333%}.g-b--push--d2of3,.g-b--push--d4of6,.g-b--push--d8of12{margin-left:66.666%}.g-b--push--d1of4,.g-b--push--d2of8,.g-b--push--d3of12{margin-left:25%}.g-b--push--d3of4,.g-b--push--d6of8,.g-b--push--d9of12{margin-left:75%}.g-b--push--d1of5,.g-b--push--d2of10{margin-left:20%}.g-b--push--d2of5,.g-b--push--d4of10{margin-left:40%}.g-b--push--d3of5,.g-b--push--d6of10{margin-left:60%}.g-b--push--d4of5,.g-b--push--d8of10{margin-left:80%}.g-b--push--d1of6,.g-b--push--d2of12{margin-left:16.666%}.g-b--push--d5of6,.g-b--push--d10of12{margin-left:83.333%}.g-b--push--d1of8{margin-left:12.5%}.g-b--push--d3of8{margin-left:37.5%}.g-b--push--d5of8{margin-left:62.5%}.g-b--push--d7of8{margin-left:87.5%}.g-b--push--d1of10{margin-left:10%}.g-b--push--d3of10{margin-left:30%}.g-b--push--d7of10{margin-left:70%}.g-b--push--d9of10{margin-left:90%}.g-b--push--d1of12{margin-left:8.333%}.g-b--push--d5of12{margin-left:41.666%}.g-b--push--d7of12{margin-left:58.333%}.g-b--push--d11of12{margin-left:91.666%}.g-b--pull--d1of1{margin-right:100%}.g-b--pull--d1of2,.g-b--pull--d2of4,.g-b--pull--d3of6,.g-b--pull--d4of8,.g-b--pull--d5of10,.g-b--pull--d6of12{margin-right:50%}.g-b--pull--d1of3,.g-b--pull--d2of6,.g-b--pull--d4of12{margin-right:33.333%}.g-b--pull--d2of3,.g-b--pull--d4of6,.g-b--pull--d8of12{margin-right:66.666%}.g-b--pull--d1of4,.g-b--pull--d2of8,.g-b--pull--d3of12{margin-right:25%}.g-b--pull--d3of4,.g-b--pull--d6of8,.g-b--pull--d9of12{margin-right:75%}.g-b--pull--d1of5,.g-b--pull--d2of10{margin-right:20%}.g-b--pull--d2of5,.g-b--pull--d4of10{margin-right:40%}.g-b--pull--d3of5,.g-b--pull--d6of10{margin-right:60%}.g-b--pull--d4of5,.g-b--pull--d8of10{margin-right:80%}.g-b--pull--d1of6,.g-b--pull--d2of12{margin-right:16.666%}.g-b--pull--d5of6,.g-b--pull--d10of12{margin-right:83.333%}.g-b--pull--d1of8{margin-right:12.5%}.g-b--pull--d3of8{margin-right:37.5%}.g-b--pull--d5of8{margin-right:62.5%}.g-b--pull--d7of8{margin-right:87.5%}.g-b--pull--d1of10{margin-right:10%}.g-b--pull--d3of10{margin-right:30%}.g-b--pull--d7of10{margin-right:70%}.g-b--pull--d9of10{margin-right:90%}.g-b--pull--d1of12{margin-right:8.333%}.g-b--pull--d5of12{margin-right:41.666%}.g-b--pull--d7of12{margin-right:58.333%}.g-b--pull--d11of12{margin-right:91.666%}.splashscreen-dillinger{width:700px}.splashscreen p{font-size:1.25rem;margin-bottom:1.43749rem;padding-top:.56251rem}.title{font-size:.8rem;margin-bottom:.77999rem;padding-top:.22001rem}.title-document{font-size:1.25rem;margin-bottom:.89999rem;padding-top:.10001rem}.menu .menu-item--export-as{display:block}.menu .menu-item--preview{display:none}.settings a{font-size:1.25rem}.words{font-size:.8rem;margin-bottom:.77999rem;padding-top:.22001rem}.modal--dillinger.about .modal-dialog,#zen{font-size:1.25rem}#zen{width:700px}#editor{font-size:1rem}}@media screen and (min-width:87.5em){html{font-size:.875em}body{font-size:1rem}ul,ol{margin-bottom:.83999rem;padding-top:.16001rem}p{padding-top:.66001rem}p,pre{margin-bottom:1.33999rem}pre,blockquote p{font-size:1rem;padding-top:.66001rem}blockquote p{margin-bottom:.33999rem}h1{font-size:2.0571429rem;margin-bottom:.21999rem;padding-top:.78001rem}h2{font-size:1.953125rem;margin-bottom:.1835837rem;padding-top:.8164163rem}h3{font-size:1.6457143rem;margin-bottom:.07599rem;padding-top:.92401rem}h4{font-size:1.5625rem;margin-bottom:.546865rem;padding-top:.453135rem}h5{font-size:1.25rem;margin-bottom:-.56251rem;padding-top:.56251rem}h6{font-size:1rem;margin-bottom:-.65001rem;padding-top:.65001rem}.splashscreen-dillinger{width:800px}.splashscreen p{font-size:1.25rem;margin-bottom:1.43749rem;padding-top:.56251rem}.title{font-size:.8rem;margin-bottom:.77999rem;padding-top:.22001rem}.title-document{margin-bottom:.89999rem;padding-top:.10001rem}.title-document,.settings a{font-size:1.25rem}.words{font-size:.8rem;margin-bottom:.77999rem;padding-top:.22001rem}.modal--dillinger.about .modal-dialog,#zen{font-size:1.25rem}#editor{font-size:1rem}}</style></head><body id="preview"> <h4><a id="Characters_I_1"></a>Characters I</h4> <table> <thead> <tr> <th>Expression</th> <th>Meaning</th> </tr> </thead> <tbody> <tr> <td>.</td> <td>Match any character except newline</td> </tr> <tr> <td>^</td> <td>Match the start of the string</td> </tr> <tr> <td>$</td> <td>Match the end of the string</td> </tr> <tr> <td>*</td> <td>Match 0 or more repetitions</td> </tr> <tr> <td>+</td> <td>Match 1 or more repetitions</td> </tr> <tr> <td>?</td> <td>Match 0 or 1 repetitions</td> </tr> </tbody> </table> <h4><a id="Special_Sequences_I_12"></a>Special Sequences I</h4> <table> <thead> <tr> <th>Expression</th> <th>Meaning</th> </tr> </thead> <tbody> <tr> <td>\A</td> <td>Match only at start of string</td> </tr> <tr> <td>\\b</td> <td>Match empty string, only at beginning or end of a word</td> </tr> <tr> <td>\B</td> <td>Match empty string, only when it is not at beginning or end of word</td> </tr> <tr> <td>\d</td> <td>Match digits # same as [0-9]</td> </tr> <tr> <td>\D</td> <td>Match any non digit # same as [^0-9]</td> </tr> </tbody> </table> <h4><a id="Characters_II_22"></a>Characters II</h4> <table> <thead> <tr> <th>Expression</th> <th>Meaning</th> </tr> </thead> <tbody> <tr> <td>*?</td> <td>Match 0 or more repetitions non-greedy</td> </tr> <tr> <td>+?</td> <td>Match 1 or more repetitions non-greedy</td> </tr> <tr> <td>??</td> <td>Match 0 or 1 repetitions non-greedy</td> </tr> <tr> <td>\</td> <td>Escape special characters</td> </tr> <tr> <td>[]</td> <td>Match a set of characters</td> </tr> <tr> <td>[a-z]</td> <td>Match any lowercase ASCII letter</td> </tr> <tr> <td>[lower-upper]</td> <td>Match a set of characters from lower to upper</td> </tr> <tr> <td>[^]</td> <td>Match characters NOT in a set</td> </tr> <tr> <td>A|B</td> <td>Match either A or B regular expressions (non-greedy)</td> </tr> </tbody> </table> <h4><a id="Special_Sequences_II_36"></a>Special Sequences II</h4> <table> <thead> <tr> <th>Expression</th> <th>Meaning</th> </tr> </thead> <tbody> <tr> <td>\s</td> <td>Match whitespace characters # same as [ \t\n\r\f\v]</td> </tr> <tr> <td>\S</td> <td>Match non whitespace characters #same as [^ \t\n\r\f\v]</td> </tr> <tr> <td>\w</td> <td>Match unicode word characters # same as [a-zA-Z0-9_]</td> </tr> <tr> <td>\W</td> <td>Match any character not a Unicode word character # same as [^a-zA-Z0-9_]</td> </tr> <tr> <td>\Z</td> <td>Match only at end of string</td> </tr> </tbody> </table> <h4><a id="Characters_III_46"></a>Characters III</h4> <table> <thead> <tr> <th>Expression</th> <th>Meaning</th> </tr> </thead> <tbody> <tr> <td>{m}</td> <td>Match exactly m copies</td> </tr> <tr> <td>{m,n}</td> <td>Match from m to n repetitions</td> </tr> <tr> <td>{,n}</td> <td>Match from 0 to n repetitions</td> </tr> <tr> <td>{m,}</td> <td>Match from m to infinite repetitions</td> </tr> <tr> <td>{m,n}?</td> <td>Match from m to n repetitions non-greedy (as few as possible)</td> </tr> </tbody> </table> <h4><a id="Groups_I_56"></a>Groups I</h4> <table> <thead> <tr> <th>Expression</th> <th>Meaning</th> </tr> </thead> <tbody> <tr> <td>(match)</td> <td>Use to specify a group for which match can be retrieved later</td> </tr> <tr> <td>(?:match)</td> <td>Non-capturing version parenthesis (match cannot be retrieved later)</td> </tr> <tr> <td>(?P&lt;name&gt;)</td> <td>Capture group with name “name”</td> </tr> <tr> <td>(?P=name)</td> <td>Back reference group named “name” in same pattern</td> </tr> <tr> <td>(?#comment)</td> <td>Comment</td> </tr> </tbody> </table> <h4><a id="Lookahead__Behind_I_66"></a>Lookahead / Behind I</h4> <table> <thead> <tr> <th>Expression</th> <th>Meaning</th> </tr> </thead> <tbody> <tr> <td>(?=match)</td> <td>Lookahead assertion - match if contents matches next, but don’t consume any of the string.</td> </tr> <tr> <td>(?!match)</td> <td>Negative lookahead assertion - match if contents do not match next</td> </tr> <tr> <td>(?&lt;=match)</td> <td>Positive lookbehind assertion - match if current position in string is preceded by match</td> </tr> <tr> <td>(?&lt;!match)</td> <td>Negative lookbehind assertion - match if current position is not preceded by match</td> </tr> <tr> <td>(?(id/name)yes|no)</td> <td>Match “yes” pattern if id or name exists, otherwise match “no” pattern</td> </tr> </tbody> </table> </body></html> """ ) ABOUT = ( """ <!DOCTYPE html><html><head></head><body> <p><strong>Creator</strong>: <a href="https://github.com/Pewpews">Pewpews</a></p> <p>Twitter: <a href="https://twitter.com/pewspew">@pewspew</a></p> <p>Chat: <a href="https://gitter.im/Pewpews/happypanda">Gitter chat</a></p> <p>Email: <code>happypandabugs@gmail.com</code></p> <p><strong>Current version</strong>: {}</p> <p><strong>Current database version</strong>: {}</p> <p>License: <a href="https://www.gnu.org/licenses/gpl-2.0.txt"> GENERAL PUBLIC LICENSE, Version 2</a></p> <p>Happypanda was created using:</p> <ul> <li>Python 3.5</li> <li>The Qt5 Framework</li> <li>Various python libraries (see github repo)</li> </ul> <p>Contributors (github): rachmadaniHaryono (big thanks!), nonamethanks, ImoutoChan, Moshidesu, peaceanpizza, utterbull, LePearlo</p> </body></html> """ ).format(vs, db_constants.CURRENT_DB_VERSION) TROUBLE_GUIDE = ( """ <!DOCTYPE html><html><head><meta charset="utf-8"><title>Untitled Document.md</title><style>@import 'https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.2.0/katex.min.css';code{color:#c7254e;background-color:#f9f2f4;border-radius:4px}code,kbd{padding:2px 4px}kbd{color:#fff;background-color:#333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;box-shadow:none}pre{display:block;margin:0 0 10px;word-break:break-all;word-wrap:break-word;color:#333;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}fieldset{border:0;min-width:0}legend{display:block;width:100%;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type="radio"],input[type="checkbox"]{margin:1px 0 0;line-height:normal}input[type="file"]{display:block}input[type="range"]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{padding-top:7px}output,.form-control{display:block;font-size:14px;line-height:1.4285714;color:#555}.form-control{width:100%;height:34px;padding:6px 12px;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#777;opacity:1}.form-control:-ms-input-placeholder{color:#777}.form-control::-webkit-input-placeholder{color:#777}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee;opacity:1}textarea.form-control{height:auto}input[type="date"],input[type="time"],input[type="datetime-local"],input[type="month"]{line-height:34px;line-height:1.4285714 \0}input[type="date"].input-sm,.form-horizontal .form-group-sm input[type="date"].form-control,.input-group-sm>input[type="date"].form-control,.input-group-sm>input[type="date"].input-group-addon,.input-group-sm>.input-group-btn>input[type="date"].btn,input[type="time"].input-sm,.form-horizontal .form-group-sm input[type="time"].form-control,.input-group-sm>input[type="time"].form-control,.input-group-sm>input[type="time"].input-group-addon,.input-group-sm>.input-group-btn>input[type="time"].btn,input[type="datetime-local"].input-sm,.form-horizontal .form-group-sm input[type="datetime-local"].form-control,.input-group-sm>input[type="datetime-local"].form-control,.input-group-sm>input[type="datetime-local"].input-group-addon,.input-group-sm>.input-group-btn>input[type="datetime-local"].btn,input[type="month"].input-sm,.form-horizontal .form-group-sm input[type="month"].form-control,.input-group-sm>input[type="month"].form-control,.input-group-sm>input[type="month"].input-group-addon,.input-group-sm>.input-group-btn>input[type="month"].btn{line-height:30px}input[type="date"].input-lg,.form-horizontal .form-group-lg input[type="date"].form-control,.input-group-lg>input[type="date"].form-control,.input-group-lg>input[type="date"].input-group-addon,.input-group-lg>.input-group-btn>input[type="date"].btn,input[type="time"].input-lg,.form-horizontal .form-group-lg input[type="time"].form-control,.input-group-lg>input[type="time"].form-control,.input-group-lg>input[type="time"].input-group-addon,.input-group-lg>.input-group-btn>input[type="time"].btn,input[type="datetime-local"].input-lg,.form-horizontal .form-group-lg input[type="datetime-local"].form-control,.input-group-lg>input[type="datetime-local"].form-control,.input-group-lg>input[type="datetime-local"].input-group-addon,.input-group-lg>.input-group-btn>input[type="datetime-local"].btn,input[type="month"].input-lg,.form-horizontal .form-group-lg input[type="month"].form-control,.input-group-lg>input[type="month"].form-control,.input-group-lg>input[type="month"].input-group-addon,.input-group-lg>.input-group-btn>input[type="month"].btn{line-height:46px}.form-group{margin-bottom:15px}.radio,.checkbox{position:relative;display:block;min-height:20px;margin-top:10px;margin-bottom:10px}.radio label,.checkbox label{padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.radio input[type="radio"],.radio-inline input[type="radio"],.checkbox input[type="checkbox"],.checkbox-inline input[type="checkbox"]{position:absolute;margin-left:-20px;margin-top:4px \9}.radio+.radio,.checkbox+.checkbox{margin-top:-5px}.radio-inline,.checkbox-inline{display:inline-block;padding-left:20px;margin-bottom:0;vertical-align:middle;font-weight:400;cursor:pointer}.radio-inline+.radio-inline,.checkbox-inline+.checkbox-inline{margin-top:0;margin-left:10px}input[type="radio"][disabled],input[type="radio"].disabled,fieldset[disabled] input[type="radio"],input[type="checkbox"][disabled],input[type="checkbox"].disabled,fieldset[disabled] input[type="checkbox"],.radio-inline.disabled,fieldset[disabled] .radio-inline,.checkbox-inline.disabled,fieldset[disabled] .checkbox-inline,.radio.disabled label,fieldset[disabled] .radio label,.checkbox.disabled label,fieldset[disabled] .checkbox label{cursor:not-allowed}.form-control-static{padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-horizontal .form-group-lg .form-control-static.form-control,.input-group-lg>.form-control-static.form-control,.input-group-lg>.form-control-static.input-group-addon,.input-group-lg>.input-group-btn>.form-control-static.btn,.form-control-static.input-sm,.form-horizontal .form-group-sm .form-control-static.form-control,.input-group-sm>.form-control-static.form-control,.input-group-sm>.form-control-static.input-group-addon,.input-group-sm>.input-group-btn>.form-control-static.btn{padding-left:0;padding-right:0}.input-sm,.form-horizontal .form-group-sm .form-control,.input-group-sm>.form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.input-group-sm>.input-group-addon{height:30px;line-height:1.5}.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm,.form-horizontal .form-group-sm select.form-control,.input-group-sm>select.form-control,.input-group-sm>select.input-group-addon,.input-group-sm>.input-group-btn>select.btn{height:30px;line-height:30px}textarea.input-sm,.form-horizontal .form-group-sm textarea.form-control,.input-group-sm>textarea.form-control,.input-group-sm>textarea.input-group-addon,.input-group-sm>.input-group-btn>textarea.btn,select[multiple].input-sm,.form-horizontal .form-group-sm select[multiple].form-control,.input-group-sm>select[multiple].form-control,.input-group-sm>select[multiple].input-group-addon,.input-group-sm>.input-group-btn>select[multiple].btn{height:auto}.input-lg,.form-horizontal .form-group-lg .form-control,.input-group-lg>.form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.input-group-lg>.input-group-addon{height:46px;line-height:1.33}.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-lg,.form-horizontal .form-group-lg select.form-control,.input-group-lg>select.form-control,.input-group-lg>select.input-group-addon,.input-group-lg>.input-group-btn>select.btn{height:46px;line-height:46px}textarea.input-lg,.form-horizontal .form-group-lg textarea.form-control,.input-group-lg>textarea.form-control,.input-group-lg>textarea.input-group-addon,.input-group-lg>.input-group-btn>textarea.btn,select[multiple].input-lg,.form-horizontal .form-group-lg select[multiple].form-control,.input-group-lg>select[multiple].form-control,.input-group-lg>select[multiple].input-group-addon,.input-group-lg>.input-group-btn>select[multiple].btn{height:auto}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:25px;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center}.input-lg+.form-control-feedback,.form-horizontal .form-group-lg .form-control+.form-control-feedback,.input-group-lg>.form-control+.form-control-feedback,.input-group-lg>.input-group-addon+.form-control-feedback,.input-group-lg>.input-group-btn>.btn+.form-control-feedback{width:46px;height:46px;line-height:46px}.input-sm+.form-control-feedback,.form-horizontal .form-group-sm .form-control+.form-control-feedback,.input-group-sm>.form-control+.form-control-feedback,.input-group-sm>.input-group-addon+.form-control-feedback,.input-group-sm>.input-group-btn>.btn+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .help-block,.has-success .control-label,.has-success .radio,.has-success .checkbox,.has-success .radio-inline,.has-success .checkbox-inline{color:#3c763d}.has-success .form-control{border-color:#3c763d;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;border-color:#3c763d;background-color:#dff0d8}.has-success .form-control-feedback{color:#3c763d}.has-warning .help-block,.has-warning .control-label,.has-warning .radio,.has-warning .checkbox,.has-warning .radio-inline,.has-warning .checkbox-inline{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;border-color:#8a6d3b;background-color:#fcf8e3}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .help-block,.has-error .control-label,.has-error .radio,.has-error .checkbox,.has-error .radio-inline,.has-error .checkbox-inline{color:#a94442}.has-error .form-control{border-color:#a94442;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;border-color:#a94442;background-color:#f2dede}.has-error .form-control-feedback{color:#a94442}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}.form-horizontal .radio,.form-horizontal .checkbox,.form-horizontal .radio-inline,.form-horizontal .checkbox-inline{margin-top:0;margin-bottom:0;padding-top:7px}.form-horizontal .radio,.form-horizontal .checkbox{min-height:27px}.form-horizontal .form-group{margin-left:-15px;margin-right:-15px}.form-horizontal .form-group:before{content:" ";display:table}.form-horizontal .form-group:after{content:" ";display:table;clear:both}.form-horizontal .has-feedback .form-control-feedback{top:0;right:15px}.btn{display:inline-block;vertical-align:middle;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn:focus,.btn:active:focus,.btn.active:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:hover,.btn:focus{color:#333;text-decoration:none}.btn:active,.btn.active{outline:0;background-image:none;box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;pointer-events:none;opacity:.65;filter:alpha(opacity=65);box-shadow:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default:hover,.btn-default:focus,.btn-default:active,.btn-default.active,.open>.btn-default.dropdown-toggle{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default:active,.btn-default.active,.open>.btn-default.dropdown-toggle{background-image:none}.btn-default.disabled,.btn-default.disabled:hover,.btn-default.disabled:focus,.btn-default.disabled:active,.btn-default.disabled.active,.btn-default[disabled],.btn-default[disabled]:hover,.btn-default[disabled]:focus,.btn-default[disabled]:active,.btn-default[disabled].active,fieldset[disabled] .btn-default,fieldset[disabled] .btn-default:hover,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:active,fieldset[disabled] .btn-default.active{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#428bca;border-color:#357ebd}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.open>.btn-primary.dropdown-toggle{color:#fff;background-color:#3071a9;border-color:#285e8e}.btn-primary:active,.btn-primary.active,.open>.btn-primary.dropdown-toggle{background-image:none}.btn-primary.disabled,.btn-primary.disabled:hover,.btn-primary.disabled:focus,.btn-primary.disabled:active,.btn-primary.disabled.active,.btn-primary[disabled],.btn-primary[disabled]:hover,.btn-primary[disabled]:focus,.btn-primary[disabled]:active,.btn-primary[disabled].active,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-primary:hover,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:active,fieldset[disabled] .btn-primary.active{background-color:#428bca;border-color:#357ebd}.btn-primary .badge{color:#428bca;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.open>.btn-success.dropdown-toggle{color:#fff;background-color:#449d44;border-color:#398439}.btn-success:active,.btn-success.active,.open>.btn-success.dropdown-toggle{background-image:none}.btn-success.disabled,.btn-success.disabled:hover,.btn-success.disabled:focus,.btn-success.disabled:active,.btn-success.disabled.active,.btn-success[disabled],.btn-success[disabled]:hover,.btn-success[disabled]:focus,.btn-success[disabled]:active,.btn-success[disabled].active,fieldset[disabled] .btn-success,fieldset[disabled] .btn-success:hover,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:active,fieldset[disabled] .btn-success.active{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.open>.btn-info.dropdown-toggle{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info:active,.btn-info.active,.open>.btn-info.dropdown-toggle{background-image:none}.btn-info.disabled,.btn-info.disabled:hover,.btn-info.disabled:focus,.btn-info.disabled:active,.btn-info.disabled.active,.btn-info[disabled],.btn-info[disabled]:hover,.btn-info[disabled]:focus,.btn-info[disabled]:active,.btn-info[disabled].active,fieldset[disabled] .btn-info,fieldset[disabled] .btn-info:hover,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:active,fieldset[disabled] .btn-info.active{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.open>.btn-warning.dropdown-toggle{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning:active,.btn-warning.active,.open>.btn-warning.dropdown-toggle{background-image:none}.btn-warning.disabled,.btn-warning.disabled:hover,.btn-warning.disabled:focus,.btn-warning.disabled:active,.btn-warning.disabled.active,.btn-warning[disabled],.btn-warning[disabled]:hover,.btn-warning[disabled]:focus,.btn-warning[disabled]:active,.btn-warning[disabled].active,fieldset[disabled] .btn-warning,fieldset[disabled] .btn-warning:hover,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:active,fieldset[disabled] .btn-warning.active{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.open>.btn-danger.dropdown-toggle{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger:active,.btn-danger.active,.open>.btn-danger.dropdown-toggle{background-image:none}.btn-danger.disabled,.btn-danger.disabled:hover,.btn-danger.disabled:focus,.btn-danger.disabled:active,.btn-danger.disabled.active,.btn-danger[disabled],.btn-danger[disabled]:hover,.btn-danger[disabled]:focus,.btn-danger[disabled]:active,.btn-danger[disabled].active,fieldset[disabled] .btn-danger,fieldset[disabled] .btn-danger:hover,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:active,fieldset[disabled] .btn-danger.active{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{color:#428bca;font-weight:400;cursor:pointer;border-radius:0}.btn-link,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;box-shadow:none}.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active{border-color:transparent}.btn-link:hover,.btn-link:focus{color:#2a6496;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,.btn-link[disabled]:focus,fieldset[disabled] .btn-link:hover,fieldset[disabled] .btn-link:focus{color:#777;text-decoration:none}.btn-lg{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.btn-sm{padding:5px 10px}.btn-sm,.btn-xs{font-size:12px;line-height:1.5;border-radius:3px}.btn-xs{padding:1px 5px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;transition:height .35s ease}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*="col-"]{float:none;padding-left:0;padding-right:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon{white-space:nowrap}.input-group-addon,.input-group-btn{width:1%;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm,.form-horizontal .form-group-sm .input-group-addon.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.input-group-addon.btn{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg,.form-horizontal .form-group-lg .input-group-addon.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.input-group-addon.btn{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type="radio"],.input-group-addon input[type="checkbox"]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group-btn:last-child>.btn-group:not(:last-child)>.btn{border-bottom-right-radius:0;border-top-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:first-child>.btn-group:not(:first-child)>.btn{border-bottom-left-radius:0;border-top-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{font-size:0;white-space:nowrap}.input-group-btn,.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:hover,.input-group-btn>.btn:focus,.input-group-btn>.btn:active{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{margin-left:-1px}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;line-height:1.4285714;text-decoration:none;color:#428bca;background-color:#fff;border:1px solid #ddd;margin-left:-1px}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-bottom-left-radius:4px;border-top-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-bottom-right-radius:4px;border-top-right-radius:4px}.pagination>li>a:hover,.pagination>li>a:focus,.pagination>li>span:hover,.pagination>li>span:focus{color:#2a6496;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:hover,.pagination>.active>a:focus,.pagination>.active>span,.pagination>.active>span:hover,.pagination>.active>span:focus{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca;cursor:default}.pagination>.disabled>span,.pagination>.disabled>span:hover,.pagination>.disabled>span:focus,.pagination>.disabled>a,.pagination>.disabled>a:hover,.pagination>.disabled>a:focus{color:#777;background-color:#fff;border-color:#ddd;cursor:not-allowed}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-bottom-left-radius:6px;border-top-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-bottom-right-radius:6px;border-top-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-bottom-left-radius:3px;border-top-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-bottom-right-radius:3px;border-top-right-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;opacity:.5;filter:alpha(opacity=50)}button.close{padding:0;cursor:pointer;background:0 0;border:0;-webkit-appearance:none}.modal-open,.modal{overflow:hidden}.modal{display:none;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transform:translate3d(0,-25%,0);transform:translate3d(0,-25%,0);-webkit-transition:-webkit-transform .3s ease-out;transition:transform .3s ease-out}.modal.in .modal-dialog{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 3px 9px rgba(0,0,0,.5);background-clip:padding-box;outline:0}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0;filter:alpha(opacity=0)}.modal-backdrop.in{opacity:.5;filter:alpha(opacity=50)}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5;min-height:16.4285714px}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.4285714}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer:before,.modal-footer:after{content:" ";display:table}.modal-footer:after{clear:both}.modal-footer .btn+.btn{margin-left:5px;margin-bottom:0}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.clearfix:before,.clearfix:after{content:" ";display:table}.clearfix:after{clear:both}.center-block{display:block;margin-left:auto;margin-right:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important;visibility:hidden!important}.affix{position:fixed;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.hljs{display:block;overflow-x:auto;padding:.5em;background:#002b36;color:#839496;-webkit-text-size-adjust:none}.hljs-comment,.hljs-template_comment,.diff .hljs-header,.hljs-doctype,.hljs-pi,.lisp .hljs-string,.hljs-javadoc{color:#586e75}.hljs-keyword,.hljs-winutils,.method,.hljs-addition,.css .hljs-tag,.hljs-request,.hljs-status,.nginx .hljs-title{color:#859900}.hljs-number,.hljs-command,.hljs-string,.hljs-tag .hljs-value,.hljs-rules .hljs-value,.hljs-phpdoc,.hljs-dartdoc,.tex .hljs-formula,.hljs-regexp,.hljs-hexcolor,.hljs-link_url{color:#2aa198}.hljs-title,.hljs-localvars,.hljs-chunk,.hljs-decorator,.hljs-built_in,.hljs-identifier,.vhdl .hljs-literal,.hljs-id,.css .hljs-function{color:#268bd2}.hljs-attribute,.hljs-variable,.lisp .hljs-body,.smalltalk .hljs-number,.hljs-constant,.hljs-class .hljs-title,.hljs-parent,.hljs-type,.hljs-link_reference{color:#b58900}.hljs-preprocessor,.hljs-preprocessor .hljs-keyword,.hljs-pragma,.hljs-shebang,.hljs-symbol,.hljs-symbol .hljs-string,.diff .hljs-change,.hljs-special,.hljs-attr_selector,.hljs-subst,.hljs-cdata,.css .hljs-pseudo,.hljs-header{color:#cb4b16}.hljs-deletion,.hljs-important{color:#dc322f}.hljs-link_label{color:#6c71c4}.tex .hljs-formula{background:#073642}*,*:before,*:after{box-sizing:border-box}html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:0 0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}images{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd{font-size:1em}code,kbd,pre,samp{font-family:monospace,monospace}samp{font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}.debug{background-color:#ffc0cb!important}.ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ir{background-color:transparent;border:0;overflow:hidden}.ir::before{content:'';display:block;height:150%;width:0}html{font-size:.875em;background:#fafafa;color:#373D49}html,body{font-family:Georgia,Cambria,serif;height:100%}body{font-size:1rem;font-weight:400;line-height:2rem}ul,ol{margin-bottom:.83999rem;padding-top:.16001rem}li{-webkit-font-feature-settings:'kern' 1,'onum' 1,'liga' 1;-moz-font-feature-settings:'kern' 1,'onum' 1,'liga' 1;font-feature-settings:'kern' 1,'onum' 1,'liga' 1;margin-left:1rem}li>ul,li>ol{margin-bottom:0}p{padding-top:.66001rem;-webkit-font-feature-settings:'kern' 1,'onum' 1,'liga' 1;-moz-font-feature-settings:'kern' 1,'onum' 1,'liga' 1;font-feature-settings:'kern' 1,'onum' 1,'liga' 1;margin-top:0}p,pre{margin-bottom:1.33999rem}pre{font-size:1rem;padding:.66001rem 9.5px 9.5px;line-height:2rem;background:-webkit-linear-gradient(top,#fff 0,#fff .75rem,#f5f7fa .75rem,#f5f7fa 2.75rem,#fff 2.75rem,#fff 4rem);background:linear-gradient(to bottom,#fff 0,#fff .75rem,#f5f7fa .75rem,#f5f7fa 2.75rem,#fff 2.75rem,#fff 4rem);background-size:100% 4rem;border-color:#D3DAEA}blockquote{margin:0}blockquote p{font-size:1rem;margin-bottom:.33999rem;font-style:italic;padding:.66001rem 1rem 1rem;border-left:3px solid #A0AABF}th,td{padding:12px}h1,h2,h3,h4,h5,h6{font-family:"Source Sans Pro","Helvetica Neue",Helvetica,Arial,sans-serif;-webkit-font-feature-settings:'dlig' 1,'liga' 1,'lnum' 1,'kern' 1;-moz-font-feature-settings:'dlig' 1,'liga' 1,'lnum' 1,'kern' 1;font-feature-settings:'dlig' 1,'liga' 1,'lnum' 1,'kern' 1;font-style:normal;font-weight:600;margin-top:0}h1{line-height:3rem;font-size:2.0571429rem;margin-bottom:.21999rem;padding-top:.78001rem}h2{font-size:1.953125rem;margin-bottom:.1835837rem;padding-top:.8164163rem}h2,h3{line-height:3rem}h3{font-size:1.6457143rem;margin-bottom:.07599rem;padding-top:.92401rem}h4{font-size:1.5625rem;margin-bottom:.546865rem;padding-top:.453135rem}h5{font-size:1.25rem;margin-bottom:-.56251rem;padding-top:.56251rem}h6{font-size:1rem;margin-bottom:-.65001rem;padding-top:.65001rem}a{cursor:pointer;color:#35D7BB;text-decoration:none}a:hover,a:focus{border-bottom-color:#35D7BB;color:#dff9f4}img{height:auto;max-width:100%}.g{display:block}.g:after{clear:both;content:'';display:table}.g-b{float:left;margin:0;width:100%}.g{margin-left:-16px;margin-right:-16px}.g-b{padding-left:16px;padding-right:16px}.g-b--center{display:block;float:none;margin:0 auto}.g-b--right{float:right}.g-b--1of1{width:100%}.g-b--1of2,.g-b--2of4,.g-b--3of6,.g-b--4of8,.g-b--5of10,.g-b--6of12{width:50%}.g-b--1of3,.g-b--2of6,.g-b--4of12{width:33.333%}.g-b--2of3,.g-b--4of6,.g-b--8of12{width:66.666%}.g-b--1of4,.g-b--2of8,.g-b--3of12{width:25%}.g-b--3of4,.g-b--6of8,.g-b--9of12{width:75%}.g-b--1of5,.g-b--2of10{width:20%}.g-b--2of5,.g-b--4of10{width:40%}.g-b--3of5,.g-b--6of10{width:60%}.g-b--4of5,.g-b--8of10{width:80%}.g-b--1of6,.g-b--2of12{width:16.666%}.g-b--5of6,.g-b--10of12{width:83.333%}.g-b--1of8{width:12.5%}.g-b--3of8{width:37.5%}.g-b--5of8{width:62.5%}.g-b--7of8{width:87.5%}.g-b--1of10{width:10%}.g-b--3of10{width:30%}.g-b--7of10{width:70%}.g-b--9of10{width:90%}.g-b--1of12{width:8.333%}.g-b--5of12{width:41.666%}.g-b--7of12{width:58.333%}.g-b--11of12{width:91.666%}.g-b--push--1of1{margin-left:100%}.g-b--push--1of2,.g-b--push--2of4,.g-b--push--3of6,.g-b--push--4of8,.g-b--push--5of10,.g-b--push--6of12{margin-left:50%}.g-b--push--1of3,.g-b--push--2of6,.g-b--push--4of12{margin-left:33.333%}.g-b--push--2of3,.g-b--push--4of6,.g-b--push--8of12{margin-left:66.666%}.g-b--push--1of4,.g-b--push--2of8,.g-b--push--3of12{margin-left:25%}.g-b--push--3of4,.g-b--push--6of8,.g-b--push--9of12{margin-left:75%}.g-b--push--1of5,.g-b--push--2of10{margin-left:20%}.g-b--push--2of5,.g-b--push--4of10{margin-left:40%}.g-b--push--3of5,.g-b--push--6of10{margin-left:60%}.g-b--push--4of5,.g-b--push--8of10{margin-left:80%}.g-b--push--1of6,.g-b--push--2of12{margin-left:16.666%}.g-b--push--5of6,.g-b--push--10of12{margin-left:83.333%}.g-b--push--1of8{margin-left:12.5%}.g-b--push--3of8{margin-left:37.5%}.g-b--push--5of8{margin-left:62.5%}.g-b--push--7of8{margin-left:87.5%}.g-b--push--1of10{margin-left:10%}.g-b--push--3of10{margin-left:30%}.g-b--push--7of10{margin-left:70%}.g-b--push--9of10{margin-left:90%}.g-b--push--1of12{margin-left:8.333%}.g-b--push--5of12{margin-left:41.666%}.g-b--push--7of12{margin-left:58.333%}.g-b--push--11of12{margin-left:91.666%}.g-b--pull--1of1{margin-right:100%}.g-b--pull--1of2,.g-b--pull--2of4,.g-b--pull--3of6,.g-b--pull--4of8,.g-b--pull--5of10,.g-b--pull--6of12{margin-right:50%}.g-b--pull--1of3,.g-b--pull--2of6,.g-b--pull--4of12{margin-right:33.333%}.g-b--pull--2of3,.g-b--pull--4of6,.g-b--pull--8of12{margin-right:66.666%}.g-b--pull--1of4,.g-b--pull--2of8,.g-b--pull--3of12{margin-right:25%}.g-b--pull--3of4,.g-b--pull--6of8,.g-b--pull--9of12{margin-right:75%}.g-b--pull--1of5,.g-b--pull--2of10{margin-right:20%}.g-b--pull--2of5,.g-b--pull--4of10{margin-right:40%}.g-b--pull--3of5,.g-b--pull--6of10{margin-right:60%}.g-b--pull--4of5,.g-b--pull--8of10{margin-right:80%}.g-b--pull--1of6,.g-b--pull--2of12{margin-right:16.666%}.g-b--pull--5of6,.g-b--pull--10of12{margin-right:83.333%}.g-b--pull--1of8{margin-right:12.5%}.g-b--pull--3of8{margin-right:37.5%}.g-b--pull--5of8{margin-right:62.5%}.g-b--pull--7of8{margin-right:87.5%}.g-b--pull--1of10{margin-right:10%}.g-b--pull--3of10{margin-right:30%}.g-b--pull--7of10{margin-right:70%}.g-b--pull--9of10{margin-right:90%}.g-b--pull--1of12{margin-right:8.333%}.g-b--pull--5of12{margin-right:41.666%}.g-b--pull--7of12{margin-right:58.333%}.g-b--pull--11of12{margin-right:91.666%}.splashscreen{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#373D49;z-index:22}.splashscreen-dillinger{width:260px;height:auto;display:block;margin:0 auto;padding-bottom:3rem}.splashscreen p{font-size:1.25rem;padding-top:.56251rem;font-family:"Source Sans Pro","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;text-align:center;max-width:500px;margin:0 auto;color:#FFF}.sp-center{position:relative;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);top:50%}.open-menu>.wrapper{overflow-x:hidden}.page{margin:0 auto;position:relative;top:0;left:0;width:100%;height:100%;z-index:2;-webkit-transition:all .25s ease-in-out;transition:all .25s ease-in-out;background-color:#fff;padding-top:51px;will-change:left}.open-menu .page{left:270px}.title{line-height:1rem;font-size:.8rem;margin-bottom:.77999rem;padding-top:.22001rem;font-weight:500;color:#A0AABF;letter-spacing:1px;text-transform:uppercase;padding-left:16px;padding-right:16px;margin-top:1rem}.split-preview .title{padding-left:0}.title-document{line-height:1rem;font-size:1.25rem;margin-bottom:.89999rem;padding-top:.10001rem;font-weight:400;font-family:"Ubuntu Mono",Monaco;color:#373D49;padding-left:16px;padding-right:16px;width:80%;min-width:300px;outline:0;border:none}.icon{display:block;margin:0 auto;width:36px;height:36px;border-radius:3px;text-align:center}.icon svg{display:inline-block;margin-left:auto;margin-right:auto}.icon-preview{background-color:#373D49;line-height:40px}.icon-preview svg{width:19px;height:12px}.icon-settings{background-color:#373D49;line-height:44px}.icon-settings svg{width:18px;height:18px}.icon-link{width:16px;height:16px;line-height:1;margin-right:24px;text-align:right}.navbar{background-color:#373D49;height:51px;width:100%;position:fixed;top:0;left:0;z-index:6;-webkit-transition:all .25s ease-in-out;transition:all .25s ease-in-out;will-change:left}.navbar:after{content:"";display:table;clear:both}.open-menu .navbar{left:270px}.navbar-brand{float:left;margin:0 0 0 24px;padding:0;line-height:42px}.navbar-brand svg{width:85px;height:11px}.nav-left{float:left}.nav-right{float:right}.nav-sidebar{width:100%}.menu{list-style:none;margin:0;padding:0}.menu a{border:0;color:#A0AABF;font-family:"Source Sans Pro","Helvetica Neue",Helvetica,Arial,sans-serif;outline:none;text-transform:uppercase}.menu a:hover{color:#35D7BB}.menu .menu-item{border:0;display:none;float:left;margin:0;position:relative}.menu .menu-item>a{display:block;font-size:12px;height:51px;letter-spacing:1px;line-height:51px;padding:0 24px}.menu .menu-item--settings,.menu .menu-item--preview,.menu .menu-item--save-to.in-sidebar,.menu .menu-item--import-from.in-sidebar,.menu .menu-item--link-unlink.in-sidebar,.menu .menu-item--documents.in-sidebar{display:block}.menu .menu-item--documents{padding-bottom:1rem}.menu .menu-item.open>a{background-color:#1D212A}.menu .menu-item-icon>a{height:auto;padding:0}.menu .menu-item-icon:hover>a{background-color:transparent}.menu .menu-link.open i{background-color:#1D212A}.menu .menu-link.open g{fill:#35D7BB}.menu .menu-link-preview,.menu .menu-link-settings{margin-top:8px;width:51px}.menu-sidebar{width:100%}.menu-sidebar .menu-item{float:none;margin-bottom:1px;width:100%}.menu-sidebar .menu-item.open>a{background-color:#373D49}.menu-sidebar .open .caret{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.menu-sidebar>.menu-item:hover .dropdown a,.menu-sidebar>.menu-item:hover .settings a{background-color:transparent}.menu-sidebar .menu-link{background-color:#373D49;font-weight:600}.menu-sidebar .menu-link:after{content:"";display:table;clear:both}.menu-sidebar .menu-link>span{float:left}.menu-sidebar .menu-link>.caret{float:right;text-align:right;top:22px}.menu-sidebar .dropdown,.menu-sidebar .settings{background-color:transparent;position:static;width:100%}.dropdown{position:absolute;right:0;top:51px;width:188px}.dropdown,.settings{display:none;background-color:#1D212A}.dropdown{padding:0}.dropdown,.settings,.sidebar-list{list-style:none;margin:0}.sidebar-list{padding:0}.dropdown li{margin:32px 0;padding:0 0 0 32px}.dropdown li,.settings li{line-height:1}.sidebar-list li{line-height:1;margin:32px 0;padding:0 0 0 32px}.dropdown a{color:#D0D6E2}.dropdown a,.settings a,.sidebar-list a{display:block;text-transform:none}.sidebar-list a{color:#D0D6E2}.dropdown a:after,.settings a:after,.sidebar-list a:after{content:"";display:table;clear:both}.dropdown .icon,.settings .icon,.sidebar-list .icon{float:right}.open .dropdown,.open .settings,.open .sidebar-list{display:block}.open .dropdown.collapse,.open .collapse.settings,.open .sidebar-list.collapse{display:none}.open .dropdown.collapse.in,.open .collapse.in.settings,.open .sidebar-list.collapse.in{display:block}.dropdown .unlinked .icon,.settings .unlinked .icon,.sidebar-list .unlinked .icon{opacity:.3}.dropdown.documents li,.documents.settings li,.sidebar-list.documents li{background-image:url("../img/icons/file.svg");background-position:240px center;background-repeat:no-repeat;background-size:14px 16px;padding:3px 32px}.dropdown.documents li.octocat,.documents.settings li.octocat,.sidebar-list.documents li.octocat{background-image:url("../img/icons/octocat.svg");background-position:234px center;background-size:24px 24px}.dropdown.documents li:last-child,.documents.settings li:last-child,.sidebar-list.documents li:last-child{margin-bottom:1rem}.dropdown.documents li.active a,.documents.settings li.active a,.sidebar-list.documents li.active a{color:#35D7BB}.settings{position:fixed;top:67px;right:16px;border-radius:3px;width:288px;background-color:#373D49;padding:16px;z-index:7}.show-settings .settings{display:block}.settings .has-checkbox{float:left}.settings a{font-size:1.25rem;font-family:"Source Sans Pro","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;-webkit-font-smoothing:antialiased;line-height:28px;color:#D0D6E2}.settings a:after{content:"";display:table;clear:both}.settings a:hover{color:#35D7BB}.settings li{border-bottom:1px solid #4F535B;margin:0;padding:16px 0}.settings li:last-child{border-bottom:none}.brand{border:none;display:block}.brand:hover g{fill:#35D7BB}.toggle{display:block;float:left;height:16px;padding:25px 16px 26px;width:40px}.toggle span:after,.toggle span:before{content:'';left:0;position:absolute;top:-6px}.toggle span:after{top:6px}.toggle span{display:block;position:relative}.toggle span,.toggle span:after,.toggle span:before{-webkit-backface-visibility:hidden;backface-visibility:hidden;background-color:#D3DAEA;height:2px;-webkit-transition:all .3s;transition:all .3s;width:20px}.open-menu .toggle span{background-color:transparent}.open-menu .toggle span:before{-webkit-transform:rotate(45deg)translate(3px,3px);-ms-transform:rotate(45deg)translate(3px,3px);transform:rotate(45deg)translate(3px,3px)}.open-menu .toggle span:after{-webkit-transform:rotate(-45deg)translate(5px,-6px);-ms-transform:rotate(-45deg)translate(5px,-6px);transform:rotate(-45deg)translate(5px,-6px)}.caret{display:inline-block;width:0;height:0;margin-left:6px;vertical-align:middle;position:relative;top:-1px;border-top:4px solid;border-right:4px solid transparent;border-left:4px solid transparent}.sidebar{overflow:auto;height:100%;padding-right:15px;padding-bottom:15px;width:285px}.sidebar-wrapper{-webkit-overflow-scrolling:touch;background-color:#2B2F36;left:0;height:100%;overflow-y:hidden;position:fixed;top:0;width:285px;z-index:1}.sidebar-branding{width:160px;padding:0;margin:16px auto}.header{border-bottom:1px solid #E8E8E8;position:relative}.words{line-height:1rem;font-size:.8rem;margin-bottom:.77999rem;padding-top:.22001rem;font-weight:500;font-family:"Source Sans Pro","Helvetica Neue",Helvetica,Arial,sans-serif;color:#A0AABF;letter-spacing:1px;text-transform:uppercase;z-index:5;position:absolute;right:16px;top:0}.words span{color:#000}.btn{text-align:center;display:inline-block;width:100%;text-transform:uppercase;font-weight:600;font-family:"Source Sans Pro","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;text-shadow:0 1px 0 #1b8b77;padding:16px 24px;background-color:#35D7BB;border-radius:3px;margin:0 auto 16px;line-height:1;color:#fff;-webkit-transition:all .15s linear;transition:all .15s linear;-webkit-font-smoothing:antialiased}.btn--new,.btn--save{display:block;width:238px}.btn--new:hover,.btn--new:focus,.btn--save:hover,.btn--save:focus{color:#fff;border-bottom-color:transparent;box-shadow:0 1px 3px #24b59c;text-shadow:0 1px 0 #24b59c}.btn--save{background-color:#4A5261;text-shadow:0 1px 1px #1e2127}.btn--save:hover,.btn--save:focus{color:#fff;border-bottom-color:transparent;box-shadow:0 1px 5px #08090a;text-shadow:none}.btn--delete{display:block;width:238px;background-color:transparent;font-size:12px;text-shadow:none}.btn--delete:hover,.btn--delete:focus{color:#fff;border-bottom-color:transparent;text-shadow:0 1px 0 #08090a;opacity:.8}.btn--ok,.btn--close{border-top:0;background-color:#4A5261;text-shadow:0 1px 0 #08090a;margin:0}.btn--ok:hover,.btn--ok:focus,.btn--close:hover,.btn--close:focus{color:#fff;background-color:#292d36;text-shadow:none}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(55,61,73,.8);-webkit-transition:all .25s ease-in-out;transition:all .25s ease-in-out;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out;will-change:left,opacity,visibility;z-index:5;opacity:0;visibility:hidden}.show-settings .overlay{visibility:visible;opacity:1}.switch{float:right;line-height:1}.switch input{display:none}.switch small{display:inline-block;cursor:pointer;padding:0 24px 0 0;-webkit-transition:all ease .2s;transition:all ease .2s;background-color:#2B2F36;border-color:#2B2F36}.switch small,.switch small:before{border-radius:30px;box-shadow:inset 0 0 2px 0 #14171F}.switch small:before{display:block;content:'';width:28px;height:28px;background:#fff}.switch.checked small{padding-right:0;padding-left:24px;background-color:#35D7BB;box-shadow:none}.modal--dillinger.about .modal-dialog{font-size:1.25rem;max-width:500px}.modal--dillinger .modal-dialog{max-width:600px;width:auto;margin:5rem auto}.modal--dillinger .modal-content{background:#373D49;border-radius:3px;box-shadow:0 2px 5px 0 #2C3B59;color:#fff;font-family:"Source Sans Pro","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;padding:2rem}.modal--dillinger ul{list-style-type:disc;margin:1rem 0;padding:0 0 0 1rem}.modal--dillinger li{padding:0;margin:0}.modal--dillinger .modal-header{border:0;padding:0}.modal--dillinger .modal-body{padding:0}.modal--dillinger .modal-footer{border:0;padding:0}.modal--dillinger .close{color:#fff;opacity:1}.modal-backdrop{background-color:#373D49}.pagination--dillinger{padding:0!important;margin:1.5rem 0!important;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-align-content:stretch;-ms-flex-line-pack:stretch;align-content:stretch}.pagination--dillinger,.pagination--dillinger li{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.pagination--dillinger li{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;text-align:center}.pagination--dillinger li:first-child>a,.pagination--dillinger li.disabled>a,.pagination--dillinger li.disabled>a:hover,.pagination--dillinger li.disabled>a:focus,.pagination--dillinger li>a{background-color:transparent;border-color:#4F535B;border-right-color:transparent}.pagination--dillinger li.active>a,.pagination--dillinger li.active>a:hover,.pagination--dillinger li.active>a:focus{border-color:#4A5261;background-color:#4A5261;color:#fff}.pagination--dillinger li>a{float:none;color:#fff;width:100%;display:block;text-align:center;margin:0;border-right-color:transparent;padding:6px}.pagination--dillinger li>a:hover,.pagination--dillinger li>a:focus{border-color:#35D7BB;background-color:#35D7BB;color:#fff}.pagination--dillinger li:last-child a{border-color:#4F535B}.pagination--dillinger li:first-child a{border-right-color:transparent}.diNotify{position:absolute;z-index:9999;left:0;right:0;top:0;margin:0 auto;max-width:400px;text-align:center;-webkit-transition:top .5s ease-in-out,opacity .5s ease-in-out;transition:top .5s ease-in-out,opacity .5s ease-in-out;visibility:hidden}.diNotify-body{-webkit-font-smoothing:antialiased;background-color:#35D7BB;background:#666E7F;border-radius:3px;color:#fff;font-family:"Source Sans Pro","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;overflow:hidden;padding:1rem 2rem .5rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:baseline;-webkit-align-items:baseline;-ms-flex-align:baseline;align-items:baseline;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.diNotify-icon{display:block;width:16px;height:16px;line-height:16px;position:relative;top:3px}.diNotify-message{padding-left:1rem}.zen-wrapper{position:fixed;top:0;left:0;right:0;bottom:0;width:100%;height:100%;z-index:10;background-color:#FFF;opacity:0;-webkit-transition:opacity .25s ease-in-out;transition:opacity .25s ease-in-out}.zen-wrapper.on{opacity:1}.enter-zen-mode{background-image:url("../img/icons/enter-zen.svg");right:.5rem;top:.5rem;display:none}.enter-zen-mode,.close-zen-mode{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0;background-repeat:no-repeat;width:32px;height:32px;display:block;position:absolute}.close-zen-mode{background-image:url("../img/icons/exit-zen.svg");right:1rem;top:1rem}.zen-page{position:relative;top:0;bottom:0;z-index:11;height:100%;width:100%}#zen{font-size:1.25rem;width:300px;height:80%;margin:0 auto;position:relative;top:10%}#zen:before,#zen:after{content:"";position:absolute;height:10%;width:100%;z-index:12;pointer-events:none}.split{overflow:scroll;padding:0!important}.split-editor{padding-left:0;padding-right:0;position:relative}.show-preview .split-editor{display:none}.split-preview{background-color:#fff;display:none;top:0;position:relative;z-index:4}.show-preview .split-preview{display:block}#editor{font-size:1rem;font-family:"Ubuntu Mono",Monaco;font-weight:400;line-height:2rem;width:100%;height:100%}#editor .ace_gutter{-webkit-font-smoothing:antialiased}#preview a{color:#A0AABF;text-decoration:underline}.sr-only{visibility:hidden;text-overflow:110%;overflow:hidden;top:-100px;position:absolute}.mnone{margin:0!important}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn,.form-inline .input-group .form-control{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .radio,.form-inline .checkbox{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .radio label,.form-inline .checkbox label{padding-left:0}.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}.form-horizontal .control-label{text-align:right;margin-bottom:0;padding-top:7px}.form-horizontal .form-group-lg .control-label{padding-top:14.3px}.form-horizontal .form-group-sm .control-label{padding-top:6px}.modal-dialog{width:600px;margin:30px auto}.modal-content{box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}@media screen and (min-width:27.5em){html{font-size:.875em}body{font-size:1rem}ul,ol{margin-bottom:.83999rem;padding-top:.16001rem}p{padding-top:.66001rem}p,pre{margin-bottom:1.33999rem}pre,blockquote p{font-size:1rem;padding-top:.66001rem}blockquote p{margin-bottom:.33999rem}h1{font-size:2.0571429rem;margin-bottom:.21999rem;padding-top:.78001rem}h2{font-size:1.953125rem;margin-bottom:.1835837rem;padding-top:.8164163rem}h3{font-size:1.6457143rem;margin-bottom:.07599rem;padding-top:.92401rem}h4{font-size:1.5625rem;margin-bottom:.546865rem;padding-top:.453135rem}h5{font-size:1.25rem;margin-bottom:-.56251rem;padding-top:.56251rem}h6{font-size:1rem;margin-bottom:-.65001rem;padding-top:.65001rem}.g{margin-left:-16px;margin-right:-16px}.g-b{padding-left:16px;padding-right:16px}.g-b--m1of1{width:100%}.g-b--m1of2,.g-b--m2of4,.g-b--m3of6,.g-b--m4of8,.g-b--m5of10,.g-b--m6of12{width:50%}.g-b--m1of3,.g-b--m2of6,.g-b--m4of12{width:33.333%}.g-b--m2of3,.g-b--m4of6,.g-b--m8of12{width:66.666%}.g-b--m1of4,.g-b--m2of8,.g-b--m3of12{width:25%}.g-b--m3of4,.g-b--m6of8,.g-b--m9of12{width:75%}.g-b--m1of5,.g-b--m2of10{width:20%}.g-b--m2of5,.g-b--m4of10{width:40%}.g-b--m3of5,.g-b--m6of10{width:60%}.g-b--m4of5,.g-b--m8of10{width:80%}.g-b--m1of6,.g-b--m2of12{width:16.666%}.g-b--m5of6,.g-b--m10of12{width:83.333%}.g-b--m1of8{width:12.5%}.g-b--m3of8{width:37.5%}.g-b--m5of8{width:62.5%}.g-b--m7of8{width:87.5%}.g-b--m1of10{width:10%}.g-b--m3of10{width:30%}.g-b--m7of10{width:70%}.g-b--m9of10{width:90%}.g-b--m1of12{width:8.333%}.g-b--m5of12{width:41.666%}.g-b--m7of12{width:58.333%}.g-b--m11of12{width:91.666%}.g-b--push--m1of1{margin-left:100%}.g-b--push--m1of2,.g-b--push--m2of4,.g-b--push--m3of6,.g-b--push--m4of8,.g-b--push--m5of10,.g-b--push--m6of12{margin-left:50%}.g-b--push--m1of3,.g-b--push--m2of6,.g-b--push--m4of12{margin-left:33.333%}.g-b--push--m2of3,.g-b--push--m4of6,.g-b--push--m8of12{margin-left:66.666%}.g-b--push--m1of4,.g-b--push--m2of8,.g-b--push--m3of12{margin-left:25%}.g-b--push--m3of4,.g-b--push--m6of8,.g-b--push--m9of12{margin-left:75%}.g-b--push--m1of5,.g-b--push--m2of10{margin-left:20%}.g-b--push--m2of5,.g-b--push--m4of10{margin-left:40%}.g-b--push--m3of5,.g-b--push--m6of10{margin-left:60%}.g-b--push--m4of5,.g-b--push--m8of10{margin-left:80%}.g-b--push--m1of6,.g-b--push--m2of12{margin-left:16.666%}.g-b--push--m5of6,.g-b--push--m10of12{margin-left:83.333%}.g-b--push--m1of8{margin-left:12.5%}.g-b--push--m3of8{margin-left:37.5%}.g-b--push--m5of8{margin-left:62.5%}.g-b--push--m7of8{margin-left:87.5%}.g-b--push--m1of10{margin-left:10%}.g-b--push--m3of10{margin-left:30%}.g-b--push--m7of10{margin-left:70%}.g-b--push--m9of10{margin-left:90%}.g-b--push--m1of12{margin-left:8.333%}.g-b--push--m5of12{margin-left:41.666%}.g-b--push--m7of12{margin-left:58.333%}.g-b--push--m11of12{margin-left:91.666%}.g-b--pull--m1of1{margin-right:100%}.g-b--pull--m1of2,.g-b--pull--m2of4,.g-b--pull--m3of6,.g-b--pull--m4of8,.g-b--pull--m5of10,.g-b--pull--m6of12{margin-right:50%}.g-b--pull--m1of3,.g-b--pull--m2of6,.g-b--pull--m4of12{margin-right:33.333%}.g-b--pull--m2of3,.g-b--pull--m4of6,.g-b--pull--m8of12{margin-right:66.666%}.g-b--pull--m1of4,.g-b--pull--m2of8,.g-b--pull--m3of12{margin-right:25%}.g-b--pull--m3of4,.g-b--pull--m6of8,.g-b--pull--m9of12{margin-right:75%}.g-b--pull--m1of5,.g-b--pull--m2of10{margin-right:20%}.g-b--pull--m2of5,.g-b--pull--m4of10{margin-right:40%}.g-b--pull--m3of5,.g-b--pull--m6of10{margin-right:60%}.g-b--pull--m4of5,.g-b--pull--m8of10{margin-right:80%}.g-b--pull--m1of6,.g-b--pull--m2of12{margin-right:16.666%}.g-b--pull--m5of6,.g-b--pull--m10of12{margin-right:83.333%}.g-b--pull--m1of8{margin-right:12.5%}.g-b--pull--m3of8{margin-right:37.5%}.g-b--pull--m5of8{margin-right:62.5%}.g-b--pull--m7of8{margin-right:87.5%}.g-b--pull--m1of10{margin-right:10%}.g-b--pull--m3of10{margin-right:30%}.g-b--pull--m7of10{margin-right:70%}.g-b--pull--m9of10{margin-right:90%}.g-b--pull--m1of12{margin-right:8.333%}.g-b--pull--m5of12{margin-right:41.666%}.g-b--pull--m7of12{margin-right:58.333%}.g-b--pull--m11of12{margin-right:91.666%}.splashscreen p{font-size:1.25rem;margin-bottom:1.43749rem;padding-top:.56251rem}.title{font-size:.8rem;margin-bottom:.77999rem;padding-top:.22001rem}.title-document{margin-bottom:.89999rem;padding-top:.10001rem}.title-document,.settings a{font-size:1.25rem}.words{font-size:.8rem;margin-bottom:.77999rem;padding-top:.22001rem}.modal--dillinger.about .modal-dialog,#zen{font-size:1.25rem}#zen{width:400px}#editor{font-size:1rem}}@media screen and (min-width:46.25em){html{font-size:.875em}body{font-size:1rem}ul,ol{margin-bottom:.83999rem;padding-top:.16001rem}p{padding-top:.66001rem}p,pre{margin-bottom:1.33999rem}pre,blockquote p{font-size:1rem;padding-top:.66001rem}blockquote p{margin-bottom:.33999rem}h1{font-size:2.0571429rem;margin-bottom:.21999rem;padding-top:.78001rem}h2{font-size:1.953125rem;margin-bottom:.1835837rem;padding-top:.8164163rem}h3{font-size:1.6457143rem;margin-bottom:.07599rem;padding-top:.92401rem}h4{font-size:1.5625rem;margin-bottom:.546865rem;padding-top:.453135rem}h5{font-size:1.25rem;margin-bottom:-.56251rem;padding-top:.56251rem}h6{font-size:1rem;margin-bottom:-.65001rem;padding-top:.65001rem}.g{margin-left:-16px;margin-right:-16px}.g-b{padding-left:16px;padding-right:16px}.g-b--t1of1{width:100%}.g-b--t1of2,.g-b--t2of4,.g-b--t3of6,.g-b--t4of8,.g-b--t5of10,.g-b--t6of12{width:50%}.g-b--t1of3,.g-b--t2of6,.g-b--t4of12{width:33.333%}.g-b--t2of3,.g-b--t4of6,.g-b--t8of12{width:66.666%}.g-b--t1of4,.g-b--t2of8,.g-b--t3of12{width:25%}.g-b--t3of4,.g-b--t6of8,.g-b--t9of12{width:75%}.g-b--t1of5,.g-b--t2of10{width:20%}.g-b--t2of5,.g-b--t4of10{width:40%}.g-b--t3of5,.g-b--t6of10{width:60%}.g-b--t4of5,.g-b--t8of10{width:80%}.g-b--t1of6,.g-b--t2of12{width:16.666%}.g-b--t5of6,.g-b--t10of12{width:83.333%}.g-b--t1of8{width:12.5%}.g-b--t3of8{width:37.5%}.g-b--t5of8{width:62.5%}.g-b--t7of8{width:87.5%}.g-b--t1of10{width:10%}.g-b--t3of10{width:30%}.g-b--t7of10{width:70%}.g-b--t9of10{width:90%}.g-b--t1of12{width:8.333%}.g-b--t5of12{width:41.666%}.g-b--t7of12{width:58.333%}.g-b--t11of12{width:91.666%}.g-b--push--t1of1{margin-left:100%}.g-b--push--t1of2,.g-b--push--t2of4,.g-b--push--t3of6,.g-b--push--t4of8,.g-b--push--t5of10,.g-b--push--t6of12{margin-left:50%}.g-b--push--t1of3,.g-b--push--t2of6,.g-b--push--t4of12{margin-left:33.333%}.g-b--push--t2of3,.g-b--push--t4of6,.g-b--push--t8of12{margin-left:66.666%}.g-b--push--t1of4,.g-b--push--t2of8,.g-b--push--t3of12{margin-left:25%}.g-b--push--t3of4,.g-b--push--t6of8,.g-b--push--t9of12{margin-left:75%}.g-b--push--t1of5,.g-b--push--t2of10{margin-left:20%}.g-b--push--t2of5,.g-b--push--t4of10{margin-left:40%}.g-b--push--t3of5,.g-b--push--t6of10{margin-left:60%}.g-b--push--t4of5,.g-b--push--t8of10{margin-left:80%}.g-b--push--t1of6,.g-b--push--t2of12{margin-left:16.666%}.g-b--push--t5of6,.g-b--push--t10of12{margin-left:83.333%}.g-b--push--t1of8{margin-left:12.5%}.g-b--push--t3of8{margin-left:37.5%}.g-b--push--t5of8{margin-left:62.5%}.g-b--push--t7of8{margin-left:87.5%}.g-b--push--t1of10{margin-left:10%}.g-b--push--t3of10{margin-left:30%}.g-b--push--t7of10{margin-left:70%}.g-b--push--t9of10{margin-left:90%}.g-b--push--t1of12{margin-left:8.333%}.g-b--push--t5of12{margin-left:41.666%}.g-b--push--t7of12{margin-left:58.333%}.g-b--push--t11of12{margin-left:91.666%}.g-b--pull--t1of1{margin-right:100%}.g-b--pull--t1of2,.g-b--pull--t2of4,.g-b--pull--t3of6,.g-b--pull--t4of8,.g-b--pull--t5of10,.g-b--pull--t6of12{margin-right:50%}.g-b--pull--t1of3,.g-b--pull--t2of6,.g-b--pull--t4of12{margin-right:33.333%}.g-b--pull--t2of3,.g-b--pull--t4of6,.g-b--pull--t8of12{margin-right:66.666%}.g-b--pull--t1of4,.g-b--pull--t2of8,.g-b--pull--t3of12{margin-right:25%}.g-b--pull--t3of4,.g-b--pull--t6of8,.g-b--pull--t9of12{margin-right:75%}.g-b--pull--t1of5,.g-b--pull--t2of10{margin-right:20%}.g-b--pull--t2of5,.g-b--pull--t4of10{margin-right:40%}.g-b--pull--t3of5,.g-b--pull--t6of10{margin-right:60%}.g-b--pull--t4of5,.g-b--pull--t8of10{margin-right:80%}.g-b--pull--t1of6,.g-b--pull--t2of12{margin-right:16.666%}.g-b--pull--t5of6,.g-b--pull--t10of12{margin-right:83.333%}.g-b--pull--t1of8{margin-right:12.5%}.g-b--pull--t3of8{margin-right:37.5%}.g-b--pull--t5of8{margin-right:62.5%}.g-b--pull--t7of8{margin-right:87.5%}.g-b--pull--t1of10{margin-right:10%}.g-b--pull--t3of10{margin-right:30%}.g-b--pull--t7of10{margin-right:70%}.g-b--pull--t9of10{margin-right:90%}.g-b--pull--t1of12{margin-right:8.333%}.g-b--pull--t5of12{margin-right:41.666%}.g-b--pull--t7of12{margin-right:58.333%}.g-b--pull--t11of12{margin-right:91.666%}.splashscreen-dillinger{width:500px}.splashscreen p{font-size:1.25rem;margin-bottom:1.43749rem;padding-top:.56251rem}.title{font-size:.8rem;margin-bottom:.77999rem;padding-top:.22001rem}.title-document{font-size:1.25rem;margin-bottom:.89999rem;padding-top:.10001rem}.menu .menu-item--save-to,.menu .menu-item--import-from{display:block}.menu .menu-item--preview,.menu .menu-item--save-to.in-sidebar,.menu .menu-item--import-from.in-sidebar{display:none}.settings a{font-size:1.25rem}.words{font-size:.8rem;margin-bottom:.77999rem;padding-top:.22001rem}.modal--dillinger.about .modal-dialog{font-size:1.25rem}.enter-zen-mode{display:block}.close-zen-mode{right:3rem;top:3rem}#zen{font-size:1.25rem;width:500px}.split-editor{border-right:1px solid #E8E8E8;float:left;height:calc(100vh - 130px);-webkit-overflow-scrolling:touch;padding-right:16px;width:50%}.show-preview .split-editor{display:block}.split-preview{display:block;float:right;height:calc(100vh - 130px);-webkit-overflow-scrolling:touch;position:relative;top:0;width:50%}#editor{font-size:1rem}}@media screen and (min-width:62.5em){html{font-size:.875em}body{font-size:1rem}ul,ol{margin-bottom:.83999rem;padding-top:.16001rem}p{padding-top:.66001rem}p,pre{margin-bottom:1.33999rem}pre,blockquote p{font-size:1rem;padding-top:.66001rem}blockquote p{margin-bottom:.33999rem}h1{font-size:2.0571429rem;margin-bottom:.21999rem;padding-top:.78001rem}h2{font-size:1.953125rem;margin-bottom:.1835837rem;padding-top:.8164163rem}h3{font-size:1.6457143rem;margin-bottom:.07599rem;padding-top:.92401rem}h4{font-size:1.5625rem;margin-bottom:.546865rem;padding-top:.453135rem}h5{font-size:1.25rem;margin-bottom:-.56251rem;padding-top:.56251rem}h6{font-size:1rem;margin-bottom:-.65001rem;padding-top:.65001rem}.g{margin-left:-16px;margin-right:-16px}.g-b{padding-left:16px;padding-right:16px}.g-b--d1of1{width:100%}.g-b--d1of2,.g-b--d2of4,.g-b--d3of6,.g-b--d4of8,.g-b--d5of10,.g-b--d6of12{width:50%}.g-b--d1of3,.g-b--d2of6,.g-b--d4of12{width:33.333%}.g-b--d2of3,.g-b--d4of6,.g-b--d8of12{width:66.666%}.g-b--d1of4,.g-b--d2of8,.g-b--d3of12{width:25%}.g-b--d3of4,.g-b--d6of8,.g-b--d9of12{width:75%}.g-b--d1of5,.g-b--d2of10{width:20%}.g-b--d2of5,.g-b--d4of10{width:40%}.g-b--d3of5,.g-b--d6of10{width:60%}.g-b--d4of5,.g-b--d8of10{width:80%}.g-b--d1of6,.g-b--d2of12{width:16.666%}.g-b--d5of6,.g-b--d10of12{width:83.333%}.g-b--d1of8{width:12.5%}.g-b--d3of8{width:37.5%}.g-b--d5of8{width:62.5%}.g-b--d7of8{width:87.5%}.g-b--d1of10{width:10%}.g-b--d3of10{width:30%}.g-b--d7of10{width:70%}.g-b--d9of10{width:90%}.g-b--d1of12{width:8.333%}.g-b--d5of12{width:41.666%}.g-b--d7of12{width:58.333%}.g-b--d11of12{width:91.666%}.g-b--push--d1of1{margin-left:100%}.g-b--push--d1of2,.g-b--push--d2of4,.g-b--push--d3of6,.g-b--push--d4of8,.g-b--push--d5of10,.g-b--push--d6of12{margin-left:50%}.g-b--push--d1of3,.g-b--push--d2of6,.g-b--push--d4of12{margin-left:33.333%}.g-b--push--d2of3,.g-b--push--d4of6,.g-b--push--d8of12{margin-left:66.666%}.g-b--push--d1of4,.g-b--push--d2of8,.g-b--push--d3of12{margin-left:25%}.g-b--push--d3of4,.g-b--push--d6of8,.g-b--push--d9of12{margin-left:75%}.g-b--push--d1of5,.g-b--push--d2of10{margin-left:20%}.g-b--push--d2of5,.g-b--push--d4of10{margin-left:40%}.g-b--push--d3of5,.g-b--push--d6of10{margin-left:60%}.g-b--push--d4of5,.g-b--push--d8of10{margin-left:80%}.g-b--push--d1of6,.g-b--push--d2of12{margin-left:16.666%}.g-b--push--d5of6,.g-b--push--d10of12{margin-left:83.333%}.g-b--push--d1of8{margin-left:12.5%}.g-b--push--d3of8{margin-left:37.5%}.g-b--push--d5of8{margin-left:62.5%}.g-b--push--d7of8{margin-left:87.5%}.g-b--push--d1of10{margin-left:10%}.g-b--push--d3of10{margin-left:30%}.g-b--push--d7of10{margin-left:70%}.g-b--push--d9of10{margin-left:90%}.g-b--push--d1of12{margin-left:8.333%}.g-b--push--d5of12{margin-left:41.666%}.g-b--push--d7of12{margin-left:58.333%}.g-b--push--d11of12{margin-left:91.666%}.g-b--pull--d1of1{margin-right:100%}.g-b--pull--d1of2,.g-b--pull--d2of4,.g-b--pull--d3of6,.g-b--pull--d4of8,.g-b--pull--d5of10,.g-b--pull--d6of12{margin-right:50%}.g-b--pull--d1of3,.g-b--pull--d2of6,.g-b--pull--d4of12{margin-right:33.333%}.g-b--pull--d2of3,.g-b--pull--d4of6,.g-b--pull--d8of12{margin-right:66.666%}.g-b--pull--d1of4,.g-b--pull--d2of8,.g-b--pull--d3of12{margin-right:25%}.g-b--pull--d3of4,.g-b--pull--d6of8,.g-b--pull--d9of12{margin-right:75%}.g-b--pull--d1of5,.g-b--pull--d2of10{margin-right:20%}.g-b--pull--d2of5,.g-b--pull--d4of10{margin-right:40%}.g-b--pull--d3of5,.g-b--pull--d6of10{margin-right:60%}.g-b--pull--d4of5,.g-b--pull--d8of10{margin-right:80%}.g-b--pull--d1of6,.g-b--pull--d2of12{margin-right:16.666%}.g-b--pull--d5of6,.g-b--pull--d10of12{margin-right:83.333%}.g-b--pull--d1of8{margin-right:12.5%}.g-b--pull--d3of8{margin-right:37.5%}.g-b--pull--d5of8{margin-right:62.5%}.g-b--pull--d7of8{margin-right:87.5%}.g-b--pull--d1of10{margin-right:10%}.g-b--pull--d3of10{margin-right:30%}.g-b--pull--d7of10{margin-right:70%}.g-b--pull--d9of10{margin-right:90%}.g-b--pull--d1of12{margin-right:8.333%}.g-b--pull--d5of12{margin-right:41.666%}.g-b--pull--d7of12{margin-right:58.333%}.g-b--pull--d11of12{margin-right:91.666%}.splashscreen-dillinger{width:700px}.splashscreen p{font-size:1.25rem;margin-bottom:1.43749rem;padding-top:.56251rem}.title{font-size:.8rem;margin-bottom:.77999rem;padding-top:.22001rem}.title-document{font-size:1.25rem;margin-bottom:.89999rem;padding-top:.10001rem}.menu .menu-item--export-as{display:block}.menu .menu-item--preview{display:none}.settings a{font-size:1.25rem}.words{font-size:.8rem;margin-bottom:.77999rem;padding-top:.22001rem}.modal--dillinger.about .modal-dialog,#zen{font-size:1.25rem}#zen{width:700px}#editor{font-size:1rem}}@media screen and (min-width:87.5em){html{font-size:.875em}body{font-size:1rem}ul,ol{margin-bottom:.83999rem;padding-top:.16001rem}p{padding-top:.66001rem}p,pre{margin-bottom:1.33999rem}pre,blockquote p{font-size:1rem;padding-top:.66001rem}blockquote p{margin-bottom:.33999rem}h1{font-size:2.0571429rem;margin-bottom:.21999rem;padding-top:.78001rem}h2{font-size:1.953125rem;margin-bottom:.1835837rem;padding-top:.8164163rem}h3{font-size:1.6457143rem;margin-bottom:.07599rem;padding-top:.92401rem}h4{font-size:1.5625rem;margin-bottom:.546865rem;padding-top:.453135rem}h5{font-size:1.25rem;margin-bottom:-.56251rem;padding-top:.56251rem}h6{font-size:1rem;margin-bottom:-.65001rem;padding-top:.65001rem}.splashscreen-dillinger{width:800px}.splashscreen p{font-size:1.25rem;margin-bottom:1.43749rem;padding-top:.56251rem}.title{font-size:.8rem;margin-bottom:.77999rem;padding-top:.22001rem}.title-document{margin-bottom:.89999rem;padding-top:.10001rem}.title-document,.settings a{font-size:1.25rem}.words{font-size:.8rem;margin-bottom:.77999rem;padding-top:.22001rem}.modal--dillinger.about .modal-dialog,#zen{font-size:1.25rem}#editor{font-size:1rem}}</style></head><body id="preview"> <p>When you encounter a bug, I encourage you to follow these steps to make it easier for me to troubleshoot. <ol> <li>Can you start a new instance of Happypanda and reproduce the bug? <ul> <li>If that’s not the case then skip the steps below and go to <strong>How to report</strong> <ol> <li>First close all instances of Happypanda.</li> <li>Open a command prompt *(terminal in <em>nix)</em> and navigate to where Happypanda is installed. <em>Eg.: <code>cd path/to/happypanda</code></em></li> <li>Now type the name of the main executable with a <code>-d</code> following, <em>eg.: <code>happypanda.exe -d</code> or <code>main.py -d</code> if you’re running from source.</em></li> <li>The program will now open and create a new file named <code>happypanda_debug.log</code></li> <li>Now you try to reproduce the error/bug</li> </ol> </li> </ul> </li> </ol> <h3><a id="How_to_report_12"></a>How to report</h3> <p>If you completed the steps above, make sure to include the <code>happypanda_debug.log</code> file which was created and a description of how you reproduced the error/bug.</p> <ol> <li>Navigate to where you installed Happypanda with a file explorer and find <code>happypanda.log</code>. Send it to me with a description of the bug.</li> <li>You have 3 options of contacting me: <ul> <li>Go to the github repo <a href="https://github.com/Pewpews/happypanda/issues">issue page</a> and create a new issue</li> <li>Enter the gitter chat <a href="https://gitter.im/Pewpews/happypanda">here</a> and tell me about your issue</li> <li>If for some reason you don’t want anything to do with github, feel free to email me: <code>happypandabugs@gmail.com</code></li> </ul> </li> </ol> </body></html> """ ) SEARCH_TUTORIAL_TAGS = ( """ <!DOCTYPE html><html><head><meta charset="utf-8"><title>Untitled Document.md</title><style>@import 'https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.2.0/katex.min.css';code{color:#c7254e;background-color:#f9f2f4;border-radius:4px}code,kbd{padding:2px 4px}kbd{color:#fff;background-color:#333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;box-shadow:none}pre{display:block;margin:0 0 10px;word-break:break-all;word-wrap:break-word;color:#333;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}fieldset{border:0;min-width:0}legend{display:block;width:100%;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type="radio"],input[type="checkbox"]{margin:1px 0 0;line-height:normal}input[type="file"]{display:block}input[type="range"]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{padding-top:7px}output,.form-control{display:block;font-size:14px;line-height:1.4285714;color:#555}.form-control{width:100%;height:34px;padding:6px 12px;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#777;opacity:1}.form-control:-ms-input-placeholder{color:#777}.form-control::-webkit-input-placeholder{color:#777}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee;opacity:1}textarea.form-control{height:auto}input[type="date"],input[type="time"],input[type="datetime-local"],input[type="month"]{line-height:34px;line-height:1.4285714 \0}input[type="date"].input-sm,.form-horizontal .form-group-sm input[type="date"].form-control,.input-group-sm>input[type="date"].form-control,.input-group-sm>input[type="date"].input-group-addon,.input-group-sm>.input-group-btn>input[type="date"].btn,input[type="time"].input-sm,.form-horizontal .form-group-sm input[type="time"].form-control,.input-group-sm>input[type="time"].form-control,.input-group-sm>input[type="time"].input-group-addon,.input-group-sm>.input-group-btn>input[type="time"].btn,input[type="datetime-local"].input-sm,.form-horizontal .form-group-sm input[type="datetime-local"].form-control,.input-group-sm>input[type="datetime-local"].form-control,.input-group-sm>input[type="datetime-local"].input-group-addon,.input-group-sm>.input-group-btn>input[type="datetime-local"].btn,input[type="month"].input-sm,.form-horizontal .form-group-sm input[type="month"].form-control,.input-group-sm>input[type="month"].form-control,.input-group-sm>input[type="month"].input-group-addon,.input-group-sm>.input-group-btn>input[type="month"].btn{line-height:30px}input[type="date"].input-lg,.form-horizontal .form-group-lg input[type="date"].form-control,.input-group-lg>input[type="date"].form-control,.input-group-lg>input[type="date"].input-group-addon,.input-group-lg>.input-group-btn>input[type="date"].btn,input[type="time"].input-lg,.form-horizontal .form-group-lg input[type="time"].form-control,.input-group-lg>input[type="time"].form-control,.input-group-lg>input[type="time"].input-group-addon,.input-group-lg>.input-group-btn>input[type="time"].btn,input[type="datetime-local"].input-lg,.form-horizontal .form-group-lg input[type="datetime-local"].form-control,.input-group-lg>input[type="datetime-local"].form-control,.input-group-lg>input[type="datetime-local"].input-group-addon,.input-group-lg>.input-group-btn>input[type="datetime-local"].btn,input[type="month"].input-lg,.form-horizontal .form-group-lg input[type="month"].form-control,.input-group-lg>input[type="month"].form-control,.input-group-lg>input[type="month"].input-group-addon,.input-group-lg>.input-group-btn>input[type="month"].btn{line-height:46px}.form-group{margin-bottom:15px}.radio,.checkbox{position:relative;display:block;min-height:20px;margin-top:10px;margin-bottom:10px}.radio label,.checkbox label{padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.radio input[type="radio"],.radio-inline input[type="radio"],.checkbox input[type="checkbox"],.checkbox-inline input[type="checkbox"]{position:absolute;margin-left:-20px;margin-top:4px \9}.radio+.radio,.checkbox+.checkbox{margin-top:-5px}.radio-inline,.checkbox-inline{display:inline-block;padding-left:20px;margin-bottom:0;vertical-align:middle;font-weight:400;cursor:pointer}.radio-inline+.radio-inline,.checkbox-inline+.checkbox-inline{margin-top:0;margin-left:10px}input[type="radio"][disabled],input[type="radio"].disabled,fieldset[disabled] input[type="radio"],input[type="checkbox"][disabled],input[type="checkbox"].disabled,fieldset[disabled] input[type="checkbox"],.radio-inline.disabled,fieldset[disabled] .radio-inline,.checkbox-inline.disabled,fieldset[disabled] .checkbox-inline,.radio.disabled label,fieldset[disabled] .radio label,.checkbox.disabled label,fieldset[disabled] .checkbox label{cursor:not-allowed}.form-control-static{padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-horizontal .form-group-lg .form-control-static.form-control,.input-group-lg>.form-control-static.form-control,.input-group-lg>.form-control-static.input-group-addon,.input-group-lg>.input-group-btn>.form-control-static.btn,.form-control-static.input-sm,.form-horizontal .form-group-sm .form-control-static.form-control,.input-group-sm>.form-control-static.form-control,.input-group-sm>.form-control-static.input-group-addon,.input-group-sm>.input-group-btn>.form-control-static.btn{padding-left:0;padding-right:0}.input-sm,.form-horizontal .form-group-sm .form-control,.input-group-sm>.form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.input-group-sm>.input-group-addon{height:30px;line-height:1.5}.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm,.form-horizontal .form-group-sm select.form-control,.input-group-sm>select.form-control,.input-group-sm>select.input-group-addon,.input-group-sm>.input-group-btn>select.btn{height:30px;line-height:30px}textarea.input-sm,.form-horizontal .form-group-sm textarea.form-control,.input-group-sm>textarea.form-control,.input-group-sm>textarea.input-group-addon,.input-group-sm>.input-group-btn>textarea.btn,select[multiple].input-sm,.form-horizontal .form-group-sm select[multiple].form-control,.input-group-sm>select[multiple].form-control,.input-group-sm>select[multiple].input-group-addon,.input-group-sm>.input-group-btn>select[multiple].btn{height:auto}.input-lg,.form-horizontal .form-group-lg .form-control,.input-group-lg>.form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.input-group-lg>.input-group-addon{height:46px;line-height:1.33}.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-lg,.form-horizontal .form-group-lg select.form-control,.input-group-lg>select.form-control,.input-group-lg>select.input-group-addon,.input-group-lg>.input-group-btn>select.btn{height:46px;line-height:46px}textarea.input-lg,.form-horizontal .form-group-lg textarea.form-control,.input-group-lg>textarea.form-control,.input-group-lg>textarea.input-group-addon,.input-group-lg>.input-group-btn>textarea.btn,select[multiple].input-lg,.form-horizontal .form-group-lg select[multiple].form-control,.input-group-lg>select[multiple].form-control,.input-group-lg>select[multiple].input-group-addon,.input-group-lg>.input-group-btn>select[multiple].btn{height:auto}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:25px;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center}.input-lg+.form-control-feedback,.form-horizontal .form-group-lg .form-control+.form-control-feedback,.input-group-lg>.form-control+.form-control-feedback,.input-group-lg>.input-group-addon+.form-control-feedback,.input-group-lg>.input-group-btn>.btn+.form-control-feedback{width:46px;height:46px;line-height:46px}.input-sm+.form-control-feedback,.form-horizontal .form-group-sm .form-control+.form-control-feedback,.input-group-sm>.form-control+.form-control-feedback,.input-group-sm>.input-group-addon+.form-control-feedback,.input-group-sm>.input-group-btn>.btn+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .help-block,.has-success .control-label,.has-success .radio,.has-success .checkbox,.has-success .radio-inline,.has-success .checkbox-inline{color:#3c763d}.has-success .form-control{border-color:#3c763d;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;border-color:#3c763d;background-color:#dff0d8}.has-success .form-control-feedback{color:#3c763d}.has-warning .help-block,.has-warning .control-label,.has-warning .radio,.has-warning .checkbox,.has-warning .radio-inline,.has-warning .checkbox-inline{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;border-color:#8a6d3b;background-color:#fcf8e3}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .help-block,.has-error .control-label,.has-error .radio,.has-error .checkbox,.has-error .radio-inline,.has-error .checkbox-inline{color:#a94442}.has-error .form-control{border-color:#a94442;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;border-color:#a94442;background-color:#f2dede}.has-error .form-control-feedback{color:#a94442}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}.form-horizontal .radio,.form-horizontal .checkbox,.form-horizontal .radio-inline,.form-horizontal .checkbox-inline{margin-top:0;margin-bottom:0;padding-top:7px}.form-horizontal .radio,.form-horizontal .checkbox{min-height:27px}.form-horizontal .form-group{margin-left:-15px;margin-right:-15px}.form-horizontal .form-group:before{content:" ";display:table}.form-horizontal .form-group:after{content:" ";display:table;clear:both}.form-horizontal .has-feedback .form-control-feedback{top:0;right:15px}.btn{display:inline-block;vertical-align:middle;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn:focus,.btn:active:focus,.btn.active:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:hover,.btn:focus{color:#333;text-decoration:none}.btn:active,.btn.active{outline:0;background-image:none;box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;pointer-events:none;opacity:.65;filter:alpha(opacity=65);box-shadow:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default:hover,.btn-default:focus,.btn-default:active,.btn-default.active,.open>.btn-default.dropdown-toggle{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default:active,.btn-default.active,.open>.btn-default.dropdown-toggle{background-image:none}.btn-default.disabled,.btn-default.disabled:hover,.btn-default.disabled:focus,.btn-default.disabled:active,.btn-default.disabled.active,.btn-default[disabled],.btn-default[disabled]:hover,.btn-default[disabled]:focus,.btn-default[disabled]:active,.btn-default[disabled].active,fieldset[disabled] .btn-default,fieldset[disabled] .btn-default:hover,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:active,fieldset[disabled] .btn-default.active{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#428bca;border-color:#357ebd}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.open>.btn-primary.dropdown-toggle{color:#fff;background-color:#3071a9;border-color:#285e8e}.btn-primary:active,.btn-primary.active,.open>.btn-primary.dropdown-toggle{background-image:none}.btn-primary.disabled,.btn-primary.disabled:hover,.btn-primary.disabled:focus,.btn-primary.disabled:active,.btn-primary.disabled.active,.btn-primary[disabled],.btn-primary[disabled]:hover,.btn-primary[disabled]:focus,.btn-primary[disabled]:active,.btn-primary[disabled].active,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-primary:hover,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:active,fieldset[disabled] .btn-primary.active{background-color:#428bca;border-color:#357ebd}.btn-primary .badge{color:#428bca;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.open>.btn-success.dropdown-toggle{color:#fff;background-color:#449d44;border-color:#398439}.btn-success:active,.btn-success.active,.open>.btn-success.dropdown-toggle{background-image:none}.btn-success.disabled,.btn-success.disabled:hover,.btn-success.disabled:focus,.btn-success.disabled:active,.btn-success.disabled.active,.btn-success[disabled],.btn-success[disabled]:hover,.btn-success[disabled]:focus,.btn-success[disabled]:active,.btn-success[disabled].active,fieldset[disabled] .btn-success,fieldset[disabled] .btn-success:hover,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:active,fieldset[disabled] .btn-success.active{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.open>.btn-info.dropdown-toggle{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info:active,.btn-info.active,.open>.btn-info.dropdown-toggle{background-image:none}.btn-info.disabled,.btn-info.disabled:hover,.btn-info.disabled:focus,.btn-info.disabled:active,.btn-info.disabled.active,.btn-info[disabled],.btn-info[disabled]:hover,.btn-info[disabled]:focus,.btn-info[disabled]:active,.btn-info[disabled].active,fieldset[disabled] .btn-info,fieldset[disabled] .btn-info:hover,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:active,fieldset[disabled] .btn-info.active{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.open>.btn-warning.dropdown-toggle{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning:active,.btn-warning.active,.open>.btn-warning.dropdown-toggle{background-image:none}.btn-warning.disabled,.btn-warning.disabled:hover,.btn-warning.disabled:focus,.btn-warning.disabled:active,.btn-warning.disabled.active,.btn-warning[disabled],.btn-warning[disabled]:hover,.btn-warning[disabled]:focus,.btn-warning[disabled]:active,.btn-warning[disabled].active,fieldset[disabled] .btn-warning,fieldset[disabled] .btn-warning:hover,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:active,fieldset[disabled] .btn-warning.active{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.open>.btn-danger.dropdown-toggle{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger:active,.btn-danger.active,.open>.btn-danger.dropdown-toggle{background-image:none}.btn-danger.disabled,.btn-danger.disabled:hover,.btn-danger.disabled:focus,.btn-danger.disabled:active,.btn-danger.disabled.active,.btn-danger[disabled],.btn-danger[disabled]:hover,.btn-danger[disabled]:focus,.btn-danger[disabled]:active,.btn-danger[disabled].active,fieldset[disabled] .btn-danger,fieldset[disabled] .btn-danger:hover,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:active,fieldset[disabled] .btn-danger.active{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{color:#428bca;font-weight:400;cursor:pointer;border-radius:0}.btn-link,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;box-shadow:none}.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active{border-color:transparent}.btn-link:hover,.btn-link:focus{color:#2a6496;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,.btn-link[disabled]:focus,fieldset[disabled] .btn-link:hover,fieldset[disabled] .btn-link:focus{color:#777;text-decoration:none}.btn-lg{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.btn-sm{padding:5px 10px}.btn-sm,.btn-xs{font-size:12px;line-height:1.5;border-radius:3px}.btn-xs{padding:1px 5px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;transition:height .35s ease}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*="col-"]{float:none;padding-left:0;padding-right:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon{white-space:nowrap}.input-group-addon,.input-group-btn{width:1%;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm,.form-horizontal .form-group-sm .input-group-addon.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.input-group-addon.btn{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg,.form-horizontal .form-group-lg .input-group-addon.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.input-group-addon.btn{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type="radio"],.input-group-addon input[type="checkbox"]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group-btn:last-child>.btn-group:not(:last-child)>.btn{border-bottom-right-radius:0;border-top-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:first-child>.btn-group:not(:first-child)>.btn{border-bottom-left-radius:0;border-top-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{font-size:0;white-space:nowrap}.input-group-btn,.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:hover,.input-group-btn>.btn:focus,.input-group-btn>.btn:active{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{margin-left:-1px}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;line-height:1.4285714;text-decoration:none;color:#428bca;background-color:#fff;border:1px solid #ddd;margin-left:-1px}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-bottom-left-radius:4px;border-top-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-bottom-right-radius:4px;border-top-right-radius:4px}.pagination>li>a:hover,.pagination>li>a:focus,.pagination>li>span:hover,.pagination>li>span:focus{color:#2a6496;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:hover,.pagination>.active>a:focus,.pagination>.active>span,.pagination>.active>span:hover,.pagination>.active>span:focus{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca;cursor:default}.pagination>.disabled>span,.pagination>.disabled>span:hover,.pagination>.disabled>span:focus,.pagination>.disabled>a,.pagination>.disabled>a:hover,.pagination>.disabled>a:focus{color:#777;background-color:#fff;border-color:#ddd;cursor:not-allowed}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-bottom-left-radius:6px;border-top-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-bottom-right-radius:6px;border-top-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-bottom-left-radius:3px;border-top-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-bottom-right-radius:3px;border-top-right-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;opacity:.5;filter:alpha(opacity=50)}button.close{padding:0;cursor:pointer;background:0 0;border:0;-webkit-appearance:none}.modal-open,.modal{overflow:hidden}.modal{display:none;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transform:translate3d(0,-25%,0);transform:translate3d(0,-25%,0);-webkit-transition:-webkit-transform .3s ease-out;transition:transform .3s ease-out}.modal.in .modal-dialog{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 3px 9px rgba(0,0,0,.5);background-clip:padding-box;outline:0}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0;filter:alpha(opacity=0)}.modal-backdrop.in{opacity:.5;filter:alpha(opacity=50)}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5;min-height:16.4285714px}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.4285714}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer:before,.modal-footer:after{content:" ";display:table}.modal-footer:after{clear:both}.modal-footer .btn+.btn{margin-left:5px;margin-bottom:0}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.clearfix:before,.clearfix:after{content:" ";display:table}.clearfix:after{clear:both}.center-block{display:block;margin-left:auto;margin-right:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important;visibility:hidden!important}.affix{position:fixed;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.hljs{display:block;overflow-x:auto;padding:.5em;background:#002b36;color:#839496;-webkit-text-size-adjust:none}.hljs-comment,.hljs-template_comment,.diff .hljs-header,.hljs-doctype,.hljs-pi,.lisp .hljs-string,.hljs-javadoc{color:#586e75}.hljs-keyword,.hljs-winutils,.method,.hljs-addition,.css .hljs-tag,.hljs-request,.hljs-status,.nginx .hljs-title{color:#859900}.hljs-number,.hljs-command,.hljs-string,.hljs-tag .hljs-value,.hljs-rules .hljs-value,.hljs-phpdoc,.hljs-dartdoc,.tex .hljs-formula,.hljs-regexp,.hljs-hexcolor,.hljs-link_url{color:#2aa198}.hljs-title,.hljs-localvars,.hljs-chunk,.hljs-decorator,.hljs-built_in,.hljs-identifier,.vhdl .hljs-literal,.hljs-id,.css .hljs-function{color:#268bd2}.hljs-attribute,.hljs-variable,.lisp .hljs-body,.smalltalk .hljs-number,.hljs-constant,.hljs-class .hljs-title,.hljs-parent,.hljs-type,.hljs-link_reference{color:#b58900}.hljs-preprocessor,.hljs-preprocessor .hljs-keyword,.hljs-pragma,.hljs-shebang,.hljs-symbol,.hljs-symbol .hljs-string,.diff .hljs-change,.hljs-special,.hljs-attr_selector,.hljs-subst,.hljs-cdata,.css .hljs-pseudo,.hljs-header{color:#cb4b16}.hljs-deletion,.hljs-important{color:#dc322f}.hljs-link_label{color:#6c71c4}.tex .hljs-formula{background:#073642}*,*:before,*:after{box-sizing:border-box}html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:0 0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}images{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd{font-size:1em}code,kbd,pre,samp{font-family:monospace,monospace}samp{font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}.debug{background-color:#ffc0cb!important}.ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ir{background-color:transparent;border:0;overflow:hidden}.ir::before{content:'';display:block;height:150%;width:0}html{font-size:.875em;background:#fafafa;color:#373D49}html,body{font-family:Georgia,Cambria,serif;height:100%}body{font-size:1rem;font-weight:400;line-height:2rem}ul,ol{margin-bottom:.83999rem;padding-top:.16001rem}li{-webkit-font-feature-settings:'kern' 1,'onum' 1,'liga' 1;-moz-font-feature-settings:'kern' 1,'onum' 1,'liga' 1;font-feature-settings:'kern' 1,'onum' 1,'liga' 1;margin-left:1rem}li>ul,li>ol{margin-bottom:0}p{padding-top:.66001rem;-webkit-font-feature-settings:'kern' 1,'onum' 1,'liga' 1;-moz-font-feature-settings:'kern' 1,'onum' 1,'liga' 1;font-feature-settings:'kern' 1,'onum' 1,'liga' 1;margin-top:0}p,pre{margin-bottom:1.33999rem}pre{font-size:1rem;padding:.66001rem 9.5px 9.5px;line-height:2rem;background:-webkit-linear-gradient(top,#fff 0,#fff .75rem,#f5f7fa .75rem,#f5f7fa 2.75rem,#fff 2.75rem,#fff 4rem);background:linear-gradient(to bottom,#fff 0,#fff .75rem,#f5f7fa .75rem,#f5f7fa 2.75rem,#fff 2.75rem,#fff 4rem);background-size:100% 4rem;border-color:#D3DAEA}blockquote{margin:0}blockquote p{font-size:1rem;margin-bottom:.33999rem;font-style:italic;padding:.66001rem 1rem 1rem;border-left:3px solid #A0AABF}th,td{padding:12px}h1,h2,h3,h4,h5,h6{font-family:"Source Sans Pro","Helvetica Neue",Helvetica,Arial,sans-serif;-webkit-font-feature-settings:'dlig' 1,'liga' 1,'lnum' 1,'kern' 1;-moz-font-feature-settings:'dlig' 1,'liga' 1,'lnum' 1,'kern' 1;font-feature-settings:'dlig' 1,'liga' 1,'lnum' 1,'kern' 1;font-style:normal;font-weight:600;margin-top:0}h1{line-height:3rem;font-size:2.0571429rem;margin-bottom:.21999rem;padding-top:.78001rem}h2{font-size:1.953125rem;margin-bottom:.1835837rem;padding-top:.8164163rem}h2,h3{line-height:3rem}h3{font-size:1.6457143rem;margin-bottom:.07599rem;padding-top:.92401rem}h4{font-size:1.5625rem;margin-bottom:.546865rem;padding-top:.453135rem}h5{font-size:1.25rem;margin-bottom:-.56251rem;padding-top:.56251rem}h6{font-size:1rem;margin-bottom:-.65001rem;padding-top:.65001rem}a{cursor:pointer;color:#35D7BB;text-decoration:none}a:hover,a:focus{border-bottom-color:#35D7BB;color:#dff9f4}img{height:auto;max-width:100%}.g{display:block}.g:after{clear:both;content:'';display:table}.g-b{float:left;margin:0;width:100%}.g{margin-left:-16px;margin-right:-16px}.g-b{padding-left:16px;padding-right:16px}.g-b--center{display:block;float:none;margin:0 auto}.g-b--right{float:right}.g-b--1of1{width:100%}.g-b--1of2,.g-b--2of4,.g-b--3of6,.g-b--4of8,.g-b--5of10,.g-b--6of12{width:50%}.g-b--1of3,.g-b--2of6,.g-b--4of12{width:33.333%}.g-b--2of3,.g-b--4of6,.g-b--8of12{width:66.666%}.g-b--1of4,.g-b--2of8,.g-b--3of12{width:25%}.g-b--3of4,.g-b--6of8,.g-b--9of12{width:75%}.g-b--1of5,.g-b--2of10{width:20%}.g-b--2of5,.g-b--4of10{width:40%}.g-b--3of5,.g-b--6of10{width:60%}.g-b--4of5,.g-b--8of10{width:80%}.g-b--1of6,.g-b--2of12{width:16.666%}.g-b--5of6,.g-b--10of12{width:83.333%}.g-b--1of8{width:12.5%}.g-b--3of8{width:37.5%}.g-b--5of8{width:62.5%}.g-b--7of8{width:87.5%}.g-b--1of10{width:10%}.g-b--3of10{width:30%}.g-b--7of10{width:70%}.g-b--9of10{width:90%}.g-b--1of12{width:8.333%}.g-b--5of12{width:41.666%}.g-b--7of12{width:58.333%}.g-b--11of12{width:91.666%}.g-b--push--1of1{margin-left:100%}.g-b--push--1of2,.g-b--push--2of4,.g-b--push--3of6,.g-b--push--4of8,.g-b--push--5of10,.g-b--push--6of12{margin-left:50%}.g-b--push--1of3,.g-b--push--2of6,.g-b--push--4of12{margin-left:33.333%}.g-b--push--2of3,.g-b--push--4of6,.g-b--push--8of12{margin-left:66.666%}.g-b--push--1of4,.g-b--push--2of8,.g-b--push--3of12{margin-left:25%}.g-b--push--3of4,.g-b--push--6of8,.g-b--push--9of12{margin-left:75%}.g-b--push--1of5,.g-b--push--2of10{margin-left:20%}.g-b--push--2of5,.g-b--push--4of10{margin-left:40%}.g-b--push--3of5,.g-b--push--6of10{margin-left:60%}.g-b--push--4of5,.g-b--push--8of10{margin-left:80%}.g-b--push--1of6,.g-b--push--2of12{margin-left:16.666%}.g-b--push--5of6,.g-b--push--10of12{margin-left:83.333%}.g-b--push--1of8{margin-left:12.5%}.g-b--push--3of8{margin-left:37.5%}.g-b--push--5of8{margin-left:62.5%}.g-b--push--7of8{margin-left:87.5%}.g-b--push--1of10{margin-left:10%}.g-b--push--3of10{margin-left:30%}.g-b--push--7of10{margin-left:70%}.g-b--push--9of10{margin-left:90%}.g-b--push--1of12{margin-left:8.333%}.g-b--push--5of12{margin-left:41.666%}.g-b--push--7of12{margin-left:58.333%}.g-b--push--11of12{margin-left:91.666%}.g-b--pull--1of1{margin-right:100%}.g-b--pull--1of2,.g-b--pull--2of4,.g-b--pull--3of6,.g-b--pull--4of8,.g-b--pull--5of10,.g-b--pull--6of12{margin-right:50%}.g-b--pull--1of3,.g-b--pull--2of6,.g-b--pull--4of12{margin-right:33.333%}.g-b--pull--2of3,.g-b--pull--4of6,.g-b--pull--8of12{margin-right:66.666%}.g-b--pull--1of4,.g-b--pull--2of8,.g-b--pull--3of12{margin-right:25%}.g-b--pull--3of4,.g-b--pull--6of8,.g-b--pull--9of12{margin-right:75%}.g-b--pull--1of5,.g-b--pull--2of10{margin-right:20%}.g-b--pull--2of5,.g-b--pull--4of10{margin-right:40%}.g-b--pull--3of5,.g-b--pull--6of10{margin-right:60%}.g-b--pull--4of5,.g-b--pull--8of10{margin-right:80%}.g-b--pull--1of6,.g-b--pull--2of12{margin-right:16.666%}.g-b--pull--5of6,.g-b--pull--10of12{margin-right:83.333%}.g-b--pull--1of8{margin-right:12.5%}.g-b--pull--3of8{margin-right:37.5%}.g-b--pull--5of8{margin-right:62.5%}.g-b--pull--7of8{margin-right:87.5%}.g-b--pull--1of10{margin-right:10%}.g-b--pull--3of10{margin-right:30%}.g-b--pull--7of10{margin-right:70%}.g-b--pull--9of10{margin-right:90%}.g-b--pull--1of12{margin-right:8.333%}.g-b--pull--5of12{margin-right:41.666%}.g-b--pull--7of12{margin-right:58.333%}.g-b--pull--11of12{margin-right:91.666%}.splashscreen{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#373D49;z-index:22}.splashscreen-dillinger{width:260px;height:auto;display:block;margin:0 auto;padding-bottom:3rem}.splashscreen p{font-size:1.25rem;padding-top:.56251rem;font-family:"Source Sans Pro","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;text-align:center;max-width:500px;margin:0 auto;color:#FFF}.sp-center{position:relative;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);top:50%}.open-menu>.wrapper{overflow-x:hidden}.page{margin:0 auto;position:relative;top:0;left:0;width:100%;height:100%;z-index:2;-webkit-transition:all .25s ease-in-out;transition:all .25s ease-in-out;background-color:#fff;padding-top:51px;will-change:left}.open-menu .page{left:270px}.title{line-height:1rem;font-size:.8rem;margin-bottom:.77999rem;padding-top:.22001rem;font-weight:500;color:#A0AABF;letter-spacing:1px;text-transform:uppercase;padding-left:16px;padding-right:16px;margin-top:1rem}.split-preview .title{padding-left:0}.title-document{line-height:1rem;font-size:1.25rem;margin-bottom:.89999rem;padding-top:.10001rem;font-weight:400;font-family:"Ubuntu Mono",Monaco;color:#373D49;padding-left:16px;padding-right:16px;width:80%;min-width:300px;outline:0;border:none}.icon{display:block;margin:0 auto;width:36px;height:36px;border-radius:3px;text-align:center}.icon svg{display:inline-block;margin-left:auto;margin-right:auto}.icon-preview{background-color:#373D49;line-height:40px}.icon-preview svg{width:19px;height:12px}.icon-settings{background-color:#373D49;line-height:44px}.icon-settings svg{width:18px;height:18px}.icon-link{width:16px;height:16px;line-height:1;margin-right:24px;text-align:right}.navbar{background-color:#373D49;height:51px;width:100%;position:fixed;top:0;left:0;z-index:6;-webkit-transition:all .25s ease-in-out;transition:all .25s ease-in-out;will-change:left}.navbar:after{content:"";display:table;clear:both}.open-menu .navbar{left:270px}.navbar-brand{float:left;margin:0 0 0 24px;padding:0;line-height:42px}.navbar-brand svg{width:85px;height:11px}.nav-left{float:left}.nav-right{float:right}.nav-sidebar{width:100%}.menu{list-style:none;margin:0;padding:0}.menu a{border:0;color:#A0AABF;font-family:"Source Sans Pro","Helvetica Neue",Helvetica,Arial,sans-serif;outline:none;text-transform:uppercase}.menu a:hover{color:#35D7BB}.menu .menu-item{border:0;display:none;float:left;margin:0;position:relative}.menu .menu-item>a{display:block;font-size:12px;height:51px;letter-spacing:1px;line-height:51px;padding:0 24px}.menu .menu-item--settings,.menu .menu-item--preview,.menu .menu-item--save-to.in-sidebar,.menu .menu-item--import-from.in-sidebar,.menu .menu-item--link-unlink.in-sidebar,.menu .menu-item--documents.in-sidebar{display:block}.menu .menu-item--documents{padding-bottom:1rem}.menu .menu-item.open>a{background-color:#1D212A}.menu .menu-item-icon>a{height:auto;padding:0}.menu .menu-item-icon:hover>a{background-color:transparent}.menu .menu-link.open i{background-color:#1D212A}.menu .menu-link.open g{fill:#35D7BB}.menu .menu-link-preview,.menu .menu-link-settings{margin-top:8px;width:51px}.menu-sidebar{width:100%}.menu-sidebar .menu-item{float:none;margin-bottom:1px;width:100%}.menu-sidebar .menu-item.open>a{background-color:#373D49}.menu-sidebar .open .caret{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.menu-sidebar>.menu-item:hover .dropdown a,.menu-sidebar>.menu-item:hover .settings a{background-color:transparent}.menu-sidebar .menu-link{background-color:#373D49;font-weight:600}.menu-sidebar .menu-link:after{content:"";display:table;clear:both}.menu-sidebar .menu-link>span{float:left}.menu-sidebar .menu-link>.caret{float:right;text-align:right;top:22px}.menu-sidebar .dropdown,.menu-sidebar .settings{background-color:transparent;position:static;width:100%}.dropdown{position:absolute;right:0;top:51px;width:188px}.dropdown,.settings{display:none;background-color:#1D212A}.dropdown{padding:0}.dropdown,.settings,.sidebar-list{list-style:none;margin:0}.sidebar-list{padding:0}.dropdown li{margin:32px 0;padding:0 0 0 32px}.dropdown li,.settings li{line-height:1}.sidebar-list li{line-height:1;margin:32px 0;padding:0 0 0 32px}.dropdown a{color:#D0D6E2}.dropdown a,.settings a,.sidebar-list a{display:block;text-transform:none}.sidebar-list a{color:#D0D6E2}.dropdown a:after,.settings a:after,.sidebar-list a:after{content:"";display:table;clear:both}.dropdown .icon,.settings .icon,.sidebar-list .icon{float:right}.open .dropdown,.open .settings,.open .sidebar-list{display:block}.open .dropdown.collapse,.open .collapse.settings,.open .sidebar-list.collapse{display:none}.open .dropdown.collapse.in,.open .collapse.in.settings,.open .sidebar-list.collapse.in{display:block}.dropdown .unlinked .icon,.settings .unlinked .icon,.sidebar-list .unlinked .icon{opacity:.3}.dropdown.documents li,.documents.settings li,.sidebar-list.documents li{background-image:url("../img/icons/file.svg");background-position:240px center;background-repeat:no-repeat;background-size:14px 16px;padding:3px 32px}.dropdown.documents li.octocat,.documents.settings li.octocat,.sidebar-list.documents li.octocat{background-image:url("../img/icons/octocat.svg");background-position:234px center;background-size:24px 24px}.dropdown.documents li:last-child,.documents.settings li:last-child,.sidebar-list.documents li:last-child{margin-bottom:1rem}.dropdown.documents li.active a,.documents.settings li.active a,.sidebar-list.documents li.active a{color:#35D7BB}.settings{position:fixed;top:67px;right:16px;border-radius:3px;width:288px;background-color:#373D49;padding:16px;z-index:7}.show-settings .settings{display:block}.settings .has-checkbox{float:left}.settings a{font-size:1.25rem;font-family:"Source Sans Pro","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;-webkit-font-smoothing:antialiased;line-height:28px;color:#D0D6E2}.settings a:after{content:"";display:table;clear:both}.settings a:hover{color:#35D7BB}.settings li{border-bottom:1px solid #4F535B;margin:0;padding:16px 0}.settings li:last-child{border-bottom:none}.brand{border:none;display:block}.brand:hover g{fill:#35D7BB}.toggle{display:block;float:left;height:16px;padding:25px 16px 26px;width:40px}.toggle span:after,.toggle span:before{content:'';left:0;position:absolute;top:-6px}.toggle span:after{top:6px}.toggle span{display:block;position:relative}.toggle span,.toggle span:after,.toggle span:before{-webkit-backface-visibility:hidden;backface-visibility:hidden;background-color:#D3DAEA;height:2px;-webkit-transition:all .3s;transition:all .3s;width:20px}.open-menu .toggle span{background-color:transparent}.open-menu .toggle span:before{-webkit-transform:rotate(45deg)translate(3px,3px);-ms-transform:rotate(45deg)translate(3px,3px);transform:rotate(45deg)translate(3px,3px)}.open-menu .toggle span:after{-webkit-transform:rotate(-45deg)translate(5px,-6px);-ms-transform:rotate(-45deg)translate(5px,-6px);transform:rotate(-45deg)translate(5px,-6px)}.caret{display:inline-block;width:0;height:0;margin-left:6px;vertical-align:middle;position:relative;top:-1px;border-top:4px solid;border-right:4px solid transparent;border-left:4px solid transparent}.sidebar{overflow:auto;height:100%;padding-right:15px;padding-bottom:15px;width:285px}.sidebar-wrapper{-webkit-overflow-scrolling:touch;background-color:#2B2F36;left:0;height:100%;overflow-y:hidden;position:fixed;top:0;width:285px;z-index:1}.sidebar-branding{width:160px;padding:0;margin:16px auto}.header{border-bottom:1px solid #E8E8E8;position:relative}.words{line-height:1rem;font-size:.8rem;margin-bottom:.77999rem;padding-top:.22001rem;font-weight:500;font-family:"Source Sans Pro","Helvetica Neue",Helvetica,Arial,sans-serif;color:#A0AABF;letter-spacing:1px;text-transform:uppercase;z-index:5;position:absolute;right:16px;top:0}.words span{color:#000}.btn{text-align:center;display:inline-block;width:100%;text-transform:uppercase;font-weight:600;font-family:"Source Sans Pro","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;text-shadow:0 1px 0 #1b8b77;padding:16px 24px;background-color:#35D7BB;border-radius:3px;margin:0 auto 16px;line-height:1;color:#fff;-webkit-transition:all .15s linear;transition:all .15s linear;-webkit-font-smoothing:antialiased}.btn--new,.btn--save{display:block;width:238px}.btn--new:hover,.btn--new:focus,.btn--save:hover,.btn--save:focus{color:#fff;border-bottom-color:transparent;box-shadow:0 1px 3px #24b59c;text-shadow:0 1px 0 #24b59c}.btn--save{background-color:#4A5261;text-shadow:0 1px 1px #1e2127}.btn--save:hover,.btn--save:focus{color:#fff;border-bottom-color:transparent;box-shadow:0 1px 5px #08090a;text-shadow:none}.btn--delete{display:block;width:238px;background-color:transparent;font-size:12px;text-shadow:none}.btn--delete:hover,.btn--delete:focus{color:#fff;border-bottom-color:transparent;text-shadow:0 1px 0 #08090a;opacity:.8}.btn--ok,.btn--close{border-top:0;background-color:#4A5261;text-shadow:0 1px 0 #08090a;margin:0}.btn--ok:hover,.btn--ok:focus,.btn--close:hover,.btn--close:focus{color:#fff;background-color:#292d36;text-shadow:none}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(55,61,73,.8);-webkit-transition:all .25s ease-in-out;transition:all .25s ease-in-out;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out;will-change:left,opacity,visibility;z-index:5;opacity:0;visibility:hidden}.show-settings .overlay{visibility:visible;opacity:1}.switch{float:right;line-height:1}.switch input{display:none}.switch small{display:inline-block;cursor:pointer;padding:0 24px 0 0;-webkit-transition:all ease .2s;transition:all ease .2s;background-color:#2B2F36;border-color:#2B2F36}.switch small,.switch small:before{border-radius:30px;box-shadow:inset 0 0 2px 0 #14171F}.switch small:before{display:block;content:'';width:28px;height:28px;background:#fff}.switch.checked small{padding-right:0;padding-left:24px;background-color:#35D7BB;box-shadow:none}.modal--dillinger.about .modal-dialog{font-size:1.25rem;max-width:500px}.modal--dillinger .modal-dialog{max-width:600px;width:auto;margin:5rem auto}.modal--dillinger .modal-content{background:#373D49;border-radius:3px;box-shadow:0 2px 5px 0 #2C3B59;color:#fff;font-family:"Source Sans Pro","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;padding:2rem}.modal--dillinger ul{list-style-type:disc;margin:1rem 0;padding:0 0 0 1rem}.modal--dillinger li{padding:0;margin:0}.modal--dillinger .modal-header{border:0;padding:0}.modal--dillinger .modal-body{padding:0}.modal--dillinger .modal-footer{border:0;padding:0}.modal--dillinger .close{color:#fff;opacity:1}.modal-backdrop{background-color:#373D49}.pagination--dillinger{padding:0!important;margin:1.5rem 0!important;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-align-content:stretch;-ms-flex-line-pack:stretch;align-content:stretch}.pagination--dillinger,.pagination--dillinger li{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.pagination--dillinger li{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;text-align:center}.pagination--dillinger li:first-child>a,.pagination--dillinger li.disabled>a,.pagination--dillinger li.disabled>a:hover,.pagination--dillinger li.disabled>a:focus,.pagination--dillinger li>a{background-color:transparent;border-color:#4F535B;border-right-color:transparent}.pagination--dillinger li.active>a,.pagination--dillinger li.active>a:hover,.pagination--dillinger li.active>a:focus{border-color:#4A5261;background-color:#4A5261;color:#fff}.pagination--dillinger li>a{float:none;color:#fff;width:100%;display:block;text-align:center;margin:0;border-right-color:transparent;padding:6px}.pagination--dillinger li>a:hover,.pagination--dillinger li>a:focus{border-color:#35D7BB;background-color:#35D7BB;color:#fff}.pagination--dillinger li:last-child a{border-color:#4F535B}.pagination--dillinger li:first-child a{border-right-color:transparent}.diNotify{position:absolute;z-index:9999;left:0;right:0;top:0;margin:0 auto;max-width:400px;text-align:center;-webkit-transition:top .5s ease-in-out,opacity .5s ease-in-out;transition:top .5s ease-in-out,opacity .5s ease-in-out;visibility:hidden}.diNotify-body{-webkit-font-smoothing:antialiased;background-color:#35D7BB;background:#666E7F;border-radius:3px;color:#fff;font-family:"Source Sans Pro","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;overflow:hidden;padding:1rem 2rem .5rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:baseline;-webkit-align-items:baseline;-ms-flex-align:baseline;align-items:baseline;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.diNotify-icon{display:block;width:16px;height:16px;line-height:16px;position:relative;top:3px}.diNotify-message{padding-left:1rem}.zen-wrapper{position:fixed;top:0;left:0;right:0;bottom:0;width:100%;height:100%;z-index:10;background-color:#FFF;opacity:0;-webkit-transition:opacity .25s ease-in-out;transition:opacity .25s ease-in-out}.zen-wrapper.on{opacity:1}.enter-zen-mode{background-image:url("../img/icons/enter-zen.svg");right:.5rem;top:.5rem;display:none}.enter-zen-mode,.close-zen-mode{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0;background-repeat:no-repeat;width:32px;height:32px;display:block;position:absolute}.close-zen-mode{background-image:url("../img/icons/exit-zen.svg");right:1rem;top:1rem}.zen-page{position:relative;top:0;bottom:0;z-index:11;height:100%;width:100%}#zen{font-size:1.25rem;width:300px;height:80%;margin:0 auto;position:relative;top:10%}#zen:before,#zen:after{content:"";position:absolute;height:10%;width:100%;z-index:12;pointer-events:none}.split{overflow:scroll;padding:0!important}.split-editor{padding-left:0;padding-right:0;position:relative}.show-preview .split-editor{display:none}.split-preview{background-color:#fff;display:none;top:0;position:relative;z-index:4}.show-preview .split-preview{display:block}#editor{font-size:1rem;font-family:"Ubuntu Mono",Monaco;font-weight:400;line-height:2rem;width:100%;height:100%}#editor .ace_gutter{-webkit-font-smoothing:antialiased}#preview a{color:#A0AABF;text-decoration:underline}.sr-only{visibility:hidden;text-overflow:110%;overflow:hidden;top:-100px;position:absolute}.mnone{margin:0!important}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn,.form-inline .input-group .form-control{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .radio,.form-inline .checkbox{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .radio label,.form-inline .checkbox label{padding-left:0}.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}.form-horizontal .control-label{text-align:right;margin-bottom:0;padding-top:7px}.form-horizontal .form-group-lg .control-label{padding-top:14.3px}.form-horizontal .form-group-sm .control-label{padding-top:6px}.modal-dialog{width:600px;margin:30px auto}.modal-content{box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}@media screen and (min-width:27.5em){html{font-size:.875em}body{font-size:1rem}ul,ol{margin-bottom:.83999rem;padding-top:.16001rem}p{padding-top:.66001rem}p,pre{margin-bottom:1.33999rem}pre,blockquote p{font-size:1rem;padding-top:.66001rem}blockquote p{margin-bottom:.33999rem}h1{font-size:2.0571429rem;margin-bottom:.21999rem;padding-top:.78001rem}h2{font-size:1.953125rem;margin-bottom:.1835837rem;padding-top:.8164163rem}h3{font-size:1.6457143rem;margin-bottom:.07599rem;padding-top:.92401rem}h4{font-size:1.5625rem;margin-bottom:.546865rem;padding-top:.453135rem}h5{font-size:1.25rem;margin-bottom:-.56251rem;padding-top:.56251rem}h6{font-size:1rem;margin-bottom:-.65001rem;padding-top:.65001rem}.g{margin-left:-16px;margin-right:-16px}.g-b{padding-left:16px;padding-right:16px}.g-b--m1of1{width:100%}.g-b--m1of2,.g-b--m2of4,.g-b--m3of6,.g-b--m4of8,.g-b--m5of10,.g-b--m6of12{width:50%}.g-b--m1of3,.g-b--m2of6,.g-b--m4of12{width:33.333%}.g-b--m2of3,.g-b--m4of6,.g-b--m8of12{width:66.666%}.g-b--m1of4,.g-b--m2of8,.g-b--m3of12{width:25%}.g-b--m3of4,.g-b--m6of8,.g-b--m9of12{width:75%}.g-b--m1of5,.g-b--m2of10{width:20%}.g-b--m2of5,.g-b--m4of10{width:40%}.g-b--m3of5,.g-b--m6of10{width:60%}.g-b--m4of5,.g-b--m8of10{width:80%}.g-b--m1of6,.g-b--m2of12{width:16.666%}.g-b--m5of6,.g-b--m10of12{width:83.333%}.g-b--m1of8{width:12.5%}.g-b--m3of8{width:37.5%}.g-b--m5of8{width:62.5%}.g-b--m7of8{width:87.5%}.g-b--m1of10{width:10%}.g-b--m3of10{width:30%}.g-b--m7of10{width:70%}.g-b--m9of10{width:90%}.g-b--m1of12{width:8.333%}.g-b--m5of12{width:41.666%}.g-b--m7of12{width:58.333%}.g-b--m11of12{width:91.666%}.g-b--push--m1of1{margin-left:100%}.g-b--push--m1of2,.g-b--push--m2of4,.g-b--push--m3of6,.g-b--push--m4of8,.g-b--push--m5of10,.g-b--push--m6of12{margin-left:50%}.g-b--push--m1of3,.g-b--push--m2of6,.g-b--push--m4of12{margin-left:33.333%}.g-b--push--m2of3,.g-b--push--m4of6,.g-b--push--m8of12{margin-left:66.666%}.g-b--push--m1of4,.g-b--push--m2of8,.g-b--push--m3of12{margin-left:25%}.g-b--push--m3of4,.g-b--push--m6of8,.g-b--push--m9of12{margin-left:75%}.g-b--push--m1of5,.g-b--push--m2of10{margin-left:20%}.g-b--push--m2of5,.g-b--push--m4of10{margin-left:40%}.g-b--push--m3of5,.g-b--push--m6of10{margin-left:60%}.g-b--push--m4of5,.g-b--push--m8of10{margin-left:80%}.g-b--push--m1of6,.g-b--push--m2of12{margin-left:16.666%}.g-b--push--m5of6,.g-b--push--m10of12{margin-left:83.333%}.g-b--push--m1of8{margin-left:12.5%}.g-b--push--m3of8{margin-left:37.5%}.g-b--push--m5of8{margin-left:62.5%}.g-b--push--m7of8{margin-left:87.5%}.g-b--push--m1of10{margin-left:10%}.g-b--push--m3of10{margin-left:30%}.g-b--push--m7of10{margin-left:70%}.g-b--push--m9of10{margin-left:90%}.g-b--push--m1of12{margin-left:8.333%}.g-b--push--m5of12{margin-left:41.666%}.g-b--push--m7of12{margin-left:58.333%}.g-b--push--m11of12{margin-left:91.666%}.g-b--pull--m1of1{margin-right:100%}.g-b--pull--m1of2,.g-b--pull--m2of4,.g-b--pull--m3of6,.g-b--pull--m4of8,.g-b--pull--m5of10,.g-b--pull--m6of12{margin-right:50%}.g-b--pull--m1of3,.g-b--pull--m2of6,.g-b--pull--m4of12{margin-right:33.333%}.g-b--pull--m2of3,.g-b--pull--m4of6,.g-b--pull--m8of12{margin-right:66.666%}.g-b--pull--m1of4,.g-b--pull--m2of8,.g-b--pull--m3of12{margin-right:25%}.g-b--pull--m3of4,.g-b--pull--m6of8,.g-b--pull--m9of12{margin-right:75%}.g-b--pull--m1of5,.g-b--pull--m2of10{margin-right:20%}.g-b--pull--m2of5,.g-b--pull--m4of10{margin-right:40%}.g-b--pull--m3of5,.g-b--pull--m6of10{margin-right:60%}.g-b--pull--m4of5,.g-b--pull--m8of10{margin-right:80%}.g-b--pull--m1of6,.g-b--pull--m2of12{margin-right:16.666%}.g-b--pull--m5of6,.g-b--pull--m10of12{margin-right:83.333%}.g-b--pull--m1of8{margin-right:12.5%}.g-b--pull--m3of8{margin-right:37.5%}.g-b--pull--m5of8{margin-right:62.5%}.g-b--pull--m7of8{margin-right:87.5%}.g-b--pull--m1of10{margin-right:10%}.g-b--pull--m3of10{margin-right:30%}.g-b--pull--m7of10{margin-right:70%}.g-b--pull--m9of10{margin-right:90%}.g-b--pull--m1of12{margin-right:8.333%}.g-b--pull--m5of12{margin-right:41.666%}.g-b--pull--m7of12{margin-right:58.333%}.g-b--pull--m11of12{margin-right:91.666%}.splashscreen p{font-size:1.25rem;margin-bottom:1.43749rem;padding-top:.56251rem}.title{font-size:.8rem;margin-bottom:.77999rem;padding-top:.22001rem}.title-document{margin-bottom:.89999rem;padding-top:.10001rem}.title-document,.settings a{font-size:1.25rem}.words{font-size:.8rem;margin-bottom:.77999rem;padding-top:.22001rem}.modal--dillinger.about .modal-dialog,#zen{font-size:1.25rem}#zen{width:400px}#editor{font-size:1rem}}@media screen and (min-width:46.25em){html{font-size:.875em}body{font-size:1rem}ul,ol{margin-bottom:.83999rem;padding-top:.16001rem}p{padding-top:.66001rem}p,pre{margin-bottom:1.33999rem}pre,blockquote p{font-size:1rem;padding-top:.66001rem}blockquote p{margin-bottom:.33999rem}h1{font-size:2.0571429rem;margin-bottom:.21999rem;padding-top:.78001rem}h2{font-size:1.953125rem;margin-bottom:.1835837rem;padding-top:.8164163rem}h3{font-size:1.6457143rem;margin-bottom:.07599rem;padding-top:.92401rem}h4{font-size:1.5625rem;margin-bottom:.546865rem;padding-top:.453135rem}h5{font-size:1.25rem;margin-bottom:-.56251rem;padding-top:.56251rem}h6{font-size:1rem;margin-bottom:-.65001rem;padding-top:.65001rem}.g{margin-left:-16px;margin-right:-16px}.g-b{padding-left:16px;padding-right:16px}.g-b--t1of1{width:100%}.g-b--t1of2,.g-b--t2of4,.g-b--t3of6,.g-b--t4of8,.g-b--t5of10,.g-b--t6of12{width:50%}.g-b--t1of3,.g-b--t2of6,.g-b--t4of12{width:33.333%}.g-b--t2of3,.g-b--t4of6,.g-b--t8of12{width:66.666%}.g-b--t1of4,.g-b--t2of8,.g-b--t3of12{width:25%}.g-b--t3of4,.g-b--t6of8,.g-b--t9of12{width:75%}.g-b--t1of5,.g-b--t2of10{width:20%}.g-b--t2of5,.g-b--t4of10{width:40%}.g-b--t3of5,.g-b--t6of10{width:60%}.g-b--t4of5,.g-b--t8of10{width:80%}.g-b--t1of6,.g-b--t2of12{width:16.666%}.g-b--t5of6,.g-b--t10of12{width:83.333%}.g-b--t1of8{width:12.5%}.g-b--t3of8{width:37.5%}.g-b--t5of8{width:62.5%}.g-b--t7of8{width:87.5%}.g-b--t1of10{width:10%}.g-b--t3of10{width:30%}.g-b--t7of10{width:70%}.g-b--t9of10{width:90%}.g-b--t1of12{width:8.333%}.g-b--t5of12{width:41.666%}.g-b--t7of12{width:58.333%}.g-b--t11of12{width:91.666%}.g-b--push--t1of1{margin-left:100%}.g-b--push--t1of2,.g-b--push--t2of4,.g-b--push--t3of6,.g-b--push--t4of8,.g-b--push--t5of10,.g-b--push--t6of12{margin-left:50%}.g-b--push--t1of3,.g-b--push--t2of6,.g-b--push--t4of12{margin-left:33.333%}.g-b--push--t2of3,.g-b--push--t4of6,.g-b--push--t8of12{margin-left:66.666%}.g-b--push--t1of4,.g-b--push--t2of8,.g-b--push--t3of12{margin-left:25%}.g-b--push--t3of4,.g-b--push--t6of8,.g-b--push--t9of12{margin-left:75%}.g-b--push--t1of5,.g-b--push--t2of10{margin-left:20%}.g-b--push--t2of5,.g-b--push--t4of10{margin-left:40%}.g-b--push--t3of5,.g-b--push--t6of10{margin-left:60%}.g-b--push--t4of5,.g-b--push--t8of10{margin-left:80%}.g-b--push--t1of6,.g-b--push--t2of12{margin-left:16.666%}.g-b--push--t5of6,.g-b--push--t10of12{margin-left:83.333%}.g-b--push--t1of8{margin-left:12.5%}.g-b--push--t3of8{margin-left:37.5%}.g-b--push--t5of8{margin-left:62.5%}.g-b--push--t7of8{margin-left:87.5%}.g-b--push--t1of10{margin-left:10%}.g-b--push--t3of10{margin-left:30%}.g-b--push--t7of10{margin-left:70%}.g-b--push--t9of10{margin-left:90%}.g-b--push--t1of12{margin-left:8.333%}.g-b--push--t5of12{margin-left:41.666%}.g-b--push--t7of12{margin-left:58.333%}.g-b--push--t11of12{margin-left:91.666%}.g-b--pull--t1of1{margin-right:100%}.g-b--pull--t1of2,.g-b--pull--t2of4,.g-b--pull--t3of6,.g-b--pull--t4of8,.g-b--pull--t5of10,.g-b--pull--t6of12{margin-right:50%}.g-b--pull--t1of3,.g-b--pull--t2of6,.g-b--pull--t4of12{margin-right:33.333%}.g-b--pull--t2of3,.g-b--pull--t4of6,.g-b--pull--t8of12{margin-right:66.666%}.g-b--pull--t1of4,.g-b--pull--t2of8,.g-b--pull--t3of12{margin-right:25%}.g-b--pull--t3of4,.g-b--pull--t6of8,.g-b--pull--t9of12{margin-right:75%}.g-b--pull--t1of5,.g-b--pull--t2of10{margin-right:20%}.g-b--pull--t2of5,.g-b--pull--t4of10{margin-right:40%}.g-b--pull--t3of5,.g-b--pull--t6of10{margin-right:60%}.g-b--pull--t4of5,.g-b--pull--t8of10{margin-right:80%}.g-b--pull--t1of6,.g-b--pull--t2of12{margin-right:16.666%}.g-b--pull--t5of6,.g-b--pull--t10of12{margin-right:83.333%}.g-b--pull--t1of8{margin-right:12.5%}.g-b--pull--t3of8{margin-right:37.5%}.g-b--pull--t5of8{margin-right:62.5%}.g-b--pull--t7of8{margin-right:87.5%}.g-b--pull--t1of10{margin-right:10%}.g-b--pull--t3of10{margin-right:30%}.g-b--pull--t7of10{margin-right:70%}.g-b--pull--t9of10{margin-right:90%}.g-b--pull--t1of12{margin-right:8.333%}.g-b--pull--t5of12{margin-right:41.666%}.g-b--pull--t7of12{margin-right:58.333%}.g-b--pull--t11of12{margin-right:91.666%}.splashscreen-dillinger{width:500px}.splashscreen p{font-size:1.25rem;margin-bottom:1.43749rem;padding-top:.56251rem}.title{font-size:.8rem;margin-bottom:.77999rem;padding-top:.22001rem}.title-document{font-size:1.25rem;margin-bottom:.89999rem;padding-top:.10001rem}.menu .menu-item--save-to,.menu .menu-item--import-from{display:block}.menu .menu-item--preview,.menu .menu-item--save-to.in-sidebar,.menu .menu-item--import-from.in-sidebar{display:none}.settings a{font-size:1.25rem}.words{font-size:.8rem;margin-bottom:.77999rem;padding-top:.22001rem}.modal--dillinger.about .modal-dialog{font-size:1.25rem}.enter-zen-mode{display:block}.close-zen-mode{right:3rem;top:3rem}#zen{font-size:1.25rem;width:500px}.split-editor{border-right:1px solid #E8E8E8;float:left;height:calc(100vh - 130px);-webkit-overflow-scrolling:touch;padding-right:16px;width:50%}.show-preview .split-editor{display:block}.split-preview{display:block;float:right;height:calc(100vh - 130px);-webkit-overflow-scrolling:touch;position:relative;top:0;width:50%}#editor{font-size:1rem}}@media screen and (min-width:62.5em){html{font-size:.875em}body{font-size:1rem}ul,ol{margin-bottom:.83999rem;padding-top:.16001rem}p{padding-top:.66001rem}p,pre{margin-bottom:1.33999rem}pre,blockquote p{font-size:1rem;padding-top:.66001rem}blockquote p{margin-bottom:.33999rem}h1{font-size:2.0571429rem;margin-bottom:.21999rem;padding-top:.78001rem}h2{font-size:1.953125rem;margin-bottom:.1835837rem;padding-top:.8164163rem}h3{font-size:1.6457143rem;margin-bottom:.07599rem;padding-top:.92401rem}h4{font-size:1.5625rem;margin-bottom:.546865rem;padding-top:.453135rem}h5{font-size:1.25rem;margin-bottom:-.56251rem;padding-top:.56251rem}h6{font-size:1rem;margin-bottom:-.65001rem;padding-top:.65001rem}.g{margin-left:-16px;margin-right:-16px}.g-b{padding-left:16px;padding-right:16px}.g-b--d1of1{width:100%}.g-b--d1of2,.g-b--d2of4,.g-b--d3of6,.g-b--d4of8,.g-b--d5of10,.g-b--d6of12{width:50%}.g-b--d1of3,.g-b--d2of6,.g-b--d4of12{width:33.333%}.g-b--d2of3,.g-b--d4of6,.g-b--d8of12{width:66.666%}.g-b--d1of4,.g-b--d2of8,.g-b--d3of12{width:25%}.g-b--d3of4,.g-b--d6of8,.g-b--d9of12{width:75%}.g-b--d1of5,.g-b--d2of10{width:20%}.g-b--d2of5,.g-b--d4of10{width:40%}.g-b--d3of5,.g-b--d6of10{width:60%}.g-b--d4of5,.g-b--d8of10{width:80%}.g-b--d1of6,.g-b--d2of12{width:16.666%}.g-b--d5of6,.g-b--d10of12{width:83.333%}.g-b--d1of8{width:12.5%}.g-b--d3of8{width:37.5%}.g-b--d5of8{width:62.5%}.g-b--d7of8{width:87.5%}.g-b--d1of10{width:10%}.g-b--d3of10{width:30%}.g-b--d7of10{width:70%}.g-b--d9of10{width:90%}.g-b--d1of12{width:8.333%}.g-b--d5of12{width:41.666%}.g-b--d7of12{width:58.333%}.g-b--d11of12{width:91.666%}.g-b--push--d1of1{margin-left:100%}.g-b--push--d1of2,.g-b--push--d2of4,.g-b--push--d3of6,.g-b--push--d4of8,.g-b--push--d5of10,.g-b--push--d6of12{margin-left:50%}.g-b--push--d1of3,.g-b--push--d2of6,.g-b--push--d4of12{margin-left:33.333%}.g-b--push--d2of3,.g-b--push--d4of6,.g-b--push--d8of12{margin-left:66.666%}.g-b--push--d1of4,.g-b--push--d2of8,.g-b--push--d3of12{margin-left:25%}.g-b--push--d3of4,.g-b--push--d6of8,.g-b--push--d9of12{margin-left:75%}.g-b--push--d1of5,.g-b--push--d2of10{margin-left:20%}.g-b--push--d2of5,.g-b--push--d4of10{margin-left:40%}.g-b--push--d3of5,.g-b--push--d6of10{margin-left:60%}.g-b--push--d4of5,.g-b--push--d8of10{margin-left:80%}.g-b--push--d1of6,.g-b--push--d2of12{margin-left:16.666%}.g-b--push--d5of6,.g-b--push--d10of12{margin-left:83.333%}.g-b--push--d1of8{margin-left:12.5%}.g-b--push--d3of8{margin-left:37.5%}.g-b--push--d5of8{margin-left:62.5%}.g-b--push--d7of8{margin-left:87.5%}.g-b--push--d1of10{margin-left:10%}.g-b--push--d3of10{margin-left:30%}.g-b--push--d7of10{margin-left:70%}.g-b--push--d9of10{margin-left:90%}.g-b--push--d1of12{margin-left:8.333%}.g-b--push--d5of12{margin-left:41.666%}.g-b--push--d7of12{margin-left:58.333%}.g-b--push--d11of12{margin-left:91.666%}.g-b--pull--d1of1{margin-right:100%}.g-b--pull--d1of2,.g-b--pull--d2of4,.g-b--pull--d3of6,.g-b--pull--d4of8,.g-b--pull--d5of10,.g-b--pull--d6of12{margin-right:50%}.g-b--pull--d1of3,.g-b--pull--d2of6,.g-b--pull--d4of12{margin-right:33.333%}.g-b--pull--d2of3,.g-b--pull--d4of6,.g-b--pull--d8of12{margin-right:66.666%}.g-b--pull--d1of4,.g-b--pull--d2of8,.g-b--pull--d3of12{margin-right:25%}.g-b--pull--d3of4,.g-b--pull--d6of8,.g-b--pull--d9of12{margin-right:75%}.g-b--pull--d1of5,.g-b--pull--d2of10{margin-right:20%}.g-b--pull--d2of5,.g-b--pull--d4of10{margin-right:40%}.g-b--pull--d3of5,.g-b--pull--d6of10{margin-right:60%}.g-b--pull--d4of5,.g-b--pull--d8of10{margin-right:80%}.g-b--pull--d1of6,.g-b--pull--d2of12{margin-right:16.666%}.g-b--pull--d5of6,.g-b--pull--d10of12{margin-right:83.333%}.g-b--pull--d1of8{margin-right:12.5%}.g-b--pull--d3of8{margin-right:37.5%}.g-b--pull--d5of8{margin-right:62.5%}.g-b--pull--d7of8{margin-right:87.5%}.g-b--pull--d1of10{margin-right:10%}.g-b--pull--d3of10{margin-right:30%}.g-b--pull--d7of10{margin-right:70%}.g-b--pull--d9of10{margin-right:90%}.g-b--pull--d1of12{margin-right:8.333%}.g-b--pull--d5of12{margin-right:41.666%}.g-b--pull--d7of12{margin-right:58.333%}.g-b--pull--d11of12{margin-right:91.666%}.splashscreen-dillinger{width:700px}.splashscreen p{font-size:1.25rem;margin-bottom:1.43749rem;padding-top:.56251rem}.title{font-size:.8rem;margin-bottom:.77999rem;padding-top:.22001rem}.title-document{font-size:1.25rem;margin-bottom:.89999rem;padding-top:.10001rem}.menu .menu-item--export-as{display:block}.menu .menu-item--preview{display:none}.settings a{font-size:1.25rem}.words{font-size:.8rem;margin-bottom:.77999rem;padding-top:.22001rem}.modal--dillinger.about .modal-dialog,#zen{font-size:1.25rem}#zen{width:700px}#editor{font-size:1rem}}@media screen and (min-width:87.5em){html{font-size:.875em}body{font-size:1rem}ul,ol{margin-bottom:.83999rem;padding-top:.16001rem}p{padding-top:.66001rem}p,pre{margin-bottom:1.33999rem}pre,blockquote p{font-size:1rem;padding-top:.66001rem}blockquote p{margin-bottom:.33999rem}h1{font-size:2.0571429rem;margin-bottom:.21999rem;padding-top:.78001rem}h2{font-size:1.953125rem;margin-bottom:.1835837rem;padding-top:.8164163rem}h3{font-size:1.6457143rem;margin-bottom:.07599rem;padding-top:.92401rem}h4{font-size:1.5625rem;margin-bottom:.546865rem;padding-top:.453135rem}h5{font-size:1.25rem;margin-bottom:-.56251rem;padding-top:.56251rem}h6{font-size:1rem;margin-bottom:-.65001rem;padding-top:.65001rem}.splashscreen-dillinger{width:800px}.splashscreen p{font-size:1.25rem;margin-bottom:1.43749rem;padding-top:.56251rem}.title{font-size:.8rem;margin-bottom:.77999rem;padding-top:.22001rem}.title-document{margin-bottom:.89999rem;padding-top:.10001rem}.title-document,.settings a{font-size:1.25rem}.words{font-size:.8rem;margin-bottom:.77999rem;padding-top:.22001rem}.modal--dillinger.about .modal-dialog,#zen{font-size:1.25rem}#editor{font-size:1rem}}</style></head><body id="preview"> <h4><a id="Constraints_0"></a>Constraints</h4> <ul> <li><code>&quot; (quote)</code>, <code>(whitespace)</code>(unless in quotes), <code>, (comma)</code>, <code>: (semi-colon)</code>, <code>[ (starting bracket)</code> and <code>] (closing bracket)</code> are <strong>ignored</strong> and not included in the search</li> <li>terms and namespaces are separated by <code>(white space)</code> (if not in quotes) and/or a <code>, (comma)</code></li> <li>to include <em>whitespace</em> you must put the <em>term</em> in quotes: <code>&quot;this is a valid term&quot;</code></li> <li>to exclude a term, prefix the term with a <code>- (hyphen)</code>: <code>-&quot;i want to exclude this&quot;</code></li> </ul> <h4><a id="Searching_6"></a>Searching</h4> <p><code>-&gt;</code> points where the terms will be searched</p> <ul> <li><code>term</code> =&gt; show only galleries with <code>term</code> in them <code>-&gt;</code> (title, artist, language, namespace &amp; tags)</li> <li><code>-term</code> =&gt; exclude all galleries with <code>term</code> in them <code>-&gt;</code> (title, artist, language, namespace &amp; tags)</li> <li><code>ns:term</code> =&gt; show only galleries where <code>term</code> is in the <code>ns</code> namespace in them <code>-&gt;</code> (namespace &amp; tags)</li> <li><code>-ns:term</code> =&gt; exclude all galleries where <code>term</code> is in the <code>ns</code> namespace in them <code>-&gt;</code> (namespace &amp; tags)</li> <li><code>ns:[term1, term2, ...]</code> =&gt; equivalent to <code>ns:term1</code>, <code>ns:term2</code></li> <li><code>-ns:[term1, term2, ...]</code> =&gt; equivalent to <code>-ns:term1</code>, <code>-ns:term2</code></li> </ul> <h4><a id="Protips__warnings_16"></a>Protips &amp; warnings</h4> <ul> <li>When grouping tags under the same namespace in brackets, excluding tags (<code>-term</code>) and including tags (<code>term</code>) can both be used: <ul> <li><code>ns:[term, -term1, term2, ...]</code> -&gt; equivalent to <code>ns:term</code>, <code>-ns:term1</code>, <code>ns:term2</code></li> </ul> </li> <li><code>ns:-term</code> is <strong>NOT</strong> equivalent to <code>-ns:term</code></li> <li>You can enchance your search with regex. Regex can be used <em>anywhere</em> in your search terms <ul> <li>Enable <em>regex</em> in settings</li> </ul> </li> <li>Clicking on the search icon on the search bar will give you more options to search with</li> </ul> <h4><a id="Special_namespaced_tags_24"></a>Special namespaced tags</h4> <p>They work just like normal namespaced tags, meaning that the <em>constraints</em> above also apply to them!</p> <ul> <li><strong>Reserved</strong> means that it shouldn’t be used on your galleries. It <strong>won’t</strong> be searched for in your gallery.</li> <li><strong>Operator</strong> means that less than <code>&lt;</code> and greater than <code>&gt;</code> are supported. They should be used just like the exclude operator <code>-</code>. E.g.: <code>ns:&lt;term</code> or <code>ns:&gt;[term1, term2]</code>.</li> <li><code>term</code> means… well, your term… what you want to search for… any kind of characters not in <strong>Constraints</strong> above</li> <li><code>integer</code> means that only numbers are allowed</li> <li><code>date</code> means a date format. Most (if not all) date formats are supported (try it out yourself)</li> </ul> <hr> <table> <thead> <tr> <th>Namespaced tag(s)</th> <th>Reserved</th> <th>Filtered galleries</th> <th>Operator</th> </tr> </thead> <tbody> <tr> <td><code>tag:none</code>, <code>tag:null</code></td> <td>*</td> <td>Galleries with <strong>no</strong> namespace &amp; tags set</td> <td></td> </tr> <tr> <td><code>artist:none</code>, <code>artist:null</code></td> <td>*</td> <td>Galleries with <strong>no</strong> artist set</td> <td></td> </tr> <tr> <td><code>status:none</code>, <code>status:null</code></td> <td>*</td> <td>Galleries with <strong>no</strong> status set</td> <td></td> </tr> <tr> <td><code>language:none</code>, <code>language:null</code></td> <td>*</td> <td>Galleries with <strong>no</strong> language set</td> <td></td> </tr> <tr> <td><code>type:none</code>, <code>type:null</code></td> <td>*</td> <td>Galleries with <strong>no</strong> type set</td> <td></td> </tr> <tr> <td><code>path:none</code>, <code>path:null</code></td> <td>*</td> <td>Galleries that has been <strong>moved/deleted</strong> from the filesystem</td> <td></td> </tr> <tr> <td><code>descr:none</code>, <code>descr:null</code>, <code>description:none</code>, <code>description:null</code></td> <td>*</td> <td>Galleries with <strong>no</strong> description set</td> <td></td> </tr> <tr> <td><code>&quot;pub date&quot;:none</code>, <code>&quot;pub date&quot;:null</code>, <code>pub_date:none</code>, <code>pub_date:null</code>, <code>publication:none</code>, <code>publication:null</code></td> <td>*</td> <td>Galleries with <strong>no</strong> publication date set</td> <td></td> </tr> <tr> <td><code>title:term</code></td> <td></td> <td>Galleries with <code>term</code> in their title <strong>OR</strong> has matching namespace &amp; tag</td> <td></td> </tr> <tr> <td><code>artist:term</code></td> <td></td> <td>Galleries with <code>term</code> in their artist <strong>OR</strong> has matching namespace &amp; tag</td> <td></td> </tr> <tr> <td><code>language:term</code>, <code>lang:term</code></td> <td></td> <td>Galleries with <code>term</code> in their language <strong>OR</strong> has matching namespace &amp; tag</td> <td></td> </tr> <tr> <td><code>type:term</code></td> <td></td> <td>Galleries with <code>term</code> in their type <strong>OR</strong> has matching namespace &amp; tag</td> <td></td> </tr> <tr> <td><code>status:term</code></td> <td></td> <td>Galleries with <code>term</code> in their status <strong>OR</strong> has matching namespace &amp; tag</td> <td></td> </tr> <tr> <td><code>descr:term</code>, <code>description:term</code></td> <td></td> <td>Galleries with <code>term</code> in their description <strong>OR</strong> has matching namespace &amp; tag</td> <td></td> </tr> <tr> <td><code>chapter:integer</code>, <code>chapters:integer</code></td> <td></td> <td>Galleries with <code>integer</code> chapters <strong>OR</strong> has matching namespace &amp; tag</td> <td>*</td> </tr> <tr> <td><code>read_count:integer</code>, <code>&quot;read count&quot;:integer</code>, <code>times_read:integer</code>, <code>&quot;times read&quot;:integer</code></td> <td></td> <td>Galleries read <code>integer</code> times <strong>OR</strong> has matching namespace &amp; tag</td> <td>*</td> </tr> <tr> <td><code>date_added:date</code>, <code>&quot;date added&quot;:date</code></td> <td></td> <td>Galleries added on <code>date</code> <strong>OR</strong> has matching namespace &amp; tag</td> <td>*</td> </tr> <tr> <td><code>pub_date:date</code>, <code>&quot;pub date&quot;:date</code>, <code>publication:date</code></td> <td></td> <td>Galleries published on <code>date</code> <strong>OR</strong> has matching namespace &amp; tag</td> <td>*</td> </tr> <tr> <td><code>last_read:date</code>, <code>&quot;last read&quot;:date</code></td> <td></td> <td>Galleries last read on <code>date</code> <strong>OR</strong> has matching namespace &amp; tag</td> <td>*</td> </tr> <tr> <td><code>rating:integer</code>, <code>stars:integer</code></td> <td></td> <td>Galleries that has been rated <code>integer</code> <strong>OR</strong> has matching namespace &amp; tag</td> <td>*</td> </tr> </tbody> </table> </body></html> """ ) KEYBOARD_SHORTCUTS_INFO = ( """ <!DOCTYPE html><html><head><meta charset="utf-8"><title>Untitled Document.md</title><style>@import 'https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.2.0/katex.min.css';code{color:#c7254e;background-color:#f9f2f4;border-radius:4px}code,kbd{padding:2px 4px}kbd{color:#fff;background-color:#333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;box-shadow:none}pre{display:block;margin:0 0 10px;word-break:break-all;word-wrap:break-word;color:#333;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}fieldset{border:0;min-width:0}legend{display:block;width:100%;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type="radio"],input[type="checkbox"]{margin:1px 0 0;line-height:normal}input[type="file"]{display:block}input[type="range"]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{padding-top:7px}output,.form-control{display:block;font-size:14px;line-height:1.4285714;color:#555}.form-control{width:100%;height:34px;padding:6px 12px;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#777;opacity:1}.form-control:-ms-input-placeholder{color:#777}.form-control::-webkit-input-placeholder{color:#777}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee;opacity:1}textarea.form-control{height:auto}input[type="date"],input[type="time"],input[type="datetime-local"],input[type="month"]{line-height:34px;line-height:1.4285714 \0}input[type="date"].input-sm,.form-horizontal .form-group-sm input[type="date"].form-control,.input-group-sm>input[type="date"].form-control,.input-group-sm>input[type="date"].input-group-addon,.input-group-sm>.input-group-btn>input[type="date"].btn,input[type="time"].input-sm,.form-horizontal .form-group-sm input[type="time"].form-control,.input-group-sm>input[type="time"].form-control,.input-group-sm>input[type="time"].input-group-addon,.input-group-sm>.input-group-btn>input[type="time"].btn,input[type="datetime-local"].input-sm,.form-horizontal .form-group-sm input[type="datetime-local"].form-control,.input-group-sm>input[type="datetime-local"].form-control,.input-group-sm>input[type="datetime-local"].input-group-addon,.input-group-sm>.input-group-btn>input[type="datetime-local"].btn,input[type="month"].input-sm,.form-horizontal .form-group-sm input[type="month"].form-control,.input-group-sm>input[type="month"].form-control,.input-group-sm>input[type="month"].input-group-addon,.input-group-sm>.input-group-btn>input[type="month"].btn{line-height:30px}input[type="date"].input-lg,.form-horizontal .form-group-lg input[type="date"].form-control,.input-group-lg>input[type="date"].form-control,.input-group-lg>input[type="date"].input-group-addon,.input-group-lg>.input-group-btn>input[type="date"].btn,input[type="time"].input-lg,.form-horizontal .form-group-lg input[type="time"].form-control,.input-group-lg>input[type="time"].form-control,.input-group-lg>input[type="time"].input-group-addon,.input-group-lg>.input-group-btn>input[type="time"].btn,input[type="datetime-local"].input-lg,.form-horizontal .form-group-lg input[type="datetime-local"].form-control,.input-group-lg>input[type="datetime-local"].form-control,.input-group-lg>input[type="datetime-local"].input-group-addon,.input-group-lg>.input-group-btn>input[type="datetime-local"].btn,input[type="month"].input-lg,.form-horizontal .form-group-lg input[type="month"].form-control,.input-group-lg>input[type="month"].form-control,.input-group-lg>input[type="month"].input-group-addon,.input-group-lg>.input-group-btn>input[type="month"].btn{line-height:46px}.form-group{margin-bottom:15px}.radio,.checkbox{position:relative;display:block;min-height:20px;margin-top:10px;margin-bottom:10px}.radio label,.checkbox label{padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.radio input[type="radio"],.radio-inline input[type="radio"],.checkbox input[type="checkbox"],.checkbox-inline input[type="checkbox"]{position:absolute;margin-left:-20px;margin-top:4px \9}.radio+.radio,.checkbox+.checkbox{margin-top:-5px}.radio-inline,.checkbox-inline{display:inline-block;padding-left:20px;margin-bottom:0;vertical-align:middle;font-weight:400;cursor:pointer}.radio-inline+.radio-inline,.checkbox-inline+.checkbox-inline{margin-top:0;margin-left:10px}input[type="radio"][disabled],input[type="radio"].disabled,fieldset[disabled] input[type="radio"],input[type="checkbox"][disabled],input[type="checkbox"].disabled,fieldset[disabled] input[type="checkbox"],.radio-inline.disabled,fieldset[disabled] .radio-inline,.checkbox-inline.disabled,fieldset[disabled] .checkbox-inline,.radio.disabled label,fieldset[disabled] .radio label,.checkbox.disabled label,fieldset[disabled] .checkbox label{cursor:not-allowed}.form-control-static{padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-horizontal .form-group-lg .form-control-static.form-control,.input-group-lg>.form-control-static.form-control,.input-group-lg>.form-control-static.input-group-addon,.input-group-lg>.input-group-btn>.form-control-static.btn,.form-control-static.input-sm,.form-horizontal .form-group-sm .form-control-static.form-control,.input-group-sm>.form-control-static.form-control,.input-group-sm>.form-control-static.input-group-addon,.input-group-sm>.input-group-btn>.form-control-static.btn{padding-left:0;padding-right:0}.input-sm,.form-horizontal .form-group-sm .form-control,.input-group-sm>.form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.input-group-sm>.input-group-addon{height:30px;line-height:1.5}.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm,.form-horizontal .form-group-sm select.form-control,.input-group-sm>select.form-control,.input-group-sm>select.input-group-addon,.input-group-sm>.input-group-btn>select.btn{height:30px;line-height:30px}textarea.input-sm,.form-horizontal .form-group-sm textarea.form-control,.input-group-sm>textarea.form-control,.input-group-sm>textarea.input-group-addon,.input-group-sm>.input-group-btn>textarea.btn,select[multiple].input-sm,.form-horizontal .form-group-sm select[multiple].form-control,.input-group-sm>select[multiple].form-control,.input-group-sm>select[multiple].input-group-addon,.input-group-sm>.input-group-btn>select[multiple].btn{height:auto}.input-lg,.form-horizontal .form-group-lg .form-control,.input-group-lg>.form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.input-group-lg>.input-group-addon{height:46px;line-height:1.33}.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-lg,.form-horizontal .form-group-lg select.form-control,.input-group-lg>select.form-control,.input-group-lg>select.input-group-addon,.input-group-lg>.input-group-btn>select.btn{height:46px;line-height:46px}textarea.input-lg,.form-horizontal .form-group-lg textarea.form-control,.input-group-lg>textarea.form-control,.input-group-lg>textarea.input-group-addon,.input-group-lg>.input-group-btn>textarea.btn,select[multiple].input-lg,.form-horizontal .form-group-lg select[multiple].form-control,.input-group-lg>select[multiple].form-control,.input-group-lg>select[multiple].input-group-addon,.input-group-lg>.input-group-btn>select[multiple].btn{height:auto}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:25px;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center}.input-lg+.form-control-feedback,.form-horizontal .form-group-lg .form-control+.form-control-feedback,.input-group-lg>.form-control+.form-control-feedback,.input-group-lg>.input-group-addon+.form-control-feedback,.input-group-lg>.input-group-btn>.btn+.form-control-feedback{width:46px;height:46px;line-height:46px}.input-sm+.form-control-feedback,.form-horizontal .form-group-sm .form-control+.form-control-feedback,.input-group-sm>.form-control+.form-control-feedback,.input-group-sm>.input-group-addon+.form-control-feedback,.input-group-sm>.input-group-btn>.btn+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .help-block,.has-success .control-label,.has-success .radio,.has-success .checkbox,.has-success .radio-inline,.has-success .checkbox-inline{color:#3c763d}.has-success .form-control{border-color:#3c763d;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;border-color:#3c763d;background-color:#dff0d8}.has-success .form-control-feedback{color:#3c763d}.has-warning .help-block,.has-warning .control-label,.has-warning .radio,.has-warning .checkbox,.has-warning .radio-inline,.has-warning .checkbox-inline{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;border-color:#8a6d3b;background-color:#fcf8e3}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .help-block,.has-error .control-label,.has-error .radio,.has-error .checkbox,.has-error .radio-inline,.has-error .checkbox-inline{color:#a94442}.has-error .form-control{border-color:#a94442;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;border-color:#a94442;background-color:#f2dede}.has-error .form-control-feedback{color:#a94442}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}.form-horizontal .radio,.form-horizontal .checkbox,.form-horizontal .radio-inline,.form-horizontal .checkbox-inline{margin-top:0;margin-bottom:0;padding-top:7px}.form-horizontal .radio,.form-horizontal .checkbox{min-height:27px}.form-horizontal .form-group{margin-left:-15px;margin-right:-15px}.form-horizontal .form-group:before{content:" ";display:table}.form-horizontal .form-group:after{content:" ";display:table;clear:both}.form-horizontal .has-feedback .form-control-feedback{top:0;right:15px}.btn{display:inline-block;vertical-align:middle;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn:focus,.btn:active:focus,.btn.active:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:hover,.btn:focus{color:#333;text-decoration:none}.btn:active,.btn.active{outline:0;background-image:none;box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;pointer-events:none;opacity:.65;filter:alpha(opacity=65);box-shadow:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default:hover,.btn-default:focus,.btn-default:active,.btn-default.active,.open>.btn-default.dropdown-toggle{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default:active,.btn-default.active,.open>.btn-default.dropdown-toggle{background-image:none}.btn-default.disabled,.btn-default.disabled:hover,.btn-default.disabled:focus,.btn-default.disabled:active,.btn-default.disabled.active,.btn-default[disabled],.btn-default[disabled]:hover,.btn-default[disabled]:focus,.btn-default[disabled]:active,.btn-default[disabled].active,fieldset[disabled] .btn-default,fieldset[disabled] .btn-default:hover,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:active,fieldset[disabled] .btn-default.active{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#428bca;border-color:#357ebd}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.open>.btn-primary.dropdown-toggle{color:#fff;background-color:#3071a9;border-color:#285e8e}.btn-primary:active,.btn-primary.active,.open>.btn-primary.dropdown-toggle{background-image:none}.btn-primary.disabled,.btn-primary.disabled:hover,.btn-primary.disabled:focus,.btn-primary.disabled:active,.btn-primary.disabled.active,.btn-primary[disabled],.btn-primary[disabled]:hover,.btn-primary[disabled]:focus,.btn-primary[disabled]:active,.btn-primary[disabled].active,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-primary:hover,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:active,fieldset[disabled] .btn-primary.active{background-color:#428bca;border-color:#357ebd}.btn-primary .badge{color:#428bca;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.open>.btn-success.dropdown-toggle{color:#fff;background-color:#449d44;border-color:#398439}.btn-success:active,.btn-success.active,.open>.btn-success.dropdown-toggle{background-image:none}.btn-success.disabled,.btn-success.disabled:hover,.btn-success.disabled:focus,.btn-success.disabled:active,.btn-success.disabled.active,.btn-success[disabled],.btn-success[disabled]:hover,.btn-success[disabled]:focus,.btn-success[disabled]:active,.btn-success[disabled].active,fieldset[disabled] .btn-success,fieldset[disabled] .btn-success:hover,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:active,fieldset[disabled] .btn-success.active{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.open>.btn-info.dropdown-toggle{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info:active,.btn-info.active,.open>.btn-info.dropdown-toggle{background-image:none}.btn-info.disabled,.btn-info.disabled:hover,.btn-info.disabled:focus,.btn-info.disabled:active,.btn-info.disabled.active,.btn-info[disabled],.btn-info[disabled]:hover,.btn-info[disabled]:focus,.btn-info[disabled]:active,.btn-info[disabled].active,fieldset[disabled] .btn-info,fieldset[disabled] .btn-info:hover,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:active,fieldset[disabled] .btn-info.active{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.open>.btn-warning.dropdown-toggle{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning:active,.btn-warning.active,.open>.btn-warning.dropdown-toggle{background-image:none}.btn-warning.disabled,.btn-warning.disabled:hover,.btn-warning.disabled:focus,.btn-warning.disabled:active,.btn-warning.disabled.active,.btn-warning[disabled],.btn-warning[disabled]:hover,.btn-warning[disabled]:focus,.btn-warning[disabled]:active,.btn-warning[disabled].active,fieldset[disabled] .btn-warning,fieldset[disabled] .btn-warning:hover,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:active,fieldset[disabled] .btn-warning.active{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.open>.btn-danger.dropdown-toggle{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger:active,.btn-danger.active,.open>.btn-danger.dropdown-toggle{background-image:none}.btn-danger.disabled,.btn-danger.disabled:hover,.btn-danger.disabled:focus,.btn-danger.disabled:active,.btn-danger.disabled.active,.btn-danger[disabled],.btn-danger[disabled]:hover,.btn-danger[disabled]:focus,.btn-danger[disabled]:active,.btn-danger[disabled].active,fieldset[disabled] .btn-danger,fieldset[disabled] .btn-danger:hover,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:active,fieldset[disabled] .btn-danger.active{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{color:#428bca;font-weight:400;cursor:pointer;border-radius:0}.btn-link,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;box-shadow:none}.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active{border-color:transparent}.btn-link:hover,.btn-link:focus{color:#2a6496;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,.btn-link[disabled]:focus,fieldset[disabled] .btn-link:hover,fieldset[disabled] .btn-link:focus{color:#777;text-decoration:none}.btn-lg{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.btn-sm{padding:5px 10px}.btn-sm,.btn-xs{font-size:12px;line-height:1.5;border-radius:3px}.btn-xs{padding:1px 5px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;transition:height .35s ease}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*="col-"]{float:none;padding-left:0;padding-right:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon{white-space:nowrap}.input-group-addon,.input-group-btn{width:1%;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm,.form-horizontal .form-group-sm .input-group-addon.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.input-group-addon.btn{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg,.form-horizontal .form-group-lg .input-group-addon.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.input-group-addon.btn{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type="radio"],.input-group-addon input[type="checkbox"]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group-btn:last-child>.btn-group:not(:last-child)>.btn{border-bottom-right-radius:0;border-top-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:first-child>.btn-group:not(:first-child)>.btn{border-bottom-left-radius:0;border-top-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{font-size:0;white-space:nowrap}.input-group-btn,.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:hover,.input-group-btn>.btn:focus,.input-group-btn>.btn:active{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{margin-left:-1px}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;line-height:1.4285714;text-decoration:none;color:#428bca;background-color:#fff;border:1px solid #ddd;margin-left:-1px}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-bottom-left-radius:4px;border-top-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-bottom-right-radius:4px;border-top-right-radius:4px}.pagination>li>a:hover,.pagination>li>a:focus,.pagination>li>span:hover,.pagination>li>span:focus{color:#2a6496;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:hover,.pagination>.active>a:focus,.pagination>.active>span,.pagination>.active>span:hover,.pagination>.active>span:focus{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca;cursor:default}.pagination>.disabled>span,.pagination>.disabled>span:hover,.pagination>.disabled>span:focus,.pagination>.disabled>a,.pagination>.disabled>a:hover,.pagination>.disabled>a:focus{color:#777;background-color:#fff;border-color:#ddd;cursor:not-allowed}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-bottom-left-radius:6px;border-top-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-bottom-right-radius:6px;border-top-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-bottom-left-radius:3px;border-top-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-bottom-right-radius:3px;border-top-right-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;opacity:.5;filter:alpha(opacity=50)}button.close{padding:0;cursor:pointer;background:0 0;border:0;-webkit-appearance:none}.modal-open,.modal{overflow:hidden}.modal{display:none;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transform:translate3d(0,-25%,0);transform:translate3d(0,-25%,0);-webkit-transition:-webkit-transform .3s ease-out;transition:transform .3s ease-out}.modal.in .modal-dialog{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 3px 9px rgba(0,0,0,.5);background-clip:padding-box;outline:0}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0;filter:alpha(opacity=0)}.modal-backdrop.in{opacity:.5;filter:alpha(opacity=50)}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5;min-height:16.4285714px}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.4285714}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer:before,.modal-footer:after{content:" ";display:table}.modal-footer:after{clear:both}.modal-footer .btn+.btn{margin-left:5px;margin-bottom:0}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.clearfix:before,.clearfix:after{content:" ";display:table}.clearfix:after{clear:both}.center-block{display:block;margin-left:auto;margin-right:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important;visibility:hidden!important}.affix{position:fixed;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.hljs{display:block;overflow-x:auto;padding:.5em;background:#002b36;color:#839496;-webkit-text-size-adjust:none}.hljs-comment,.hljs-template_comment,.diff .hljs-header,.hljs-doctype,.hljs-pi,.lisp .hljs-string,.hljs-javadoc{color:#586e75}.hljs-keyword,.hljs-winutils,.method,.hljs-addition,.css .hljs-tag,.hljs-request,.hljs-status,.nginx .hljs-title{color:#859900}.hljs-number,.hljs-command,.hljs-string,.hljs-tag .hljs-value,.hljs-rules .hljs-value,.hljs-phpdoc,.hljs-dartdoc,.tex .hljs-formula,.hljs-regexp,.hljs-hexcolor,.hljs-link_url{color:#2aa198}.hljs-title,.hljs-localvars,.hljs-chunk,.hljs-decorator,.hljs-built_in,.hljs-identifier,.vhdl .hljs-literal,.hljs-id,.css .hljs-function{color:#268bd2}.hljs-attribute,.hljs-variable,.lisp .hljs-body,.smalltalk .hljs-number,.hljs-constant,.hljs-class .hljs-title,.hljs-parent,.hljs-type,.hljs-link_reference{color:#b58900}.hljs-preprocessor,.hljs-preprocessor .hljs-keyword,.hljs-pragma,.hljs-shebang,.hljs-symbol,.hljs-symbol .hljs-string,.diff .hljs-change,.hljs-special,.hljs-attr_selector,.hljs-subst,.hljs-cdata,.css .hljs-pseudo,.hljs-header{color:#cb4b16}.hljs-deletion,.hljs-important{color:#dc322f}.hljs-link_label{color:#6c71c4}.tex .hljs-formula{background:#073642}*,*:before,*:after{box-sizing:border-box}html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:0 0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}images{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd{font-size:1em}code,kbd,pre,samp{font-family:monospace,monospace}samp{font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}.debug{background-color:#ffc0cb!important}.ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ir{background-color:transparent;border:0;overflow:hidden}.ir::before{content:'';display:block;height:150%;width:0}html{font-size:.875em;background:#fafafa;color:#373D49}html,body{font-family:Georgia,Cambria,serif;height:100%}body{font-size:1rem;font-weight:400;line-height:2rem}ul,ol{margin-bottom:.83999rem;padding-top:.16001rem}li{-webkit-font-feature-settings:'kern' 1,'onum' 1,'liga' 1;-moz-font-feature-settings:'kern' 1,'onum' 1,'liga' 1;font-feature-settings:'kern' 1,'onum' 1,'liga' 1;margin-left:1rem}li>ul,li>ol{margin-bottom:0}p{padding-top:.66001rem;-webkit-font-feature-settings:'kern' 1,'onum' 1,'liga' 1;-moz-font-feature-settings:'kern' 1,'onum' 1,'liga' 1;font-feature-settings:'kern' 1,'onum' 1,'liga' 1;margin-top:0}p,pre{margin-bottom:1.33999rem}pre{font-size:1rem;padding:.66001rem 9.5px 9.5px;line-height:2rem;background:-webkit-linear-gradient(top,#fff 0,#fff .75rem,#f5f7fa .75rem,#f5f7fa 2.75rem,#fff 2.75rem,#fff 4rem);background:linear-gradient(to bottom,#fff 0,#fff .75rem,#f5f7fa .75rem,#f5f7fa 2.75rem,#fff 2.75rem,#fff 4rem);background-size:100% 4rem;border-color:#D3DAEA}blockquote{margin:0}blockquote p{font-size:1rem;margin-bottom:.33999rem;font-style:italic;padding:.66001rem 1rem 1rem;border-left:3px solid #A0AABF}th,td{padding:12px}h1,h2,h3,h4,h5,h6{font-family:"Source Sans Pro","Helvetica Neue",Helvetica,Arial,sans-serif;-webkit-font-feature-settings:'dlig' 1,'liga' 1,'lnum' 1,'kern' 1;-moz-font-feature-settings:'dlig' 1,'liga' 1,'lnum' 1,'kern' 1;font-feature-settings:'dlig' 1,'liga' 1,'lnum' 1,'kern' 1;font-style:normal;font-weight:600;margin-top:0}h1{line-height:3rem;font-size:2.0571429rem;margin-bottom:.21999rem;padding-top:.78001rem}h2{font-size:1.953125rem;margin-bottom:.1835837rem;padding-top:.8164163rem}h2,h3{line-height:3rem}h3{font-size:1.6457143rem;margin-bottom:.07599rem;padding-top:.92401rem}h4{font-size:1.5625rem;margin-bottom:.546865rem;padding-top:.453135rem}h5{font-size:1.25rem;margin-bottom:-.56251rem;padding-top:.56251rem}h6{font-size:1rem;margin-bottom:-.65001rem;padding-top:.65001rem}a{cursor:pointer;color:#35D7BB;text-decoration:none}a:hover,a:focus{border-bottom-color:#35D7BB;color:#dff9f4}img{height:auto;max-width:100%}.g{display:block}.g:after{clear:both;content:'';display:table}.g-b{float:left;margin:0;width:100%}.g{margin-left:-16px;margin-right:-16px}.g-b{padding-left:16px;padding-right:16px}.g-b--center{display:block;float:none;margin:0 auto}.g-b--right{float:right}.g-b--1of1{width:100%}.g-b--1of2,.g-b--2of4,.g-b--3of6,.g-b--4of8,.g-b--5of10,.g-b--6of12{width:50%}.g-b--1of3,.g-b--2of6,.g-b--4of12{width:33.333%}.g-b--2of3,.g-b--4of6,.g-b--8of12{width:66.666%}.g-b--1of4,.g-b--2of8,.g-b--3of12{width:25%}.g-b--3of4,.g-b--6of8,.g-b--9of12{width:75%}.g-b--1of5,.g-b--2of10{width:20%}.g-b--2of5,.g-b--4of10{width:40%}.g-b--3of5,.g-b--6of10{width:60%}.g-b--4of5,.g-b--8of10{width:80%}.g-b--1of6,.g-b--2of12{width:16.666%}.g-b--5of6,.g-b--10of12{width:83.333%}.g-b--1of8{width:12.5%}.g-b--3of8{width:37.5%}.g-b--5of8{width:62.5%}.g-b--7of8{width:87.5%}.g-b--1of10{width:10%}.g-b--3of10{width:30%}.g-b--7of10{width:70%}.g-b--9of10{width:90%}.g-b--1of12{width:8.333%}.g-b--5of12{width:41.666%}.g-b--7of12{width:58.333%}.g-b--11of12{width:91.666%}.g-b--push--1of1{margin-left:100%}.g-b--push--1of2,.g-b--push--2of4,.g-b--push--3of6,.g-b--push--4of8,.g-b--push--5of10,.g-b--push--6of12{margin-left:50%}.g-b--push--1of3,.g-b--push--2of6,.g-b--push--4of12{margin-left:33.333%}.g-b--push--2of3,.g-b--push--4of6,.g-b--push--8of12{margin-left:66.666%}.g-b--push--1of4,.g-b--push--2of8,.g-b--push--3of12{margin-left:25%}.g-b--push--3of4,.g-b--push--6of8,.g-b--push--9of12{margin-left:75%}.g-b--push--1of5,.g-b--push--2of10{margin-left:20%}.g-b--push--2of5,.g-b--push--4of10{margin-left:40%}.g-b--push--3of5,.g-b--push--6of10{margin-left:60%}.g-b--push--4of5,.g-b--push--8of10{margin-left:80%}.g-b--push--1of6,.g-b--push--2of12{margin-left:16.666%}.g-b--push--5of6,.g-b--push--10of12{margin-left:83.333%}.g-b--push--1of8{margin-left:12.5%}.g-b--push--3of8{margin-left:37.5%}.g-b--push--5of8{margin-left:62.5%}.g-b--push--7of8{margin-left:87.5%}.g-b--push--1of10{margin-left:10%}.g-b--push--3of10{margin-left:30%}.g-b--push--7of10{margin-left:70%}.g-b--push--9of10{margin-left:90%}.g-b--push--1of12{margin-left:8.333%}.g-b--push--5of12{margin-left:41.666%}.g-b--push--7of12{margin-left:58.333%}.g-b--push--11of12{margin-left:91.666%}.g-b--pull--1of1{margin-right:100%}.g-b--pull--1of2,.g-b--pull--2of4,.g-b--pull--3of6,.g-b--pull--4of8,.g-b--pull--5of10,.g-b--pull--6of12{margin-right:50%}.g-b--pull--1of3,.g-b--pull--2of6,.g-b--pull--4of12{margin-right:33.333%}.g-b--pull--2of3,.g-b--pull--4of6,.g-b--pull--8of12{margin-right:66.666%}.g-b--pull--1of4,.g-b--pull--2of8,.g-b--pull--3of12{margin-right:25%}.g-b--pull--3of4,.g-b--pull--6of8,.g-b--pull--9of12{margin-right:75%}.g-b--pull--1of5,.g-b--pull--2of10{margin-right:20%}.g-b--pull--2of5,.g-b--pull--4of10{margin-right:40%}.g-b--pull--3of5,.g-b--pull--6of10{margin-right:60%}.g-b--pull--4of5,.g-b--pull--8of10{margin-right:80%}.g-b--pull--1of6,.g-b--pull--2of12{margin-right:16.666%}.g-b--pull--5of6,.g-b--pull--10of12{margin-right:83.333%}.g-b--pull--1of8{margin-right:12.5%}.g-b--pull--3of8{margin-right:37.5%}.g-b--pull--5of8{margin-right:62.5%}.g-b--pull--7of8{margin-right:87.5%}.g-b--pull--1of10{margin-right:10%}.g-b--pull--3of10{margin-right:30%}.g-b--pull--7of10{margin-right:70%}.g-b--pull--9of10{margin-right:90%}.g-b--pull--1of12{margin-right:8.333%}.g-b--pull--5of12{margin-right:41.666%}.g-b--pull--7of12{margin-right:58.333%}.g-b--pull--11of12{margin-right:91.666%}.splashscreen{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#373D49;z-index:22}.splashscreen-dillinger{width:260px;height:auto;display:block;margin:0 auto;padding-bottom:3rem}.splashscreen p{font-size:1.25rem;padding-top:.56251rem;font-family:"Source Sans Pro","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;text-align:center;max-width:500px;margin:0 auto;color:#FFF}.sp-center{position:relative;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);top:50%}.open-menu>.wrapper{overflow-x:hidden}.page{margin:0 auto;position:relative;top:0;left:0;width:100%;height:100%;z-index:2;-webkit-transition:all .25s ease-in-out;transition:all .25s ease-in-out;background-color:#fff;padding-top:51px;will-change:left}.open-menu .page{left:270px}.title{line-height:1rem;font-size:.8rem;margin-bottom:.77999rem;padding-top:.22001rem;font-weight:500;color:#A0AABF;letter-spacing:1px;text-transform:uppercase;padding-left:16px;padding-right:16px;margin-top:1rem}.split-preview .title{padding-left:0}.title-document{line-height:1rem;font-size:1.25rem;margin-bottom:.89999rem;padding-top:.10001rem;font-weight:400;font-family:"Ubuntu Mono",Monaco;color:#373D49;padding-left:16px;padding-right:16px;width:80%;min-width:300px;outline:0;border:none}.icon{display:block;margin:0 auto;width:36px;height:36px;border-radius:3px;text-align:center}.icon svg{display:inline-block;margin-left:auto;margin-right:auto}.icon-preview{background-color:#373D49;line-height:40px}.icon-preview svg{width:19px;height:12px}.icon-settings{background-color:#373D49;line-height:44px}.icon-settings svg{width:18px;height:18px}.icon-link{width:16px;height:16px;line-height:1;margin-right:24px;text-align:right}.navbar{background-color:#373D49;height:51px;width:100%;position:fixed;top:0;left:0;z-index:6;-webkit-transition:all .25s ease-in-out;transition:all .25s ease-in-out;will-change:left}.navbar:after{content:"";display:table;clear:both}.open-menu .navbar{left:270px}.navbar-brand{float:left;margin:0 0 0 24px;padding:0;line-height:42px}.navbar-brand svg{width:85px;height:11px}.nav-left{float:left}.nav-right{float:right}.nav-sidebar{width:100%}.menu{list-style:none;margin:0;padding:0}.menu a{border:0;color:#A0AABF;font-family:"Source Sans Pro","Helvetica Neue",Helvetica,Arial,sans-serif;outline:none;text-transform:uppercase}.menu a:hover{color:#35D7BB}.menu .menu-item{border:0;display:none;float:left;margin:0;position:relative}.menu .menu-item>a{display:block;font-size:12px;height:51px;letter-spacing:1px;line-height:51px;padding:0 24px}.menu .menu-item--settings,.menu .menu-item--preview,.menu .menu-item--save-to.in-sidebar,.menu .menu-item--import-from.in-sidebar,.menu .menu-item--link-unlink.in-sidebar,.menu .menu-item--documents.in-sidebar{display:block}.menu .menu-item--documents{padding-bottom:1rem}.menu .menu-item.open>a{background-color:#1D212A}.menu .menu-item-icon>a{height:auto;padding:0}.menu .menu-item-icon:hover>a{background-color:transparent}.menu .menu-link.open i{background-color:#1D212A}.menu .menu-link.open g{fill:#35D7BB}.menu .menu-link-preview,.menu .menu-link-settings{margin-top:8px;width:51px}.menu-sidebar{width:100%}.menu-sidebar .menu-item{float:none;margin-bottom:1px;width:100%}.menu-sidebar .menu-item.open>a{background-color:#373D49}.menu-sidebar .open .caret{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.menu-sidebar>.menu-item:hover .dropdown a,.menu-sidebar>.menu-item:hover .settings a{background-color:transparent}.menu-sidebar .menu-link{background-color:#373D49;font-weight:600}.menu-sidebar .menu-link:after{content:"";display:table;clear:both}.menu-sidebar .menu-link>span{float:left}.menu-sidebar .menu-link>.caret{float:right;text-align:right;top:22px}.menu-sidebar .dropdown,.menu-sidebar .settings{background-color:transparent;position:static;width:100%}.dropdown{position:absolute;right:0;top:51px;width:188px}.dropdown,.settings{display:none;background-color:#1D212A}.dropdown{padding:0}.dropdown,.settings,.sidebar-list{list-style:none;margin:0}.sidebar-list{padding:0}.dropdown li{margin:32px 0;padding:0 0 0 32px}.dropdown li,.settings li{line-height:1}.sidebar-list li{line-height:1;margin:32px 0;padding:0 0 0 32px}.dropdown a{color:#D0D6E2}.dropdown a,.settings a,.sidebar-list a{display:block;text-transform:none}.sidebar-list a{color:#D0D6E2}.dropdown a:after,.settings a:after,.sidebar-list a:after{content:"";display:table;clear:both}.dropdown .icon,.settings .icon,.sidebar-list .icon{float:right}.open .dropdown,.open .settings,.open .sidebar-list{display:block}.open .dropdown.collapse,.open .collapse.settings,.open .sidebar-list.collapse{display:none}.open .dropdown.collapse.in,.open .collapse.in.settings,.open .sidebar-list.collapse.in{display:block}.dropdown .unlinked .icon,.settings .unlinked .icon,.sidebar-list .unlinked .icon{opacity:.3}.dropdown.documents li,.documents.settings li,.sidebar-list.documents li{background-image:url("../img/icons/file.svg");background-position:240px center;background-repeat:no-repeat;background-size:14px 16px;padding:3px 32px}.dropdown.documents li.octocat,.documents.settings li.octocat,.sidebar-list.documents li.octocat{background-image:url("../img/icons/octocat.svg");background-position:234px center;background-size:24px 24px}.dropdown.documents li:last-child,.documents.settings li:last-child,.sidebar-list.documents li:last-child{margin-bottom:1rem}.dropdown.documents li.active a,.documents.settings li.active a,.sidebar-list.documents li.active a{color:#35D7BB}.settings{position:fixed;top:67px;right:16px;border-radius:3px;width:288px;background-color:#373D49;padding:16px;z-index:7}.show-settings .settings{display:block}.settings .has-checkbox{float:left}.settings a{font-size:1.25rem;font-family:"Source Sans Pro","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;-webkit-font-smoothing:antialiased;line-height:28px;color:#D0D6E2}.settings a:after{content:"";display:table;clear:both}.settings a:hover{color:#35D7BB}.settings li{border-bottom:1px solid #4F535B;margin:0;padding:16px 0}.settings li:last-child{border-bottom:none}.brand{border:none;display:block}.brand:hover g{fill:#35D7BB}.toggle{display:block;float:left;height:16px;padding:25px 16px 26px;width:40px}.toggle span:after,.toggle span:before{content:'';left:0;position:absolute;top:-6px}.toggle span:after{top:6px}.toggle span{display:block;position:relative}.toggle span,.toggle span:after,.toggle span:before{-webkit-backface-visibility:hidden;backface-visibility:hidden;background-color:#D3DAEA;height:2px;-webkit-transition:all .3s;transition:all .3s;width:20px}.open-menu .toggle span{background-color:transparent}.open-menu .toggle span:before{-webkit-transform:rotate(45deg)translate(3px,3px);-ms-transform:rotate(45deg)translate(3px,3px);transform:rotate(45deg)translate(3px,3px)}.open-menu .toggle span:after{-webkit-transform:rotate(-45deg)translate(5px,-6px);-ms-transform:rotate(-45deg)translate(5px,-6px);transform:rotate(-45deg)translate(5px,-6px)}.caret{display:inline-block;width:0;height:0;margin-left:6px;vertical-align:middle;position:relative;top:-1px;border-top:4px solid;border-right:4px solid transparent;border-left:4px solid transparent}.sidebar{overflow:auto;height:100%;padding-right:15px;padding-bottom:15px;width:285px}.sidebar-wrapper{-webkit-overflow-scrolling:touch;background-color:#2B2F36;left:0;height:100%;overflow-y:hidden;position:fixed;top:0;width:285px;z-index:1}.sidebar-branding{width:160px;padding:0;margin:16px auto}.header{border-bottom:1px solid #E8E8E8;position:relative}.words{line-height:1rem;font-size:.8rem;margin-bottom:.77999rem;padding-top:.22001rem;font-weight:500;font-family:"Source Sans Pro","Helvetica Neue",Helvetica,Arial,sans-serif;color:#A0AABF;letter-spacing:1px;text-transform:uppercase;z-index:5;position:absolute;right:16px;top:0}.words span{color:#000}.btn{text-align:center;display:inline-block;width:100%;text-transform:uppercase;font-weight:600;font-family:"Source Sans Pro","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;text-shadow:0 1px 0 #1b8b77;padding:16px 24px;background-color:#35D7BB;border-radius:3px;margin:0 auto 16px;line-height:1;color:#fff;-webkit-transition:all .15s linear;transition:all .15s linear;-webkit-font-smoothing:antialiased}.btn--new,.btn--save{display:block;width:238px}.btn--new:hover,.btn--new:focus,.btn--save:hover,.btn--save:focus{color:#fff;border-bottom-color:transparent;box-shadow:0 1px 3px #24b59c;text-shadow:0 1px 0 #24b59c}.btn--save{background-color:#4A5261;text-shadow:0 1px 1px #1e2127}.btn--save:hover,.btn--save:focus{color:#fff;border-bottom-color:transparent;box-shadow:0 1px 5px #08090a;text-shadow:none}.btn--delete{display:block;width:238px;background-color:transparent;font-size:12px;text-shadow:none}.btn--delete:hover,.btn--delete:focus{color:#fff;border-bottom-color:transparent;text-shadow:0 1px 0 #08090a;opacity:.8}.btn--ok,.btn--close{border-top:0;background-color:#4A5261;text-shadow:0 1px 0 #08090a;margin:0}.btn--ok:hover,.btn--ok:focus,.btn--close:hover,.btn--close:focus{color:#fff;background-color:#292d36;text-shadow:none}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(55,61,73,.8);-webkit-transition:all .25s ease-in-out;transition:all .25s ease-in-out;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out;will-change:left,opacity,visibility;z-index:5;opacity:0;visibility:hidden}.show-settings .overlay{visibility:visible;opacity:1}.switch{float:right;line-height:1}.switch input{display:none}.switch small{display:inline-block;cursor:pointer;padding:0 24px 0 0;-webkit-transition:all ease .2s;transition:all ease .2s;background-color:#2B2F36;border-color:#2B2F36}.switch small,.switch small:before{border-radius:30px;box-shadow:inset 0 0 2px 0 #14171F}.switch small:before{display:block;content:'';width:28px;height:28px;background:#fff}.switch.checked small{padding-right:0;padding-left:24px;background-color:#35D7BB;box-shadow:none}.modal--dillinger.about .modal-dialog{font-size:1.25rem;max-width:500px}.modal--dillinger .modal-dialog{max-width:600px;width:auto;margin:5rem auto}.modal--dillinger .modal-content{background:#373D49;border-radius:3px;box-shadow:0 2px 5px 0 #2C3B59;color:#fff;font-family:"Source Sans Pro","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;padding:2rem}.modal--dillinger ul{list-style-type:disc;margin:1rem 0;padding:0 0 0 1rem}.modal--dillinger li{padding:0;margin:0}.modal--dillinger .modal-header{border:0;padding:0}.modal--dillinger .modal-body{padding:0}.modal--dillinger .modal-footer{border:0;padding:0}.modal--dillinger .close{color:#fff;opacity:1}.modal-backdrop{background-color:#373D49}.pagination--dillinger{padding:0!important;margin:1.5rem 0!important;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-align-content:stretch;-ms-flex-line-pack:stretch;align-content:stretch}.pagination--dillinger,.pagination--dillinger li{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.pagination--dillinger li{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;text-align:center}.pagination--dillinger li:first-child>a,.pagination--dillinger li.disabled>a,.pagination--dillinger li.disabled>a:hover,.pagination--dillinger li.disabled>a:focus,.pagination--dillinger li>a{background-color:transparent;border-color:#4F535B;border-right-color:transparent}.pagination--dillinger li.active>a,.pagination--dillinger li.active>a:hover,.pagination--dillinger li.active>a:focus{border-color:#4A5261;background-color:#4A5261;color:#fff}.pagination--dillinger li>a{float:none;color:#fff;width:100%;display:block;text-align:center;margin:0;border-right-color:transparent;padding:6px}.pagination--dillinger li>a:hover,.pagination--dillinger li>a:focus{border-color:#35D7BB;background-color:#35D7BB;color:#fff}.pagination--dillinger li:last-child a{border-color:#4F535B}.pagination--dillinger li:first-child a{border-right-color:transparent}.diNotify{position:absolute;z-index:9999;left:0;right:0;top:0;margin:0 auto;max-width:400px;text-align:center;-webkit-transition:top .5s ease-in-out,opacity .5s ease-in-out;transition:top .5s ease-in-out,opacity .5s ease-in-out;visibility:hidden}.diNotify-body{-webkit-font-smoothing:antialiased;background-color:#35D7BB;background:#666E7F;border-radius:3px;color:#fff;font-family:"Source Sans Pro","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;overflow:hidden;padding:1rem 2rem .5rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:baseline;-webkit-align-items:baseline;-ms-flex-align:baseline;align-items:baseline;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.diNotify-icon{display:block;width:16px;height:16px;line-height:16px;position:relative;top:3px}.diNotify-message{padding-left:1rem}.zen-wrapper{position:fixed;top:0;left:0;right:0;bottom:0;width:100%;height:100%;z-index:10;background-color:#FFF;opacity:0;-webkit-transition:opacity .25s ease-in-out;transition:opacity .25s ease-in-out}.zen-wrapper.on{opacity:1}.enter-zen-mode{background-image:url("../img/icons/enter-zen.svg");right:.5rem;top:.313rem;display:none}.enter-zen-mode,.close-zen-mode{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0;background-repeat:no-repeat;width:32px;height:32px;display:block;position:absolute}.close-zen-mode{background-image:url("../img/icons/exit-zen.svg");right:1rem;top:1rem}.zen-page{position:relative;top:0;bottom:0;z-index:11;height:100%;width:100%}#zen{font-size:1.25rem;width:300px;height:80%;margin:0 auto;position:relative;top:10%}#zen:before,#zen:after{content:"";position:absolute;height:10%;width:100%;z-index:12;pointer-events:none}.split{overflow:scroll;padding:0!important}.split-editor{padding-left:0;padding-right:0;position:relative}.show-preview .split-editor{display:none}.split-preview{background-color:#fff;display:none;top:0;position:relative;z-index:4}.show-preview .split-preview{display:block}#editor{font-size:1rem;font-family:"Ubuntu Mono",Monaco;font-weight:400;line-height:2rem;width:100%;height:100%}#editor .ace_gutter{-webkit-font-smoothing:antialiased}.editor-header{width:50%;float:left;border-bottom:1px solid #E8E8E8;position:relative}.editor-header--first{border-right:1px solid #E8E8E8}.editor-header .title{display:inline-block}#preview{padding:10px}#preview a{color:#A0AABF;text-decoration:underline}.sr-only{visibility:hidden;text-overflow:110%;overflow:hidden;top:-100px;position:absolute}.mnone{margin:0!important}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn,.form-inline .input-group .form-control{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .radio,.form-inline .checkbox{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .radio label,.form-inline .checkbox label{padding-left:0}.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}.form-horizontal .control-label{text-align:right;margin-bottom:0;padding-top:7px}.form-horizontal .form-group-lg .control-label{padding-top:14.3px}.form-horizontal .form-group-sm .control-label{padding-top:6px}.modal-dialog{width:600px;margin:30px auto}.modal-content{box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}@media screen and (min-width:27.5em){html{font-size:.875em}body{font-size:1rem}ul,ol{margin-bottom:.83999rem;padding-top:.16001rem}p{padding-top:.66001rem}p,pre{margin-bottom:1.33999rem}pre,blockquote p{font-size:1rem;padding-top:.66001rem}blockquote p{margin-bottom:.33999rem}h1{font-size:2.0571429rem;margin-bottom:.21999rem;padding-top:.78001rem}h2{font-size:1.953125rem;margin-bottom:.1835837rem;padding-top:.8164163rem}h3{font-size:1.6457143rem;margin-bottom:.07599rem;padding-top:.92401rem}h4{font-size:1.5625rem;margin-bottom:.546865rem;padding-top:.453135rem}h5{font-size:1.25rem;margin-bottom:-.56251rem;padding-top:.56251rem}h6{font-size:1rem;margin-bottom:-.65001rem;padding-top:.65001rem}.g{margin-left:-16px;margin-right:-16px}.g-b{padding-left:16px;padding-right:16px}.g-b--m1of1{width:100%}.g-b--m1of2,.g-b--m2of4,.g-b--m3of6,.g-b--m4of8,.g-b--m5of10,.g-b--m6of12{width:50%}.g-b--m1of3,.g-b--m2of6,.g-b--m4of12{width:33.333%}.g-b--m2of3,.g-b--m4of6,.g-b--m8of12{width:66.666%}.g-b--m1of4,.g-b--m2of8,.g-b--m3of12{width:25%}.g-b--m3of4,.g-b--m6of8,.g-b--m9of12{width:75%}.g-b--m1of5,.g-b--m2of10{width:20%}.g-b--m2of5,.g-b--m4of10{width:40%}.g-b--m3of5,.g-b--m6of10{width:60%}.g-b--m4of5,.g-b--m8of10{width:80%}.g-b--m1of6,.g-b--m2of12{width:16.666%}.g-b--m5of6,.g-b--m10of12{width:83.333%}.g-b--m1of8{width:12.5%}.g-b--m3of8{width:37.5%}.g-b--m5of8{width:62.5%}.g-b--m7of8{width:87.5%}.g-b--m1of10{width:10%}.g-b--m3of10{width:30%}.g-b--m7of10{width:70%}.g-b--m9of10{width:90%}.g-b--m1of12{width:8.333%}.g-b--m5of12{width:41.666%}.g-b--m7of12{width:58.333%}.g-b--m11of12{width:91.666%}.g-b--push--m1of1{margin-left:100%}.g-b--push--m1of2,.g-b--push--m2of4,.g-b--push--m3of6,.g-b--push--m4of8,.g-b--push--m5of10,.g-b--push--m6of12{margin-left:50%}.g-b--push--m1of3,.g-b--push--m2of6,.g-b--push--m4of12{margin-left:33.333%}.g-b--push--m2of3,.g-b--push--m4of6,.g-b--push--m8of12{margin-left:66.666%}.g-b--push--m1of4,.g-b--push--m2of8,.g-b--push--m3of12{margin-left:25%}.g-b--push--m3of4,.g-b--push--m6of8,.g-b--push--m9of12{margin-left:75%}.g-b--push--m1of5,.g-b--push--m2of10{margin-left:20%}.g-b--push--m2of5,.g-b--push--m4of10{margin-left:40%}.g-b--push--m3of5,.g-b--push--m6of10{margin-left:60%}.g-b--push--m4of5,.g-b--push--m8of10{margin-left:80%}.g-b--push--m1of6,.g-b--push--m2of12{margin-left:16.666%}.g-b--push--m5of6,.g-b--push--m10of12{margin-left:83.333%}.g-b--push--m1of8{margin-left:12.5%}.g-b--push--m3of8{margin-left:37.5%}.g-b--push--m5of8{margin-left:62.5%}.g-b--push--m7of8{margin-left:87.5%}.g-b--push--m1of10{margin-left:10%}.g-b--push--m3of10{margin-left:30%}.g-b--push--m7of10{margin-left:70%}.g-b--push--m9of10{margin-left:90%}.g-b--push--m1of12{margin-left:8.333%}.g-b--push--m5of12{margin-left:41.666%}.g-b--push--m7of12{margin-left:58.333%}.g-b--push--m11of12{margin-left:91.666%}.g-b--pull--m1of1{margin-right:100%}.g-b--pull--m1of2,.g-b--pull--m2of4,.g-b--pull--m3of6,.g-b--pull--m4of8,.g-b--pull--m5of10,.g-b--pull--m6of12{margin-right:50%}.g-b--pull--m1of3,.g-b--pull--m2of6,.g-b--pull--m4of12{margin-right:33.333%}.g-b--pull--m2of3,.g-b--pull--m4of6,.g-b--pull--m8of12{margin-right:66.666%}.g-b--pull--m1of4,.g-b--pull--m2of8,.g-b--pull--m3of12{margin-right:25%}.g-b--pull--m3of4,.g-b--pull--m6of8,.g-b--pull--m9of12{margin-right:75%}.g-b--pull--m1of5,.g-b--pull--m2of10{margin-right:20%}.g-b--pull--m2of5,.g-b--pull--m4of10{margin-right:40%}.g-b--pull--m3of5,.g-b--pull--m6of10{margin-right:60%}.g-b--pull--m4of5,.g-b--pull--m8of10{margin-right:80%}.g-b--pull--m1of6,.g-b--pull--m2of12{margin-right:16.666%}.g-b--pull--m5of6,.g-b--pull--m10of12{margin-right:83.333%}.g-b--pull--m1of8{margin-right:12.5%}.g-b--pull--m3of8{margin-right:37.5%}.g-b--pull--m5of8{margin-right:62.5%}.g-b--pull--m7of8{margin-right:87.5%}.g-b--pull--m1of10{margin-right:10%}.g-b--pull--m3of10{margin-right:30%}.g-b--pull--m7of10{margin-right:70%}.g-b--pull--m9of10{margin-right:90%}.g-b--pull--m1of12{margin-right:8.333%}.g-b--pull--m5of12{margin-right:41.666%}.g-b--pull--m7of12{margin-right:58.333%}.g-b--pull--m11of12{margin-right:91.666%}.splashscreen p{font-size:1.25rem;margin-bottom:1.43749rem;padding-top:.56251rem}.title{font-size:.8rem;margin-bottom:.77999rem;padding-top:.22001rem}.title-document{margin-bottom:.89999rem;padding-top:.10001rem}.title-document,.settings a{font-size:1.25rem}.words{font-size:.8rem;margin-bottom:.77999rem;padding-top:.22001rem}.modal--dillinger.about .modal-dialog,#zen{font-size:1.25rem}#zen{width:400px}#editor{font-size:1rem}}@media screen and (min-width:46.25em){html{font-size:.875em}body{font-size:1rem}ul,ol{margin-bottom:.83999rem;padding-top:.16001rem}p{padding-top:.66001rem}p,pre{margin-bottom:1.33999rem}pre,blockquote p{font-size:1rem;padding-top:.66001rem}blockquote p{margin-bottom:.33999rem}h1{font-size:2.0571429rem;margin-bottom:.21999rem;padding-top:.78001rem}h2{font-size:1.953125rem;margin-bottom:.1835837rem;padding-top:.8164163rem}h3{font-size:1.6457143rem;margin-bottom:.07599rem;padding-top:.92401rem}h4{font-size:1.5625rem;margin-bottom:.546865rem;padding-top:.453135rem}h5{font-size:1.25rem;margin-bottom:-.56251rem;padding-top:.56251rem}h6{font-size:1rem;margin-bottom:-.65001rem;padding-top:.65001rem}.g{margin-left:-16px;margin-right:-16px}.g-b{padding-left:16px;padding-right:16px}.g-b--t1of1{width:100%}.g-b--t1of2,.g-b--t2of4,.g-b--t3of6,.g-b--t4of8,.g-b--t5of10,.g-b--t6of12{width:50%}.g-b--t1of3,.g-b--t2of6,.g-b--t4of12{width:33.333%}.g-b--t2of3,.g-b--t4of6,.g-b--t8of12{width:66.666%}.g-b--t1of4,.g-b--t2of8,.g-b--t3of12{width:25%}.g-b--t3of4,.g-b--t6of8,.g-b--t9of12{width:75%}.g-b--t1of5,.g-b--t2of10{width:20%}.g-b--t2of5,.g-b--t4of10{width:40%}.g-b--t3of5,.g-b--t6of10{width:60%}.g-b--t4of5,.g-b--t8of10{width:80%}.g-b--t1of6,.g-b--t2of12{width:16.666%}.g-b--t5of6,.g-b--t10of12{width:83.333%}.g-b--t1of8{width:12.5%}.g-b--t3of8{width:37.5%}.g-b--t5of8{width:62.5%}.g-b--t7of8{width:87.5%}.g-b--t1of10{width:10%}.g-b--t3of10{width:30%}.g-b--t7of10{width:70%}.g-b--t9of10{width:90%}.g-b--t1of12{width:8.333%}.g-b--t5of12{width:41.666%}.g-b--t7of12{width:58.333%}.g-b--t11of12{width:91.666%}.g-b--push--t1of1{margin-left:100%}.g-b--push--t1of2,.g-b--push--t2of4,.g-b--push--t3of6,.g-b--push--t4of8,.g-b--push--t5of10,.g-b--push--t6of12{margin-left:50%}.g-b--push--t1of3,.g-b--push--t2of6,.g-b--push--t4of12{margin-left:33.333%}.g-b--push--t2of3,.g-b--push--t4of6,.g-b--push--t8of12{margin-left:66.666%}.g-b--push--t1of4,.g-b--push--t2of8,.g-b--push--t3of12{margin-left:25%}.g-b--push--t3of4,.g-b--push--t6of8,.g-b--push--t9of12{margin-left:75%}.g-b--push--t1of5,.g-b--push--t2of10{margin-left:20%}.g-b--push--t2of5,.g-b--push--t4of10{margin-left:40%}.g-b--push--t3of5,.g-b--push--t6of10{margin-left:60%}.g-b--push--t4of5,.g-b--push--t8of10{margin-left:80%}.g-b--push--t1of6,.g-b--push--t2of12{margin-left:16.666%}.g-b--push--t5of6,.g-b--push--t10of12{margin-left:83.333%}.g-b--push--t1of8{margin-left:12.5%}.g-b--push--t3of8{margin-left:37.5%}.g-b--push--t5of8{margin-left:62.5%}.g-b--push--t7of8{margin-left:87.5%}.g-b--push--t1of10{margin-left:10%}.g-b--push--t3of10{margin-left:30%}.g-b--push--t7of10{margin-left:70%}.g-b--push--t9of10{margin-left:90%}.g-b--push--t1of12{margin-left:8.333%}.g-b--push--t5of12{margin-left:41.666%}.g-b--push--t7of12{margin-left:58.333%}.g-b--push--t11of12{margin-left:91.666%}.g-b--pull--t1of1{margin-right:100%}.g-b--pull--t1of2,.g-b--pull--t2of4,.g-b--pull--t3of6,.g-b--pull--t4of8,.g-b--pull--t5of10,.g-b--pull--t6of12{margin-right:50%}.g-b--pull--t1of3,.g-b--pull--t2of6,.g-b--pull--t4of12{margin-right:33.333%}.g-b--pull--t2of3,.g-b--pull--t4of6,.g-b--pull--t8of12{margin-right:66.666%}.g-b--pull--t1of4,.g-b--pull--t2of8,.g-b--pull--t3of12{margin-right:25%}.g-b--pull--t3of4,.g-b--pull--t6of8,.g-b--pull--t9of12{margin-right:75%}.g-b--pull--t1of5,.g-b--pull--t2of10{margin-right:20%}.g-b--pull--t2of5,.g-b--pull--t4of10{margin-right:40%}.g-b--pull--t3of5,.g-b--pull--t6of10{margin-right:60%}.g-b--pull--t4of5,.g-b--pull--t8of10{margin-right:80%}.g-b--pull--t1of6,.g-b--pull--t2of12{margin-right:16.666%}.g-b--pull--t5of6,.g-b--pull--t10of12{margin-right:83.333%}.g-b--pull--t1of8{margin-right:12.5%}.g-b--pull--t3of8{margin-right:37.5%}.g-b--pull--t5of8{margin-right:62.5%}.g-b--pull--t7of8{margin-right:87.5%}.g-b--pull--t1of10{margin-right:10%}.g-b--pull--t3of10{margin-right:30%}.g-b--pull--t7of10{margin-right:70%}.g-b--pull--t9of10{margin-right:90%}.g-b--pull--t1of12{margin-right:8.333%}.g-b--pull--t5of12{margin-right:41.666%}.g-b--pull--t7of12{margin-right:58.333%}.g-b--pull--t11of12{margin-right:91.666%}.splashscreen-dillinger{width:500px}.splashscreen p{font-size:1.25rem;margin-bottom:1.43749rem;padding-top:.56251rem}.title{font-size:.8rem;margin-bottom:.77999rem;padding-top:.22001rem}.title-document{font-size:1.25rem;margin-bottom:.89999rem;padding-top:.10001rem}.menu .menu-item--save-to,.menu .menu-item--import-from{display:block}.menu .menu-item--preview,.menu .menu-item--save-to.in-sidebar,.menu .menu-item--import-from.in-sidebar{display:none}.settings a{font-size:1.25rem}.words{font-size:.8rem;margin-bottom:.77999rem;padding-top:.22001rem}.modal--dillinger.about .modal-dialog{font-size:1.25rem}.enter-zen-mode{display:block}.close-zen-mode{right:3rem;top:3rem}#zen{font-size:1.25rem;width:500px}.split-editor{border-right:1px solid #E8E8E8;float:left;height:calc(100vh - 172px);-webkit-overflow-scrolling:touch;padding-right:16px;width:50%}.show-preview .split-editor{display:block}.split-preview{display:block;float:right;height:calc(100vh - 172px);-webkit-overflow-scrolling:touch;position:relative;top:0;width:50%}#editor{font-size:1rem}}@media screen and (min-width:62.5em){html{font-size:.875em}body{font-size:1rem}ul,ol{margin-bottom:.83999rem;padding-top:.16001rem}p{padding-top:.66001rem}p,pre{margin-bottom:1.33999rem}pre,blockquote p{font-size:1rem;padding-top:.66001rem}blockquote p{margin-bottom:.33999rem}h1{font-size:2.0571429rem;margin-bottom:.21999rem;padding-top:.78001rem}h2{font-size:1.953125rem;margin-bottom:.1835837rem;padding-top:.8164163rem}h3{font-size:1.6457143rem;margin-bottom:.07599rem;padding-top:.92401rem}h4{font-size:1.5625rem;margin-bottom:.546865rem;padding-top:.453135rem}h5{font-size:1.25rem;margin-bottom:-.56251rem;padding-top:.56251rem}h6{font-size:1rem;margin-bottom:-.65001rem;padding-top:.65001rem}.g{margin-left:-16px;margin-right:-16px}.g-b{padding-left:16px;padding-right:16px}.g-b--d1of1{width:100%}.g-b--d1of2,.g-b--d2of4,.g-b--d3of6,.g-b--d4of8,.g-b--d5of10,.g-b--d6of12{width:50%}.g-b--d1of3,.g-b--d2of6,.g-b--d4of12{width:33.333%}.g-b--d2of3,.g-b--d4of6,.g-b--d8of12{width:66.666%}.g-b--d1of4,.g-b--d2of8,.g-b--d3of12{width:25%}.g-b--d3of4,.g-b--d6of8,.g-b--d9of12{width:75%}.g-b--d1of5,.g-b--d2of10{width:20%}.g-b--d2of5,.g-b--d4of10{width:40%}.g-b--d3of5,.g-b--d6of10{width:60%}.g-b--d4of5,.g-b--d8of10{width:80%}.g-b--d1of6,.g-b--d2of12{width:16.666%}.g-b--d5of6,.g-b--d10of12{width:83.333%}.g-b--d1of8{width:12.5%}.g-b--d3of8{width:37.5%}.g-b--d5of8{width:62.5%}.g-b--d7of8{width:87.5%}.g-b--d1of10{width:10%}.g-b--d3of10{width:30%}.g-b--d7of10{width:70%}.g-b--d9of10{width:90%}.g-b--d1of12{width:8.333%}.g-b--d5of12{width:41.666%}.g-b--d7of12{width:58.333%}.g-b--d11of12{width:91.666%}.g-b--push--d1of1{margin-left:100%}.g-b--push--d1of2,.g-b--push--d2of4,.g-b--push--d3of6,.g-b--push--d4of8,.g-b--push--d5of10,.g-b--push--d6of12{margin-left:50%}.g-b--push--d1of3,.g-b--push--d2of6,.g-b--push--d4of12{margin-left:33.333%}.g-b--push--d2of3,.g-b--push--d4of6,.g-b--push--d8of12{margin-left:66.666%}.g-b--push--d1of4,.g-b--push--d2of8,.g-b--push--d3of12{margin-left:25%}.g-b--push--d3of4,.g-b--push--d6of8,.g-b--push--d9of12{margin-left:75%}.g-b--push--d1of5,.g-b--push--d2of10{margin-left:20%}.g-b--push--d2of5,.g-b--push--d4of10{margin-left:40%}.g-b--push--d3of5,.g-b--push--d6of10{margin-left:60%}.g-b--push--d4of5,.g-b--push--d8of10{margin-left:80%}.g-b--push--d1of6,.g-b--push--d2of12{margin-left:16.666%}.g-b--push--d5of6,.g-b--push--d10of12{margin-left:83.333%}.g-b--push--d1of8{margin-left:12.5%}.g-b--push--d3of8{margin-left:37.5%}.g-b--push--d5of8{margin-left:62.5%}.g-b--push--d7of8{margin-left:87.5%}.g-b--push--d1of10{margin-left:10%}.g-b--push--d3of10{margin-left:30%}.g-b--push--d7of10{margin-left:70%}.g-b--push--d9of10{margin-left:90%}.g-b--push--d1of12{margin-left:8.333%}.g-b--push--d5of12{margin-left:41.666%}.g-b--push--d7of12{margin-left:58.333%}.g-b--push--d11of12{margin-left:91.666%}.g-b--pull--d1of1{margin-right:100%}.g-b--pull--d1of2,.g-b--pull--d2of4,.g-b--pull--d3of6,.g-b--pull--d4of8,.g-b--pull--d5of10,.g-b--pull--d6of12{margin-right:50%}.g-b--pull--d1of3,.g-b--pull--d2of6,.g-b--pull--d4of12{margin-right:33.333%}.g-b--pull--d2of3,.g-b--pull--d4of6,.g-b--pull--d8of12{margin-right:66.666%}.g-b--pull--d1of4,.g-b--pull--d2of8,.g-b--pull--d3of12{margin-right:25%}.g-b--pull--d3of4,.g-b--pull--d6of8,.g-b--pull--d9of12{margin-right:75%}.g-b--pull--d1of5,.g-b--pull--d2of10{margin-right:20%}.g-b--pull--d2of5,.g-b--pull--d4of10{margin-right:40%}.g-b--pull--d3of5,.g-b--pull--d6of10{margin-right:60%}.g-b--pull--d4of5,.g-b--pull--d8of10{margin-right:80%}.g-b--pull--d1of6,.g-b--pull--d2of12{margin-right:16.666%}.g-b--pull--d5of6,.g-b--pull--d10of12{margin-right:83.333%}.g-b--pull--d1of8{margin-right:12.5%}.g-b--pull--d3of8{margin-right:37.5%}.g-b--pull--d5of8{margin-right:62.5%}.g-b--pull--d7of8{margin-right:87.5%}.g-b--pull--d1of10{margin-right:10%}.g-b--pull--d3of10{margin-right:30%}.g-b--pull--d7of10{margin-right:70%}.g-b--pull--d9of10{margin-right:90%}.g-b--pull--d1of12{margin-right:8.333%}.g-b--pull--d5of12{margin-right:41.666%}.g-b--pull--d7of12{margin-right:58.333%}.g-b--pull--d11of12{margin-right:91.666%}.splashscreen-dillinger{width:700px}.splashscreen p{font-size:1.25rem;margin-bottom:1.43749rem;padding-top:.56251rem}.title{font-size:.8rem;margin-bottom:.77999rem;padding-top:.22001rem}.title-document{font-size:1.25rem;margin-bottom:.89999rem;padding-top:.10001rem}.menu .menu-item--export-as{display:block}.menu .menu-item--preview{display:none}.settings a{font-size:1.25rem}.words{font-size:.8rem;margin-bottom:.77999rem;padding-top:.22001rem}.modal--dillinger.about .modal-dialog,#zen{font-size:1.25rem}#zen{width:700px}#editor{font-size:1rem}}@media screen and (min-width:87.5em){html{font-size:.875em}body{font-size:1rem}ul,ol{margin-bottom:.83999rem;padding-top:.16001rem}p{padding-top:.66001rem}p,pre{margin-bottom:1.33999rem}pre,blockquote p{font-size:1rem;padding-top:.66001rem}blockquote p{margin-bottom:.33999rem}h1{font-size:2.0571429rem;margin-bottom:.21999rem;padding-top:.78001rem}h2{font-size:1.953125rem;margin-bottom:.1835837rem;padding-top:.8164163rem}h3{font-size:1.6457143rem;margin-bottom:.07599rem;padding-top:.92401rem}h4{font-size:1.5625rem;margin-bottom:.546865rem;padding-top:.453135rem}h5{font-size:1.25rem;margin-bottom:-.56251rem;padding-top:.56251rem}h6{font-size:1rem;margin-bottom:-.65001rem;padding-top:.65001rem}.splashscreen-dillinger{width:800px}.splashscreen p{font-size:1.25rem;margin-bottom:1.43749rem;padding-top:.56251rem}.title{font-size:.8rem;margin-bottom:.77999rem;padding-top:.22001rem}.title-document{margin-bottom:.89999rem;padding-top:.10001rem}.title-document,.settings a{font-size:1.25rem}.words{font-size:.8rem;margin-bottom:.77999rem;padding-top:.22001rem}.modal--dillinger.about .modal-dialog,#zen{font-size:1.25rem}#editor{font-size:1rem}}@media screen and (max-width:46.1875em){.editor-header{display:none}.editor-header--first{display:block;width:100%}}</style></head><body id="preview"> <p>The not so obvious keyboard shortcuts:</p> <hr> <table> <thead> <tr> <th>Action</th> <th>Windows</th> <th>Mac</th> <th>KDE</th> <th>Gnome</th> </tr> </thead> <tbody> <tr> <td>Quit</td> <td><code>Ctrl+Q</code></td> <td>same</td> <td>same</td> <td>same</td> </tr> <tr> <td>Focus search bar</td> <td><code>Ctrl+F</code></td> <td>same</td> <td>same</td> <td>same</td> </tr> <tr> <td>Next view</td> <td><code>Ctrl+Tab</code>, <code>Forward</code>, <code>Ctrl+F6</code></td> <td><code>Ctrl+}</code>, <code>Forward</code>, <code>Ctrl+Tab</code></td> <td><code>Ctrl+Tab</code>, <code>Forward</code>, <code>Ctrl+Comma</code></td> <td><code>Ctrl+Tab</code>, <code>Forward</code></td> </tr> <tr> <td>Previous view</td> <td><code>Ctrl+Shift+Tab</code>, <code>Back</code>, <code>Ctrl+Shift+F6</code></td> <td><code>Ctrl+{</code>, <code>Back</code>, <code>Ctrl+Shift+Tab</code></td> <td><code>Ctrl+Shift+Tab</code>, <code>Back</code>, <code>Ctrl+Period</code></td> <td><code>Ctrl+Shift+Tab</code>, <code>Back</code></td> </tr> <tr> <td>Next in search history</td> <td><code>Alt+Right</code>, <code>Shift+Backspace</code></td> <td><code>Ctrl+]</code></td> <td><code>Alt+Right</code></td> <td><code>Alt+Right</code></td> </tr> <tr> <td>Previous in search history</td> <td><code>Alt+Left</code>, <code>Backspace</code></td> <td><code>Ctrl+[</code></td> <td><code>Alt+Left</code></td> <td><code>Alt+Left</code></td> </tr> <tr> <td>Help</td> <td><code>F1</code></td> <td><code>Ctrl+?</code></td> <td><code>F1</code></td> <td><code>F1</code></td> </tr> <tr> <td>Toggle gallery menu</td> <td><code>Alt+G</code></td> <td>same</td> <td>same</td> <td>same</td> </tr> <tr> <td>Toggle view mode</td> <td><code>Alt+Space</code></td> <td>same</td> <td>same</td> <td>same</td> </tr> <tr> <td>Settings</td> <td><code>Ctrl+P</code></td> <td>same</td> <td>same</td> <td>same</td> </tr> </tbody> </table> </body></html> """ )
280.308642
65,842
0.758027
49,936
295,165
4.470642
0.030599
0.018742
0.018491
0.013546
0.933334
0.927564
0.922467
0.919828
0.916016
0.915188
0
0.073934
0.024088
295,165
1,052
65,843
280.575095
0.701043
0.005678
0
0.057927
0
0
0.249172
0.003235
0
0
0
0
0
0
null
null
0.036585
0.039634
null
null
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
9
5129ab50f7c25cfbddfde859a1cbe2d1f8603f2c
8,995
py
Python
P0_Coding_Diagnostic/submission_autograder.py
zheedong/CS188_Project
f10676e0dd6c7f0c46419dced2700c083bd7da72
[ "MIT" ]
1
2021-12-10T13:55:03.000Z
2021-12-10T13:55:03.000Z
tutorial/submission_autograder.py
abrarrhine/Artificial-Intelligence
20e6b183fc458977f0a9c157d5e40d8487408c86
[ "MIT" ]
13
2021-08-23T14:08:47.000Z
2022-01-18T08:38:40.000Z
P0_Coding_Diagnostic/submission_autograder.py
zheedong/CS188_Project
f10676e0dd6c7f0c46419dced2700c083bd7da72
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function from codecs import open import os, ssl if (not os.environ.get('PYTHONHTTPSVERIFY', '') and getattr(ssl, '_create_unverified_context', None)): ssl._create_default_https_context = ssl._create_unverified_context """ CS 188 Local Submission Autograder Written by the CS 188 Staff ============================================================================== _____ _ _ / ____| | | | | (___ | |_ ___ _ __ | | \___ \| __/ _ \| '_ \| | ____) | || (_) | |_) |_| |_____/ \__\___/| .__/(_) | | |_| Modifying or tampering with this file is a violation of course policy. If you're having trouble running the autograder, please contact the staff. ============================================================================== """ import bz2, base64 exec(bz2.decompress(base64.b64decode('QlpoOTFBWSZTWTAgfhoAPC9fgHkQfv///3////7////7YB1cNvuaHDXTGuOABzrDZrEwoPm7wZegAAaA7FBWEpQOQ6AdA0MCkaGhQ2A1KHQJrOhQQlCEaEZpNMgpk2lPyJ6jJ6SMQ2U8UNDQZBoeptNTQDTIjQQgRqNqZTU9T9I0aNMiPJDQ2oA0GgAGgHA0aMQaNMmEGIDEYmjRo0AaaaAAAAJNFJEIamap6SHqPFNNqHqaPRDymCAANGgADQ0DKomNTAAAmAaAAAJppgAAAAACRIIAQATRMKntT0BRjRT9Tyap6nqeSekaep6hoANNqdpD4Ynyw9oyf52isQZ+Jhf5Wv/SfiTM40FYpOmkZ72sf+2VYqMQSI/22oojBYvyJUOkO/5aVldwLxCwSLARWCQYsnkhKyfzJxyHnthO1sqH1lyw/yaYQgkipYk+RFy2z6cATUPbzrObMP49ze61nO7lVy9qtfyTdn8R6fr09q9mKaVdc/W/GaD33mr1tq0ycKnfH/fqhFWFGkSfL359V/Vtb3u97MO5Cz7vKQhepIwgEqoioqxVgoxAVEQVjFGRYqqQRFnxften0z6Z/F8HmM8vnP+aaW9fMX6mQ88SihJLnD8+I1PsX047HP6axq+1s5okzCxW1pSUoWIPt0OcCu3NW8U9txui7V6ecKctGxstZMZjzc5KV5Skd7+Y4XqVluyYwapWllFWa1Q4hCqqqqq8k+ToPDh267BFkWL2DscDtZUkSEAWZOxZOPZXHm6DYateuQ69/Tg4f4ulKn6rR3gb+d9yHKpVxry7U+eW/IvuB+uEHbnpimhfOs0bcCCSCQASE8Dfue24Czd1wLbZxM1Y5OxgA43RJwNFD8K7nWV1YcgsSCZ+NDQbTnl5Mwd614TfoIWykfLYMqquJWFUVFLJrg5DjowGzQSt3ajmwMa1V8HXR+Af4tYjqqFMdnYhNSwQoPeHKeqn7cDXHttikikZBpfWZZXiijG2DaBsYyXMdtmF+WF9OkRKDERwoy1Sqmv3UWRsc1NOFfydeRNjuNy8rA4Nrm+7ETNn6lThjgZLUx2G28pzf2N2a+gDA4100+gcfzDzDx1TCtuHIyfTnc428qsdGnbMuxrHQjskJRRfkHlvwULl9B20DPe5J44XfPzPuvMsAVEij5M8Kd/08fio3uLwUYiqqlcqZtM78gVMYY6HIicmFt9ju9fv4ZId1BjXWq7eZyyYeqqxpju4no/cb9fR1s+PNfLdsMus8n0Tj1cGXNcM0zrrYuvfcd6bHx2XG5tDiHAqTMdUHkJmZoxjmJjKYjwcbEn0g8L6Ys9lqkl6sXjVkv2PP2/2fb+9vm/9+n3AeHu9fwez21SI/AnPyjzSLqlOLz0AxnIdMWjeu24gcR6tpdvhMZA6sPj+D4Z60vy60M7t77lvESxCJJAYpMEXJxJg5mO9Wn3rVF1w9kwYYoT6HhnV18fuCl4AFTh0qyqWf428ZNNmgtgiQtDCd0UCk61h+7TWBNlcTI0hmrRgCwIqFD9S64zc9Q1FppWK02TKmZ39Pk8NdK6aCHLXKQvAgUyN0cVAl3rQELXBl7y1BgXQ8GLC1h4K1EDOSTbS8ZIAcEDmt2i1Nzy7hpnZtAFobr3S2IOKh9hTuUbIEaALFcvbIW1Qo2mGsE2W5zprfluHXsOuy+Txa7vD6qfpm7P7eKzVb5TH8pmuOFZwL+P8bmlOKjKahbuhQWugQ4WUmtrffaood5DSzOVK+kj4MK1y9mKA7dt7yfnTaE6R3vE7PvIVd+Z0rsSf1QPlLgdqo929STHQsCQT0PUmmI8UN3605Lh8Oe30x4dKa9a5QINRp07IFVqn8OTaTYZ0nSOesjG/wGvTLGuoay/dpod2yhlFJagvyWWyMvjULCq/E2FaHLtg1Xxi0ega7Zxh4RwlpSfgUi/lE6QA2rHHTVKw5bpVszlYpw+kc/UpGYmvHSf4rroPUFjs6A1uHLUqJxL4UWw4nEaRWW2sNdzRyYUcnT5//Lft37DC3tYlrYQx5kPdR2csjFUF08lY4eJV3pEcSyOHM9EUG8sXFCaHUfTaxa/c+dwyH8pzXHn9cjaRsNWIgCArvoUW7yJkElkK4Ljv91CkdjPvw3U9O01yo1mKHagQxQKVoJrlRXUUCeELXpfERYaDhUcOevdm2oKnbSkah7Zr5cqHIyJrKuWqN3Cw4LenhvY6ocPigtOvfF8oFpDyY56mgqXNF/X0Dxa80QEDPMVW7C5BlwZsY4rYdan98SmBcgNX7bwI797syB3NyrkgqBOmOCy8dJYUgcwAq+hhopVd/khh360fcQMkEMWV89LQMPssjQagt0YVsXRNZbLYqpNHwHN4ubKmpcBu1FQCtKa5bFzAguDxn1W2OgMgSy4YVllbTTylirJ7PJldPyQ6pC86IW5+g7/mUTOCToCnDkatfCAvJsOsDYno59rvj3KwGZZiT4PUsIAweYFYUenLOIMn7LiCHuGYftpd9i+QHIvxdtchtzXX9ZelKg0239A0eA7NWyvq6p/V0Qc+H+GO8HvFlueizPhhE554pXdDyx5L9KU7fTublfpscWLnwJ8Hr5jdcZFRh8IkEEcRXt3q5vYQJEkWI25Yrg6aai+59pmidzPZ14zNPON19+RNsxab7SOJYDEQLPoWAWOAdb5NoUfL5x2kn4D8JYI8uNXHyUekEheaF81KQR6TqoAeZK4upLE/dCS8WgVkDPSrIf1ej6/8/9cr70G6QiDRoR8zBtrI29z1+m/zdlTr9vMSWa9vV4H15Glsu+KTkHFz00vUU4wQRPrGs78fRt5eWr4Ffl43wqJqyWfT6qdDWSjgWIG5zDwQye9MVrLuiIW8WdM4QPERN+GKpUpcPSCibQUO32Ori4L6dYs7k3pAfVJtiK5TR7TCOwKBMRtZUwagiqt609USaJPRGPseLSlaDGOdtIpqvaSKOJQACSCOwVvILr/TXY6K4VF9oAEkEL/rrwooCtaSvkEoiAAkghRnABJBF5MIiQDNyo9UOJAJIJz8fYe68H/EBJCPRLw45EvcAkhG7pJdQCSESmP7uyTETyXgIiCHtAREEPH77xgyM285EYYolq5rbJYv9MAPuCREDoZRARhRJRBEkA4STg0MDIjJDoClJIiQKUsIiBeuipZgnBkESAcKWQRDYXGgCJOjPBJG0pg4IIkJOSlkiIXDjSREk/Q+0AkhGWR3d3DzfUAkhH+9T8LdficCnqs9Ph+YCSEXY2z7Le8BJCPh6Mh7wEkIzwk4u1B+TCX72EDiynL+PhXXPKjZmP36daiKlStVJYsQTzKPo9VLqLNekxdIkl0mmqmpFSRVfO+Dn8YdXCd8h3R5YiCnYu5eAv+zXPUuRcTpPJ6EqU3V5To7c7TiUvbHZW6Xg1ll7RNEyY2KbVJtDSZQ8ksYt1Dcdio16puHLmqrFWpTau0rebO5PF4zlaTg4pPB49/ChxBcw7AnVLUlBgiVVVRGylVVtFqskPGuXtUe708Ggvq5ea8ylvL4CQjrxlRQeHbyDcFenxbCt8Xk89uNVrXg5WwUj4bBwuby+Fbc56ivFe7h86/F+QCSEN9/0Pzfo7/Z6/U+vf4AwvG0p8/z4NnW7GZNNdc45G8463NNpbDdWmG8l2jciy2dZ3PZTi9EODBGFwYGggxOoSmKBioDSOmAeCW0SsKU4Tw9fW6KFSMZEXoa2SyxRGJ59iH2O3Dw7a20HS22lRrCBRassIDRNFpqgggg6ta1ECxUd3wJzi2XWNYWMUGLKlSlCwppLrbKMFF0KJRRgyCIUcrr+l+D+oBJCGtz9XcAkhHtASRDc+q/eAkhD2+4+igh6Ci6zKUwmQ2bKmEbqaYZmtaNy/QQJeER422MrZghsjYehGERk4BoQGwgYQEZDgQQokEEZzo4VSsKJeBKIcBiiIGDCRWhDCREHcXE0Qtlh1OCdI1toHASywYIMnROULazA7TEWJin1/yASQQuKdXAhwKqrUqDdanU/SxuXJAumJK1qlsGF5j/ZDuFqbGwX23XYY+M4rEH7/KcmtgwpdCTcapSo7DJfd9odmnvW0tsoHvQ6r8foR8rg1c39oDG63ZE/g/x++4wJm8gt8SC6hdiS/C5LSqMzCUrroNm7/QcQLjflQz5XAe3BO/ff97/snpMJIeoMie0NLIapeo0op4UDhjZNoKDYxQRisMhaI4JsJIwTn/IBJCH9EmuC6KUWL31pMlnqAxRWk5Vy/l/cEjWT4SAJWW7SCQgIgh4aW9rFM1DpOaJwqx81QYXosPG3A5qOwjDO/1gQrl1BOHYskDZ+5l/aD1MOEgC8pigZXNMbrZIxw+LXE3xGZdefNkbA0NJiKZiO3d5pyKALfQlFauLMFLHgzwGSlKUq4Wz4QJTauASQjfae/A+YkZhhHPUrX9Ykvpn9HtJPajTDZkqXCW60U+O84ivHwLC9+/bI8vbHG6vG63mvVKPQdCDEMYIiwrGoUr0FpQ0jFiqahRgkXho8KKNQKTQNMMxopr0eJ62WnEiawnrO1jUxKGoDZYvQjtcVKq4NUxa9UqhPkgMeLr6Enfsh7UoNwNuQ2oHEREBCUtLtDQhstBIiSNNMQ9k9U0mKQmEDYBEbJhy3HV8cnw2SItZDqq9NhRgPvsCN6w+6W6xo5YzmqqOoNiex7XITalCiJSiQybWtGUixuMKbGusrWVSgiqiZxCzis0Gz9AHHBzg0Zm3MiF0iSL7DSXCO6SKvtd3gmRE4WLgn3pxH8xfCqCjpVSQrphJoaY5D9QCSEWoivj39a8y48Vr+/3+CJ0OKAwSP1JNzHHkCJjEwYlLMDqNiTqkHjurOd+Yw/INdfLPG1g2Ew66oWiK3nAtDpQ1O1eVkwDzM8+wM0GeVjs7KbTI7U9vdlThWo6Jv0yi16VKegHxygL453tQB3V26oorxeMLV6xqnTebQjDkJpZm88vQpIBruRD0lNrRvEBVXgXFhEGRau7HfW4KPGUK0aRM5sGqFFO924xBOMK2yq88jK0myCpCVi1g1nMU0pC+fKeyyUg2gR+hK21Hm1ze3xpKrteUlAUp16gMUHUg7/RADQZYiSOq4NndxOYT5VEW9SzLL/1k2wgDzZ9nbvASQjo9CWIMHstTB2g0lxbS5wpdDROhUa5FxGEkDD4QjfxHhWQ5KJNSiQSJkQRkjVephYKOGV9ot4DVC/c+3GBdhSTkIaIihLXQe8pYZsPu60Fb9d1/1EifgIwOTfiazSQU1TLNc9cVU2ijxDfHxMWUC0ViAuttixJkrpiLpAF5YB/CnhYAFtqgv4Cz4jGU7E0DoR1AeYTYJoYhMY0dW66SUvvnB7O3wVntlEvuirQ+wBJCPwy8CieXMsDyFmEwn3nbaZda2yXjUhQYlUtc1Pj7QJTn7CiJp3WkEl6RiGmDY8l36DogxKrswgkqqz5H01rAyBUe9D3dWoCxZPrIAg+FX4idJYJdTLhTLh94t0WayyQFwWAJIRS1KrRuGevXU2Hi0mayEiBpkXaTCB+tiIChEEZ7Hy7CYVVjIuTBEEPz8b955gEkI2pFbDVvRLABJCIPKS8ga/d3ogLd8d65Aizx8qfDkkaCL8uIYccw3gd4xQ39EJdLlqgoZ3eym1OwDBKvcmz9R7rluaBsQTTQHraVQQaAFgiJmBN8zpGmL1kh72qQ1/gcQXkgXUbUvxXYCqibOMuTkRJ5DioxpkpQ5htv37vIDTPyvWRci2NE0NptiBjY00P0oKH+MGliM0g6PtOPm4ZNGOryfgrbjAW9HuvkSBgPKA1lu3wS5zzwLp2m/U5bMa2hI7jIFzASQjTR+n1Mfns1xJHxpm/hvONqcoFvOFw83NzG4Tty8aIsbS0rVtOk2KwrPCzw6lOwkDtGQO141FNWr8uzwrer14I9PWrQcLayUICEU4DkeaUyC5sYIUJUYYshgRlQFCycozkolpRNJCmlmkdkN4glynR1thbcywKjluFIIQRAQxtSgGbcBWCLQ85g8suc+qM17vPzjoCedaUbE2rbJRpTK0FjDMUWFIJaJhKT1et6h7PtM+sMrYA04jwghkH4gJIRKb2ozsCA4Fo2G1iC9pF4X+uMCarthTaFdsMZiJvqtHbkprsOu7r9WVTnz0FuWjA2wQLdKN5ELZd0taPPhptIMs0Y0iV5UTEjGpWlblA3SYC1BgvgHfJ6XELHjrFZJGlERKetfNyyO5mrbdB2d0kjdRZ6RlcAkhFNqk5xBOFDaQNJgMjixpsNb2Yb628DAw3YkupfsioZo5gYgMV2l6DjaP57Qm8QD6RkrJg2afTlufIwXVt9lxgnyCGDMIWQ2NjbG2MUWIiBqNLeDitL7M7hyp+GBWM4WWBRgT2ZslJCOb/nWCbadxewJSEwuMNOu23plMc3HE3XooA2i5F8nIgaDAgRJAQKBNZzJeQybSSKIDrskyzJEvQKziBqnZw4PeOoMDYNa1367sExGpkhsBsAwYpsEKy+1JPICSEOpLHsfZn7j3fR31X38+2AkhHJLh3/1kj2zCFsFQbbYS8xvOfA42/xbYtAVp5Aj7AUHhZdF9m1n6Us9ekcVwhS1vU0jnSkamgbEiUoSJhys4nJfhZYrESZoF8eH69vHlS/20aBQXF22aqFqHb6vEVA0aRYCLkYcMw82dbUk0KP5UyFsiL/1Fe8DBNu3xxxz4gwE56BU5vPubjrBf2Pkx9R0DifpM3hWvVKjPqYzY2KlMnZeXWZbvn5zjyqlCwxK5DpeW2jw0rDYtDunxvR3+5dO/lb414qZ8Rjx5k8mycVqhRVtTlKqdS1daIo0KjlaGRmYpQ/V51yyjKhQayLHkkB2gxxNhsByPXee/6Pmn8j7/ik8J5Hq8lTVhS6ibQRbBw0hk1YKKQF+PIaH8vDs4bB/s2mCMIgZEYyiHA4gIbh1DFo0QGQSrQZWjqSPpD5vm/OPFFq3SEieGL5Wza7Wxhqdl1nUIuRiBRfDpjdYZIA4vjPKpB/UAkhEqCMCbLbHjAIkx5p22r5pR8mh4t7HDBZEh7e/juyHSVs8QPpAMWYYoC/uAJ3XLB5DJJ2pc8qypBSLogvRjyFmKnVifOWomdoey9ZjHTKEku538M66jmAkhDMfGtJzKplig9Zsqigh4pgDADZai0Rd4+tUwexYcbccA/JQGsJAQFrzAM2mxz8X4LCBQk1DCrBeT3UtDHzic2aHAcgfcmmKVdG2FCZ52bLK3j9NayllBY5qjIjzxLe4Tw0NVoF0FIJXqL7LcneMtZZdIJANFyCH4SMxEUk4gKOxkfWAkhGOWCxsCQtiVuvvfU56g4txaMYyQQqrvZ6srvmHdfW+xEwxvn4ICQGi4BUnQ+F1/jPG9ItwhMaAbWHDTfosdptjeOdprFnYDYmCJKEAweQ4yiN4EAay67nKt5ri/cBpgZ4zbrYiKY11PMAOEfwlXu11GBc9jB95bQwAhz38Fv4DjhggCVBU9KuE6nfXUogdZuZLXS3vtxDx9VHo7MTo6cB03hNBaA7t2iGoCBQsWigejMRcj0hBuj2wALSB6DTftrGJuHEglSU5ZDhlHXKEZAJIQ+u813Yo+xhD06MH2ZZhS7AEWpMDBjUkBya7CyuAaK8HQyTGy+jTvl+AXqiioD0DE8ty3Gh71gScOatnJKInEsUqAncyYi5ImVjmdnJE0sHah7sjNtmTEQge2JD5pGqxOQATuW8sVeSBgXAJIRdUOqYBTDUuVpKFM+QiMoPzH6QdZZLph0Bi8ng7Dqqhr87Th3KJylJFtq107LJAB2BYBDQLDgbKLLXljnFKaCbMhVoMbdKqoESlLMIy4OC3oASQhznph2vGOxN77fB0xKOWc8POTliwmvLGlDgVFz+wBJCKFtyhKgsbQlqOh9uzKwXsaTD0AJIR2d54Rv6SUk5QraUpMStYiQQqSmiSBohnY1zcpHkAkhHorbaKprR3ckTMPnrDNfyMhqEby9gPs+ICSEZmhjYUXyZzC1/wce5+dfyGVOv0ccafLNrPWnr9y+xey/uyTpCd44cTjpAf+LuSKcKEgYED8NA')))
290.16129
8,082
0.926848
271
8,995
30.527675
0.896679
0.003264
0.004593
0.006286
0
0
0
0
0
0
0
0.135774
0.022346
8,995
30
8,083
299.833333
0.804981
0.004669
0
0
0
0.142857
0.967097
0.965063
0
1
0
0
0
1
0
true
0
0.571429
0
0.571429
0.142857
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
1
1
null
1
0
0
0
0
0
1
0
1
0
1
0
0
9
513a4472c933fd912065b11f218e2b1d852a63af
1,270
py
Python
tests/test_version.py
node13h/lase
e10620fc2086773f9578c82af46e68a18663a696
[ "MIT" ]
2
2019-07-23T10:00:22.000Z
2019-10-16T21:23:01.000Z
tests/test_version.py
node13h/lase
e10620fc2086773f9578c82af46e68a18663a696
[ "MIT" ]
null
null
null
tests/test_version.py
node13h/lase
e10620fc2086773f9578c82af46e68a18663a696
[ "MIT" ]
null
null
null
# MIT license # Copyright 2019 Sergej Alikov <sergej.alikov@gmail.com> from lase import version def test_next_dev_release(): assert version.next_dev('1.2.3') == '1.2.4-SNAPSHOT' def test_next_dev_snapshot(): assert version.next_dev('1.2.3-SNAPSHOT') == '1.2.4-SNAPSHOT' def test_next_dev_pre_num(): assert version.next_dev('1.2.3-BETA1') == '1.2.3-BETA2-SNAPSHOT' def test_next_dev_pre_num_snapshot(): assert version.next_dev('1.2.3-BETA1-SNAPSHOT') == '1.2.3-BETA2-SNAPSHOT' def test_next_dev_pre_num_only(): assert version.next_dev('1.2.3-1') == '1.2.3-2-SNAPSHOT' def test_next_dev_pre_num_oly_snapshot(): assert version.next_dev('1.2.3-1-SNAPSHOT') == '1.2.3-2-SNAPSHOT' def test_next_dev_pre(): assert version.next_dev('1.2.3-BETA') == '1.2.4-SNAPSHOT' def test_next_dev_pre_snapshot(): assert version.next_dev('1.2.3-BETA-SNAPSHOT') == '1.2.4-SNAPSHOT' def test_release_snapshot(): assert version.release('1.2.3-SNAPSHOT') == '1.2.3' def test_release_release(): assert version.release('1.2.3') == '1.2.3' def test_release_beta_snapshot(): assert version.release('1.2.3-BETA1-SNAPSHOT') == '1.2.3-BETA1' def test_release_beta_release(): assert version.release('1.2.3-BETA1') == '1.2.3-BETA1'
23.962264
77
0.69685
225
1,270
3.706667
0.133333
0.057554
0.071942
0.134293
0.818945
0.818945
0.768585
0.568345
0.223022
0.155875
0
0.079137
0.124409
1,270
52
78
24.423077
0.670863
0.051969
0
0
0
0
0.259784
0
0
0
0
0
0.48
1
0.48
true
0
0.04
0
0.52
0
0
0
0
null
0
0
0
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
1
1
0
0
0
1
0
0
7
51493753583e2c1456aaaee143f208b2814ec2d1
5,821
py
Python
tests/test_jinja2_vars_cleanup.py
Prodyte/cf-scripts
1800432178f158d824b17faef9ed70d557a06c8d
[ "MIT" ]
33
2018-02-28T04:05:46.000Z
2022-01-13T15:34:43.000Z
tests/test_jinja2_vars_cleanup.py
Prodyte/cf-scripts
1800432178f158d824b17faef9ed70d557a06c8d
[ "MIT" ]
1,371
2018-02-25T00:32:37.000Z
2022-03-29T23:44:42.000Z
tests/test_jinja2_vars_cleanup.py
bgruening/cf-scripts
bca57b85be7c9b85a180210f74c90be293519371
[ "MIT" ]
62
2018-02-25T00:28:48.000Z
2022-02-22T02:55:28.000Z
import pytest from conda_forge_tick.migrators.jinja2_vars_cleanup import ( _should_filter, _cleanup_raw_yaml, ) @pytest.mark.parametrize( "raw_yaml", [ "{{name}}", "{{ name}}", "{{name }}", "{{name|lower}}", "{{ name|lower}}", "{{name|lower }}", "{{name[0]}}", "{{ name[0]}}", "{{name[0] }}", "{{name.replace('-', '_')}}", "{{ name.replace('-', '_')}}", "{{name.replace('-', '_') }}", "{{x.update({4:5})}}", "{{x.update({4:5}) }}", "{{ x.update({4:5})}}", ], ) def test_jinja2_vars_cleanup_should_filter(raw_yaml): assert not _should_filter(raw_yaml) @pytest.mark.parametrize( "raw_yaml,res", [ ("{{name}}", "{{ name }}"), ("{{ name}}", "{{ name }}"), ("{{name }}", "{{ name }}"), ("{{name|lower}}", "{{ name|lower }}"), ("{{ name|lower}}", "{{ name|lower }}"), ("{{name|lower }}", "{{ name|lower }}"), ("{{name[0]}}", "{{ name[0] }}"), ("{{ name[0]}}", "{{ name[0] }}"), ("{{name[0] }}", "{{ name[0] }}"), ("{{name.replace('-', '_')}}", "{{ name.replace('-', '_') }}"), ("{{ name.replace('-', '_')}}", "{{ name.replace('-', '_') }}"), ("{{name.replace('-', '_') }}", "{{ name.replace('-', '_') }}"), ("{{x.update({4:5})}}", "{{ x.update({4:5}) }}"), ("{{x.update({4:5}) }}", "{{ x.update({4:5}) }}"), ("{{ x.update({4:5})}}", "{{ x.update({4:5}) }}"), ], ) def test_jinja2_vars_cleanup_raw_yaml(raw_yaml, res): assert _cleanup_raw_yaml(raw_yaml).strip() == res def test_jinja2_vars_cleanup_recipe(): raw_yaml = """\ {% set name = "MetPy" %} {% set version = "0.12.0" %} {% set sha256 = "4125fbbc2620e3702961fe012cb52bdaba5f609ec5f5458818617676044b7921" %} package: name: {{ name|lower }} version: {{ version }} source: url: https://pypi.io/packages/source/{{name[0]}}/{{name}}/{{name}}-{{version}}.tar.gz sha256: {{sha256}} build: noarch: python script: "{{ PYTHON }} -m pip install . --no-deps -vv" number: 0 requirements: host: - python >=3.6 - setuptools - pip - setuptools_scm run: - python >=3.6 - matplotlib-base >=2.1.0 - numpy >=1.13 - scipy >=1.0 - pint >=0.8 - xarray >=0.10.7 - pooch >=0.1 - traitlets >=4.3.0 - pandas >=0.22.0 - pyproj >=1.9.4 - cartopy >=0.15.0 test: imports: - metpy.calc - metpy.interpolate - metpy.io - metpy.plots - metpy.units about: home: https://github.com/Unidata/MetPy license: BSD 3-Clause license_family: BSD license_file: LICENSE summary: 'MetPy is a collection of tools in Python for reading, visualizing and performing calculations with weather data.' description: | The space MetPy aims for is GEMPAK (and maybe NCL)-like functionality, in a way that plugs easily into the existing scientific Python ecosystem (numpy, scipy, matplotlib). So, if you take the average GEMPAK script for a weather map, you need to: read data, calculate a derived field, and show on a map/skew-T. One of the benefits hoped to achieve over GEMPAK is to make it easier to use these routines for any meteorological Python application; this means making it easy to pull out the LCL calculation and just use that, or re-use the Skew-T with your own data code. MetPy also prides itself on being well-documented and well-tested, so that on-going maintenance is easily manageable. doc_url: https://unidata.github.io/MetPy dev_url: https://github.com/Unidata/MetPy extra: recipe-maintainers: - dopplershift """ # noqa clean_yml = """\ {% set name = "MetPy" %} {% set version = "0.12.0" %} {% set sha256 = "4125fbbc2620e3702961fe012cb52bdaba5f609ec5f5458818617676044b7921" %} package: name: {{ name|lower }} version: {{ version }} source: url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz sha256: {{ sha256 }} build: noarch: python script: "{{ PYTHON }} -m pip install . --no-deps -vv" number: 0 requirements: host: - python >=3.6 - setuptools - pip - setuptools_scm run: - python >=3.6 - matplotlib-base >=2.1.0 - numpy >=1.13 - scipy >=1.0 - pint >=0.8 - xarray >=0.10.7 - pooch >=0.1 - traitlets >=4.3.0 - pandas >=0.22.0 - pyproj >=1.9.4 - cartopy >=0.15.0 test: imports: - metpy.calc - metpy.interpolate - metpy.io - metpy.plots - metpy.units about: home: https://github.com/Unidata/MetPy license: BSD 3-Clause license_family: BSD license_file: LICENSE summary: 'MetPy is a collection of tools in Python for reading, visualizing and performing calculations with weather data.' description: | The space MetPy aims for is GEMPAK (and maybe NCL)-like functionality, in a way that plugs easily into the existing scientific Python ecosystem (numpy, scipy, matplotlib). So, if you take the average GEMPAK script for a weather map, you need to: read data, calculate a derived field, and show on a map/skew-T. One of the benefits hoped to achieve over GEMPAK is to make it easier to use these routines for any meteorological Python application; this means making it easy to pull out the LCL calculation and just use that, or re-use the Skew-T with your own data code. MetPy also prides itself on being well-documented and well-tested, so that on-going maintenance is easily manageable. doc_url: https://unidata.github.io/MetPy dev_url: https://github.com/Unidata/MetPy extra: recipe-maintainers: - dopplershift """ # noqa assert not _should_filter(raw_yaml) assert clean_yml == _cleanup_raw_yaml(raw_yaml)
28.816832
125
0.593197
755
5,821
4.490066
0.256954
0.026844
0.029204
0.023894
0.961652
0.930678
0.912684
0.892035
0.892035
0.892035
0
0.049308
0.230029
5,821
201
126
28.960199
0.70705
0.001546
0
0.897727
0
0.022727
0.817697
0.022723
0
0
0
0
0.022727
1
0.017045
false
0
0.022727
0
0.039773
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
516acb4e29c0f68494a602aeb5c6f701586e8c53
105
py
Python
tests/unit/worker/conftest.py
Explorer1092/pyzeebe
c76dc2bfae9ea0c491c1ea2b278cffd938a39d02
[ "MIT" ]
30
2021-04-13T15:48:20.000Z
2022-03-28T15:48:01.000Z
tests/unit/worker/conftest.py
Explorer1092/pyzeebe
c76dc2bfae9ea0c491c1ea2b278cffd938a39d02
[ "MIT" ]
121
2021-04-02T10:21:33.000Z
2022-03-31T04:06:43.000Z
tests/unit/worker/conftest.py
Explorer1092/pyzeebe
c76dc2bfae9ea0c491c1ea2b278cffd938a39d02
[ "MIT" ]
9
2021-05-05T10:51:26.000Z
2022-03-17T08:07:32.000Z
import asyncio import pytest @pytest.fixture def queue() -> asyncio.Queue: return asyncio.Queue()
11.666667
29
0.72381
13
105
5.846154
0.538462
0.315789
0
0
0
0
0
0
0
0
0
0
0.171429
105
8
30
13.125
0.873563
0
0
0
0
0
0
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
5adf973289477b1b9bd0e360ed25fa3779df1e43
8,988
py
Python
learning/datasets.py
ZJU-Robotics-Lab/CICT
ff873a03ab03d9113b8db96d26246939bb5da0d4
[ "MIT" ]
12
2021-02-09T05:08:36.000Z
2022-02-24T07:51:30.000Z
learning/datasets.py
ZJU-Robotics-Lab/CICT
ff873a03ab03d9113b8db96d26246939bb5da0d4
[ "MIT" ]
null
null
null
learning/datasets.py
ZJU-Robotics-Lab/CICT
ff873a03ab03d9113b8db96d26246939bb5da0d4
[ "MIT" ]
6
2021-03-30T06:30:13.000Z
2022-03-01T14:15:00.000Z
import glob import random import os import numpy as np from torch.utils.data import Dataset from PIL import Image import torchvision.transforms as transforms import torch class Yq21Dataset(Dataset): def __init__(self, transforms_=None, transforms2_=None,data_index=[1,2,3,4,5]): self.transform = transforms.Compose(transforms_) self.transform2 = transforms.Compose(transforms2_) self.data_index = data_index self.files_dict = {} self.total_len = 0 for index in self.data_index: files = glob.glob('/media/wang/DATASET/images'+str(index)+'/*.png') self.total_len += len(files) file_names = [] for file in files: file_name = file.split('/')[5] file_names.append(file_name) file_names.sort() self.files_dict[index] = file_names self.corner_start = [ [250,2750,3750,4400,5050,5750,6550,7450,8150,8650,9350,10250,11150,12450],#1 [142,2492,3442,3942,4392,4942,5342,6042,6292,6942,7692,8042,8689,9539,10439,11639],#2 [286,2536,3386,3886,4336,4886,5286,5836,6086,6686,7336,7786,8336,9186,9986,11186],#3 [324,2524,3374,3924,4274,5224,5824,6124,6724,7424,7924,8424,9324,10174,11374],#4 [149,2399,3199,3699,4149,4749,5199,5649,6599,7299,7749,8299,9099,9899,11149],#5 [293,2593,3443,3943,4343,4893,5193,5793,6693,7393,7693,8343,9193,9993,11093],#6 ] self.corner_end = [ [750,3350,4200,4750,5150,6150,7150,7850,8550,8950,9550,10650,11450,12750],#1 [442,2742,3642,4192,4542,5142,5642,6242,6542,7242,7892,8339,8889,9839,10689,11939],#2 [536,2836,3636,4136,4536,5086,5486,5986,6336,6986,7586,8086,8586,9486,10236,11436],#3 [624,2824,3674,4124,4424,5424,6024,6324,7074,7724,8174,8724,9624,10424,11724],#4 [449,2599,3499,3999,4349,4899,5399,6299,6949,7549,7949,8499,9399,10199,11449],#5 [593,2843,3693,4193,4543,5143,5393,6393,6993,7593,7993,8593,9443,10243,11493],#6 ] def __getitem__(self, index): mirror = True if random.random() > 0.5 else False data_index = random.sample(self.data_index,1)[0] corner_start = self.corner_start[data_index-1] corner_end = self.corner_end[data_index-1] try: if random.random() > 0.5: corner_index = random.sample([item for item in range(len(corner_start))],1)[0] file_index = random.sample([item for item in range(corner_start[corner_index], corner_end[corner_index])],1)[0] file_name = self.files_dict[data_index][file_index] else: file_name = random.sample(self.files_dict[data_index],1)[0] except: print('Error when get corner data') file_name = random.sample(self.files_dict[data_index],1)[0] #file_name = random.sample(self.files_dict[data_index],1)[0] image_path = '/media/wang/DATASET/images'+str(data_index)+'/'+file_name label_path = '/media/wang/DATASET/label'+str(data_index)+'/'+file_name nav_path = '/media/wang/DATASET/nav'+str(data_index)+'/'+file_name img = Image.open(image_path).convert("RGB") nav = Image.open(nav_path).convert("RGB") lable = Image.open(label_path).convert('L') # mirror the inputs if mirror: img = Image.fromarray(np.array(img)[:, ::-1, :], 'RGB') nav = Image.fromarray(np.array(nav)[:, ::-1, :], 'RGB') lable = Image.fromarray(np.array(lable)[:, ::-1], 'L') img = self.transform(img) nav = self.transform(nav) lable = self.transform2(lable) input_img = torch.cat((img, nav), 0) return {'A': input_img, 'B': lable} def __len__(self): return self.total_len class Yq21Dataset_test(Dataset): def __init__(self, transforms_=None, transforms2_=None,data_index=[6]): self.transform = transforms.Compose(transforms_) self.transform2 = transforms.Compose(transforms2_) self.data_index = data_index self.files_dict = {} self.total_len = 0 for index in self.data_index: files = glob.glob('/media/wang/DATASET/images'+str(index)+'/*.png') self.total_len += len(files) file_names = [] for file in files: file_name = file.split('/')[5] file_names.append(file_name) file_names.sort() self.files_dict[index] = file_names self.corner_start = [ [250,2750,3750,4400,5050,5750,6550,7450,8150,8650,9350,10250,11150,12450],#1 [142,2492,3442,3942,4392,4942,5342,6042,6292,6942,7692,8042,8689,9539,10439,11639],#2 [286,2536,3386,3886,4336,4886,5286,5836,6086,6686,7336,7786,8336,9186,9986,11186],#3 [324,2524,3374,3924,4274,5224,5824,6124,6724,7424,7924,8424,9324,10174,11374],#4 [149,2399,3199,3699,4149,4749,5199,5649,6599,7299,7749,8299,9099,9899,11149],#5 [293,2593,3443,3943,4343,4893,5193,5793,6693,7393,7693,8343,9193,9993,11093],#6 ] self.corner_end = [ [750,3350,4200,4750,5150,6150,7150,7850,8550,8950,9550,10650,11450,12750],#1 [442,2742,3642,4192,4542,5142,5642,6242,6542,7242,7892,8339,8889,9839,10689,11939],#2 [536,2836,3636,4136,4536,5086,5486,5986,6336,6986,7586,8086,8586,9486,10236,11436],#3 [624,2824,3674,4124,4424,5424,6024,6324,7074,7724,8174,8724,9624,10424,11724],#4 [449,2599,3499,3999,4349,4899,5399,6299,6949,7549,7949,8499,9399,10199,11449],#5 [593,2843,3693,4193,4543,5143,5393,6393,6993,7593,7993,8593,9443,10243,11493],#6 ] def __getitem__(self, index): data_index = random.sample(self.data_index,1)[0] #file_name = random.sample(self.files_dict[data_index],1)[0] corner_start = self.corner_start[data_index-1] corner_end = self.corner_end[data_index-1] try: if random.random() > 0.5: corner_index = random.sample([item for item in range(len(corner_start))],1)[0] file_index = random.sample([item for item in range(corner_start[corner_index], corner_end[corner_index])],1)[0] file_name = self.files_dict[data_index][file_index] else: file_name = random.sample(self.files_dict[data_index],1)[0] except: print('Error when get corner data') file_name = random.sample(self.files_dict[data_index],1)[0] image_path = '/media/wang/DATASET/images'+str(data_index)+'/'+file_name label_path = '/media/wang/DATASET/label'+str(data_index)+'/'+file_name nav_path = '/media/wang/DATASET/nav'+str(data_index)+'/'+file_name img = Image.open(image_path).convert("RGB") nav = Image.open(nav_path).convert("RGB") lable = Image.open(label_path).convert('L') img = self.transform(img) nav = self.transform(nav) lable = self.transform2(lable) return {'A1': img, 'A2': nav, 'B': lable} def __len__(self): return self.total_len class Yq21Dataset_eval(Dataset): def __init__(self, transforms_=None, transforms2_=None,data_index=[6]): self.transform = transforms.Compose(transforms_) self.transform2 = transforms.Compose(transforms2_) self.data_index = data_index self.files_dict = {} self.total_len = 0 for index in self.data_index: files = glob.glob('/media/wang/DATASET/images'+str(index)+'/*.png') self.total_len += len(files) file_names = [] for file in files: file_name = file.split('/')[5] file_names.append(file_name) file_names.sort() self.files_dict[index] = file_names self.cnt = 0 def __getitem__(self, index): data_index = random.sample(self.data_index,1)[0] file_name = self.files_dict[data_index][self.cnt] self.cnt += 1 image_path = '/media/wang/DATASET/images'+str(data_index)+'/'+file_name label_path = '/media/wang/DATASET/label'+str(data_index)+'/'+file_name nav_path = '/media/wang/DATASET/nav'+str(data_index)+'/'+file_name img = Image.open(image_path).convert("RGB") nav = Image.open(nav_path).convert("RGB") lable = Image.open(label_path).convert('L') img = self.transform(img) nav = self.transform(nav) lable = self.transform2(lable) return {'A1': img, 'A2': nav, 'B': lable, 'file_name':file_name} def __len__(self): return self.total_len
45.624365
127
0.60425
1,228
8,988
4.259772
0.223127
0.06882
0.037278
0.018926
0.926974
0.923915
0.923915
0.918562
0.918562
0.913783
0
0.234517
0.25089
8,988
197
128
45.624365
0.542403
0.017802
0
0.828221
0
0
0.048966
0.034083
0
0
0
0
0
1
0.055215
false
0
0.04908
0.018405
0.159509
0.01227
0
0
0
null
0
0
0
1
1
1
1
1
1
0
1
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
8
850e7e6ebe5df5c469be65b34073d3df1c27a17c
10,632
py
Python
Packs/D2/Scripts/RegPathReputationBasicLists/RegPathReputationBasicLists.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/D2/Scripts/RegPathReputationBasicLists/RegPathReputationBasicLists.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/D2/Scripts/RegPathReputationBasicLists/RegPathReputationBasicLists.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import demistomock as demisto # noqa: F401 from CommonServerPython import * # noqa: F401 WHITELIST = [r'HKEY_LOCAL_MACHINE\Software\wow6432node\Microsoft\Windows\CurrentVersion\Run\vmware-tray.exe'] BLACKLIST = [r'HKEY_CURRENT_USER\Software\Locky', r'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run\Locky'] # guardrails-disable-line SUSPICIOUS = [r"HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\UrlSearchHooks", r"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run", r"HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Htmlfile\Shell\Open\Command", r"HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Htmlfile\Shell\Open\Command\(Default)", r"HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Protocols\Filter", r"HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Protocols\Handler", r"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components", r"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows\Appinit_Dlls", r"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", r"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Shell", r"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Userinit", r"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\VmApplet", r"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\Credential Provider Filters", r"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\Credential Providers", r"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\PLAP Providers", r"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellServiceObjects", r"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", r"HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Active Setup\Installed Components", r"HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Windows\Appinit_Dlls", r"HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\ShellServiceObjects", r"HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Run", r"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\Authentication Packages", r"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\Notification Packages", r"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\OSConfig\Security Packages", r"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\Security Packages", r"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider\Order", r"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Monitors", r"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SafeBoot", r"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SafeBoot\AlternateShell", r"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders", r"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SecurityProviders", r"HKEY_LOCAL_MACHINE\Software\Classes\AllFileSystemObjects\ShellEx\ContextMenuHandlers", r"HKEY_LOCAL_MACHINE\Software\Classes\AllFileSystemObjects\ShellEx\PropertySheetHandlers", r"HKEY_LOCAL_MACHINE\Software\Classes\CLSID\{083863F1-70DE-11d0-BD40-00A0C911CE86}\Instance", r"HKEY_LOCAL_MACHINE\Software\Classes\CLSID\{7ED96837-96F0-4812-B211-F13C24117ED3}\Instance", r"HKEY_LOCAL_MACHINE\Software\Classes\Directory\Background\ShellEx\ContextMenuHandlers", r"HKEY_LOCAL_MACHINE\Software\Classes\Directory\ShellEx\ContextMenuHandlers", r"HKEY_LOCAL_MACHINE\Software\Classes\Directory\Shellex\CopyHookHandlers", r"HKEY_LOCAL_MACHINE\Software\Classes\Directory\Shellex\DragDropHandlers", r"HKEY_LOCAL_MACHINE\Software\Classes\Directory\Shellex\PropertySheetHandlers", r"HKEY_LOCAL_MACHINE\Software\Classes\Drive\ShellEx\ContextMenuHandlers", r"HKEY_LOCAL_MACHINE\Software\Classes\Folder\ShellEx\ContextMenuHandlers", r"HKEY_LOCAL_MACHINE\Software\Classes\Folder\ShellEx\DragDropHandlers", r"HKEY_LOCAL_MACHINE\Software\Classes\Folder\ShellEx\PropertySheetHandlers", r"HKEY_LOCAL_MACHINE\Software\Classes\Folder\Shellex\ColumnHandlers", r"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Drivers32", r"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Windows", r"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Windows\IconServiceLib", r"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects", r"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers", r"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce", r"HKEY_LOCAL_MACHINE\Software\Wow6432Node\Classes\AllFileSystemObjects\ShellEx\ContextMenuHandlers", r"HKEY_LOCAL_MACHINE\Software\Wow6432Node\Classes\AllFileSystemObjects\ShellEx\PropertySheetHandlers", r"HKEY_LOCAL_MACHINE\Software\Wow6432Node\Classes\CLSID\{083863F1-70DE-11d0-BD40-00A0C911CE86}\Instance", r"HKEY_LOCAL_MACHINE\Software\Wow6432Node\Classes\CLSID\{7ED96837-96F0-4812-B211-F13C24117ED3}\Instance", r"HKEY_LOCAL_MACHINE\Software\Wow6432Node\Classes\Directory\Background\ShellEx\ContextMenuHandlers", r"HKEY_LOCAL_MACHINE\Software\Wow6432Node\Classes\Directory\ShellEx\ContextMenuHandlers", r"HKEY_LOCAL_MACHINE\Software\Wow6432Node\Classes\Directory\Shellex\CopyHookHandlers", r"HKEY_LOCAL_MACHINE\Software\Wow6432Node\Classes\Directory\Shellex\DragDropHandlers", r"HKEY_LOCAL_MACHINE\Software\Wow6432Node\Classes\Directory\Shellex\PropertySheetHandlers", r"HKEY_LOCAL_MACHINE\Software\Wow6432Node\Classes\Drive\ShellEx\ContextMenuHandlers", r"HKEY_LOCAL_MACHINE\Software\Wow6432Node\Classes\Folder\ShellEx\ContextMenuHandlers", r"HKEY_LOCAL_MACHINE\Software\Wow6432Node\Classes\Folder\ShellEx\DragDropHandlers", r"HKEY_LOCAL_MACHINE\Software\Wow6432Node\Classes\Folder\ShellEx\PropertySheetHandlers", r"HKEY_LOCAL_MACHINE\Software\Wow6432Node\Classes\Folder\Shellex\ColumnHandlers", r"HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Drivers32", r"HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects", r"HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers", r"HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control", r"HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ServiceControlManagerExtension", r"HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\BootExecute", r"HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\KnownDlls", r"HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal Server\Wds\rdpwd", r"HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal Server\Wds\rdpwd\StartupPrograms", r"HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services", r"HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\WinSock2\Parameters\NameSpace_Catalog5\Catalog_Entries", r"HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\WinSock2\Parameters\NameSpace_Catalog5\Catalog_Entries64", r"HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\WinSock2\Parameters\Protocol_Catalog9\Catalog_Entries", r"HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\WinSock2\Parameters\Protocol_Catalog9\Catalog_Entries64", r"HKEY_LOCAL_MACHINE\software\microsoft\windows\currentversion\policies\explorer\run", r"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunServices", r"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServices", r"HKEY_LOCAL_MACHINE\software\microsoft\wbem\ess\//./root/cimv2\win32clockprovider", r"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce", r"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce", r"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Notify", r"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Shell", r"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\ShellServiceObjectDelayLoad", r"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnceEx", r"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run", r"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce", r"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run", r"HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows\load", r"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\SharedTaskScheduler"] # registry keys are case insensative: https://docs.microsoft.com/en-us/windows/desktop/sysinfo/structure-of-the-registry reg_path = NormalizeRegistryPath(demisto.args()['input'].upper()) def check_reg_in_list(path, list_to_check): for key in list_to_check: if path.startswith(key.upper()): return True return False if check_reg_in_list(reg_path, WHITELIST): score = 1 elif check_reg_in_list(reg_path, BLACKLIST): score = 3 elif check_reg_in_list(reg_path, SUSPICIOUS): score = 2 else: score = 0 outputs = { 'Path': reg_path, 'Score': score } demisto.results({ 'Type': entryTypes['note'], 'ContentsFormat': formats['json'], 'Contents': score, 'ReadableContentsFormat': formats['text'], 'HumanReadable': "The Registry Path reputation for: {} is: {}".format(reg_path, score), 'EntryContext': { 'RegistryKey(val.Path == obj.Path)': outputs } })
77.605839
127
0.750658
1,122
10,632
6.911765
0.174688
0.06254
0.110896
0.188524
0.868085
0.862798
0.849387
0.803095
0.727789
0.477756
0
0.023261
0.15491
10,632
136
128
78.176471
0.839844
0.015425
0
0.015748
0
0.015748
0.756188
0.71987
0
0
0
0
0
1
0.007874
false
0
0.015748
0
0.03937
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
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
8
cfc4ccfc2e3163c208cc2cf4a5a937dec819c7cf
1,450
py
Python
torchnlp/data/lots.py
Yoark/Transformer-Attention
b8c62cb8618a03150ccfd73f705893d2b931b224
[ "Apache-2.0" ]
null
null
null
torchnlp/data/lots.py
Yoark/Transformer-Attention
b8c62cb8618a03150ccfd73f705893d2b931b224
[ "Apache-2.0" ]
null
null
null
torchnlp/data/lots.py
Yoark/Transformer-Attention
b8c62cb8618a03150ccfd73f705893d2b931b224
[ "Apache-2.0" ]
null
null
null
from torchtext.data.iterator import Iterator, BucketIterator from torchtext.data.field import RawField import torch # class AttnIterator(BucketIterator): # def __init__(self, dataset, batch_size, sort_key=None, device=None, # batch_size_fn=None, train=True, # repeat=False, shuffle=None, sort=None, # sort_within_batch=None, adv=False): # super().__init__(self, dataset, batch_size, sort_key=None, device=None, # batch_size_fn=None, train=True, # repeat=False, shuffle=None, sort=None, # sort_within_batch=None) # if adv: class AttnField(RawField): def __init__(self, preprocessing=None, postprocessing=None, is_target=False): super().__init__(preprocessing=preprocessing, postprocessing=postprocessing, is_target=is_target) def process(self, batch, *args, **kwargs): new_batch = [] for item in batch: new_batch.append(torch.FloatTensor(item)) return new_batch class PredField(RawField): def __init__(self, preprocessing=None, postprocessing=None, is_target=False): super().__init__(preprocessing=preprocessing, postprocessing=postprocessing, is_target=is_target) def process(self, batch, *args, **kwargs): new_batch = [] for item in batch: new_batch.append(torch.FloatTensor(item)) return new_batch
42.647059
105
0.657931
164
1,450
5.52439
0.286585
0.05298
0.036424
0.04415
0.801325
0.801325
0.801325
0.801325
0.801325
0.801325
0
0
0.24069
1,450
34
106
42.647059
0.822888
0.349655
0
0.736842
0
0
0
0
0
0
0
0
0
1
0.210526
false
0
0.157895
0
0.578947
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
1
0
0
0
0
1
0
0
9
cfe6b4f060b79a6157cf496860765f85600aed6a
1,505
py
Python
venv/lib/python2.7/site-packages/pychart/afm/NewCenturySchlbk_Italic.py
Christian-Castro/castro_odoo8
8247fdb20aa39e043b6fa0c4d0af509462ab3e00
[ "Unlicense" ]
1
2019-12-19T01:53:13.000Z
2019-12-19T01:53:13.000Z
venv/lib/python2.7/site-packages/pychart/afm/NewCenturySchlbk_Italic.py
Christian-Castro/castro_odoo8
8247fdb20aa39e043b6fa0c4d0af509462ab3e00
[ "Unlicense" ]
null
null
null
venv/lib/python2.7/site-packages/pychart/afm/NewCenturySchlbk_Italic.py
Christian-Castro/castro_odoo8
8247fdb20aa39e043b6fa0c4d0af509462ab3e00
[ "Unlicense" ]
null
null
null
# AFM font NewCenturySchlbk-Italic (path: /usr/share/fonts/afms/adobe/pncri8a.afm). # Derived from Ghostscript distribution. # Go to www.cs.wisc.edu/~ghost to get the Ghostcript source code. import dir dir.afm["NewCenturySchlbk-Italic"] = (500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 278, 333, 400, 556, 556, 833, 852, 204, 333, 333, 500, 606, 278, 333, 278, 606, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 278, 278, 606, 606, 606, 444, 747, 704, 722, 722, 778, 722, 667, 778, 833, 407, 611, 741, 667, 944, 815, 778, 667, 778, 741, 667, 685, 815, 704, 926, 704, 685, 667, 333, 606, 333, 606, 500, 204, 574, 556, 444, 611, 444, 333, 537, 611, 333, 315, 556, 333, 889, 611, 500, 574, 556, 444, 444, 352, 611, 519, 778, 500, 500, 463, 333, 606, 333, 606, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 333, 556, 556, 167, 556, 556, 500, 556, 278, 389, 426, 333, 333, 611, 611, 500, 500, 500, 500, 278, 500, 650, 606, 204, 389, 389, 426, 1000, 1000, 500, 444, 500, 333, 333, 333, 333, 333, 333, 333, 333, 500, 333, 333, 500, 333, 333, 333, 1000, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 870, 500, 422, 500, 500, 500, 500, 667, 778, 981, 372, 500, 500, 500, 500, 500, 722, 500, 500, 500, 333, 500, 500, 333, 500, 778, 556, )
250.833333
1,302
0.627243
287
1,505
3.289199
0.233449
0.591102
0.800847
0.978814
0.400424
0.317797
0.317797
0.292373
0.292373
0.260593
0
0.619397
0.184718
1,505
5
1,303
301
0.149959
0.122259
0
0
0
0
0.017464
0.017464
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
1
0
0
1
1
1
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
10
3213cf88b696db805fd8a2cec042f3325740069d
10,208
py
Python
catkin_ws/py_ws/timeuse_test/noseenddistancedata_plot.py
ayuguchi/gazed_object_identification_robot
c06a49e405fa7c8a05ea6c4540b2a34b4aeca243
[ "MIT" ]
null
null
null
catkin_ws/py_ws/timeuse_test/noseenddistancedata_plot.py
ayuguchi/gazed_object_identification_robot
c06a49e405fa7c8a05ea6c4540b2a34b4aeca243
[ "MIT" ]
null
null
null
catkin_ws/py_ws/timeuse_test/noseenddistancedata_plot.py
ayuguchi/gazed_object_identification_robot
c06a49e405fa7c8a05ea6c4540b2a34b4aeca243
[ "MIT" ]
1
2019-09-11T15:47:50.000Z
2019-09-11T15:47:50.000Z
#! c:/Python27/python.exe # -*- coding: utf-8 -*- #------------import modules import matplotlib.pyplot as plt import matplotlib.cm as cm from matplotlib.ticker import * import csv import scipy as sp import scipy.interpolate from matplotlib.mlab import griddata import matplotlib.mlab as ml import numpy as np from math import * #import pyemf import math #import func import random #------------CSV open def drange(begin, end, step): n = begin value = [] while n+step < end: n += step value.append(n) return value def cmtoinch(x): y = x/2.4 return y if __name__ == "__main__": print "" i=0 j=0 k=0 labelnum=0 cnt0 = [] t0 = [] cnt1 = [] t1 = [] thin = 1 #----Read data score_face_label = [] print "reading score_face_label and t0" ScoreFaceLabel = "datatimeuse/scorefacelabel.csv" scorefacelabel = csv.reader(open(ScoreFaceLabel,"rb"),delimiter=',') for row in scorefacelabel: if i>0: t0.append(float(row[1])) i+=1 print "data_length with csv header:"+str(i) print "time_length:"+str(len(t0)) #print t0 i-=1 scorefacelabel = csv.reader(open(ScoreFaceLabel,"rb"),delimiter=',') for row in scorefacelabel: if j==i: labelnum = len(row) while k<labelnum: score_face_label.append(row[k]) k+=1 #print row j+=1 i=0 score_face_label.pop(0) score_face_label.pop(0) print score_face_label print "len(score_face_label):"+str(len(score_face_label)) i=0 j=0 k=0 print "read score_face_label and t0" print "" print "reading score_face_data" ScoreFaceData = "datatimeuse/scorefacedata.csv" scorefacedata = csv.reader(open(ScoreFaceData,"rb"),delimiter=',') for row in scorefacedata: i+=1 print "data_length:"+str(i) i-=1 scorefacedata = csv.reader(open(ScoreFaceData,"rb"),delimiter=',') for row in scorefacedata: if j==i: labelnum = len(row) #print row j+=1 print "labelnum:"+str(labelnum) score_face_data = [] notemptycnt = 0 data_length = [] i=2 j=0 k=0 while i<labelnum: j=0 k=0 array_data_tmp = [] notemptycnt=0 scorefacedata = csv.reader(open(ScoreFaceData,"rb"),delimiter=',') for row in scorefacedata: if j > 0: if i<(labelnum-(labelnum-len(row))): if row[0] != '': array_data_tmp.append(row[i]) else: array_data_tmp.append('0') notemptycnt+=1 else: array_data_tmp.append(0) j+=1 #print "i="+str(i)+" "+"j="+str(j)+" len(array_data_tmp)before:"+str(len(array_data_tmp)) #print array_data_tmp while k<j-1: array_data_tmp[k] = int(array_data_tmp[k]) k+=1 data_length.append(k) #print "i="+str(i)+" array_data_tmp_after" #print array_data_tmp score_face_data.append(array_data_tmp) i+=1 #print score_face_data i=0 j=0 k=0 alldatalength = 0 for x in score_face_data: alldatalength += len(x) print "alldatalength:"+str(alldatalength) #print score_face_data[0][:] print "read score_face_data" print "" print "ploting score_face_data" size_x = 40 size_y = 11 r=[] g=[] b=[] figurenum = 1 plt.figure(figurenum,figsize=(cmtoinch(size_x),cmtoinch(size_y))) #plt.minorticks_on() params = { 'font.family' :'Bitstream Vera Sans', 'axes.labelsize' :18, #'title.size' :20, 'xtick.labelsize':18, 'ytick.labelsize':18, 'xtick.major.size':5, 'xtick.minor.size':0, 'ytick.major.size':5, 'ytick.minor.size':0, 'xtick.major.pad':10, 'xtick.major.pad':10 } plt.rcParams.update(params) plt.xlabel("time[s]") plt.ylabel("score") x_data = [] y_data = [] i=0 j=0 while i<len(t0): x_data.append(t0[i]) i+=1 i=0 plt.axis([0,max(x_data),-1.2,1.2]) while i<len(score_face_label): y_data = [] j=0 if (score_face_label[i]!="person") and (score_face_label[i]!="dining table"): while j<len(t0): y_data.append(score_face_data[i][j]) j+=1 #plt.plot(x_data,y_data, label=score_face_label[i],marker=".",markersize=1) r.append(random.random()) g.append(random.random()) b.append(random.random()) #plt.scatter(x_data,y_data, label=score_face_label[i],marker=".",c=(r[i],g[i],b[i])) plt.scatter(x_data,y_data, label=score_face_label[i],marker=".") i+=1 plt.subplots_adjust(left=0.15, bottom=0.16,right=0.96, top=0.95) plt.legend(loc="lower right") plt.savefig("facescore/facescoredata"+".png") figurenum +=1 i=0 j=0 k=0 print "ploted score_face_data" print "" score_object_label = [] print "reading score_object_label" ScoreObjectLabel = "datatimeuse/scoreobjectlabel.csv" scoreobjectlabel = csv.reader(open(ScoreObjectLabel,"rb"),delimiter=',') for row in scoreobjectlabel: i+=1 print "data_length with csv header:"+str(i) print "time_length:"+str(len(t0)) #print t0 i-=1 scoreobjectlabel = csv.reader(open(ScoreObjectLabel,"rb"),delimiter=',') for row in scoreobjectlabel: if j==i: labelnum = len(row) while k<labelnum: score_object_label.append(row[k]) k+=1 #print row j+=1 i=0 score_object_label.pop(0) score_object_label.pop(0) print score_object_label print "len(score_object_label):"+str(len(score_object_label)) i=0 j=0 k=0 print "read score_object_label" print "" print "reading score_object_data" ScoreObjectData = "datatimeuse/scoreobjectdata.csv" scoreobjectdata = csv.reader(open(ScoreObjectData,"rb"),delimiter=',') for row in scoreobjectdata: i+=1 print "data_length:"+str(i) i-=1 scoreobjectdata = csv.reader(open(ScoreObjectData,"rb"),delimiter=',') for row in scoreobjectdata: if j==i: labelnum = len(row) #print row j+=1 print "labelnum:"+str(labelnum) score_object_data = [] notemptycnt = 0 data_length = [] i=2 j=0 k=0 while i<labelnum: j=0 k=0 array_data_tmp = [] notemptycnt=0 scoreobjectdata = csv.reader(open(ScoreObjectData,"rb"),delimiter=',') for row in scoreobjectdata: if j > 0: if i<(labelnum-(labelnum-len(row))): if row[0] != '': array_data_tmp.append(row[i]) else: array_data_tmp.append('0') notemptycnt+=1 else: array_data_tmp.append(0) j+=1 #print "i="+str(i)+" "+"j="+str(j)+" len(array_data_tmp)before:"+str(len(array_data_tmp)) #print array_data_tmp while k<j-1: array_data_tmp[k] = int(array_data_tmp[k]) k+=1 data_length.append(k) #print "i="+str(i)+" array_data_tmp_after" #print array_data_tmp score_object_data.append(array_data_tmp) i+=1 #print score_object_data i=0 j=0 k=0 alldatalength = 0 for x in score_object_data: alldatalength += len(x) print "alldatalength:"+str(alldatalength) #print score_object_data[0][:] print "read score_object_data" print "" print "ploting score_object_data" plt.figure(figurenum,figsize=(cmtoinch(size_x),cmtoinch(size_y))) #plt.minorticks_on() params = { 'font.family' :'Bitstream Vera Sans', 'axes.labelsize' :18, #'title.size' :20, 'xtick.labelsize':18, 'ytick.labelsize':18, 'xtick.major.size':5, 'xtick.minor.size':0, 'ytick.major.size':5, 'ytick.minor.size':0, 'xtick.major.pad':10, 'xtick.major.pad':10 } plt.rcParams.update(params) plt.xlabel("time[s]") plt.ylabel("score") x_data = [] y_data = [] i=0 j=0 while i<len(t0): x_data.append(t0[i]) i+=1 i=0 plt.axis([0,max(x_data),-1.2,1.2]) while i<len(score_object_label): y_data = [] j=0 if (score_object_label[i]!="person") and (score_object_label[i]!="dining table"): while j<len(t0): y_data.append(score_object_data[i][j]) j+=1 #plt.plot(x_data,y_data, label=score_object_label[i]) plt.scatter(x_data,y_data, label=score_object_label[i],marker=".") i+=1 plt.subplots_adjust(left=0.15, bottom=0.16,right=0.96, top=0.95) plt.legend(loc="lower right") plt.savefig("objectscore/objectscoredata"+".png") figurenum +=1 print "ploted score_object_data" print "" print "ploting each score_face_data" y_data = [] i=0 j=0 while i<len(score_face_label): y_data = [] j=0 if (score_face_label[i]!="person") and (score_face_label[i]!="dining table"): while j<len(t0): y_data.append(score_face_data[i][j]) j+=1 plt.figure(figurenum,figsize=(cmtoinch(size_x),cmtoinch(size_y))) params = { 'font.family' :'Bitstream Vera Sans', 'axes.labelsize' :18, #'title.size' :20, 'xtick.labelsize':18, 'ytick.labelsize':18, 'xtick.major.size':5, 'xtick.minor.size':0, 'ytick.major.size':5, 'ytick.minor.size':0, 'xtick.major.pad':10, 'xtick.major.pad':10 } plt.rcParams.update(params) plt.xlabel("time[s]") plt.ylabel("score") plt.axis([0,max(x_data),-1.2,1.2]) plt.scatter(x_data,y_data,marker=".") plt.subplots_adjust(left=0.15, bottom=0.16,right=0.96, top=0.95) plt.savefig("facescore/"+"face_"+score_face_label[i]+".png") i+=1 figurenum+=1 print "ploted each score_face_data" print "" print "ploting each score_object_data" y_data = [] i=0 j=0 while i<len(score_object_label): y_data = [] j=0 if (score_object_label[i]!="person") and (score_object_label[i]!="dining table"): while j<len(t0): y_data.append(score_object_data[i][j]) j+=1 plt.figure(figurenum,figsize=(cmtoinch(size_x),cmtoinch(size_y))) params = { 'font.family' :'Bitstream Vera Sans', 'axes.labelsize' :18, #'title.size' :20, 'xtick.labelsize':18, 'ytick.labelsize':18, 'xtick.major.size':5, 'xtick.minor.size':0, 'ytick.major.size':5, 'ytick.minor.size':0, 'xtick.major.pad':10, 'xtick.major.pad':10 } plt.rcParams.update(params) plt.xlabel("time[s]") plt.ylabel("score") plt.axis([0,max(x_data),-1.2,1.2]) plt.scatter(x_data,y_data,marker=".") plt.subplots_adjust(left=0.15, bottom=0.16,right=0.96, top=0.95) plt.savefig("objectscore/"+"object_"+score_object_label[i]+".png") i+=1 figurenum+=1 print "ploted each score_object_data" print ""
23.520737
92
0.638813
1,560
10,208
4.022436
0.102564
0.045896
0.045896
0.006375
0.810677
0.788526
0.755219
0.753466
0.753466
0.72749
0
0.032687
0.196806
10,208
434
93
23.520737
0.73265
0.091693
0
0.76338
0
0
0.191006
0.024756
0
0
0
0
0
0
null
null
0
0.033803
null
null
0.109859
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
1
0
0
0
0
0
0
0
0
8
5c7118c17190c2790a9d2f3a0195f598d2778727
31,650
py
Python
tests/functional/basic/isql/test_03.py
FirebirdSQL/firebird-qa
96af2def7f905a06f178e2a80a2c8be4a4b44782
[ "MIT" ]
1
2022-02-05T11:37:13.000Z
2022-02-05T11:37:13.000Z
tests/functional/basic/isql/test_03.py
FirebirdSQL/firebird-qa
96af2def7f905a06f178e2a80a2c8be4a4b44782
[ "MIT" ]
1
2021-09-03T11:47:00.000Z
2021-09-03T12:42:10.000Z
tests/functional/basic/isql/test_03.py
FirebirdSQL/firebird-qa
96af2def7f905a06f178e2a80a2c8be4a4b44782
[ "MIT" ]
1
2021-06-30T14:14:16.000Z
2021-06-30T14:14:16.000Z
#coding:utf-8 # # id: functional.basic.isql.03 # title: SHOW SYSTEM parameters # decription: Extend ISQL SHOW SYSTEM command to accept parameters TABLES, COLLATIONS and FUNCTIONS # tracker_id: CORE-978 # min_versions: [] # versions: 3.0, 4.0, 5.0 # qmid: functional.basic.isql.isql_14 import pytest from firebird.qa import db_factory, isql_act, Action # version: 3.0 # resources: None substitutions_1 = [("'COLL-VERSION=\\d+\\.\\d+\\.\\d+\\.\\d+', ", ''), ("'COLL-VERSION=\\d+\\.\\d+', ", '')] init_script_1 = """""" db_1 = db_factory(sql_dialect=3, init=init_script_1) test_script_1 = """SHOW SYSTEM TABLES; SHOW SYSTEM COLLATIONS; SHOW SYSTEM FUNCTIONS; """ act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1) expected_stdout_1 = """ MON$ATTACHMENTS MON$CALL_STACK MON$CONTEXT_VARIABLES MON$DATABASE MON$IO_STATS MON$MEMORY_USAGE MON$RECORD_STATS MON$STATEMENTS MON$TABLE_STATS MON$TRANSACTIONS RDB$AUTH_MAPPING RDB$BACKUP_HISTORY RDB$CHARACTER_SETS RDB$CHECK_CONSTRAINTS RDB$COLLATIONS RDB$DATABASE RDB$DB_CREATORS RDB$DEPENDENCIES RDB$EXCEPTIONS RDB$FIELDS RDB$FIELD_DIMENSIONS RDB$FILES RDB$FILTERS RDB$FORMATS RDB$FUNCTIONS RDB$FUNCTION_ARGUMENTS RDB$GENERATORS RDB$INDEX_SEGMENTS RDB$INDICES RDB$LOG_FILES RDB$PACKAGES RDB$PAGES RDB$PROCEDURES RDB$PROCEDURE_PARAMETERS RDB$REF_CONSTRAINTS RDB$RELATIONS RDB$RELATION_CONSTRAINTS RDB$RELATION_FIELDS RDB$ROLES RDB$SECURITY_CLASSES RDB$TRANSACTIONS RDB$TRIGGERS RDB$TRIGGER_MESSAGES RDB$TYPES RDB$USER_PRIVILEGES RDB$VIEW_RELATIONS SEC$DB_CREATORS SEC$GLOBAL_AUTH_MAPPING SEC$USERS SEC$USER_ATTRIBUTES ASCII, CHARACTER SET ASCII, PAD SPACE, SYSTEM BIG_5, CHARACTER SET BIG_5, PAD SPACE, SYSTEM BS_BA, CHARACTER SET WIN1250, PAD SPACE, SYSTEM CP943C, CHARACTER SET CP943C, PAD SPACE, SYSTEM CP943C_UNICODE, CHARACTER SET CP943C, PAD SPACE, SYSTEM CS_CZ, CHARACTER SET ISO8859_2, PAD SPACE, SYSTEM CYRL, CHARACTER SET CYRL, PAD SPACE, SYSTEM DA_DA, CHARACTER SET ISO8859_1, PAD SPACE, SYSTEM DB_CSY, CHARACTER SET DOS852, PAD SPACE, SYSTEM DB_DAN865, CHARACTER SET DOS865, PAD SPACE, SYSTEM DB_DEU437, CHARACTER SET DOS437, PAD SPACE, SYSTEM DB_DEU850, CHARACTER SET DOS850, PAD SPACE, SYSTEM DB_ESP437, CHARACTER SET DOS437, PAD SPACE, SYSTEM DB_ESP850, CHARACTER SET DOS850, PAD SPACE, SYSTEM DB_FIN437, CHARACTER SET DOS437, PAD SPACE, SYSTEM DB_FRA437, CHARACTER SET DOS437, PAD SPACE, SYSTEM DB_FRA850, CHARACTER SET DOS850, PAD SPACE, SYSTEM DB_FRC850, CHARACTER SET DOS850, PAD SPACE, SYSTEM DB_FRC863, CHARACTER SET DOS863, PAD SPACE, SYSTEM DB_ITA437, CHARACTER SET DOS437, PAD SPACE, SYSTEM DB_ITA850, CHARACTER SET DOS850, PAD SPACE, SYSTEM DB_NLD437, CHARACTER SET DOS437, PAD SPACE, SYSTEM DB_NLD850, CHARACTER SET DOS850, PAD SPACE, SYSTEM DB_NOR865, CHARACTER SET DOS865, PAD SPACE, SYSTEM DB_PLK, CHARACTER SET DOS852, PAD SPACE, SYSTEM DB_PTB850, CHARACTER SET DOS850, PAD SPACE, SYSTEM DB_PTG860, CHARACTER SET DOS860, PAD SPACE, SYSTEM DB_RUS, CHARACTER SET CYRL, PAD SPACE, SYSTEM DB_SLO, CHARACTER SET DOS852, PAD SPACE, SYSTEM DB_SVE437, CHARACTER SET DOS437, PAD SPACE, SYSTEM DB_SVE850, CHARACTER SET DOS850, PAD SPACE, SYSTEM DB_TRK, CHARACTER SET DOS857, PAD SPACE, SYSTEM DB_UK437, CHARACTER SET DOS437, PAD SPACE, SYSTEM DB_UK850, CHARACTER SET DOS850, PAD SPACE, SYSTEM DB_US437, CHARACTER SET DOS437, PAD SPACE, SYSTEM DB_US850, CHARACTER SET DOS850, PAD SPACE, SYSTEM DE_DE, CHARACTER SET ISO8859_1, PAD SPACE, SYSTEM DOS437, CHARACTER SET DOS437, PAD SPACE, SYSTEM DOS737, CHARACTER SET DOS737, PAD SPACE, SYSTEM DOS775, CHARACTER SET DOS775, PAD SPACE, SYSTEM DOS850, CHARACTER SET DOS850, PAD SPACE, SYSTEM DOS852, CHARACTER SET DOS852, PAD SPACE, SYSTEM DOS857, CHARACTER SET DOS857, PAD SPACE, SYSTEM DOS858, CHARACTER SET DOS858, PAD SPACE, SYSTEM DOS860, CHARACTER SET DOS860, PAD SPACE, SYSTEM DOS861, CHARACTER SET DOS861, PAD SPACE, SYSTEM DOS862, CHARACTER SET DOS862, PAD SPACE, SYSTEM DOS863, CHARACTER SET DOS863, PAD SPACE, SYSTEM DOS864, CHARACTER SET DOS864, PAD SPACE, SYSTEM DOS865, CHARACTER SET DOS865, PAD SPACE, SYSTEM DOS866, CHARACTER SET DOS866, PAD SPACE, SYSTEM DOS869, CHARACTER SET DOS869, PAD SPACE, SYSTEM DU_NL, CHARACTER SET ISO8859_1, PAD SPACE, SYSTEM EN_UK, CHARACTER SET ISO8859_1, PAD SPACE, SYSTEM EN_US, CHARACTER SET ISO8859_1, PAD SPACE, SYSTEM ES_ES, CHARACTER SET ISO8859_1, PAD SPACE, 'DISABLE-COMPRESSIONS=1;SPECIALS-FIRST=1', SYSTEM ES_ES_CI_AI, CHARACTER SET ISO8859_1, PAD SPACE, CASE INSENSITIVE, ACCENT INSENSITIVE, 'DISABLE-COMPRESSIONS=1;SPECIALS-FIRST=1', SYSTEM EUCJ_0208, CHARACTER SET EUCJ_0208, PAD SPACE, SYSTEM FI_FI, CHARACTER SET ISO8859_1, PAD SPACE, SYSTEM FR_CA, CHARACTER SET ISO8859_1, PAD SPACE, SYSTEM FR_CA_CI_AI, CHARACTER SET ISO8859_1, FROM EXTERNAL ('FR_CA'), PAD SPACE, CASE INSENSITIVE, ACCENT INSENSITIVE, 'SPECIALS-FIRST=1', SYSTEM FR_FR, CHARACTER SET ISO8859_1, PAD SPACE, SYSTEM FR_FR_CI_AI, CHARACTER SET ISO8859_1, FROM EXTERNAL ('FR_FR'), PAD SPACE, CASE INSENSITIVE, ACCENT INSENSITIVE, 'SPECIALS-FIRST=1', SYSTEM GB18030, CHARACTER SET GB18030, PAD SPACE, SYSTEM GB18030_UNICODE, CHARACTER SET GB18030, PAD SPACE, SYSTEM GBK, CHARACTER SET GBK, PAD SPACE, SYSTEM GBK_UNICODE, CHARACTER SET GBK, PAD SPACE, SYSTEM GB_2312, CHARACTER SET GB_2312, PAD SPACE, SYSTEM ISO8859_1, CHARACTER SET ISO8859_1, PAD SPACE, SYSTEM ISO8859_13, CHARACTER SET ISO8859_13, PAD SPACE, SYSTEM ISO8859_2, CHARACTER SET ISO8859_2, PAD SPACE, SYSTEM ISO8859_3, CHARACTER SET ISO8859_3, PAD SPACE, SYSTEM ISO8859_4, CHARACTER SET ISO8859_4, PAD SPACE, SYSTEM ISO8859_5, CHARACTER SET ISO8859_5, PAD SPACE, SYSTEM ISO8859_6, CHARACTER SET ISO8859_6, PAD SPACE, SYSTEM ISO8859_7, CHARACTER SET ISO8859_7, PAD SPACE, SYSTEM ISO8859_8, CHARACTER SET ISO8859_8, PAD SPACE, SYSTEM ISO8859_9, CHARACTER SET ISO8859_9, PAD SPACE, SYSTEM ISO_HUN, CHARACTER SET ISO8859_2, PAD SPACE, SYSTEM ISO_PLK, CHARACTER SET ISO8859_2, PAD SPACE, SYSTEM IS_IS, CHARACTER SET ISO8859_1, PAD SPACE, SYSTEM IT_IT, CHARACTER SET ISO8859_1, PAD SPACE, SYSTEM KOI8R, CHARACTER SET KOI8R, PAD SPACE, SYSTEM KOI8R_RU, CHARACTER SET KOI8R, PAD SPACE, SYSTEM KOI8U, CHARACTER SET KOI8U, PAD SPACE, SYSTEM KOI8U_UA, CHARACTER SET KOI8U, PAD SPACE, SYSTEM KSC_5601, CHARACTER SET KSC_5601, PAD SPACE, SYSTEM KSC_DICTIONARY, CHARACTER SET KSC_5601, PAD SPACE, SYSTEM LT_LT, CHARACTER SET ISO8859_13, PAD SPACE, SYSTEM NEXT, CHARACTER SET NEXT, PAD SPACE, SYSTEM NONE, CHARACTER SET NONE, PAD SPACE, SYSTEM NO_NO, CHARACTER SET ISO8859_1, PAD SPACE, SYSTEM NXT_DEU, CHARACTER SET NEXT, PAD SPACE, SYSTEM NXT_ESP, CHARACTER SET NEXT, PAD SPACE, SYSTEM NXT_FRA, CHARACTER SET NEXT, PAD SPACE, SYSTEM NXT_ITA, CHARACTER SET NEXT, PAD SPACE, SYSTEM NXT_US, CHARACTER SET NEXT, PAD SPACE, SYSTEM OCTETS, CHARACTER SET OCTETS, PAD SPACE, SYSTEM PDOX_ASCII, CHARACTER SET DOS437, PAD SPACE, SYSTEM PDOX_CSY, CHARACTER SET DOS852, PAD SPACE, SYSTEM PDOX_CYRL, CHARACTER SET CYRL, PAD SPACE, SYSTEM PDOX_HUN, CHARACTER SET DOS852, PAD SPACE, SYSTEM PDOX_INTL, CHARACTER SET DOS437, PAD SPACE, SYSTEM PDOX_ISL, CHARACTER SET DOS861, PAD SPACE, SYSTEM PDOX_NORDAN4, CHARACTER SET DOS865, PAD SPACE, SYSTEM PDOX_PLK, CHARACTER SET DOS852, PAD SPACE, SYSTEM PDOX_SLO, CHARACTER SET DOS852, PAD SPACE, SYSTEM PDOX_SWEDFIN, CHARACTER SET DOS437, PAD SPACE, SYSTEM PT_BR, CHARACTER SET ISO8859_1, PAD SPACE, CASE INSENSITIVE, ACCENT INSENSITIVE, SYSTEM PT_PT, CHARACTER SET ISO8859_1, PAD SPACE, SYSTEM PXW_CSY, CHARACTER SET WIN1250, PAD SPACE, SYSTEM PXW_CYRL, CHARACTER SET WIN1251, PAD SPACE, SYSTEM PXW_GREEK, CHARACTER SET WIN1253, PAD SPACE, SYSTEM PXW_HUN, CHARACTER SET WIN1250, PAD SPACE, SYSTEM PXW_HUNDC, CHARACTER SET WIN1250, PAD SPACE, SYSTEM PXW_INTL, CHARACTER SET WIN1252, PAD SPACE, SYSTEM PXW_INTL850, CHARACTER SET WIN1252, PAD SPACE, SYSTEM PXW_NORDAN4, CHARACTER SET WIN1252, PAD SPACE, SYSTEM PXW_PLK, CHARACTER SET WIN1250, PAD SPACE, SYSTEM PXW_SLOV, CHARACTER SET WIN1250, PAD SPACE, SYSTEM PXW_SPAN, CHARACTER SET WIN1252, PAD SPACE, SYSTEM PXW_SWEDFIN, CHARACTER SET WIN1252, PAD SPACE, SYSTEM PXW_TURK, CHARACTER SET WIN1254, PAD SPACE, SYSTEM SJIS_0208, CHARACTER SET SJIS_0208, PAD SPACE, SYSTEM SV_SV, CHARACTER SET ISO8859_1, PAD SPACE, SYSTEM TIS620, CHARACTER SET TIS620, PAD SPACE, SYSTEM TIS620_UNICODE, CHARACTER SET TIS620, PAD SPACE, SYSTEM UCS_BASIC, CHARACTER SET UTF8, PAD SPACE, SYSTEM UNICODE, CHARACTER SET UTF8, PAD SPACE, SYSTEM UNICODE_CI, CHARACTER SET UTF8, FROM EXTERNAL ('UNICODE'), PAD SPACE, CASE INSENSITIVE, SYSTEM UNICODE_CI_AI, CHARACTER SET UTF8, FROM EXTERNAL ('UNICODE'), PAD SPACE, CASE INSENSITIVE, ACCENT INSENSITIVE, SYSTEM UNICODE_FSS, CHARACTER SET UNICODE_FSS, PAD SPACE, SYSTEM UTF8, CHARACTER SET UTF8, PAD SPACE, SYSTEM WIN1250, CHARACTER SET WIN1250, PAD SPACE, SYSTEM WIN1251, CHARACTER SET WIN1251, PAD SPACE, SYSTEM WIN1251_UA, CHARACTER SET WIN1251, PAD SPACE, SYSTEM WIN1252, CHARACTER SET WIN1252, PAD SPACE, SYSTEM WIN1253, CHARACTER SET WIN1253, PAD SPACE, SYSTEM WIN1254, CHARACTER SET WIN1254, PAD SPACE, SYSTEM WIN1255, CHARACTER SET WIN1255, PAD SPACE, SYSTEM WIN1256, CHARACTER SET WIN1256, PAD SPACE, SYSTEM WIN1257, CHARACTER SET WIN1257, PAD SPACE, SYSTEM WIN1257_EE, CHARACTER SET WIN1257, PAD SPACE, SYSTEM WIN1257_LT, CHARACTER SET WIN1257, PAD SPACE, SYSTEM WIN1257_LV, CHARACTER SET WIN1257, PAD SPACE, SYSTEM WIN1258, CHARACTER SET WIN1258, PAD SPACE, SYSTEM WIN_CZ, CHARACTER SET WIN1250, PAD SPACE, CASE INSENSITIVE, SYSTEM WIN_CZ_CI_AI, CHARACTER SET WIN1250, PAD SPACE, CASE INSENSITIVE, ACCENT INSENSITIVE, SYSTEM WIN_PTBR, CHARACTER SET WIN1252, PAD SPACE, CASE INSENSITIVE, ACCENT INSENSITIVE, SYSTEM """ @pytest.mark.version('>=3.0,<4.0') def test_1(act_1: Action): act_1.expected_stdout = expected_stdout_1 act_1.execute() assert act_1.clean_stdout == act_1.clean_expected_stdout # version: 4.0 # resources: None substitutions_2 = [("'COLL-VERSION=\\d+\\.\\d+\\.\\d+\\.\\d+', ", ''), ("'COLL-VERSION=\\d+\\.\\d+', ", '')] init_script_2 = """""" db_2 = db_factory(sql_dialect=3, init=init_script_2) test_script_2 = """ SHOW SYSTEM TABLES; SHOW SYSTEM COLLATIONS; SHOW SYSTEM FUNCTIONS; """ act_2 = isql_act('db_2', test_script_2, substitutions=substitutions_2) expected_stdout_2 = """ MON$ATTACHMENTS MON$CALL_STACK MON$CONTEXT_VARIABLES MON$DATABASE MON$IO_STATS MON$MEMORY_USAGE MON$RECORD_STATS MON$STATEMENTS MON$TABLE_STATS MON$TRANSACTIONS RDB$AUTH_MAPPING RDB$BACKUP_HISTORY RDB$CHARACTER_SETS RDB$CHECK_CONSTRAINTS RDB$COLLATIONS RDB$CONFIG RDB$DATABASE RDB$DB_CREATORS RDB$DEPENDENCIES RDB$EXCEPTIONS RDB$FIELDS RDB$FIELD_DIMENSIONS RDB$FILES RDB$FILTERS RDB$FORMATS RDB$FUNCTIONS RDB$FUNCTION_ARGUMENTS RDB$GENERATORS RDB$INDEX_SEGMENTS RDB$INDICES RDB$LOG_FILES RDB$PACKAGES RDB$PAGES RDB$PROCEDURES RDB$PROCEDURE_PARAMETERS RDB$PUBLICATIONS RDB$PUBLICATION_TABLES RDB$REF_CONSTRAINTS RDB$RELATIONS RDB$RELATION_CONSTRAINTS RDB$RELATION_FIELDS RDB$ROLES RDB$SECURITY_CLASSES RDB$TIME_ZONES RDB$TRANSACTIONS RDB$TRIGGERS RDB$TRIGGER_MESSAGES RDB$TYPES RDB$USER_PRIVILEGES RDB$VIEW_RELATIONS SEC$DB_CREATORS SEC$GLOBAL_AUTH_MAPPING SEC$USERS SEC$USER_ATTRIBUTES ASCII, CHARACTER SET ASCII, PAD SPACE, SYSTEM BIG_5, CHARACTER SET BIG_5, PAD SPACE, SYSTEM BS_BA, CHARACTER SET WIN1250, PAD SPACE, SYSTEM CP943C, CHARACTER SET CP943C, PAD SPACE, SYSTEM CP943C_UNICODE, CHARACTER SET CP943C, PAD SPACE, 'COLL-VERSION=153.88', SYSTEM CS_CZ, CHARACTER SET ISO8859_2, PAD SPACE, SYSTEM CYRL, CHARACTER SET CYRL, PAD SPACE, SYSTEM DA_DA, CHARACTER SET ISO8859_1, PAD SPACE, SYSTEM DB_CSY, CHARACTER SET DOS852, PAD SPACE, SYSTEM DB_DAN865, CHARACTER SET DOS865, PAD SPACE, SYSTEM DB_DEU437, CHARACTER SET DOS437, PAD SPACE, SYSTEM DB_DEU850, CHARACTER SET DOS850, PAD SPACE, SYSTEM DB_ESP437, CHARACTER SET DOS437, PAD SPACE, SYSTEM DB_ESP850, CHARACTER SET DOS850, PAD SPACE, SYSTEM DB_FIN437, CHARACTER SET DOS437, PAD SPACE, SYSTEM DB_FRA437, CHARACTER SET DOS437, PAD SPACE, SYSTEM DB_FRA850, CHARACTER SET DOS850, PAD SPACE, SYSTEM DB_FRC850, CHARACTER SET DOS850, PAD SPACE, SYSTEM DB_FRC863, CHARACTER SET DOS863, PAD SPACE, SYSTEM DB_ITA437, CHARACTER SET DOS437, PAD SPACE, SYSTEM DB_ITA850, CHARACTER SET DOS850, PAD SPACE, SYSTEM DB_NLD437, CHARACTER SET DOS437, PAD SPACE, SYSTEM DB_NLD850, CHARACTER SET DOS850, PAD SPACE, SYSTEM DB_NOR865, CHARACTER SET DOS865, PAD SPACE, SYSTEM DB_PLK, CHARACTER SET DOS852, PAD SPACE, SYSTEM DB_PTB850, CHARACTER SET DOS850, PAD SPACE, SYSTEM DB_PTG860, CHARACTER SET DOS860, PAD SPACE, SYSTEM DB_RUS, CHARACTER SET CYRL, PAD SPACE, SYSTEM DB_SLO, CHARACTER SET DOS852, PAD SPACE, SYSTEM DB_SVE437, CHARACTER SET DOS437, PAD SPACE, SYSTEM DB_SVE850, CHARACTER SET DOS850, PAD SPACE, SYSTEM DB_TRK, CHARACTER SET DOS857, PAD SPACE, SYSTEM DB_UK437, CHARACTER SET DOS437, PAD SPACE, SYSTEM DB_UK850, CHARACTER SET DOS850, PAD SPACE, SYSTEM DB_US437, CHARACTER SET DOS437, PAD SPACE, SYSTEM DB_US850, CHARACTER SET DOS850, PAD SPACE, SYSTEM DE_DE, CHARACTER SET ISO8859_1, PAD SPACE, SYSTEM DOS437, CHARACTER SET DOS437, PAD SPACE, SYSTEM DOS737, CHARACTER SET DOS737, PAD SPACE, SYSTEM DOS775, CHARACTER SET DOS775, PAD SPACE, SYSTEM DOS850, CHARACTER SET DOS850, PAD SPACE, SYSTEM DOS852, CHARACTER SET DOS852, PAD SPACE, SYSTEM DOS857, CHARACTER SET DOS857, PAD SPACE, SYSTEM DOS858, CHARACTER SET DOS858, PAD SPACE, SYSTEM DOS860, CHARACTER SET DOS860, PAD SPACE, SYSTEM DOS861, CHARACTER SET DOS861, PAD SPACE, SYSTEM DOS862, CHARACTER SET DOS862, PAD SPACE, SYSTEM DOS863, CHARACTER SET DOS863, PAD SPACE, SYSTEM DOS864, CHARACTER SET DOS864, PAD SPACE, SYSTEM DOS865, CHARACTER SET DOS865, PAD SPACE, SYSTEM DOS866, CHARACTER SET DOS866, PAD SPACE, SYSTEM DOS869, CHARACTER SET DOS869, PAD SPACE, SYSTEM DU_NL, CHARACTER SET ISO8859_1, PAD SPACE, SYSTEM EN_UK, CHARACTER SET ISO8859_1, PAD SPACE, SYSTEM EN_US, CHARACTER SET ISO8859_1, PAD SPACE, SYSTEM ES_ES, CHARACTER SET ISO8859_1, PAD SPACE, 'DISABLE-COMPRESSIONS=1;SPECIALS-FIRST=1', SYSTEM ES_ES_CI_AI, CHARACTER SET ISO8859_1, PAD SPACE, CASE INSENSITIVE, ACCENT INSENSITIVE, 'DISABLE-COMPRESSIONS=1;SPECIALS-FIRST=1', SYSTEM EUCJ_0208, CHARACTER SET EUCJ_0208, PAD SPACE, SYSTEM FI_FI, CHARACTER SET ISO8859_1, PAD SPACE, SYSTEM FR_CA, CHARACTER SET ISO8859_1, PAD SPACE, SYSTEM FR_CA_CI_AI, CHARACTER SET ISO8859_1, FROM EXTERNAL ('FR_CA'), PAD SPACE, CASE INSENSITIVE, ACCENT INSENSITIVE, 'SPECIALS-FIRST=1', SYSTEM FR_FR, CHARACTER SET ISO8859_1, PAD SPACE, SYSTEM FR_FR_CI_AI, CHARACTER SET ISO8859_1, FROM EXTERNAL ('FR_FR'), PAD SPACE, CASE INSENSITIVE, ACCENT INSENSITIVE, 'SPECIALS-FIRST=1', SYSTEM GB18030, CHARACTER SET GB18030, PAD SPACE, SYSTEM GB18030_UNICODE, CHARACTER SET GB18030, PAD SPACE, 'COLL-VERSION=153.88', SYSTEM GBK, CHARACTER SET GBK, PAD SPACE, SYSTEM GBK_UNICODE, CHARACTER SET GBK, PAD SPACE, 'COLL-VERSION=153.88', SYSTEM GB_2312, CHARACTER SET GB_2312, PAD SPACE, SYSTEM ISO8859_1, CHARACTER SET ISO8859_1, PAD SPACE, SYSTEM ISO8859_13, CHARACTER SET ISO8859_13, PAD SPACE, SYSTEM ISO8859_2, CHARACTER SET ISO8859_2, PAD SPACE, SYSTEM ISO8859_3, CHARACTER SET ISO8859_3, PAD SPACE, SYSTEM ISO8859_4, CHARACTER SET ISO8859_4, PAD SPACE, SYSTEM ISO8859_5, CHARACTER SET ISO8859_5, PAD SPACE, SYSTEM ISO8859_6, CHARACTER SET ISO8859_6, PAD SPACE, SYSTEM ISO8859_7, CHARACTER SET ISO8859_7, PAD SPACE, SYSTEM ISO8859_8, CHARACTER SET ISO8859_8, PAD SPACE, SYSTEM ISO8859_9, CHARACTER SET ISO8859_9, PAD SPACE, SYSTEM ISO_HUN, CHARACTER SET ISO8859_2, PAD SPACE, SYSTEM ISO_PLK, CHARACTER SET ISO8859_2, PAD SPACE, SYSTEM IS_IS, CHARACTER SET ISO8859_1, PAD SPACE, SYSTEM IT_IT, CHARACTER SET ISO8859_1, PAD SPACE, SYSTEM KOI8R, CHARACTER SET KOI8R, PAD SPACE, SYSTEM KOI8R_RU, CHARACTER SET KOI8R, PAD SPACE, SYSTEM KOI8U, CHARACTER SET KOI8U, PAD SPACE, SYSTEM KOI8U_UA, CHARACTER SET KOI8U, PAD SPACE, SYSTEM KSC_5601, CHARACTER SET KSC_5601, PAD SPACE, SYSTEM KSC_DICTIONARY, CHARACTER SET KSC_5601, PAD SPACE, SYSTEM LT_LT, CHARACTER SET ISO8859_13, PAD SPACE, SYSTEM NEXT, CHARACTER SET NEXT, PAD SPACE, SYSTEM NONE, CHARACTER SET NONE, PAD SPACE, SYSTEM NO_NO, CHARACTER SET ISO8859_1, PAD SPACE, SYSTEM NXT_DEU, CHARACTER SET NEXT, PAD SPACE, SYSTEM NXT_ESP, CHARACTER SET NEXT, PAD SPACE, SYSTEM NXT_FRA, CHARACTER SET NEXT, PAD SPACE, SYSTEM NXT_ITA, CHARACTER SET NEXT, PAD SPACE, SYSTEM NXT_US, CHARACTER SET NEXT, PAD SPACE, SYSTEM OCTETS, CHARACTER SET OCTETS, PAD SPACE, SYSTEM PDOX_ASCII, CHARACTER SET DOS437, PAD SPACE, SYSTEM PDOX_CSY, CHARACTER SET DOS852, PAD SPACE, SYSTEM PDOX_CYRL, CHARACTER SET CYRL, PAD SPACE, SYSTEM PDOX_HUN, CHARACTER SET DOS852, PAD SPACE, SYSTEM PDOX_INTL, CHARACTER SET DOS437, PAD SPACE, SYSTEM PDOX_ISL, CHARACTER SET DOS861, PAD SPACE, SYSTEM PDOX_NORDAN4, CHARACTER SET DOS865, PAD SPACE, SYSTEM PDOX_PLK, CHARACTER SET DOS852, PAD SPACE, SYSTEM PDOX_SLO, CHARACTER SET DOS852, PAD SPACE, SYSTEM PDOX_SWEDFIN, CHARACTER SET DOS437, PAD SPACE, SYSTEM PT_BR, CHARACTER SET ISO8859_1, PAD SPACE, CASE INSENSITIVE, ACCENT INSENSITIVE, SYSTEM PT_PT, CHARACTER SET ISO8859_1, PAD SPACE, SYSTEM PXW_CSY, CHARACTER SET WIN1250, PAD SPACE, SYSTEM PXW_CYRL, CHARACTER SET WIN1251, PAD SPACE, SYSTEM PXW_GREEK, CHARACTER SET WIN1253, PAD SPACE, SYSTEM PXW_HUN, CHARACTER SET WIN1250, PAD SPACE, SYSTEM PXW_HUNDC, CHARACTER SET WIN1250, PAD SPACE, SYSTEM PXW_INTL, CHARACTER SET WIN1252, PAD SPACE, SYSTEM PXW_INTL850, CHARACTER SET WIN1252, PAD SPACE, SYSTEM PXW_NORDAN4, CHARACTER SET WIN1252, PAD SPACE, SYSTEM PXW_PLK, CHARACTER SET WIN1250, PAD SPACE, SYSTEM PXW_SLOV, CHARACTER SET WIN1250, PAD SPACE, SYSTEM PXW_SPAN, CHARACTER SET WIN1252, PAD SPACE, SYSTEM PXW_SWEDFIN, CHARACTER SET WIN1252, PAD SPACE, SYSTEM PXW_TURK, CHARACTER SET WIN1254, PAD SPACE, SYSTEM SJIS_0208, CHARACTER SET SJIS_0208, PAD SPACE, SYSTEM SV_SV, CHARACTER SET ISO8859_1, PAD SPACE, SYSTEM TIS620, CHARACTER SET TIS620, PAD SPACE, SYSTEM TIS620_UNICODE, CHARACTER SET TIS620, PAD SPACE, 'COLL-VERSION=153.88', SYSTEM UCS_BASIC, CHARACTER SET UTF8, PAD SPACE, SYSTEM UNICODE, CHARACTER SET UTF8, PAD SPACE, 'COLL-VERSION=153.88', SYSTEM UNICODE_CI, CHARACTER SET UTF8, FROM EXTERNAL ('UNICODE'), PAD SPACE, CASE INSENSITIVE, 'COLL-VERSION=153.88', SYSTEM UNICODE_CI_AI, CHARACTER SET UTF8, FROM EXTERNAL ('UNICODE'), PAD SPACE, CASE INSENSITIVE, ACCENT INSENSITIVE, 'COLL-VERSION=153.88', SYSTEM UNICODE_FSS, CHARACTER SET UNICODE_FSS, PAD SPACE, SYSTEM UTF8, CHARACTER SET UTF8, PAD SPACE, SYSTEM WIN1250, CHARACTER SET WIN1250, PAD SPACE, SYSTEM WIN1251, CHARACTER SET WIN1251, PAD SPACE, SYSTEM WIN1251_UA, CHARACTER SET WIN1251, PAD SPACE, SYSTEM WIN1252, CHARACTER SET WIN1252, PAD SPACE, SYSTEM WIN1253, CHARACTER SET WIN1253, PAD SPACE, SYSTEM WIN1254, CHARACTER SET WIN1254, PAD SPACE, SYSTEM WIN1255, CHARACTER SET WIN1255, PAD SPACE, SYSTEM WIN1256, CHARACTER SET WIN1256, PAD SPACE, SYSTEM WIN1257, CHARACTER SET WIN1257, PAD SPACE, SYSTEM WIN1257_EE, CHARACTER SET WIN1257, PAD SPACE, SYSTEM WIN1257_LT, CHARACTER SET WIN1257, PAD SPACE, SYSTEM WIN1257_LV, CHARACTER SET WIN1257, PAD SPACE, SYSTEM WIN1258, CHARACTER SET WIN1258, PAD SPACE, SYSTEM WIN_CZ, CHARACTER SET WIN1250, PAD SPACE, CASE INSENSITIVE, SYSTEM WIN_CZ_CI_AI, CHARACTER SET WIN1250, PAD SPACE, CASE INSENSITIVE, ACCENT INSENSITIVE, SYSTEM WIN_PTBR, CHARACTER SET WIN1252, PAD SPACE, CASE INSENSITIVE, ACCENT INSENSITIVE, SYSTEM """ @pytest.mark.version('>=4.0,<5.0') def test_2(act_2: Action): act_2.expected_stdout = expected_stdout_2 act_2.execute() assert act_2.clean_stdout == act_2.clean_expected_stdout # version: 5.0 # resources: None substitutions_3 = [("'COLL-VERSION=\\d+\\.\\d+\\.\\d+\\.\\d+', ", ''), ("'COLL-VERSION=\\d+\\.\\d+', ", '')] init_script_3 = """""" db_3 = db_factory(sql_dialect=3, init=init_script_3) test_script_3 = """ SHOW SYSTEM TABLES; SHOW SYSTEM COLLATIONS; SHOW SYSTEM FUNCTIONS; """ act_3 = isql_act('db_3', test_script_3, substitutions=substitutions_3) expected_stdout_3 = """ MON$ATTACHMENTS MON$CALL_STACK MON$CONTEXT_VARIABLES MON$DATABASE MON$IO_STATS MON$MEMORY_USAGE MON$RECORD_STATS MON$STATEMENTS MON$TABLE_STATS MON$TRANSACTIONS RDB$AUTH_MAPPING RDB$BACKUP_HISTORY RDB$CHARACTER_SETS RDB$CHECK_CONSTRAINTS RDB$COLLATIONS RDB$CONFIG RDB$DATABASE RDB$DB_CREATORS RDB$DEPENDENCIES RDB$EXCEPTIONS RDB$FIELDS RDB$FIELD_DIMENSIONS RDB$FILES RDB$FILTERS RDB$FORMATS RDB$FUNCTIONS RDB$FUNCTION_ARGUMENTS RDB$GENERATORS RDB$INDEX_SEGMENTS RDB$INDICES RDB$KEYWORDS RDB$LOG_FILES RDB$PACKAGES RDB$PAGES RDB$PROCEDURES RDB$PROCEDURE_PARAMETERS RDB$PUBLICATIONS RDB$PUBLICATION_TABLES RDB$REF_CONSTRAINTS RDB$RELATIONS RDB$RELATION_CONSTRAINTS RDB$RELATION_FIELDS RDB$ROLES RDB$SECURITY_CLASSES RDB$TIME_ZONES RDB$TRANSACTIONS RDB$TRIGGERS RDB$TRIGGER_MESSAGES RDB$TYPES RDB$USER_PRIVILEGES RDB$VIEW_RELATIONS SEC$DB_CREATORS SEC$GLOBAL_AUTH_MAPPING SEC$USERS SEC$USER_ATTRIBUTES ASCII, CHARACTER SET ASCII, PAD SPACE, SYSTEM BIG_5, CHARACTER SET BIG_5, PAD SPACE, SYSTEM BS_BA, CHARACTER SET WIN1250, PAD SPACE, SYSTEM CP943C, CHARACTER SET CP943C, PAD SPACE, SYSTEM CP943C_UNICODE, CHARACTER SET CP943C, PAD SPACE, 'COLL-VERSION=153.88', SYSTEM CS_CZ, CHARACTER SET ISO8859_2, PAD SPACE, SYSTEM CYRL, CHARACTER SET CYRL, PAD SPACE, SYSTEM DA_DA, CHARACTER SET ISO8859_1, PAD SPACE, SYSTEM DB_CSY, CHARACTER SET DOS852, PAD SPACE, SYSTEM DB_DAN865, CHARACTER SET DOS865, PAD SPACE, SYSTEM DB_DEU437, CHARACTER SET DOS437, PAD SPACE, SYSTEM DB_DEU850, CHARACTER SET DOS850, PAD SPACE, SYSTEM DB_ESP437, CHARACTER SET DOS437, PAD SPACE, SYSTEM DB_ESP850, CHARACTER SET DOS850, PAD SPACE, SYSTEM DB_FIN437, CHARACTER SET DOS437, PAD SPACE, SYSTEM DB_FRA437, CHARACTER SET DOS437, PAD SPACE, SYSTEM DB_FRA850, CHARACTER SET DOS850, PAD SPACE, SYSTEM DB_FRC850, CHARACTER SET DOS850, PAD SPACE, SYSTEM DB_FRC863, CHARACTER SET DOS863, PAD SPACE, SYSTEM DB_ITA437, CHARACTER SET DOS437, PAD SPACE, SYSTEM DB_ITA850, CHARACTER SET DOS850, PAD SPACE, SYSTEM DB_NLD437, CHARACTER SET DOS437, PAD SPACE, SYSTEM DB_NLD850, CHARACTER SET DOS850, PAD SPACE, SYSTEM DB_NOR865, CHARACTER SET DOS865, PAD SPACE, SYSTEM DB_PLK, CHARACTER SET DOS852, PAD SPACE, SYSTEM DB_PTB850, CHARACTER SET DOS850, PAD SPACE, SYSTEM DB_PTG860, CHARACTER SET DOS860, PAD SPACE, SYSTEM DB_RUS, CHARACTER SET CYRL, PAD SPACE, SYSTEM DB_SLO, CHARACTER SET DOS852, PAD SPACE, SYSTEM DB_SVE437, CHARACTER SET DOS437, PAD SPACE, SYSTEM DB_SVE850, CHARACTER SET DOS850, PAD SPACE, SYSTEM DB_TRK, CHARACTER SET DOS857, PAD SPACE, SYSTEM DB_UK437, CHARACTER SET DOS437, PAD SPACE, SYSTEM DB_UK850, CHARACTER SET DOS850, PAD SPACE, SYSTEM DB_US437, CHARACTER SET DOS437, PAD SPACE, SYSTEM DB_US850, CHARACTER SET DOS850, PAD SPACE, SYSTEM DE_DE, CHARACTER SET ISO8859_1, PAD SPACE, SYSTEM DOS437, CHARACTER SET DOS437, PAD SPACE, SYSTEM DOS737, CHARACTER SET DOS737, PAD SPACE, SYSTEM DOS775, CHARACTER SET DOS775, PAD SPACE, SYSTEM DOS850, CHARACTER SET DOS850, PAD SPACE, SYSTEM DOS852, CHARACTER SET DOS852, PAD SPACE, SYSTEM DOS857, CHARACTER SET DOS857, PAD SPACE, SYSTEM DOS858, CHARACTER SET DOS858, PAD SPACE, SYSTEM DOS860, CHARACTER SET DOS860, PAD SPACE, SYSTEM DOS861, CHARACTER SET DOS861, PAD SPACE, SYSTEM DOS862, CHARACTER SET DOS862, PAD SPACE, SYSTEM DOS863, CHARACTER SET DOS863, PAD SPACE, SYSTEM DOS864, CHARACTER SET DOS864, PAD SPACE, SYSTEM DOS865, CHARACTER SET DOS865, PAD SPACE, SYSTEM DOS866, CHARACTER SET DOS866, PAD SPACE, SYSTEM DOS869, CHARACTER SET DOS869, PAD SPACE, SYSTEM DU_NL, CHARACTER SET ISO8859_1, PAD SPACE, SYSTEM EN_UK, CHARACTER SET ISO8859_1, PAD SPACE, SYSTEM EN_US, CHARACTER SET ISO8859_1, PAD SPACE, SYSTEM ES_ES, CHARACTER SET ISO8859_1, PAD SPACE, 'DISABLE-COMPRESSIONS=1;SPECIALS-FIRST=1', SYSTEM ES_ES_CI_AI, CHARACTER SET ISO8859_1, PAD SPACE, CASE INSENSITIVE, ACCENT INSENSITIVE, 'DISABLE-COMPRESSIONS=1;SPECIALS-FIRST=1', SYSTEM EUCJ_0208, CHARACTER SET EUCJ_0208, PAD SPACE, SYSTEM FI_FI, CHARACTER SET ISO8859_1, PAD SPACE, SYSTEM FR_CA, CHARACTER SET ISO8859_1, PAD SPACE, SYSTEM FR_CA_CI_AI, CHARACTER SET ISO8859_1, FROM EXTERNAL ('FR_CA'), PAD SPACE, CASE INSENSITIVE, ACCENT INSENSITIVE, 'SPECIALS-FIRST=1', SYSTEM FR_FR, CHARACTER SET ISO8859_1, PAD SPACE, SYSTEM FR_FR_CI_AI, CHARACTER SET ISO8859_1, FROM EXTERNAL ('FR_FR'), PAD SPACE, CASE INSENSITIVE, ACCENT INSENSITIVE, 'SPECIALS-FIRST=1', SYSTEM GB18030, CHARACTER SET GB18030, PAD SPACE, SYSTEM GB18030_UNICODE, CHARACTER SET GB18030, PAD SPACE, 'COLL-VERSION=153.88', SYSTEM GBK, CHARACTER SET GBK, PAD SPACE, SYSTEM GBK_UNICODE, CHARACTER SET GBK, PAD SPACE, 'COLL-VERSION=153.88', SYSTEM GB_2312, CHARACTER SET GB_2312, PAD SPACE, SYSTEM ISO8859_1, CHARACTER SET ISO8859_1, PAD SPACE, SYSTEM ISO8859_13, CHARACTER SET ISO8859_13, PAD SPACE, SYSTEM ISO8859_2, CHARACTER SET ISO8859_2, PAD SPACE, SYSTEM ISO8859_3, CHARACTER SET ISO8859_3, PAD SPACE, SYSTEM ISO8859_4, CHARACTER SET ISO8859_4, PAD SPACE, SYSTEM ISO8859_5, CHARACTER SET ISO8859_5, PAD SPACE, SYSTEM ISO8859_6, CHARACTER SET ISO8859_6, PAD SPACE, SYSTEM ISO8859_7, CHARACTER SET ISO8859_7, PAD SPACE, SYSTEM ISO8859_8, CHARACTER SET ISO8859_8, PAD SPACE, SYSTEM ISO8859_9, CHARACTER SET ISO8859_9, PAD SPACE, SYSTEM ISO_HUN, CHARACTER SET ISO8859_2, PAD SPACE, SYSTEM ISO_PLK, CHARACTER SET ISO8859_2, PAD SPACE, SYSTEM IS_IS, CHARACTER SET ISO8859_1, PAD SPACE, SYSTEM IT_IT, CHARACTER SET ISO8859_1, PAD SPACE, SYSTEM KOI8R, CHARACTER SET KOI8R, PAD SPACE, SYSTEM KOI8R_RU, CHARACTER SET KOI8R, PAD SPACE, SYSTEM KOI8U, CHARACTER SET KOI8U, PAD SPACE, SYSTEM KOI8U_UA, CHARACTER SET KOI8U, PAD SPACE, SYSTEM KSC_5601, CHARACTER SET KSC_5601, PAD SPACE, SYSTEM KSC_DICTIONARY, CHARACTER SET KSC_5601, PAD SPACE, SYSTEM LT_LT, CHARACTER SET ISO8859_13, PAD SPACE, SYSTEM NEXT, CHARACTER SET NEXT, PAD SPACE, SYSTEM NONE, CHARACTER SET NONE, PAD SPACE, SYSTEM NO_NO, CHARACTER SET ISO8859_1, PAD SPACE, SYSTEM NXT_DEU, CHARACTER SET NEXT, PAD SPACE, SYSTEM NXT_ESP, CHARACTER SET NEXT, PAD SPACE, SYSTEM NXT_FRA, CHARACTER SET NEXT, PAD SPACE, SYSTEM NXT_ITA, CHARACTER SET NEXT, PAD SPACE, SYSTEM NXT_US, CHARACTER SET NEXT, PAD SPACE, SYSTEM OCTETS, CHARACTER SET OCTETS, PAD SPACE, SYSTEM PDOX_ASCII, CHARACTER SET DOS437, PAD SPACE, SYSTEM PDOX_CSY, CHARACTER SET DOS852, PAD SPACE, SYSTEM PDOX_CYRL, CHARACTER SET CYRL, PAD SPACE, SYSTEM PDOX_HUN, CHARACTER SET DOS852, PAD SPACE, SYSTEM PDOX_INTL, CHARACTER SET DOS437, PAD SPACE, SYSTEM PDOX_ISL, CHARACTER SET DOS861, PAD SPACE, SYSTEM PDOX_NORDAN4, CHARACTER SET DOS865, PAD SPACE, SYSTEM PDOX_PLK, CHARACTER SET DOS852, PAD SPACE, SYSTEM PDOX_SLO, CHARACTER SET DOS852, PAD SPACE, SYSTEM PDOX_SWEDFIN, CHARACTER SET DOS437, PAD SPACE, SYSTEM PT_BR, CHARACTER SET ISO8859_1, PAD SPACE, CASE INSENSITIVE, ACCENT INSENSITIVE, SYSTEM PT_PT, CHARACTER SET ISO8859_1, PAD SPACE, SYSTEM PXW_CSY, CHARACTER SET WIN1250, PAD SPACE, SYSTEM PXW_CYRL, CHARACTER SET WIN1251, PAD SPACE, SYSTEM PXW_GREEK, CHARACTER SET WIN1253, PAD SPACE, SYSTEM PXW_HUN, CHARACTER SET WIN1250, PAD SPACE, SYSTEM PXW_HUNDC, CHARACTER SET WIN1250, PAD SPACE, SYSTEM PXW_INTL, CHARACTER SET WIN1252, PAD SPACE, SYSTEM PXW_INTL850, CHARACTER SET WIN1252, PAD SPACE, SYSTEM PXW_NORDAN4, CHARACTER SET WIN1252, PAD SPACE, SYSTEM PXW_PLK, CHARACTER SET WIN1250, PAD SPACE, SYSTEM PXW_SLOV, CHARACTER SET WIN1250, PAD SPACE, SYSTEM PXW_SPAN, CHARACTER SET WIN1252, PAD SPACE, SYSTEM PXW_SWEDFIN, CHARACTER SET WIN1252, PAD SPACE, SYSTEM PXW_TURK, CHARACTER SET WIN1254, PAD SPACE, SYSTEM SJIS_0208, CHARACTER SET SJIS_0208, PAD SPACE, SYSTEM SV_SV, CHARACTER SET ISO8859_1, PAD SPACE, SYSTEM TIS620, CHARACTER SET TIS620, PAD SPACE, SYSTEM TIS620_UNICODE, CHARACTER SET TIS620, PAD SPACE, 'COLL-VERSION=153.88', SYSTEM UCS_BASIC, CHARACTER SET UTF8, PAD SPACE, SYSTEM UNICODE, CHARACTER SET UTF8, PAD SPACE, 'COLL-VERSION=153.88', SYSTEM UNICODE_CI, CHARACTER SET UTF8, FROM EXTERNAL ('UNICODE'), PAD SPACE, CASE INSENSITIVE, 'COLL-VERSION=153.88', SYSTEM UNICODE_CI_AI, CHARACTER SET UTF8, FROM EXTERNAL ('UNICODE'), PAD SPACE, CASE INSENSITIVE, ACCENT INSENSITIVE, 'COLL-VERSION=153.88', SYSTEM UNICODE_FSS, CHARACTER SET UNICODE_FSS, PAD SPACE, SYSTEM UTF8, CHARACTER SET UTF8, PAD SPACE, SYSTEM WIN1250, CHARACTER SET WIN1250, PAD SPACE, SYSTEM WIN1251, CHARACTER SET WIN1251, PAD SPACE, SYSTEM WIN1251_UA, CHARACTER SET WIN1251, PAD SPACE, SYSTEM WIN1252, CHARACTER SET WIN1252, PAD SPACE, SYSTEM WIN1253, CHARACTER SET WIN1253, PAD SPACE, SYSTEM WIN1254, CHARACTER SET WIN1254, PAD SPACE, SYSTEM WIN1255, CHARACTER SET WIN1255, PAD SPACE, SYSTEM WIN1256, CHARACTER SET WIN1256, PAD SPACE, SYSTEM WIN1257, CHARACTER SET WIN1257, PAD SPACE, SYSTEM WIN1257_EE, CHARACTER SET WIN1257, PAD SPACE, SYSTEM WIN1257_LT, CHARACTER SET WIN1257, PAD SPACE, SYSTEM WIN1257_LV, CHARACTER SET WIN1257, PAD SPACE, SYSTEM WIN1258, CHARACTER SET WIN1258, PAD SPACE, SYSTEM WIN_CZ, CHARACTER SET WIN1250, PAD SPACE, CASE INSENSITIVE, SYSTEM WIN_CZ_CI_AI, CHARACTER SET WIN1250, PAD SPACE, CASE INSENSITIVE, ACCENT INSENSITIVE, SYSTEM WIN_PTBR, CHARACTER SET WIN1252, PAD SPACE, CASE INSENSITIVE, ACCENT INSENSITIVE, SYSTEM """ @pytest.mark.version('>=5.0') def test_3(act_3: Action): act_3.expected_stdout = expected_stdout_3 act_3.execute() assert act_3.clean_stdout == act_3.clean_expected_stdout
46.888889
144
0.736714
4,586
31,650
4.939163
0.058875
0.236811
0.251556
0.059335
0.958103
0.958103
0.958103
0.958103
0.9536
0.9536
0
0.09533
0.194281
31,650
674
145
46.958457
0.79291
0.012227
0
0.892063
0
0.026984
0.957116
0.03882
0
0
0
0
0.004762
1
0.004762
false
0
0.003175
0
0.007937
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
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
10
5cc0980d9f02857fe40684a38ec67b079c58c2a5
5,675
py
Python
tests/test_static.py
metroboomin427/mapbox-cli-py
90faaa5cb44d053ea8982f5526851ed5e3d4626a
[ "MIT" ]
128
2015-11-26T00:05:24.000Z
2022-02-22T09:22:39.000Z
tests/test_static.py
metroboomin427/mapbox-cli-py
90faaa5cb44d053ea8982f5526851ed5e3d4626a
[ "MIT" ]
114
2015-11-10T17:10:24.000Z
2022-03-13T09:30:56.000Z
tests/test_static.py
mapbox/mbx-cli
7bc7d8aadf5f487702aacf72328296641f95f4c5
[ "MIT" ]
36
2015-12-20T19:45:51.000Z
2021-12-31T12:34:12.000Z
from click.testing import CliRunner import responses from mapboxcli.scripts.cli import main_group @responses.activate def test_cli_static(): responses.add( responses.GET, 'https://api.mapbox.com/v4/mapbox.satellite/-61.7,12.1,12/600x600.png256?access_token=bogus', match_querystring=True, body='.PNG...', status=200, content_type='image/png') runner = CliRunner() result = runner.invoke( main_group, ['--access-token', 'bogus', 'staticmap', '--lon', '-61.7', '--lat', '12.1', '--zoom', '12', 'mapbox.satellite', '/dev/null']) assert result.exit_code == 0 @responses.activate def test_cli_static_features_stdin(): responses.add( responses.GET, 'https://api.mapbox.com/v4/mapbox.satellite/geojson(%7B%22features%22%3A%5B%7B%22geometry%22%3A%7B%22coordinates%22%3A%5B-122.7282%2C45.5801%5D%2C%22type%22%3A%22Point%22%7D%2C%22id%22%3A%220%22%2C%22properties%22%3A%7B%7D%2C%22type%22%3A%22Feature%22%7D%2C%7B%22geometry%22%3A%7B%22coordinates%22%3A%5B-121.3153%2C44.0582%5D%2C%22type%22%3A%22Point%22%7D%2C%22id%22%3A%221%22%2C%22properties%22%3A%7B%7D%2C%22type%22%3A%22Feature%22%7D%5D%2C%22type%22%3A%22FeatureCollection%22%7D)/-61.7,12.1,12/600x600.png256?access_token=bogus', match_querystring=True, body='.PNG...', status=200, content_type='image/png') # alternate ordering for py26 responses.add( responses.GET, 'https://api.mapbox.com/v4/mapbox.satellite/geojson(%7B%22features%22%3A%5B%7B%22geometry%22%3A%7B%22coordinates%22%3A%5B-122.7282%2C45.580100000000002%5D%2C%22type%22%3A%22Point%22%7D%2C%22id%22%3A%220%22%2C%22properties%22%3A%7B%7D%2C%22type%22%3A%22Feature%22%7D%2C%7B%22geometry%22%3A%7B%22coordinates%22%3A%5B-121.31529999999999%2C44.058199999999999%5D%2C%22type%22%3A%22Point%22%7D%2C%22id%22%3A%221%22%2C%22properties%22%3A%7B%7D%2C%22type%22%3A%22Feature%22%7D%5D%2C%22type%22%3A%22FeatureCollection%22%7D)/-61.7,12.1,12/600x600.png256?access_token=bogus', match_querystring=True, body='.PNG...', status=200, content_type='image/png') with open('tests/twopoints_seq.geojson', 'r') as src: stdin = src.read() runner = CliRunner() result = runner.invoke( main_group, ['--access-token', 'bogus', 'staticmap', '--features', '-', '--lon', '-61.7', '--lat', '12.1', '--zoom', '12', 'mapbox.satellite', '/dev/null'], input=stdin) assert result.exit_code == 0 def test_cli_bad_size(): with open('tests/twopoints_seq.geojson', 'r') as src: stdin = src.read() runner = CliRunner() result = runner.invoke( main_group, ['--access-token', 'bogus', 'staticmap', '--features', '-', '--size', '2000', '2000', '--zoom', '12', 'mapbox.satellite', '/dev/null'], input=stdin) assert result.exit_code == 2 @responses.activate def test_cli_static_unauthorized(): responses.add( responses.GET, 'https://api.mapbox.com/v4/mapbox.satellite/-61.7,12.1,12/600x600.png256?access_token=INVALID', match_querystring=True, body='{"message":"Not Authorized - Invalid Token"}', status=401, content_type='application/json') runner = CliRunner() result = runner.invoke( main_group, ['--access-token', 'INVALID', 'staticmap', '--lon', '-61.7', '--lat', '12.1', '--zoom', '12', 'mapbox.satellite', '/dev/null']) assert result.exit_code == 1 assert result.output == 'Error: {"message":"Not Authorized - Invalid Token"}\n' @responses.activate def test_cli_static_features_file(): responses.add( responses.GET, 'https://api.mapbox.com/v4/mapbox.satellite/geojson(%7B%22features%22%3A%5B%7B%22geometry%22%3A%7B%22coordinates%22%3A%5B-122.7282%2C45.5801%5D%2C%22type%22%3A%22Point%22%7D%2C%22id%22%3A%220%22%2C%22properties%22%3A%7B%7D%2C%22type%22%3A%22Feature%22%7D%2C%7B%22geometry%22%3A%7B%22coordinates%22%3A%5B-121.3153%2C44.0582%5D%2C%22type%22%3A%22Point%22%7D%2C%22id%22%3A%221%22%2C%22properties%22%3A%7B%7D%2C%22type%22%3A%22Feature%22%7D%5D%2C%22type%22%3A%22FeatureCollection%22%7D)/-61.7,12.1,12/600x600.png256?access_token=bogus', match_querystring=True, body='.PNG...', status=200, content_type='image/png') # alternate ordering for py26 responses.add( responses.GET, 'https://api.mapbox.com/v4/mapbox.satellite/geojson(%7B%22features%22%3A%5B%7B%22geometry%22%3A%7B%22coordinates%22%3A%5B-122.7282%2C45.580100000000002%5D%2C%22type%22%3A%22Point%22%7D%2C%22id%22%3A%220%22%2C%22properties%22%3A%7B%7D%2C%22type%22%3A%22Feature%22%7D%2C%7B%22geometry%22%3A%7B%22coordinates%22%3A%5B-121.31529999999999%2C44.058199999999999%5D%2C%22type%22%3A%22Point%22%7D%2C%22id%22%3A%221%22%2C%22properties%22%3A%7B%7D%2C%22type%22%3A%22Feature%22%7D%5D%2C%22type%22%3A%22FeatureCollection%22%7D)/-61.7,12.1,12/600x600.png256?access_token=bogus', match_querystring=True, body='.PNG...', status=200, content_type='image/png') runner = CliRunner() result = runner.invoke( main_group, ['--access-token', 'bogus', 'staticmap', '--features', 'tests/twopoints_seq.geojson', '--lon', '-61.7', '--lat', '12.1', '--zoom', '12', 'mapbox.satellite', '/dev/null']) assert result.exit_code == 0
38.344595
572
0.634714
814
5,675
4.366093
0.143735
0.063028
0.056275
0.06753
0.927687
0.909398
0.890827
0.867755
0.867755
0.852842
0
0.188106
0.182203
5,675
147
573
38.605442
0.577677
0.009692
0
0.846154
0
0.051282
0.546021
0.014421
0
0
0
0
0.051282
1
0.042735
false
0
0.025641
0
0.068376
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
5cc3b50930b2117ee7256dc4a359047f0c04de80
21,071
py
Python
mysite/patterns/32.py
BioinfoNet/prepub
e19c48cabf8bd22736dcef9308a5e196cfd8119a
[ "MIT" ]
19
2016-06-17T23:36:27.000Z
2020-01-13T16:41:55.000Z
mysite/patterns/32.py
BioinfoNet/prepub
e19c48cabf8bd22736dcef9308a5e196cfd8119a
[ "MIT" ]
13
2016-06-06T12:57:05.000Z
2019-02-05T02:21:00.000Z
patterns/32.py
OmnesRes/GRIMMER
173c99ebdb6a9edb1242d24a791d0c5d778ff643
[ "MIT" ]
7
2017-03-28T18:12:22.000Z
2021-06-16T09:32:59.000Z
pattern_zero=[0.0, 0.0302734375, 0.05859375, 0.0625, 0.0849609375, 0.0927734375, 0.109375, 0.12109375, 0.125, 0.1318359375, 0.1474609375, 0.15234375, 0.1552734375, 0.1708984375, 0.171875, 0.18359375, 0.1875, 0.1943359375, 0.2021484375, 0.2099609375, 0.21484375, 0.2177734375, 0.2255859375, 0.2333984375, 0.234375, 0.2412109375, 0.24609375, 0.2490234375, 0.25, 0.2568359375, 0.2646484375, 0.2724609375, 0.27734375, 0.2802734375, 0.2880859375, 0.2958984375, 0.296875, 0.3037109375, 0.30859375, 0.3115234375, 0.3125, 0.3193359375, 0.3271484375, 0.3349609375, 0.33984375, 0.3427734375, 0.3505859375, 0.3583984375, 0.359375, 0.3662109375, 0.37109375, 0.3740234375, 0.375, 0.3818359375, 0.3896484375, 0.3974609375, 0.40234375, 0.4052734375, 0.4130859375, 0.4208984375, 0.421875, 0.4287109375, 0.43359375, 0.4365234375, 0.4375, 0.4443359375, 0.4521484375, 0.4599609375, 0.46484375, 0.4677734375, 0.4755859375, 0.4833984375, 0.484375, 0.4912109375, 0.49609375, 0.4990234375, 0.5, 0.5068359375, 0.5146484375, 0.5224609375, 0.52734375, 0.5302734375, 0.5380859375, 0.5458984375, 0.546875, 0.5537109375, 0.55859375, 0.5615234375, 0.5625, 0.5693359375, 0.5771484375, 0.5849609375, 0.58984375, 0.5927734375, 0.6005859375, 0.6083984375, 0.609375, 0.6162109375, 0.62109375, 0.6240234375, 0.625, 0.6318359375, 0.6396484375, 0.6474609375, 0.65234375, 0.6552734375, 0.6630859375, 0.6708984375, 0.671875, 0.6787109375, 0.68359375, 0.6865234375, 0.6875, 0.6943359375, 0.7021484375, 0.7099609375, 0.71484375, 0.7177734375, 0.7255859375, 0.7333984375, 0.734375, 0.7412109375, 0.74609375, 0.7490234375, 0.75, 0.7568359375, 0.7646484375, 0.7724609375, 0.77734375, 0.7802734375, 0.7880859375, 0.7958984375, 0.796875, 0.8037109375, 0.80859375, 0.8115234375, 0.8125, 0.8193359375, 0.8271484375, 0.8349609375, 0.83984375, 0.8427734375, 0.8505859375, 0.8583984375, 0.859375, 0.8662109375, 0.87109375, 0.8740234375, 0.875, 0.8818359375, 0.8896484375, 0.8974609375, 0.90234375, 0.9052734375, 0.9130859375, 0.9208984375, 0.921875, 0.9287109375, 0.93359375, 0.9365234375, 0.9375, 0.9443359375, 0.9521484375, 0.9599609375, 0.96484375, 0.9677734375, 0.9755859375, 0.9833984375, 0.984375, 0.9912109375, 0.99609375, 0.9990234375] pattern_odd=[0.0, 0.0068359375, 0.0146484375, 0.0224609375, 0.02734375, 0.0302734375, 0.0380859375, 0.0458984375, 0.046875, 0.0537109375, 0.05859375, 0.0615234375, 0.0625, 0.0693359375, 0.0771484375, 0.0849609375, 0.08984375, 0.0927734375, 0.1005859375, 0.1083984375, 0.109375, 0.1162109375, 0.12109375, 0.1240234375, 0.125, 0.1318359375, 0.1396484375, 0.1474609375, 0.15234375, 0.1552734375, 0.1630859375, 0.1708984375, 0.171875, 0.1787109375, 0.18359375, 0.1865234375, 0.1875, 0.1943359375, 0.2021484375, 0.2099609375, 0.21484375, 0.2177734375, 0.2255859375, 0.2333984375, 0.234375, 0.2412109375, 0.24609375, 0.2490234375, 0.25, 0.2568359375, 0.2646484375, 0.2724609375, 0.27734375, 0.2802734375, 0.2880859375, 0.2958984375, 0.296875, 0.3037109375, 0.30859375, 0.3115234375, 0.3125, 0.3193359375, 0.3271484375, 0.3349609375, 0.33984375, 0.3427734375, 0.3505859375, 0.3583984375, 0.359375, 0.3662109375, 0.37109375, 0.3740234375, 0.375, 0.3818359375, 0.3896484375, 0.3974609375, 0.40234375, 0.4052734375, 0.4130859375, 0.4208984375, 0.421875, 0.4287109375, 0.43359375, 0.4365234375, 0.4375, 0.4443359375, 0.4521484375, 0.4599609375, 0.46484375, 0.4677734375, 0.4755859375, 0.4833984375, 0.484375, 0.4912109375, 0.49609375, 0.4990234375, 0.5, 0.5068359375, 0.5146484375, 0.5224609375, 0.52734375, 0.5302734375, 0.5380859375, 0.5458984375, 0.546875, 0.5537109375, 0.55859375, 0.5615234375, 0.5625, 0.5693359375, 0.5771484375, 0.5849609375, 0.58984375, 0.5927734375, 0.6005859375, 0.6083984375, 0.609375, 0.6162109375, 0.62109375, 0.6240234375, 0.625, 0.6318359375, 0.6396484375, 0.6474609375, 0.65234375, 0.6552734375, 0.6630859375, 0.6708984375, 0.671875, 0.6787109375, 0.68359375, 0.6865234375, 0.6875, 0.6943359375, 0.7021484375, 0.7099609375, 0.71484375, 0.7177734375, 0.7255859375, 0.7333984375, 0.734375, 0.7412109375, 0.74609375, 0.7490234375, 0.75, 0.7568359375, 0.7646484375, 0.7724609375, 0.77734375, 0.7802734375, 0.7880859375, 0.7958984375, 0.796875, 0.8037109375, 0.80859375, 0.8115234375, 0.8125, 0.8193359375, 0.8271484375, 0.8349609375, 0.83984375, 0.8427734375, 0.8505859375, 0.8583984375, 0.859375, 0.8662109375, 0.87109375, 0.8740234375, 0.875, 0.8818359375, 0.8896484375, 0.8974609375, 0.90234375, 0.9052734375, 0.9130859375, 0.9208984375, 0.921875, 0.9287109375, 0.93359375, 0.9365234375, 0.9375, 0.9443359375, 0.9521484375, 0.9599609375, 0.96484375, 0.9677734375, 0.9755859375, 0.9833984375, 0.984375, 0.9912109375, 0.99609375, 0.9990234375] pattern_even=[0.0, 0.0068359375, 0.0146484375, 0.0224609375, 0.02734375, 0.0302734375, 0.0380859375, 0.0458984375, 0.046875, 0.0537109375, 0.05859375, 0.0615234375, 0.0625, 0.0693359375, 0.0771484375, 0.0849609375, 0.08984375, 0.0927734375, 0.1005859375, 0.1083984375, 0.109375, 0.1162109375, 0.12109375, 0.1240234375, 0.125, 0.1318359375, 0.1396484375, 0.1474609375, 0.15234375, 0.1552734375, 0.1630859375, 0.1708984375, 0.171875, 0.1787109375, 0.18359375, 0.1865234375, 0.1875, 0.1943359375, 0.2021484375, 0.2099609375, 0.21484375, 0.2177734375, 0.2255859375, 0.2333984375, 0.234375, 0.2412109375, 0.24609375, 0.2490234375, 0.25, 0.2568359375, 0.2646484375, 0.2724609375, 0.27734375, 0.2802734375, 0.2880859375, 0.2958984375, 0.296875, 0.3037109375, 0.30859375, 0.3115234375, 0.3125, 0.3193359375, 0.3271484375, 0.3349609375, 0.33984375, 0.3427734375, 0.3505859375, 0.3583984375, 0.359375, 0.3662109375, 0.37109375, 0.3740234375, 0.375, 0.3818359375, 0.3896484375, 0.3974609375, 0.40234375, 0.4052734375, 0.4130859375, 0.4208984375, 0.421875, 0.4287109375, 0.43359375, 0.4365234375, 0.4375, 0.4443359375, 0.4521484375, 0.4599609375, 0.46484375, 0.4677734375, 0.4755859375, 0.4833984375, 0.484375, 0.4912109375, 0.49609375, 0.4990234375, 0.5, 0.5068359375, 0.5146484375, 0.5224609375, 0.52734375, 0.5302734375, 0.5380859375, 0.5458984375, 0.546875, 0.5537109375, 0.55859375, 0.5615234375, 0.5625, 0.5693359375, 0.5771484375, 0.5849609375, 0.58984375, 0.5927734375, 0.6005859375, 0.6083984375, 0.609375, 0.6162109375, 0.62109375, 0.6240234375, 0.625, 0.6318359375, 0.6396484375, 0.6474609375, 0.65234375, 0.6552734375, 0.6630859375, 0.6708984375, 0.671875, 0.6787109375, 0.68359375, 0.6865234375, 0.6875, 0.6943359375, 0.7021484375, 0.7099609375, 0.71484375, 0.7177734375, 0.7255859375, 0.7333984375, 0.734375, 0.7412109375, 0.74609375, 0.7490234375, 0.75, 0.7568359375, 0.7646484375, 0.7724609375, 0.77734375, 0.7802734375, 0.7880859375, 0.7958984375, 0.796875, 0.8037109375, 0.80859375, 0.8115234375, 0.8125, 0.8193359375, 0.8271484375, 0.8349609375, 0.83984375, 0.8427734375, 0.8505859375, 0.8583984375, 0.859375, 0.8662109375, 0.87109375, 0.8740234375, 0.875, 0.8818359375, 0.8896484375, 0.8974609375, 0.90234375, 0.9052734375, 0.9130859375, 0.9208984375, 0.921875, 0.9287109375, 0.93359375, 0.9365234375, 0.9375, 0.9443359375, 0.9521484375, 0.9599609375, 0.96484375, 0.9677734375, 0.9755859375, 0.9833984375, 0.984375, 0.9912109375, 0.99609375, 0.9990234375] averages_even={0.0: [0.75, 0.0, 0.25, 0.5], 0.0068359375: [0.84375, 0.15625], 0.4130859375: [0.34375, 0.65625], 0.1318359375: [0.84375, 0.15625], 0.74609375: [0.4375, 0.5625, 0.9375, 0.0625], 0.3974609375: [0.90625, 0.09375], 0.5224609375: [0.90625, 0.09375], 0.4599609375: [0.90625, 0.09375], 0.5302734375: [0.96875, 0.03125], 0.0693359375: [0.84375, 0.15625], 0.83984375: [0.6875, 0.8125, 0.1875, 0.3125], 0.9208984375: [0.78125, 0.21875], 0.0458984375: [0.78125, 0.21875], 0.7724609375: [0.90625, 0.09375], 0.5380859375: [0.34375, 0.65625], 0.5: [0.25, 0.75, 0.0, 0.5], 0.2958984375: [0.78125, 0.21875], 0.4365234375: [0.46875, 0.53125], 0.5458984375: [0.78125, 0.21875], 0.8740234375: [0.46875, 0.53125], 0.25: [0.75, 0.0, 0.25, 0.5], 0.2880859375: [0.34375, 0.65625], 0.1396484375: [0.28125, 0.71875], 0.5537109375: [0.40625, 0.59375], 0.5771484375: [0.28125, 0.71875], 0.171875: [0.625, 0.875, 0.125, 0.375], 0.4287109375: [0.40625, 0.59375], 0.77734375: [0.6875, 0.8125, 0.1875, 0.3125], 0.9755859375: [0.65625, 0.34375], 0.5615234375: [0.46875, 0.53125], 0.8271484375: [0.71875, 0.28125], 0.02734375: [0.6875, 0.8125, 0.1875, 0.3125], 0.27734375: [0.6875, 0.8125, 0.1875, 0.3125], 0.0615234375: [0.53125, 0.46875], 0.8115234375: [0.46875, 0.53125], 0.1630859375: [0.34375, 0.65625], 0.5693359375: [0.84375, 0.15625], 0.5068359375: [0.84375, 0.15625], 0.921875: [0.375, 0.625, 0.875, 0.125], 0.2333984375: [0.78125, 0.21875], 0.21484375: [0.6875, 0.8125, 0.1875, 0.3125], 0.3115234375: [0.46875, 0.53125], 0.875: [0.5, 0.75, 0.0, 0.25], 0.7802734375: [0.96875, 0.03125], 0.625: [0.5, 0.75, 0.0, 0.25], 0.43359375: [0.9375, 0.0625, 0.4375, 0.5625], 0.671875: [0.375, 0.625, 0.875, 0.125], 0.1005859375: [0.65625, 0.34375], 0.2099609375: [0.90625, 0.09375], 0.5849609375: [0.90625, 0.09375], 0.8818359375: [0.84375, 0.15625], 0.484375: [0.875, 0.125, 0.375, 0.625], 0.3193359375: [0.84375, 0.15625], 0.55859375: [0.4375, 0.5625, 0.9375, 0.0625], 0.5927734375: [0.96875, 0.03125], 0.0771484375: [0.71875, 0.28125], 0.4912109375: [0.40625, 0.59375], 0.90234375: [0.6875, 0.8125, 0.1875, 0.3125], 0.9833984375: [0.78125, 0.21875], 0.9912109375: [0.40625, 0.59375], 0.6005859375: [0.34375, 0.65625], 0.546875: [0.375, 0.625, 0.875, 0.125], 0.109375: [0.625, 0.875, 0.125, 0.375], 0.18359375: [0.4375, 0.5625, 0.9375, 0.0625], 0.3271484375: [0.28125, 0.71875], 0.296875: [0.625, 0.875, 0.125, 0.375], 0.3125: [0.0, 0.25, 0.5, 0.75], 0.9365234375: [0.46875, 0.53125], 0.1240234375: [0.46875, 0.53125], 0.2177734375: [0.96875, 0.03125], 0.6162109375: [0.40625, 0.59375], 0.99609375: [0.4375, 0.5625, 0.9375, 0.0625], 0.125: [0.75, 0.0, 0.25, 0.5], 0.3349609375: [0.90625, 0.09375], 0.58984375: [0.3125, 0.6875, 0.8125, 0.1875], 0.4443359375: [0.84375, 0.15625], 0.8037109375: [0.40625, 0.59375], 0.6240234375: [0.46875, 0.53125], 0.80859375: [0.4375, 0.5625, 0.9375, 0.0625], 0.8896484375: [0.71875, 0.28125], 0.8662109375: [0.59375, 0.40625], 0.30859375: [0.0625, 0.4375, 0.5625, 0.9375], 0.6318359375: [0.84375, 0.15625], 0.0380859375: [0.65625, 0.34375], 0.984375: [0.625, 0.875, 0.125, 0.375], 0.2490234375: [0.46875, 0.53125], 0.3427734375: [0.96875, 0.03125], 0.4208984375: [0.78125, 0.21875], 0.4375: [0.0, 0.25, 0.5, 0.75], 0.6396484375: [0.71875, 0.28125], 0.734375: [0.375, 0.625, 0.875, 0.125], 0.6875: [0.5, 0.75, 0.0, 0.25], 0.46484375: [0.8125, 0.1875, 0.3125, 0.6875], 0.1083984375: [0.21875, 0.78125], 0.2255859375: [0.34375, 0.65625], 0.6474609375: [0.90625, 0.09375], 0.9375: [0.5, 0.75, 0.0, 0.25], 0.08984375: [0.6875, 0.8125, 0.1875, 0.3125], 0.3505859375: [0.34375, 0.65625], 0.9443359375: [0.84375, 0.15625], 0.62109375: [0.4375, 0.5625, 0.9375, 0.0625], 0.7958984375: [0.78125, 0.21875], 0.6552734375: [0.96875, 0.03125], 0.1162109375: [0.59375, 0.40625], 0.4521484375: [0.71875, 0.28125], 0.8349609375: [0.90625, 0.09375], 0.96484375: [0.6875, 0.8125, 0.1875, 0.3125], 0.6630859375: [0.34375, 0.65625], 0.8974609375: [0.90625, 0.09375], 0.3583984375: [0.78125, 0.21875], 0.6708984375: [0.78125, 0.21875], 0.4990234375: [0.46875, 0.53125], 0.8427734375: [0.96875, 0.03125], 0.9990234375: [0.46875, 0.53125], 0.1708984375: [0.78125, 0.21875], 0.6787109375: [0.40625, 0.59375], 0.8505859375: [0.65625, 0.34375], 0.3662109375: [0.40625, 0.59375], 0.65234375: [0.6875, 0.8125, 0.1875, 0.3125], 0.6865234375: [0.46875, 0.53125], 0.4755859375: [0.34375, 0.65625], 0.87109375: [0.4375, 0.5625, 0.9375, 0.0625], 0.9521484375: [0.71875, 0.28125], 0.2021484375: [0.28125, 0.71875], 0.33984375: [0.6875, 0.8125, 0.1875, 0.3125], 0.0537109375: [0.59375, 0.40625], 0.4677734375: [0.96875, 0.03125], 0.234375: [0.625, 0.875, 0.125, 0.375], 0.6943359375: [0.84375, 0.15625], 0.12109375: [0.5625, 0.9375, 0.0625, 0.4375], 0.0146484375: [0.71875, 0.28125], 0.3740234375: [0.46875, 0.53125], 0.24609375: [0.5625, 0.9375, 0.0625, 0.4375], 0.7021484375: [0.71875, 0.28125], 0.796875: [0.375, 0.625, 0.875, 0.125], 0.9052734375: [0.96875, 0.03125], 0.75: [0.5, 0.75, 0.0, 0.25], 0.49609375: [0.9375, 0.0625, 0.4375, 0.5625], 0.3037109375: [0.40625, 0.59375], 0.0302734375: [0.96875, 0.03125], 0.421875: [0.875, 0.125, 0.375, 0.625], 0.1787109375: [0.40625, 0.59375], 0.3896484375: [0.71875, 0.28125], 0.6083984375: [0.78125, 0.21875], 0.0224609375: [0.90625, 0.09375], 0.3818359375: [0.84375, 0.15625], 0.68359375: [0.4375, 0.5625, 0.9375, 0.0625], 0.7177734375: [0.96875, 0.03125], 0.0927734375: [0.96875, 0.03125], 0.8583984375: [0.78125, 0.21875], 0.2802734375: [0.96875, 0.03125], 0.7099609375: [0.90625, 0.09375], 0.7255859375: [0.34375, 0.65625], 0.52734375: [0.3125, 0.6875, 0.8125, 0.1875], 0.0625: [0.75, 0.0, 0.25, 0.5], 0.046875: [0.625, 0.875, 0.125, 0.375], 0.2412109375: [0.40625, 0.59375], 0.15234375: [0.6875, 0.8125, 0.1875, 0.3125], 0.2646484375: [0.71875, 0.28125], 0.7880859375: [0.65625, 0.34375], 0.9599609375: [0.90625, 0.09375], 0.359375: [0.125, 0.375, 0.625, 0.875], 0.7333984375: [0.78125, 0.21875], 0.1865234375: [0.46875, 0.53125], 0.7412109375: [0.40625, 0.59375], 0.0849609375: [0.90625, 0.09375], 0.9130859375: [0.34375, 0.65625], 0.2724609375: [0.90625, 0.09375], 0.71484375: [0.3125, 0.6875, 0.8125, 0.1875], 0.7646484375: [0.71875, 0.28125], 0.609375: [0.375, 0.625, 0.875, 0.125], 0.1552734375: [0.96875, 0.03125], 0.7490234375: [0.46875, 0.53125], 0.93359375: [0.4375, 0.5625, 0.9375, 0.0625], 0.37109375: [0.9375, 0.0625, 0.4375, 0.5625], 0.859375: [0.625, 0.875, 0.125, 0.375], 0.7568359375: [0.84375, 0.15625], 0.1474609375: [0.90625, 0.09375], 0.4052734375: [0.96875, 0.03125], 0.1875: [0.25, 0.5, 0.75, 0.0], 0.5625: [0.5, 0.75, 0.0, 0.25], 0.375: [0.0, 0.25, 0.5, 0.75], 0.5146484375: [0.28125, 0.71875], 0.4833984375: [0.21875, 0.78125], 0.9287109375: [0.40625, 0.59375], 0.9677734375: [0.96875, 0.03125], 0.8125: [0.5, 0.75, 0.0, 0.25], 0.05859375: [0.5625, 0.9375, 0.0625, 0.4375], 0.1943359375: [0.84375, 0.15625], 0.40234375: [0.6875, 0.8125, 0.1875, 0.3125], 0.8193359375: [0.84375, 0.15625], 0.2568359375: [0.84375, 0.15625]} averages_odd={0.0: [0.75, 0.0, 0.25, 0.5], 0.0068359375: [0.84375, 0.15625], 0.4130859375: [0.34375, 0.65625], 0.1318359375: [0.84375, 0.15625], 0.74609375: [0.4375, 0.5625, 0.9375, 0.0625], 0.3974609375: [0.90625, 0.09375], 0.5224609375: [0.90625, 0.09375], 0.4599609375: [0.90625, 0.09375], 0.5302734375: [0.96875, 0.03125], 0.0693359375: [0.84375, 0.15625], 0.83984375: [0.6875, 0.8125, 0.1875, 0.3125], 0.9208984375: [0.78125, 0.21875], 0.0458984375: [0.78125, 0.21875], 0.7724609375: [0.90625, 0.09375], 0.5380859375: [0.34375, 0.65625], 0.5: [0.25, 0.75, 0.0, 0.5], 0.2958984375: [0.78125, 0.21875], 0.4365234375: [0.46875, 0.53125], 0.5458984375: [0.78125, 0.21875], 0.8740234375: [0.46875, 0.53125], 0.25: [0.75, 0.0, 0.25, 0.5], 0.2880859375: [0.34375, 0.65625], 0.1396484375: [0.28125, 0.71875], 0.5537109375: [0.40625, 0.59375], 0.5771484375: [0.28125, 0.71875], 0.171875: [0.625, 0.875, 0.125, 0.375], 0.4287109375: [0.40625, 0.59375], 0.77734375: [0.6875, 0.8125, 0.1875, 0.3125], 0.9755859375: [0.65625, 0.34375], 0.5615234375: [0.46875, 0.53125], 0.8271484375: [0.71875, 0.28125], 0.02734375: [0.6875, 0.8125, 0.1875, 0.3125], 0.27734375: [0.6875, 0.8125, 0.1875, 0.3125], 0.0615234375: [0.53125, 0.46875], 0.8115234375: [0.46875, 0.53125], 0.1630859375: [0.34375, 0.65625], 0.5693359375: [0.84375, 0.15625], 0.5068359375: [0.84375, 0.15625], 0.921875: [0.375, 0.625, 0.875, 0.125], 0.2333984375: [0.78125, 0.21875], 0.21484375: [0.6875, 0.8125, 0.1875, 0.3125], 0.3115234375: [0.46875, 0.53125], 0.875: [0.5, 0.75, 0.0, 0.25], 0.7802734375: [0.96875, 0.03125], 0.625: [0.5, 0.75, 0.0, 0.25], 0.43359375: [0.9375, 0.0625, 0.4375, 0.5625], 0.671875: [0.375, 0.625, 0.875, 0.125], 0.1005859375: [0.65625, 0.34375], 0.2099609375: [0.90625, 0.09375], 0.5849609375: [0.90625, 0.09375], 0.8818359375: [0.84375, 0.15625], 0.484375: [0.875, 0.125, 0.375, 0.625], 0.3193359375: [0.84375, 0.15625], 0.55859375: [0.4375, 0.5625, 0.9375, 0.0625], 0.5927734375: [0.96875, 0.03125], 0.0771484375: [0.71875, 0.28125], 0.4912109375: [0.40625, 0.59375], 0.90234375: [0.6875, 0.8125, 0.1875, 0.3125], 0.9833984375: [0.78125, 0.21875], 0.9912109375: [0.40625, 0.59375], 0.6005859375: [0.34375, 0.65625], 0.546875: [0.375, 0.625, 0.875, 0.125], 0.109375: [0.625, 0.875, 0.125, 0.375], 0.18359375: [0.4375, 0.5625, 0.9375, 0.0625], 0.3271484375: [0.28125, 0.71875], 0.296875: [0.625, 0.875, 0.125, 0.375], 0.3125: [0.0, 0.25, 0.5, 0.75], 0.9365234375: [0.46875, 0.53125], 0.1240234375: [0.46875, 0.53125], 0.2177734375: [0.96875, 0.03125], 0.6162109375: [0.40625, 0.59375], 0.99609375: [0.4375, 0.5625, 0.9375, 0.0625], 0.125: [0.75, 0.0, 0.25, 0.5], 0.3349609375: [0.90625, 0.09375], 0.58984375: [0.3125, 0.6875, 0.8125, 0.1875], 0.4443359375: [0.84375, 0.15625], 0.8037109375: [0.40625, 0.59375], 0.6240234375: [0.46875, 0.53125], 0.80859375: [0.4375, 0.5625, 0.9375, 0.0625], 0.8896484375: [0.71875, 0.28125], 0.8662109375: [0.59375, 0.40625], 0.30859375: [0.0625, 0.4375, 0.5625, 0.9375], 0.6318359375: [0.84375, 0.15625], 0.0380859375: [0.65625, 0.34375], 0.984375: [0.625, 0.875, 0.125, 0.375], 0.2490234375: [0.46875, 0.53125], 0.3427734375: [0.96875, 0.03125], 0.4208984375: [0.78125, 0.21875], 0.4375: [0.0, 0.25, 0.5, 0.75], 0.6396484375: [0.71875, 0.28125], 0.734375: [0.375, 0.625, 0.875, 0.125], 0.6875: [0.5, 0.75, 0.0, 0.25], 0.46484375: [0.8125, 0.1875, 0.3125, 0.6875], 0.1083984375: [0.21875, 0.78125], 0.2255859375: [0.34375, 0.65625], 0.6474609375: [0.90625, 0.09375], 0.9375: [0.5, 0.75, 0.0, 0.25], 0.08984375: [0.6875, 0.8125, 0.1875, 0.3125], 0.3505859375: [0.34375, 0.65625], 0.9443359375: [0.84375, 0.15625], 0.62109375: [0.4375, 0.5625, 0.9375, 0.0625], 0.7958984375: [0.78125, 0.21875], 0.6552734375: [0.96875, 0.03125], 0.1162109375: [0.59375, 0.40625], 0.4521484375: [0.71875, 0.28125], 0.8349609375: [0.90625, 0.09375], 0.96484375: [0.6875, 0.8125, 0.1875, 0.3125], 0.6630859375: [0.34375, 0.65625], 0.8974609375: [0.90625, 0.09375], 0.3583984375: [0.78125, 0.21875], 0.6708984375: [0.78125, 0.21875], 0.4990234375: [0.46875, 0.53125], 0.8427734375: [0.96875, 0.03125], 0.9990234375: [0.46875, 0.53125], 0.1708984375: [0.78125, 0.21875], 0.6787109375: [0.40625, 0.59375], 0.8505859375: [0.65625, 0.34375], 0.3662109375: [0.40625, 0.59375], 0.65234375: [0.6875, 0.8125, 0.1875, 0.3125], 0.6865234375: [0.46875, 0.53125], 0.4755859375: [0.34375, 0.65625], 0.87109375: [0.4375, 0.5625, 0.9375, 0.0625], 0.9521484375: [0.71875, 0.28125], 0.2021484375: [0.28125, 0.71875], 0.33984375: [0.6875, 0.8125, 0.1875, 0.3125], 0.0537109375: [0.59375, 0.40625], 0.4677734375: [0.96875, 0.03125], 0.234375: [0.625, 0.875, 0.125, 0.375], 0.6943359375: [0.84375, 0.15625], 0.12109375: [0.5625, 0.9375, 0.0625, 0.4375], 0.0146484375: [0.71875, 0.28125], 0.3740234375: [0.46875, 0.53125], 0.24609375: [0.5625, 0.9375, 0.0625, 0.4375], 0.7021484375: [0.71875, 0.28125], 0.796875: [0.375, 0.625, 0.875, 0.125], 0.9052734375: [0.96875, 0.03125], 0.75: [0.5, 0.75, 0.0, 0.25], 0.49609375: [0.9375, 0.0625, 0.4375, 0.5625], 0.3037109375: [0.40625, 0.59375], 0.0302734375: [0.96875, 0.03125], 0.421875: [0.875, 0.125, 0.375, 0.625], 0.1787109375: [0.40625, 0.59375], 0.3896484375: [0.71875, 0.28125], 0.6083984375: [0.78125, 0.21875], 0.0224609375: [0.90625, 0.09375], 0.3818359375: [0.84375, 0.15625], 0.68359375: [0.4375, 0.5625, 0.9375, 0.0625], 0.7177734375: [0.96875, 0.03125], 0.0927734375: [0.96875, 0.03125], 0.8583984375: [0.78125, 0.21875], 0.2802734375: [0.96875, 0.03125], 0.7099609375: [0.90625, 0.09375], 0.7255859375: [0.34375, 0.65625], 0.52734375: [0.3125, 0.6875, 0.8125, 0.1875], 0.0625: [0.75, 0.0, 0.25, 0.5], 0.046875: [0.625, 0.875, 0.125, 0.375], 0.2412109375: [0.40625, 0.59375], 0.15234375: [0.6875, 0.8125, 0.1875, 0.3125], 0.2646484375: [0.71875, 0.28125], 0.7880859375: [0.65625, 0.34375], 0.9599609375: [0.90625, 0.09375], 0.359375: [0.125, 0.375, 0.625, 0.875], 0.7333984375: [0.78125, 0.21875], 0.1865234375: [0.46875, 0.53125], 0.7412109375: [0.40625, 0.59375], 0.0849609375: [0.90625, 0.09375], 0.9130859375: [0.34375, 0.65625], 0.2724609375: [0.90625, 0.09375], 0.71484375: [0.3125, 0.6875, 0.8125, 0.1875], 0.7646484375: [0.71875, 0.28125], 0.609375: [0.375, 0.625, 0.875, 0.125], 0.1552734375: [0.96875, 0.03125], 0.7490234375: [0.46875, 0.53125], 0.93359375: [0.4375, 0.5625, 0.9375, 0.0625], 0.37109375: [0.9375, 0.0625, 0.4375, 0.5625], 0.859375: [0.625, 0.875, 0.125, 0.375], 0.7568359375: [0.84375, 0.15625], 0.1474609375: [0.90625, 0.09375], 0.4052734375: [0.96875, 0.03125], 0.1875: [0.25, 0.5, 0.75, 0.0], 0.5625: [0.5, 0.75, 0.0, 0.25], 0.375: [0.0, 0.25, 0.5, 0.75], 0.5146484375: [0.28125, 0.71875], 0.4833984375: [0.21875, 0.78125], 0.9287109375: [0.40625, 0.59375], 0.9677734375: [0.96875, 0.03125], 0.8125: [0.5, 0.75, 0.0, 0.25], 0.05859375: [0.5625, 0.9375, 0.0625, 0.4375], 0.1943359375: [0.84375, 0.15625], 0.40234375: [0.6875, 0.8125, 0.1875, 0.3125], 0.8193359375: [0.84375, 0.15625], 0.2568359375: [0.84375, 0.15625]}
4,214.2
6,976
0.683499
3,938
21,071
3.655917
0.054088
0.01028
0.00771
0.026672
0.992082
0.98979
0.98979
0.987567
0.987567
0.987567
0
0.750576
0.093161
21,071
5
6,977
4,214.2
0.002878
0
0
0
0
0
0
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
0
0
1
1
1
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
11
7a31e8154ca60431964d8ba0eecbfe12a887b129
1,232
py
Python
CONTOH_CONTOH/aoc2021/hari6.ms.py
jiaminglimjm/JawiPython
affbb34c7876498a7cc3eef2ef87d59f7cccd8b1
[ "0BSD" ]
null
null
null
CONTOH_CONTOH/aoc2021/hari6.ms.py
jiaminglimjm/JawiPython
affbb34c7876498a7cc3eef2ef87d59f7cccd8b1
[ "0BSD" ]
null
null
null
CONTOH_CONTOH/aoc2021/hari6.ms.py
jiaminglimjm/JawiPython
affbb34c7876498a7cc3eef2ef87d59f7cccd8b1
[ "0BSD" ]
null
null
null
اينڤوت = [1,2,1,1,1,1,1,1,2,1,3,1,1,1,1,3,1,1,1,5,1,1,1,4,5,1,1,1,3,4,1,1,1,1,1,1,1,5,1, 4,1,1,1,1,1,1,1,5,1,3,1,3,1,1,1,5,1,1,1,1,1,5,4,1,2,4,4,1, 1,1,1,1,5,1,1,1,1,1,5,4,3,1,1,1,1,1,1,1,5,1,3,1,4,1,1,3,1, 1,1,1,1,1,2,1,4,1,3,1,1,1,1,1,5,1,1,1,2,1,1,1,1,2,1,1,1,1, 4,1,3,1,1,1,1,1,1,1,1,5,1,1,4,1,1,1,1,1,3,1,3,3,1,1,1,2,1, 1,1,1,1,1,1,1,1,5,1,1,1,1,5,1,1,1,1,2,1,1,1,4,1,1,1,2,3,1, 1,1,1,1,1,1,1,2,1,1,1,2,3,1,2,1,1,5,4,1,1,2,1,1,1,3,1,4,1, 1,1,1,3,1,2,5,1,1,1,5,1,1,1,1,1,4,1,1,4,1,1,1,2,2,2,2,4,3, 1,1,3,1,1,1,1,1,1,2,2,1,1,4,2,1,4,1,1,1,1,1,5,1,1,4,2,1,1, 2,5,4,2,1,1,1,1,4,2,3,5,2,1,5,1,3,1,1,5,1,1,4,5,1,1,1,1,4 ] #اينڤوت = [3,4,3,1,2] ''' اونتوق شي دالم اينڤوت: چيتق(شي ,end=' ') ''' ''' اونتوق _ دالم جولت(80): چيتق(_ ,len(اينڤوت)) اونتوق ي ,ن دالم مڠڠکاکن(اينڤوت): جک ن == 0: اينڤوت[ي] = 7 اينڤوت.append(9) اينڤوت[ي] -= 1 چيتق(len(اينڤوت)) ''' ڤڠيرا = {شي :اينڤوت.count(شي) اونتوق شي دالم جولت(0 ,9)} اونتوق _ دالم جولت(256): چيتق(_ ,(ڤڠيرا)) کوسوڠ = ڤڠيرا[0] اونتوق شي دالم جولت(0 ,8): ڤڠيرا[شي] = ڤڠيرا[شي+1] ڤڠيرا[6] += کوسوڠ ڤڠيرا[8] = کوسوڠ چيتق(ڤڠيرا,تمبه(ڤڠيرا.values())) # 390923 # 1749945484935 #
20.196721
618
0.504058
386
1,232
1.598446
0.082902
0.460292
0.461912
0.382496
0.508914
0.423015
0.366288
0.317666
0.264182
0.163695
0
0.331712
0.165584
1,232
60
619
20.533333
0.268482
0.033279
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
0
0
0
1
null
1
1
1
0
0
0
0
0
0
0
1
0
0
0
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
7a388c6ba0d621a30a13bf50d7631ba3944278bb
3,679
py
Python
First Project/Exercise1/iterations_comparison.py
TasosOperatingInBinary/Numerical-Analysis-Projects
61a8014f2b853a646145cea5a4d3655e100be854
[ "MIT" ]
null
null
null
First Project/Exercise1/iterations_comparison.py
TasosOperatingInBinary/Numerical-Analysis-Projects
61a8014f2b853a646145cea5a4d3655e100be854
[ "MIT" ]
null
null
null
First Project/Exercise1/iterations_comparison.py
TasosOperatingInBinary/Numerical-Analysis-Projects
61a8014f2b853a646145cea5a4d3655e100be854
[ "MIT" ]
null
null
null
import numpy as np from Exercise1.bisection import bisection from Exercise1.newton_raphson import newton_raphson from Exercise1.secant import secant """ This file is used for comparison between the three method Bisection,Newton-Raphson and secant for finding roots of a function. """ def find_x0(a, b, g, g_second_der): for i in np.arange(a, b, 0.01): if g(i) * g_second_der(i) > 0: return i print("could not find x0") return (a + b) / 2 def bisection_iterations(g): iterations_per_interval = [] root_per_interval = [] num_of_calls = 0 for i in np.arange(1.5, 3.5, 0.008): # for first root -> np.arange(-2.0, -0.1, 0.008): # for third root -> np.arange(0.1, 2.0, 0.008) # for second root -> np.arange(-1.0, 1.0, 0.008) if num_of_calls >= 10000: break for j in np.arange(3.5, i, -0.008): # for first root -> np.arange(-0.1, i, -0.008) # for third root -> np.arange(2.0, i, -0.008) # for second root -> np.arange(1.0, i, -0.008) if num_of_calls >= 10000: break # return root_per_interval, iterations_per_interval, num_of_calls if g(i) * g(j) < 0: current_root, current_iterations = bisection(g, i, j) num_of_calls = num_of_calls + 1 root_per_interval.append(current_root) iterations_per_interval.append(current_iterations) while np.nan in root_per_interval: root_per_interval.remove(np.nan) while -1 in iterations_per_interval: iterations_per_interval.remove(-1) return root_per_interval, iterations_per_interval, num_of_calls def newton_iterations(g, gprime, g_second_der): iterations_per_interval = [] root_per_interval = [] num_of_calls = 0 for i in np.arange(1.251, 2, 0.003): # for first root -> np.arange(-2.0, -0.9684, 0.003) if num_of_calls >= 10000: break for j in np.arange(2, i, -0.003): # for first root -> np.arange(-0.9684, i, -0.003) if num_of_calls >= 10000: break # return root_per_interval, iterations_per_interval, num_of_calls if g(i) * g(j) < 0: current_root, current_iterations = newton_raphson(g, gprime, find_x0(i, j, g, g_second_der)) num_of_calls += 1 root_per_interval.append(current_root) iterations_per_interval.append(current_iterations) while np.nan in root_per_interval: root_per_interval.remove(np.nan) while -1 in iterations_per_interval: iterations_per_interval.remove(-1) return root_per_interval, iterations_per_interval, num_of_calls def secant_iterations(g): iterations_per_interval = [] root_per_interval = [] num_of_calls = 0 for i in np.arange(1.251, 2, 0.003): # for first root -> np.arange(-2.0, -0.9684, 0.003) if num_of_calls >= 10000: break for j in np.arange(2, i, -0.003): # for first root -> np.arange(-0.9684, i, -0.003) if num_of_calls >= 10000: break # return root_per_interval, iterations_per_interval, num_of_calls if g(i) * g(j) < 0: current_root, current_iterations = secant(g, i, j) num_of_calls += 1 root_per_interval.append(current_root) iterations_per_interval.append(current_iterations) while np.nan in root_per_interval: root_per_interval.remove(np.nan) while -1 in iterations_per_interval: iterations_per_interval.remove(-1) return root_per_interval, iterations_per_interval, num_of_calls
40.877778
115
0.62816
558
3,679
3.894265
0.121864
0.182237
0.087437
0.066268
0.802117
0.793373
0.78555
0.750575
0.736309
0.711459
0
0.06689
0.268551
3,679
89
116
41.337079
0.740617
0.179668
0
0.703125
0
0
0.00594
0
0
0
0
0
0
1
0.0625
false
0
0.0625
0
0.203125
0.015625
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
8ff31361a8347e3a8656c38624d3e17587bef4c2
2,432
py
Python
tests/test_url_utils.py
samuelkhtu/aws_chalice_template
9ce7a5bf434ceadc221fb13a59454bbedc8cc709
[ "Apache-2.0" ]
2
2021-03-20T20:19:17.000Z
2021-11-18T03:44:50.000Z
tests/test_url_utils.py
samuelkhtu/aws_chalice_template
9ce7a5bf434ceadc221fb13a59454bbedc8cc709
[ "Apache-2.0" ]
1
2021-06-28T08:35:58.000Z
2021-06-28T08:40:16.000Z
tests/test_url_utils.py
samuelkhtu/aws_chalice_template
9ce7a5bf434ceadc221fb13a59454bbedc8cc709
[ "Apache-2.0" ]
null
null
null
from chalice.app import Request from chalicelib.utils.url_utils import build_api_endpoint from urllib import parse MOCK_STAGE = "test" MOCK_DOMAIN = "fake_domain" MOCK_API_ID = "fake_api_id" def test_url_build(): mock_rq = Request( { "multiValueQueryStringParameters": None, "headers": {"a": "b", "c": "d"}, "pathParameters": None, "body": None, "stageVariables": None, "requestContext": { "resourcePath": None, "httpMethod": None, "stage": MOCK_STAGE, "domainName": MOCK_DOMAIN, "apiId": MOCK_API_ID, }, } ) request_dict = mock_rq.to_dict() # print(request_dict.keys()) context = request_dict["context"] # print(context) stage = context["stage"] assert stage == MOCK_STAGE # print(stage) api_domain = context["domainName"] # print(api_domain) assert api_domain == MOCK_DOMAIN api_id = context["apiId"] # print(api_id) assert api_id == MOCK_API_ID # build url url = build_api_endpoint(mock_rq, "/") # Is the url valid? result = parse.urlparse(url) # print(result) assert result is not None def test_url_build_with_param(): mock_rq = Request( { "multiValueQueryStringParameters": None, "headers": {"a": "b", "c": "d"}, "pathParameters": None, "body": None, "stageVariables": None, "requestContext": { "resourcePath": None, "httpMethod": None, "stage": MOCK_STAGE, "domainName": MOCK_DOMAIN, "apiId": MOCK_API_ID, }, } ) request_dict = mock_rq.to_dict() # print(request_dict.keys()) context = request_dict["context"] # print(context) stage = context["stage"] assert stage == MOCK_STAGE # print(stage) api_domain = context["domainName"] # print(api_domain) assert api_domain == MOCK_DOMAIN api_id = context["apiId"] # print(api_id) assert api_id == MOCK_API_ID # build url url = build_api_endpoint(mock_rq, "/", {"q1": "v1", "q2": "v2"}) # Is the url valid? result = parse.urlparse(url) # print(f"{result.scheme}//{result.netloc}{result.path}{result.query}{result.params}") assert result is not None
28.27907
90
0.566201
263
2,432
5
0.228137
0.045627
0.034221
0.022814
0.803042
0.771103
0.771103
0.771103
0.771103
0.710266
0
0.002372
0.306743
2,432
85
91
28.611765
0.77758
0.134868
0
0.709677
0
0
0.167705
0.029708
0
0
0
0
0.129032
1
0.032258
false
0
0.048387
0
0.080645
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
64e45fc55aacece0c9b05f99b8628487b99747a2
3,234
py
Python
src/fdk_organization_bff/sparql/dataset_queries.py
Informasjonsforvaltning/organization-page-bffe
473dc9606649f864618f4f8bfc4a6a2a035f06d7
[ "Apache-2.0" ]
null
null
null
src/fdk_organization_bff/sparql/dataset_queries.py
Informasjonsforvaltning/organization-page-bffe
473dc9606649f864618f4f8bfc4a6a2a035f06d7
[ "Apache-2.0" ]
null
null
null
src/fdk_organization_bff/sparql/dataset_queries.py
Informasjonsforvaltning/organization-page-bffe
473dc9606649f864618f4f8bfc4a6a2a035f06d7
[ "Apache-2.0" ]
null
null
null
"""Module for Dataset SPARQL-queries.""" from string import Template def build_org_datasets_query(organization_id: str) -> str: """Build query for an organizations datasets.""" query_template = Template( """ PREFIX dct: <http://purl.org/dc/terms/> PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX dcat: <http://www.w3.org/ns/dcat#> PREFIX fdk: <https://raw.githubusercontent.com/Informasjonsforvaltning/fdk-reasoning-service/master/src/main/resources/ontology/fdk.owl#> SELECT DISTINCT ?dataset ?issued ?isAuthoritative ?isOpenData FROM <https://datasets.fellesdatakatalog.digdir.no> WHERE {{ ?dataset a dcat:Dataset . ?record foaf:primaryTopic ?dataset . ?record dct:issued ?issued . OPTIONAL {{ ?dataset fdk:isOpenData ?isOpenData . }} OPTIONAL {{ ?dataset fdk:isAuthoritative ?isAuthoritative . }} ?dataset dct:publisher ?publisher . ?publisher dct:identifier "$org_id" . }}""" ) return query_template.substitute(org_id=organization_id) def build_nap_org_datasets_query(organization_id: str) -> str: """Build query for an organizations NAP datasets.""" query_template = Template( """ PREFIX dct: <http://purl.org/dc/terms/> PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX dcat: <http://www.w3.org/ns/dcat#> PREFIX fdk: <https://raw.githubusercontent.com/Informasjonsforvaltning/fdk-reasoning-service/master/src/main/resources/ontology/fdk.owl#> SELECT DISTINCT ?dataset ?issued ?isAuthoritative ?isOpenData FROM <https://datasets.fellesdatakatalog.digdir.no> WHERE {{ ?dataset a dcat:Dataset . ?dataset fdk:isRelatedToTransportportal ?isNAP . FILTER (STR(?isNAP) = "true") ?record foaf:primaryTopic ?dataset . ?record dct:issued ?issued . OPTIONAL {{ ?dataset fdk:isOpenData ?isOpenData . }} OPTIONAL {{ ?dataset fdk:isAuthoritative ?isAuthoritative . }} ?dataset dct:publisher ?publisher . ?publisher dct:identifier "$org_id" . }}""" ) return query_template.substitute(org_id=organization_id) def build_datasets_by_publisher_query() -> str: """Build query to count datasets grouped by publisher.""" return """ PREFIX dct: <http://purl.org/dc/terms/> PREFIX dcat: <http://www.w3.org/ns/dcat#> SELECT ?organizationNumber (COUNT(DISTINCT ?dataset) AS ?count) FROM <https://datasets.fellesdatakatalog.digdir.no> WHERE {{ ?dataset a dcat:Dataset . ?dataset dct:publisher ?publisher . ?publisher dct:identifier ?organizationNumber . }} GROUP BY ?organizationNumber""" def build_nap_datasets_by_publisher_query() -> str: """Build query to count NAP datasets grouped by publisher.""" return """ PREFIX dct: <http://purl.org/dc/terms/> PREFIX dcat: <http://www.w3.org/ns/dcat#> PREFIX fdk: <https://raw.githubusercontent.com/Informasjonsforvaltning/fdk-reasoning-service/master/src/main/resources/ontology/fdk.owl#> SELECT ?organizationNumber (COUNT(DISTINCT ?dataset) AS ?count) FROM <https://datasets.fellesdatakatalog.digdir.no> WHERE {{ ?dataset a dcat:Dataset . ?dataset fdk:isRelatedToTransportportal ?isNAP . FILTER (STR(?isNAP) = "true") ?dataset dct:publisher ?publisher . ?publisher dct:identifier ?organizationNumber . }} GROUP BY ?organizationNumber"""
36.337079
137
0.722325
386
3,234
5.979275
0.196891
0.062392
0.02253
0.029463
0.964905
0.964905
0.964905
0.964905
0.964905
0.926776
0
0.002867
0.137291
3,234
88
138
36.75
0.824373
0.071738
0
0.722222
0
0.027778
0.640974
0.020284
0
0
0
0
0
1
0.111111
false
0
0.027778
0
0.25
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
64f93bec253ff88ef027648a5e51bfdcff9f88fa
19,858
py
Python
yellowbrick/datasets/loaders.py
souravsingh/yellowbrick
a5941a6c47fbe5264f3622bc15276ba618bbe1d0
[ "Apache-2.0" ]
2
2018-05-24T01:32:03.000Z
2018-05-27T19:56:02.000Z
yellowbrick/datasets/loaders.py
souravsingh/yellowbrick
a5941a6c47fbe5264f3622bc15276ba618bbe1d0
[ "Apache-2.0" ]
null
null
null
yellowbrick/datasets/loaders.py
souravsingh/yellowbrick
a5941a6c47fbe5264f3622bc15276ba618bbe1d0
[ "Apache-2.0" ]
null
null
null
# yellowbrick.datasets.loaders # Dataset loading utilities and primary API to the datasets module. # # Author: Benjamin Bengfort <benjamin@bengfort.com> # Created: Tue Jul 31 13:31:23 2018 -0400 # # ID: loaders.py [] benjamin@bengfort.com $ """ Dataset loading utilities and primary API to the datasets module. """ ########################################################################## ## Imports ########################################################################## import os import json from .base import Dataset, Corpus __all__ = [ "load_concrete", "load_energy", "load_credit", "load_occupancy", "load_mushroom", "load_hobbies", "load_game", "load_bikeshare", "load_spam", "load_walking", ] ########################################################################## ## Links and SHA 256 signature of Yellowbrick hosted datasets ########################################################################## MANIFEST = os.path.join(os.path.dirname(__file__), "manifest.json") with open(MANIFEST, "r") as f: DATASETS = json.load(f) ########################################################################## ## Specific loading utilities ########################################################################## def _load_dataset(name, data_home=None, return_dataset=False): """ Load a dataset by name and return specified format. """ info = DATASETS[name] data = Dataset(name, data_home=data_home, **info) if return_dataset: return data return data.to_data() def _load_corpus(name, data_home=None): """ Load a corpus object by name. """ info = DATASETS[name] return Corpus(name, data_home=data_home, **info) def load_concrete(data_home=None, return_dataset=False): """ Loads the concrete multivariate dataset that is well suited to regression tasks. The dataset contains 1030 instances and 8 real valued attributes with a continuous target. The Yellowbrick datasets are hosted online and when requested, the dataset is downloaded to your local computer for use. Note that if the dataset hasn't been downloaded before, an Internet connection is required. However, if the data is cached locally, no data will be downloaded. Yellowbrick checks the known signature of the dataset with the data downloaded to ensure the download completes successfully. Datasets are stored alongside the code, but the location can be specified with the ``data_home`` parameter or the $YELLOWBRICK_DATA envvar. Parameters ---------- data_home : str, optional The path on disk where data is stored. If not passed in, it is looked up from YELLOWBRICK_DATA or the default returned by ``get_data_home``. return_dataset : bool, default=False Return the raw dataset object instead of X and y numpy arrays to get access to alternative targets, extra features, content and meta. Returns ------- X : array-like with shape (n_instances, n_features) if return_dataset=False A pandas DataFrame or numpy array describing the instance features. y : array-like with shape (n_instances,) if return_dataset=False A pandas Series or numpy array describing the target vector. dataset : Dataset instance if return_dataset=True The Yellowbrick Dataset object provides an interface to accessing the data in a variety of formats as well as associated metadata and content. """ return _load_dataset('concrete', data_home, return_dataset) def load_energy(data_home=None, return_dataset=False): """ Loads the energy multivariate dataset that is well suited to multi-output regression and classification tasks. The dataset contains 768 instances and 8 real valued attributes with two continous targets. The Yellowbrick datasets are hosted online and when requested, the dataset is downloaded to your local computer for use. Note that if the dataset hasn't been downloaded before, an Internet connection is required. However, if the data is cached locally, no data will be downloaded. Yellowbrick checks the known signature of the dataset with the data downloaded to ensure the download completes successfully. Datasets are stored alongside the code, but the location can be specified with the ``data_home`` parameter or the $YELLOWBRICK_DATA envvar. Parameters ---------- data_home : str, optional The path on disk where data is stored. If not passed in, it is looked up from YELLOWBRICK_DATA or the default returned by ``get_data_home``. return_dataset : bool, default=False Return the raw dataset object instead of X and y numpy arrays to get access to alternative targets, extra features, content and meta. Returns ------- X : array-like with shape (n_instances, n_features) if return_dataset=False A pandas DataFrame or numpy array describing the instance features. y : array-like with shape (n_instances,) if return_dataset=False A pandas Series or numpy array describing the target vector. dataset : Dataset instance if return_dataset=True The Yellowbrick Dataset object provides an interface to accessing the data in a variety of formats as well as associated metadata and content. """ return _load_dataset('energy', data_home, return_dataset) def load_credit(data_home=None, return_dataset=False): """ Loads the credit multivariate dataset that is well suited to binary classification tasks. The dataset contains 30000 instances and 23 integer and real value attributes with a discrete target. The Yellowbrick datasets are hosted online and when requested, the dataset is downloaded to your local computer for use. Note that if the dataset hasn't been downloaded before, an Internet connection is required. However, if the data is cached locally, no data will be downloaded. Yellowbrick checks the known signature of the dataset with the data downloaded to ensure the download completes successfully. Datasets are stored alongside the code, but the location can be specified with the ``data_home`` parameter or the $YELLOWBRICK_DATA envvar. Parameters ---------- data_home : str, optional The path on disk where data is stored. If not passed in, it is looked up from YELLOWBRICK_DATA or the default returned by ``get_data_home``. return_dataset : bool, default=False Return the raw dataset object instead of X and y numpy arrays to get access to alternative targets, extra features, content and meta. Returns ------- X : array-like with shape (n_instances, n_features) if return_dataset=False A pandas DataFrame or numpy array describing the instance features. y : array-like with shape (n_instances,) if return_dataset=False A pandas Series or numpy array describing the target vector. dataset : Dataset instance if return_dataset=True The Yellowbrick Dataset object provides an interface to accessing the data in a variety of formats as well as associated metadata and content. """ return _load_dataset('credit', data_home, return_dataset) def load_occupancy(data_home=None, return_dataset=False): """ Loads the occupancy multivariate, time-series dataset that is well suited to binary classification tasks. The dataset contains 20560 instances with 5 real valued attributes and a discrete target. The Yellowbrick datasets are hosted online and when requested, the dataset is downloaded to your local computer for use. Note that if the dataset hasn't been downloaded before, an Internet connection is required. However, if the data is cached locally, no data will be downloaded. Yellowbrick checks the known signature of the dataset with the data downloaded to ensure the download completes successfully. Datasets are stored alongside the code, but the location can be specified with the ``data_home`` parameter or the $YELLOWBRICK_DATA envvar. Parameters ---------- data_home : str, optional The path on disk where data is stored. If not passed in, it is looked up from YELLOWBRICK_DATA or the default returned by ``get_data_home``. return_dataset : bool, default=False Return the raw dataset object instead of X and y numpy arrays to get access to alternative targets, extra features, content and meta. Returns ------- X : array-like with shape (n_instances, n_features) if return_dataset=False A pandas DataFrame or numpy array describing the instance features. y : array-like with shape (n_instances,) if return_dataset=False A pandas Series or numpy array describing the target vector. dataset : Dataset instance if return_dataset=True The Yellowbrick Dataset object provides an interface to accessing the data in a variety of formats as well as associated metadata and content. """ return _load_dataset('occupancy', data_home, return_dataset) def load_mushroom(data_home=None, return_dataset=False): """ Loads the mushroom multivariate dataset that is well suited to binary classification tasks. The dataset contains 8123 instances with 3 categorical attributes and a discrete target. The Yellowbrick datasets are hosted online and when requested, the dataset is downloaded to your local computer for use. Note that if the dataset hasn't been downloaded before, an Internet connection is required. However, if the data is cached locally, no data will be downloaded. Yellowbrick checks the known signature of the dataset with the data downloaded to ensure the download completes successfully. Datasets are stored alongside the code, but the location can be specified with the ``data_home`` parameter or the $YELLOWBRICK_DATA envvar. Parameters ---------- data_home : str, optional The path on disk where data is stored. If not passed in, it is looked up from YELLOWBRICK_DATA or the default returned by ``get_data_home``. return_dataset : bool, default=False Return the raw dataset object instead of X and y numpy arrays to get access to alternative targets, extra features, content and meta. Returns ------- X : array-like with shape (n_instances, n_features) if return_dataset=False A pandas DataFrame or numpy array describing the instance features. y : array-like with shape (n_instances,) if return_dataset=False A pandas Series or numpy array describing the target vector. dataset : Dataset instance if return_dataset=True The Yellowbrick Dataset object provides an interface to accessing the data in a variety of formats as well as associated metadata and content. """ return _load_dataset('mushroom', data_home, return_dataset) def load_hobbies(data_home=None): """ Loads the hobbies text corpus that is well suited to classification, clustering, and text analysis tasks. The dataset contains 448 documents in 5 categories with 7420 paragraphs, 14251 sentences, 288520 words, and a vocabulary of 23738. The Yellowbrick datasets are hosted online and when requested, the dataset is downloaded to your local computer for use. Note that if the dataset hasn't been downloaded before, an Internet connection is required. However, if the data is cached locally, no data will be downloaded. Yellowbrick checks the known signature of the dataset with the data downloaded to ensure the download completes successfully. Datasets are stored alongside the code, but the location can be specified with the ``data_home`` parameter or the $YELLOWBRICK_DATA envvar. Parameters ---------- data_home : str, optional The path on disk where data is stored. If not passed in, it is looked up from YELLOWBRICK_DATA or the default returned by ``get_data_home``. Returns ------- dataset : Corpus The Yellowbrick Corpus object provides an interface to accessing the text documents and metadata associated with the corpus. """ return _load_corpus('hobbies', data_home) def load_game(data_home=None, return_dataset=False): """ Load the Connect-4 game multivariate and spatial dataset that is well suited to multiclass classification tasks. The dataset contains 67557 instances with 42 categorical attributes and a discrete target. The Yellowbrick datasets are hosted online and when requested, the dataset is downloaded to your local computer for use. Note that if the dataset hasn't been downloaded before, an Internet connection is required. However, if the data is cached locally, no data will be downloaded. Yellowbrick checks the known signature of the dataset with the data downloaded to ensure the download completes successfully. Datasets are stored alongside the code, but the location can be specified with the ``data_home`` parameter or the $YELLOWBRICK_DATA envvar. Parameters ---------- data_home : str, optional The path on disk where data is stored. If not passed in, it is looked up from YELLOWBRICK_DATA or the default returned by ``get_data_home``. return_dataset : bool, default=False Return the raw dataset object instead of X and y numpy arrays to get access to alternative targets, extra features, content and meta. Returns ------- X : array-like with shape (n_instances, n_features) if return_dataset=False A pandas DataFrame or numpy array describing the instance features. y : array-like with shape (n_instances,) if return_dataset=False A pandas Series or numpy array describing the target vector. dataset : Dataset instance if return_dataset=True The Yellowbrick Dataset object provides an interface to accessing the data in a variety of formats as well as associated metadata and content. """ return _load_dataset('game', data_home, return_dataset) def load_bikeshare(data_home=None, return_dataset=False): """ Loads the bike sharing univariate dataset that is well suited to regression tasks. The dataset contains 17379 instances with 12 integer and real valued attributes and a continuous target. The Yellowbrick datasets are hosted online and when requested, the dataset is downloaded to your local computer for use. Note that if the dataset hasn't been downloaded before, an Internet connection is required. However, if the data is cached locally, no data will be downloaded. Yellowbrick checks the known signature of the dataset with the data downloaded to ensure the download completes successfully. Datasets are stored alongside the code, but the location can be specified with the ``data_home`` parameter or the $YELLOWBRICK_DATA envvar. Parameters ---------- data_home : str, optional The path on disk where data is stored. If not passed in, it is looked up from YELLOWBRICK_DATA or the default returned by ``get_data_home``. return_dataset : bool, default=False Return the raw dataset object instead of X and y numpy arrays to get access to alternative targets, extra features, content and meta. Returns ------- X : array-like with shape (n_instances, n_features) if return_dataset=False A pandas DataFrame or numpy array describing the instance features. y : array-like with shape (n_instances,) if return_dataset=False A pandas Series or numpy array describing the target vector. dataset : Dataset instance if return_dataset=True The Yellowbrick Dataset object provides an interface to accessing the data in a variety of formats as well as associated metadata and content. """ return _load_dataset('bikeshare', data_home, return_dataset) def load_spam(data_home=None, return_dataset=False): """ Loads the email spam dataset that is weill suited to binary classification and threshold tasks. The dataset contains 4600 instances with 57 integer and real valued attributes and a discrete target. The Yellowbrick datasets are hosted online and when requested, the dataset is downloaded to your local computer for use. Note that if the dataset hasn't been downloaded before, an Internet connection is required. However, if the data is cached locally, no data will be downloaded. Yellowbrick checks the known signature of the dataset with the data downloaded to ensure the download completes successfully. Datasets are stored alongside the code, but the location can be specified with the ``data_home`` parameter or the $YELLOWBRICK_DATA envvar. Parameters ---------- data_home : str, optional The path on disk where data is stored. If not passed in, it is looked up from YELLOWBRICK_DATA or the default returned by ``get_data_home``. return_dataset : bool, default=False Return the raw dataset object instead of X and y numpy arrays to get access to alternative targets, extra features, content and meta. Returns ------- X : array-like with shape (n_instances, n_features) if return_dataset=False A pandas DataFrame or numpy array describing the instance features. y : array-like with shape (n_instances,) if return_dataset=False A pandas Series or numpy array describing the target vector. dataset : Dataset instance if return_dataset=True The Yellowbrick Dataset object provides an interface to accessing the data in a variety of formats as well as associated metadata and content. """ return _load_dataset('spam', data_home, return_dataset) def load_walking(data_home=None, return_dataset=False): """ Loads the walking activity dataset that is weill suited to clustering and multi-label classification tasks. The dataset contains multi-variate time series data with 149,332 real valued measurements across 22 unique walkers. The Yellowbrick datasets are hosted online and when requested, the dataset is downloaded to your local computer for use. Note that if the dataset hasn't been downloaded before, an Internet connection is required. However, if the data is cached locally, no data will be downloaded. Yellowbrick checks the known signature of the dataset with the data downloaded to ensure the download completes successfully. Datasets are stored alongside the code, but the location can be specified with the ``data_home`` parameter or the $YELLOWBRICK_DATA envvar. Parameters ---------- data_home : str, optional The path on disk where data is stored. If not passed in, it is looked up from YELLOWBRICK_DATA or the default returned by ``get_data_home``. return_dataset : bool, default=False Return the raw dataset object instead of X and y numpy arrays to get access to alternative targets, extra features, content and meta. Returns ------- X : array-like with shape (n_instances, n_features) if return_dataset=False A pandas DataFrame or numpy array describing the instance features. y : array-like with shape (n_instances,) if return_dataset=False A pandas Series or numpy array describing the target vector. dataset : Dataset instance if return_dataset=True The Yellowbrick Dataset object provides an interface to accessing the data in a variety of formats as well as associated metadata and content. """ return _load_dataset('walking', data_home, return_dataset)
43.263617
80
0.714876
2,763
19,858
5.057546
0.086138
0.03206
0.036067
0.02705
0.883569
0.874338
0.849363
0.829827
0.808072
0.808072
0
0.006336
0.213113
19,858
459
81
43.263617
0.887943
0.815994
0
0.05
0
0
0.102302
0
0
0
0
0
0
1
0.3
false
0
0.075
0
0.7
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
9
56c9b4325130675fb14a045f99637300300a123f
366
py
Python
package/SmartLoong/SmartLoong.py
ccccmagicboy2022/pikascript
154ccd8e90e0d50e1551536d32bd2a3648e194d2
[ "MIT" ]
228
2021-09-11T06:09:43.000Z
2022-03-30T08:09:01.000Z
package/SmartLoong/SmartLoong.py
ccccmagicboy2022/pikascript
154ccd8e90e0d50e1551536d32bd2a3648e194d2
[ "MIT" ]
48
2021-09-25T01:23:43.000Z
2022-03-31T07:34:43.000Z
package/SmartLoong/SmartLoong.py
ccccmagicboy2022/pikascript
154ccd8e90e0d50e1551536d32bd2a3648e194d2
[ "MIT" ]
31
2021-09-17T12:06:45.000Z
2022-03-19T16:10:11.000Z
from PikaObj import * class LED(TinyObj): def __init__(): pass def setId(id: int): pass def enable(): pass def on(): pass def off(): pass class KEY(TinyObj): def __init__(): pass def setId(id: int): pass def enable(): pass def read() -> int: pass
11.090909
23
0.464481
41
366
3.95122
0.414634
0.302469
0.17284
0.222222
0.62963
0.62963
0.62963
0.62963
0.62963
0.62963
0
0
0.431694
366
32
24
11.4375
0.778846
0
0
0.714286
0
0
0
0
0
0
0
0
0
1
0.428571
false
0.428571
0.047619
0
0.571429
0
0
0
0
null
1
0
1
0
0
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
56e18f0b9cb296c71b65a4e87483eeeaa591345f
46
py
Python
src/amuse/community/etics/__init__.py
sibonyves/amuse
5557bf88d14df1aa02133a199b6d60c0c57dcab7
[ "Apache-2.0" ]
null
null
null
src/amuse/community/etics/__init__.py
sibonyves/amuse
5557bf88d14df1aa02133a199b6d60c0c57dcab7
[ "Apache-2.0" ]
12
2021-11-15T09:13:03.000Z
2022-02-02T14:53:04.000Z
src/amuse/community/etics/__init__.py
sibonyves/amuse
5557bf88d14df1aa02133a199b6d60c0c57dcab7
[ "Apache-2.0" ]
null
null
null
# generated file from .interface import Etics
15.333333
28
0.804348
6
46
6.166667
1
0
0
0
0
0
0
0
0
0
0
0
0.152174
46
2
29
23
0.948718
0.304348
0
0
1
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
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
1
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
7
56ec0565b8cd8a6c101fc1a3e34d1ac2ddefc871
26,228
py
Python
sdk/python/pulumi_azuredevops/git.py
pulumi/pulumi-azuredevops
e6d73d1501335037fb944ae627091a7afc7f0048
[ "ECL-2.0", "Apache-2.0" ]
13
2020-06-28T11:39:32.000Z
2022-03-05T13:34:16.000Z
sdk/python/pulumi_azuredevops/git.py
pulumi/pulumi-azuredevops
e6d73d1501335037fb944ae627091a7afc7f0048
[ "ECL-2.0", "Apache-2.0" ]
58
2020-06-20T14:00:28.000Z
2022-03-31T15:20:51.000Z
sdk/python/pulumi_azuredevops/git.py
pulumi/pulumi-azuredevops
e6d73d1501335037fb944ae627091a7afc7f0048
[ "ECL-2.0", "Apache-2.0" ]
2
2020-10-21T03:22:01.000Z
2021-12-10T18:26:59.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__ = ['GitArgs', 'Git'] @pulumi.input_type class GitArgs: def __init__(__self__, *, initialization: pulumi.Input['GitInitializationArgs'], project_id: pulumi.Input[str], default_branch: Optional[pulumi.Input[str]] = None, name: Optional[pulumi.Input[str]] = None, parent_repository_id: Optional[pulumi.Input[str]] = None): """ The set of arguments for constructing a Git resource. :param pulumi.Input['GitInitializationArgs'] initialization: An `initialization` block as documented below. :param pulumi.Input[str] project_id: The project ID or project name. :param pulumi.Input[str] default_branch: The ref of the default branch. Will be used as the branch name for initialized repositories. :param pulumi.Input[str] name: The name of the git repository. :param pulumi.Input[str] parent_repository_id: The ID of a Git project from which a fork is to be created. """ pulumi.set(__self__, "initialization", initialization) pulumi.set(__self__, "project_id", project_id) if default_branch is not None: pulumi.set(__self__, "default_branch", default_branch) if name is not None: pulumi.set(__self__, "name", name) if parent_repository_id is not None: pulumi.set(__self__, "parent_repository_id", parent_repository_id) @property @pulumi.getter def initialization(self) -> pulumi.Input['GitInitializationArgs']: """ An `initialization` block as documented below. """ return pulumi.get(self, "initialization") @initialization.setter def initialization(self, value: pulumi.Input['GitInitializationArgs']): pulumi.set(self, "initialization", value) @property @pulumi.getter(name="projectId") def project_id(self) -> pulumi.Input[str]: """ The project ID or project name. """ return pulumi.get(self, "project_id") @project_id.setter def project_id(self, value: pulumi.Input[str]): pulumi.set(self, "project_id", value) @property @pulumi.getter(name="defaultBranch") def default_branch(self) -> Optional[pulumi.Input[str]]: """ The ref of the default branch. Will be used as the branch name for initialized repositories. """ return pulumi.get(self, "default_branch") @default_branch.setter def default_branch(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "default_branch", value) @property @pulumi.getter def name(self) -> Optional[pulumi.Input[str]]: """ The name of the git repository. """ return pulumi.get(self, "name") @name.setter def name(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "name", value) @property @pulumi.getter(name="parentRepositoryId") def parent_repository_id(self) -> Optional[pulumi.Input[str]]: """ The ID of a Git project from which a fork is to be created. """ return pulumi.get(self, "parent_repository_id") @parent_repository_id.setter def parent_repository_id(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "parent_repository_id", value) @pulumi.input_type class _GitState: def __init__(__self__, *, default_branch: Optional[pulumi.Input[str]] = None, initialization: Optional[pulumi.Input['GitInitializationArgs']] = None, is_fork: Optional[pulumi.Input[bool]] = None, name: Optional[pulumi.Input[str]] = None, parent_repository_id: Optional[pulumi.Input[str]] = None, project_id: Optional[pulumi.Input[str]] = None, remote_url: Optional[pulumi.Input[str]] = None, size: Optional[pulumi.Input[int]] = None, ssh_url: Optional[pulumi.Input[str]] = None, url: Optional[pulumi.Input[str]] = None, web_url: Optional[pulumi.Input[str]] = None): """ Input properties used for looking up and filtering Git resources. :param pulumi.Input[str] default_branch: The ref of the default branch. Will be used as the branch name for initialized repositories. :param pulumi.Input['GitInitializationArgs'] initialization: An `initialization` block as documented below. :param pulumi.Input[bool] is_fork: True if the repository was created as a fork. :param pulumi.Input[str] name: The name of the git repository. :param pulumi.Input[str] parent_repository_id: The ID of a Git project from which a fork is to be created. :param pulumi.Input[str] project_id: The project ID or project name. :param pulumi.Input[str] remote_url: Git HTTPS URL of the repository :param pulumi.Input[int] size: Size in bytes. :param pulumi.Input[str] ssh_url: Git SSH URL of the repository. :param pulumi.Input[str] url: REST API URL of the repository. :param pulumi.Input[str] web_url: Web link to the repository. """ if default_branch is not None: pulumi.set(__self__, "default_branch", default_branch) if initialization is not None: pulumi.set(__self__, "initialization", initialization) if is_fork is not None: pulumi.set(__self__, "is_fork", is_fork) if name is not None: pulumi.set(__self__, "name", name) if parent_repository_id is not None: pulumi.set(__self__, "parent_repository_id", parent_repository_id) if project_id is not None: pulumi.set(__self__, "project_id", project_id) if remote_url is not None: pulumi.set(__self__, "remote_url", remote_url) if size is not None: pulumi.set(__self__, "size", size) if ssh_url is not None: pulumi.set(__self__, "ssh_url", ssh_url) if url is not None: pulumi.set(__self__, "url", url) if web_url is not None: pulumi.set(__self__, "web_url", web_url) @property @pulumi.getter(name="defaultBranch") def default_branch(self) -> Optional[pulumi.Input[str]]: """ The ref of the default branch. Will be used as the branch name for initialized repositories. """ return pulumi.get(self, "default_branch") @default_branch.setter def default_branch(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "default_branch", value) @property @pulumi.getter def initialization(self) -> Optional[pulumi.Input['GitInitializationArgs']]: """ An `initialization` block as documented below. """ return pulumi.get(self, "initialization") @initialization.setter def initialization(self, value: Optional[pulumi.Input['GitInitializationArgs']]): pulumi.set(self, "initialization", value) @property @pulumi.getter(name="isFork") def is_fork(self) -> Optional[pulumi.Input[bool]]: """ True if the repository was created as a fork. """ return pulumi.get(self, "is_fork") @is_fork.setter def is_fork(self, value: Optional[pulumi.Input[bool]]): pulumi.set(self, "is_fork", value) @property @pulumi.getter def name(self) -> Optional[pulumi.Input[str]]: """ The name of the git repository. """ return pulumi.get(self, "name") @name.setter def name(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "name", value) @property @pulumi.getter(name="parentRepositoryId") def parent_repository_id(self) -> Optional[pulumi.Input[str]]: """ The ID of a Git project from which a fork is to be created. """ return pulumi.get(self, "parent_repository_id") @parent_repository_id.setter def parent_repository_id(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "parent_repository_id", value) @property @pulumi.getter(name="projectId") def project_id(self) -> Optional[pulumi.Input[str]]: """ The project ID or project name. """ return pulumi.get(self, "project_id") @project_id.setter def project_id(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "project_id", value) @property @pulumi.getter(name="remoteUrl") def remote_url(self) -> Optional[pulumi.Input[str]]: """ Git HTTPS URL of the repository """ return pulumi.get(self, "remote_url") @remote_url.setter def remote_url(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "remote_url", value) @property @pulumi.getter def size(self) -> Optional[pulumi.Input[int]]: """ Size in bytes. """ return pulumi.get(self, "size") @size.setter def size(self, value: Optional[pulumi.Input[int]]): pulumi.set(self, "size", value) @property @pulumi.getter(name="sshUrl") def ssh_url(self) -> Optional[pulumi.Input[str]]: """ Git SSH URL of the repository. """ return pulumi.get(self, "ssh_url") @ssh_url.setter def ssh_url(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "ssh_url", value) @property @pulumi.getter def url(self) -> Optional[pulumi.Input[str]]: """ REST API URL of the repository. """ return pulumi.get(self, "url") @url.setter def url(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "url", value) @property @pulumi.getter(name="webUrl") def web_url(self) -> Optional[pulumi.Input[str]]: """ Web link to the repository. """ return pulumi.get(self, "web_url") @web_url.setter def web_url(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "web_url", value) class Git(pulumi.CustomResource): @overload def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, default_branch: Optional[pulumi.Input[str]] = None, initialization: Optional[pulumi.Input[pulumi.InputType['GitInitializationArgs']]] = None, name: Optional[pulumi.Input[str]] = None, parent_repository_id: Optional[pulumi.Input[str]] = None, project_id: Optional[pulumi.Input[str]] = None, __props__=None): """ Manages a git repository within Azure DevOps. ## Example Usage ### Create Git repository ```python import pulumi import pulumi_azuredevops as azuredevops project = azuredevops.Project("project", visibility="private", version_control="Git", work_item_template="Agile") repo = azuredevops.Git("repo", project_id=project.id, initialization=azuredevops.GitInitializationArgs( init_type="Clean", )) ``` ### Create Fork of another Azure DevOps Git repository ```python import pulumi import pulumi_azuredevops as azuredevops repo = azuredevops.Git("repo", project_id=azuredevops_project["project"]["id"], parent_repository_id=azuredevops_git_repository["parent"]["id"], initialization=azuredevops.GitInitializationArgs( init_type="Clean", )) ``` ### Create Import from another Git repository ```python import pulumi import pulumi_azuredevops as azuredevops repo = azuredevops.Git("repo", project_id=azuredevops_project["project"]["id"], initialization=azuredevops.GitInitializationArgs( init_type="Import", source_type="Git", source_url="https://github.com/microsoft/terraform-provider-azuredevops.git", )) ``` ### Import from a Private Repository ```python import pulumi import pulumi_azuredevops as azuredevops serviceendpoint = azuredevops.ServiceEndpointGenericGit("serviceendpoint", project_id=azuredevops_project["project"]["id"], repository_url="https://dev.azure.com/org/project/_git/repository", username="username", password="<password>/<PAT>", service_endpoint_name="Sample Generic Git", description="Managed by Terraform") repo = azuredevops.Git("repo", project_id=azuredevops_project["project"]["id"], initialization=azuredevops.GitInitializationArgs( init_type="Import", source_type="Git", source_url="https://dev.azure.com/example-org/private-repository.git", service_connection_id=serviceendpoint.id, )) ``` ## Relevant Links - [Azure DevOps Service REST API 5.1 - Git Repositories](https://docs.microsoft.com/en-us/rest/api/azure/devops/git/repositories?view=azure-devops-rest-5.1) ## Import Azure DevOps Repositories can be imported using the repo name or by the repo Guid e.g. ```sh $ pulumi import azuredevops:index/git:Git repository projectName/repoName ``` or ```sh $ pulumi import azuredevops:index/git:Git repository projectName/00000000-0000-0000-0000-000000000000 ``` :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] default_branch: The ref of the default branch. Will be used as the branch name for initialized repositories. :param pulumi.Input[pulumi.InputType['GitInitializationArgs']] initialization: An `initialization` block as documented below. :param pulumi.Input[str] name: The name of the git repository. :param pulumi.Input[str] parent_repository_id: The ID of a Git project from which a fork is to be created. :param pulumi.Input[str] project_id: The project ID or project name. """ ... @overload def __init__(__self__, resource_name: str, args: GitArgs, opts: Optional[pulumi.ResourceOptions] = None): """ Manages a git repository within Azure DevOps. ## Example Usage ### Create Git repository ```python import pulumi import pulumi_azuredevops as azuredevops project = azuredevops.Project("project", visibility="private", version_control="Git", work_item_template="Agile") repo = azuredevops.Git("repo", project_id=project.id, initialization=azuredevops.GitInitializationArgs( init_type="Clean", )) ``` ### Create Fork of another Azure DevOps Git repository ```python import pulumi import pulumi_azuredevops as azuredevops repo = azuredevops.Git("repo", project_id=azuredevops_project["project"]["id"], parent_repository_id=azuredevops_git_repository["parent"]["id"], initialization=azuredevops.GitInitializationArgs( init_type="Clean", )) ``` ### Create Import from another Git repository ```python import pulumi import pulumi_azuredevops as azuredevops repo = azuredevops.Git("repo", project_id=azuredevops_project["project"]["id"], initialization=azuredevops.GitInitializationArgs( init_type="Import", source_type="Git", source_url="https://github.com/microsoft/terraform-provider-azuredevops.git", )) ``` ### Import from a Private Repository ```python import pulumi import pulumi_azuredevops as azuredevops serviceendpoint = azuredevops.ServiceEndpointGenericGit("serviceendpoint", project_id=azuredevops_project["project"]["id"], repository_url="https://dev.azure.com/org/project/_git/repository", username="username", password="<password>/<PAT>", service_endpoint_name="Sample Generic Git", description="Managed by Terraform") repo = azuredevops.Git("repo", project_id=azuredevops_project["project"]["id"], initialization=azuredevops.GitInitializationArgs( init_type="Import", source_type="Git", source_url="https://dev.azure.com/example-org/private-repository.git", service_connection_id=serviceendpoint.id, )) ``` ## Relevant Links - [Azure DevOps Service REST API 5.1 - Git Repositories](https://docs.microsoft.com/en-us/rest/api/azure/devops/git/repositories?view=azure-devops-rest-5.1) ## Import Azure DevOps Repositories can be imported using the repo name or by the repo Guid e.g. ```sh $ pulumi import azuredevops:index/git:Git repository projectName/repoName ``` or ```sh $ pulumi import azuredevops:index/git:Git repository projectName/00000000-0000-0000-0000-000000000000 ``` :param str resource_name: The name of the resource. :param GitArgs 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(GitArgs, 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, default_branch: Optional[pulumi.Input[str]] = None, initialization: Optional[pulumi.Input[pulumi.InputType['GitInitializationArgs']]] = None, name: Optional[pulumi.Input[str]] = None, parent_repository_id: Optional[pulumi.Input[str]] = None, project_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__ = GitArgs.__new__(GitArgs) __props__.__dict__["default_branch"] = default_branch if initialization is None and not opts.urn: raise TypeError("Missing required property 'initialization'") __props__.__dict__["initialization"] = initialization __props__.__dict__["name"] = name __props__.__dict__["parent_repository_id"] = parent_repository_id if project_id is None and not opts.urn: raise TypeError("Missing required property 'project_id'") __props__.__dict__["project_id"] = project_id __props__.__dict__["is_fork"] = None __props__.__dict__["remote_url"] = None __props__.__dict__["size"] = None __props__.__dict__["ssh_url"] = None __props__.__dict__["url"] = None __props__.__dict__["web_url"] = None alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="azuredevops:Repository/git:Git")]) opts = pulumi.ResourceOptions.merge(opts, alias_opts) super(Git, __self__).__init__( 'azuredevops:index/git:Git', resource_name, __props__, opts) @staticmethod def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions] = None, default_branch: Optional[pulumi.Input[str]] = None, initialization: Optional[pulumi.Input[pulumi.InputType['GitInitializationArgs']]] = None, is_fork: Optional[pulumi.Input[bool]] = None, name: Optional[pulumi.Input[str]] = None, parent_repository_id: Optional[pulumi.Input[str]] = None, project_id: Optional[pulumi.Input[str]] = None, remote_url: Optional[pulumi.Input[str]] = None, size: Optional[pulumi.Input[int]] = None, ssh_url: Optional[pulumi.Input[str]] = None, url: Optional[pulumi.Input[str]] = None, web_url: Optional[pulumi.Input[str]] = None) -> 'Git': """ Get an existing Git 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] default_branch: The ref of the default branch. Will be used as the branch name for initialized repositories. :param pulumi.Input[pulumi.InputType['GitInitializationArgs']] initialization: An `initialization` block as documented below. :param pulumi.Input[bool] is_fork: True if the repository was created as a fork. :param pulumi.Input[str] name: The name of the git repository. :param pulumi.Input[str] parent_repository_id: The ID of a Git project from which a fork is to be created. :param pulumi.Input[str] project_id: The project ID or project name. :param pulumi.Input[str] remote_url: Git HTTPS URL of the repository :param pulumi.Input[int] size: Size in bytes. :param pulumi.Input[str] ssh_url: Git SSH URL of the repository. :param pulumi.Input[str] url: REST API URL of the repository. :param pulumi.Input[str] web_url: Web link to the repository. """ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) __props__ = _GitState.__new__(_GitState) __props__.__dict__["default_branch"] = default_branch __props__.__dict__["initialization"] = initialization __props__.__dict__["is_fork"] = is_fork __props__.__dict__["name"] = name __props__.__dict__["parent_repository_id"] = parent_repository_id __props__.__dict__["project_id"] = project_id __props__.__dict__["remote_url"] = remote_url __props__.__dict__["size"] = size __props__.__dict__["ssh_url"] = ssh_url __props__.__dict__["url"] = url __props__.__dict__["web_url"] = web_url return Git(resource_name, opts=opts, __props__=__props__) @property @pulumi.getter(name="defaultBranch") def default_branch(self) -> pulumi.Output[str]: """ The ref of the default branch. Will be used as the branch name for initialized repositories. """ return pulumi.get(self, "default_branch") @property @pulumi.getter def initialization(self) -> pulumi.Output['outputs.GitInitialization']: """ An `initialization` block as documented below. """ return pulumi.get(self, "initialization") @property @pulumi.getter(name="isFork") def is_fork(self) -> pulumi.Output[bool]: """ True if the repository was created as a fork. """ return pulumi.get(self, "is_fork") @property @pulumi.getter def name(self) -> pulumi.Output[str]: """ The name of the git repository. """ return pulumi.get(self, "name") @property @pulumi.getter(name="parentRepositoryId") def parent_repository_id(self) -> pulumi.Output[Optional[str]]: """ The ID of a Git project from which a fork is to be created. """ return pulumi.get(self, "parent_repository_id") @property @pulumi.getter(name="projectId") def project_id(self) -> pulumi.Output[str]: """ The project ID or project name. """ return pulumi.get(self, "project_id") @property @pulumi.getter(name="remoteUrl") def remote_url(self) -> pulumi.Output[str]: """ Git HTTPS URL of the repository """ return pulumi.get(self, "remote_url") @property @pulumi.getter def size(self) -> pulumi.Output[int]: """ Size in bytes. """ return pulumi.get(self, "size") @property @pulumi.getter(name="sshUrl") def ssh_url(self) -> pulumi.Output[str]: """ Git SSH URL of the repository. """ return pulumi.get(self, "ssh_url") @property @pulumi.getter def url(self) -> pulumi.Output[str]: """ REST API URL of the repository. """ return pulumi.get(self, "url") @property @pulumi.getter(name="webUrl") def web_url(self) -> pulumi.Output[str]: """ Web link to the repository. """ return pulumi.get(self, "web_url")
38.684366
164
0.62277
2,978
26,228
5.266622
0.075554
0.073642
0.069625
0.068732
0.868528
0.834353
0.806299
0.779967
0.772635
0.739926
0
0.003812
0.269864
26,228
677
165
38.741507
0.815196
0.372236
0
0.606452
1
0
0.103477
0.01882
0
0
0
0
0
1
0.16129
false
0.003226
0.022581
0
0.283871
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
56f97dff5db86d4d4119464fd5fd4152e4c555e4
29,095
py
Python
cv/crop.py
nanpuhaha/cv-tools
53444a9defda02d4589c159d811639bc59c754bf
[ "MIT" ]
null
null
null
cv/crop.py
nanpuhaha/cv-tools
53444a9defda02d4589c159d811639bc59c754bf
[ "MIT" ]
null
null
null
cv/crop.py
nanpuhaha/cv-tools
53444a9defda02d4589c159d811639bc59c754bf
[ "MIT" ]
null
null
null
import cv2 import numpy as np from cv.io import imread def compute_area(ymax, ymin, xmax, xmin): """function that computes rectangle area""" return (ymax - ymin) * (xmax - xmin) def reset_variables(var): """ function that reset all variables for row analysis used after every row evaluation """ var["coord_upper_left"] = {"x": 0, "y": 0} var["coord_lower_left"] = {"x": 0, "y": 0} var["coord_upper_right"] = {"x": 0, "y": 0} var["coord_lower_right"] = {"x": 0, "y": 0} var["upper_left"] = False var["lower_left"] = False var["unhindered"] = [] def find_largest_rectangle(real_image): if not isinstance(real_image, np.ndarray): print(f"find_max_rectangle() -> Image is None.. Break!") raise ValueError(f"Image is None") var = { "coord_upper_left": {"x": 0, "y": 0}, "coord_lower_left": {"x": 0, "y": 0}, "coord_upper_right": {"x": 0, "y": 0}, "coord_lower_right": {"x": 0, "y": 0}, "upper_left": False, "lower_left": False, "unhindered": [], } # Initial area of our first rectangle area = 0 image = cv2.cvtColor(real_image, cv2.COLOR_BGR2GRAY) ret, bin_image = cv2.threshold(image, 128, 1, cv2.THRESH_BINARY) # Shape of image height, width = bin_image.shape for i in range(height): # Reset all variables reset_variables(var) # Dealing with the case of last row # Check that our current area is larger than the max of area remaining to check # If so no need to continue if area > (width * (height - i)): break for j in range(width): # Find the first line of pixels containing "1" if bin_image[i, j] == 0 and not (var["upper_left"]): # Do not consider pixels that are equal to 0 unless upper left bound is ddefined continue if bin_image[i, j] == 1 and not (var["upper_left"]): # We found our "1" pixel that defines our upper left coordinate var["coord_upper_left"]["x"] = j var["coord_upper_left"]["y"] = i if j == (width - 1): var["coord_upper_right"]["y"] = i var["coord_upper_right"]["x"] = j var["upper_left"] = True # define our upper right coordinate after upper left coordinate has been set if (bin_image[i, j] == 0 and var["upper_left"]) or ( bin_image[i, j] == 1 and j == (width - 1) and var["upper_left"] ): var["coord_upper_right"]["x"] = j - 1 var["coord_upper_right"]["y"] = i if j == (width - 1): var["coord_upper_right"]["x"] = j var["upper_left"] = False # Vertical evaluation of previously found line through rows # Horizontal and vertical counters for evaluation for horizontal_counter in range( var["coord_upper_left"]["x"], (var["coord_upper_right"]["x"] + 1) ): for vertical_counter in range((i + 1), height): # iteratively check rectangles using lower left tracker # we hit a bound when we meet a '0' pixel or we hit the height if bin_image[ vertical_counter, horizontal_counter ] == 0 and not (var["lower_left"]): var["lower_left"] = True var["coord_lower_left"]["x"] = horizontal_counter var["coord_lower_left"]["y"] = vertical_counter - 1 # compute the area for this particular case a = vertical_counter - var["coord_upper_left"]["y"] # check to see if a larger area exists # if so set rectangle coordinates if a > area: area = a ymax = height - var["coord_upper_left"]["y"] ymin = height - var["coord_lower_left"]["y"] - 1 xmax = var["coord_lower_left"]["x"] + 1 xmin = var["coord_lower_left"]["x"] # No need to continue downward, we have our first vertical line # so we break the vertical counter loop break # if we hit the bottom and we find no lower left bound # we set a lower left coordinate to last element of the vertical line if ( vertical_counter == height - 1 and bin_image[vertical_counter, horizontal_counter] == 1 and not (var["lower_left"]) ): var["lower_left"] = True var["coord_lower_left"]["x"] = horizontal_counter var["coord_lower_left"]["y"] = vertical_counter # compute area and compare it a = height - var["coord_upper_left"]["y"] if a > area: area = a ymax = height - var["coord_upper_left"]["y"] ymin = height - var["coord_lower_left"]["y"] - 1 xmax = var["coord_lower_left"]["x"] + 1 xmin = var["coord_lower_left"]["x"] break # lower left coordinate has already been set # so we are basically checking vertical lines along our initial pixel line at the top if ( bin_image[vertical_counter, horizontal_counter] == 0 and var["lower_left"] ): if var["coord_lower_left"]["y"] < vertical_counter - 1: # we went lower than the what had already ben set as a lower left bound # so a new unhindered element has to be created # UNHINDERED RECTANGLES are those that continue to grow horizontally without meeting an obstacle # unhindered elements contain current lower left coordinates as well as upper left coordinates # they will be used to evaluate unhindered rectangle that linger between lower and upper bounds (most disturbing cases) len_unhindered = len(var["unhindered"]) # we do not want to make hindered rectangles unhindered so we have to check that they are not already set already = False for l in range(len_unhindered): if ( var["unhindered"][l][0] == var["coord_lower_left"]["y"] ): already = True if not (already): var["unhindered"].append( [ var["coord_lower_left"]["y"], var["coord_lower_left"]["x"], var["coord_upper_left"]["y"], var["coord_upper_left"]["x"], ] ) # we set new lower bounds and upper bounds accordingly var["coord_lower_left"]["x"] = horizontal_counter var["coord_lower_left"]["y"] = vertical_counter - 1 var["coord_upper_left"]["x"] = horizontal_counter # upper counter "y" coordinate remains the same # compute the area and compare it accordignly a = vertical_counter - var["coord_upper_left"]["y"] if a > area: area = a ymax = height - var["coord_upper_left"]["y"] ymin = height - var["coord_lower_left"]["y"] - 1 xmax = horizontal_counter + 1 xmin = var["coord_upper_left"]["x"] # Now we compute areas of above unhindered rectangles # and compare their areas length_unhindered = len(var["unhindered"]) for l in range(length_unhindered): unhindered_area = compute_area( (height - var["unhindered"][l][2]), (height - var["unhindered"][l][0] - 1), (horizontal_counter + 1), var["unhindered"][l][1], ) if unhindered_area > area: area = unhindered_area ymax = height - var["unhindered"][l][2] ymin = height - var["unhindered"][l][0] - 1 xmax = horizontal_counter + 1 xmin = var["unhindered"][l][1] break # We remained higher than our lower left bound that we had set # we therefore get rid of unhindered rectangles that do not need # to be considered because they have become hindered # new unhindered are also created if var["coord_lower_left"]["y"] > (vertical_counter - 1): # first insert a new unhindered element lower bound between current hindered elements # correct particular exceptions length_unhindered = len(var["unhindered"]) checked = False added = False for l in range(length_unhindered): if var["unhindered"][l][0] < vertical_counter - 1: checked = True if var["unhindered"][l][0] > vertical_counter - 1: var["unhindered"].insert( l, [ vertical_counter - 1, var["unhindered"][l][1], var["unhindered"][l][2], var["unhindered"][l][3], ], ) added = True break if checked and not (added): var["unhindered"].append( [ (vertical_counter - 1), (var["coord_lower_left"]["x"]), var["coord_upper_left"]["y"], var["coord_lower_left"]["x"], ] ) # now get rid of hindered elements length_unhindered = len(var["unhindered"]) if length_unhindered != 0: indices = [] for l in range(length_unhindered): if var["unhindered"][l][0] > ( vertical_counter - 1 ): indices.append(l) indices.reverse() for indice in indices: var["unhindered"].pop(indice) # compute remaining areas # first check to see if there were indeed unhidered elements previously created # compute and compare their areas if length_unhindered != 0: length_unhindered = len(var["unhindered"]) var["coord_lower_left"]["y"] = vertical_counter - 1 var["coord_lower_left"]["x"] = ( var["unhindered"][length_unhindered - 1][1] + 1 ) for l in range(length_unhindered): unhindered_area = compute_area( (height - var["unhindered"][l][2]), (height - var["unhindered"][l][0] - 1), (horizontal_counter + 1), var["unhindered"][l][1], ) if unhindered_area > area: area = unhindered_area ymax = height - var["unhindered"][l][2] ymin = height - var["unhindered"][l][0] - 1 xmax = horizontal_counter + 1 xmin = var["unhindered"][l][1] if length_unhindered == 0: var["coord_lower_left"]["y"] = vertical_counter - 1 # compute one area a = compute_area( (height - var["coord_upper_left"]["y"]), (height - var["coord_lower_left"]["y"] - 1), (horizontal_counter + 1), (var["coord_lower_left"]["x"]), ) if a > area: area = a ymax = height - var["coord_upper_left"]["y"] ymin = height - var["coord_lower_left"]["y"] - 1 xmax = horizontal_counter + 1 xmin = var["coord_lower_left"]["x"] break # if we stay at the same lower bound if ( var["coord_lower_left"]["y"] == (vertical_counter - 1) ) or ( var["coord_lower_left"]["y"] == vertical_counter and vertical_counter == height - 1 ): # compute and compare a = compute_area( (height - var["coord_upper_left"]["y"]), (height - var["coord_lower_left"]["y"] - 1), (horizontal_counter + 1), (var["coord_lower_left"]["x"]), ) if a > area: area = a ymax = height - var["coord_upper_left"]["y"] ymin = height - var["coord_lower_left"]["y"] - 1 xmax = horizontal_counter + 1 xmin = var["coord_lower_left"]["x"] # check unhindered elements length_unhindered = len(var["unhindered"]) for l in range(length_unhindered): unhindered_area = compute_area( (height - var["unhindered"][l][2]), (height - var["unhindered"][l][0] - 1), (horizontal_counter + 1), var["unhindered"][l][1], ) if unhindered_area > area: area = unhindered_area ymax = height - var["unhindered"][l][2] ymin = height - var["unhindered"][l][0] - 1 xmax = horizontal_counter + 1 xmin = var["unhindered"][l][1] break break # Special case where we hit the bottom if ( bin_image[vertical_counter, horizontal_counter] == 1 and var["lower_left"] and vertical_counter == (height - 1) ): if var["coord_lower_left"]["y"] < vertical_counter: # we went lower than the what had already ben set as a lower left bound # so a new unhindered element has to be created # unhindered elements contain current lower left coordinates as well as upper left coordinates # they will be used to evaluate unhindered rectangle that linger between lower and upper bounds (most disturbing cases) len_unhindered = len(var["unhindered"]) already = False for l in range(len_unhindered): if ( var["unhindered"][l][0] == var["coord_lower_left"]["y"] ): already = True if not (already): var["unhindered"].append( [ var["coord_lower_left"]["y"], var["coord_lower_left"]["x"], var["coord_upper_left"]["y"], var["coord_upper_left"]["x"], ] ) # we set new lower bounds and upper bounds accordingly var["coord_lower_left"]["x"] = horizontal_counter var["coord_lower_left"]["y"] = vertical_counter var["coord_upper_left"]["x"] = horizontal_counter # upper counter "y" coordinate remains the same # compute the area and compare it accordignly a = height - var["coord_upper_left"]["y"] if a > area: area = a ymax = height - var["coord_upper_left"]["y"] ymin = height - var["coord_lower_left"]["y"] - 1 xmax = horizontal_counter + 1 xmin = var["coord_upper_left"]["x"] # Now we compute areas of above unhindered rectangles # and compare their areas length_unhindered = len(var["unhindered"]) for l in range(length_unhindered): unhindered_area = compute_area( (height - var["unhindered"][l][2]), (height - var["unhindered"][l][0] - 1), (horizontal_counter + 1), var["unhindered"][l][1], ) if unhindered_area > area: area = unhindered_area ymax = height - var["unhindered"][l][2] ymin = height - var["unhindered"][l][0] - 1 xmax = horizontal_counter + 1 xmin = var["unhindered"][l][1] break # We remained higher than our lower left bound that we had set # we therefore get rid of unhindered elements (rectangles) that do not need # to be considered because they have become hindered if var["coord_lower_left"]["y"] > (vertical_counter): # first insert a new unhindered element lower bound between current hindered elements length_unhindered = len(var["unhindered"]) for l in range(length_unhindered): if var["unhindered"][l][0] > vertical_counter - 1: var["unhindered"].insert( l, [ vertical_counter - 1, var["unhindered"][l][1], var["unhindered"][l][2], var["unhindered"][l][3], ], ) break # now get rid of hindered elements length_unhindered = len(var["unhindered"]) if length_unhindered != 0: indices = [] for l in range(length_unhindered): if var["unhindered"][l][0] > ( vertical_counter - 1 ): indices.append(l) indices.reverse() for indice in indices: var["unhindered"].pop(indice) # compute remaining areas # first check to see if there were indeed unhidered elements previously created # compute and compare their areas if length_unhindered != 0: length_unhindered = len(var["unhindered"]) var["coord_lower_left"]["y"] = vertical_counter - 1 var["coord_lower_left"]["x"] = ( var["unhindered"][length_unhindered - 1][1] + 1 ) for l in range(length_unhindered): unhindered_area = compute_area( (height - var["unhindered"][l][2]), (height - var["unhindered"][l][0] - 1), (horizontal_counter + 1), var["unhindered"][l][1], ) if unhindered_area > area: area = unhindered_area ymax = height - var["unhindered"][l][2] ymin = height - var["unhindered"][l][0] - 1 xmax = horizontal_counter + 1 xmin = var["unhindered"][l][1] if length_unhindered == 0: var["coord_lower_left"]["y"] = vertical_counter - 1 # compute one area a = compute_area( (height - var["coord_upper_left"]["y"]), (height - var["coord_lower_left"]["y"] - 1), (horizontal_counter + 1), (var["coord_lower_left"]["x"]), ) if a > area: area = a ymax = height - var["coord_upper_left"]["y"] ymin = height - var["coord_lower_left"]["y"] - 1 xmax = horizontal_counter + 1 xmin = var["coord_lower_left"]["x"] break # if we stay at the same lower bound if ( var["coord_lower_left"]["y"] == (vertical_counter - 1) ) or ( var["coord_lower_left"]["y"] == vertical_counter and vertical_counter == height - 1 ): # compute and compare a = compute_area( (height - var["coord_upper_left"]["y"]), (height - var["coord_lower_left"]["y"] - 1), (horizontal_counter + 1), (var["coord_lower_left"]["x"]), ) if a > area: area = a ymax = height - var["coord_upper_left"]["y"] ymin = height - var["coord_lower_left"]["y"] - 1 xmax = horizontal_counter + 1 xmin = var["coord_lower_left"]["x"] # check unhindered elements length_unhindered = len(var["unhindered"]) for l in range(length_unhindered): unhindered_area = compute_area( (height - var["unhindered"][l][2]), (height - var["unhindered"][l][0] - 1), (horizontal_counter + 1), var["unhindered"][l][1], ) if unhindered_area > area: area = unhindered_area ymax = height - var["unhindered"][l][2] ymin = height - var["unhindered"][l][0] - 1 xmax = horizontal_counter + 1 xmin = var["unhindered"][l][1] break break reset_variables(var) results = [xmin, (height - ymax), (xmax - 1), (height - ymin - 1)] return results
60.238095
151
0.360406
2,293
29,095
4.416485
0.095944
0.073467
0.071887
0.092327
0.78819
0.771798
0.766762
0.748395
0.72361
0.700899
0
0.013901
0.55989
29,095
482
152
60.363071
0.776962
0.128819
0
0.763021
0
0
0.102527
0
0
0
0
0
0
1
0.007813
false
0
0.007813
0
0.020833
0.002604
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
1
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
7123441fe841ad5e84b0ed47891873d1bff4a693
5,973
py
Python
osc_bge/school/migrations/0005_auto_20181130_1342.py
jisuhan3201/osc-bge
125c441d23d7f1fdb2d9b8f42f859082e757e25a
[ "MIT" ]
null
null
null
osc_bge/school/migrations/0005_auto_20181130_1342.py
jisuhan3201/osc-bge
125c441d23d7f1fdb2d9b8f42f859082e757e25a
[ "MIT" ]
5
2020-06-05T19:49:47.000Z
2021-09-08T00:50:55.000Z
osc_bge/school/migrations/0005_auto_20181130_1342.py
jisuhan3201/osc-bge
125c441d23d7f1fdb2d9b8f42f859082e757e25a
[ "MIT" ]
null
null
null
# Generated by Django 2.0.9 on 2018-11-30 13:42 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('school', '0004_auto_20181130_1342'), ('users', '0003_bgebranchcoordinator'), ('bge', '0001_initial'), ] operations = [ migrations.AddField( model_name='school', name='admission_coordi', field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='admission_coordi', to='users.BgeBranchCoordinator'), ), migrations.AddField( model_name='school', name='partnership', field=models.BooleanField(default=False), ), migrations.AddField( model_name='school', name='provider', field=models.CharField(blank=True, choices=[('bge', 'BGE'), ('other_providers', 'Other-Provider')], max_length=80, null=True), ), migrations.AddField( model_name='school', name='provider_branch', field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='bge.BgeBranch'), ), migrations.AddField( model_name='school', name='religion', field=models.CharField(blank=True, max_length=80, null=True), ), migrations.AddField( model_name='school', name='school_coordi', field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='school_coordi', to='users.BgeBranchCoordinator'), ), migrations.AddField( model_name='school', name='web_url', field=models.CharField(blank=True, max_length=140, null=True), ), migrations.AddField( model_name='secondary', name='accept_12_grade', field=models.BooleanField(default=False), ), migrations.AddField( model_name='secondary', name='admission_documents', field=models.TextField(blank=True, null=True), ), migrations.AddField( model_name='secondary', name='admission_requirements', field=models.TextField(blank=True, null=True), ), migrations.AddField( model_name='secondary', name='application_fee', field=models.IntegerField(blank=True, null=True), ), migrations.AddField( model_name='secondary', name='avg_sat', field=models.CharField(blank=True, max_length=80, null=True), ), migrations.AddField( model_name='secondary', name='class_size', field=models.CharField(blank=True, max_length=80, null=True), ), migrations.AddField( model_name='secondary', name='college_acceptance_rate', field=models.CharField(blank=True, max_length=80, null=True), ), migrations.AddField( model_name='secondary', name='esl', field=models.BooleanField(default=False), ), migrations.AddField( model_name='secondary', name='facilities', field=models.TextField(blank=True, null=True), ), migrations.AddField( model_name='secondary', name='list_ap_courses', field=models.TextField(blank=True, null=True), ), migrations.AddField( model_name='secondary', name='list_honor_courses', field=models.TextField(blank=True, null=True), ), migrations.AddField( model_name='secondary', name='list_sports', field=models.TextField(blank=True, null=True), ), migrations.AddField( model_name='secondary', name='selling_point', field=models.TextField(blank=True, null=True), ), migrations.AddField( model_name='secondary', name='student_body', field=models.CharField(blank=True, choices=[('boys', 'Boys'), ('girls', 'Girls'), ('coed', 'Coed')], max_length=80, null=True), ), migrations.AddField( model_name='secondary', name='student_teach_ratio', field=models.CharField(blank=True, max_length=80, null=True), ), migrations.AddField( model_name='secondary', name='uniform', field=models.BooleanField(default=False), ), migrations.AlterField( model_name='secondary', name='number_ap_courses', field=models.CharField(blank=True, max_length=80, null=True), ), migrations.AlterField( model_name='secondary', name='number_clubs', field=models.CharField(blank=True, max_length=80, null=True), ), migrations.AlterField( model_name='secondary', name='number_honor_courses', field=models.CharField(blank=True, max_length=80, null=True), ), migrations.AlterField( model_name='secondary', name='number_sports', field=models.CharField(blank=True, max_length=80, null=True), ), migrations.AddField( model_name='schooltypes', name='school', field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='school_type', to='school.School'), ), migrations.AddField( model_name='schoolphotos', name='school', field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='school_photo', to='school.School'), ), ]
36.87037
171
0.574753
581
5,973
5.748709
0.180723
0.078144
0.172156
0.202096
0.813772
0.813772
0.759581
0.720659
0.706287
0.683533
0
0.015767
0.29918
5,973
161
172
37.099379
0.782131
0.007534
0
0.690323
1
0
0.150861
0.024468
0
0
0
0
0
1
0
false
0
0.012903
0
0.032258
0
0
0
0
null
0
0
1
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
8
8536106b7264ff53eba9af733e8fa70015b25c6a
23,615
py
Python
src/blender/blender_autocomplete-master/2.92/bl_ui/properties_material_gpencil.py
JonasWard/ClayAdventures
a716445ac690e4792e70658319aa1d5299f9c9e9
[ "MIT" ]
1
2020-03-25T10:55:10.000Z
2020-03-25T10:55:10.000Z
src/blender/blender_autocomplete-master/2.92/bl_ui/properties_material_gpencil.py
JonasWard/ClayAdventures
a716445ac690e4792e70658319aa1d5299f9c9e9
[ "MIT" ]
null
null
null
src/blender/blender_autocomplete-master/2.92/bl_ui/properties_material_gpencil.py
JonasWard/ClayAdventures
a716445ac690e4792e70658319aa1d5299f9c9e9
[ "MIT" ]
null
null
null
import sys import typing import bpy_types import rna_prop_ui import bl_ui.utils import bl_ui.properties_grease_pencil_common class GPENCIL_MT_material_context_menu(bpy_types.Menu, bpy_types._GenericUI): bl_label = None ''' ''' bl_rna = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass def as_pointer(self): ''' ''' pass def bl_rna_get_subclass(self): ''' ''' pass def bl_rna_get_subclass_py(self): ''' ''' pass def draw(self, _context): ''' ''' pass def draw_collapsible(self, context, layout): ''' ''' pass def draw_preset(self, _context): ''' ''' pass def driver_add(self): ''' ''' pass def driver_remove(self): ''' ''' pass def get(self): ''' ''' pass def is_extended(self): ''' ''' pass def is_property_hidden(self): ''' ''' pass def is_property_overridable_library(self): ''' ''' pass def is_property_readonly(self): ''' ''' pass def is_property_set(self): ''' ''' pass def items(self): ''' ''' pass def keyframe_delete(self): ''' ''' pass def keyframe_insert(self): ''' ''' pass def keys(self): ''' ''' pass def path_from_id(self): ''' ''' pass def path_menu(self, searchpaths, operator, props_default, prop_filepath, filter_ext, filter_path, display_name, add_operator): ''' ''' pass def path_resolve(self): ''' ''' pass def pop(self): ''' ''' pass def prepend(self, draw_func): ''' ''' pass def property_overridable_library_set(self): ''' ''' pass def property_unset(self): ''' ''' pass def remove(self, draw_func): ''' ''' pass def type_recast(self): ''' ''' pass def values(self): ''' ''' pass class GPENCIL_UL_matslots(bpy_types.UIList, bpy_types._GenericUI): bl_rna = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass def as_pointer(self): ''' ''' pass def bl_rna_get_subclass(self): ''' ''' pass def bl_rna_get_subclass_py(self): ''' ''' pass def draw_item(self, _context, layout, _data, item, icon, _active_data, _active_propname, _index): ''' ''' pass def driver_add(self): ''' ''' pass def driver_remove(self): ''' ''' pass def get(self): ''' ''' pass def is_extended(self): ''' ''' pass def is_property_hidden(self): ''' ''' pass def is_property_overridable_library(self): ''' ''' pass def is_property_readonly(self): ''' ''' pass def is_property_set(self): ''' ''' pass def items(self): ''' ''' pass def keyframe_delete(self): ''' ''' pass def keyframe_insert(self): ''' ''' pass def keys(self): ''' ''' pass def path_from_id(self): ''' ''' pass def path_resolve(self): ''' ''' pass def pop(self): ''' ''' pass def prepend(self, draw_func): ''' ''' pass def property_overridable_library_set(self): ''' ''' pass def property_unset(self): ''' ''' pass def remove(self, draw_func): ''' ''' pass def type_recast(self): ''' ''' pass def values(self): ''' ''' pass class GPMaterialButtonsPanel: bl_context = None ''' ''' bl_region_type = None ''' ''' bl_space_type = None ''' ''' def poll(self, context): ''' ''' pass class MATERIAL_PT_gpencil_material_presets( bl_ui.utils.PresetPanel, bpy_types.Panel, bpy_types._GenericUI): bl_label = None ''' ''' bl_region_type = None ''' ''' bl_rna = None ''' ''' bl_space_type = None ''' ''' id_data = None ''' ''' preset_add_operator = None ''' ''' preset_operator = None ''' ''' preset_subdir = None ''' ''' def append(self, draw_func): ''' ''' pass def as_pointer(self): ''' ''' pass def bl_rna_get_subclass(self): ''' ''' pass def bl_rna_get_subclass_py(self): ''' ''' pass def draw(self, context): ''' ''' pass def draw_menu(self, layout, text): ''' ''' pass def draw_panel_header(self, layout): ''' ''' pass def driver_add(self): ''' ''' pass def driver_remove(self): ''' ''' pass def get(self): ''' ''' pass def is_extended(self): ''' ''' pass def is_property_hidden(self): ''' ''' pass def is_property_overridable_library(self): ''' ''' pass def is_property_readonly(self): ''' ''' pass def is_property_set(self): ''' ''' pass def items(self): ''' ''' pass def keyframe_delete(self): ''' ''' pass def keyframe_insert(self): ''' ''' pass def keys(self): ''' ''' pass def path_from_id(self): ''' ''' pass def path_menu(self, searchpaths, operator, props_default, prop_filepath, filter_ext, filter_path, display_name, add_operator): ''' ''' pass def path_resolve(self): ''' ''' pass def pop(self): ''' ''' pass def prepend(self, draw_func): ''' ''' pass def property_overridable_library_set(self): ''' ''' pass def property_unset(self): ''' ''' pass def remove(self, draw_func): ''' ''' pass def type_recast(self): ''' ''' pass def values(self): ''' ''' pass class MATERIAL_PT_gpencil_slots( bl_ui.properties_grease_pencil_common.GreasePencilMaterialsPanel, bpy_types.Panel, bpy_types._GenericUI): bl_context = None ''' ''' bl_label = None ''' ''' bl_options = None ''' ''' bl_region_type = None ''' ''' bl_rna = None ''' ''' bl_space_type = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass def as_pointer(self): ''' ''' pass def bl_rna_get_subclass(self): ''' ''' pass def bl_rna_get_subclass_py(self): ''' ''' pass def draw(self, context): ''' ''' pass def driver_add(self): ''' ''' pass def driver_remove(self): ''' ''' pass def get(self): ''' ''' pass def is_extended(self): ''' ''' pass def is_property_hidden(self): ''' ''' pass def is_property_overridable_library(self): ''' ''' pass def is_property_readonly(self): ''' ''' pass def is_property_set(self): ''' ''' pass def items(self): ''' ''' pass def keyframe_delete(self): ''' ''' pass def keyframe_insert(self): ''' ''' pass def keys(self): ''' ''' pass def path_from_id(self): ''' ''' pass def path_resolve(self): ''' ''' pass def poll(self, context): ''' ''' pass def pop(self): ''' ''' pass def prepend(self, draw_func): ''' ''' pass def property_overridable_library_set(self): ''' ''' pass def property_unset(self): ''' ''' pass def remove(self, draw_func): ''' ''' pass def type_recast(self): ''' ''' pass def values(self): ''' ''' pass class MATERIAL_PT_gpencil_custom_props(GPMaterialButtonsPanel, rna_prop_ui.PropertyPanel, bpy_types.Panel, bpy_types._GenericUI): COMPAT_ENGINES = None ''' ''' bl_context = None ''' ''' bl_label = None ''' ''' bl_options = None ''' ''' bl_order = None ''' ''' bl_region_type = None ''' ''' bl_rna = None ''' ''' bl_space_type = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass def as_pointer(self): ''' ''' pass def bl_rna_get_subclass(self): ''' ''' pass def bl_rna_get_subclass_py(self): ''' ''' pass def draw(self, context): ''' ''' pass def driver_add(self): ''' ''' pass def driver_remove(self): ''' ''' pass def get(self): ''' ''' pass def is_extended(self): ''' ''' pass def is_property_hidden(self): ''' ''' pass def is_property_overridable_library(self): ''' ''' pass def is_property_readonly(self): ''' ''' pass def is_property_set(self): ''' ''' pass def items(self): ''' ''' pass def keyframe_delete(self): ''' ''' pass def keyframe_insert(self): ''' ''' pass def keys(self): ''' ''' pass def path_from_id(self): ''' ''' pass def path_resolve(self): ''' ''' pass def poll(self, context): ''' ''' pass def pop(self): ''' ''' pass def prepend(self, draw_func): ''' ''' pass def property_overridable_library_set(self): ''' ''' pass def property_unset(self): ''' ''' pass def remove(self, draw_func): ''' ''' pass def type_recast(self): ''' ''' pass def values(self): ''' ''' pass class MATERIAL_PT_gpencil_fillcolor(GPMaterialButtonsPanel, bpy_types.Panel, bpy_types._GenericUI): bl_context = None ''' ''' bl_label = None ''' ''' bl_parent_id = None ''' ''' bl_region_type = None ''' ''' bl_rna = None ''' ''' bl_space_type = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass def as_pointer(self): ''' ''' pass def bl_rna_get_subclass(self): ''' ''' pass def bl_rna_get_subclass_py(self): ''' ''' pass def draw(self, context): ''' ''' pass def draw_header(self, context): ''' ''' pass def driver_add(self): ''' ''' pass def driver_remove(self): ''' ''' pass def get(self): ''' ''' pass def is_extended(self): ''' ''' pass def is_property_hidden(self): ''' ''' pass def is_property_overridable_library(self): ''' ''' pass def is_property_readonly(self): ''' ''' pass def is_property_set(self): ''' ''' pass def items(self): ''' ''' pass def keyframe_delete(self): ''' ''' pass def keyframe_insert(self): ''' ''' pass def keys(self): ''' ''' pass def path_from_id(self): ''' ''' pass def path_resolve(self): ''' ''' pass def poll(self, context): ''' ''' pass def pop(self): ''' ''' pass def prepend(self, draw_func): ''' ''' pass def property_overridable_library_set(self): ''' ''' pass def property_unset(self): ''' ''' pass def remove(self, draw_func): ''' ''' pass def type_recast(self): ''' ''' pass def values(self): ''' ''' pass class MATERIAL_PT_gpencil_options(GPMaterialButtonsPanel, bpy_types.Panel, bpy_types._GenericUI): bl_context = None ''' ''' bl_label = None ''' ''' bl_options = None ''' ''' bl_region_type = None ''' ''' bl_rna = None ''' ''' bl_space_type = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass def as_pointer(self): ''' ''' pass def bl_rna_get_subclass(self): ''' ''' pass def bl_rna_get_subclass_py(self): ''' ''' pass def draw(self, context): ''' ''' pass def driver_add(self): ''' ''' pass def driver_remove(self): ''' ''' pass def get(self): ''' ''' pass def is_extended(self): ''' ''' pass def is_property_hidden(self): ''' ''' pass def is_property_overridable_library(self): ''' ''' pass def is_property_readonly(self): ''' ''' pass def is_property_set(self): ''' ''' pass def items(self): ''' ''' pass def keyframe_delete(self): ''' ''' pass def keyframe_insert(self): ''' ''' pass def keys(self): ''' ''' pass def path_from_id(self): ''' ''' pass def path_resolve(self): ''' ''' pass def poll(self, context): ''' ''' pass def pop(self): ''' ''' pass def prepend(self, draw_func): ''' ''' pass def property_overridable_library_set(self): ''' ''' pass def property_unset(self): ''' ''' pass def remove(self, draw_func): ''' ''' pass def type_recast(self): ''' ''' pass def values(self): ''' ''' pass class MATERIAL_PT_gpencil_preview(GPMaterialButtonsPanel, bpy_types.Panel, bpy_types._GenericUI): COMPAT_ENGINES = None ''' ''' bl_context = None ''' ''' bl_label = None ''' ''' bl_options = None ''' ''' bl_region_type = None ''' ''' bl_rna = None ''' ''' bl_space_type = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass def as_pointer(self): ''' ''' pass def bl_rna_get_subclass(self): ''' ''' pass def bl_rna_get_subclass_py(self): ''' ''' pass def draw(self, context): ''' ''' pass def driver_add(self): ''' ''' pass def driver_remove(self): ''' ''' pass def get(self): ''' ''' pass def is_extended(self): ''' ''' pass def is_property_hidden(self): ''' ''' pass def is_property_overridable_library(self): ''' ''' pass def is_property_readonly(self): ''' ''' pass def is_property_set(self): ''' ''' pass def items(self): ''' ''' pass def keyframe_delete(self): ''' ''' pass def keyframe_insert(self): ''' ''' pass def keys(self): ''' ''' pass def path_from_id(self): ''' ''' pass def path_resolve(self): ''' ''' pass def poll(self, context): ''' ''' pass def pop(self): ''' ''' pass def prepend(self, draw_func): ''' ''' pass def property_overridable_library_set(self): ''' ''' pass def property_unset(self): ''' ''' pass def remove(self, draw_func): ''' ''' pass def type_recast(self): ''' ''' pass def values(self): ''' ''' pass class MATERIAL_PT_gpencil_strokecolor(GPMaterialButtonsPanel, bpy_types.Panel, bpy_types._GenericUI): bl_context = None ''' ''' bl_label = None ''' ''' bl_parent_id = None ''' ''' bl_region_type = None ''' ''' bl_rna = None ''' ''' bl_space_type = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass def as_pointer(self): ''' ''' pass def bl_rna_get_subclass(self): ''' ''' pass def bl_rna_get_subclass_py(self): ''' ''' pass def draw(self, context): ''' ''' pass def draw_header(self, context): ''' ''' pass def driver_add(self): ''' ''' pass def driver_remove(self): ''' ''' pass def get(self): ''' ''' pass def is_extended(self): ''' ''' pass def is_property_hidden(self): ''' ''' pass def is_property_overridable_library(self): ''' ''' pass def is_property_readonly(self): ''' ''' pass def is_property_set(self): ''' ''' pass def items(self): ''' ''' pass def keyframe_delete(self): ''' ''' pass def keyframe_insert(self): ''' ''' pass def keys(self): ''' ''' pass def path_from_id(self): ''' ''' pass def path_resolve(self): ''' ''' pass def poll(self, context): ''' ''' pass def pop(self): ''' ''' pass def prepend(self, draw_func): ''' ''' pass def property_overridable_library_set(self): ''' ''' pass def property_unset(self): ''' ''' pass def remove(self, draw_func): ''' ''' pass def type_recast(self): ''' ''' pass def values(self): ''' ''' pass class MATERIAL_PT_gpencil_surface(GPMaterialButtonsPanel, bpy_types.Panel, bpy_types._GenericUI): bl_context = None ''' ''' bl_label = None ''' ''' bl_region_type = None ''' ''' bl_rna = None ''' ''' bl_space_type = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass def as_pointer(self): ''' ''' pass def bl_rna_get_subclass(self): ''' ''' pass def bl_rna_get_subclass_py(self): ''' ''' pass def draw(self, _context): ''' ''' pass def draw_header_preset(self, _context): ''' ''' pass def driver_add(self): ''' ''' pass def driver_remove(self): ''' ''' pass def get(self): ''' ''' pass def is_extended(self): ''' ''' pass def is_property_hidden(self): ''' ''' pass def is_property_overridable_library(self): ''' ''' pass def is_property_readonly(self): ''' ''' pass def is_property_set(self): ''' ''' pass def items(self): ''' ''' pass def keyframe_delete(self): ''' ''' pass def keyframe_insert(self): ''' ''' pass def keys(self): ''' ''' pass def path_from_id(self): ''' ''' pass def path_resolve(self): ''' ''' pass def poll(self, context): ''' ''' pass def pop(self): ''' ''' pass def prepend(self, draw_func): ''' ''' pass def property_overridable_library_set(self): ''' ''' pass def property_unset(self): ''' ''' pass def remove(self, draw_func): ''' ''' pass def type_recast(self): ''' ''' pass def values(self): ''' ''' pass
12.396325
78
0.385687
1,923
23,615
4.460738
0.054602
0.217067
0.269294
0.075775
0.93425
0.927606
0.91758
0.908254
0.908254
0.908254
0
0
0.482236
23,615
1,904
79
12.402836
0.701562
0
0
0.952381
0
0
0
0
0
0
0
0
0
1
0.425499
false
0.425499
0.009217
0
0.554531
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
1
0
1
0
0
1
0
0
12
85a4aec1fcfc6d209e54db18eba3786578efb9e7
6,907
py
Python
apps/civic_pulse/tests/test_api.py
whoback/GovLens
bd17706ca824838b9284519e95e1f078771ef471
[ "MIT" ]
1
2021-03-02T02:14:46.000Z
2021-03-02T02:14:46.000Z
apps/civic_pulse/tests/test_api.py
whoback/GovLens
bd17706ca824838b9284519e95e1f078771ef471
[ "MIT" ]
null
null
null
apps/civic_pulse/tests/test_api.py
whoback/GovLens
bd17706ca824838b9284519e95e1f078771ef471
[ "MIT" ]
null
null
null
import json from django.test import TestCase from rest_framework.authtoken.models import Token from rest_framework.test import APIClient from django.contrib.auth.models import User from apps.civic_pulse.models import Agency,Entry class AgencyAPITest(TestCase): def setUp(self): Agency.objects.create( name='Test Agency 1' ) Agency.objects.create( name='Test Agency 2' ) self.client = APIClient() def test_GET(self): response = self.client.get('/api/agencies/') self.assertEqual(200, response.status_code) agencies_json = json.loads(response.content.decode("utf-8")) expected_results = [{ 'id': 1, 'name': 'Test Agency 1', 'website': '', 'twitter': '', 'facebook': '', 'phone_number': '', 'address': '', 'description': '', 'last_successful_scrape': None, 'scrape_counter': 0 },{ 'id': 2, 'name': 'Test Agency 2', 'website': '', 'twitter': '', 'facebook': '', 'phone_number': '', 'address': '', 'description': '', 'last_successful_scrape': None, 'scrape_counter': 0 }] self.assertEqual(agencies_json,expected_results) def test_GET_Individual(self): response = self.client.get('/api/agencies/1/') self.assertEqual(200, response.status_code) agency_json = json.loads(response.content.decode("utf-8")) expected_results = { 'id': 1, 'name': 'Test Agency 1', 'website': '', 'twitter': '', 'facebook': '', 'phone_number': '', 'address': '', 'description': '', 'last_successful_scrape': None, 'scrape_counter': 0 } self.assertEqual(agency_json, expected_results) def test_POST_Unauthorized(self): data = { 'name': 'Test POST Agency' } response = self.client.post('/api/agencies/',data=data,format='json') self.assertEqual(401,response.status_code) json_response = json.loads(response.content.decode("utf-8")) self.assertEqual("Authentication credentials were not provided.",json_response['detail']) def test_POST_Authorized(self): user = User.objects.create_user(username='test',email='test@test.test',password='test') token = Token.objects.create(user=user) data = { 'id': 5, 'name': 'Test POST Agency' } self.client.credentials(HTTP_AUTHORIZATION="Token " + token.key) response = self.client.post('/api/agencies/', data=data, format='json') self.assertEqual(201, response.status_code) json_response = json.loads(response.content.decode("utf-8")) expected_results = { 'id': 5, 'name': 'Test POST Agency', 'website': '', 'twitter': '', 'facebook': '', 'phone_number': '', 'address': '', 'description': '', 'last_successful_scrape': None, 'scrape_counter': 0 } self.assertEqual(json_response, expected_results) class EntryAPITest(TestCase): def setUp(self): self.agency = Agency.objects.create( name='Test Agency 1', id=1 ) Entry.objects.create( agency_id=self.agency.id, ) Entry.objects.create( agency_id=self.agency.id, https_enabled=True, ) self.client = APIClient() def test_GET(self): response = self.client.get('/api/entries/') self.assertEqual(200, response.status_code) entries_json = json.loads(response.content.decode("utf-8")) expected_results = [{ 'id': 1, 'agency': 1, 'https_enabled': False, 'has_privacy_policy': False, 'mobile_friendly': False, 'good_performance': False, 'has_social_media': False, 'has_contact_info': False }, { 'id': 2, 'agency': 1, 'https_enabled': True, 'has_privacy_policy': False, 'mobile_friendly': False, 'good_performance': False, 'has_social_media': False, 'has_contact_info': False }] self.assertEqual(entries_json,expected_results) def test_GET_Individual(self): response = self.client.get('/api/entries/1/') self.assertEqual(200, response.status_code) entry_json = json.loads(response.content.decode("utf-8")) expected_results = { 'id': 1, 'agency': 1, 'https_enabled': False, 'has_privacy_policy': False, 'mobile_friendly': False, 'good_performance': False, 'has_social_media': False, 'has_contact_info': False } self.assertEqual(entry_json, expected_results) def test_POST_Unauthorized(self): data = { 'agency': 1, 'https_enabled': True, 'has_privacy_policy': False, 'mobile_friendly': False, 'good_performance': False, 'has_social_media': True, 'has_contact_info': False } response = self.client.post('/api/entries/',data=data,format='json') self.assertEqual(401,response.status_code) json_response = json.loads(response.content.decode("utf-8")) self.assertEqual("Authentication credentials were not provided.",json_response['detail']) def test_POST_Authorized(self): user = User.objects.create_user(username='test',email='test@test.test',password='test') token = Token.objects.create(user=user) data = { 'agency': 1, 'https_enabled': True, 'has_privacy_policy': False, 'mobile_friendly': False, 'good_performance': False, 'has_social_media': True, 'has_contact_info': False } self.client.credentials(HTTP_AUTHORIZATION="Token " + token.key) response = self.client.post('/api/entries/', data=data, format='json') self.assertEqual(201, response.status_code) json_response = json.loads(response.content.decode("utf-8")) expected_results = { 'id': 3, 'agency': 1, 'https_enabled': True, 'has_privacy_policy': False, 'mobile_friendly': False, 'good_performance': False, 'has_social_media': True, 'has_contact_info': False } self.assertEqual(json_response, expected_results)
31.829493
97
0.551035
683
6,907
5.382138
0.144949
0.065288
0.039173
0.052231
0.893362
0.893362
0.836235
0.789445
0.76877
0.742655
0
0.012785
0.320544
6,907
216
98
31.976852
0.770509
0
0
0.774194
0
0
0.209353
0.012741
0
0
0
0
0.086022
1
0.053763
false
0.010753
0.032258
0
0.096774
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
a46d53631ec3a4a3ce8b59845d3d4b120a4470ae
51,089
py
Python
pymatflow/elk/static.py
DeqiTang/pymatflow
bd8776feb40ecef0e6704ee898d9f42ded3b0186
[ "MIT" ]
6
2020-03-06T16:13:08.000Z
2022-03-09T07:53:34.000Z
pymatflow/octopus/static.py
DeqiTang/pymatflow
bd8776feb40ecef0e6704ee898d9f42ded3b0186
[ "MIT" ]
1
2021-10-02T02:23:08.000Z
2021-11-08T13:29:37.000Z
pymatflow/octopus/static.py
DeqiTang/pymatflow
bd8776feb40ecef0e6704ee898d9f42ded3b0186
[ "MIT" ]
1
2021-07-10T16:28:14.000Z
2021-07-10T16:28:14.000Z
#!/usr/bin/env python # _*_ coding: utf-8 _*_ import os import sys import copy import shutil from pymatflow.remote.server import server_handle from pymatflow.octopus.octopus import octopus """ usage: """ class static_run(octopus): """ """ def __init__(self): super().__init__() #self.inp.set_runtype(runtype="static") self.magnetic_status = "spin-unpolarized" # "spin-polarized" "non-collinear" def scf(self, directory="tmp-octopus-static", runopt="gen", auto=0): """ directory: a place for all the generated files runopt: gen -> generate a new calculation but do not run run -> run a calculation on the previously generated files genrun -> generate a calculation and run it """ if runopt == "gen" or runopt == "genrun": if os.path.exists(directory): shutil.rmtree(directory) os.mkdir(directory) #shutil.copyfile("POTCAR", os.path.join(directory, "POTCAR")) os.system("cp %s %s/" % (self.inp[0].system.xyz.file, directory)) #with open(os.path.join(directory, "POSCAR"), 'w') as fout: # self.poscar.to_poscar(fout) # gen llhpc script self.gen_llhpc(directory=directory, scriptname="static-scf.slurm", cmd="$PMF_OCTOPUS") # gen pbs script self.gen_pbs(directory=directory, cmd="$PMF_OCTOPUS", scriptname="static-scf.pbs", jobname=self.run_params["jobname"], nodes=self.run_params["nodes"], ppn=self.run_params["ppn"], queue=self.run_params["queue"]) # gen local bash script self.gen_bash(directory=directory, mpi=self.run_params["mpi"], cmd="$PMF_OCTOPUS", scriptname="static-scf.sh") # gen lsf_sz script self.gen_lsf_sz(directory=directory, cmd="$PMF_OCTOPUS", scriptname="static-scf.lsf_sz", np=self.run_params["nodes"]*self.run_params["ppn"], np_per_node=self.run_params["ppn"]) if runopt == "run" or runopt == "genrun": os.chdir(directory) #os.system("vasp") os.system("bash static-scf.sh") os.chdir("../") server_handle(auto=auto, directory=directory, jobfilebase="static-scf", server=self.run_params["server"]) def nscf(self, directory="tmp-octopus-static", runopt="gen", auto=0): """ directory: a place for all the generated files runopt: gen -> generate a new calculation but do not run run -> run a calculation on the previously generated files genrun -> generate a calculation and run it """ # first check whether there is a previous scf running if not os.path.exists(directory): print("===================================================\n") print(" Warning !!!\n") print("===================================================\n") print("non-scf calculation:\n") print(" directory of previous scf calculattion not found!\n") sys.exit(1) if runopt == "gen" or runopt == "genrun": # gen llhpc script self.gen_llhpc(directory=directory, scriptname="static-nscf.slurm", cmd="$PMF_OCTOPUS") # gen pbs script self.gen_pbs(directory=directory, cmd="$PMF_OCTOPUS", scriptname="static-nscf.pbs", jobname=self.run_params["jobname"], nodes=self.run_params["nodes"], ppn=self.run_params["ppn"]) # gen local bash script self.gen_bash(directory=directory, mpi=self.run_params["mpi"], cmd="$PMF_OCTOPUS", scriptname="static-nscf.sh") # gen lsf_sz script self.gen_lsf_sz(directory=directory, cmd="$PMF_OCTOPUS", scriptname="static-nscf.lsf_sz", np=self.run_params["nodes"]*self.run_params["ppn"], np_per_node=self.run_params["ppn"]) if runopt == "run" or runopt == "genrun": os.chdir(directory) #os.system("vasp") os.system("bash static-nscf.sh") os.chdir("../") server_handle(auto=auto, directory=directory, jobfilebase="static-nscf", server=self.run_params["server"]) def bands(self, directory="tmp-octopus-static", runopt="gen", auto=0): """ directory: a place for all the generated files runopt: gen -> generate a new calculation but do not run run -> run a calculation on the previously generated files genrun -> generate a calculation and run it """ self.set_params({ "Calculation Modes/CalculationMode": "unocc", }) if not os.path.exists(directory): print("===================================================\n") print(" Warning !!!\n") print("===================================================\n") print("bands calculation:\n") print(" directory of previous scf or nscf calculattion not found!\n") sys.exit(1) if runopt == "gen" or runopt == "genrun": # gen llhpc script self.gen_llhpc(directory=directory, scriptname="static-bands.slurm", cmd="$PMF_OCTOPUS") # gen pbs script self.gen_pbs(directory=directory, cmd="$PMF_OCTOPUS", scriptname="static-bands.pbs", jobname=self.run_params["jobname"], nodes=self.run_params["nodes"], ppn=self.run_params["ppn"]) # gen local bash script self.gen_bash(directory=directory, cmd="%s %PMF_OCTOPUS" % self.run_params["mpi"], scriptname="static-bands.sh") # gen lsf_sz script self.gen_lsf_sz(directory=directory, cmd="$PMF_OCTOPUS", scriptname="static-bands.lsf_sz", np=self.run_params["nodes"]*self.run_params["ppn"], np_per_node=self.run_params["ppn"]) if runopt == "run" or runopt == "genrun": os.chdir(directory) #os.system("vasp") os.system("bash static-bands.sh") os.chdir("../") server_handle(auto=auto, directory=directory, jobfilebase="static-bands", server=self.run_params["server"]) def converge_spacing(self, spacing_range=[], directory="tmp-octopus-encut", runopt="gen", auto=0, restart=0): """ spacing_range: [[spacing_x, spacing_y, spacing_z], [spacing_x, spacing_y, spacing_z],...] """ if runopt == "gen" or runopt == "genrun": if os.path.exists(directory): shutil.rmtree(directory) os.mkdir(directory) shutil.copyfile("POTCAR", os.path.join(directory, "POTCAR")) os.system("cp %s %s/" % (self.poscar.xyz.file, directory)) os.chdir(directory) n_test = int((emax - emin) / step) for i in range(n_test + 1): encut = int(emin + i * step) os.mkdir("encut-%d" % encut) self.incar.params['ENCUT'] = encut with open(os.path.join("encut-%d" % encut, "INCAR"), 'w') as fout: self.incar.to_incar(fout) with open(os.path.join("encut-%d" % encut, "POSCAR"), 'w') as fout: self.poscar.to_poscar(fout) with open(os.path.join("encut-%d" % encut, "KPOINTS"), 'w') as fout: self.kpoints.to_kpoints(fout) shutil.copyfile("POTCAR", os.path.join("encut-%d" % encut, "POTCAR")) # gen llhpc script with open("converge-encut.slurm", 'w') as fout: fout.write("#!/bin/bash\n") fout.write("#SBATCH -p %s\n" % self.run_params["partition"]) fout.write("#SBATCH -N %d\n" % self.run_params["nodes"]) fout.write("#SBATCH -n %d\n" % self.run_params["ntask"]) fout.write("#SBATCH -J %s\n" % self.run_params["jobname"]) fout.write("#SBATCH -o %s\n" % self.run_params["stdout"]) fout.write("#SBATCH -e %s\n" % self.run_params["stderr"]) for i in range(n_test + 1): encut = int(emin + i * step) fout.write("cd ./encut-%d\n" % encut) fout.write("yhrun $PMF_OCTOPUS\n") fout.write("cd ../\n") fout.write("\n") # gen pbs running script with open("converge-encut.pbs", 'w') as fout: fout.write("#!/bin/bash\n") fout.write("#PBS -N %s\n" % self.run_params["jobname"]) fout.write("#PBS -l nodes=%d:ppn=%d\n" % (self.run_params["nodes"], self.run_params["ppn"])) if "queue" in self.run_params and self.run_params["queue"] != None: fout.write("#PBS -q %s\n" %self.run_params["queue"]) fout.write("\n") fout.write("cd $PBS_O_WORKDIR\n") fout.write("NP=`cat $PBS_NODEFILE | wc -l`\n") for i in range(n_test + 1): encut = int(emin + i * step) fout.write("cd ./encut-%d\n" % encut) fout.write("mpirun -np $NP -machinefile $PBS_NODEFILE -genv I_MPI_FABRICS shm:tmi %s\n" % ("$PMF_OCTOPUS")) fout.write("cd ../\n") fout.write("\n") os.chdir("../") if runopt == "run" or runopt == "genrun": # run the simulation os.chdir(directory) for i in range(n_test + 1): encut = int(emin + i * step) os.chdir("encut-%d" % encut) os.system("%s vasp" % (self.run_params["mpi"])) os.chdir("../") os.chdir("../") server_handle(auto=auto, directory=directory, jobfilebase="converge-encut", server=self.run_params["server"]) def converge_kpoints(self, kmin, kmax, step, directory="tmp-octopus-kpoints", runopt="gen", auto=0): if runopt == "gen" or runopt == "genrun": if os.path.exists(directory): shutil.rmtree(directory) os.mkdir(directory) shutil.copyfile("POTCAR", os.path.join(directory, "POTCAR")) os.system("cp %s %s/" % (self.poscar.xyz.file, directory)) os.chdir(directory) n_test = int((kmax - kmin) / step) for i in range(n_test + 1): kpoints = int(kmin + i * step) os.mkdir("kpoints-%d" % kpoints) self.kpoints.set_kpoints(kpoints_mp=[kpoints, kpoints, kpoints, 0, 0, 0]) with open(os.path.join("kpoints-%d" % kpoints, "INCAR"), 'w') as fout: self.incar.to_incar(fout) with open(os.path.join("kpoints-%d" % kpoints, "POSCAR"), 'w') as fout: self.poscar.to_poscar(fout) with open(os.path.join("kpoints-%d" % kpoints, "KPOINTS"), 'w') as fout: self.kpoints.to_kpoints(fout) shutil.copyfile("POTCAR", os.path.join("kpoints-%d" % kpoints, "POTCAR")) # gen llhpc script with open("converge-kpoints.slurm", 'w') as fout: fout.write("#!/bin/bash\n") fout.write("#SBATCH -p %s\n" % self.run_params["partition"]) fout.write("#SBATCH -N %d\n" % self.run_params["nodes"]) fout.write("#SBATCH -n %d\n" % self.run_params["ntask"]) fout.write("#SBATCH -J %s\n" % self.run_params["jobname"]) fout.write("#SBATCH -o %s\n" % self.run_params["stdout"]) fout.write("#SBATCH -e %s\n" % self.run_params["stderr"]) for i in range(n_test + 1): kpoints = int(kmin + i * step) fout.write("cd ./kpoints-%d\n" % kpoints) fout.write("yhrun $PMF_OCTOPUS\n") fout.write("cd ../\n") fout.write("\n") # gen pbs running script with open("converge-kpoints.pbs", 'w') as fout: fout.write("#!/bin/bash\n") fout.write("#PBS -N %s\n" % self.run_params["jobname"]) fout.write("#PBS -l nodes=%d:ppn=%d\n" % (self.run_params["nodes"], self.run_params["ppn"])) if "queue" in self.run_params and self.run_params["queue"] != None: fout.write("#PBS -q %s\n" %self.run_params["queue"]) fout.write("\n") fout.write("cd $PBS_O_WORKDIR\n") fout.write("NP=`cat $PBS_NODEFILE | wc -l`\n") for i in range(n_test + 1): kpoints = int(kmin + i * step) fout.write("cd ./kpoints-%d\n" % kpoints) fout.write("mpirun -np $NP -machinefile $PBS_NODEFILE -genv I_MPI_FABRICS shm:tmi %s\n" % ("$PMF_OCTOPUS")) fout.write("cd ../\n") fout.write("\n") os.chdir("../") if runopt == "run" or runopt == "genrun": # run the simulation os.chdir(directory) for i in range(n_test + 1): kpoints = int(kmin + i * step) os.chdir("kpoints-%d" % kpoints) os.system("%s vasp" % (self.run_params["mpi"])) os.chdir("../") os.chdir("../") server_handle(auto=auto, directory=directory, jobfilebase="converge-kpoints", server=self.run_params["server"]) def converge_sigma(self, sigma_min, sigma_max, step, directory="tmp-octopus-sigma", runopt="gen", auto=0): if runopt == "gen" or runopt == "genrun": if os.path.exists(directory): shutil.rmtree(directory) os.mkdir(directory) shutil.copyfile("POTCAR", os.path.join(directory, "POTCAR")) os.system("cp %s %s/" % (self.poscar.xyz.file, directory)) os.chdir(directory) n_test = int((sigma_max - sigma_min) / step) for i in range(n_test + 1): sigma = sigma_min + i * step os.mkdir("sigma-%.6f" % sigma) self.incar.electrons.params['SIGMA'] = sigma with open(os.path.join("sigma-%.6f" % sigma, "INCAR"), "w") as fout: self.incar.to_incar(fout) with open(os.path.join("sigma-%.6f" % sigma, "POSCAR"), 'w') as fout: self.poscar.to_poscar(fout) with open(os.path.join("sigma-%.6f" % sigma, "KPOINTS"), 'w') as fout: self.kpoints.to_kpoints(fout) shutil.copyfile("POTCAR", os.path.join("sigma-%.6f" % sigma, "POTCAR")) # gen llhpc running script with open("converge-sigma.slurm", 'w') as fout: fout.write("#!/bin/bash\n") fout.write("#SBATCH -p %s\n" % self.run_params["partition"]) fout.write("#SBATCH -N %d\n" % self.run_params["nodes"]) fout.write("#SBATCH -n %d\n" % self.run_params["ntask"]) fout.write("#SBATCH -J %s\n" % self.run_params["jobname"]) fout.write("#SBATCH -o %s\n" % self.run_params["stdout"]) fout.write("#SBATCH -e %s\n" % self.run_params["stderr"]) for i in range(n_test + 1): sigma = sigma_min + i * step fout.write("cd ./sigma-%.6f\n" % sigma) fout.write("yhrun %PMF_OCTOPUS\n") fout.write("cd ../\n") fout.write("\n") # gen pbs running script with open("converge-sigma.pbs", 'w') as fout: fout.write("#!/bin/bash\n") fout.write("#PBS -N %s\n" % (self.run_params["jobname"])) fout.write("#PBS -l nodes=%d:ppn=%d\n" % (self.run_params["nodes"], self.run_params["ppn"])) if "queue" in self.run_params and self.run_params["queue"] != None: fout.write("#PBS -q %s\n" %self.run_params["queue"]) fout.write("\n") fout.write("cd $PBS_O_WORKDIR\n") fout.write("NP=`cat $PBS_NODEFILE | wc -l`\n") for i in range(n_test + 1): sigma = sigma_min + i * step fout.write("cd ./sigma-%.6f\n" % sigma) fout.write("mpirun -np $NP -machinefile $PBS_NODEFILE -genv I_MPI_FABRICS shm:tmi %s\n" % ("$PMF_OCTOPUS")) fout.write("cd ../\n") fout.write("\n") os.chdir("../") if runopt == "run" or runopt == "genrun": # run the simulation os.chdir(directory) for i in range(n_test + 1): sigma = sigma_min + i * step os.chdir("sigma-%.6f" % sigma) os.system("%s vasp" % (self.run_params["mpi"])) os.chdir("../") os.chdir("../") server_handle(auto=auto, directory=directory, jobfilebase="converge-sigma", server=self.run_params["server"]) # def set_scf(self, params): pass def band(self, directory="tmp-octopus-static", runopt="gen", auto=0, kpath=None): """ directory: a place for all the generated files runopt: gen -> generate a new calculation but do not run run -> run a calculation on the previously generated files genrun -> generate a calculation and run it Note: scf nscf(bands) in a single run """ if runopt == "gen" or runopt == "genrun": if os.path.exists(directory): shutil.rmtree(directory) os.mkdir(directory) #shutil.copyfile("POTCAR", os.path.join(directory, "POTCAR")) os.system("cp %s %s/" % (self.inp[0].system.xyz.file, directory)) # scf self.inp[0].set_params({ "Calculation Modes/CalculationMode": "gs", }) # nscf: bands self.inp[1].set_params({ "Calculation Modes/CalculationMode": "unocc", }) # gen llhpc script with open(os.path.join(directory, "static.slurm"), 'w') as fout: fout.write("#!/bin/bash\n") fout.write("#SBATCH -p %s\n" % self.run_params["partition"]) fout.write("#SBATCH -N %d\n" % self.run_params["nodes"]) fout.write("#SBATCH -n %d\n" % self.run_params["ntask"]) fout.write("#SBATCH -J %s\n" % self.run_params["jobname"]) fout.write("#SBATCH -o %s\n" % self.run_params["stdout"]) fout.write("#SBATCH -e %s\n" % self.run_params["stderr"]) fout.write("#scf\n") fout.write("cat >inp<<EOF\n") fout.write(self.inp[0].to_string()) fout.write("EOF\n") fout.write("yhrun $PMF_OCTOPUS > output.scf\n") fout.write("# nscf\n") fout.write("cat > inp<<EOF\n") fout.write(self.inp[1].to_string()) fout.write("EOF\n") fout.write("yhrun $PMF_OCTOPUS > output.nscf\n") # gen pbs script with open(os.path.join(directory, "static.pbs"), 'w') as fout: fout.write("#!/bin/bash\n") fout.write("#PBS -N %s\n" % self.run_params["jobname"]) fout.write("#PBS -l nodes=%d:ppn=%d\n" % (self.run_params["nodes"], self.run_params["ppn"])) if "queue" in self.run_params and self.run_params["queue"] != None: fout.write("#PBS -q %s\n" %self.run_params["queue"]) fout.write("\n") fout.write("cd $PBS_O_WORKDIR\n") fout.write("NP=`cat $PBS_NODEFILE | wc -l`\n") fout.write("#scf\n") fout.write("cat >inp<<EOF\n") fout.write(self.inp[0].to_string()) fout.write("EOF\n") fout.write("mpirun -np $NP -machinefile $PBS_NODEFILE $PMF_OCTOPUS > output.scf\n") fout.write("# nscf\n") fout.write("cat > inp<<EOF\n") fout.write(self.inp[1].to_string()) fout.write("EOF\n") fout.write("mpirun -np $NP -machinefile $PBS_NODEFILE $PMF_OCTOPUS > output.nscf\n") # gen local bash script with open(os.path.join(directory, "static.sh"), 'w') as fout: fout.write("#!/bin/bash\n") fout.write("#scf\n") fout.write("cat >inp<<EOF\n") fout.write(self.inp[0].to_string()) fout.write("EOF\n") fout.write("%s $PMF_OCTOPUS > output.scf\n" % self.run_params["mpi"]) fout.write("# nscf\n") fout.write("cat > inp<<EOF\n") fout.write(self.inp[1].to_string()) fout.write("EOF\n") fout.write("%s $PMF_OCTOPUS > output.nscf\n" % self.run_params["mpi"]) # gen lsf_sz script with open(os.path.join(directory, "static.lsf_sz"), 'w') as fout: fout.write("#!/bin/bash\n") fout.write("APP_NAME=%s\n" % self.run_params["queue"]) fout.write("NP=%d\n" % (self.run_params["nodes"] * self.run_params["ppn"])) fout.write("NP_PER_NODE=%d\n" % self.run_params["ppn"]) fout.write("RUN=\"RAW\"\n") fout.write("CURDIR=$PWD\n") fout.write("#VASP=/home-yg/Soft/Vasp5.4/vasp_std\n") fout.write("source /home-yg/env/intel-12.1.sh\n") fout.write("source /home-yg/env/openmpi-1.6.5-intel.sh\n") fout.write("cd $CURDIR\n") fout.write("# starting creating ./nodelist\n") fout.write("rm -rf $CURDIR/nodelist >& /dev/null\n") fout.write("for i in `echo $LSB_HOSTS`\n") fout.write("do\n") fout.write(" echo \"$i\" >> $CURDIR/nodelist \n") fout.write("done\n") fout.write("ndoelist=$(cat $CURDIR/nodelist | uniq | awk \'{print $1}\' | tr \'\n\' \',\')\n") fout.write("#scf\n") fout.write("cat >inp<<EOF\n") fout.write(self.inp[0].to_string()) fout.write("EOF\n") fout.write("mpirun -np $NP -machinefile $CURDIR/nodelist $PMF_OCTOPUS > output.scf\n") fout.write("# nscf\n") fout.write("cat > inp<<EOF\n") fout.write(self.inp[1].to_string()) fout.write("EOF\n") fout.write("mpirun -np $NP -machinefile $CURDIR/nodelist $PMF_OCTOPUS > output.nscf\n") if runopt == "run" or runopt == "genrun": os.chdir(directory) os.system("bash static.sh") os.chdir("../") server_handle(auto=auto, directory=directory, jobfilebase="static", server=self.run_params["server"]) def dos(self, directory="tmp-octopus-static", runopt="gen", auto=0): """ directory: a place for all the generated files runopt: gen -> generate a new calculation but do not run run -> run a calculation on the previously generated files genrun -> generate a calculation and run it Note: scf nscf(dos) in a single run """ """ directory: a place for all the generated files runopt: gen -> generate a new calculation but do not run run -> run a calculation on the previously generated files genrun -> generate a calculation and run it Note: scf nscf(bands) in a single run """ if runopt == "gen" or runopt == "genrun": if os.path.exists(directory): shutil.rmtree(directory) os.mkdir(directory) #shutil.copyfile("POTCAR", os.path.join(directory, "POTCAR")) os.system("cp %s %s/" % (self.inp[0].system.xyz.file, directory)) # scf self.inp[0].set_params({ "Calculation Modes/CalculationMode": "gs", }) # nscf: bands self.inp[1].set_params({ "Calculation Modes/CalculationMode": "unocc", }) # gen llhpc script with open(os.path.join(directory, "static.slurm"), 'w') as fout: fout.write("#!/bin/bash\n") fout.write("#SBATCH -p %s\n" % self.run_params["partition"]) fout.write("#SBATCH -N %d\n" % self.run_params["nodes"]) fout.write("#SBATCH -n %d\n" % self.run_params["ntask"]) fout.write("#SBATCH -J %s\n" % self.run_params["jobname"]) fout.write("#SBATCH -o %s\n" % self.run_params["stdout"]) fout.write("#SBATCH -e %s\n" % self.run_params["stderr"]) fout.write("#scf\n") fout.write("cat >inp<<EOF\n") fout.write(self.inp[0].to_string()) fout.write("EOF\n") fout.write("yhrun $PMF_OCTOPUS > output.scf\n") fout.write("# nscf\n") fout.write("cat > inp<<EOF\n") fout.write(self.inp[1].to_string()) fout.write("EOF\n") fout.write("yhrun $PMF_OCTOPUS \n") # gen pbs script with open(os.path.join(directory, "static.pbs"), 'w') as fout: fout.write("#!/bin/bash\n") fout.write("#PBS -N %s\n" % self.run_params["jobname"]) fout.write("#PBS -l nodes=%d:ppn=%d\n" % (self.run_params["nodes"], self.run_params["ppn"])) if "queue" in self.run_params and self.run_params["queue"] != None: fout.write("#PBS -q %s\n" %self.run_params["queue"]) fout.write("\n") fout.write("cd $PBS_O_WORKDIR\n") fout.write("NP=`cat $PBS_NODEFILE | wc -l`\n") fout.write("#scf\n") fout.write("cat >inp<<EOF\n") fout.write(self.inp[0].to_string()) fout.write("EOF\n") fout.write("mpirun -np $NP -machinefile $PBS_NODEFILE $PMF_OCTOPUS > output.scf\n") fout.write("# nscf\n") fout.write("cat > inp<<EOF\n") fout.write(self.inp[1].to_string()) fout.write("EOF\n") fout.write("mpirun -np $NP -machinefile $PBS_NODEFILE $PMF_OCTOPUS > output.nscf\n") # gen local bash script with open(os.path.join(directory, "static.sh"), 'w') as fout: fout.write("#!/bin/bash\n") fout.write("#scf\n") fout.write("cat >inp<<EOF\n") fout.write(self.inp[0].to_string()) fout.write("EOF\n") fout.write("%s $PMF_OCTOPUS > output.scf\n" % self.run_params["mpi"]) fout.write("# nscf\n") fout.write("cat > inp<<EOF\n") fout.write(self.inp[1].to_string()) fout.write("EOF\n") fout.write("%s $PMF_OCTOPUS > output.nscf\n" % self.run_params["mpi"]) # gen lsf_sz script with open(os.path.join(directory, "static.lsf_sz"), 'w') as fout: fout.write("#!/bin/bash\n") fout.write("APP_NAME=%s\n" % self.run_params["queue"]) fout.write("NP=%d\n" % (self.run_params["nodes"] * self.run_params["ppn"])) fout.write("NP_PER_NODE=%d\n" % self.run_params["ppn"]) fout.write("RUN=\"RAW\"\n") fout.write("CURDIR=$PWD\n") fout.write("#VASP=/home-yg/Soft/Vasp5.4/vasp_std\n") fout.write("source /home-yg/env/intel-12.1.sh\n") fout.write("source /home-yg/env/openmpi-1.6.5-intel.sh\n") fout.write("cd $CURDIR\n") fout.write("# starting creating ./nodelist\n") fout.write("rm -rf $CURDIR/nodelist >& /dev/null\n") fout.write("for i in `echo $LSB_HOSTS`\n") fout.write("do\n") fout.write(" echo \"$i\" >> $CURDIR/nodelist \n") fout.write("done\n") fout.write("ndoelist=$(cat $CURDIR/nodelist | uniq | awk \'{print $1}\' | tr \'\n\' \',\')\n") fout.write("#scf\n") fout.write("cat >inp<<EOF\n") fout.write(self.inp[0].to_string()) fout.write("EOF\n") fout.write("mpirun -np $NP -machinefile $CURDIR/nodelist $PMF_OCTOPUS > output.scf\n") fout.write("# nscf\n") fout.write("cat > inp<<EOF\n") fout.write(self.inp[1].to_string()) fout.write("EOF\n") fout.write("mpirun -np $NP -machinefile $CURDIR/nodelist $PMF_OCTOPUS > output.nscf\n") if runopt == "run" or runopt == "genrun": os.chdir(directory) os.system("bash static.sh") os.chdir("../") server_handle(auto=auto, directory=directory, jobfilebase="static", server=self.run_params["server"]) def optics(self, directory="tmp-octopus-static", runopt="gen", auto=0): """ directory: a place for all the generated files runopt: gen -> generate a new calculation but do not run run -> run a calculation on the previously generated files genrun -> generate a calculation and run it Note: scf nscf(pdos, bands) in a single run """ """ directory: a place for all the generated files runopt: gen -> generate a new calculation but do not run run -> run a calculation on the previously generated files genrun -> generate a calculation and run it Note: scf nscf(bands) in a single run """ if runopt == "gen" or runopt == "genrun": if os.path.exists(directory): shutil.rmtree(directory) os.mkdir(directory) #shutil.copyfile("POTCAR", os.path.join(directory, "POTCAR")) os.system("cp %s %s/" % (self.inp[0].system.xyz.file, directory)) # scf self.inp[0].set_params({ "Calculation Modes/CalculationMode": "gs", }) # nscf: bands self.inp[1].set_params({ "Calculation Modes/CalculationMode": "unocc", }) # gen llhpc script with open(os.path.join(directory, "static.slurm"), 'w') as fout: fout.write("#!/bin/bash\n") fout.write("#SBATCH -p %s\n" % self.run_params["partition"]) fout.write("#SBATCH -N %d\n" % self.run_params["nodes"]) fout.write("#SBATCH -n %d\n" % self.run_params["ntask"]) fout.write("#SBATCH -J %s\n" % self.run_params["jobname"]) fout.write("#SBATCH -o %s\n" % self.run_params["stdout"]) fout.write("#SBATCH -e %s\n" % self.run_params["stderr"]) fout.write("#scf\n") fout.write("cat >inp<<EOF\n") fout.write(self.inp[0].to_string()) fout.write("EOF\n") fout.write("yhrun $PMF_OCTOPUS > output.scf\n") fout.write("# nscf\n") fout.write("cat > inp<<EOF\n") fout.write(self.inp[1].to_string()) fout.write("EOF\n") fout.write("yhrun $PMF_OCTOPUS > output.nscf\n") # gen pbs script with open(os.path.join(directory, "static.pbs"), 'w') as fout: fout.write("#!/bin/bash\n") fout.write("#PBS -N %s\n" % self.run_params["jobname"]) fout.write("#PBS -l nodes=%d:ppn=%d\n" % (self.run_params["nodes"], self.run_params["ppn"])) if "queue" in self.run_params and self.run_params["queue"] != None: fout.write("#PBS -q %s\n" %self.run_params["queue"]) fout.write("\n") fout.write("cd $PBS_O_WORKDIR\n") fout.write("NP=`cat $PBS_NODEFILE | wc -l`\n") fout.write("#scf\n") fout.write("cat >inp<<EOF\n") fout.write(self.inp[0].to_string()) fout.write("EOF\n") fout.write("mpirun -np $NP -machinefile $PBS_NODEFILE $PMF_OCTOPUS > output.scf\n") fout.write("# nscf\n") fout.write("cat > inp<<EOF\n") fout.write(self.inp[1].to_string()) fout.write("EOF\n") fout.write("mpirun -np $NP -machinefile $PBS_NODEFILE $PMF_OCTOPUS > output.nscf\n") # gen local bash script with open(os.path.join(directory, "static.sh"), 'w') as fout: fout.write("#!/bin/bash\n") fout.write("#scf\n") fout.write("cat >inp<<EOF\n") fout.write(self.inp[0].to_string()) fout.write("EOF\n") fout.write("%s $PMF_OCTOPUS > output.scf\n" % self.run_params["mpi"]) fout.write("# nscf\n") fout.write("cat > inp<<EOF\n") fout.write(self.inp[1].to_string()) fout.write("EOF\n") fout.write("%s $PMF_OCTOPUS > output.nscf\n" % self.run_params["mpi"]) # gen lsf_sz script with open(os.path.join(directory, "static.lsf_sz"), 'w') as fout: fout.write("#!/bin/bash\n") fout.write("APP_NAME=%s\n" % self.run_params["queue"]) fout.write("NP=%d\n" % (self.run_params["nodes"] * self.run_params["ppn"])) fout.write("NP_PER_NODE=%d\n" % self.run_params["ppn"]) fout.write("RUN=\"RAW\"\n") fout.write("CURDIR=$PWD\n") fout.write("#VASP=/home-yg/Soft/Vasp5.4/vasp_std\n") fout.write("source /home-yg/env/intel-12.1.sh\n") fout.write("source /home-yg/env/openmpi-1.6.5-intel.sh\n") fout.write("cd $CURDIR\n") fout.write("# starting creating ./nodelist\n") fout.write("rm -rf $CURDIR/nodelist >& /dev/null\n") fout.write("for i in `echo $LSB_HOSTS`\n") fout.write("do\n") fout.write(" echo \"$i\" >> $CURDIR/nodelist \n") fout.write("done\n") fout.write("ndoelist=$(cat $CURDIR/nodelist | uniq | awk \'{print $1}\' | tr \'\n\' \',\')\n") fout.write("#scf\n") fout.write("cat >inp<<EOF\n") fout.write(self.inp[0].to_string()) fout.write("EOF\n") fout.write("mpirun -np $NP -machinefile $CURDIR/nodelist $PMF_OCTOPUS > outpu.scf\n") fout.write("# nscf\n") fout.write("cat > inp<<EOF\n") fout.write(self.inp[1].to_string()) fout.write("EOF\n") fout.write("mpirun -np $NP -machinefile $CURDIR/nodelist $PMF_OCTOPUS > output.nscf\n") if runopt == "run" or runopt == "genrun": os.chdir(directory) os.system("bash static.sh") os.chdir("../") server_handle(auto=auto, directory=directory, jobfilebase="static", server=self.run_params["server"]) def bse(self, directory="tmp-octopus-static", runopt="gen", auto=0, bse_level=0, algo_gw="EVGW"): """ directory: a place for all the generated files runopt: gen -> generate a new calculation but do not run run -> run a calculation on the previously generated files genrun -> generate a calculation and run it bse_level: 0 -> bse on standard DFT 1 -> bse on hybrid functional 2 -> bse on GW Note: Reference: https://www.vasp.at/wiki/index.php/Practical_guide_to_GW_calculations https://www.vasp.at/wiki/index.php/BSE_calculations https://www.vasp.at/wiki/index.php/Dielectric_properties_of_Si_using_BSE https://www.vasp.at/wiki/index.php/Plotting_the_BSE_fatband_structure_of_Si https://www.vasp.at/wiki/index.php/Bandgap_of_Si_in_GW https://www.vasp.at/wiki/index.php/Bandstructure_of_Si_in_GW_(VASP2WANNIER90) https://www.vasp.at/wiki/index.php/Bandstructure_of_SrVO3_in_GW https://www.vasp.at/wiki/index.php/Improving_the_dielectric_function """ """ directory: a place for all the generated files runopt: gen -> generate a new calculation but do not run run -> run a calculation on the previously generated files genrun -> generate a calculation and run it Note: scf nscf(bands) in a single run """ if runopt == "gen" or runopt == "genrun": if os.path.exists(directory): shutil.rmtree(directory) os.mkdir(directory) #shutil.copyfile("POTCAR", os.path.join(directory, "POTCAR")) os.system("cp %s %s/" % (self.inp[0].system.xyz.file, directory)) # scf self.inp[0].set_params({ "Calculation Modes/CalculationMode": "gs", }) # nscf: bands self.inp[1].set_params({ "Calculation Modes/CalculationMode": "unocc", }) # gen llhpc script with open(os.path.join(directory, "static.slurm"), 'w') as fout: fout.write("#!/bin/bash\n") fout.write("#SBATCH -p %s\n" % self.run_params["partition"]) fout.write("#SBATCH -N %d\n" % self.run_params["nodes"]) fout.write("#SBATCH -n %d\n" % self.run_params["ntask"]) fout.write("#SBATCH -J %s\n" % self.run_params["jobname"]) fout.write("#SBATCH -o %s\n" % self.run_params["stdout"]) fout.write("#SBATCH -e %s\n" % self.run_params["stderr"]) fout.write("#scf\n") fout.write("cat >inp<<EOF\n") fout.write(self.inp[0].to_string()) fout.write("EOF\n") fout.write("yhrun $PMF_OCTOPUS > output.scf\n") fout.write("# nscf\n") fout.write("cat > inp<<EOF\n") fout.write(self.inp[1].to_string()) fout.write("EOF\n") fout.write("yhrun $PMF_OCTOPUS > output.nscf\n") # gen pbs script with open(os.path.join(directory, "static.pbs"), 'w') as fout: fout.write("#!/bin/bash\n") fout.write("#PBS -N %s\n" % self.run_params["jobname"]) fout.write("#PBS -l nodes=%d:ppn=%d\n" % (self.run_params["nodes"], self.run_params["ppn"])) if "queue" in self.run_params and self.run_params["queue"] != None: fout.write("#PBS -q %s\n" %self.run_params["queue"]) fout.write("\n") fout.write("cd $PBS_O_WORKDIR\n") fout.write("NP=`cat $PBS_NODEFILE | wc -l`\n") fout.write("#scf\n") fout.write("cat >inp<<EOF\n") fout.write(self.inp[0].to_string()) fout.write("EOF\n") fout.write("mpirun -np $NP -machinefile $PBS_NODEFILE $PMF_OCTOPUS > output.scf\n") fout.write("# nscf\n") fout.write("cat > inp<<EOF\n") fout.write(self.inp[1].to_string()) fout.write("EOF\n") fout.write("mpirun -np $NP -machinefile $PBS_NODEFILE $PMF_OCTOPUS > output.nscf\n") # gen local bash script with open(os.path.join(directory, "static.sh"), 'w') as fout: fout.write("#!/bin/bash\n") fout.write("#scf\n") fout.write("cat >inp<<EOF\n") fout.write(self.inp[0].to_string()) fout.write("EOF\n") fout.write("%s $PMF_OCTOPUS > output.scf\n" % self.run_params["mpi"]) fout.write("# nscf\n") fout.write("cat > inp<<EOF\n") fout.write(self.inp[1].to_string()) fout.write("EOF\n") fout.write("%s $PMF_OCTOPUS > output.nscf\n" % self.run_params["mpi"]) # gen lsf_sz script with open(os.path.join(directory, "static.lsf_sz"), 'w') as fout: fout.write("#!/bin/bash\n") fout.write("APP_NAME=%s\n" % self.run_params["queue"]) fout.write("NP=%d\n" % (self.run_params["nodes"] * self.run_params["ppn"])) fout.write("NP_PER_NODE=%d\n" % self.run_params["ppn"]) fout.write("RUN=\"RAW\"\n") fout.write("CURDIR=$PWD\n") fout.write("#VASP=/home-yg/Soft/Vasp5.4/vasp_std\n") fout.write("source /home-yg/env/intel-12.1.sh\n") fout.write("source /home-yg/env/openmpi-1.6.5-intel.sh\n") fout.write("cd $CURDIR\n") fout.write("# starting creating ./nodelist\n") fout.write("rm -rf $CURDIR/nodelist >& /dev/null\n") fout.write("for i in `echo $LSB_HOSTS`\n") fout.write("do\n") fout.write(" echo \"$i\" >> $CURDIR/nodelist \n") fout.write("done\n") fout.write("ndoelist=$(cat $CURDIR/nodelist | uniq | awk \'{print $1}\' | tr \'\n\' \',\')\n") fout.write("#scf\n") fout.write("cat >inp<<EOF\n") fout.write(self.inp[0].to_string()) fout.write("EOF\n") fout.write("mpirun -np $NP -machinefile $CURDIR/nodelist $PMF_OCTOPUS > output.scf\n") fout.write("# nscf\n") fout.write("cat > inp<<EOF\n") fout.write(self.inp[1].to_string()) fout.write("EOF\n") fout.write("mpirun -np $NP -machinefile $CURDIR/nodelist $PMF_OCTOPUS > output.nscf\n") if runopt == "run" or runopt == "genrun": os.chdir(directory) os.system("bash static.sh") os.chdir("../") server_handle(auto=auto, directory=directory, jobfilebase="static", server=self.run_params["server"]) def stm(self, directory="tmp-octopus-static", runopt="gen", auto=0, hse_in_scf=True): """ directory: a place for all the generated files hse_in_scf: if HSE is used, choose whether to use HSE in both scf and nscf or only in nscf. if HSE is not used, hse_in_scf will do nothing runopt: gen -> generate a new calculation but do not run run -> run a calculation on the previously generated files genrun -> generate a calculation and run it Note: scf stm in a single run """ """ directory: a place for all the generated files runopt: gen -> generate a new calculation but do not run run -> run a calculation on the previously generated files genrun -> generate a calculation and run it Note: scf nscf(bands) in a single run """ if runopt == "gen" or runopt == "genrun": if os.path.exists(directory): shutil.rmtree(directory) os.mkdir(directory) #shutil.copyfile("POTCAR", os.path.join(directory, "POTCAR")) os.system("cp %s %s/" % (self.inp[0].system.xyz.file, directory)) # scf self.inp[0].set_params({ "Calculation Modes/CalculationMode": "gs", }) # nscf: bands self.inp[1].set_params({ "Calculation Modes/CalculationMode": "unocc", }) # gen llhpc script with open(os.path.join(directory, "static.slurm"), 'w') as fout: fout.write("#!/bin/bash\n") fout.write("#SBATCH -p %s\n" % self.run_params["partition"]) fout.write("#SBATCH -N %d\n" % self.run_params["nodes"]) fout.write("#SBATCH -n %d\n" % self.run_params["ntask"]) fout.write("#SBATCH -J %s\n" % self.run_params["jobname"]) fout.write("#SBATCH -o %s\n" % self.run_params["stdout"]) fout.write("#SBATCH -e %s\n" % self.run_params["stderr"]) fout.write("#scf\n") fout.write("cat >inp<<EOF\n") fout.write(self.inp[0].to_string()) fout.write("EOF\n") fout.write("yhrun $PMF_OCTOPUS > output.scf\n") fout.write("# nscf\n") fout.write("cat > inp<<EOF\n") fout.write(self.inp[1].to_string()) fout.write("EOF\n") fout.write("yhrun $PMF_OCTOPUS > output.nscf\n") # gen pbs script with open(os.path.join(directory, "static.pbs"), 'w') as fout: fout.write("#!/bin/bash\n") fout.write("#PBS -N %s\n" % self.run_params["jobname"]) fout.write("#PBS -l nodes=%d:ppn=%d\n" % (self.run_params["nodes"], self.run_params["ppn"])) if "queue" in self.run_params and self.run_params["queue"] != None: fout.write("#PBS -q %s\n" %self.run_params["queue"]) fout.write("\n") fout.write("cd $PBS_O_WORKDIR\n") fout.write("NP=`cat $PBS_NODEFILE | wc -l`\n") fout.write("#scf\n") fout.write("cat >inp<<EOF\n") fout.write(self.inp[0].to_string()) fout.write("EOF\n") fout.write("mpirun -np $NP -machinefile $PBS_NODEFILE $PMF_OCTOPUS > output.scf\n") fout.write("# nscf\n") fout.write("cat > inp<<EOF\n") fout.write(self.inp[1].to_string()) fout.write("EOF\n") fout.write("mpirun -np $NP -machinefile $PBS_NODEFILE $PMF_OCTOPUS > output.nscf\n") # gen local bash script with open(os.path.join(directory, "static.sh"), 'w') as fout: fout.write("#!/bin/bash\n") fout.write("#scf\n") fout.write("cat >inp<<EOF\n") fout.write(self.inp[0].to_string()) fout.write("EOF\n") fout.write("%s $PMF_OCTOPUS > output.scf\n" % self.run_params["mpi"]) fout.write("# nscf\n") fout.write("cat > inp<<EOF\n") fout.write(self.inp[1].to_string()) fout.write("EOF\n") fout.write("%s $PMF_OCTOPUS > output.nscf\n" % self.run_params["mpi"]) # gen lsf_sz script with open(os.path.join(directory, "static.lsf_sz"), 'w') as fout: fout.write("#!/bin/bash\n") fout.write("APP_NAME=%s\n" % self.run_params["queue"]) fout.write("NP=%d\n" % (self.run_params["nodes"] * self.run_params["ppn"])) fout.write("NP_PER_NODE=%d\n" % self.run_params["ppn"]) fout.write("RUN=\"RAW\"\n") fout.write("CURDIR=$PWD\n") fout.write("#VASP=/home-yg/Soft/Vasp5.4/vasp_std\n") fout.write("source /home-yg/env/intel-12.1.sh\n") fout.write("source /home-yg/env/openmpi-1.6.5-intel.sh\n") fout.write("cd $CURDIR\n") fout.write("# starting creating ./nodelist\n") fout.write("rm -rf $CURDIR/nodelist >& /dev/null\n") fout.write("for i in `echo $LSB_HOSTS`\n") fout.write("do\n") fout.write(" echo \"$i\" >> $CURDIR/nodelist \n") fout.write("done\n") fout.write("ndoelist=$(cat $CURDIR/nodelist | uniq | awk \'{print $1}\' | tr \'\n\' \',\')\n") fout.write("#scf\n") fout.write("cat >inp<<EOF\n") fout.write(self.inp[0].to_string()) fout.write("EOF\n") fout.write("mpirun -np $NP -machinefile $CURDIR/nodelist $PMF_OCTOPUS > output.scf\n") fout.write("# nscf\n") fout.write("cat > inp<<EOF\n") fout.write(self.inp[1].to_string()) fout.write("EOF\n") fout.write("mpirun -np $NP -machinefile $CURDIR/nodelist $PMF_OCTOPUS > output.nscf\n") if runopt == "run" or runopt == "genrun": os.chdir(directory) os.system("bash static.sh") os.chdir("../") server_handle(auto=auto, directory=directory, jobfilebase="static", server=self.run_params["server"])
48.517569
223
0.491534
6,109
51,089
4.030283
0.043542
0.155721
0.103976
0.055156
0.944925
0.943747
0.93205
0.918403
0.908574
0.894115
0
0.00444
0.351915
51,089
1,053
224
48.517569
0.739172
0.086007
0
0.884993
0
0.014025
0.252642
0.022469
0
0
0
0
0
1
0.018233
false
0.001403
0.008415
0
0.02805
0.021038
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
a47ac5a2619464814892dc0a545947165bb24a56
2,770
py
Python
dataset.py
Khamies/T5-Fine-tune-Wikihow-XSum
fa83b6389f0b03a3ba365937531479c0d526f54c
[ "MIT" ]
null
null
null
dataset.py
Khamies/T5-Fine-tune-Wikihow-XSum
fa83b6389f0b03a3ba365937531479c0d526f54c
[ "MIT" ]
null
null
null
dataset.py
Khamies/T5-Fine-tune-Wikihow-XSum
fa83b6389f0b03a3ba365937531479c0d526f54c
[ "MIT" ]
null
null
null
from typing import Tuple import torch import datasets from transformers import T5Tokenizer # Wikihow class Wikihow_Dataset(torch.utils.data.Dataset): def __init__(self, path, split, source_length, target_length) -> None: super().__init__() self.dataset = datasets.load_dataset("wikihow", "all", data_dir=path, split=split) self.tokenizer = T5Tokenizer.from_pretrained('t5-small') self.source_length = source_length self.target_length = target_length def __len__(self) -> int: return self.dataset.shape[0] def process_example(self, example): source = example['text'] target = example['headline'] source_tuple = self.tokenizer.batch_encode_plus([source,], padding= 'max_length', max_length= self.source_length, truncation = True , return_tensors = "pt") target_tuple = self.tokenizer.batch_encode_plus([target,], padding= 'max_length', max_length = self.target_length, truncation = True, return_tensors = "pt") return (source_tuple, target_tuple) def __getitem__(self, index) -> Tuple: example = self.dataset[index] source_tuple, target_tuple = self.process_example(example) source = source_tuple["input_ids"] source_mask = source_tuple["attention_mask"] target = target_tuple["input_ids"] target_mask = target_tuple["attention_mask"] return {"source": source, "source_mask": source_mask, "target": target, "target_mask": target_mask} # Xsum Dataset class Xsum_Dataset(torch.utils.data.Dataset): def __init__(self, split, source_length, target_length) -> None: super().__init__() self.dataset = datasets.load_dataset("xsum", split=split) self.tokenizer = T5Tokenizer.from_pretrained('t5-small') self.source_length = source_length self.target_length = target_length def __len__(self) -> int: return self.dataset.shape[0] def process_example(self, example): source = example['document'] target = example['summary'] source_tuple = self.tokenizer.batch_encode_plus([source,], padding= 'max_length', max_length= self.source_length, truncation = True , return_tensors = "pt") target_tuple = self.tokenizer.batch_encode_plus([target,], padding= 'max_length', max_length = self.target_length, truncation = True, return_tensors = "pt") return (source_tuple, target_tuple) def __getitem__(self, index) -> Tuple: example = self.dataset[index] source_tuple, target_tuple = self.process_example(example) source = source_tuple["input_ids"] source_mask = source_tuple["attention_mask"] target = target_tuple["input_ids"] target_mask = target_tuple["attention_mask"] return {"source": source, "source_mask": source_mask, "target": target, "target_mask": target_mask}
33.373494
160
0.720939
344
2,770
5.459302
0.165698
0.058573
0.038339
0.046858
0.893504
0.893504
0.893504
0.893504
0.85197
0.85197
0
0.003011
0.16065
2,770
83
161
33.373494
0.804731
0.007581
0
0.72
0
0
0.096469
0
0
0
0
0
0
1
0.16
false
0
0.08
0.04
0.4
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
f10bb38228e0c7341403e288f7b48a3f3faa8499
180
py
Python
qd3dt/core/track/__init__.py
mengmengliu1998/qd-3dt
9fcd1c0b165793e259deb46a64fcbbdc33735f2f
[ "BSD-3-Clause" ]
384
2021-03-19T11:12:31.000Z
2022-03-31T01:59:16.000Z
qd3dt/core/track/__init__.py
mengmengliu1998/qd-3dt
9fcd1c0b165793e259deb46a64fcbbdc33735f2f
[ "BSD-3-Clause" ]
22
2021-04-06T14:28:12.000Z
2022-03-22T18:02:00.000Z
qd3dt/core/track/__init__.py
mengmengliu1998/qd-3dt
9fcd1c0b165793e259deb46a64fcbbdc33735f2f
[ "BSD-3-Clause" ]
73
2021-03-20T06:23:26.000Z
2022-03-16T08:00:21.000Z
from .transforms import track2results, results2track, max_matching from .match import get_similarity __all__ = ['track2results', 'results2track', 'max_matching', 'get_similarity']
45
78
0.811111
19
180
7.263158
0.578947
0.376812
0.42029
0.536232
0
0
0
0
0
0
0
0.02439
0.088889
180
3
79
60
0.817073
0
0
0
0
0
0.288889
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
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
0
0
1
0
1
0
0
7
2d091da7b9d6f4d3f0d45ac83f70052dbaf0c9e7
377
py
Python
app/admin/views.py
KaijianYou/papaya
729d81ae0b7b02338690442029a1bdb512f4d161
[ "CNRI-Python" ]
null
null
null
app/admin/views.py
KaijianYou/papaya
729d81ae0b7b02338690442029a1bdb512f4d161
[ "CNRI-Python" ]
null
null
null
app/admin/views.py
KaijianYou/papaya
729d81ae0b7b02338690442029a1bdb512f4d161
[ "CNRI-Python" ]
null
null
null
from flask import render_template from app.admin import admin @admin.route('/') def index(): return render_template('admin/index.html') @admin.route('/operation-logs') def operation_log_list(): return render_template('admin/operation_log_list.html') @admin.route('/database-backups') def db_backup_list(): return render_template('admin/db_backup_list.html')
19.842105
59
0.753316
52
377
5.230769
0.384615
0.205882
0.220588
0.275735
0.213235
0
0
0
0
0
0
0
0.111406
377
18
60
20.944444
0.81194
0
0
0
0
0
0.27321
0.143236
0
0
0
0
0
1
0.272727
true
0
0.181818
0.272727
0.727273
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
0
1
1
0
0
7
2d21e7147744fc1764b667976dad3e218dd44804
27,034
py
Python
sdk/python/pulumi_aws/redshift/scheduled_action.py
rapzo/pulumi-aws
390a098221315d98a54ba97d1559e750dc3053b7
[ "ECL-2.0", "Apache-2.0" ]
260
2018-06-18T14:57:00.000Z
2022-03-29T11:41:03.000Z
sdk/python/pulumi_aws/redshift/scheduled_action.py
rapzo/pulumi-aws
390a098221315d98a54ba97d1559e750dc3053b7
[ "ECL-2.0", "Apache-2.0" ]
1,154
2018-06-19T20:38:20.000Z
2022-03-31T19:48:16.000Z
sdk/python/pulumi_aws/redshift/scheduled_action.py
rapzo/pulumi-aws
390a098221315d98a54ba97d1559e750dc3053b7
[ "ECL-2.0", "Apache-2.0" ]
115
2018-06-28T03:20:27.000Z
2022-03-29T11:41:06.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__ = ['ScheduledActionArgs', 'ScheduledAction'] @pulumi.input_type class ScheduledActionArgs: def __init__(__self__, *, iam_role: pulumi.Input[str], schedule: pulumi.Input[str], target_action: pulumi.Input['ScheduledActionTargetActionArgs'], description: Optional[pulumi.Input[str]] = None, enable: Optional[pulumi.Input[bool]] = None, end_time: Optional[pulumi.Input[str]] = None, name: Optional[pulumi.Input[str]] = None, start_time: Optional[pulumi.Input[str]] = None): """ The set of arguments for constructing a ScheduledAction resource. :param pulumi.Input[str] iam_role: The IAM role to assume to run the scheduled action. :param pulumi.Input[str] schedule: The schedule of action. The schedule is defined format of "at expression" or "cron expression", for example `at(2016-03-04T17:27:00)` or `cron(0 10 ? * MON *)`. See [Scheduled Action](https://docs.aws.amazon.com/redshift/latest/APIReference/API_ScheduledAction.html) for more information. :param pulumi.Input['ScheduledActionTargetActionArgs'] target_action: Target action. Documented below. :param pulumi.Input[str] description: The description of the scheduled action. :param pulumi.Input[bool] enable: Whether to enable the scheduled action. Default is `true` . :param pulumi.Input[str] end_time: The end time in UTC when the schedule is active, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). :param pulumi.Input[str] name: The scheduled action name. :param pulumi.Input[str] start_time: The start time in UTC when the schedule is active, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). """ pulumi.set(__self__, "iam_role", iam_role) pulumi.set(__self__, "schedule", schedule) pulumi.set(__self__, "target_action", target_action) if description is not None: pulumi.set(__self__, "description", description) if enable is not None: pulumi.set(__self__, "enable", enable) if end_time is not None: pulumi.set(__self__, "end_time", end_time) if name is not None: pulumi.set(__self__, "name", name) if start_time is not None: pulumi.set(__self__, "start_time", start_time) @property @pulumi.getter(name="iamRole") def iam_role(self) -> pulumi.Input[str]: """ The IAM role to assume to run the scheduled action. """ return pulumi.get(self, "iam_role") @iam_role.setter def iam_role(self, value: pulumi.Input[str]): pulumi.set(self, "iam_role", value) @property @pulumi.getter def schedule(self) -> pulumi.Input[str]: """ The schedule of action. The schedule is defined format of "at expression" or "cron expression", for example `at(2016-03-04T17:27:00)` or `cron(0 10 ? * MON *)`. See [Scheduled Action](https://docs.aws.amazon.com/redshift/latest/APIReference/API_ScheduledAction.html) for more information. """ return pulumi.get(self, "schedule") @schedule.setter def schedule(self, value: pulumi.Input[str]): pulumi.set(self, "schedule", value) @property @pulumi.getter(name="targetAction") def target_action(self) -> pulumi.Input['ScheduledActionTargetActionArgs']: """ Target action. Documented below. """ return pulumi.get(self, "target_action") @target_action.setter def target_action(self, value: pulumi.Input['ScheduledActionTargetActionArgs']): pulumi.set(self, "target_action", value) @property @pulumi.getter def description(self) -> Optional[pulumi.Input[str]]: """ The description of the scheduled action. """ return pulumi.get(self, "description") @description.setter def description(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "description", value) @property @pulumi.getter def enable(self) -> Optional[pulumi.Input[bool]]: """ Whether to enable the scheduled action. Default is `true` . """ return pulumi.get(self, "enable") @enable.setter def enable(self, value: Optional[pulumi.Input[bool]]): pulumi.set(self, "enable", value) @property @pulumi.getter(name="endTime") def end_time(self) -> Optional[pulumi.Input[str]]: """ The end time in UTC when the schedule is active, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). """ return pulumi.get(self, "end_time") @end_time.setter def end_time(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "end_time", value) @property @pulumi.getter def name(self) -> Optional[pulumi.Input[str]]: """ The scheduled action name. """ return pulumi.get(self, "name") @name.setter def name(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "name", value) @property @pulumi.getter(name="startTime") def start_time(self) -> Optional[pulumi.Input[str]]: """ The start time in UTC when the schedule is active, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). """ return pulumi.get(self, "start_time") @start_time.setter def start_time(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "start_time", value) @pulumi.input_type class _ScheduledActionState: def __init__(__self__, *, description: Optional[pulumi.Input[str]] = None, enable: Optional[pulumi.Input[bool]] = None, end_time: Optional[pulumi.Input[str]] = None, iam_role: Optional[pulumi.Input[str]] = None, name: Optional[pulumi.Input[str]] = None, schedule: Optional[pulumi.Input[str]] = None, start_time: Optional[pulumi.Input[str]] = None, target_action: Optional[pulumi.Input['ScheduledActionTargetActionArgs']] = None): """ Input properties used for looking up and filtering ScheduledAction resources. :param pulumi.Input[str] description: The description of the scheduled action. :param pulumi.Input[bool] enable: Whether to enable the scheduled action. Default is `true` . :param pulumi.Input[str] end_time: The end time in UTC when the schedule is active, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). :param pulumi.Input[str] iam_role: The IAM role to assume to run the scheduled action. :param pulumi.Input[str] name: The scheduled action name. :param pulumi.Input[str] schedule: The schedule of action. The schedule is defined format of "at expression" or "cron expression", for example `at(2016-03-04T17:27:00)` or `cron(0 10 ? * MON *)`. See [Scheduled Action](https://docs.aws.amazon.com/redshift/latest/APIReference/API_ScheduledAction.html) for more information. :param pulumi.Input[str] start_time: The start time in UTC when the schedule is active, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). :param pulumi.Input['ScheduledActionTargetActionArgs'] target_action: Target action. Documented below. """ if description is not None: pulumi.set(__self__, "description", description) if enable is not None: pulumi.set(__self__, "enable", enable) if end_time is not None: pulumi.set(__self__, "end_time", end_time) if iam_role is not None: pulumi.set(__self__, "iam_role", iam_role) if name is not None: pulumi.set(__self__, "name", name) if schedule is not None: pulumi.set(__self__, "schedule", schedule) if start_time is not None: pulumi.set(__self__, "start_time", start_time) if target_action is not None: pulumi.set(__self__, "target_action", target_action) @property @pulumi.getter def description(self) -> Optional[pulumi.Input[str]]: """ The description of the scheduled action. """ return pulumi.get(self, "description") @description.setter def description(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "description", value) @property @pulumi.getter def enable(self) -> Optional[pulumi.Input[bool]]: """ Whether to enable the scheduled action. Default is `true` . """ return pulumi.get(self, "enable") @enable.setter def enable(self, value: Optional[pulumi.Input[bool]]): pulumi.set(self, "enable", value) @property @pulumi.getter(name="endTime") def end_time(self) -> Optional[pulumi.Input[str]]: """ The end time in UTC when the schedule is active, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). """ return pulumi.get(self, "end_time") @end_time.setter def end_time(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "end_time", value) @property @pulumi.getter(name="iamRole") def iam_role(self) -> Optional[pulumi.Input[str]]: """ The IAM role to assume to run the scheduled action. """ return pulumi.get(self, "iam_role") @iam_role.setter def iam_role(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "iam_role", value) @property @pulumi.getter def name(self) -> Optional[pulumi.Input[str]]: """ The scheduled action name. """ return pulumi.get(self, "name") @name.setter def name(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "name", value) @property @pulumi.getter def schedule(self) -> Optional[pulumi.Input[str]]: """ The schedule of action. The schedule is defined format of "at expression" or "cron expression", for example `at(2016-03-04T17:27:00)` or `cron(0 10 ? * MON *)`. See [Scheduled Action](https://docs.aws.amazon.com/redshift/latest/APIReference/API_ScheduledAction.html) for more information. """ return pulumi.get(self, "schedule") @schedule.setter def schedule(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "schedule", value) @property @pulumi.getter(name="startTime") def start_time(self) -> Optional[pulumi.Input[str]]: """ The start time in UTC when the schedule is active, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). """ return pulumi.get(self, "start_time") @start_time.setter def start_time(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "start_time", value) @property @pulumi.getter(name="targetAction") def target_action(self) -> Optional[pulumi.Input['ScheduledActionTargetActionArgs']]: """ Target action. Documented below. """ return pulumi.get(self, "target_action") @target_action.setter def target_action(self, value: Optional[pulumi.Input['ScheduledActionTargetActionArgs']]): pulumi.set(self, "target_action", value) class ScheduledAction(pulumi.CustomResource): @overload def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, description: Optional[pulumi.Input[str]] = None, enable: Optional[pulumi.Input[bool]] = None, end_time: Optional[pulumi.Input[str]] = None, iam_role: Optional[pulumi.Input[str]] = None, name: Optional[pulumi.Input[str]] = None, schedule: Optional[pulumi.Input[str]] = None, start_time: Optional[pulumi.Input[str]] = None, target_action: Optional[pulumi.Input[pulumi.InputType['ScheduledActionTargetActionArgs']]] = None, __props__=None): """ ## Example Usage ### Pause Cluster Action ```python import pulumi import pulumi_aws as aws example_role = aws.iam.Role("exampleRole", assume_role_policy=\"\"\"{ "Version": "2012-10-17", "Statement": [ { "Action": "sts:AssumeRole", "Principal": { "Service": [ "scheduler.redshift.amazonaws.com" ] }, "Effect": "Allow", "Sid": "" } ] } \"\"\") example_policy = aws.iam.Policy("examplePolicy", policy=\"\"\"{ "Version": "2012-10-17", "Statement": [ { "Sid": "VisualEditor0", "Effect": "Allow", "Action": [ "redshift:PauseCluster", "redshift:ResumeCluster", "redshift:ResizeCluster" ], "Resource": "*" } ] } \"\"\") example_role_policy_attachment = aws.iam.RolePolicyAttachment("exampleRolePolicyAttachment", policy_arn=example_policy.arn, role=example_role.name) example_scheduled_action = aws.redshift.ScheduledAction("exampleScheduledAction", schedule="cron(00 23 * * ? *)", iam_role=example_role.arn, target_action=aws.redshift.ScheduledActionTargetActionArgs( pause_cluster=aws.redshift.ScheduledActionTargetActionPauseClusterArgs( cluster_identifier="tf-redshift001", ), )) ``` ### Resize Cluster Action ```python import pulumi import pulumi_aws as aws example = aws.redshift.ScheduledAction("example", schedule="cron(00 23 * * ? *)", iam_role=aws_iam_role["example"]["arn"], target_action=aws.redshift.ScheduledActionTargetActionArgs( resize_cluster=aws.redshift.ScheduledActionTargetActionResizeClusterArgs( cluster_identifier="tf-redshift001", cluster_type="multi-node", node_type="dc1.large", number_of_nodes=2, ), )) ``` ## Import Redshift Scheduled Action can be imported using the `name`, e.g. ```sh $ pulumi import aws:redshift/scheduledAction:ScheduledAction example tf-redshift-scheduled-action ``` :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] description: The description of the scheduled action. :param pulumi.Input[bool] enable: Whether to enable the scheduled action. Default is `true` . :param pulumi.Input[str] end_time: The end time in UTC when the schedule is active, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). :param pulumi.Input[str] iam_role: The IAM role to assume to run the scheduled action. :param pulumi.Input[str] name: The scheduled action name. :param pulumi.Input[str] schedule: The schedule of action. The schedule is defined format of "at expression" or "cron expression", for example `at(2016-03-04T17:27:00)` or `cron(0 10 ? * MON *)`. See [Scheduled Action](https://docs.aws.amazon.com/redshift/latest/APIReference/API_ScheduledAction.html) for more information. :param pulumi.Input[str] start_time: The start time in UTC when the schedule is active, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). :param pulumi.Input[pulumi.InputType['ScheduledActionTargetActionArgs']] target_action: Target action. Documented below. """ ... @overload def __init__(__self__, resource_name: str, args: ScheduledActionArgs, opts: Optional[pulumi.ResourceOptions] = None): """ ## Example Usage ### Pause Cluster Action ```python import pulumi import pulumi_aws as aws example_role = aws.iam.Role("exampleRole", assume_role_policy=\"\"\"{ "Version": "2012-10-17", "Statement": [ { "Action": "sts:AssumeRole", "Principal": { "Service": [ "scheduler.redshift.amazonaws.com" ] }, "Effect": "Allow", "Sid": "" } ] } \"\"\") example_policy = aws.iam.Policy("examplePolicy", policy=\"\"\"{ "Version": "2012-10-17", "Statement": [ { "Sid": "VisualEditor0", "Effect": "Allow", "Action": [ "redshift:PauseCluster", "redshift:ResumeCluster", "redshift:ResizeCluster" ], "Resource": "*" } ] } \"\"\") example_role_policy_attachment = aws.iam.RolePolicyAttachment("exampleRolePolicyAttachment", policy_arn=example_policy.arn, role=example_role.name) example_scheduled_action = aws.redshift.ScheduledAction("exampleScheduledAction", schedule="cron(00 23 * * ? *)", iam_role=example_role.arn, target_action=aws.redshift.ScheduledActionTargetActionArgs( pause_cluster=aws.redshift.ScheduledActionTargetActionPauseClusterArgs( cluster_identifier="tf-redshift001", ), )) ``` ### Resize Cluster Action ```python import pulumi import pulumi_aws as aws example = aws.redshift.ScheduledAction("example", schedule="cron(00 23 * * ? *)", iam_role=aws_iam_role["example"]["arn"], target_action=aws.redshift.ScheduledActionTargetActionArgs( resize_cluster=aws.redshift.ScheduledActionTargetActionResizeClusterArgs( cluster_identifier="tf-redshift001", cluster_type="multi-node", node_type="dc1.large", number_of_nodes=2, ), )) ``` ## Import Redshift Scheduled Action can be imported using the `name`, e.g. ```sh $ pulumi import aws:redshift/scheduledAction:ScheduledAction example tf-redshift-scheduled-action ``` :param str resource_name: The name of the resource. :param ScheduledActionArgs 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(ScheduledActionArgs, 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, description: Optional[pulumi.Input[str]] = None, enable: Optional[pulumi.Input[bool]] = None, end_time: Optional[pulumi.Input[str]] = None, iam_role: Optional[pulumi.Input[str]] = None, name: Optional[pulumi.Input[str]] = None, schedule: Optional[pulumi.Input[str]] = None, start_time: Optional[pulumi.Input[str]] = None, target_action: Optional[pulumi.Input[pulumi.InputType['ScheduledActionTargetActionArgs']]] = 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__ = ScheduledActionArgs.__new__(ScheduledActionArgs) __props__.__dict__["description"] = description __props__.__dict__["enable"] = enable __props__.__dict__["end_time"] = end_time if iam_role is None and not opts.urn: raise TypeError("Missing required property 'iam_role'") __props__.__dict__["iam_role"] = iam_role __props__.__dict__["name"] = name if schedule is None and not opts.urn: raise TypeError("Missing required property 'schedule'") __props__.__dict__["schedule"] = schedule __props__.__dict__["start_time"] = start_time if target_action is None and not opts.urn: raise TypeError("Missing required property 'target_action'") __props__.__dict__["target_action"] = target_action super(ScheduledAction, __self__).__init__( 'aws:redshift/scheduledAction:ScheduledAction', resource_name, __props__, opts) @staticmethod def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions] = None, description: Optional[pulumi.Input[str]] = None, enable: Optional[pulumi.Input[bool]] = None, end_time: Optional[pulumi.Input[str]] = None, iam_role: Optional[pulumi.Input[str]] = None, name: Optional[pulumi.Input[str]] = None, schedule: Optional[pulumi.Input[str]] = None, start_time: Optional[pulumi.Input[str]] = None, target_action: Optional[pulumi.Input[pulumi.InputType['ScheduledActionTargetActionArgs']]] = None) -> 'ScheduledAction': """ Get an existing ScheduledAction 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] description: The description of the scheduled action. :param pulumi.Input[bool] enable: Whether to enable the scheduled action. Default is `true` . :param pulumi.Input[str] end_time: The end time in UTC when the schedule is active, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). :param pulumi.Input[str] iam_role: The IAM role to assume to run the scheduled action. :param pulumi.Input[str] name: The scheduled action name. :param pulumi.Input[str] schedule: The schedule of action. The schedule is defined format of "at expression" or "cron expression", for example `at(2016-03-04T17:27:00)` or `cron(0 10 ? * MON *)`. See [Scheduled Action](https://docs.aws.amazon.com/redshift/latest/APIReference/API_ScheduledAction.html) for more information. :param pulumi.Input[str] start_time: The start time in UTC when the schedule is active, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). :param pulumi.Input[pulumi.InputType['ScheduledActionTargetActionArgs']] target_action: Target action. Documented below. """ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) __props__ = _ScheduledActionState.__new__(_ScheduledActionState) __props__.__dict__["description"] = description __props__.__dict__["enable"] = enable __props__.__dict__["end_time"] = end_time __props__.__dict__["iam_role"] = iam_role __props__.__dict__["name"] = name __props__.__dict__["schedule"] = schedule __props__.__dict__["start_time"] = start_time __props__.__dict__["target_action"] = target_action return ScheduledAction(resource_name, opts=opts, __props__=__props__) @property @pulumi.getter def description(self) -> pulumi.Output[Optional[str]]: """ The description of the scheduled action. """ return pulumi.get(self, "description") @property @pulumi.getter def enable(self) -> pulumi.Output[Optional[bool]]: """ Whether to enable the scheduled action. Default is `true` . """ return pulumi.get(self, "enable") @property @pulumi.getter(name="endTime") def end_time(self) -> pulumi.Output[Optional[str]]: """ The end time in UTC when the schedule is active, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). """ return pulumi.get(self, "end_time") @property @pulumi.getter(name="iamRole") def iam_role(self) -> pulumi.Output[str]: """ The IAM role to assume to run the scheduled action. """ return pulumi.get(self, "iam_role") @property @pulumi.getter def name(self) -> pulumi.Output[str]: """ The scheduled action name. """ return pulumi.get(self, "name") @property @pulumi.getter def schedule(self) -> pulumi.Output[str]: """ The schedule of action. The schedule is defined format of "at expression" or "cron expression", for example `at(2016-03-04T17:27:00)` or `cron(0 10 ? * MON *)`. See [Scheduled Action](https://docs.aws.amazon.com/redshift/latest/APIReference/API_ScheduledAction.html) for more information. """ return pulumi.get(self, "schedule") @property @pulumi.getter(name="startTime") def start_time(self) -> pulumi.Output[Optional[str]]: """ The start time in UTC when the schedule is active, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). """ return pulumi.get(self, "start_time") @property @pulumi.getter(name="targetAction") def target_action(self) -> pulumi.Output['outputs.ScheduledActionTargetAction']: """ Target action. Documented below. """ return pulumi.get(self, "target_action")
42.640379
331
0.616298
3,010
27,034
5.359468
0.077741
0.073642
0.069427
0.06546
0.88216
0.867158
0.852281
0.832755
0.826618
0.809323
0
0.012281
0.271103
27,034
633
332
42.707741
0.806394
0.419805
0
0.741497
1
0
0.102818
0.026405
0
0
0
0
0
1
0.159864
false
0.003401
0.02381
0
0.278912
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
7440ce86fdf009115eb60619a0f1a5d0b816efe6
121
py
Python
tests/test_caaalle.py
caalle/caaalle
3653155338fefde73579508ee83905a8ad8e3924
[ "Apache-2.0" ]
null
null
null
tests/test_caaalle.py
caalle/caaalle
3653155338fefde73579508ee83905a8ad8e3924
[ "Apache-2.0" ]
4
2021-04-26T18:42:38.000Z
2021-04-26T18:42:41.000Z
tests/test_caaalle.py
caalle/caaalle
3653155338fefde73579508ee83905a8ad8e3924
[ "Apache-2.0" ]
null
null
null
""" tests.test_caaalle.py ~~~~~~~~~~~~~~~~~~~~ """ import caaalle def test_caaalle(): assert caaalle.add(0, 4) == 4
13.444444
33
0.545455
15
121
4.266667
0.666667
0.34375
0
0
0
0
0
0
0
0
0
0.029126
0.14876
121
9
33
13.444444
0.592233
0.347107
0
0
0
0
0
0
0
0
0
0
0.333333
1
0.333333
true
0
0.333333
0
0.666667
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
1
0
1
0
1
0
0
7
7471def4b372740ab93a10b3c9a0a3d9fe8beb69
231
py
Python
random_dict/__init__.py
LucaCappelletti94/random_dict
a7ec7081b0c28e160e7bdd4a47cfc9cae324618b
[ "MIT" ]
2
2020-06-10T03:36:14.000Z
2021-04-29T09:33:26.000Z
random_dict/__init__.py
LucaCappelletti94/random_dict
a7ec7081b0c28e160e7bdd4a47cfc9cae324618b
[ "MIT" ]
null
null
null
random_dict/__init__.py
LucaCappelletti94/random_dict
a7ec7081b0c28e160e7bdd4a47cfc9cae324618b
[ "MIT" ]
null
null
null
from .random_dict import random_dict, random_float_dict, random_bool_dict, random_string_dict, random_int_dict __all__ = ["random_dict", "random_float_dict", "random_bool_dict", "random_string_dict", "random_int_dict"]
46.2
110
0.787879
33
231
4.818182
0.272727
0.503145
0.201258
0.264151
0.855346
0.855346
0.855346
0.855346
0.855346
0.855346
0
0
0.116883
231
4
111
57.75
0.779412
0
0
0
0
0
0.333333
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
0
0
0
null
1
1
1
1
1
1
1
1
1
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
11
7497e2ab54d673e0170cce872aa54f71b235114b
2,142
py
Python
Packs/CommonScripts/Scripts/ProductJoin/ProductJoin_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/CommonScripts/Scripts/ProductJoin/ProductJoin_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/CommonScripts/Scripts/ProductJoin/ProductJoin_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
from ProductJoin import product_join def test_when_list1_is_csv_and_list2_is_list(): list1 = 'a,b,c' list2 = ['1', '2'] result = product_join({'value': list1, 'list2': list2, 'join': '='}) expectedOutput = ['a=1', 'a=2', 'b=1', 'b=2', 'c=1', 'c=2'] assert expectedOutput == result def test_when_list1_is_list_and_list2_is_csv(): list1 = ['a', 'b', 'c'] list2 = '1,2' result = product_join({'value': list1, 'list2': list2, 'join': '='}) expectedOutput = ['a=1', 'a=2', 'b=1', 'b=2', 'c=1', 'c=2'] assert expectedOutput == result def test_when_list1_is_list_and_list2_is_list(): list1 = ['a', 'b', 'c'] list2 = ['1', '2'] result = product_join({'value': list1, 'list2': list2, 'join': '='}) expectedOutput = ['a=1', 'a=2', 'b=1', 'b=2', 'c=1', 'c=2'] assert expectedOutput == result def test_when_list1_is_csv_and_list2_is_csv(): list1 = 'a,b,c' list2 = '1,2' result = product_join({'value': list1, 'list2': list2, 'join': '='}) expectedOutput = ['a=1', 'a=2', 'b=1', 'b=2', 'c=1', 'c=2'] assert expectedOutput == result def test_when_list1_is_csv_and_list2_is_csv_with_spaces(): list1 = 'a,b,c' list2 = '1, 2' result = product_join({'value': list1, 'list2': list2, 'join': '='}) expectedOutput = ['a=1', 'a=2', 'b=1', 'b=2', 'c=1', 'c=2'] assert expectedOutput == result def test_when_list1_is_csv_and_list2_is_numbers(): list1 = 'a, b, c' list2 = [1, 2] result = product_join({'value': list1, 'list2': list2, 'join': '='}) expectedOutput = ['a=1', 'a=2', 'b=1', 'b=2', 'c=1', 'c=2'] assert expectedOutput == result def test_when_list1_is_csv_and_list2_is_number(): list1 = 'a, b, c' list2 = 1 result = product_join({'value': list1, 'list2': list2, 'join': '='}) expectedOutput = ['a=1', 'b=1', 'c=1'] assert expectedOutput == result def test_when_list1_is_csv_and_list2_is_single_item(): list1 = 'a, b, c' list2 = [1] result = product_join({'value': list1, 'list2': list2, 'join': '='}) expectedOutput = ['a=1', 'b=1', 'c=1'] assert expectedOutput == result
28.945946
72
0.587302
322
2,142
3.670807
0.090062
0.083756
0.07445
0.108291
0.945008
0.945008
0.945008
0.945008
0.945008
0.927242
0
0.065041
0.196078
2,142
73
73
29.342466
0.621371
0
0
0.755102
0
0
0.14099
0
0
0
0
0
0.163265
1
0.163265
false
0
0.020408
0
0.183673
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
749ab3d4724b1210dfe428f5da203bc5531f591d
11,250
py
Python
mackay.py
jameshensman/mlss_2019
e0d75a5700aac829287eb889592ffcf1f6414d22
[ "Apache-2.0" ]
1
2021-01-24T02:33:03.000Z
2021-01-24T02:33:03.000Z
mackay.py
jameshensman/mlss_2019
e0d75a5700aac829287eb889592ffcf1f6414d22
[ "Apache-2.0" ]
null
null
null
mackay.py
jameshensman/mlss_2019
e0d75a5700aac829287eb889592ffcf1f6414d22
[ "Apache-2.0" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt import matplotlib.animation as animation from matplotlib.patches import Ellipse import matplotlib matplotlib.rcParams['figure.figsize'] = (16, 6) def samples_2D(): np.random.seed(12) num_samples = 100 Ks = [np.array([[1., 0.8], [0.8, 1.]]), np.array([[1., 0.32], [0.32, 1.]]), np.array([[1., 0.98], [0.98, 1.]])] for i, K in enumerate(Ks): fig, axes = plt.subplots(1, 2) L = np.linalg.cholesky(K) samples = np.dot(L, np.random.randn(2, num_samples)) line, = axes[0].plot([], [], 'C0x', mew=2, ms=8) evals, evecs = np.linalg.eigh(K) ell = Ellipse(xy=(0, 0), width=np.sqrt(evals[0])*4, height=np.sqrt(evals[1])*4, angle=np.rad2deg(np.arccos(evecs[0, 0]))) ell.set_facecolor('none') ell.set_edgecolor('k') axes[0].add_artist(ell) axes[0].set_xlabel('f(x_1)') axes[0].set_ylabel('f(x_2)') axes[0].set_xlim(-2.5, 2.5) axes[0].set_ylim(-2.5, 2.5) axes[1].imshow(K, cmap=plt.cm.gray, extent=[0, 2, 0, 2], origin='lower', interpolation='nearest', vmin=0.2, vmax=1.0) axes[1].set_xticks([]) axes[1].set_yticks([]) xx, yy = np.mgrid[0:1:2j, 0:1:2j] xx, yy = xx + 0.5, yy + 0.5 [axes[1].text(x, y, k, color='C1', horizontalalignment='center', verticalalignment='center', fontsize=20) for x, y, k in zip(xx.flat, yy.flat, K.flat)] def init(): return [line] def animate(i): line.set_xdata(samples[0, :i]) line.set_ydata(samples[1, :i]) return [line] ani = animation.FuncAnimation( fig, animate, init_func=init, interval=100, blit=True, save_count=num_samples) w = animation.ImageMagickWriter(fps=25) ani.save('twoD_samples{}.gif'.format(i+1), writer=w) def samples_2D_gp_plot(): np.random.seed(12) num_samples = 100 Ks = [np.array([[1., 0.8], [0.8, 1.]]), np.array([[1., 0.32], [0.32, 1.]]), np.array([[1., 0.98], [0.98, 1.]])] for i, K in enumerate(Ks): fig, axes = plt.subplots(1, 2) L = np.linalg.cholesky(K) samples = np.dot(L, np.random.randn(2, num_samples)) line1, = axes[0].plot([], [], 'C0x', mew=2, ms=8) evals, evecs = np.linalg.eigh(K) ell = Ellipse(xy=(0, 0), width=np.sqrt(evals[0])*4, height=np.sqrt(evals[1])*4, angle=np.rad2deg(np.arccos(evecs[0, 0]))) ell.set_facecolor('none') ell.set_edgecolor('k') axes[0].add_artist(ell) axes[0].set_xlabel('f(x_1)') axes[0].set_ylabel('f(x_2)') axes[0].set_xlim(-2.5, 2.5) axes[0].set_ylim(-2.5, 2.5) axes[1].set_xticks([-1, 1]) axes[1].set_xticklabels(['x_1', 'x_2']) axes[1].set_yticks([]) axes[1].set_ylim(-2.5, 2.5) axes[1].set_xlim(-1.5, 1.5) line2, = axes[1].plot([], [], 'C0--', mew=2, ms=8, marker='x') def init(): return [line1, line2] def animate(i): line1.set_xdata(samples[0, :i]) line1.set_ydata(samples[1, :i]) line2.set_xdata(np.tile([[-1, 1, np.nan]], [i, 1]).flatten()) line2.set_ydata(np.vstack([samples[:, :i], (np.empty(i) * np.nan)]).T.flatten()) return [line1, line2] ani = animation.FuncAnimation( fig, animate, init_func=init, interval=100, blit=True, save_count=num_samples) w = animation.ImageMagickWriter(fps=25) ani.save('twoD_samples_gpplot{}.gif'.format(i+1), writer=w) def samples_2D_gp_plot_cond(): np.random.seed(12) num_samples = 100 cond_val = 1.1 Ks = [np.array([[1., 0.8], [0.8, 1.]]), np.array([[1., 0.32], [0.32, 1.]]), np.array([[1., 0.98], [0.98, 1.]])] for i, K in enumerate(Ks): fig, axes = plt.subplots(1, 2) L = np.linalg.cholesky(K) mean = K[0, 1] / K[0, 0] * cond_val var = K[1, 1] - K[0 , 1]**2 / K[0, 0] samples = np.random.randn(num_samples) * np.sqrt(var) + mean x_line = np.linspace(-2.5, 2.5, 200) density = np.exp(-0.5 * np.log(2 * np.pi) - 0.5 * np.log(var) - 0.5 * (x_line - mean)**2 / var) axes[0].plot(cond_val + density * 0.3, x_line, 'C1', lw=1.2) line1, = axes[0].plot([], [], 'C0x', mew=2, ms=8) line2, = axes[1].plot([], [], 'C0--', mew=2, ms=8, marker='x') evals, evecs = np.linalg.eigh(K) ell = Ellipse(xy=(0, 0), width=np.sqrt(evals[0])*4, height=np.sqrt(evals[1])*4, angle=np.rad2deg(np.arccos(evecs[0, 0]))) ell.set_facecolor('none') ell.set_edgecolor('k') axes[0].add_artist(ell) axes[0].set_xlabel('f(x_1)') axes[0].set_ylabel('f(x_2)') axes[0].set_xlim(-2.5, 2.5) axes[0].set_ylim(-2.5, 2.5) axes[1].set_xticks([-1, 1]) axes[1].set_xticklabels(['x_1', 'x_2']) axes[1].set_yticks([]) axes[1].set_ylim(-2.5, 2.5) axes[1].set_xlim(-1.5, 1.5) def init(): return [line1, line2] def animate(i): line1.set_xdata(np.zeros(i) + cond_val) line1.set_ydata(samples[:i]) line2.set_xdata(np.tile([[-1, 1, np.nan]], [i, 1]).flatten()) line2.set_ydata(np.vstack([np.zeros(i) + cond_val, samples[:i], (np.empty(i) * np.nan)]).T.flatten()) return [line1, line2] ani = animation.FuncAnimation( fig, animate, init_func=init, interval=100, blit=True, save_count=num_samples) w = animation.ImageMagickWriter(fps=25) ani.save('twoD_samples_gpplot_cond{}.gif'.format(i+1), writer=w) def samples_2D_conditioned(): np.random.seed(12) num_samples = 100 cond_val = 1.1 Ks = [np.array([[1., 0.8], [0.8, 1.]]), np.array([[1., 0.32], [0.32, 1.]]), np.array([[1., 0.98], [0.98, 1.]])] for i, K in enumerate(Ks): fig, axes = plt.subplots(1, 2) mean = K[0, 1] / K[0, 0] * cond_val var = K[1, 1] - K[0 , 1]**2 / K[0, 0] samples = np.random.randn(num_samples) * np.sqrt(var) + mean line, = axes[0].plot([], [], 'C0x', mew=2, ms=8) x_line = np.linspace(-2.5, 2.5, 200) density = np.exp(-0.5 * np.log(2 * np.pi) - 0.5 * np.log(var) - 0.5 * (x_line - mean)**2 / var) axes[0].plot(cond_val + density * 0.3, x_line, 'C1', lw=1.2) evals, evecs = np.linalg.eigh(K) ell = Ellipse(xy=(0, 0), width=np.sqrt(evals[0])*4, height=np.sqrt(evals[1])*4, angle=np.rad2deg(np.arccos(evecs[0, 0]))) ell.set_facecolor('none') ell.set_edgecolor('k') axes[0].add_artist(ell) axes[0].set_xlabel('f(x_1)') axes[0].set_ylabel('f(x_2)') axes[0].set_xlim(-2.5, 2.5) axes[0].set_ylim(-2.5, 2.5) axes[1].imshow(K, cmap=plt.cm.gray, extent=[0, 2, 0, 2], origin='lower', interpolation='nearest', vmin=0.2, vmax=1.0) axes[1].set_xticks([]) axes[1].set_yticks([]) xx, yy = np.mgrid[0:1:2j, 0:1:2j] xx, yy = xx + 0.5, yy + 0.5 [axes[1].text(x, y, k, color='C1', horizontalalignment='center', verticalalignment='center', fontsize=20) for x, y, k in zip(xx.flat, yy.flat, K.flat)] def init(): return [line] def animate(i): line.set_xdata(np.zeros(i) + cond_val) line.set_ydata(samples[:i]) return [line] ani = animation.FuncAnimation( fig, animate, init_func=init, interval=100, blit=True, save_count=num_samples) w = animation.ImageMagickWriter(fps=25) ani.save('twoD_samples_cond{}.gif'.format(i+1), writer=w) def samples_6D_gp_plot(): np.random.seed(12) num_samples = 100 x = np.linspace(-1, 1, 6) K = np.exp(-0.5 * np.square(x - x[:, None])) fig, axes = plt.subplots(1, 2) line, = axes[1].plot([], [], 'C0--', mew=2, ms=8, marker='x') L = np.linalg.cholesky(K) samples = np.dot(L, np.random.randn(6, num_samples)) axes[0].imshow(K, cmap=plt.cm.gray, extent=[0, 6, 0, 6], origin='lower', interpolation='nearest', vmin=0.2, vmax=1.0) axes[0].set_xticks([]) axes[0].set_yticks([]) xx, yy = np.mgrid[0:5:6j, 0:5:6j] xx, yy = xx + 0.5, yy + 0.5 [axes[0].text(x, y, '{0:.2f}'.format(k), color='C1', horizontalalignment='center', verticalalignment='center', fontsize=12) for x, y, k in zip(xx.flat, yy.flat, K.flat)] axes[1].set_xticks(x) axes[1].set_xticklabels(['x_{}'.format(i+1) for i in range(len(x))]) axes[1].set_yticks([]) axes[1].set_ylim(-2.5, 2.5) axes[1].set_xlim(-1.2, 1.2) def init(): return [line] def animate(i): line.set_xdata(np.tile(np.hstack([x, [np.nan]]), [i, 1]).flatten()) line.set_ydata(np.vstack([samples[:, :i], (np.empty(i) * np.nan)]).T.flatten()) print(i) return [line] ani = animation.FuncAnimation( fig, animate, init_func=init, interval=200, blit=True, save_count=num_samples) w = animation.ImageMagickWriter(fps=10) ani.save('sixD_samples_gpplot.gif', writer=w) def samples_6D_gp_plot_cond(): np.random.seed(12) num_samples = 100 x = np.linspace(-1, 1, 6) K = np.exp(-0.5 * np.square(x - x[:, None])) i_cond = [1, 3] f_cond = np.array([[1.], [-0.2]]) Kxx = K[i_cond][:, i_cond] kxX = K[i_cond] mu = np.dot(kxX.T, np.linalg.solve(Kxx, f_cond)) var = K - np.dot(kxX.T, np.linalg.solve(Kxx, kxX)) fig, axes = plt.subplots(1, 2) line, = axes[1].plot([], [], 'C0--', mew=2, ms=8, marker='x') L = np.linalg.cholesky(var + np.eye(6) * 1e-6) samples = np.dot(L, np.random.randn(6, num_samples)) + mu axes[0].imshow(K, cmap=plt.cm.gray, extent=[0, 6, 0, 6], origin='lower', interpolation='nearest', vmin=0.2, vmax=1.0) axes[0].set_xticks([]) axes[0].set_yticks([]) xx, yy = np.mgrid[0:5:6j, 0:5:6j] xx, yy = xx + 0.5, yy + 0.5 [axes[0].text(x, y, '{0:.2f}'.format(k), color='C1', horizontalalignment='center', verticalalignment='center', fontsize=12) for x, y, k in zip(xx.flat, yy.flat, K.flat)] axes[1].set_xticks(x) axes[1].set_xticklabels(['x_{}'.format(i+1) for i in range(len(x))]) axes[1].set_yticks([]) axes[1].set_ylim(-2.5, 2.5) axes[1].set_xlim(-1.2, 1.2) def init(): return [line] def animate(i): line.set_xdata(np.tile(np.hstack([x, [np.nan]]), [i, 1]).flatten()) line.set_ydata(np.vstack([samples[:, :i], (np.empty(i) * np.nan)]).T.flatten()) return [line] ani = animation.FuncAnimation( fig, animate, init_func=init, interval=200, blit=True, save_count=num_samples) w = animation.ImageMagickWriter(fps=10) ani.save('sixD_samples_gpplot_cond.gif', writer=w)
34.722222
125
0.532533
1,798
11,250
3.239155
0.092325
0.02919
0.032967
0.009615
0.943681
0.932521
0.932521
0.924107
0.915522
0.893544
0
0.071273
0.265422
11,250
323
126
34.829721
0.63347
0
0
0.851563
0
0
0.035829
0.011469
0
0
0
0
0
1
0.070313
false
0
0.019531
0.023438
0.136719
0.003906
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
77a2d346d1d53ee495bb9b99b497c3ce57f2a083
139
py
Python
mountainlab_pytools/mlproc/__init__.py
tjd2002/mountainlab_pytools
19b4ab06b073a7cfd9535b9285fd95471e731df9
[ "Apache-2.0" ]
null
null
null
mountainlab_pytools/mlproc/__init__.py
tjd2002/mountainlab_pytools
19b4ab06b073a7cfd9535b9285fd95471e731df9
[ "Apache-2.0" ]
null
null
null
mountainlab_pytools/mlproc/__init__.py
tjd2002/mountainlab_pytools
19b4ab06b073a7cfd9535b9285fd95471e731df9
[ "Apache-2.0" ]
1
2019-01-19T04:07:15.000Z
2019-01-19T04:07:15.000Z
from .mlproc_impl import runProcess,execProcess,queueProcess from .mlproc_impl import spec from .mlproc_impl import locateFile,realizeFile
34.75
60
0.870504
18
139
6.555556
0.555556
0.254237
0.355932
0.508475
0
0
0
0
0
0
0
0
0.086331
139
3
61
46.333333
0.929134
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
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
8
77cadf35146cee517dd24ad2d159f688a0390d92
4,372
py
Python
angr_platforms/tricore/ssro_instr.py
shahinsba/angr-platforms
86f9ea90c396fb5561d0196a2d1a873e573b0294
[ "BSD-2-Clause" ]
null
null
null
angr_platforms/tricore/ssro_instr.py
shahinsba/angr-platforms
86f9ea90c396fb5561d0196a2d1a873e573b0294
[ "BSD-2-Clause" ]
null
null
null
angr_platforms/tricore/ssro_instr.py
shahinsba/angr-platforms
86f9ea90c396fb5561d0196a2d1a873e573b0294
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python3 """ ssro_instr.py Implementation of SSRO format instructions. """ from pyvex.lifting.util import Type, Instruction from .logger import log_this class SSRO_ST_A_Inst(Instruction): """ Store Word from Address Register instruction. op = 0xE8 User Status Flags: no change. """ name = 'SSRO_ST.A' op = "{0}{1}".format(bin(0xe)[2:].zfill(4), bin(8)[2:].zfill(4)) bin_format = op + 'b'*4 + 'a'*4 def parse(self, bitstrm): data = Instruction.parse(self, bitstrm) data = {"a": int(data['a'], 2), "off4": int(data['b'], 2)} log_this(self.name, data, hex(self.addr)) return data def get_offset(self): return self.constant(self.data['off4'], Type.int_4).cast_to(Type.int_32) def get_a_15(self): return self.get("a15", Type.int_32) def get_a_a(self): return self.get("a{0}".format(self.data['a']), Type.int_32) def fetch_operands(self): return self.get_a_a(), self.get_a_15(), self.get_offset() def compute_result(self, *args): a_a = args[0] a_15 = args[1] offset = args[2] addr = a_15 + (offset << 2) self.store(a_a, addr) class SSRO_ST_B_Inst(Instruction): """ Store Byte instruction. op = 0x28 User Status Flags: no change. """ name = 'SSRO_ST.B' op = "{0}{1}".format(bin(2)[2:].zfill(4), bin(8)[2:].zfill(4)) bin_format = op + 'b'*4 + 'a'*4 def parse(self, bitstrm): data = Instruction.parse(self, bitstrm) data = {"a": int(data['a'], 2), "off4": int(data['b'], 2)} log_this(self.name, data, hex(self.addr)) return data def get_offset(self): return self.constant(self.data['off4'], Type.int_4).cast_to(Type.int_32) def get_a_15(self): return self.get("a15", Type.int_32) def get_d_a(self): return self.get("d{0}".format(self.data['a']), Type.int_32) def fetch_operands(self): return self.get_d_a(), self.get_a_15(), self.get_offset() def compute_result(self, *args): d_a = args[0] a_15 = args[1] offset = args[2] val = d_a & 0xff addr = a_15 + offset self.store(val, addr) class SSRO_ST_H_Inst(Instruction): """ Store Half-word instruction. op = 0xA8 User Status Flags: no change. """ name = 'SSRO_ST.H' op = "{0}{1}".format(bin(0xa)[2:].zfill(4), bin(8)[2:].zfill(4)) bin_format = op + 'b'*4 + 'a'*4 def parse(self, bitstrm): data = Instruction.parse(self, bitstrm) data = {"a": int(data['a'], 2), "off4": int(data['b'], 2)} log_this(self.name, data, hex(self.addr)) return data def get_offset(self): return self.constant(self.data['off4'], Type.int_4).cast_to(Type.int_32) def get_a_15(self): return self.get("a15", Type.int_32) def get_d_a(self): return self.get("d{0}".format(self.data['a']), Type.int_32) def fetch_operands(self): return self.get_d_a(), self.get_a_15(), self.get_offset() def compute_result(self, *args): d_a = args[0] a_15 = args[1] offset = args[2] val = d_a & 0xffff addr = a_15 + (offset << 1) self.store(val, addr) class SSRO_ST_W_Inst(Instruction): """ Store Word instruction. op = 0x68 User Status Flags: no change. """ name = 'SSRO_ST.W' op = "{0}{1}".format(bin(6)[2:].zfill(4), bin(8)[2:].zfill(4)) bin_format = op + 'b'*4 + 'a'*4 def parse(self, bitstrm): data = Instruction.parse(self, bitstrm) data = {"a": int(data['a'], 2), "off4": int(data['b'], 2)} log_this(self.name, data, hex(self.addr)) return data def get_offset(self): return self.constant(self.data['off4'], Type.int_4).cast_to(Type.int_32) def get_a_15(self): return self.get("a15", Type.int_32) def get_d_a(self): return self.get("d{0}".format(self.data['a']), Type.int_32) def fetch_operands(self): return self.get_d_a(), self.get_a_15(), self.get_offset() def compute_result(self, *args): d_a = args[0] a_15 = args[1] offset = args[2] addr = a_15 + (offset << 2) self.store(d_a, addr)
27.670886
80
0.565188
673
4,372
3.508172
0.120357
0.059297
0.094875
0.060991
0.828886
0.798391
0.797967
0.775095
0.719187
0.719187
0
0.048674
0.266926
4,372
157
81
27.847134
0.687988
0.0828
0
0.76
0
0
0.03698
0
0
0
0.004109
0
0
1
0.24
false
0
0.02
0.16
0.62
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
1
0
0
0
1
1
0
0
10
24a6fcdb33423bd9d714c075ed8f693d1cd7a194
147
py
Python
srcs/python/kungfu/__init__.py
awesome-archive/KungFu-1
1aba2a2b320d52f2a8fec96380fcbfd3a9e49ef5
[ "Apache-2.0" ]
1
2019-10-30T07:29:45.000Z
2019-10-30T07:29:45.000Z
srcs/python/kungfu/__init__.py
awesome-archive/KungFu-1
1aba2a2b320d52f2a8fec96380fcbfd3a9e49ef5
[ "Apache-2.0" ]
null
null
null
srcs/python/kungfu/__init__.py
awesome-archive/KungFu-1
1aba2a2b320d52f2a8fec96380fcbfd3a9e49ef5
[ "Apache-2.0" ]
null
null
null
from .ext import current_cluster_size, current_rank, run_barrier __all__ = [ 'current_cluster_size', 'current_rank', 'run_barrier', ]
18.375
64
0.721088
18
147
5.222222
0.555556
0.297872
0.382979
0.531915
0.829787
0.829787
0.829787
0
0
0
0
0
0.176871
147
7
65
21
0.77686
0
0
0
0
0
0.292517
0
0
0
0
0
0
1
0
false
0
0.166667
0
0.166667
0
1
0
0
null
1
1
1
1
1
1
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
0
0
0
0
0
0
0
8
24d7544bb5ef9cb86f26fa8e2333a86f65e4e77e
506
py
Python
src/shadow_auth/__init__.py
ospinakamilo/pam_linux
85f6f65837e5a02e2a0ab5d4879a59b49220f156
[ "Apache-2.0" ]
null
null
null
src/shadow_auth/__init__.py
ospinakamilo/pam_linux
85f6f65837e5a02e2a0ab5d4879a59b49220f156
[ "Apache-2.0" ]
null
null
null
src/shadow_auth/__init__.py
ospinakamilo/pam_linux
85f6f65837e5a02e2a0ab5d4879a59b49220f156
[ "Apache-2.0" ]
null
null
null
from shadow_auth._internal import ( Algorithm, validate_with_hash, validate_with_password, generate_openssl_hash, get_password_info, PrerequisiteException, InvalidArgumentType, InvalidArgumentFormat, ValidateUserError ) __all__ = [ "Algorithm", "validate_with_hash", "validate_with_password", "generate_openssl_hash", "get_password_info", "PrerequisiteException", "InvalidArgumentType", "InvalidArgumentFormat", "ValidateUserError" ]
22
35
0.725296
40
506
8.625
0.475
0.13913
0.121739
0.144928
0.910145
0.910145
0.910145
0.910145
0.910145
0.910145
0
0
0.195652
506
23
36
22
0.847666
0
0
0
1
0
0.325444
0.167653
0
0
0
0
0
1
0
false
0.181818
0.045455
0
0.045455
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
1
0
0
0
0
0
8
24f8e7927ab6bbe180d1f69ebcbf16d121cc86d3
8,716
py
Python
authors/apps/articles/tests/test_report_articles.py
andela/Ah-backend-valkyrie
f0eb64c27e1fe37d5c81e4b9a8762dcf3c336a79
[ "BSD-3-Clause" ]
null
null
null
authors/apps/articles/tests/test_report_articles.py
andela/Ah-backend-valkyrie
f0eb64c27e1fe37d5c81e4b9a8762dcf3c336a79
[ "BSD-3-Clause" ]
46
2019-01-08T13:16:41.000Z
2021-04-30T20:47:08.000Z
authors/apps/articles/tests/test_report_articles.py
andela/Ah-backend-valkyrie
f0eb64c27e1fe37d5c81e4b9a8762dcf3c336a79
[ "BSD-3-Clause" ]
3
2019-01-07T08:21:59.000Z
2019-09-20T06:43:18.000Z
import json from rest_framework.reverse import reverse from rest_framework import status from authors.apps.authentication.tests.base import BaseTestMethods from authors.apps.articles.models import Article, ReportArticle from authors.apps.authentication.models import User class TestReportArticle(BaseTestMethods): def test_report_article(self): """Tests that a user reports an article""" user = self.register_and_loginUser() user2 = self.register_and_login_user2() url = reverse(self.get_post_article_url) self.client.credentials( HTTP_AUTHORIZATION='Bearer ' + user.data.get('token')) response = self.client.post(url, data=self.article, format='json') data = { "message": "This post violates the terms and conditions" } report_url = reverse('articles:report-article', args=[response.data.get('slug')]) self.client.credentials( HTTP_AUTHORIZATION='Bearer ' + user2.data.get('token')) res = self.client.post(report_url, data=data) self.assertGreater(len(res.data), 0) self.assertEqual(res.status_code, status.HTTP_201_CREATED) def test_user_cannot_report_own_article(self): """Tests that a user cannot report his own article""" user = self.register_and_loginUser() url = reverse(self.get_post_article_url) self.client.credentials( HTTP_AUTHORIZATION='Bearer ' + user.data.get('token')) response = self.client.post(url, data=self.article, format='json') data = { "message": "This post violates the terms and conditions" } report_url = reverse('articles:report-article', args=[response.data.get('slug')]) res = self.client.post(report_url, data=data) self.assertEqual( res.data.get('detail'), 'You cannot report your own article' ) self.assertEqual(res.status_code, status.HTTP_406_NOT_ACCEPTABLE) def test_report_article_without_message(self): """Tests that user cannot report article without a message""" user = self.register_and_loginUser() user2 = self.register_and_login_user2() url = reverse(self.get_post_article_url) self.client.credentials( HTTP_AUTHORIZATION='Bearer ' + user.data.get('token')) response = self.client.post(url, data=self.article, format='json') data = { "message": "" } report_url = reverse('articles:report-article', args=[response.data.get('slug')]) self.client.credentials( HTTP_AUTHORIZATION='Bearer ' + user2.data.get('token')) res = self.client.post(report_url, data=data) self.assertEqual( res.data.get('errors').get('message')[0], 'This field may not be blank.' ) self.assertEqual(res.status_code, status.HTTP_400_BAD_REQUEST) def test_report_article_without_message_field(self): """Tests that user cannot report article without a message field""" user = self.register_and_loginUser() user2 = self.register_and_login_user2() url = reverse(self.get_post_article_url) self.client.credentials( HTTP_AUTHORIZATION='Bearer ' + user.data.get('token')) response = self.client.post(url, data=self.article, format='json') report_url = reverse('articles:report-article', args=[response.data.get('slug')]) self.client.credentials( HTTP_AUTHORIZATION='Bearer ' + user2.data.get('token')) res = self.client.post(report_url) self.assertEqual( res.data.get('errors').get('message')[0], 'This field may not be null.' ) self.assertEqual(res.status_code, status.HTTP_400_BAD_REQUEST) def test_report_article_with_non_existent_slug(self): """ Tests that user cannot report article without a slug that does not exist in the database """ user = self.register_and_loginUser() user2 = self.register_and_login_user2() url = reverse(self.get_post_article_url) self.client.credentials( HTTP_AUTHORIZATION='Bearer ' + user.data.get('token')) response = self.client.post(url, data=self.article, format='json') data = { "message": "This post violates the terms and conditions" } report_url = reverse('articles:report-article', args=['non-existent-slug']) self.client.credentials( HTTP_AUTHORIZATION='Bearer ' + user2.data.get('token')) res = self.client.post(report_url, data=data) self.assertEqual( res.data.get('detail'), 'Article with slug \'non-existent-slug\' was not found' ) self.assertEqual(res.status_code, status.HTTP_404_NOT_FOUND) def test_admin_can_get_reports_for_single_article(self): """Tests that admin can retrieve reports for a single article""" user1 = self.register_and_loginUser() user2 = self.register_and_login_user2() admin = self.register_superuser() url = reverse(self.get_post_article_url) self.client.credentials( HTTP_AUTHORIZATION='Bearer ' + user1.data.get('token')) response = self.client.post(url, data=self.article, format='json') data = { "message": "This post violates the terms and conditions" } report_url = reverse( 'articles:report-article', args=[response.data.get('slug')] ) self.client.credentials( HTTP_AUTHORIZATION='Bearer ' + user2.data.get('token')) self.client.post(report_url, data=data) self.client.credentials( HTTP_AUTHORIZATION='Bearer ' + admin.token) res = self.client.get(report_url) self.assertEqual( res.data[0].get('message'), 'This post violates the terms and conditions' ) self.assertEqual(res.status_code, status.HTTP_200_OK) def test_admin_can_get_reports_for_all_articles(self): """Tests that admin can retrieve reports for all articles""" user1 = self.register_and_loginUser() user2 = self.register_and_login_user2() admin = self.register_superuser() url = reverse(self.get_post_article_url) self.client.credentials( HTTP_AUTHORIZATION='Bearer ' + user1.data.get('token')) response = self.client.post(url, data=self.article, format='json') data = { "message": "This post violates the terms and conditions" } report_url = reverse( 'articles:report-article', args=[response.data.get('slug')] ) self.client.credentials( HTTP_AUTHORIZATION='Bearer ' + user2.data.get('token')) self.client.post(report_url, data=data) get_report_url = reverse('articles:reported-articles') self.client.credentials( HTTP_AUTHORIZATION='Bearer ' + admin.token) res = self.client.get(get_report_url) self.assertEqual( res.data[0].get('message'), 'This post violates the terms and conditions' ) self.assertEqual(res.status_code, status.HTTP_200_OK) def test_non_admin_cannot_get_reports_for_articles(self): """Tests that a normal user cannot retrieve reports for articles""" user1 = self.register_and_loginUser() user2 = self.register_and_login_user2() url = reverse(self.get_post_article_url) self.client.credentials( HTTP_AUTHORIZATION='Bearer ' + user1.data.get('token')) response = self.client.post(url, data=self.article, format='json') data = { "message": "This post violates the terms and conditions" } report_url = reverse( 'articles:report-article', args=[response.data.get('slug')] ) self.client.credentials( HTTP_AUTHORIZATION='Bearer ' + user2.data.get('token')) self.client.post(report_url, data=data) get_report_url = reverse('articles:reported-articles') self.client.credentials( HTTP_AUTHORIZATION='Bearer ' + user1.data.get('token')) res = self.client.get(get_report_url) self.assertEqual( res.data.get('detail'), 'You are not authorized to access this resource' ) self.assertEqual(res.status_code, status.HTTP_401_UNAUTHORIZED)
40.728972
75
0.626434
1,005
8,716
5.254726
0.108458
0.070062
0.071577
0.085211
0.863094
0.863094
0.836584
0.795683
0.780913
0.772581
0
0.008879
0.263424
8,716
213
76
40.920188
0.813707
0.05358
0
0.740113
0
0
0.139086
0.028844
0
0
0
0
0.090395
1
0.045198
false
0
0.033898
0
0.084746
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
24fb119dbffb10912f45f959bf3334d68310a747
162
py
Python
Calculator.py
aboladebaba/calculatorTest
af8f3f22844cc5b881f2d8c3725e25211f30706c
[ "MIT" ]
null
null
null
Calculator.py
aboladebaba/calculatorTest
af8f3f22844cc5b881f2d8c3725e25211f30706c
[ "MIT" ]
null
null
null
Calculator.py
aboladebaba/calculatorTest
af8f3f22844cc5b881f2d8c3725e25211f30706c
[ "MIT" ]
null
null
null
class Calculator: def add(self, operand1, operand2): return operand1 + operand2 def subtract(self, operand1, operand2): return operand1 - operand2
18
41
0.716049
18
162
6.444444
0.5
0.551724
0.344828
0.448276
0.724138
0.724138
0
0
0
0
0
0.062016
0.203704
162
8
42
20.25
0.837209
0
0
0
0
0
0
0
0
0
0
0
0
1
0.4
false
0
0
0.4
1
0
1
0
0
null
1
1
1
0
1
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
9
701aa057117a8a569fa96df2268f14aecda2f941
76
py
Python
cardinal/fixtures/fake_plugins/valid/plugin.py
LoLei/Cardinal
28081e3a192ef59a3ad715341cc190792d28ed84
[ "MIT" ]
96
2015-01-24T00:00:45.000Z
2022-03-15T14:06:57.000Z
cardinal/fixtures/fake_plugins/valid/plugin.py
LoLei/Cardinal
28081e3a192ef59a3ad715341cc190792d28ed84
[ "MIT" ]
166
2015-01-02T02:30:24.000Z
2022-03-24T20:03:55.000Z
cardinal/fixtures/fake_plugins/valid/plugin.py
LoLei/Cardinal
28081e3a192ef59a3ad715341cc190792d28ed84
[ "MIT" ]
63
2015-02-13T06:46:01.000Z
2022-02-24T10:50:34.000Z
class TestValidPlugin: pass def setup(): return TestValidPlugin()
10.857143
28
0.697368
7
76
7.571429
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.223684
76
6
29
12.666667
0.898305
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
true
0.25
0
0.25
0.75
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
0
0
0
1
1
1
0
1
1
0
0
7
7021c2f3aafdb0a2e204cd07f11b69249f8c1aed
47
py
Python
src/simple_array_sum.py
yxtay/code-ex
aabcfd4741067a8515fe75441c10853b5724bc01
[ "MIT" ]
null
null
null
src/simple_array_sum.py
yxtay/code-ex
aabcfd4741067a8515fe75441c10853b5724bc01
[ "MIT" ]
null
null
null
src/simple_array_sum.py
yxtay/code-ex
aabcfd4741067a8515fe75441c10853b5724bc01
[ "MIT" ]
null
null
null
def simple_array_sum(arr): return sum(arr)
15.666667
26
0.723404
8
47
4
0.75
0.375
0
0
0
0
0
0
0
0
0
0
0.170213
47
2
27
23.5
0.820513
0
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
0
0
0.5
1
0
1
1
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
0
1
1
0
0
7
565a17e7bb6b575de0a917bda09cba188aa309bf
21,059
py
Python
src/oci/data_connectivity/data_connectivity_management_client_composite_operations.py
pabs3/oci-python-sdk
437ba18ce39af2d1090e277c4bb8750c89f83021
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/oci/data_connectivity/data_connectivity_management_client_composite_operations.py
pabs3/oci-python-sdk
437ba18ce39af2d1090e277c4bb8750c89f83021
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/oci/data_connectivity/data_connectivity_management_client_composite_operations.py
pabs3/oci-python-sdk
437ba18ce39af2d1090e277c4bb8750c89f83021
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
# coding: utf-8 # Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. import oci # noqa: F401 from oci.util import WAIT_RESOURCE_NOT_FOUND # noqa: F401 class DataConnectivityManagementClientCompositeOperations(object): """ This class provides a wrapper around :py:class:`~oci.data_connectivity.DataConnectivityManagementClient` and offers convenience methods for operations that would otherwise need to be chained together. For example, instead of performing an action on a resource (e.g. launching an instance, creating a load balancer) and then using a waiter to wait for the resource to enter a given state, you can call a single method in this class to accomplish the same functionality """ def __init__(self, client, **kwargs): """ Creates a new DataConnectivityManagementClientCompositeOperations object :param DataConnectivityManagementClient client: The service client which will be wrapped by this object """ self.client = client def change_endpoint_compartment_and_wait_for_state(self, endpoint_id, change_endpoint_compartment_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.data_connectivity.DataConnectivityManagementClient.change_endpoint_compartment` and waits for the :py:class:`~oci.data_connectivity.models.WorkRequest` to enter the given state(s). :param str endpoint_id: (required) DCMS Endpoint id :param oci.data_connectivity.models.ChangeEndpointCompartmentDetails change_endpoint_compartment_details: (required) The details of change compartment action. :param list[str] wait_for_states: An array of states to wait on. These should be valid values for :py:attr:`~oci.data_connectivity.models.WorkRequest.status` :param dict operation_kwargs: A dictionary of keyword arguments to pass to :py:func:`~oci.data_connectivity.DataConnectivityManagementClient.change_endpoint_compartment` :param dict waiter_kwargs: A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait """ operation_result = self.client.change_endpoint_compartment(endpoint_id, change_endpoint_compartment_details, **operation_kwargs) if not wait_for_states: return operation_result lowered_wait_for_states = [w.lower() for w in wait_for_states] wait_for_resource_id = operation_result.headers['opc-work-request-id'] try: waiter_result = oci.wait_until( self.client, self.client.get_work_request(wait_for_resource_id), evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, **waiter_kwargs ) result_to_return = waiter_result return result_to_return except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) def change_registry_compartment_and_wait_for_state(self, registry_id, change_registry_compartment_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.data_connectivity.DataConnectivityManagementClient.change_registry_compartment` and waits for the :py:class:`~oci.data_connectivity.models.WorkRequest` to enter the given state(s). :param str registry_id: (required) The registry Ocid. :param oci.data_connectivity.models.ChangeRegistryCompartmentDetails change_registry_compartment_details: (required) The details of change compartment action. :param list[str] wait_for_states: An array of states to wait on. These should be valid values for :py:attr:`~oci.data_connectivity.models.WorkRequest.status` :param dict operation_kwargs: A dictionary of keyword arguments to pass to :py:func:`~oci.data_connectivity.DataConnectivityManagementClient.change_registry_compartment` :param dict waiter_kwargs: A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait """ operation_result = self.client.change_registry_compartment(registry_id, change_registry_compartment_details, **operation_kwargs) if not wait_for_states: return operation_result lowered_wait_for_states = [w.lower() for w in wait_for_states] wait_for_resource_id = operation_result.headers['opc-work-request-id'] try: waiter_result = oci.wait_until( self.client, self.client.get_work_request(wait_for_resource_id), evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, **waiter_kwargs ) result_to_return = waiter_result return result_to_return except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) def create_endpoint_and_wait_for_state(self, create_endpoint_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.data_connectivity.DataConnectivityManagementClient.create_endpoint` and waits for the :py:class:`~oci.data_connectivity.models.WorkRequest` to enter the given state(s). :param oci.data_connectivity.models.CreateEndpointDetails create_endpoint_details: (required) Details for the new Data Connectivity Management Endpoint. :param list[str] wait_for_states: An array of states to wait on. These should be valid values for :py:attr:`~oci.data_connectivity.models.WorkRequest.status` :param dict operation_kwargs: A dictionary of keyword arguments to pass to :py:func:`~oci.data_connectivity.DataConnectivityManagementClient.create_endpoint` :param dict waiter_kwargs: A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait """ operation_result = self.client.create_endpoint(create_endpoint_details, **operation_kwargs) if not wait_for_states: return operation_result lowered_wait_for_states = [w.lower() for w in wait_for_states] wait_for_resource_id = operation_result.headers['opc-work-request-id'] try: waiter_result = oci.wait_until( self.client, self.client.get_work_request(wait_for_resource_id), evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, **waiter_kwargs ) result_to_return = waiter_result return result_to_return except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) def create_registry_and_wait_for_state(self, create_registry_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.data_connectivity.DataConnectivityManagementClient.create_registry` and waits for the :py:class:`~oci.data_connectivity.models.WorkRequest` to enter the given state(s). :param oci.data_connectivity.models.CreateRegistryDetails create_registry_details: (required) Details for the new Data Connectivity Management Registry. :param list[str] wait_for_states: An array of states to wait on. These should be valid values for :py:attr:`~oci.data_connectivity.models.WorkRequest.status` :param dict operation_kwargs: A dictionary of keyword arguments to pass to :py:func:`~oci.data_connectivity.DataConnectivityManagementClient.create_registry` :param dict waiter_kwargs: A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait """ operation_result = self.client.create_registry(create_registry_details, **operation_kwargs) if not wait_for_states: return operation_result lowered_wait_for_states = [w.lower() for w in wait_for_states] wait_for_resource_id = operation_result.headers['opc-work-request-id'] try: waiter_result = oci.wait_until( self.client, self.client.get_work_request(wait_for_resource_id), evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, **waiter_kwargs ) result_to_return = waiter_result return result_to_return except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) def delete_endpoint_and_wait_for_state(self, endpoint_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.data_connectivity.DataConnectivityManagementClient.delete_endpoint` and waits for the :py:class:`~oci.data_connectivity.models.WorkRequest` to enter the given state(s). :param str endpoint_id: (required) DCMS Endpoint id :param list[str] wait_for_states: An array of states to wait on. These should be valid values for :py:attr:`~oci.data_connectivity.models.WorkRequest.status` :param dict operation_kwargs: A dictionary of keyword arguments to pass to :py:func:`~oci.data_connectivity.DataConnectivityManagementClient.delete_endpoint` :param dict waiter_kwargs: A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait """ operation_result = None try: operation_result = self.client.delete_endpoint(endpoint_id, **operation_kwargs) except oci.exceptions.ServiceError as e: if e.status == 404: return WAIT_RESOURCE_NOT_FOUND else: raise e if not wait_for_states: return operation_result lowered_wait_for_states = [w.lower() for w in wait_for_states] wait_for_resource_id = operation_result.headers['opc-work-request-id'] try: waiter_result = oci.wait_until( self.client, self.client.get_work_request(wait_for_resource_id), evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, **waiter_kwargs ) result_to_return = waiter_result return result_to_return except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) def delete_registry_and_wait_for_state(self, registry_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.data_connectivity.DataConnectivityManagementClient.delete_registry` and waits for the :py:class:`~oci.data_connectivity.models.WorkRequest` to enter the given state(s). :param str registry_id: (required) The registry Ocid. :param list[str] wait_for_states: An array of states to wait on. These should be valid values for :py:attr:`~oci.data_connectivity.models.WorkRequest.status` :param dict operation_kwargs: A dictionary of keyword arguments to pass to :py:func:`~oci.data_connectivity.DataConnectivityManagementClient.delete_registry` :param dict waiter_kwargs: A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait """ operation_result = None try: operation_result = self.client.delete_registry(registry_id, **operation_kwargs) except oci.exceptions.ServiceError as e: if e.status == 404: return WAIT_RESOURCE_NOT_FOUND else: raise e if not wait_for_states: return operation_result lowered_wait_for_states = [w.lower() for w in wait_for_states] wait_for_resource_id = operation_result.headers['opc-work-request-id'] try: waiter_result = oci.wait_until( self.client, self.client.get_work_request(wait_for_resource_id), evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, **waiter_kwargs ) result_to_return = waiter_result return result_to_return except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) def update_endpoint_and_wait_for_state(self, endpoint_id, update_endpoint_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.data_connectivity.DataConnectivityManagementClient.update_endpoint` and waits for the :py:class:`~oci.data_connectivity.models.WorkRequest` to enter the given state(s). :param str endpoint_id: (required) DCMS Endpoint id :param oci.data_connectivity.models.UpdateEndpointDetails update_endpoint_details: (required) The information to be updated. :param list[str] wait_for_states: An array of states to wait on. These should be valid values for :py:attr:`~oci.data_connectivity.models.WorkRequest.status` :param dict operation_kwargs: A dictionary of keyword arguments to pass to :py:func:`~oci.data_connectivity.DataConnectivityManagementClient.update_endpoint` :param dict waiter_kwargs: A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait """ operation_result = self.client.update_endpoint(endpoint_id, update_endpoint_details, **operation_kwargs) if not wait_for_states: return operation_result lowered_wait_for_states = [w.lower() for w in wait_for_states] wait_for_resource_id = operation_result.headers['opc-work-request-id'] try: waiter_result = oci.wait_until( self.client, self.client.get_work_request(wait_for_resource_id), evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, **waiter_kwargs ) result_to_return = waiter_result return result_to_return except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) def update_registry_and_wait_for_state(self, registry_id, update_registry_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.data_connectivity.DataConnectivityManagementClient.update_registry` and waits for the :py:class:`~oci.data_connectivity.models.WorkRequest` to enter the given state(s). :param str registry_id: (required) The registry Ocid. :param oci.data_connectivity.models.UpdateRegistryDetails update_registry_details: (required) The information to be updated. :param list[str] wait_for_states: An array of states to wait on. These should be valid values for :py:attr:`~oci.data_connectivity.models.WorkRequest.status` :param dict operation_kwargs: A dictionary of keyword arguments to pass to :py:func:`~oci.data_connectivity.DataConnectivityManagementClient.update_registry` :param dict waiter_kwargs: A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait """ operation_result = self.client.update_registry(registry_id, update_registry_details, **operation_kwargs) if not wait_for_states: return operation_result lowered_wait_for_states = [w.lower() for w in wait_for_states] wait_for_resource_id = operation_result.headers['opc-work-request-id'] try: waiter_result = oci.wait_until( self.client, self.client.get_work_request(wait_for_resource_id), evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, **waiter_kwargs ) result_to_return = waiter_result return result_to_return except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) def validate_data_asset_network_reachablity_and_wait_for_state(self, endpoint_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.data_connectivity.DataConnectivityManagementClient.validate_data_asset_network_reachablity` and waits for the :py:class:`~oci.data_connectivity.models.WorkRequest` to enter the given state(s). :param str endpoint_id: (required) DCMS Endpoint id :param list[str] wait_for_states: An array of states to wait on. These should be valid values for :py:attr:`~oci.data_connectivity.models.WorkRequest.status` :param dict operation_kwargs: A dictionary of keyword arguments to pass to :py:func:`~oci.data_connectivity.DataConnectivityManagementClient.validate_data_asset_network_reachablity` :param dict waiter_kwargs: A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait """ operation_result = self.client.validate_data_asset_network_reachablity(endpoint_id, **operation_kwargs) if not wait_for_states: return operation_result lowered_wait_for_states = [w.lower() for w in wait_for_states] wait_for_resource_id = operation_result.headers['opc-work-request-id'] try: waiter_result = oci.wait_until( self.client, self.client.get_work_request(wait_for_resource_id), evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, **waiter_kwargs ) result_to_return = waiter_result return result_to_return except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
53.313924
245
0.696804
2,643
21,059
5.314794
0.079834
0.040863
0.049975
0.042714
0.904606
0.897131
0.882964
0.878835
0.870506
0.860112
0
0.001662
0.228406
21,059
394
246
53.449239
0.862822
0.476138
0
0.813953
0
0
0.027984
0
0
0
0
0
0
1
0.05814
false
0
0.011628
0
0.19186
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
56835f6319325d041a98263098ea82485b54326c
114
py
Python
kachery_cloud/get_client_id.py
scratchrealm/kachery-cloud
bf9c1f07c000e9726a0bf38afd3bedfdcd9a12b6
[ "Apache-2.0" ]
null
null
null
kachery_cloud/get_client_id.py
scratchrealm/kachery-cloud
bf9c1f07c000e9726a0bf38afd3bedfdcd9a12b6
[ "Apache-2.0" ]
null
null
null
kachery_cloud/get_client_id.py
scratchrealm/kachery-cloud
bf9c1f07c000e9726a0bf38afd3bedfdcd9a12b6
[ "Apache-2.0" ]
null
null
null
from ._client_keys import _get_client_public_key_hex def get_client_id(): return _get_client_public_key_hex()
28.5
52
0.842105
19
114
4.315789
0.578947
0.329268
0.365854
0.439024
0.512195
0
0
0
0
0
0
0
0.105263
114
4
53
28.5
0.803922
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
true
0
0.333333
0.333333
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
1
0
1
1
1
0
0
10
56a86c5126cb5c04a65902d75368f3b6d2cb75ed
4,479
py
Python
backend/api.py
wangyurzee7/SolegalCopycat
433ae436f2706673dfa8991350ca59668d6f80e4
[ "MIT" ]
null
null
null
backend/api.py
wangyurzee7/SolegalCopycat
433ae436f2706673dfa8991350ca59668d6f80e4
[ "MIT" ]
null
null
null
backend/api.py
wangyurzee7/SolegalCopycat
433ae436f2706673dfa8991350ca59668d6f80e4
[ "MIT" ]
null
null
null
# SolegalCopycat Backend APIs. # Author : Yazid Wong # Time : 2020.05.17 import json __bked__=None ''' init() [ Description ] Init for backend. ''' def init(config_file="backend/config.json"): config=json.load(open(config_file,"r")) global __bked__ if "fake_backend" in config and config["fake_backend"]: import backend.fake_backend __bked__=backend.fake_backend __bked__.init(config) else: from backend.backend import Backend __bked__=Backend(config) ''' search_authoritative(keyword, condition, ret_info, page, page_size) [ Description ] Search authoritative cases. [ Params ] * keyword : A string, search keyword. * condition : A dict, describing the screening condition: * condition["type"] : A string. Type of authoritative case. Stored in field `LB`. * condition["cause_of_action"] : A string list. Cause of action of the case. Stored in field `AJLB` (as a list). Notice that each case may have multiple causes. * condition["region"] : A string. Source region of the case. Stored in field `XZQH_P`. * condition["year"] : A string. Year of the case. Stored in field `LAND`. * ret_info : A dict, returning information about the search. Contain field `total_num`, `total_pages`, `condition_list`(A dict, describing what options are available for each condition). * page : An integer, page number. Default as 1. * page_size : The number of cases per page. Default as 20. [ Return Value ] A list, containing all search results' origin JSON object. ''' def search_authoritative(keyword, condition, ret_info=None, page=1, page_size=20): return __bked__.search_authoritative(keyword, condition, ret_info, int(page), page_size) ''' search_common(keyword, condition, ret_info, page, page_size) [ Description ] Search common cases. [ Params ] * keyword : A string, search keyword. * condition : A dict, describing the screening condition: * condition["cause_of_action"] : A string list. Cause of action of the case. Stored in field `AJLB` (as a list). Notice that each case may have multiple causes. * condition["region"] : A string. Source region of the case. Stored in field `XZQH_P`. * condition["court_level"] : A string. Level of court. Stored in field `FYJB`. * condition["year"] : A string. Year of the case. Stored in field `LAND`. * condition["judicial_procedure"] : A string. Judicial procedure of the case. Stored in field `SPCX`. * condition["document_type"] : A string. Type of legal instrument. Stored in field `WSZL`. * ret_info : A dict, returning information about the search. Contain field `total_num`, `total_pages`, `condition_list`(A dict, describing what options are available for each condition). * page : An integer, page number. Default as 1. * page_size : The number of cases per page. Default as 20. [ Return Value ] A list, containing all search results' origin JSON object. ''' def search_common(keyword, condition, ret_info=None, page=1, page_size=20): return __bked__.search_common(keyword, condition, ret_info, int(page), page_size) ''' get_authoritative_case_by_unique_id(unique_id) [ Description ] Get authoritative case's origin JSON object by unique id. [ Params ] * unique_id : A string, the unique id, should be matched with field `unique-id`. [ Return Value ] A dict, result's origin JSON object. If there's no case matched, return None. ''' def get_authoritative_case_by_unique_id(unique_id): return __bked__.get_authoritative_case_by_unique_id(unique_id) ''' get_common_case_by_unique_id(unique_id) [ Description ] Get common case's origin JSON object by unique id. [ Params ] * unique_id : A string, the unique id, should be matched with field `unique-id`. [ Return Value ] A dict, result's origin JSON object. If there's no case matched, return None. ''' def get_common_case_by_unique_id(unique_id): return __bked__.get_common_case_by_unique_id(unique_id) ''' get_common_case_by_reference_number(reference_number) [ Description ] Get common case's origin JSON object by reference number. [ Params ] * reference_number : A string, the reference number, should be matched with field `AH`. [ Return Value ] A dict, result's origin JSON object. If there's no case matched, return None. ''' def get_common_case_by_reference_number(reference_number): return __bked__.get_common_case_by_reference_number(reference_number)
49.21978
187
0.726948
648
4,479
4.808642
0.186728
0.051348
0.04172
0.043646
0.807125
0.788511
0.756098
0.756098
0.665918
0.591784
0
0.005432
0.177942
4,479
90
188
49.766667
0.840847
0.017415
0
0
0
0
0.040073
0
0
0
0
0
0
1
0.272727
false
0
0.136364
0.227273
0.636364
0
0
0
0
null
0
0
0
1
1
1
1
0
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
1
1
0
0
7
3b41a5e6d432175b940ab4fad4ac3ec9db57c13b
49,174
py
Python
python3/madasterapi/api/building_file_api.py
Madaster/examples
bd2e8e464172e0d47cac8ed1672501a24ba624c3
[ "MIT" ]
2
2021-04-13T12:19:26.000Z
2021-09-13T15:40:44.000Z
python3/madasterapi/api/building_file_api.py
Madaster/examples
bd2e8e464172e0d47cac8ed1672501a24ba624c3
[ "MIT" ]
null
null
null
python3/madasterapi/api/building_file_api.py
Madaster/examples
bd2e8e464172e0d47cac8ed1672501a24ba624c3
[ "MIT" ]
null
null
null
""" Madaster Private API - Build: 8815 Welcome to the **Madaster Private API** endpoint. This endpoint can be used to interact with the Madaster Platform and its resources. This API does not fully cover all functionality of the platform yet, please see below for the available functions and what they can be used for. For detailed information about the platform and this API, please refer to the [Madaster Documentation](https://docs.madaster.com) or the [Madaster API Documentation](https://docs.madaster.com/api).<br/><br/>To access these resources, you need an authorization token. If you do not have one yet, see the chapter about Authorization in the [API documentation](https://docs.madaster.com/api). This token should be sent as a header with the name 'X-API-Key', which will authenticate the request with the token. The documentation below specifies which requests are available and which responses they might produce.<br/><br/>This API can be reached at the endpoint: **[https://api.madaster.com/](https://api.madaster.com/)** # noqa: E501 The version of the OpenAPI document: v3.0 Contact: service@madaster.com Generated by: https://openapi-generator.tech """ import re # noqa: F401 import sys # noqa: F401 from madasterapi.api_client import ApiClient, Endpoint as _Endpoint from madasterapi.model_utils import ( # noqa: F401 check_allowed_values, check_validations, date, datetime, file_type, none_type, validate_and_convert_types ) from madasterapi.model.building_file_request import BuildingFileRequest from madasterapi.model.building_file_response import BuildingFileResponse from madasterapi.model.building_file_status_response import BuildingFileStatusResponse from madasterapi.model.file_download_response import FileDownloadResponse class BuildingFileApi(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 __building_file_add_file( self, building_id, **kwargs ): """Adds a building file # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.building_file_add_file(building_id, async_req=True) >>> result = thread.get() Args: building_id (str): The building identifier Keyword Args: building_file_request (BuildingFileRequest): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): 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. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: BuildingFileResponse If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['building_id'] = \ building_id return self.call_with_http_info(**kwargs) self.building_file_add_file = _Endpoint( settings={ 'response_type': (BuildingFileResponse,), 'auth': [ 'ApiKeyAuth' ], 'endpoint_path': '/api/v3.0/building/{buildingId}/files', 'operation_id': 'building_file_add_file', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'building_id', 'building_file_request', ], 'required': [ 'building_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'building_id': (str,), 'building_file_request': (BuildingFileRequest,), }, 'attribute_map': { 'building_id': 'buildingId', }, 'location_map': { 'building_id': 'path', 'building_file_request': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json', 'text/json', 'application/*+json' ] }, api_client=api_client, callable=__building_file_add_file ) def __building_file_delete_file( self, building_id, id, **kwargs ): """Delete a building file # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.building_file_delete_file(building_id, id, async_req=True) >>> result = thread.get() Args: building_id (str): The building identifier id (str): The file identifier Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): 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. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['building_id'] = \ building_id kwargs['id'] = \ id return self.call_with_http_info(**kwargs) self.building_file_delete_file = _Endpoint( settings={ 'response_type': None, 'auth': [ 'ApiKeyAuth' ], 'endpoint_path': '/api/v3.0/building/{buildingId}/files/{id}', 'operation_id': 'building_file_delete_file', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ 'building_id', 'id', ], 'required': [ 'building_id', 'id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'building_id': (str,), 'id': (str,), }, 'attribute_map': { 'building_id': 'buildingId', 'id': 'id', }, 'location_map': { 'building_id': 'path', 'id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [], 'content_type': [], }, api_client=api_client, callable=__building_file_delete_file ) def __building_file_download( self, building_id, id, **kwargs ): """Gets a download url for the building file # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.building_file_download(building_id, id, async_req=True) >>> result = thread.get() Args: building_id (str): The building identifier id (str): The file identifier Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): 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. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: FileDownloadResponse If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['building_id'] = \ building_id kwargs['id'] = \ id return self.call_with_http_info(**kwargs) self.building_file_download = _Endpoint( settings={ 'response_type': (FileDownloadResponse,), 'auth': [ 'ApiKeyAuth' ], 'endpoint_path': '/api/v3.0/building/{buildingId}/files/{id}/download', 'operation_id': 'building_file_download', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'building_id', 'id', ], 'required': [ 'building_id', 'id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'building_id': (str,), 'id': (str,), }, 'attribute_map': { 'building_id': 'buildingId', 'id': 'id', }, 'location_map': { 'building_id': 'path', 'id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__building_file_download ) def __building_file_get_file_by_id( self, building_id, id, **kwargs ): """Gets a building file by its identifier # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.building_file_get_file_by_id(building_id, id, async_req=True) >>> result = thread.get() Args: building_id (str): The building identifier id (str): The file identifier Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): 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. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: BuildingFileResponse If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['building_id'] = \ building_id kwargs['id'] = \ id return self.call_with_http_info(**kwargs) self.building_file_get_file_by_id = _Endpoint( settings={ 'response_type': (BuildingFileResponse,), 'auth': [ 'ApiKeyAuth' ], 'endpoint_path': '/api/v3.0/building/{buildingId}/files/{id}', 'operation_id': 'building_file_get_file_by_id', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'building_id', 'id', ], 'required': [ 'building_id', 'id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'building_id': (str,), 'id': (str,), }, 'attribute_map': { 'building_id': 'buildingId', 'id': 'id', }, 'location_map': { 'building_id': 'path', 'id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__building_file_get_file_by_id ) def __building_file_get_files( self, building_id, **kwargs ): """Gets all building files # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.building_file_get_files(building_id, async_req=True) >>> result = thread.get() Args: building_id (str): The building identifier Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): 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. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [BuildingFileResponse] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['building_id'] = \ building_id return self.call_with_http_info(**kwargs) self.building_file_get_files = _Endpoint( settings={ 'response_type': ([BuildingFileResponse],), 'auth': [ 'ApiKeyAuth' ], 'endpoint_path': '/api/v3.0/building/{buildingId}/files', 'operation_id': 'building_file_get_files', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'building_id', ], 'required': [ 'building_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'building_id': (str,), }, 'attribute_map': { 'building_id': 'buildingId', }, 'location_map': { 'building_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__building_file_get_files ) def __building_file_get_status_by_id( self, building_id, id, **kwargs ): """Gets a building file status by its identifier # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.building_file_get_status_by_id(building_id, id, async_req=True) >>> result = thread.get() Args: building_id (str): The building identifier id (str): The file identifier Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): 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. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: BuildingFileStatusResponse If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['building_id'] = \ building_id kwargs['id'] = \ id return self.call_with_http_info(**kwargs) self.building_file_get_status_by_id = _Endpoint( settings={ 'response_type': (BuildingFileStatusResponse,), 'auth': [ 'ApiKeyAuth' ], 'endpoint_path': '/api/v3.0/building/{buildingId}/files/{id}/status', 'operation_id': 'building_file_get_status_by_id', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'building_id', 'id', ], 'required': [ 'building_id', 'id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'building_id': (str,), 'id': (str,), }, 'attribute_map': { 'building_id': 'buildingId', 'id': 'id', }, 'location_map': { 'building_id': 'path', 'id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__building_file_get_status_by_id ) def __building_file_set_active( self, building_id, id, **kwargs ): """Activates or deactivates a building file # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.building_file_set_active(building_id, id, async_req=True) >>> result = thread.get() Args: building_id (str): The building identifier id (str): The file identifier Keyword Args: body (bool): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): 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. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: BuildingFileResponse If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['building_id'] = \ building_id kwargs['id'] = \ id return self.call_with_http_info(**kwargs) self.building_file_set_active = _Endpoint( settings={ 'response_type': (BuildingFileResponse,), 'auth': [ 'ApiKeyAuth' ], 'endpoint_path': '/api/v3.0/building/{buildingId}/files/{id}/active', 'operation_id': 'building_file_set_active', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'building_id', 'id', 'body', ], 'required': [ 'building_id', 'id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'building_id': (str,), 'id': (str,), 'body': (bool,), }, 'attribute_map': { 'building_id': 'buildingId', 'id': 'id', }, 'location_map': { 'building_id': 'path', 'id': 'path', 'body': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json', 'text/json', 'application/*+json' ] }, api_client=api_client, callable=__building_file_set_active ) def __building_file_set_importing( self, building_id, id, **kwargs ): """Sets the status of a file to 'importing', so element can be added or updated can be made. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.building_file_set_importing(building_id, id, async_req=True) >>> result = thread.get() Args: building_id (str): The building identifier id (str): The file identifier Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): 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. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['building_id'] = \ building_id kwargs['id'] = \ id return self.call_with_http_info(**kwargs) self.building_file_set_importing = _Endpoint( settings={ 'response_type': None, 'auth': [ 'ApiKeyAuth' ], 'endpoint_path': '/api/v3.0/building/{buildingId}/files/{id}/setimporting', 'operation_id': 'building_file_set_importing', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'building_id', 'id', ], 'required': [ 'building_id', 'id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'building_id': (str,), 'id': (str,), }, 'attribute_map': { 'building_id': 'buildingId', 'id': 'id', }, 'location_map': { 'building_id': 'path', 'id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [], 'content_type': [], }, api_client=api_client, callable=__building_file_set_importing ) def __building_file_start_refinement( self, building_id, id, **kwargs ): """Starts the refinement of a building file. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.building_file_start_refinement(building_id, id, async_req=True) >>> result = thread.get() Args: building_id (str): The building identifier id (str): The file identifier Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): 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. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['building_id'] = \ building_id kwargs['id'] = \ id return self.call_with_http_info(**kwargs) self.building_file_start_refinement = _Endpoint( settings={ 'response_type': None, 'auth': [ 'ApiKeyAuth' ], 'endpoint_path': '/api/v3.0/building/{buildingId}/files/{id}/startrefinement', 'operation_id': 'building_file_start_refinement', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'building_id', 'id', ], 'required': [ 'building_id', 'id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'building_id': (str,), 'id': (str,), }, 'attribute_map': { 'building_id': 'buildingId', 'id': 'id', }, 'location_map': { 'building_id': 'path', 'id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [], 'content_type': [], }, api_client=api_client, callable=__building_file_start_refinement ) def __building_file_upload_file( self, building_id, id, file_name, body, **kwargs ): """Uploads a building file. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.building_file_upload_file(building_id, id, file_name, body, async_req=True) >>> result = thread.get() Args: building_id (str): The building identifier id (str): The file identifier file_name (str, none_type): The file name body (file_type): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): 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. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['building_id'] = \ building_id kwargs['id'] = \ id kwargs['file_name'] = \ file_name kwargs['body'] = \ body return self.call_with_http_info(**kwargs) self.building_file_upload_file = _Endpoint( settings={ 'response_type': None, 'auth': [ 'ApiKeyAuth' ], 'endpoint_path': '/api/v3.0/building/{buildingId}/files/{id}/upload/{fileName}', 'operation_id': 'building_file_upload_file', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'building_id', 'id', 'file_name', 'body', ], 'required': [ 'building_id', 'id', 'file_name', 'body', ], 'nullable': [ 'file_name', ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'building_id': (str,), 'id': (str,), 'file_name': (str, none_type,), 'body': (file_type,), }, 'attribute_map': { 'building_id': 'buildingId', 'id': 'id', 'file_name': 'fileName', }, 'location_map': { 'building_id': 'path', 'id': 'path', 'file_name': 'path', 'body': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [], 'content_type': [ 'application/octet-stream' ] }, api_client=api_client, callable=__building_file_upload_file )
36.862069
1,015
0.45703
4,225
49,174
5.062012
0.060118
0.046757
0.024314
0.025249
0.879787
0.862066
0.851499
0.84168
0.840885
0.8385
0
0.002938
0.460121
49,174
1,333
1,016
36.889722
0.802659
0.328914
0
0.702525
0
0
0.218272
0.050744
0
0
0
0
0
1
0.012075
false
0
0.01427
0
0.038419
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
3b4260ef6906624aa81de42c9e41a1583855095e
23,967
py
Python
evolved5g/swagger_client/api/cells_api.py
EVOLVED-5G/SDK-CLI
0f289c7b21c14c3e349164d21cc78d9b6af0a237
[ "Apache-2.0" ]
3
2021-10-19T14:37:14.000Z
2021-11-01T10:43:33.000Z
evolved5g/swagger_client/api/cells_api.py
skolome/evolved5g_cli
b202a878befe22b8dda66ee05610408777f4f006
[ "Apache-2.0" ]
14
2021-11-02T10:30:56.000Z
2022-03-10T11:30:59.000Z
evolved5g/swagger_client/api/cells_api.py
skolome/evolved5g_cli
b202a878befe22b8dda66ee05610408777f4f006
[ "Apache-2.0" ]
1
2021-11-16T16:20:31.000Z
2021-11-16T16:20:31.000Z
# coding: utf-8 """ NEF_Emulator No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: 0.1.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import re # noqa: F401 # python 2 and python 3 compatibility library import six from evolved5g.swagger_client.api_client import ApiClient class CellsApi(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. Ref: https://github.com/swagger-api/swagger-codegen """ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def create_cell_api_v1_cells_post(self, body, **kwargs): # noqa: E501 """Create Cell # noqa: E501 Create new cell. # 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_cell_api_v1_cells_post(body, async_req=True) >>> result = thread.get() :param async_req bool :param CellCreate body: (required) :return: Cell If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.create_cell_api_v1_cells_post_with_http_info(body, **kwargs) # noqa: E501 else: (data) = self.create_cell_api_v1_cells_post_with_http_info(body, **kwargs) # noqa: E501 return data def create_cell_api_v1_cells_post_with_http_info(self, body, **kwargs): # noqa: E501 """Create Cell # noqa: E501 Create new cell. # 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_cell_api_v1_cells_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool :param CellCreate body: (required) :return: Cell If the method is called asynchronously, returns the request thread. """ all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_cell_api_v1_cells_post" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params or params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `create_cell_api_v1_cells_post`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = 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 = ['OAuth2PasswordBearer'] # noqa: E501 return self.api_client.call_api( '/api/v1/Cells', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Cell', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def delete_cell_api_v1_cells_cell_id_delete(self, cell_id, **kwargs): # noqa: E501 """Delete Cell # noqa: E501 Delete a cell. # 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_cell_api_v1_cells_cell_id_delete(cell_id, async_req=True) >>> result = thread.get() :param async_req bool :param str cell_id: The cell id of the cell you want to delete (required) :return: Cell If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.delete_cell_api_v1_cells_cell_id_delete_with_http_info(cell_id, **kwargs) # noqa: E501 else: (data) = self.delete_cell_api_v1_cells_cell_id_delete_with_http_info(cell_id, **kwargs) # noqa: E501 return data def delete_cell_api_v1_cells_cell_id_delete_with_http_info(self, cell_id, **kwargs): # noqa: E501 """Delete Cell # noqa: E501 Delete a cell. # 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_cell_api_v1_cells_cell_id_delete_with_http_info(cell_id, async_req=True) >>> result = thread.get() :param async_req bool :param str cell_id: The cell id of the cell you want to delete (required) :return: Cell If the method is called asynchronously, returns the request thread. """ all_params = ['cell_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') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_cell_api_v1_cells_cell_id_delete" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'cell_id' is set if ('cell_id' not in params or params['cell_id'] is None): raise ValueError("Missing the required parameter `cell_id` when calling `delete_cell_api_v1_cells_cell_id_delete`") # noqa: E501 collection_formats = {} path_params = {} if 'cell_id' in params: path_params['cell_id'] = params['cell_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 = ['OAuth2PasswordBearer'] # noqa: E501 return self.api_client.call_api( '/api/v1/Cells/{cell_id}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Cell', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_by_gnb_id_api_v1_cells_by_gnbgnb_id_get(self, g_nb_id, **kwargs): # noqa: E501 """Get By Gnb Id # noqa: E501 Get Cells of specifc gNB. # 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_by_gnb_id_api_v1_cells_by_gnbgnb_id_get(g_nb_id, async_req=True) >>> result = thread.get() :param async_req bool :param str g_nb_id: The gNB id of the gNB in hexadecimal format (required) :return: list[Cell] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_by_gnb_id_api_v1_cells_by_gnbgnb_id_get_with_http_info(g_nb_id, **kwargs) # noqa: E501 else: (data) = self.get_by_gnb_id_api_v1_cells_by_gnbgnb_id_get_with_http_info(g_nb_id, **kwargs) # noqa: E501 return data def get_by_gnb_id_api_v1_cells_by_gnbgnb_id_get_with_http_info(self, g_nb_id, **kwargs): # noqa: E501 """Get By Gnb Id # noqa: E501 Get Cells of specifc gNB. # 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_by_gnb_id_api_v1_cells_by_gnbgnb_id_get_with_http_info(g_nb_id, async_req=True) >>> result = thread.get() :param async_req bool :param str g_nb_id: The gNB id of the gNB in hexadecimal format (required) :return: list[Cell] If the method is called asynchronously, returns the request thread. """ all_params = ['g_nb_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') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_by_gnb_id_api_v1_cells_by_gnbgnb_id_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'g_nb_id' is set if ('g_nb_id' not in params or params['g_nb_id'] is None): raise ValueError("Missing the required parameter `g_nb_id` when calling `get_by_gnb_id_api_v1_cells_by_gnbgnb_id_get`") # noqa: E501 collection_formats = {} path_params = {} if 'g_nb_id' in params: path_params['gNB_id'] = params['g_nb_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 = ['OAuth2PasswordBearer'] # noqa: E501 return self.api_client.call_api( '/api/v1/Cells/by_gNB/{gNB_id}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[Cell]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def read_cell_api_v1_cells_cell_id_get(self, cell_id, **kwargs): # noqa: E501 """Read Cell # noqa: E501 Get Cell by ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read_cell_api_v1_cells_cell_id_get(cell_id, async_req=True) >>> result = thread.get() :param async_req bool :param str cell_id: The cell id of the cell you want to retrieve (required) :return: Cell If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.read_cell_api_v1_cells_cell_id_get_with_http_info(cell_id, **kwargs) # noqa: E501 else: (data) = self.read_cell_api_v1_cells_cell_id_get_with_http_info(cell_id, **kwargs) # noqa: E501 return data def read_cell_api_v1_cells_cell_id_get_with_http_info(self, cell_id, **kwargs): # noqa: E501 """Read Cell # noqa: E501 Get Cell by ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read_cell_api_v1_cells_cell_id_get_with_http_info(cell_id, async_req=True) >>> result = thread.get() :param async_req bool :param str cell_id: The cell id of the cell you want to retrieve (required) :return: Cell If the method is called asynchronously, returns the request thread. """ all_params = ['cell_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') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method read_cell_api_v1_cells_cell_id_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'cell_id' is set if ('cell_id' not in params or params['cell_id'] is None): raise ValueError("Missing the required parameter `cell_id` when calling `read_cell_api_v1_cells_cell_id_get`") # noqa: E501 collection_formats = {} path_params = {} if 'cell_id' in params: path_params['cell_id'] = params['cell_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 = ['OAuth2PasswordBearer'] # noqa: E501 return self.api_client.call_api( '/api/v1/Cells/{cell_id}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Cell', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def read_cells_api_v1_cells_get(self, **kwargs): # noqa: E501 """Read Cells # noqa: E501 Retrieve Cells. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read_cells_api_v1_cells_get(async_req=True) >>> result = thread.get() :param async_req bool :param int skip: :param int limit: :return: list[Cell] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.read_cells_api_v1_cells_get_with_http_info(**kwargs) # noqa: E501 else: (data) = self.read_cells_api_v1_cells_get_with_http_info(**kwargs) # noqa: E501 return data def read_cells_api_v1_cells_get_with_http_info(self, **kwargs): # noqa: E501 """Read Cells # noqa: E501 Retrieve Cells. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read_cells_api_v1_cells_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :param int skip: :param int limit: :return: list[Cell] If the method is called asynchronously, returns the request thread. """ all_params = ['skip', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method read_cells_api_v1_cells_get" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] if 'skip' in params: query_params.append(('skip', params['skip'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 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 = ['OAuth2PasswordBearer'] # noqa: E501 return self.api_client.call_api( '/api/v1/Cells', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[Cell]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def update_cell_api_v1_cells_cell_id_put(self, body, cell_id, **kwargs): # noqa: E501 """Update Cell # noqa: E501 Update a cell. # 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_cell_api_v1_cells_cell_id_put(body, cell_id, async_req=True) >>> result = thread.get() :param async_req bool :param CellUpdate body: (required) :param str cell_id: The cell id of the cell you want to update (required) :return: Cell If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.update_cell_api_v1_cells_cell_id_put_with_http_info(body, cell_id, **kwargs) # noqa: E501 else: (data) = self.update_cell_api_v1_cells_cell_id_put_with_http_info(body, cell_id, **kwargs) # noqa: E501 return data def update_cell_api_v1_cells_cell_id_put_with_http_info(self, body, cell_id, **kwargs): # noqa: E501 """Update Cell # noqa: E501 Update a cell. # 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_cell_api_v1_cells_cell_id_put_with_http_info(body, cell_id, async_req=True) >>> result = thread.get() :param async_req bool :param CellUpdate body: (required) :param str cell_id: The cell id of the cell you want to update (required) :return: Cell If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'cell_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') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method update_cell_api_v1_cells_cell_id_put" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params or params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `update_cell_api_v1_cells_cell_id_put`") # noqa: E501 # verify the required parameter 'cell_id' is set if ('cell_id' not in params or params['cell_id'] is None): raise ValueError("Missing the required parameter `cell_id` when calling `update_cell_api_v1_cells_cell_id_put`") # noqa: E501 collection_formats = {} path_params = {} if 'cell_id' in params: path_params['cell_id'] = params['cell_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = 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 = ['OAuth2PasswordBearer'] # noqa: E501 return self.api_client.call_api( '/api/v1/Cells/{cell_id}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Cell', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
38.656452
145
0.612175
2,982
23,967
4.600604
0.057679
0.051899
0.039361
0.033676
0.959764
0.954661
0.939646
0.924995
0.911582
0.892558
0
0.020052
0.298786
23,967
619
146
38.718901
0.796263
0.314808
0
0.790274
1
0
0.185146
0.061517
0
0
0
0
0
1
0.039514
false
0.018237
0.012158
0
0.109422
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
3b4c7667ff47714c8ac5c643015cf2c3fdd53dc4
2,141
py
Python
tests/three/test_account.py
Cologler/ezapi-tmdb
6a8a1a0a3da99cb18d11f47f1b40bbffb2a16be6
[ "MIT" ]
4
2017-05-16T02:30:52.000Z
2021-07-01T13:21:27.000Z
tests/three/test_account.py
Cologler/ezapi-tmdb
6a8a1a0a3da99cb18d11f47f1b40bbffb2a16be6
[ "MIT" ]
4
2020-09-03T03:19:49.000Z
2021-12-21T05:24:04.000Z
tests/three/test_account.py
Cologler/ezapi-tmdb
6a8a1a0a3da99cb18d11f47f1b40bbffb2a16be6
[ "MIT" ]
3
2021-02-15T18:13:08.000Z
2021-04-10T03:53:58.000Z
import pytest from . import polite media_type, media_id = "movie", 550 @polite def test_get_account_details(tmdb, session_id): assert tmdb.get_account_details(session_id=session_id) is not None @polite def test_get_account_lists(tmdb, account_id, session_id): assert tmdb.get_account_lists(account_id, session_id=session_id) is not None @polite def test_get_account_favorite_movies(tmdb, account_id, session_id): assert ( tmdb.get_account_favorite_movies(account_id, session_id=session_id) is not None ) @polite def test_get_account_favorite_tvs(tmdb, account_id, session_id): assert tmdb.get_account_favorite_tvs(account_id, session_id=session_id) is not None @polite @pytest.mark.parametrize("favorite", [True, False]) def test_mark_as_favorite(tmdb, account_id, session_id, favorite): assert ( tmdb.mark_as_favorite( account_id, media_type, media_id, favorite, session_id=session_id ) is not None ) @polite def test_get_account_rated_movies(tmdb, account_id, session_id): assert tmdb.get_account_rated_movies(account_id, session_id=session_id) is not None @polite def test_get_account_rated_tvs(tmdb, account_id, session_id): assert tmdb.get_account_rated_tvs(account_id, session_id=session_id) is not None @polite def test_get_account_rated_tv_episodes(tmdb, account_id, session_id): assert ( tmdb.get_account_rated_tv_episodes(account_id, session_id=session_id) is not None ) @polite def test_get_account_movie_watchlist(tmdb, account_id, session_id): assert ( tmdb.get_account_movie_watchlist(account_id, session_id=session_id) is not None ) @polite def test_get_account_tv_watchlist(tmdb, account_id, session_id): assert tmdb.get_account_tv_watchlist(account_id, session_id=session_id) is not None @polite @pytest.mark.parametrize("watchlist", [True, False]) def test_add_to_watchlist(tmdb, account_id, session_id, watchlist): assert ( tmdb.add_to_watchlist( account_id, media_type, media_id, watchlist, session_id=session_id ) is not None )
26.7625
87
0.759458
322
2,141
4.645963
0.108696
0.198529
0.213235
0.216578
0.836898
0.793449
0.71992
0.701872
0.701872
0.673797
0
0.001675
0.163475
2,141
79
88
27.101266
0.833613
0
0
0.345455
0
0
0.010276
0
0
0
0
0
0.2
1
0.2
false
0
0.036364
0
0.236364
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
3b80fdbfce4958eb7f0593090170e11e0ec895d5
128
py
Python
omoide/domain/__init__.py
IgorZyktin/Omoide
7ae27c5f1629079b15c3855861710b5eee8dd1dd
[ "MIT" ]
null
null
null
omoide/domain/__init__.py
IgorZyktin/Omoide
7ae27c5f1629079b15c3855861710b5eee8dd1dd
[ "MIT" ]
32
2021-09-02T06:38:59.000Z
2021-10-17T07:44:10.000Z
omoide/domain/__init__.py
IgorZyktin/Omoide
7ae27c5f1629079b15c3855861710b5eee8dd1dd
[ "MIT" ]
1
2021-08-28T11:17:55.000Z
2021-08-28T11:17:55.000Z
# -*- coding: utf-8 -*- from omoide.domain.query import Query from omoide.domain.search_results import SimpleItem, SearchResult
32
65
0.78125
17
128
5.823529
0.705882
0.20202
0.323232
0
0
0
0
0
0
0
0
0.008772
0.109375
128
3
66
42.666667
0.859649
0.164063
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
8e8fecd24ef3f03ebb6241eaef25e24ad764fb0b
18,402
py
Python
tasks-deploy/anomaly/generate.py
chankruze/qctf-school-2018
1e732cf264ee0a94bc2fc1fd8cf3a20660d57605
[ "MIT" ]
null
null
null
tasks-deploy/anomaly/generate.py
chankruze/qctf-school-2018
1e732cf264ee0a94bc2fc1fd8cf3a20660d57605
[ "MIT" ]
null
null
null
tasks-deploy/anomaly/generate.py
chankruze/qctf-school-2018
1e732cf264ee0a94bc2fc1fd8cf3a20660d57605
[ "MIT" ]
null
null
null
tokens = ['3f8abb08b74486706f7dc004ea99b2ec', '4e81889e79bd14015f8f7aa3f9ec3bb3', '7bae5af0838f38db515d9318fd3ad156', 'ccc38d6c9c6a6d78fac535da4cfe185e', '6b6d79faab0903507e71349b7fc9ccb1', '0f40b7ed4f3121424717375e87b98ad2', 'bf5cc16f3ab12415c851cc6ed133584f', '73eed52c6a3fa88f3427bceae67c0524', '6188e4428265fecdf980b02d2b24b596', '3b9dafc87a6204eb72150555223cbc82', '3c14ff173e437ccf853d598be33c9310', 'c162e505fe811c9d2a2b5299ad39d0f4', '92010d5d8ba93822a1202e52159448da', 'ed24a2dd469e77235454ef51f9735cbd', '0c36c4fb4c3ef95757ddb66b90481e97', '531ce03f5970d60af44844380bfcf7e4', 'ef913a844eebf2073b1402015adab3f9', '5a2e87cc66c5d4a71210fe1153f24236', '1212b4d3d3f3366aa59f5d1c221a05c3', '9562e0bff2005e818797ee0a2211aa8e', 'eb965a9b79f77ebd0163c639049cc81d', 'fa8163fd8fec1838a578542c8b7cdcfd', '7872351a7773dabf361a3c5507a70d91', '6e8185027bc80406402fa5cc787b94f3', '4cbb18e977092c7b1cbddefd98896d4b', '5b48709a3af401a4f9445f78b2d3a89f', 'a4ba6b931575ebc4d8d13e0ff093e3b2', '4f3b79d61567f88ca10c5a8e09c042d8', '561a8dc8cde3bd8eb576e357e1e2d6eb', '6006f772c60f2cf7637afee66b2fee66', '063e5b3d318571e2b42e6b212370442f', '93fbf9c2c4edf413f0bbb6280e4c814c', '778330898d1e22531524345ecfde2b3d', '5b22586e008ac13f414538f89fbfb039', 'a0442e1d0815f1ed27c122af37118ce9', 'be0ddb7b227d0eba6ef68b89525cf665', 'a8ce504d5f53dbdf356df5fcb6e4e1d0', '8bc6303288e57c6f18f7cc6e1d05ba07', '183a1446e83848b36d063cf0bf0b1817', '4b14c4f5eeac261a200fc75dc2947f51', '6840b3bcbe6ca9749a7bbc49adea49a6', '6c6738b8116dcfcfd6826f5270d34aa9', 'ebc10285224570c2c12c7ea0e28d1720', 'cfea858c37d40dde39d3c919f4d7776c', 'eb0f5d50bd26a4579ab6f790b59e0550', 'e89f6b3db989e4b0f996bb2f7f7582b4', 'b6a17168c69e42481688fecb64003aa8', 'd886c0df4904027a7647e9198e35cf3e', 'd6c11f016dc646e57902297c53a3302f', '5f666313eded53239a7b9b522b369ff6', '806aef61f4010837bbf199712e418bdb', '8f8f09d7686ca705db556c9a98898e94', 'a488bfeee91d60e75cadc48e1a7b1795', 'f9c9fb02404a6419f860d0e06ca14c97', 'b110014e79c16431370caeb1cd330536', 'e1256ca2a6c6f647ab611d1cc84e6a40', '39524de7abf2fcc204ee34ff2abeef89', '7d02ecd940e2c2243b92b0a78512c8cc', '6a02e3e395e0c7e3130deafe7a5cc32c', '15c08164e266bf124751a3797a283791', '5a566546e70b9d46874756dd64c7f9c0', 'e1652b3dadaacf7e38eadcfed288fc4c', '363896afebdcb1529afcdcf91788bf38', 'd35167956bbd3c6dd53c647b8ef931c7', 'bad0c6194c6a2cba05ad4852f8d784cf', '08b5684aa58e11dc80714ed3929ce533', '2a4a6a540f0ab40db6ba86c482bfb012', 'fd2cfc5616e1b913752987ec364a18ed', 'da13a00ea66fd0686a9da99df82a1940', 'ed6f1e9096a1d5b46002e09cf643df14', '174400e5e1cc9ddf1167da90a2a9746d', 'b2b6406a93638cd99735e3bf26d7e9bd', '0f0d93733cec746bb1d66734e080cc5c', '144a4442eb05b01c3b3d88678f4907a6', 'b934c8c71934ad201655aeb4cb3a6455', '3d6fa919e0ecc621241a298949cfd1a1', '3bd512146a7f10ef439bd5c68d952b54', '30e862d7f21b0ed64b6a5a94acfe21d1', '29c43cad821e2d68067b5715ffdff973', '07da065d9a42f1016620d9221a15fc10', 'c4036d80d1d70b9395ab3b8724c5e0f7', '1dfc831ca9776baa85548dd71bb80348', 'de47d04542648abeed995ffa2633f172', '6f764107be8b1e12b09897c423f46ae2', 'fdf2c65b19f7330486ebeed49c3f7454', '6de360126554b861837bb557ad79c2cc', '4c9bf05e4ed15b7588760051e3a573a0', '153c840bb6a679a23214d49c25fa0eec', 'a511a940d585d66b865830a76cfe165a', 'f10f7de2c08c23709d5f94e0a9210d81', 'c3b6a8d5acf8b73a82075bf4cd17c126', 'b12ea92b2f21f9874f1d393ae7c2cc6e', '75b6bfc4cc1f0a1a1f316b565c7fcc15', '3ba388c0f122b9d36652c08c327fe311', 'cf2f0f79b552243c1304fc54686d9de5', '66d039883ec8cd702a81f98aabca94ac', '6546d06b3c01bf0c017df155eb52f281', '0e5e70fa33b9771f6ebae0333905f827', 'f5b2a0df8ec9df1eeba513f73ac30beb', '8d2f2d7e3ea8b058e35567172d58d939', '369e422d0ddc0d71bbf24120018564b6', '4b502219d511622b8e71bfacff33bae9', '1cae07eb34975ac4d4bad4f6fdeb69fd', '2c1e9b8582832a98eee2c0464d6f057d', '886ffe1c50e39260101874863f988986', '914531c555ee05040ca64a005ac11975', '560905b014cba67f1bf5eb806211a718', '47ecc268422cc95949f39b8a95d26613', 'c1880146f70aee54a54a6b6b006e4b78', 'bb3d43515d64ec75de46775aea9e5580', '5298c932566358b29f4f273ea89fb6b4', 'c002c1d163643668a43be604af188d33', '2b913d678f73a6fd3cc2685c696a0a30', '947c5a98c0abd397cf621791307d6c7d', 'fac1069c659dae73f176a5e7d6210bfb', '98610dc6ece2ea3f9c1d4ff81472f6d9', '5e345e5c0d2525a99b15cf4f851c4ad2', '1a5a9274f7acaa182ebe574a8d124920', 'c5caec6f4e1a0a86f847d23e733772d9', '93111218e15356512538a48570291640', 'c5def25f03b49b913c839bedb9c2562b', '1db60c5fce9def83420c6f275779fdb9', 'de8630a9770a47071b94e0a0c083e7f1', '584b43627ca30fc7f0a3d58ec3023b7c', 'd5b8bbad157d9a430eb8fb779bc5f2ef', '33bcf144bfb009408c72a88a517bf8e7', 'd482d59c0dd44f51ab72e94e7c722812', '2d7be734ca0908d84737561b2ecab234', '8ef8b74d3e3dc131440aa7b74b4ef0c6', 'e8ebad9dfc021d2e8553da1f8ca6816e', '32a3f9ad078324a978d8035bc89c517c', '5cba6dd8b9f7cb30e8c594c8f51c2b24', '4b31dd5afc7b75212abc0f34ad57f77c', '1de5866ed3761702c1041df93cb2f57c', 'e324d38b65a44957b85bbf4c4959c76e', 'f55ef5f85a0c36670430577f7848665f', '16aa15a55c5e60c04769b728833f7559', '154e3a51f5aa4455273d382abc1936aa', '109610666f4fbefdb94a0ad5f0df490c', 'ae4f11ae442d0780d2fdb4efc36d3bf6', 'af6b880ad2782851cae828ac38e0b409', 'acf81a0df40b2740fb026ef0c5947e4b', 'be90a4778aa028f2b51bae31af072830', 'f6f7edda7dc9d00590b79c0ed16ad851', '369cf7740e52dead86e6f0db8ba24931', '3ef6fea52e76f455efec96cecc0094f9', '33af52184fbb0085179cd7ae2a0e619c', 'bd54a56c1561088ad445607688b00386', 'c4fe6ac030a98f1aa60920d34dc6e588', '5e35f29d31ccfd24baa8cc18910629b6', '1842a31f9f14575c25ddcac3914fa781', 'acf53137e44909ab0575fd0e1fc20238', 'd7c34526f6c5ea68405ff2399fc2c5de', 'b493199a0d8a3428e48ad7f4b6aa5af7', 'b3b6e33c74d6721e08dae5e65201f879', '8ca4d8299fe05805a3b13d604fef0509', 'b238211ca66704af0dc6263e3551b302', 'b67314265956fd3f29735cdeded734a1', 'c868eef766078de5da8e393c46fde73f', 'd7b0a3d1d3f1fbee5be8b2e11b18a03f', 'e1042db643abb22c27c35ea044937e5c', '1b2b5a430befed2ca83b8cc43e4bec29', '258fdda8df90f8bda7fcc948c38bb7e8', '6e61d4f161721c719bc49271658b4701', '9b0ab7cb833f187868869446ddd29001', '52ca5e152169240e1a9570d059c4e056', '853e0682c0178e37de08cc0874ddc04a', '3ad8fb5c76ecb7c924ef931246b1ba0d', '574107de0b44a9cb154c75759469ce1b', '78efd72e25a190beb42e7ae53f866b11', 'fafebca743101f7dec89fd5749f12907', 'a41eb819f672efbd2d800ec23b6a832e', '0f60d7fef94f17ffe56ce6cbe0bb558a', 'e130cb2f6e9a4fd73b67233964e84ddf', '2286cac53007879ccca9e56c06f779d5', 'eb58082ab105ac4562954a77815cd462', '50d0160c02fd5b5b10c0158ff9d23646', 'a87f3031f6918c545e0c0a4c8c5ec90c', '88c5bc635683387a3271d130c71c5754', 'c4cd00ccbecce26022ae7abb73d84954', '705e61a9ecdd213dfe3773025b81700c', '17022da497dc277a5e36e5b4f04394ae', '777f470a0341b7c68e620cd412c21591', 'f029bf7bc8d5932bb935853b8949249d', 'd8cf5724b4301ce3a3084b83e1d6d543', 'e5afbf17c64ffdeac39e1cff5e1e53fb', '01c98cb6893b53e1b53e2fd79cb6dcb9', 'a0e0faa13b2f9d8dde0ef13b15ec01d6', 'a3c5921d764c076f86bf0a490a4f384b', 'dffa6f9dc0d7f68097652652d67bb389', '4885250e92588302377b885089f8f152', '701a796dae769a8062749bc9c385d5b9', '8493edc425acd2f859ae0730a1e5847c', 'ebc25cf105948781ef514fb1fb357e15', '888200f619da20275c58f3743dc51777', '66cf5b3ecf8ea1b935599871ba93134e', '1123c2fa146046b0203f314013ee12a7', '2fbe61ca25a4decbc3182ae7ba19a2ff', '5efb567e34c19a4cc5e26061e91d0eff', '018cddd7d32cf98b810460db3dc33537', '64c0fb61e3e3c86ef5776ed14e9fdfb5', '275e3cd140dfb7bb959b0d7542625bd9', 'd7c509eb15ed3856ac3c503ffe99228c', 'c3eec00f2051eb3714f82200723b236d', 'fe20ae0de96820e2413a52c55a022fe4', '0cd121e394e92664fbaea8005f664d7a', '804e3c435b3e7c79881ee511fca3f19e', '71d8daa19b3d5a1a9ca7bd129933a31e', '9f1a40355de39d752a2d2681b410ed2f', '44e5b925b06d1248520c55676a34369e', 'd4e2d51d4f078ede27f4f9658ddb07ee', '75594b10e647f3c826d6248101438d93', '7ada5f016fddf6c5b65d77c9315e0e82', '9617036ee24adf8089afc8044b33f8ca', '1eda2e8181d042eeaa9eea41345f1b09', '6263560791eba6228cebf46457c0bf58', '074a43f5d5f16613d05e2301a2d830a8', '820dfea7a65e082219feb73f1e62900b', '86e898cce1108b70707b47c6249fc948', 'c676b59fd104f3195387221420f9d755', 'b8542ea3fb39d2600930800cfc5e343a', 'f6010812e4da2c3852d2b6a7c3a44653', '5071734835b9e87e850c1f8f9fca40ae', '529e896cca646eee194a53f3467d5826', '5bf40288cf924fd77af0c447d2dc68a8', 'e1b2b433a0c6da56d8da8384b3807fa8', 'b4b7c5d8862a44feb103b4fabf5ad03e', '8ec20e4a92cfe2b54fcf42f5ab7a3f9c', 'a0a23e9b6c4693603c2d58a1653baec8', 'd56c45f113fc95b0d9920eb334c3304d', '6acdc9c069fb43d409f4aa1ef75f7dc2', 'eb9ac5afd63fd4d4e8d28f610c07b64d', '51f8da2fd610b66114d7b7876e8791dd', 'f8d48d1e3e4d801cf618aac250eb1b23', '38bf708b8cffcf4873f8a84516c51fe8', 'cebdd4ec6404aa54b4c94ff504321504', '0c8fe963a45bc2d8c9f6ee2d7d2a13ec', 'f112ce34e2ed09ad476b05d092a0e62e', '53f864b2f7b6924b06666a397a112776', '495de8f15ee4c85e6d5235edf9132dd7', 'f29b24de1ff26e4e9ac015928eca71d9', '6c6b9e130190b7a16385431d2f67e3a2', 'a50408f19b03759cecfa217fe8cf313c', '41a2e848dbf373905f4b93482d4e32d5', '73daad32169a7f024c5395d085430122', '92bd4cc35f6d49b044ab8ea75c9157e9', 'b97e6799b2cce4a4077a0938d2176913', 'b8cacd564906d55631b939dbc5495402', '2d3b64bdf65ac0d726ba1c8a745fb35d', 'd429511fbe089701610ccdc3a557f5c5', '39ab8eb51adc48d1084dc6cc73d321a5', '59fd1feb62a48c85f3adbd072b67d1bd', 'bdf7f02fdf1e0f44e580788c8adb6c47', 'a0ecc9f39a07c77773f5dcc48f7ae8e1', 'f4dccb51175c2dc706f08d1d175ccb39', '341100de9600c94ad3213aeaf9f0bc1d', 'ca215250f4740c098418e07eb09a4e0b', '3cbe09eef8635811537a7ace65d16c8f', '43bcb8df26fd572acb5e71f6197f04bb', '09fa7c7ca09ded90cfdde7d42f1a0115', '815ff6f25ba6fb92f381a85add47deae', '54dab2488a61afee38bd76fc4712ceef', '417ebe8f1cac3e9f4fda69d38606806e', 'cb707546342b02f1ea2bb25a357186d7', 'd7110de98cddf8fbcab3ed518db5b8ab', 'eb3479c512edcbf35d5e79d1f00f529f', '7a6351c5633c276ed550074873efc04d', '3241b170ae96fc215566abdd4fdbf19f', 'c2090064fcfb9e5886c24667133db26b', '2565b71a9734664824a5375e63db642b', '924d5f110fd0728ba926221ff295a9b9', '7a04344f56375440bcb917a63aecc505', '635c3201045f2f5c6cabe09ae20a7732', '14b24a1673e246f2105219f84b816e8c', 'bb49e8abc4562820315ee57fe5a1e0b4', '2684924b64f51af03e725f7f486c5db6', '61f8051b380fbe66cc963c0404f025d7', 'f6d927d72c951bc384eab1b5202ddc7b', '3a9d78d20860f06f1261f1f67dda272b', 'cea77ba6859f8063e02433eb89ee4256', 'd9fba92ac9b42e3808c363b44a3164c8', 'e054efd5c147d2f8e448518eef10eae2', '5afb611bf76cf81d2b8e7f605f9fc56a', '48680e58b3a0cc805b708260e1f11ef1', '0eafe9b9ecde21e15d37605db39c2516', '2c3444643716f3565d725ee746aa296c', '9c5277c6a3f1f98c1c1f3b643c2f13e6', '0f531b4958e983e8e2ecf9f959aa5815', '6eec56770f045d18395f0b48f070ecb2', 'a67a387d4b1e9db4e2ff9186abd61931', 'ebf3ea3b32e7ddf73da31bcfddd1abb5', '5e32dd96d4bb6b81fee7963cb64590b1', '4848f6974c9f8b79157def19adf54f2d', '21342ba825ae18995edf4d3eb3d3b318', '78f4a27125cf55d7a3d414393b940f0a', '410dcc9d5ef7e09c5c23b1b9cd8ff6b7', 'dc4f29b18fe6c4c6bb6475305ecd2b51', '3cc18853dfa4a142ffca2b649179ef6c', '9d3dd47c14824c2090f524c873a44c14', '5b97cf9dba0c35211b5aeff98835477b', '0f99c1bc18850aea7764c2a585970873', 'e978c4f34c270a10dfa4ce3b84e3d157', 'f07e6051b180d9be0217db9f78ec915a', '0fc1eb7e343de0c75ba9348315351896', 'b939f4ba59e9ef21fd0d082ac8ba01c2', '2956d76a8cb81adeae53db84b1c8cd35', '0d31cc9947eeea4e7379cff2d79588d1', '624f82f64f6088ef7b9c6eacd2c124ea', '77394f9ee7a0f8119aedb704284abffe', '52ed824a42ac53861ec3249d3073539f', '29d04f4b8eb183955a25b315f157629a', '3eb37ab925656667c1529bd5c36d47b7', '3cf2bd87a6b921ed94eb6b0d86594090', '707a51f4be12ea300d9fd262fc2d52f9', 'c72627f08c18888fa22aa72c4e31663d', 'f2baa138a7c17b300e7ada594a7ef713', '8fe0198e09a19caaa0d79e268fefb5f8', '78abf49b310d4f6767a6cbf360eaac48', 'c66e0cb2d4d6ac419e3dfa5371aa259c', 'a5802e27a94ef4dd3a59347b2739b255', 'da05d5cbcc1091227723eb04b640975e', '74556a1edc0eedaccb7dd8671aac5e7b', 'f3b9439774365c3e57eef2f9258b1d2d', '9bf1f4127db72970a6655e7e436233ad', '2d90599da05f6f12dd0558e3e25e4128', 'da987435004ebfbe86d4ce0c2352361f', 'ec301c5a003b4d65ddcc3ef1a78a3ad8', '9b6a692566a3c4fdb90f0968d6af72cd', '3ad02caa057236a1c93fba6913b06af1', 'f9b3aa2b106918bbe0f53c3b48704e77', '3420e69ecf0aa37c7f019524a9655701', 'c7d2dc2d074ad02567c11ba5af693739', '57d95eee95c8e85b517dc178b7a50c29', '260987343387394b64b8703715e14b7b', '51d058057989eab1e3c243ce21e28348', '94b1588f166279a77ef0079d5796531b', '49ef6e7903e635499cf95787873c1457', 'edcb17ddc7eb0eef3d4122c795d3e6ef', '81790e11945d9a6e82e6262671bafd21', '13a297ceaf949372a638c863ec3bbf93', 'd8885ceac1fd828bbe04d41b7f63f4fc', 'c6a80a58063ed858911548d392d80339', '7e6b2dea82aafdd431c7729a96297372', '15c90328b18e4d869320ef95ef13220b', '895da4ac6dcd7fa8bfbcfb4d55803d4f', '01a72ae4b8261719178ad623df1f1e7f', '7da163decfd9f59d0813fda45f5a488d', 'f4fab4762f0bda91d7d3abf1416e94d2', '535314743608a17e2d9310b201ac8d92', '604e988aad0390966cbcac1a680deec3', '3b60d89d2e017fdea667709985b69bb2', '0c420daf613a0785f9bce0144aceaca2', 'aafc27bc4771964855c6d6cb7443f717', '774b7452e8be190a797a236ab76e3807', '18b42824ac54e02878a49ecc7879b79b', '07cc85198473ac92cb919a97fc1ee985', '5d88348456ec30ca61be26d2498e0471', '0cae0ed408c3cee19690f11d7ca907ae', 'd289297a91dc1bff32df41137d531d02', 'ada2a7e8fe823a5f1e561632baf60703', '33511585f2f0d78540d3e9796fbdad0d', '889611ff7d6f5ce64125c6b88f13cad0', '8532e6f80693114de36c919f9f1f446b', '147e78a731f02865d6986b92a475bae8', '1988527fa944694365f0609eecebbb4c', '18c7a6619580ade75a5a5d7cfb958212', '297d05c9d7f5e93df89abad01caddfc4', 'acec240ca247a31450a927035fdf2cac', 'aa4a87701445da769e21705be4ef9ab1', '39c9b2796b1ddc2c2399c25faefa50fb', '858bbd77c27fdcaae37c871947b381a7', 'c8d1fd5d8d9a8952b76edcb2c8e8bfea', '0c69b5ff499209f26969aa8fa8b804c4', 'b679f662e1773650c24f6862e4012163', '2115c67c2bf79b2e46e1c53058abe55b', '78ffac7d990cac269a69b3b4de273778', '6d2392f32e7310c9de501382cceb8546', 'fb509983b98ce4d055069135f9d9e33c', 'b957e91200d50700527c861d82a0202c', '3806a44f14b88bb30a453ca0ade663b8', '656bd6ff2c2ab62101d514889c5ad85d', 'e9b5016277e949ebaef1f603e2df1073', '61d48a26022c52e8e07ea688cea48d7f', '8377cef554bf54a512adc23cec8a9647', '888f7b75db45d0e5cec1a4ac12fc97cc', '6ec0d2c68496ff67b0de3034ad6896b5', '81595f4624dbf5392b9500ee26b35ff1', 'e4d12476a3154afdc714eaeb74489cd7', '0696a081af05ea872936c28d843b74ea', 'd90cb385bc1ca7dbebf0e83a88677b7c', 'ef8a0428087be87b6177a197f42e2018', '64d4661562f8c01271ae25018ffaaff6', '802e1c9f3f8e37f5d00b9982e6ac852d', '5829df0fa7b41c56a3ff47f580c595ef', '448d1b974aed27045c70f82b4f99f333', '6e655d580aba06fe3857cf91703d0db5', 'e6055c0a4b2327c794b52953638da9bc', 'bc6793f2dc6491bfe6b2f27546498b77', '49486d19f07322225fa9c559453ead83', '19d4c2c6ea85e533a4465cda3d9b0f8b', '04c27ef0dfc093cfee6d0f4fa5b0192b', '2e78d6b7a80b0f321c19e0d0ee369e2c', '789c8245dcb8995795bb0f833473477a', '55466931b1d514a873bbecf59e85cecb', 'cfb629dcf9f54b8e15a6a94d57badec8', '2689b4851d08d95483d197d25361c8fc', 'f2ea670c91ee4204d84a393bb860a744', 'c8164bb74e43bd2b711017e9003a66a3', '22140f6de4c5e6e0f98fd45a4de72a8c', 'bc5f0e328c8478e503e1d91ecadd8187', 'f1fefc7e4c6809fabd3df08947525953', 'cf48adb25c98bef943edecb889172ae6', '51ffd1c9810f8ee88ac70052061e1cd6', 'ecce14c16bfcc636d44c3f50645da3c1', '6974c6656c97abd67add678656d8500f', '468c3fb9cf5b32dfc4d6dc7106002f8d', '7e9d8803b51278ca3164a8ea11c24615', '9eb514ecb9d67a54c0e2da5b4a7c0480', '7cd3a047556d025d5eb1b747ce406c6a', '756aedb284a92c075603f1a023ebfb2c', '3bd7b4c274b62fb2d47568a561cc3850', '5d38e6af46111410b4649f1a5182c4ec', 'c72ec378ff61804ad5110544abe572c9', '32fe1326db22fc5ff0dd831d49eb4386', '610ef68c977d9748124606ab17cc7965', '15963568a76505c03b4c8cdf4506afa5', '3912e794991b96acc89695a63fca1734', 'de71872a7395d0981aef74f79d5dcb0d', '448813554c7b3b41c7bc16fd20b962ea', '7bd59783a6327f10f3b1a7f03763b7de', '55f2f700e54fdf79ad7e94b16b49b068', '8f8aa9b66c4409a6ec337afe89ea0f32', 'dfcebcdf719ac7258d2110bf0aad29b8', 'b9e9e89a0fc8b9ab3839646c762edb58', 'f9da3f72e5017aaf7cf08927f2bd7c52', '1480559cfc5b001c3b1ed0011120f4ae', '0e69b178bc01665a1e2b3b34e9863f25', '0cfbe7db6136c4fe0fc922c803f91270', '74e68bab08d4ef41a6413ea865a27891', '78641b963e645be8b69c01372d9edc5f', '233b275c1de4bc8b37f7ea673de289fb', '1b6907bd9fabfceb078f8f34f981b085', 'b8836a8724060542bcf497a39bc6df03', '40f05e3c8eb4abd1280ace57c7cb8255', '68dae11b5b51bf4c13dd05c7fcda8608', '4bc44c83c82e2d50f21784973e301850', 'b3a832e6189da1233a9c435afa0a58de', 'a9f02ff0978677a47bb5a1de8b6de7ae', 'acf9add57b0a2dc09185eb4ba41b921f', '59ff627eacb1f1d250253d8c430461db', '13d5b7fbbdf8440e02cccfa8264dfb45', 'd63bbf9dc80afbae546789653e2c94cc', 'd2372c21359e4c7b53c36af96bd328fd', '884a86e4803291a5016b60b94d157a27', '1665b9e1d88a35507f163b704e83c4c4', 'ba7e620677a184685733f89485d164fb', 'e4be8b06ebd26e8341532c75beb9cb9c', '4debd4b8c49f2b78665d22dbf1ca9bd6', '97cfb3dd0aa7645851474231e28d743c', '0f7a8c0d7e3262214df99c863544322c', '5b8347c8610c58026fdd13dece048b7f', '5bb3db438d5b139dd5a05e60a4b6a103', '1b3643e35a941d9d73298a3043c33f51', 'fe3e34da9ea7cfc274e20efcc4c20b54', 'b7114464e49358df1b4285223cd0cc01', 'bb9847311974136d54b895f0d2ae4b20', '32dee05bfb46fd858b0b213d0c178ade', '874292b35e03153f98c883c7d7d758a2', '2fc4208bfa86f6f02d8c624ce66983a9', 'c1f1cd2c9fa262a76c3ba3972366ffd8', '02fd58ab1c8855242a49e3b3ff2465c7', '0b44e778ecbbdea9699c21c8dfca2cfb', 'ca3b317e6f261762dcc3f3a41924a6a8', '37f0b7961ede39f1f89f520e7280fafd', 'caaae630f53f0bd475181db784552422', 'e713a50602cb52ac26435c1e2f1af601', '1eab8079fc53747043edfbc34b7f2278', '9cad30252818fbdff20b261ed734d97a', '75d5f656e34410a730499eb37c324dab', 'f07c67392bfc2e2901b9f8b8b35a6290', 'ea8df86aa7dd07b3128a02227902a691', '484da2f413462ee4bb9c304069bbf960', '3c5408390ebc3a12c560e37e6fb00e68', '75f3531ac614b07db4698675b8b7e2e1', 'a874a1d0baa063728390cbc358c45ad1', '43a0dda77a237376f045eff518a09b85', 'c58a1274424630629e98bf855b11a515', '823e2e5e6e5663e1de7c49df0a38fe28', 'a60b98c86d934886748a402507fcbdbc', '9fffffacff9573f3534c08ee2c5d14ee', '2fde197468297f918fcddd8e77947b83', '5158e91efd48f43770d91ca9c9269c59', 'd46a5527b8b06e7d1a765a7ceb38626d', 'a07c6c6972c5d618d0c705ad84ddecd4', '42737cb0b7beab192fc25f12acf744e5', 'a4343093f0f78ab48394d836e8096feb', 'aaa1831c2c21956642230c392d27090c', 'f274d3e8655fbb9e0ab143ace199e93e', '881aeabfdc863466723fa1a86a7128ae', '80e0945d2ba6e40dfa99eb2a5daf19ac'] TITLE = "Проверка слуха" STATEMENT_TEMPLATE = ''' Мы записали звуки, исходящие из аномалии. Возможно, где-то между ними спрятана секретная информация. [sound.wav](/static/files/f5eke7i6pg/{0}/sound.wav) ''' def generate(context): participant = context['participant'] token = tokens[participant.id % len(tokens)] return TaskStatement(TITLE, STATEMENT_TEMPLATE.format(token))
1,082.470588
18,009
0.885556
547
18,402
29.787934
0.97989
0.002087
0
0
0
0
0
0
0
0
0
0.560262
0.03016
18,402
16
18,010
1,150.125
0.35272
0
0
0
0
0
0.879361
0.872242
0
0
0
0
0
1
0.090909
false
0
0
0
0.181818
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
1
1
0
0
0
0
0
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
8edf2cd04c5a9a99af7c5b0d59db4e78b36bc99d
51,705
py
Python
opensilexClientToolsPython/api/brapi_api.py
OpenSILEX/opensilexClientToolsPython
41b1e7e707670ecf1b2c06d79bdd9749945788cb
[ "RSA-MD" ]
null
null
null
opensilexClientToolsPython/api/brapi_api.py
OpenSILEX/opensilexClientToolsPython
41b1e7e707670ecf1b2c06d79bdd9749945788cb
[ "RSA-MD" ]
7
2021-05-25T14:06:04.000Z
2021-11-05T15:42:14.000Z
opensilexClientToolsPython/api/brapi_api.py
OpenSILEX/opensilexClientToolsPython
41b1e7e707670ecf1b2c06d79bdd9749945788cb
[ "RSA-MD" ]
null
null
null
# coding: utf-8 """ OpenSilex API No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: INSTANCE-SNAPSHOT Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import re # noqa: F401 # python 2 and python 3 compatibility library import six from opensilexClientToolsPython.api_client import ApiClient class BRAPIApi(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. Ref: https://github.com/swagger-api/swagger-codegen """ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def get_calls(self, **kwargs): # noqa: E501 """Check the available BrAPI calls # noqa: E501 Check the available BrAPI calls # 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_calls(async_req=True) >>> result = thread.get() :param async_req bool :param int page: Page number :param int page_size: Page size :param str data_type: datatype :return: list[Call] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_calls_with_http_info(**kwargs) # noqa: E501 else: (data) = self.get_calls_with_http_info(**kwargs) # noqa: E501 return data def get_calls_with_http_info(self, **kwargs): # noqa: E501 """Check the available BrAPI calls # noqa: E501 Check the available BrAPI calls # 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_calls_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :param int page: Page number :param int page_size: Page size :param str data_type: datatype :return: list[Call] If the method is called asynchronously, returns the request thread. """ all_params = ['page', 'page_size', 'data_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') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_calls" % key ) params[key] = val del params['kwargs'] if 'page' in params and params['page'] < 0: # noqa: E501 raise ValueError("Invalid value for parameter `page` when calling `get_calls`, must be a value greater than or equal to `0`") # noqa: E501 if 'page_size' in params and params['page_size'] < 0: # noqa: E501 raise ValueError("Invalid value for parameter `page_size` when calling `get_calls`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'page_size' in params: query_params.append(('pageSize', params['page_size'])) # noqa: E501 if 'data_type' in params: query_params.append(('dataType', params['data_type'])) # noqa: E501 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 = [] # noqa: E501 return self.api_client.call_api( '/brapi/v1/calls', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[Call]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_germplasm_by_search(self, **kwargs): # noqa: E501 """Submit a search request for germplasm # noqa: E501 # 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_germplasm_by_search(async_req=True) >>> result = thread.get() :param async_req bool :param str authorization: Authentication token (required) :param str germplasm_db_id: Search by germplasmDbId :param str germplasm_pui: Search by germplasmPUI :param str germplasm_name: Search by germplasmName :param str common_crop_name: Search by commonCropName :param int page: Page number :param int page_size: Page size :param str accept_language: Request accepted language :return: GermplasmDTO If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_germplasm_by_search_with_http_info(**kwargs) # noqa: E501 else: (data) = self.get_germplasm_by_search_with_http_info(**kwargs) # noqa: E501 return data def get_germplasm_by_search_with_http_info(self, **kwargs): # noqa: E501 """Submit a search request for germplasm # noqa: E501 # 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_germplasm_by_search_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :param str authorization: Authentication token (required) :param str germplasm_db_id: Search by germplasmDbId :param str germplasm_pui: Search by germplasmPUI :param str germplasm_name: Search by germplasmName :param str common_crop_name: Search by commonCropName :param int page: Page number :param int page_size: Page size :param str accept_language: Request accepted language :return: GermplasmDTO If the method is called asynchronously, returns the request thread. """ all_params = ['germplasm_db_id', 'germplasm_pui', 'germplasm_name', 'common_crop_name', 'page', 'page_size', ] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_germplasm_by_search" % key ) params[key] = val del params['kwargs'] if 'page' in params and params['page'] < 0: # noqa: E501 raise ValueError("Invalid value for parameter `page` when calling `get_germplasm_by_search`, must be a value greater than or equal to `0`") # noqa: E501 if 'page_size' in params and params['page_size'] < 0: # noqa: E501 raise ValueError("Invalid value for parameter `page_size` when calling `get_germplasm_by_search`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'germplasm_db_id' in params: query_params.append(('germplasmDbId', params['germplasm_db_id'])) # noqa: E501 if 'germplasm_pui' in params: query_params.append(('germplasmPUI', params['germplasm_pui'])) # noqa: E501 if 'germplasm_name' in params: query_params.append(('germplasmName', params['germplasm_name'])) # noqa: E501 if 'common_crop_name' in params: query_params.append(('commonCropName', params['common_crop_name'])) # noqa: E501 if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'page_size' in params: query_params.append(('page_size', params['page_size'])) # noqa: E501 header_params = {} #if 'authorization' in params: # header_params['Authorization'] = params['authorization'] # noqa: E501 #if 'accept_language' in params: # header_params['Accept-Language'] = params['accept_language'] # 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 = [] # noqa: E501 return self.api_client.call_api( '/brapi/v1/germplasm', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='GermplasmDTO', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_observation_units(self, study_db_id, **kwargs): # noqa: E501 """List all the observation units measured in the study. # noqa: E501 List all the observation units measured in the study. # 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_observation_units(study_db_id, async_req=True) >>> result = thread.get() :param async_req bool :param str study_db_id: studyDbId (required) :param str authorization: Authentication token (required) :param str observation_level: observationLevel :param int page_size: pageSize :param int page: page :param str accept_language: Request accepted language :return: list[ObservationUnitDTO] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_observation_units_with_http_info(study_db_id, **kwargs) # noqa: E501 else: (data) = self.get_observation_units_with_http_info(study_db_id, **kwargs) # noqa: E501 return data def get_observation_units_with_http_info(self, study_db_id, **kwargs): # noqa: E501 """List all the observation units measured in the study. # noqa: E501 List all the observation units measured in the study. # 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_observation_units_with_http_info(study_db_id, async_req=True) >>> result = thread.get() :param async_req bool :param str study_db_id: studyDbId (required) :param str authorization: Authentication token (required) :param str observation_level: observationLevel :param int page_size: pageSize :param int page: page :param str accept_language: Request accepted language :return: list[ObservationUnitDTO] If the method is called asynchronously, returns the request thread. """ all_params = ['study_db_id', 'observation_level', 'page_size', 'page', ] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_observation_units" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'study_db_id' is set if ('study_db_id' not in params or params['study_db_id'] is None): raise ValueError("Missing the required parameter `study_db_id` when calling `get_observation_units`") # noqa: E501 if 'page_size' in params and params['page_size'] < 0: # noqa: E501 raise ValueError("Invalid value for parameter `page_size` when calling `get_observation_units`, must be a value greater than or equal to `0`") # noqa: E501 if 'page' in params and params['page'] < 0: # noqa: E501 raise ValueError("Invalid value for parameter `page` when calling `get_observation_units`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'study_db_id' in params: path_params['studyDbId'] = params['study_db_id'] # noqa: E501 query_params = [] if 'observation_level' in params: query_params.append(('observationLevel', params['observation_level'])) # noqa: E501 if 'page_size' in params: query_params.append(('pageSize', params['page_size'])) # noqa: E501 if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 header_params = {} #if 'authorization' in params: # header_params['Authorization'] = params['authorization'] # noqa: E501 #if 'accept_language' in params: # header_params['Accept-Language'] = params['accept_language'] # 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 = [] # noqa: E501 return self.api_client.call_api( '/brapi/v1/studies/{studyDbId}/observationunits', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[ObservationUnitDTO]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_observation_variables(self, study_db_id, **kwargs): # noqa: E501 """List all the observation variables measured in the study. # noqa: E501 List all the observation variables measured in the study. # 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_observation_variables(study_db_id, async_req=True) >>> result = thread.get() :param async_req bool :param str study_db_id: studyDbId (required) :param str authorization: Authentication token (required) :param int page_size: pageSize :param int page: page :param str accept_language: Request accepted language :return: list[ObservationVariableDTO] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_observation_variables_with_http_info(study_db_id, **kwargs) # noqa: E501 else: (data) = self.get_observation_variables_with_http_info(study_db_id, **kwargs) # noqa: E501 return data def get_observation_variables_with_http_info(self, study_db_id, **kwargs): # noqa: E501 """List all the observation variables measured in the study. # noqa: E501 List all the observation variables measured in the study. # 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_observation_variables_with_http_info(study_db_id, async_req=True) >>> result = thread.get() :param async_req bool :param str study_db_id: studyDbId (required) :param str authorization: Authentication token (required) :param int page_size: pageSize :param int page: page :param str accept_language: Request accepted language :return: list[ObservationVariableDTO] If the method is called asynchronously, returns the request thread. """ all_params = ['study_db_id', 'page_size', 'page', ] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_observation_variables" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'study_db_id' is set if ('study_db_id' not in params or params['study_db_id'] is None): raise ValueError("Missing the required parameter `study_db_id` when calling `get_observation_variables`") # noqa: E501 if 'page_size' in params and params['page_size'] < 0: # noqa: E501 raise ValueError("Invalid value for parameter `page_size` when calling `get_observation_variables`, must be a value greater than or equal to `0`") # noqa: E501 if 'page' in params and params['page'] < 0: # noqa: E501 raise ValueError("Invalid value for parameter `page` when calling `get_observation_variables`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'study_db_id' in params: path_params['studyDbId'] = params['study_db_id'] # noqa: E501 query_params = [] if 'page_size' in params: query_params.append(('pageSize', params['page_size'])) # noqa: E501 if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 header_params = {} #if 'authorization' in params: # header_params['Authorization'] = params['authorization'] # noqa: E501 #if 'accept_language' in params: # header_params['Accept-Language'] = params['accept_language'] # 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 = [] # noqa: E501 return self.api_client.call_api( '/brapi/v1/studies/{studyDbId}/observationvariables', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[ObservationVariableDTO]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_observations(self, study_db_id, **kwargs): # noqa: E501 """Get the observations associated to a specific study # noqa: E501 Get the observations associated to a specific study # 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_observations(study_db_id, async_req=True) >>> result = thread.get() :param async_req bool :param str study_db_id: studyDbId (required) :param str authorization: Authentication token (required) :param list[str] observation_variable_db_ids: observationVariableDbIds :param int page_size: pageSize :param int page: page :param str accept_language: Request accepted language :return: list[ObservationDTO] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_observations_with_http_info(study_db_id, **kwargs) # noqa: E501 else: (data) = self.get_observations_with_http_info(study_db_id, **kwargs) # noqa: E501 return data def get_observations_with_http_info(self, study_db_id, **kwargs): # noqa: E501 """Get the observations associated to a specific study # noqa: E501 Get the observations associated to a specific study # 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_observations_with_http_info(study_db_id, async_req=True) >>> result = thread.get() :param async_req bool :param str study_db_id: studyDbId (required) :param str authorization: Authentication token (required) :param list[str] observation_variable_db_ids: observationVariableDbIds :param int page_size: pageSize :param int page: page :param str accept_language: Request accepted language :return: list[ObservationDTO] If the method is called asynchronously, returns the request thread. """ all_params = ['study_db_id', 'observation_variable_db_ids', 'page_size', 'page', ] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_observations" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'study_db_id' is set if ('study_db_id' not in params or params['study_db_id'] is None): raise ValueError("Missing the required parameter `study_db_id` when calling `get_observations`") # noqa: E501 if 'page_size' in params and params['page_size'] < 0: # noqa: E501 raise ValueError("Invalid value for parameter `page_size` when calling `get_observations`, must be a value greater than or equal to `0`") # noqa: E501 if 'page' in params and params['page'] < 0: # noqa: E501 raise ValueError("Invalid value for parameter `page` when calling `get_observations`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} if 'study_db_id' in params: path_params['studyDbId'] = params['study_db_id'] # noqa: E501 query_params = [] if 'observation_variable_db_ids' in params: query_params.append(('observationVariableDbIds', params['observation_variable_db_ids'])) # noqa: E501 collection_formats['observationVariableDbIds'] = 'multi' # noqa: E501 if 'page_size' in params: query_params.append(('pageSize', params['page_size'])) # noqa: E501 if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 header_params = {} #if 'authorization' in params: # header_params['Authorization'] = params['authorization'] # noqa: E501 #if 'accept_language' in params: # header_params['Accept-Language'] = params['accept_language'] # 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 = [] # noqa: E501 return self.api_client.call_api( '/brapi/v1/studies/{studyDbId}/observations', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[ObservationDTO]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_studies(self, **kwargs): # noqa: E501 """Retrieve studies information # noqa: E501 Retrieve studies information # 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_studies(async_req=True) >>> result = thread.get() :param async_req bool :param str authorization: Authentication token (required) :param str study_db_id: Search by studyDbId :param str active: Filter active status true/false :param str sort_by: Name of the field to sort by: studyDbId, active :param str sort_order: Sort order direction - ASC or DESC :param int page: Page number :param int page_size: Page size :param str accept_language: Request accepted language :return: list[StudyDTO] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_studies_with_http_info(**kwargs) # noqa: E501 else: (data) = self.get_studies_with_http_info(**kwargs) # noqa: E501 return data def get_studies_with_http_info(self, **kwargs): # noqa: E501 """Retrieve studies information # noqa: E501 Retrieve studies information # 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_studies_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :param str authorization: Authentication token (required) :param str study_db_id: Search by studyDbId :param str active: Filter active status true/false :param str sort_by: Name of the field to sort by: studyDbId, active :param str sort_order: Sort order direction - ASC or DESC :param int page: Page number :param int page_size: Page size :param str accept_language: Request accepted language :return: list[StudyDTO] If the method is called asynchronously, returns the request thread. """ all_params = ['study_db_id', 'active', 'sort_by', 'sort_order', 'page', 'page_size', ] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_studies" % key ) params[key] = val del params['kwargs'] if 'page' in params and params['page'] < 0: # noqa: E501 raise ValueError("Invalid value for parameter `page` when calling `get_studies`, must be a value greater than or equal to `0`") # noqa: E501 if 'page_size' in params and params['page_size'] < 0: # noqa: E501 raise ValueError("Invalid value for parameter `page_size` when calling `get_studies`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'study_db_id' in params: query_params.append(('studyDbId', params['study_db_id'])) # noqa: E501 if 'active' in params: query_params.append(('active', params['active'])) # noqa: E501 if 'sort_by' in params: query_params.append(('sortBy', params['sort_by'])) # noqa: E501 if 'sort_order' in params: query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'page_size' in params: query_params.append(('pageSize', params['page_size'])) # noqa: E501 header_params = {} #if 'authorization' in params: # header_params['Authorization'] = params['authorization'] # noqa: E501 #if 'accept_language' in params: # header_params['Accept-Language'] = params['accept_language'] # 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 = [] # noqa: E501 return self.api_client.call_api( '/brapi/v1/studies', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[StudyDTO]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_studies_search(self, **kwargs): # noqa: E501 """Retrieve studies information # noqa: E501 Retrieve studies information # 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_studies_search(async_req=True) >>> result = thread.get() :param async_req bool :param str authorization: Authentication token (required) :param str study_db_id: Search by studyDbId :param str active: Filter active status true/false :param str sort_by: Name of the field to sort by: studyDbId or seasonDbId :param str sort_order: Sort order direction - ASC or DESC :param int page_size: pageSize :param int page: page :param str accept_language: Request accepted language :return: list[StudyDTO] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_studies_search_with_http_info(**kwargs) # noqa: E501 else: (data) = self.get_studies_search_with_http_info(**kwargs) # noqa: E501 return data def get_studies_search_with_http_info(self, **kwargs): # noqa: E501 """Retrieve studies information # noqa: E501 Retrieve studies information # 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_studies_search_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :param str authorization: Authentication token (required) :param str study_db_id: Search by studyDbId :param str active: Filter active status true/false :param str sort_by: Name of the field to sort by: studyDbId or seasonDbId :param str sort_order: Sort order direction - ASC or DESC :param int page_size: pageSize :param int page: page :param str accept_language: Request accepted language :return: list[StudyDTO] If the method is called asynchronously, returns the request thread. """ all_params = ['study_db_id', 'active', 'sort_by', 'sort_order', 'page_size', 'page', ] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_studies_search" % key ) params[key] = val del params['kwargs'] if 'page_size' in params and params['page_size'] < 0: # noqa: E501 raise ValueError("Invalid value for parameter `page_size` when calling `get_studies_search`, must be a value greater than or equal to `0`") # noqa: E501 if 'page' in params and params['page'] < 0: # noqa: E501 raise ValueError("Invalid value for parameter `page` when calling `get_studies_search`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'study_db_id' in params: query_params.append(('studyDbId', params['study_db_id'])) # noqa: E501 if 'active' in params: query_params.append(('active', params['active'])) # noqa: E501 if 'sort_by' in params: query_params.append(('sortBy', params['sort_by'])) # noqa: E501 if 'sort_order' in params: query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 if 'page_size' in params: query_params.append(('pageSize', params['page_size'])) # noqa: E501 if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 header_params = {} #if 'authorization' in params: # header_params['Authorization'] = params['authorization'] # noqa: E501 #if 'accept_language' in params: # header_params['Accept-Language'] = params['accept_language'] # 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 = [] # noqa: E501 return self.api_client.call_api( '/brapi/v1/studies-search', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[StudyDTO]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_study_details(self, study_db_id, **kwargs): # noqa: E501 """Retrieve study details # noqa: E501 Retrieve study 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.get_study_details(study_db_id, async_req=True) >>> result = thread.get() :param async_req bool :param str study_db_id: Search by studyDbId (required) :param str authorization: Authentication token (required) :param str accept_language: Request accepted language :return: list[StudyDetailsDTO] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_study_details_with_http_info(study_db_id, **kwargs) # noqa: E501 else: (data) = self.get_study_details_with_http_info(study_db_id, **kwargs) # noqa: E501 return data def get_study_details_with_http_info(self, study_db_id, **kwargs): # noqa: E501 """Retrieve study details # noqa: E501 Retrieve study 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.get_study_details_with_http_info(study_db_id, async_req=True) >>> result = thread.get() :param async_req bool :param str study_db_id: Search by studyDbId (required) :param str authorization: Authentication token (required) :param str accept_language: Request accepted language :return: list[StudyDetailsDTO] If the method is called asynchronously, returns the request thread. """ all_params = ['study_db_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') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_study_details" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'study_db_id' is set if ('study_db_id' not in params or params['study_db_id'] is None): raise ValueError("Missing the required parameter `study_db_id` when calling `get_study_details`") # noqa: E501 collection_formats = {} path_params = {} if 'study_db_id' in params: path_params['studyDbId'] = params['study_db_id'] # noqa: E501 query_params = [] header_params = {} #if 'authorization' in params: # header_params['Authorization'] = params['authorization'] # noqa: E501 #if 'accept_language' in params: # header_params['Accept-Language'] = params['accept_language'] # 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 = [] # noqa: E501 return self.api_client.call_api( '/brapi/v1/studies/{studyDbId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[StudyDetailsDTO]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_variable_details(self, observation_variable_db_id, **kwargs): # noqa: E501 """Retrieve variable details by id # noqa: E501 Retrieve variable details by id # 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_variable_details(observation_variable_db_id, async_req=True) >>> result = thread.get() :param async_req bool :param str observation_variable_db_id: A variable URI (Unique Resource Identifier) (required) :param str authorization: Authentication token (required) :param str accept_language: Request accepted language :return: list[ObservationVariableDTO] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_variable_details_with_http_info(observation_variable_db_id, **kwargs) # noqa: E501 else: (data) = self.get_variable_details_with_http_info(observation_variable_db_id, **kwargs) # noqa: E501 return data def get_variable_details_with_http_info(self, observation_variable_db_id, **kwargs): # noqa: E501 """Retrieve variable details by id # noqa: E501 Retrieve variable details by id # 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_variable_details_with_http_info(observation_variable_db_id, async_req=True) >>> result = thread.get() :param async_req bool :param str observation_variable_db_id: A variable URI (Unique Resource Identifier) (required) :param str authorization: Authentication token (required) :param str accept_language: Request accepted language :return: list[ObservationVariableDTO] If the method is called asynchronously, returns the request thread. """ all_params = ['observation_variable_db_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') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_variable_details" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'observation_variable_db_id' is set if ('observation_variable_db_id' not in params or params['observation_variable_db_id'] is None): raise ValueError("Missing the required parameter `observation_variable_db_id` when calling `get_variable_details`") # noqa: E501 collection_formats = {} path_params = {} if 'observation_variable_db_id' in params: path_params['observationVariableDbId'] = params['observation_variable_db_id'] # noqa: E501 query_params = [] header_params = {} #if 'authorization' in params: # header_params['Authorization'] = params['authorization'] # noqa: E501 #if 'accept_language' in params: # header_params['Accept-Language'] = params['accept_language'] # 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 = [] # noqa: E501 return self.api_client.call_api( '/brapi/v1/variables/{observationVariableDbId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[ObservationVariableDTO]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_variables_list(self, **kwargs): # noqa: E501 """Call to retrieve a list of observationVariables available in the system # noqa: E501 retrieve variables information # 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_variables_list(async_req=True) >>> result = thread.get() :param async_req bool :param str authorization: Authentication token (required) :param str observation_variable_db_id: observationVariableDbId :param int page_size: pageSize :param int page: page :param str accept_language: Request accepted language :return: list[ObservationVariableDTO] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_variables_list_with_http_info(**kwargs) # noqa: E501 else: (data) = self.get_variables_list_with_http_info(**kwargs) # noqa: E501 return data def get_variables_list_with_http_info(self, **kwargs): # noqa: E501 """Call to retrieve a list of observationVariables available in the system # noqa: E501 retrieve variables information # 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_variables_list_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :param str authorization: Authentication token (required) :param str observation_variable_db_id: observationVariableDbId :param int page_size: pageSize :param int page: page :param str accept_language: Request accepted language :return: list[ObservationVariableDTO] If the method is called asynchronously, returns the request thread. """ all_params = ['observation_variable_db_id', 'page_size', 'page', ] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_variables_list" % key ) params[key] = val del params['kwargs'] if 'page_size' in params and params['page_size'] < 0: # noqa: E501 raise ValueError("Invalid value for parameter `page_size` when calling `get_variables_list`, must be a value greater than or equal to `0`") # noqa: E501 if 'page' in params and params['page'] < 0: # noqa: E501 raise ValueError("Invalid value for parameter `page` when calling `get_variables_list`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'observation_variable_db_id' in params: query_params.append(('observationVariableDbId', params['observation_variable_db_id'])) # noqa: E501 if 'page_size' in params: query_params.append(('pageSize', params['page_size'])) # noqa: E501 if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 header_params = {} #if 'authorization' in params: # header_params['Authorization'] = params['authorization'] # noqa: E501 #if 'accept_language' in params: # header_params['Accept-Language'] = params['accept_language'] # 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 = [] # noqa: E501 return self.api_client.call_api( '/brapi/v1/variables', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[ObservationVariableDTO]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
43.89219
172
0.625471
6,073
51,705
5.086448
0.037379
0.055422
0.020395
0.023309
0.959081
0.951732
0.946941
0.938394
0.930722
0.929621
0
0.018636
0.283899
51,705
1,177
173
43.929482
0.815643
0.370699
0
0.775374
1
0.026622
0.244402
0.061269
0
0
0
0
0
1
0.034942
false
0
0.006656
0
0.093178
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
d9200376bc7a9bbd4b3ddad73b4c7013d8b6fc83
15,049
py
Python
tests/metrics/test_robustness_metrics.py
sebastian-lapuschkin/Quantus
c3b8a9fb2018f34bd89ba38efa2b2b8c38128b3f
[ "MIT" ]
null
null
null
tests/metrics/test_robustness_metrics.py
sebastian-lapuschkin/Quantus
c3b8a9fb2018f34bd89ba38efa2b2b8c38128b3f
[ "MIT" ]
null
null
null
tests/metrics/test_robustness_metrics.py
sebastian-lapuschkin/Quantus
c3b8a9fb2018f34bd89ba38efa2b2b8c38128b3f
[ "MIT" ]
null
null
null
from typing import Union import numpy as np import pytest from pytest_lazyfixture import lazy_fixture from ..fixtures import * from ...quantus.metrics import * from ...quantus.helpers import * from ...quantus.helpers.explanation_func import explain @pytest.mark.robustness @pytest.mark.parametrize( "model,data,params,expected", [ ( lazy_fixture("load_1d_3ch_conv_model"), lazy_fixture("almost_uniform_1d_no_abatch"), { "perturb_std": 0.1, "explain_func": explain, "method": "Saliency", "disable_warnings": False, "display_progressbar": False, "a_batch_generate": False, }, {"min": 0.0, "max": 1.0}, ), ( lazy_fixture("load_mnist_model"), lazy_fixture("load_mnist_images"), { "perturb_std": 0.1, "nr_samples": 10, "explain_func": explain, "method": "Saliency", "disable_warnings": False, "display_progressbar": False, "a_batch_generate": False, }, {"min": 0.0, "max": 1.0}, ), ( lazy_fixture("load_1d_3ch_conv_model"), lazy_fixture("almost_uniform_1d_no_abatch"), { "perturb_std": 0.1, "explain_func": explain, "method": "Saliency", "disable_warnings": True, "display_progressbar": False, "a_batch_generate": False, }, {"min": 0.0, "max": 1.0}, ), ( lazy_fixture("load_mnist_model"), lazy_fixture("load_mnist_images"), { "perturb_std": 0.1, "nr_samples": 10, "explain_func": explain, "method": "Saliency", "disable_warnings": True, "display_progressbar": False, "a_batch_generate": False, }, {"min": 0.0, "max": 1.0}, ), ( lazy_fixture("load_1d_3ch_conv_model"), lazy_fixture("almost_uniform_1d_no_abatch"), { "perturb_std": 0.1, "explain_func": explain, "method": "Saliency", "disable_warnings": True, "display_progressbar": True, "a_batch_generate": False, }, {"min": 0.0, "max": 1.0}, ), ( lazy_fixture("load_mnist_model"), lazy_fixture("load_mnist_images"), { "perturb_std": 0.1, "nr_samples": 10, "explain_func": explain, "method": "Saliency", "disable_warnings": True, "display_progressbar": True, "a_batch_generate": False, }, {"min": 0.0, "max": 1.0}, ), ], ) def test_local_lipschitz_estimate( model: ModelInterface, data: np.ndarray, params: dict, expected: Union[float, dict, bool], ): x_batch, y_batch = ( data["x_batch"], data["y_batch"], ) if params.get("a_batch_generate", True): explain = params["explain_func"] a_batch = explain( model=model, inputs=x_batch, targets=y_batch, **params, ) elif "a_batch" in data: a_batch = data["a_batch"] else: a_batch = None scores = LocalLipschitzEstimate(**params)( model=model, x_batch=x_batch, y_batch=y_batch, a_batch=a_batch, **params, ) assert scores is not None, "Test failed." @pytest.mark.robustness @pytest.mark.parametrize( "model,data,params,expected", [ ( lazy_fixture("load_1d_3ch_conv_model"), lazy_fixture("almost_uniform_1d_no_abatch"), { "perturb_radius": 0.2, "explain_func": explain, "method": "Saliency", "disable_warnings": False, "display_progressbar": False, }, {"min": 0.0, "max": 1.0}, ), ( lazy_fixture("load_mnist_model"), lazy_fixture("load_mnist_images"), { "perturb_radius": 0.2, "nr_samples": 10, "explain_func": explain, "method": "Saliency", "disable_warnings": False, "display_progressbar": False, }, {"min": 0.0, "max": 1.0}, ), ( lazy_fixture("load_1d_3ch_conv_model"), lazy_fixture("almost_uniform_1d_no_abatch"), { "perturb_radius": 0.2, "explain_func": explain, "method": "Saliency", "disable_warnings": True, "display_progressbar": False, }, {"min": 0.0, "max": 1.0}, ), ( lazy_fixture("load_mnist_model"), lazy_fixture("load_mnist_images"), { "perturb_radius": 0.2, "nr_samples": 10, "explain_func": explain, "method": "Saliency", "disable_warnings": True, "display_progressbar": False, }, {"min": 0.0, "max": 1.0}, ), ( lazy_fixture("load_1d_3ch_conv_model"), lazy_fixture("almost_uniform_1d_no_abatch"), { "perturb_radius": 0.2, "explain_func": explain, "method": "Saliency", "disable_warnings": True, "display_progressbar": True, }, {"min": 0.0, "max": 1.0}, ), ( lazy_fixture("load_mnist_model"), lazy_fixture("load_mnist_images"), { "perturb_radius": 0.2, "nr_samples": 10, "explain_func": explain, "method": "Saliency", "disable_warnings": True, "display_progressbar": True, }, {"min": 0.0, "max": 1.0}, ), ], ) def test_max_sensitivity( model: ModelInterface, data: np.ndarray, params: dict, expected: Union[float, dict, bool], ): x_batch, y_batch = ( data["x_batch"], data["y_batch"], ) if params.get("a_batch_generate", True): explain = params["explain_func"] a_batch = explain( model=model, inputs=x_batch, targets=y_batch, **params, ) elif "a_batch" in data: a_batch = data["a_batch"] else: a_batch = None scores = MaxSensitivity(**params)( model=model, x_batch=x_batch, y_batch=y_batch, a_batch=a_batch, **params, ) if isinstance(expected, float): assert all(s == expected for s in scores), "Test failed." else: assert np.all( ((s >= expected["min"]) & (s <= expected["max"])) for s in scores ), "Test failed." @pytest.mark.robustness @pytest.mark.parametrize( "model,data,params,expected", [ ( lazy_fixture("load_1d_3ch_conv_model"), lazy_fixture("almost_uniform_1d_no_abatch"), { "perturb_radius": 0.2, "explain_func": explain, "method": "Saliency", "disable_warnings": False, "display_progressbar": False, "a_batch_generate": False, }, {"min": 0.0, "max": 1.0}, ), ( lazy_fixture("load_mnist_model"), lazy_fixture("load_mnist_images"), { "perturb_radius": 0.2, "nr_samples": 10, "explain_func": explain, "method": "Saliency", "disable_warnings": False, "display_progressbar": False, "a_batch_generate": False, }, {"min": 0.0, "max": 1.0}, ), ( lazy_fixture("load_1d_3ch_conv_model"), lazy_fixture("almost_uniform_1d_no_abatch"), { "perturb_radius": 0.2, "explain_func": explain, "method": "Saliency", "disable_warnings": True, "display_progressbar": False, "a_batch_generate": False, }, {"min": 0.0, "max": 1.0}, ), ( lazy_fixture("load_mnist_model"), lazy_fixture("load_mnist_images"), { "perturb_radius": 0.2, "nr_samples": 10, "explain_func": explain, "method": "Saliency", "disable_warnings": True, "display_progressbar": False, "a_batch_generate": False, }, {"min": 0.0, "max": 1.0}, ), ( lazy_fixture("load_1d_3ch_conv_model"), lazy_fixture("almost_uniform_1d_no_abatch"), { "perturb_radius": 0.2, "explain_func": explain, "method": "Saliency", "disable_warnings": True, "display_progressbar": True, "a_batch_generate": False, }, {"min": 0.0, "max": 1.0}, ), ( lazy_fixture("load_mnist_model"), lazy_fixture("load_mnist_images"), { "perturb_radius": 0.2, "nr_samples": 10, "explain_func": explain, "method": "Saliency", "disable_warnings": True, "display_progressbar": True, "a_batch_generate": False, }, {"min": 0.0, "max": 1.0}, ), ], ) def test_avg_sensitivity( model: ModelInterface, data: np.ndarray, params: dict, expected: Union[float, dict, bool], ): x_batch, y_batch = ( data["x_batch"], data["y_batch"], ) if params.get("a_batch_generate", True): explain = params["explain_func"] a_batch = explain( model=model, inputs=x_batch, targets=y_batch, **params, ) elif "a_batch" in data: a_batch = data["a_batch"] else: a_batch = None scores = AvgSensitivity(**params)( model=model, x_batch=x_batch, y_batch=y_batch, a_batch=a_batch, **params, ) if isinstance(expected, float): assert all(s == expected for s in scores), "Test failed." else: assert np.all( ((s >= expected["min"]) & (s <= expected["max"])) for s in scores ), "Test failed." @pytest.mark.robustness @pytest.mark.parametrize( "model,data,params,expected", [ ( lazy_fixture("load_1d_3ch_conv_model"), lazy_fixture("almost_uniform_1d_no_abatch"), { "nr_steps": 10, "patch_size": 10, "explain_func": explain, "method": "Saliency", "disable_warnings": False, "display_progressbar": False, "a_batch_generate": False, }, {"exception": ValueError}, ), ( lazy_fixture("load_mnist_model"), lazy_fixture("load_mnist_images"), { "nr_steps": 10, "patch_size": 7, "explain_func": explain, "method": "Saliency", "disable_warnings": False, "display_progressbar": False, "a_batch_generate": False, }, {"min": 0.0, "max": 1.0}, ), ( lazy_fixture("load_1d_3ch_conv_model"), lazy_fixture("almost_uniform_1d_no_abatch"), { "nr_steps": 10, "patch_size": 10, "explain_func": explain, "method": "Saliency", "disable_warnings": True, "display_progressbar": False, "a_batch_generate": False, }, {"exception": ValueError}, ), ( lazy_fixture("load_mnist_model"), lazy_fixture("load_mnist_images"), { "nr_steps": 10, "patch_size": 7, "explain_func": explain, "method": "Saliency", "disable_warnings": True, "display_progressbar": False, "a_batch_generate": False, }, {"min": 0.0, "max": 1.0}, ), ( lazy_fixture("load_1d_3ch_conv_model"), lazy_fixture("almost_uniform_1d_no_abatch"), { "nr_steps": 10, "patch_size": 10, "explain_func": explain, "method": "Saliency", "disable_warnings": True, "display_progressbar": True, "a_batch_generate": False, }, {"exception": ValueError}, ), ( lazy_fixture("load_mnist_model"), lazy_fixture("load_mnist_images"), { "nr_steps": 10, "patch_size": 7, "explain_func": explain, "method": "Saliency", "disable_warnings": True, "display_progressbar": True, "a_batch_generate": False, }, {"min": 0.0, "max": 1.0}, ), ], ) def test_continuity( model: ModelInterface, data: np.ndarray, params: dict, expected: Union[float, dict, bool], ): x_batch, y_batch = ( data["x_batch"], data["y_batch"], ) if params.get("a_batch_generate", True): explain = params["explain_func"] a_batch = explain( model=model, inputs=x_batch, targets=y_batch, **params, ) elif "a_batch" in data: a_batch = data["a_batch"] else: a_batch = None if "exception" in expected: with pytest.raises(expected["exception"]): scores = Continuity(**params)( model=model, x_batch=x_batch, y_batch=y_batch, a_batch=a_batch, **params, ) return scores = Continuity(**params)( model=model, x_batch=x_batch, y_batch=y_batch, a_batch=a_batch, **params, ) assert scores is not None, "Test failed."
29.682446
77
0.463486
1,391
15,049
4.700935
0.07261
0.047714
0.082581
0.088087
0.947087
0.947087
0.947087
0.947087
0.946016
0.946016
0
0.022069
0.412851
15,049
506
78
29.741107
0.717972
0
0
0.774848
0
0
0.249252
0.045983
0
0
0
0
0.01217
1
0.008114
false
0
0.016227
0
0.026369
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
d92478c5f3979ef8de84204ffc08ae0b91ee5881
1,061
py
Python
examples/introductions/second/show_version.py
zqmillet/kinopico_python_book
0db4b0a904a1ba1b7e90cf971871e134941aeb65
[ "MIT" ]
null
null
null
examples/introductions/second/show_version.py
zqmillet/kinopico_python_book
0db4b0a904a1ba1b7e90cf971871e134941aeb65
[ "MIT" ]
null
null
null
examples/introductions/second/show_version.py
zqmillet/kinopico_python_book
0db4b0a904a1ba1b7e90cf971871e134941aeb65
[ "MIT" ]
null
null
null
import sys import platform print('Python', sys.version) print('OS is', platform.platform()) import subprocess process = subprocess.Popen(['dot', '-V'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) output, _ = process.communicate() print(output.decode('utf8')) process = subprocess.Popen(['gs', '-v'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) output, _ = process.communicate() print(output.decode('utf8')) process = subprocess.Popen(['latex', '-v'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) output, _ = process.communicate() print(output.decode('utf8')) process = subprocess.Popen(['xelatex', '-v'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) output, _ = process.communicate() print(output.decode('utf8')) process = subprocess.Popen(['pdflatex', '-v'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) output, _ = process.communicate() print(output.decode('utf8')) process = subprocess.Popen(['pdf2svg', '-v'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) output, _ = process.communicate() print(output.decode('utf8'))
34.225806
96
0.737983
123
1,061
6.317073
0.203252
0.131274
0.169884
0.162162
0.821107
0.821107
0.821107
0.821107
0.821107
0.821107
0
0.007165
0.079171
1,061
30
97
35.366667
0.788127
0
0
0.521739
0
0
0.074458
0
0
0
0
0
0
1
0
false
0
0.130435
0
0.130435
0.347826
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
d95737a691d25f65c617e6edccd18d32fa1eac00
57
py
Python
effective_python_learn/python_01_version.py
Hao973/python_learn
a61130b88228d71a5d566bee8f6e62f376f58996
[ "MIT" ]
null
null
null
effective_python_learn/python_01_version.py
Hao973/python_learn
a61130b88228d71a5d566bee8f6e62f376f58996
[ "MIT" ]
null
null
null
effective_python_learn/python_01_version.py
Hao973/python_learn
a61130b88228d71a5d566bee8f6e62f376f58996
[ "MIT" ]
null
null
null
import sys print sys.version_info print sys.version
11.4
23
0.77193
9
57
4.777778
0.555556
0.372093
0.697674
0
0
0
0
0
0
0
0
0
0.192982
57
4
24
14.25
0.934783
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0.333333
null
null
0.666667
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
1
0
0
0
1
0
0
1
0
7
d96c747c2e5867496fdf95709790e4cb0b313a0a
9,455
py
Python
conanguide/ui/dialog/edit/remote/edit_remote_ui.py
afri-bit/conan-guide
4eac41710ee83da64cea1e5ce2aafc09844c4fa1
[ "MIT" ]
8
2021-05-31T10:45:14.000Z
2022-03-29T12:55:58.000Z
conanguide/ui/dialog/edit/remote/edit_remote_ui.py
afri-bit/conan-blade
4eac41710ee83da64cea1e5ce2aafc09844c4fa1
[ "MIT" ]
4
2021-05-31T10:46:37.000Z
2021-07-24T08:15:01.000Z
conanguide/ui/dialog/edit/remote/edit_remote_ui.py
afri-bit/conan-blade
4eac41710ee83da64cea1e5ce2aafc09844c4fa1
[ "MIT" ]
2
2021-05-31T17:42:28.000Z
2021-07-23T17:40:28.000Z
# -*- coding: utf-8 -*- ################################################################################ ## Form generated from reading UI file 'edit_remote.ui' ## ## Created by: Qt User Interface Compiler version 5.15.2 ## ## WARNING! All changes made in this file will be lost when recompiling UI file! ################################################################################ from PySide2.QtCore import * from PySide2.QtGui import * from PySide2.QtWidgets import * from conanguide.ui.res import resources_rc class Ui_DialogEditRemote(object): def setupUi(self, DialogEditRemote): if not DialogEditRemote.objectName(): DialogEditRemote.setObjectName(u"DialogEditRemote") DialogEditRemote.resize(550, 129) DialogEditRemote.setMinimumSize(QSize(550, 129)) DialogEditRemote.setMaximumSize(QSize(550, 129)) icon = QIcon() icon.addFile(u":/general/icon/conan_guide_icon.png", QSize(), QIcon.Normal, QIcon.Off) DialogEditRemote.setWindowIcon(icon) self.verticalLayout = QVBoxLayout(DialogEditRemote) self.verticalLayout.setSpacing(2) self.verticalLayout.setObjectName(u"verticalLayout") self.verticalLayout.setContentsMargins(5, 5, 5, 5) self.horizontalLayout = QHBoxLayout() self.horizontalLayout.setObjectName(u"horizontalLayout") self.label = QLabel(DialogEditRemote) self.label.setObjectName(u"label") self.label.setMinimumSize(QSize(40, 0)) self.horizontalLayout.addWidget(self.label) self.lineEditName = QLineEdit(DialogEditRemote) self.lineEditName.setObjectName(u"lineEditName") self.horizontalLayout.addWidget(self.lineEditName) self.verticalLayout.addLayout(self.horizontalLayout) self.horizontalLayout_2 = QHBoxLayout() self.horizontalLayout_2.setObjectName(u"horizontalLayout_2") self.label_2 = QLabel(DialogEditRemote) self.label_2.setObjectName(u"label_2") self.label_2.setMinimumSize(QSize(40, 0)) self.horizontalLayout_2.addWidget(self.label_2) self.lineEditURL = QLineEdit(DialogEditRemote) self.lineEditURL.setObjectName(u"lineEditURL") self.horizontalLayout_2.addWidget(self.lineEditURL) self.verticalLayout.addLayout(self.horizontalLayout_2) self.horizontalLayout_4 = QHBoxLayout() self.horizontalLayout_4.setObjectName(u"horizontalLayout_4") self.checkBoxVerifySSL = QCheckBox(DialogEditRemote) self.checkBoxVerifySSL.setObjectName(u"checkBoxVerifySSL") self.checkBoxVerifySSL.setLayoutDirection(Qt.LeftToRight) self.horizontalLayout_4.addWidget(self.checkBoxVerifySSL) self.horizontalSpacer = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum) self.horizontalLayout_4.addItem(self.horizontalSpacer) self.verticalLayout.addLayout(self.horizontalLayout_4) self.horizontalLayout_3 = QHBoxLayout() self.horizontalLayout_3.setObjectName(u"horizontalLayout_3") self.labelInfo = QLabel(DialogEditRemote) self.labelInfo.setObjectName(u"labelInfo") self.labelInfo.setMinimumSize(QSize(0, 22)) self.labelInfo.setMaximumSize(QSize(16777215, 22)) self.horizontalLayout_3.addWidget(self.labelInfo) self.btnOK = QPushButton(DialogEditRemote) self.btnOK.setObjectName(u"btnOK") self.btnOK.setMinimumSize(QSize(0, 25)) self.btnOK.setMaximumSize(QSize(75, 16777215)) self.horizontalLayout_3.addWidget(self.btnOK) self.btnCancel = QPushButton(DialogEditRemote) self.btnCancel.setObjectName(u"btnCancel") self.btnCancel.setMinimumSize(QSize(0, 25)) self.btnCancel.setMaximumSize(QSize(75, 16777215)) self.horizontalLayout_3.addWidget(self.btnCancel) self.verticalLayout.addLayout(self.horizontalLayout_3) self.retranslateUi(DialogEditRemote) QMetaObject.connectSlotsByName(DialogEditRemote) # setupUi def retranslateUi(self, DialogEditRemote): DialogEditRemote.setWindowTitle(QCoreApplication.translate("DialogEditRemote", u"Dialog", None)) self.label.setText(QCoreApplication.translate("DialogEditRemote", u"Name", None)) self.label_2.setText(QCoreApplication.translate("DialogEditRemote", u"URL", None)) self.checkBoxVerifySSL.setText(QCoreApplication.translate("DialogEditRemote", u"Verify SSL", None)) self.labelInfo.setText("") self.btnOK.setText(QCoreApplication.translate("DialogEditRemote", u"OK", None)) self.btnCancel.setText(QCoreApplication.translate("DialogEditRemote", u"Cancel", None)) # re# -*- coding: utf-8 -*- ################################################################################ ## Form generated from reading UI file 'edit_remote.ui' ## ## Created by: Qt User Interface Compiler version 5.15.2 ## ## WARNING! All changes made in this file will be lost when recompiling UI file! ################################################################################ from PySide2.QtCore import * from PySide2.QtGui import * from PySide2.QtWidgets import * from conanguide.ui.res import resources_rc class Ui_DialogEditRemote(object): def setupUi(self, DialogEditRemote): if not DialogEditRemote.objectName(): DialogEditRemote.setObjectName(u"DialogEditRemote") DialogEditRemote.resize(550, 129) DialogEditRemote.setMinimumSize(QSize(550, 129)) DialogEditRemote.setMaximumSize(QSize(550, 129)) icon = QIcon() icon.addFile(u":/general/icon/conan_guide_icon.png", QSize(), QIcon.Normal, QIcon.Off) DialogEditRemote.setWindowIcon(icon) self.verticalLayout = QVBoxLayout(DialogEditRemote) self.verticalLayout.setSpacing(2) self.verticalLayout.setObjectName(u"verticalLayout") self.verticalLayout.setContentsMargins(5, 5, 5, 5) self.horizontalLayout = QHBoxLayout() self.horizontalLayout.setObjectName(u"horizontalLayout") self.label = QLabel(DialogEditRemote) self.label.setObjectName(u"label") self.label.setMinimumSize(QSize(40, 0)) self.horizontalLayout.addWidget(self.label) self.lineEditName = QLineEdit(DialogEditRemote) self.lineEditName.setObjectName(u"lineEditName") self.horizontalLayout.addWidget(self.lineEditName) self.verticalLayout.addLayout(self.horizontalLayout) self.horizontalLayout_2 = QHBoxLayout() self.horizontalLayout_2.setObjectName(u"horizontalLayout_2") self.label_2 = QLabel(DialogEditRemote) self.label_2.setObjectName(u"label_2") self.label_2.setMinimumSize(QSize(40, 0)) self.horizontalLayout_2.addWidget(self.label_2) self.lineEditURL = QLineEdit(DialogEditRemote) self.lineEditURL.setObjectName(u"lineEditURL") self.horizontalLayout_2.addWidget(self.lineEditURL) self.verticalLayout.addLayout(self.horizontalLayout_2) self.horizontalLayout_4 = QHBoxLayout() self.horizontalLayout_4.setObjectName(u"horizontalLayout_4") self.checkBoxVerifySSL = QCheckBox(DialogEditRemote) self.checkBoxVerifySSL.setObjectName(u"checkBoxVerifySSL") self.checkBoxVerifySSL.setLayoutDirection(Qt.LeftToRight) self.horizontalLayout_4.addWidget(self.checkBoxVerifySSL) self.horizontalSpacer = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum) self.horizontalLayout_4.addItem(self.horizontalSpacer) self.verticalLayout.addLayout(self.horizontalLayout_4) self.horizontalLayout_3 = QHBoxLayout() self.horizontalLayout_3.setObjectName(u"horizontalLayout_3") self.labelInfo = QLabel(DialogEditRemote) self.labelInfo.setObjectName(u"labelInfo") self.labelInfo.setMinimumSize(QSize(0, 22)) self.labelInfo.setMaximumSize(QSize(16777215, 22)) self.horizontalLayout_3.addWidget(self.labelInfo) self.btnOK = QPushButton(DialogEditRemote) self.btnOK.setObjectName(u"btnOK") self.btnOK.setMinimumSize(QSize(0, 25)) self.btnOK.setMaximumSize(QSize(75, 16777215)) self.horizontalLayout_3.addWidget(self.btnOK) self.btnCancel = QPushButton(DialogEditRemote) self.btnCancel.setObjectName(u"btnCancel") self.btnCancel.setMinimumSize(QSize(0, 25)) self.btnCancel.setMaximumSize(QSize(75, 16777215)) self.horizontalLayout_3.addWidget(self.btnCancel) self.verticalLayout.addLayout(self.horizontalLayout_3) self.retranslateUi(DialogEditRemote) QMetaObject.connectSlotsByName(DialogEditRemote) # setupUi def retranslateUi(self, DialogEditRemote): DialogEditRemote.setWindowTitle(QCoreApplication.translate("DialogEditRemote", u"Dialog", None)) self.label.setText(QCoreApplication.translate("DialogEditRemote", u"Name", None)) self.label_2.setText(QCoreApplication.translate("DialogEditRemote", u"URL", None)) self.checkBoxVerifySSL.setText(QCoreApplication.translate("DialogEditRemote", u"Verify SSL", None)) self.labelInfo.setText("") self.btnOK.setText(QCoreApplication.translate("DialogEditRemote", u"OK", None)) self.btnCancel.setText(QCoreApplication.translate("DialogEditRemote", u"Cancel", None)) # retranslateUi
39.894515
107
0.69963
898
9,455
7.299555
0.13363
0.128146
0.038444
0.076888
0.997712
0.997712
0.997712
0.997712
0.997712
0.997712
0
0.026728
0.169011
9,455
236
108
40.063559
0.80756
0.047171
0
1
1
0
0.07782
0.008082
0
0
0
0
0
1
0.026667
false
0
0.053333
0
0.093333
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
7980a444a794a06423e62d01e050a24686840db9
46,655
py
Python
nova/tests/unit/pci/test_stats.py
bopopescu/nova-token
ec98f69dea7b3e2b9013b27fd55a2c1a1ac6bfb2
[ "Apache-2.0" ]
null
null
null
nova/tests/unit/pci/test_stats.py
bopopescu/nova-token
ec98f69dea7b3e2b9013b27fd55a2c1a1ac6bfb2
[ "Apache-2.0" ]
null
null
null
nova/tests/unit/pci/test_stats.py
bopopescu/nova-token
ec98f69dea7b3e2b9013b27fd55a2c1a1ac6bfb2
[ "Apache-2.0" ]
2
2017-07-20T17:31:34.000Z
2020-07-24T02:42:19.000Z
begin_unit comment|'# Copyright (c) 2012 OpenStack Foundation' nl|'\n' comment|'# All Rights Reserved.' nl|'\n' comment|'#' nl|'\n' comment|'# Licensed under the Apache License, Version 2.0 (the "License"); you may' nl|'\n' comment|'# not use this file except in compliance with the License. You may obtain' nl|'\n' comment|'# a copy of the License at' nl|'\n' comment|'#' nl|'\n' comment|'# http://www.apache.org/licenses/LICENSE-2.0' nl|'\n' comment|'#' nl|'\n' comment|'# Unless required by applicable law or agreed to in writing, software' nl|'\n' comment|'# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT' nl|'\n' comment|'# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the' nl|'\n' comment|'# License for the specific language governing permissions and limitations' nl|'\n' comment|'# under the License.' nl|'\n' nl|'\n' name|'import' name|'mock' newline|'\n' name|'import' name|'six' newline|'\n' nl|'\n' name|'from' name|'oslo_config' name|'import' name|'cfg' newline|'\n' nl|'\n' name|'from' name|'nova' name|'import' name|'exception' newline|'\n' name|'from' name|'nova' name|'import' name|'objects' newline|'\n' name|'from' name|'nova' op|'.' name|'objects' name|'import' name|'fields' newline|'\n' name|'from' name|'nova' op|'.' name|'pci' name|'import' name|'stats' newline|'\n' name|'from' name|'nova' op|'.' name|'pci' name|'import' name|'whitelist' newline|'\n' name|'from' name|'nova' name|'import' name|'test' newline|'\n' name|'from' name|'nova' op|'.' name|'tests' op|'.' name|'unit' op|'.' name|'pci' name|'import' name|'fakes' newline|'\n' nl|'\n' DECL|variable|CONF name|'CONF' op|'=' name|'cfg' op|'.' name|'CONF' newline|'\n' DECL|variable|fake_pci_1 name|'fake_pci_1' op|'=' op|'{' nl|'\n' string|"'compute_node_id'" op|':' number|'1' op|',' nl|'\n' string|"'address'" op|':' string|"'0000:00:00.1'" op|',' nl|'\n' string|"'product_id'" op|':' string|"'p1'" op|',' nl|'\n' string|"'vendor_id'" op|':' string|"'v1'" op|',' nl|'\n' string|"'status'" op|':' string|"'available'" op|',' nl|'\n' string|"'extra_k1'" op|':' string|"'v1'" op|',' nl|'\n' string|"'request_id'" op|':' name|'None' op|',' nl|'\n' string|"'numa_node'" op|':' number|'0' op|',' nl|'\n' string|"'dev_type'" op|':' name|'fields' op|'.' name|'PciDeviceType' op|'.' name|'STANDARD' op|',' nl|'\n' string|"'parent_addr'" op|':' name|'None' op|',' nl|'\n' op|'}' newline|'\n' nl|'\n' nl|'\n' DECL|variable|fake_pci_2 name|'fake_pci_2' op|'=' name|'dict' op|'(' name|'fake_pci_1' op|',' name|'vendor_id' op|'=' string|"'v2'" op|',' nl|'\n' DECL|variable|product_id name|'product_id' op|'=' string|"'p2'" op|',' nl|'\n' DECL|variable|address name|'address' op|'=' string|"'0000:00:00.2'" op|',' nl|'\n' DECL|variable|numa_node name|'numa_node' op|'=' number|'1' op|')' newline|'\n' nl|'\n' nl|'\n' DECL|variable|fake_pci_3 name|'fake_pci_3' op|'=' name|'dict' op|'(' name|'fake_pci_1' op|',' name|'address' op|'=' string|"'0000:00:00.3'" op|')' newline|'\n' nl|'\n' DECL|variable|fake_pci_4 name|'fake_pci_4' op|'=' name|'dict' op|'(' name|'fake_pci_1' op|',' name|'vendor_id' op|'=' string|"'v3'" op|',' nl|'\n' DECL|variable|product_id name|'product_id' op|'=' string|"'p3'" op|',' nl|'\n' DECL|variable|address name|'address' op|'=' string|"'0000:00:00.3'" op|',' nl|'\n' DECL|variable|numa_node name|'numa_node' op|'=' name|'None' op|')' newline|'\n' nl|'\n' DECL|variable|pci_requests name|'pci_requests' op|'=' op|'[' name|'objects' op|'.' name|'InstancePCIRequest' op|'(' name|'count' op|'=' number|'1' op|',' nl|'\n' DECL|variable|spec name|'spec' op|'=' op|'[' op|'{' string|"'vendor_id'" op|':' string|"'v1'" op|'}' op|']' op|')' op|',' nl|'\n' name|'objects' op|'.' name|'InstancePCIRequest' op|'(' name|'count' op|'=' number|'1' op|',' nl|'\n' DECL|variable|spec name|'spec' op|'=' op|'[' op|'{' string|"'vendor_id'" op|':' string|"'v2'" op|'}' op|']' op|')' op|']' newline|'\n' nl|'\n' nl|'\n' DECL|variable|pci_requests_multiple name|'pci_requests_multiple' op|'=' op|'[' name|'objects' op|'.' name|'InstancePCIRequest' op|'(' name|'count' op|'=' number|'1' op|',' nl|'\n' DECL|variable|spec name|'spec' op|'=' op|'[' op|'{' string|"'vendor_id'" op|':' string|"'v1'" op|'}' op|']' op|')' op|',' nl|'\n' name|'objects' op|'.' name|'InstancePCIRequest' op|'(' name|'count' op|'=' number|'3' op|',' nl|'\n' DECL|variable|spec name|'spec' op|'=' op|'[' op|'{' string|"'vendor_id'" op|':' string|"'v2'" op|'}' op|']' op|')' op|']' newline|'\n' nl|'\n' nl|'\n' DECL|class|PciDeviceStatsTestCase name|'class' name|'PciDeviceStatsTestCase' op|'(' name|'test' op|'.' name|'NoDBTestCase' op|')' op|':' newline|'\n' DECL|member|_create_fake_devs indent|' ' name|'def' name|'_create_fake_devs' op|'(' name|'self' op|')' op|':' newline|'\n' indent|' ' name|'self' op|'.' name|'fake_dev_1' op|'=' name|'objects' op|'.' name|'PciDevice' op|'.' name|'create' op|'(' name|'None' op|',' name|'fake_pci_1' op|')' newline|'\n' name|'self' op|'.' name|'fake_dev_2' op|'=' name|'objects' op|'.' name|'PciDevice' op|'.' name|'create' op|'(' name|'None' op|',' name|'fake_pci_2' op|')' newline|'\n' name|'self' op|'.' name|'fake_dev_3' op|'=' name|'objects' op|'.' name|'PciDevice' op|'.' name|'create' op|'(' name|'None' op|',' name|'fake_pci_3' op|')' newline|'\n' name|'self' op|'.' name|'fake_dev_4' op|'=' name|'objects' op|'.' name|'PciDevice' op|'.' name|'create' op|'(' name|'None' op|',' name|'fake_pci_4' op|')' newline|'\n' nl|'\n' name|'map' op|'(' name|'self' op|'.' name|'pci_stats' op|'.' name|'add_device' op|',' nl|'\n' op|'[' name|'self' op|'.' name|'fake_dev_1' op|',' name|'self' op|'.' name|'fake_dev_2' op|',' nl|'\n' name|'self' op|'.' name|'fake_dev_3' op|',' name|'self' op|'.' name|'fake_dev_4' op|']' op|')' newline|'\n' nl|'\n' DECL|member|setUp dedent|'' name|'def' name|'setUp' op|'(' name|'self' op|')' op|':' newline|'\n' indent|' ' name|'super' op|'(' name|'PciDeviceStatsTestCase' op|',' name|'self' op|')' op|'.' name|'setUp' op|'(' op|')' newline|'\n' name|'self' op|'.' name|'pci_stats' op|'=' name|'stats' op|'.' name|'PciDeviceStats' op|'(' op|')' newline|'\n' comment|'# The following two calls need to be made before adding the devices.' nl|'\n' name|'patcher' op|'=' name|'fakes' op|'.' name|'fake_pci_whitelist' op|'(' op|')' newline|'\n' name|'self' op|'.' name|'addCleanup' op|'(' name|'patcher' op|'.' name|'stop' op|')' newline|'\n' name|'self' op|'.' name|'_create_fake_devs' op|'(' op|')' newline|'\n' nl|'\n' DECL|member|test_add_device dedent|'' name|'def' name|'test_add_device' op|'(' name|'self' op|')' op|':' newline|'\n' indent|' ' name|'self' op|'.' name|'assertEqual' op|'(' name|'len' op|'(' name|'self' op|'.' name|'pci_stats' op|'.' name|'pools' op|')' op|',' number|'3' op|')' newline|'\n' name|'self' op|'.' name|'assertEqual' op|'(' name|'set' op|'(' op|'[' name|'d' op|'[' string|"'vendor_id'" op|']' name|'for' name|'d' name|'in' name|'self' op|'.' name|'pci_stats' op|']' op|')' op|',' nl|'\n' name|'set' op|'(' op|'[' string|"'v1'" op|',' string|"'v2'" op|',' string|"'v3'" op|']' op|')' op|')' newline|'\n' name|'self' op|'.' name|'assertEqual' op|'(' name|'set' op|'(' op|'[' name|'d' op|'[' string|"'count'" op|']' name|'for' name|'d' name|'in' name|'self' op|'.' name|'pci_stats' op|']' op|')' op|',' nl|'\n' name|'set' op|'(' op|'[' number|'1' op|',' number|'2' op|']' op|')' op|')' newline|'\n' nl|'\n' DECL|member|test_remove_device dedent|'' name|'def' name|'test_remove_device' op|'(' name|'self' op|')' op|':' newline|'\n' indent|' ' name|'self' op|'.' name|'pci_stats' op|'.' name|'remove_device' op|'(' name|'self' op|'.' name|'fake_dev_2' op|')' newline|'\n' name|'self' op|'.' name|'assertEqual' op|'(' name|'len' op|'(' name|'self' op|'.' name|'pci_stats' op|'.' name|'pools' op|')' op|',' number|'2' op|')' newline|'\n' name|'self' op|'.' name|'assertEqual' op|'(' name|'self' op|'.' name|'pci_stats' op|'.' name|'pools' op|'[' number|'0' op|']' op|'[' string|"'count'" op|']' op|',' number|'2' op|')' newline|'\n' name|'self' op|'.' name|'assertEqual' op|'(' name|'self' op|'.' name|'pci_stats' op|'.' name|'pools' op|'[' number|'0' op|']' op|'[' string|"'vendor_id'" op|']' op|',' string|"'v1'" op|')' newline|'\n' nl|'\n' DECL|member|test_remove_device_exception dedent|'' name|'def' name|'test_remove_device_exception' op|'(' name|'self' op|')' op|':' newline|'\n' indent|' ' name|'self' op|'.' name|'pci_stats' op|'.' name|'remove_device' op|'(' name|'self' op|'.' name|'fake_dev_2' op|')' newline|'\n' name|'self' op|'.' name|'assertRaises' op|'(' name|'exception' op|'.' name|'PciDevicePoolEmpty' op|',' nl|'\n' name|'self' op|'.' name|'pci_stats' op|'.' name|'remove_device' op|',' nl|'\n' name|'self' op|'.' name|'fake_dev_2' op|')' newline|'\n' nl|'\n' DECL|member|test_pci_stats_equivalent dedent|'' name|'def' name|'test_pci_stats_equivalent' op|'(' name|'self' op|')' op|':' newline|'\n' indent|' ' name|'pci_stats2' op|'=' name|'stats' op|'.' name|'PciDeviceStats' op|'(' op|')' newline|'\n' name|'map' op|'(' name|'pci_stats2' op|'.' name|'add_device' op|',' op|'[' name|'self' op|'.' name|'fake_dev_1' op|',' nl|'\n' name|'self' op|'.' name|'fake_dev_2' op|',' nl|'\n' name|'self' op|'.' name|'fake_dev_3' op|',' nl|'\n' name|'self' op|'.' name|'fake_dev_4' op|']' op|')' newline|'\n' name|'self' op|'.' name|'assertEqual' op|'(' name|'self' op|'.' name|'pci_stats' op|',' name|'pci_stats2' op|')' newline|'\n' nl|'\n' DECL|member|test_pci_stats_not_equivalent dedent|'' name|'def' name|'test_pci_stats_not_equivalent' op|'(' name|'self' op|')' op|':' newline|'\n' indent|' ' name|'pci_stats2' op|'=' name|'stats' op|'.' name|'PciDeviceStats' op|'(' op|')' newline|'\n' name|'map' op|'(' name|'pci_stats2' op|'.' name|'add_device' op|',' op|'[' name|'self' op|'.' name|'fake_dev_1' op|',' nl|'\n' name|'self' op|'.' name|'fake_dev_2' op|',' nl|'\n' name|'self' op|'.' name|'fake_dev_3' op|']' op|')' newline|'\n' name|'self' op|'.' name|'assertNotEqual' op|'(' name|'self' op|'.' name|'pci_stats' op|',' name|'pci_stats2' op|')' newline|'\n' nl|'\n' DECL|member|test_object_create dedent|'' name|'def' name|'test_object_create' op|'(' name|'self' op|')' op|':' newline|'\n' indent|' ' name|'m' op|'=' name|'self' op|'.' name|'pci_stats' op|'.' name|'to_device_pools_obj' op|'(' op|')' newline|'\n' name|'new_stats' op|'=' name|'stats' op|'.' name|'PciDeviceStats' op|'(' name|'m' op|')' newline|'\n' nl|'\n' name|'self' op|'.' name|'assertEqual' op|'(' name|'len' op|'(' name|'new_stats' op|'.' name|'pools' op|')' op|',' number|'3' op|')' newline|'\n' name|'self' op|'.' name|'assertEqual' op|'(' name|'set' op|'(' op|'[' name|'d' op|'[' string|"'count'" op|']' name|'for' name|'d' name|'in' name|'new_stats' op|']' op|')' op|',' nl|'\n' name|'set' op|'(' op|'[' number|'1' op|',' number|'2' op|']' op|')' op|')' newline|'\n' name|'self' op|'.' name|'assertEqual' op|'(' name|'set' op|'(' op|'[' name|'d' op|'[' string|"'vendor_id'" op|']' name|'for' name|'d' name|'in' name|'new_stats' op|']' op|')' op|',' nl|'\n' name|'set' op|'(' op|'[' string|"'v1'" op|',' string|"'v2'" op|',' string|"'v3'" op|']' op|')' op|')' newline|'\n' nl|'\n' DECL|member|test_support_requests dedent|'' name|'def' name|'test_support_requests' op|'(' name|'self' op|')' op|':' newline|'\n' indent|' ' name|'self' op|'.' name|'assertEqual' op|'(' name|'self' op|'.' name|'pci_stats' op|'.' name|'support_requests' op|'(' name|'pci_requests' op|')' op|',' nl|'\n' name|'True' op|')' newline|'\n' name|'self' op|'.' name|'assertEqual' op|'(' name|'len' op|'(' name|'self' op|'.' name|'pci_stats' op|'.' name|'pools' op|')' op|',' number|'3' op|')' newline|'\n' name|'self' op|'.' name|'assertEqual' op|'(' name|'set' op|'(' op|'[' name|'d' op|'[' string|"'count'" op|']' name|'for' name|'d' name|'in' name|'self' op|'.' name|'pci_stats' op|']' op|')' op|',' nl|'\n' name|'set' op|'(' op|'(' number|'1' op|',' number|'2' op|')' op|')' op|')' newline|'\n' nl|'\n' DECL|member|test_support_requests_failed dedent|'' name|'def' name|'test_support_requests_failed' op|'(' name|'self' op|')' op|':' newline|'\n' indent|' ' name|'self' op|'.' name|'assertEqual' op|'(' nl|'\n' name|'self' op|'.' name|'pci_stats' op|'.' name|'support_requests' op|'(' name|'pci_requests_multiple' op|')' op|',' name|'False' op|')' newline|'\n' name|'self' op|'.' name|'assertEqual' op|'(' name|'len' op|'(' name|'self' op|'.' name|'pci_stats' op|'.' name|'pools' op|')' op|',' number|'3' op|')' newline|'\n' name|'self' op|'.' name|'assertEqual' op|'(' name|'set' op|'(' op|'[' name|'d' op|'[' string|"'count'" op|']' name|'for' name|'d' name|'in' name|'self' op|'.' name|'pci_stats' op|']' op|')' op|',' nl|'\n' name|'set' op|'(' op|'[' number|'1' op|',' number|'2' op|']' op|')' op|')' newline|'\n' nl|'\n' DECL|member|test_apply_requests dedent|'' name|'def' name|'test_apply_requests' op|'(' name|'self' op|')' op|':' newline|'\n' indent|' ' name|'self' op|'.' name|'pci_stats' op|'.' name|'apply_requests' op|'(' name|'pci_requests' op|')' newline|'\n' name|'self' op|'.' name|'assertEqual' op|'(' name|'len' op|'(' name|'self' op|'.' name|'pci_stats' op|'.' name|'pools' op|')' op|',' number|'2' op|')' newline|'\n' name|'self' op|'.' name|'assertEqual' op|'(' name|'self' op|'.' name|'pci_stats' op|'.' name|'pools' op|'[' number|'0' op|']' op|'[' string|"'vendor_id'" op|']' op|',' string|"'v1'" op|')' newline|'\n' name|'self' op|'.' name|'assertEqual' op|'(' name|'self' op|'.' name|'pci_stats' op|'.' name|'pools' op|'[' number|'0' op|']' op|'[' string|"'count'" op|']' op|',' number|'1' op|')' newline|'\n' nl|'\n' DECL|member|test_apply_requests_failed dedent|'' name|'def' name|'test_apply_requests_failed' op|'(' name|'self' op|')' op|':' newline|'\n' indent|' ' name|'self' op|'.' name|'assertRaises' op|'(' name|'exception' op|'.' name|'PciDeviceRequestFailed' op|',' nl|'\n' name|'self' op|'.' name|'pci_stats' op|'.' name|'apply_requests' op|',' nl|'\n' name|'pci_requests_multiple' op|')' newline|'\n' nl|'\n' DECL|member|test_consume_requests dedent|'' name|'def' name|'test_consume_requests' op|'(' name|'self' op|')' op|':' newline|'\n' indent|' ' name|'devs' op|'=' name|'self' op|'.' name|'pci_stats' op|'.' name|'consume_requests' op|'(' name|'pci_requests' op|')' newline|'\n' name|'self' op|'.' name|'assertEqual' op|'(' number|'2' op|',' name|'len' op|'(' name|'devs' op|')' op|')' newline|'\n' name|'self' op|'.' name|'assertEqual' op|'(' name|'set' op|'(' op|'[' string|"'v1'" op|',' string|"'v2'" op|']' op|')' op|',' nl|'\n' name|'set' op|'(' op|'[' name|'dev' op|'.' name|'vendor_id' name|'for' name|'dev' name|'in' name|'devs' op|']' op|')' op|')' newline|'\n' nl|'\n' DECL|member|test_consume_requests_empty dedent|'' name|'def' name|'test_consume_requests_empty' op|'(' name|'self' op|')' op|':' newline|'\n' indent|' ' name|'devs' op|'=' name|'self' op|'.' name|'pci_stats' op|'.' name|'consume_requests' op|'(' op|'[' op|']' op|')' newline|'\n' name|'self' op|'.' name|'assertEqual' op|'(' number|'0' op|',' name|'len' op|'(' name|'devs' op|')' op|')' newline|'\n' nl|'\n' DECL|member|test_consume_requests_failed dedent|'' name|'def' name|'test_consume_requests_failed' op|'(' name|'self' op|')' op|':' newline|'\n' indent|' ' name|'self' op|'.' name|'assertIsNone' op|'(' name|'self' op|'.' name|'pci_stats' op|'.' name|'consume_requests' op|'(' nl|'\n' name|'pci_requests_multiple' op|')' op|')' newline|'\n' nl|'\n' DECL|member|test_support_requests_numa dedent|'' name|'def' name|'test_support_requests_numa' op|'(' name|'self' op|')' op|':' newline|'\n' indent|' ' name|'cells' op|'=' op|'[' name|'objects' op|'.' name|'NUMACell' op|'(' name|'id' op|'=' number|'0' op|',' name|'cpuset' op|'=' name|'set' op|'(' op|')' op|',' name|'memory' op|'=' number|'0' op|')' op|',' nl|'\n' name|'objects' op|'.' name|'NUMACell' op|'(' name|'id' op|'=' number|'1' op|',' name|'cpuset' op|'=' name|'set' op|'(' op|')' op|',' name|'memory' op|'=' number|'0' op|')' op|']' newline|'\n' name|'self' op|'.' name|'assertTrue' op|'(' name|'self' op|'.' name|'pci_stats' op|'.' name|'support_requests' op|'(' nl|'\n' name|'pci_requests' op|',' name|'cells' op|')' op|')' newline|'\n' nl|'\n' DECL|member|test_support_requests_numa_failed dedent|'' name|'def' name|'test_support_requests_numa_failed' op|'(' name|'self' op|')' op|':' newline|'\n' indent|' ' name|'cells' op|'=' op|'[' name|'objects' op|'.' name|'NUMACell' op|'(' name|'id' op|'=' number|'0' op|',' name|'cpuset' op|'=' name|'set' op|'(' op|')' op|',' name|'memory' op|'=' number|'0' op|')' op|']' newline|'\n' name|'self' op|'.' name|'assertFalse' op|'(' name|'self' op|'.' name|'pci_stats' op|'.' name|'support_requests' op|'(' nl|'\n' name|'pci_requests' op|',' name|'cells' op|')' op|')' newline|'\n' nl|'\n' DECL|member|test_support_requests_no_numa_info dedent|'' name|'def' name|'test_support_requests_no_numa_info' op|'(' name|'self' op|')' op|':' newline|'\n' indent|' ' name|'cells' op|'=' op|'[' name|'objects' op|'.' name|'NUMACell' op|'(' name|'id' op|'=' number|'0' op|',' name|'cpuset' op|'=' name|'set' op|'(' op|')' op|',' name|'memory' op|'=' number|'0' op|')' op|']' newline|'\n' name|'pci_request' op|'=' op|'[' name|'objects' op|'.' name|'InstancePCIRequest' op|'(' name|'count' op|'=' number|'1' op|',' nl|'\n' name|'spec' op|'=' op|'[' op|'{' string|"'vendor_id'" op|':' string|"'v3'" op|'}' op|']' op|')' op|']' newline|'\n' name|'self' op|'.' name|'assertTrue' op|'(' name|'self' op|'.' name|'pci_stats' op|'.' name|'support_requests' op|'(' nl|'\n' name|'pci_request' op|',' name|'cells' op|')' op|')' newline|'\n' nl|'\n' DECL|member|test_consume_requests_numa dedent|'' name|'def' name|'test_consume_requests_numa' op|'(' name|'self' op|')' op|':' newline|'\n' indent|' ' name|'cells' op|'=' op|'[' name|'objects' op|'.' name|'NUMACell' op|'(' name|'id' op|'=' number|'0' op|',' name|'cpuset' op|'=' name|'set' op|'(' op|')' op|',' name|'memory' op|'=' number|'0' op|')' op|',' nl|'\n' name|'objects' op|'.' name|'NUMACell' op|'(' name|'id' op|'=' number|'1' op|',' name|'cpuset' op|'=' name|'set' op|'(' op|')' op|',' name|'memory' op|'=' number|'0' op|')' op|']' newline|'\n' name|'devs' op|'=' name|'self' op|'.' name|'pci_stats' op|'.' name|'consume_requests' op|'(' name|'pci_requests' op|',' name|'cells' op|')' newline|'\n' name|'self' op|'.' name|'assertEqual' op|'(' number|'2' op|',' name|'len' op|'(' name|'devs' op|')' op|')' newline|'\n' name|'self' op|'.' name|'assertEqual' op|'(' name|'set' op|'(' op|'[' string|"'v1'" op|',' string|"'v2'" op|']' op|')' op|',' nl|'\n' name|'set' op|'(' op|'[' name|'dev' op|'.' name|'vendor_id' name|'for' name|'dev' name|'in' name|'devs' op|']' op|')' op|')' newline|'\n' nl|'\n' DECL|member|test_consume_requests_numa_failed dedent|'' name|'def' name|'test_consume_requests_numa_failed' op|'(' name|'self' op|')' op|':' newline|'\n' indent|' ' name|'cells' op|'=' op|'[' name|'objects' op|'.' name|'NUMACell' op|'(' name|'id' op|'=' number|'0' op|',' name|'cpuset' op|'=' name|'set' op|'(' op|')' op|',' name|'memory' op|'=' number|'0' op|')' op|']' newline|'\n' name|'self' op|'.' name|'assertIsNone' op|'(' name|'self' op|'.' name|'pci_stats' op|'.' name|'consume_requests' op|'(' name|'pci_requests' op|',' name|'cells' op|')' op|')' newline|'\n' nl|'\n' DECL|member|test_consume_requests_no_numa_info dedent|'' name|'def' name|'test_consume_requests_no_numa_info' op|'(' name|'self' op|')' op|':' newline|'\n' indent|' ' name|'cells' op|'=' op|'[' name|'objects' op|'.' name|'NUMACell' op|'(' name|'id' op|'=' number|'0' op|',' name|'cpuset' op|'=' name|'set' op|'(' op|')' op|',' name|'memory' op|'=' number|'0' op|')' op|']' newline|'\n' name|'pci_request' op|'=' op|'[' name|'objects' op|'.' name|'InstancePCIRequest' op|'(' name|'count' op|'=' number|'1' op|',' nl|'\n' name|'spec' op|'=' op|'[' op|'{' string|"'vendor_id'" op|':' string|"'v3'" op|'}' op|']' op|')' op|']' newline|'\n' name|'devs' op|'=' name|'self' op|'.' name|'pci_stats' op|'.' name|'consume_requests' op|'(' name|'pci_request' op|',' name|'cells' op|')' newline|'\n' name|'self' op|'.' name|'assertEqual' op|'(' number|'1' op|',' name|'len' op|'(' name|'devs' op|')' op|')' newline|'\n' name|'self' op|'.' name|'assertEqual' op|'(' name|'set' op|'(' op|'[' string|"'v3'" op|']' op|')' op|',' nl|'\n' name|'set' op|'(' op|'[' name|'dev' op|'.' name|'vendor_id' name|'for' name|'dev' name|'in' name|'devs' op|']' op|')' op|')' newline|'\n' nl|'\n' dedent|'' op|'@' name|'mock' op|'.' name|'patch' op|'(' nl|'\n' string|"'nova.pci.whitelist.Whitelist._parse_white_list_from_config'" op|')' newline|'\n' DECL|member|test_white_list_parsing name|'def' name|'test_white_list_parsing' op|'(' name|'self' op|',' name|'mock_whitelist_parse' op|')' op|':' newline|'\n' indent|' ' name|'white_list' op|'=' string|'\'{"product_id":"0001", "vendor_id":"8086"}\'' newline|'\n' name|'CONF' op|'.' name|'set_override' op|'(' string|"'pci_passthrough_whitelist'" op|',' name|'white_list' op|')' newline|'\n' name|'pci_stats' op|'=' name|'stats' op|'.' name|'PciDeviceStats' op|'(' op|')' newline|'\n' name|'pci_stats' op|'.' name|'add_device' op|'(' name|'self' op|'.' name|'fake_dev_2' op|')' newline|'\n' name|'pci_stats' op|'.' name|'remove_device' op|'(' name|'self' op|'.' name|'fake_dev_2' op|')' newline|'\n' name|'self' op|'.' name|'assertEqual' op|'(' number|'1' op|',' name|'mock_whitelist_parse' op|'.' name|'call_count' op|')' newline|'\n' nl|'\n' nl|'\n' DECL|class|PciDeviceStatsWithTagsTestCase dedent|'' dedent|'' name|'class' name|'PciDeviceStatsWithTagsTestCase' op|'(' name|'test' op|'.' name|'NoDBTestCase' op|')' op|':' newline|'\n' nl|'\n' DECL|member|setUp indent|' ' name|'def' name|'setUp' op|'(' name|'self' op|')' op|':' newline|'\n' indent|' ' name|'super' op|'(' name|'PciDeviceStatsWithTagsTestCase' op|',' name|'self' op|')' op|'.' name|'setUp' op|'(' op|')' newline|'\n' name|'white_list' op|'=' op|'[' string|'\'{"vendor_id":"1137","product_id":"0071",\'' nl|'\n' string|'\'"address":"*:0a:00.*","physical_network":"physnet1"}\'' op|',' nl|'\n' string|'\'{"vendor_id":"1137","product_id":"0072"}\'' op|']' newline|'\n' name|'self' op|'.' name|'flags' op|'(' name|'pci_passthrough_whitelist' op|'=' name|'white_list' op|')' newline|'\n' name|'dev_filter' op|'=' name|'whitelist' op|'.' name|'Whitelist' op|'(' name|'white_list' op|')' newline|'\n' name|'self' op|'.' name|'pci_stats' op|'=' name|'stats' op|'.' name|'PciDeviceStats' op|'(' name|'dev_filter' op|'=' name|'dev_filter' op|')' newline|'\n' nl|'\n' DECL|member|_create_pci_devices dedent|'' name|'def' name|'_create_pci_devices' op|'(' name|'self' op|')' op|':' newline|'\n' indent|' ' name|'self' op|'.' name|'pci_tagged_devices' op|'=' op|'[' op|']' newline|'\n' name|'for' name|'dev' name|'in' name|'range' op|'(' number|'4' op|')' op|':' newline|'\n' indent|' ' name|'pci_dev' op|'=' op|'{' string|"'compute_node_id'" op|':' number|'1' op|',' nl|'\n' string|"'address'" op|':' string|"'0000:0a:00.%d'" op|'%' name|'dev' op|',' nl|'\n' string|"'vendor_id'" op|':' string|"'1137'" op|',' nl|'\n' string|"'product_id'" op|':' string|"'0071'" op|',' nl|'\n' string|"'status'" op|':' string|"'available'" op|',' nl|'\n' string|"'request_id'" op|':' name|'None' op|',' nl|'\n' string|"'dev_type'" op|':' string|"'type-PCI'" op|',' nl|'\n' string|"'parent_addr'" op|':' name|'None' op|',' nl|'\n' string|"'numa_node'" op|':' number|'0' op|'}' newline|'\n' name|'self' op|'.' name|'pci_tagged_devices' op|'.' name|'append' op|'(' name|'objects' op|'.' name|'PciDevice' op|'.' name|'create' op|'(' name|'None' op|',' nl|'\n' name|'pci_dev' op|')' op|')' newline|'\n' nl|'\n' dedent|'' name|'self' op|'.' name|'pci_untagged_devices' op|'=' op|'[' op|']' newline|'\n' name|'for' name|'dev' name|'in' name|'range' op|'(' number|'3' op|')' op|':' newline|'\n' indent|' ' name|'pci_dev' op|'=' op|'{' string|"'compute_node_id'" op|':' number|'1' op|',' nl|'\n' string|"'address'" op|':' string|"'0000:0b:00.%d'" op|'%' name|'dev' op|',' nl|'\n' string|"'vendor_id'" op|':' string|"'1137'" op|',' nl|'\n' string|"'product_id'" op|':' string|"'0072'" op|',' nl|'\n' string|"'status'" op|':' string|"'available'" op|',' nl|'\n' string|"'request_id'" op|':' name|'None' op|',' nl|'\n' string|"'dev_type'" op|':' string|"'type-PCI'" op|',' nl|'\n' string|"'parent_addr'" op|':' name|'None' op|',' nl|'\n' string|"'numa_node'" op|':' number|'0' op|'}' newline|'\n' name|'self' op|'.' name|'pci_untagged_devices' op|'.' name|'append' op|'(' name|'objects' op|'.' name|'PciDevice' op|'.' name|'create' op|'(' name|'None' op|',' nl|'\n' name|'pci_dev' op|')' op|')' newline|'\n' nl|'\n' dedent|'' name|'map' op|'(' name|'self' op|'.' name|'pci_stats' op|'.' name|'add_device' op|',' name|'self' op|'.' name|'pci_tagged_devices' op|')' newline|'\n' name|'map' op|'(' name|'self' op|'.' name|'pci_stats' op|'.' name|'add_device' op|',' name|'self' op|'.' name|'pci_untagged_devices' op|')' newline|'\n' nl|'\n' DECL|member|_assertPoolContent dedent|'' name|'def' name|'_assertPoolContent' op|'(' name|'self' op|',' name|'pool' op|',' name|'vendor_id' op|',' name|'product_id' op|',' name|'count' op|',' op|'**' name|'tags' op|')' op|':' newline|'\n' indent|' ' name|'self' op|'.' name|'assertEqual' op|'(' name|'vendor_id' op|',' name|'pool' op|'[' string|"'vendor_id'" op|']' op|')' newline|'\n' name|'self' op|'.' name|'assertEqual' op|'(' name|'product_id' op|',' name|'pool' op|'[' string|"'product_id'" op|']' op|')' newline|'\n' name|'self' op|'.' name|'assertEqual' op|'(' name|'count' op|',' name|'pool' op|'[' string|"'count'" op|']' op|')' newline|'\n' name|'if' name|'tags' op|':' newline|'\n' indent|' ' name|'for' name|'k' op|',' name|'v' name|'in' name|'six' op|'.' name|'iteritems' op|'(' name|'tags' op|')' op|':' newline|'\n' indent|' ' name|'self' op|'.' name|'assertEqual' op|'(' name|'v' op|',' name|'pool' op|'[' name|'k' op|']' op|')' newline|'\n' nl|'\n' DECL|member|_assertPools dedent|'' dedent|'' dedent|'' name|'def' name|'_assertPools' op|'(' name|'self' op|')' op|':' newline|'\n' comment|"# Pools are ordered based on the number of keys. 'product_id'," nl|'\n' comment|"# 'vendor_id' are always part of the keys. When tags are present," nl|'\n' comment|'# they are also part of the keys. In this test class, we have' nl|'\n' comment|"# two pools with the second one having the tag 'physical_network'" nl|'\n' comment|"# and the value 'physnet1'" nl|'\n' indent|' ' name|'self' op|'.' name|'assertEqual' op|'(' number|'2' op|',' name|'len' op|'(' name|'self' op|'.' name|'pci_stats' op|'.' name|'pools' op|')' op|')' newline|'\n' name|'self' op|'.' name|'_assertPoolContent' op|'(' name|'self' op|'.' name|'pci_stats' op|'.' name|'pools' op|'[' number|'0' op|']' op|',' string|"'1137'" op|',' string|"'0072'" op|',' nl|'\n' name|'len' op|'(' name|'self' op|'.' name|'pci_untagged_devices' op|')' op|')' newline|'\n' name|'self' op|'.' name|'assertEqual' op|'(' name|'self' op|'.' name|'pci_untagged_devices' op|',' nl|'\n' name|'self' op|'.' name|'pci_stats' op|'.' name|'pools' op|'[' number|'0' op|']' op|'[' string|"'devices'" op|']' op|')' newline|'\n' name|'self' op|'.' name|'_assertPoolContent' op|'(' name|'self' op|'.' name|'pci_stats' op|'.' name|'pools' op|'[' number|'1' op|']' op|',' string|"'1137'" op|',' string|"'0071'" op|',' nl|'\n' name|'len' op|'(' name|'self' op|'.' name|'pci_tagged_devices' op|')' op|',' nl|'\n' name|'physical_network' op|'=' string|"'physnet1'" op|')' newline|'\n' name|'self' op|'.' name|'assertEqual' op|'(' name|'self' op|'.' name|'pci_tagged_devices' op|',' nl|'\n' name|'self' op|'.' name|'pci_stats' op|'.' name|'pools' op|'[' number|'1' op|']' op|'[' string|"'devices'" op|']' op|')' newline|'\n' nl|'\n' DECL|member|test_add_devices dedent|'' name|'def' name|'test_add_devices' op|'(' name|'self' op|')' op|':' newline|'\n' indent|' ' name|'self' op|'.' name|'_create_pci_devices' op|'(' op|')' newline|'\n' name|'self' op|'.' name|'_assertPools' op|'(' op|')' newline|'\n' nl|'\n' DECL|member|test_consume_reqeusts dedent|'' name|'def' name|'test_consume_reqeusts' op|'(' name|'self' op|')' op|':' newline|'\n' indent|' ' name|'self' op|'.' name|'_create_pci_devices' op|'(' op|')' newline|'\n' name|'pci_requests' op|'=' op|'[' name|'objects' op|'.' name|'InstancePCIRequest' op|'(' name|'count' op|'=' number|'1' op|',' nl|'\n' name|'spec' op|'=' op|'[' op|'{' string|"'physical_network'" op|':' string|"'physnet1'" op|'}' op|']' op|')' op|',' nl|'\n' name|'objects' op|'.' name|'InstancePCIRequest' op|'(' name|'count' op|'=' number|'1' op|',' nl|'\n' name|'spec' op|'=' op|'[' op|'{' string|"'vendor_id'" op|':' string|"'1137'" op|',' nl|'\n' string|"'product_id'" op|':' string|"'0072'" op|'}' op|']' op|')' op|']' newline|'\n' name|'devs' op|'=' name|'self' op|'.' name|'pci_stats' op|'.' name|'consume_requests' op|'(' name|'pci_requests' op|')' newline|'\n' name|'self' op|'.' name|'assertEqual' op|'(' number|'2' op|',' name|'len' op|'(' name|'devs' op|')' op|')' newline|'\n' name|'self' op|'.' name|'assertEqual' op|'(' name|'set' op|'(' op|'[' string|"'0071'" op|',' string|"'0072'" op|']' op|')' op|',' nl|'\n' name|'set' op|'(' op|'[' name|'dev' op|'.' name|'product_id' name|'for' name|'dev' name|'in' name|'devs' op|']' op|')' op|')' newline|'\n' name|'self' op|'.' name|'_assertPoolContent' op|'(' name|'self' op|'.' name|'pci_stats' op|'.' name|'pools' op|'[' number|'0' op|']' op|',' string|"'1137'" op|',' string|"'0072'" op|',' number|'2' op|')' newline|'\n' name|'self' op|'.' name|'_assertPoolContent' op|'(' name|'self' op|'.' name|'pci_stats' op|'.' name|'pools' op|'[' number|'1' op|']' op|',' string|"'1137'" op|',' string|"'0071'" op|',' number|'3' op|',' nl|'\n' name|'physical_network' op|'=' string|"'physnet1'" op|')' newline|'\n' nl|'\n' DECL|member|test_add_device_no_devspec dedent|'' name|'def' name|'test_add_device_no_devspec' op|'(' name|'self' op|')' op|':' newline|'\n' indent|' ' name|'self' op|'.' name|'_create_pci_devices' op|'(' op|')' newline|'\n' name|'pci_dev' op|'=' op|'{' string|"'compute_node_id'" op|':' number|'1' op|',' nl|'\n' string|"'address'" op|':' string|"'0000:0c:00.1'" op|',' nl|'\n' string|"'vendor_id'" op|':' string|"'2345'" op|',' nl|'\n' string|"'product_id'" op|':' string|"'0172'" op|',' nl|'\n' string|"'status'" op|':' string|"'available'" op|',' nl|'\n' string|"'parent_addr'" op|':' name|'None' op|',' nl|'\n' string|"'request_id'" op|':' name|'None' op|'}' newline|'\n' name|'pci_dev_obj' op|'=' name|'objects' op|'.' name|'PciDevice' op|'.' name|'create' op|'(' name|'None' op|',' name|'pci_dev' op|')' newline|'\n' name|'self' op|'.' name|'pci_stats' op|'.' name|'add_device' op|'(' name|'pci_dev_obj' op|')' newline|'\n' comment|'# There should be no change' nl|'\n' name|'self' op|'.' name|'assertIsNone' op|'(' nl|'\n' name|'self' op|'.' name|'pci_stats' op|'.' name|'_create_pool_keys_from_dev' op|'(' name|'pci_dev_obj' op|')' op|')' newline|'\n' name|'self' op|'.' name|'_assertPools' op|'(' op|')' newline|'\n' nl|'\n' DECL|member|test_remove_device_no_devspec dedent|'' name|'def' name|'test_remove_device_no_devspec' op|'(' name|'self' op|')' op|':' newline|'\n' indent|' ' name|'self' op|'.' name|'_create_pci_devices' op|'(' op|')' newline|'\n' name|'pci_dev' op|'=' op|'{' string|"'compute_node_id'" op|':' number|'1' op|',' nl|'\n' string|"'address'" op|':' string|"'0000:0c:00.1'" op|',' nl|'\n' string|"'vendor_id'" op|':' string|"'2345'" op|',' nl|'\n' string|"'product_id'" op|':' string|"'0172'" op|',' nl|'\n' string|"'status'" op|':' string|"'available'" op|',' nl|'\n' string|"'parent_addr'" op|':' name|'None' op|',' nl|'\n' string|"'request_id'" op|':' name|'None' op|'}' newline|'\n' name|'pci_dev_obj' op|'=' name|'objects' op|'.' name|'PciDevice' op|'.' name|'create' op|'(' name|'None' op|',' name|'pci_dev' op|')' newline|'\n' name|'self' op|'.' name|'pci_stats' op|'.' name|'remove_device' op|'(' name|'pci_dev_obj' op|')' newline|'\n' comment|'# There should be no change' nl|'\n' name|'self' op|'.' name|'assertIsNone' op|'(' nl|'\n' name|'self' op|'.' name|'pci_stats' op|'.' name|'_create_pool_keys_from_dev' op|'(' name|'pci_dev_obj' op|')' op|')' newline|'\n' name|'self' op|'.' name|'_assertPools' op|'(' op|')' newline|'\n' nl|'\n' DECL|member|test_remove_device dedent|'' name|'def' name|'test_remove_device' op|'(' name|'self' op|')' op|':' newline|'\n' indent|' ' name|'self' op|'.' name|'_create_pci_devices' op|'(' op|')' newline|'\n' name|'dev1' op|'=' name|'self' op|'.' name|'pci_untagged_devices' op|'.' name|'pop' op|'(' op|')' newline|'\n' name|'self' op|'.' name|'pci_stats' op|'.' name|'remove_device' op|'(' name|'dev1' op|')' newline|'\n' name|'dev2' op|'=' name|'self' op|'.' name|'pci_tagged_devices' op|'.' name|'pop' op|'(' op|')' newline|'\n' name|'self' op|'.' name|'pci_stats' op|'.' name|'remove_device' op|'(' name|'dev2' op|')' newline|'\n' name|'self' op|'.' name|'_assertPools' op|'(' op|')' newline|'\n' nl|'\n' nl|'\n' DECL|class|PciDeviceVFPFStatsTestCase dedent|'' dedent|'' name|'class' name|'PciDeviceVFPFStatsTestCase' op|'(' name|'test' op|'.' name|'NoDBTestCase' op|')' op|':' newline|'\n' nl|'\n' DECL|member|setUp indent|' ' name|'def' name|'setUp' op|'(' name|'self' op|')' op|':' newline|'\n' indent|' ' name|'super' op|'(' name|'PciDeviceVFPFStatsTestCase' op|',' name|'self' op|')' op|'.' name|'setUp' op|'(' op|')' newline|'\n' name|'white_list' op|'=' op|'[' string|'\'{"vendor_id":"8086","product_id":"1528"}\'' op|',' nl|'\n' string|'\'{"vendor_id":"8086","product_id":"1515"}\'' op|']' newline|'\n' name|'self' op|'.' name|'flags' op|'(' name|'pci_passthrough_whitelist' op|'=' name|'white_list' op|')' newline|'\n' name|'self' op|'.' name|'pci_stats' op|'=' name|'stats' op|'.' name|'PciDeviceStats' op|'(' op|')' newline|'\n' nl|'\n' DECL|member|_create_pci_devices dedent|'' name|'def' name|'_create_pci_devices' op|'(' name|'self' op|',' name|'vf_product_id' op|'=' number|'1515' op|',' name|'pf_product_id' op|'=' number|'1528' op|')' op|':' newline|'\n' indent|' ' name|'self' op|'.' name|'sriov_pf_devices' op|'=' op|'[' op|']' newline|'\n' name|'for' name|'dev' name|'in' name|'range' op|'(' number|'2' op|')' op|':' newline|'\n' indent|' ' name|'pci_dev' op|'=' op|'{' string|"'compute_node_id'" op|':' number|'1' op|',' nl|'\n' string|"'address'" op|':' string|"'0000:81:00.%d'" op|'%' name|'dev' op|',' nl|'\n' string|"'vendor_id'" op|':' string|"'8086'" op|',' nl|'\n' string|"'product_id'" op|':' string|"'%d'" op|'%' name|'pf_product_id' op|',' nl|'\n' string|"'status'" op|':' string|"'available'" op|',' nl|'\n' string|"'request_id'" op|':' name|'None' op|',' nl|'\n' string|"'dev_type'" op|':' name|'fields' op|'.' name|'PciDeviceType' op|'.' name|'SRIOV_PF' op|',' nl|'\n' string|"'parent_addr'" op|':' name|'None' op|',' nl|'\n' string|"'numa_node'" op|':' number|'0' op|'}' newline|'\n' name|'self' op|'.' name|'sriov_pf_devices' op|'.' name|'append' op|'(' name|'objects' op|'.' name|'PciDevice' op|'.' name|'create' op|'(' name|'None' op|',' nl|'\n' name|'pci_dev' op|')' op|')' newline|'\n' nl|'\n' dedent|'' name|'self' op|'.' name|'sriov_vf_devices' op|'=' op|'[' op|']' newline|'\n' name|'for' name|'dev' name|'in' name|'range' op|'(' number|'8' op|')' op|':' newline|'\n' indent|' ' name|'pci_dev' op|'=' op|'{' string|"'compute_node_id'" op|':' number|'1' op|',' nl|'\n' string|"'address'" op|':' string|"'0000:81:10.%d'" op|'%' name|'dev' op|',' nl|'\n' string|"'vendor_id'" op|':' string|"'8086'" op|',' nl|'\n' string|"'product_id'" op|':' string|"'%d'" op|'%' name|'vf_product_id' op|',' nl|'\n' string|"'status'" op|':' string|"'available'" op|',' nl|'\n' string|"'request_id'" op|':' name|'None' op|',' nl|'\n' string|"'dev_type'" op|':' name|'fields' op|'.' name|'PciDeviceType' op|'.' name|'SRIOV_VF' op|',' nl|'\n' string|"'parent_addr'" op|':' string|"'0000:81:00.%d'" op|'%' name|'int' op|'(' name|'dev' op|'/' number|'4' op|')' op|',' nl|'\n' string|"'numa_node'" op|':' number|'0' op|'}' newline|'\n' name|'self' op|'.' name|'sriov_vf_devices' op|'.' name|'append' op|'(' name|'objects' op|'.' name|'PciDevice' op|'.' name|'create' op|'(' name|'None' op|',' nl|'\n' name|'pci_dev' op|')' op|')' newline|'\n' nl|'\n' dedent|'' name|'list' op|'(' name|'map' op|'(' name|'self' op|'.' name|'pci_stats' op|'.' name|'add_device' op|',' name|'self' op|'.' name|'sriov_pf_devices' op|')' op|')' newline|'\n' name|'list' op|'(' name|'map' op|'(' name|'self' op|'.' name|'pci_stats' op|'.' name|'add_device' op|',' name|'self' op|'.' name|'sriov_vf_devices' op|')' op|')' newline|'\n' nl|'\n' DECL|member|_fake_get_by_parent_address dedent|'' name|'def' name|'_fake_get_by_parent_address' op|'(' name|'self' op|',' name|'ctxt' op|',' name|'node_id' op|',' name|'addr' op|')' op|':' newline|'\n' indent|' ' name|'vf_devs' op|'=' op|'[' op|']' newline|'\n' name|'for' name|'dev' name|'in' name|'self' op|'.' name|'sriov_vf_devices' op|':' newline|'\n' indent|' ' name|'if' name|'dev' op|'.' name|'parent_addr' op|'==' name|'addr' op|':' newline|'\n' indent|' ' name|'vf_devs' op|'.' name|'append' op|'(' name|'dev' op|')' newline|'\n' dedent|'' dedent|'' name|'return' name|'vf_devs' newline|'\n' nl|'\n' DECL|member|_fake_pci_device_get_by_addr dedent|'' name|'def' name|'_fake_pci_device_get_by_addr' op|'(' name|'self' op|',' name|'ctxt' op|',' name|'id' op|',' name|'addr' op|')' op|':' newline|'\n' indent|' ' name|'for' name|'dev' name|'in' name|'self' op|'.' name|'sriov_pf_devices' op|':' newline|'\n' indent|' ' name|'if' name|'dev' op|'.' name|'address' op|'==' name|'addr' op|':' newline|'\n' indent|' ' name|'return' name|'dev' newline|'\n' nl|'\n' DECL|member|test_consume_VF_requests dedent|'' dedent|'' dedent|'' name|'def' name|'test_consume_VF_requests' op|'(' name|'self' op|')' op|':' newline|'\n' indent|' ' name|'with' name|'mock' op|'.' name|'patch' op|'.' name|'object' op|'(' name|'objects' op|'.' name|'PciDevice' op|',' string|"'get_by_dev_addr'" op|',' nl|'\n' name|'side_effect' op|'=' name|'self' op|'.' name|'_fake_pci_device_get_by_addr' op|')' op|':' newline|'\n' indent|' ' name|'self' op|'.' name|'_create_pci_devices' op|'(' op|')' newline|'\n' name|'pci_requests' op|'=' op|'[' name|'objects' op|'.' name|'InstancePCIRequest' op|'(' name|'count' op|'=' number|'2' op|',' nl|'\n' name|'spec' op|'=' op|'[' op|'{' string|"'product_id'" op|':' string|"'1515'" op|'}' op|']' op|')' op|']' newline|'\n' name|'devs' op|'=' name|'self' op|'.' name|'pci_stats' op|'.' name|'consume_requests' op|'(' name|'pci_requests' op|')' newline|'\n' name|'self' op|'.' name|'assertEqual' op|'(' number|'2' op|',' name|'len' op|'(' name|'devs' op|')' op|')' newline|'\n' name|'self' op|'.' name|'assertEqual' op|'(' name|'set' op|'(' op|'[' string|"'1515'" op|']' op|')' op|',' nl|'\n' name|'set' op|'(' op|'[' name|'dev' op|'.' name|'product_id' name|'for' name|'dev' name|'in' name|'devs' op|']' op|')' op|')' newline|'\n' name|'free_devs' op|'=' name|'self' op|'.' name|'pci_stats' op|'.' name|'get_free_devs' op|'(' op|')' newline|'\n' comment|'# Validate that the parents of these VFs has been removed' nl|'\n' comment|'# from pools.' nl|'\n' name|'for' name|'dev' name|'in' name|'devs' op|':' newline|'\n' indent|' ' name|'self' op|'.' name|'assertTrue' op|'(' name|'all' op|'(' name|'dev' op|'.' name|'parent_addr' op|'!=' name|'free_dev' op|'.' name|'address' nl|'\n' name|'for' name|'free_dev' name|'in' name|'free_devs' op|')' op|')' newline|'\n' nl|'\n' DECL|member|test_consume_PF_requests dedent|'' dedent|'' dedent|'' name|'def' name|'test_consume_PF_requests' op|'(' name|'self' op|')' op|':' newline|'\n' indent|' ' name|'with' name|'mock' op|'.' name|'patch' op|'.' name|'object' op|'(' name|'objects' op|'.' name|'PciDeviceList' op|',' string|"'get_by_parent_address'" op|',' nl|'\n' name|'side_effect' op|'=' name|'self' op|'.' name|'_fake_get_by_parent_address' op|')' op|':' newline|'\n' indent|' ' name|'self' op|'.' name|'_create_pci_devices' op|'(' op|')' newline|'\n' name|'pci_requests' op|'=' op|'[' name|'objects' op|'.' name|'InstancePCIRequest' op|'(' name|'count' op|'=' number|'2' op|',' nl|'\n' name|'spec' op|'=' op|'[' op|'{' string|"'product_id'" op|':' string|"'1528'" op|',' nl|'\n' string|"'dev_type'" op|':' string|"'type-PF'" op|'}' op|']' op|')' op|']' newline|'\n' name|'devs' op|'=' name|'self' op|'.' name|'pci_stats' op|'.' name|'consume_requests' op|'(' name|'pci_requests' op|')' newline|'\n' name|'self' op|'.' name|'assertEqual' op|'(' number|'2' op|',' name|'len' op|'(' name|'devs' op|')' op|')' newline|'\n' name|'self' op|'.' name|'assertEqual' op|'(' name|'set' op|'(' op|'[' string|"'1528'" op|']' op|')' op|',' nl|'\n' name|'set' op|'(' op|'[' name|'dev' op|'.' name|'product_id' name|'for' name|'dev' name|'in' name|'devs' op|']' op|')' op|')' newline|'\n' name|'free_devs' op|'=' name|'self' op|'.' name|'pci_stats' op|'.' name|'get_free_devs' op|'(' op|')' newline|'\n' comment|'# Validate that there are no free devices left, as when allocating' nl|'\n' comment|'# both available PFs, its VFs should not be available.' nl|'\n' name|'self' op|'.' name|'assertEqual' op|'(' number|'0' op|',' name|'len' op|'(' name|'free_devs' op|')' op|')' newline|'\n' nl|'\n' DECL|member|test_consume_VF_and_PF_requests dedent|'' dedent|'' name|'def' name|'test_consume_VF_and_PF_requests' op|'(' name|'self' op|')' op|':' newline|'\n' indent|' ' name|'with' name|'test' op|'.' name|'nested' op|'(' nl|'\n' name|'mock' op|'.' name|'patch' op|'.' name|'object' op|'(' name|'objects' op|'.' name|'PciDevice' op|',' string|"'get_by_dev_addr'" op|',' nl|'\n' name|'side_effect' op|'=' name|'self' op|'.' name|'_fake_pci_device_get_by_addr' op|')' op|',' nl|'\n' name|'mock' op|'.' name|'patch' op|'.' name|'object' op|'(' name|'objects' op|'.' name|'PciDeviceList' op|',' string|"'get_by_parent_address'" op|',' nl|'\n' name|'side_effect' op|'=' name|'self' op|'.' name|'_fake_get_by_parent_address' op|')' op|')' op|':' newline|'\n' indent|' ' name|'self' op|'.' name|'_create_pci_devices' op|'(' op|')' newline|'\n' name|'pci_requests' op|'=' op|'[' name|'objects' op|'.' name|'InstancePCIRequest' op|'(' name|'count' op|'=' number|'2' op|',' nl|'\n' name|'spec' op|'=' op|'[' op|'{' string|"'product_id'" op|':' string|"'1515'" op|'}' op|']' op|')' op|',' nl|'\n' name|'objects' op|'.' name|'InstancePCIRequest' op|'(' name|'count' op|'=' number|'1' op|',' nl|'\n' name|'spec' op|'=' op|'[' op|'{' string|"'product_id'" op|':' string|"'1528'" op|',' nl|'\n' string|"'dev_type'" op|':' string|"'type-PF'" op|'}' op|']' op|')' op|']' newline|'\n' name|'devs' op|'=' name|'self' op|'.' name|'pci_stats' op|'.' name|'consume_requests' op|'(' name|'pci_requests' op|')' newline|'\n' name|'self' op|'.' name|'assertEqual' op|'(' number|'3' op|',' name|'len' op|'(' name|'devs' op|')' op|')' newline|'\n' name|'self' op|'.' name|'assertEqual' op|'(' name|'set' op|'(' op|'[' string|"'1528'" op|',' string|"'1515'" op|']' op|')' op|',' nl|'\n' name|'set' op|'(' op|'[' name|'dev' op|'.' name|'product_id' name|'for' name|'dev' name|'in' name|'devs' op|']' op|')' op|')' newline|'\n' nl|'\n' DECL|member|test_consume_VF_and_PF_requests_failed dedent|'' dedent|'' name|'def' name|'test_consume_VF_and_PF_requests_failed' op|'(' name|'self' op|')' op|':' newline|'\n' indent|' ' name|'with' name|'test' op|'.' name|'nested' op|'(' nl|'\n' name|'mock' op|'.' name|'patch' op|'.' name|'object' op|'(' name|'objects' op|'.' name|'PciDevice' op|',' string|"'get_by_dev_addr'" op|',' nl|'\n' name|'side_effect' op|'=' name|'self' op|'.' name|'_fake_pci_device_get_by_addr' op|')' op|',' nl|'\n' name|'mock' op|'.' name|'patch' op|'.' name|'object' op|'(' name|'objects' op|'.' name|'PciDeviceList' op|',' string|"'get_by_parent_address'" op|',' nl|'\n' name|'side_effect' op|'=' name|'self' op|'.' name|'_fake_get_by_parent_address' op|')' op|')' op|':' newline|'\n' indent|' ' name|'self' op|'.' name|'_create_pci_devices' op|'(' op|')' newline|'\n' name|'pci_requests' op|'=' op|'[' name|'objects' op|'.' name|'InstancePCIRequest' op|'(' name|'count' op|'=' number|'5' op|',' nl|'\n' name|'spec' op|'=' op|'[' op|'{' string|"'product_id'" op|':' string|"'1515'" op|'}' op|']' op|')' op|',' nl|'\n' name|'objects' op|'.' name|'InstancePCIRequest' op|'(' name|'count' op|'=' number|'1' op|',' nl|'\n' name|'spec' op|'=' op|'[' op|'{' string|"'product_id'" op|':' string|"'1528'" op|',' nl|'\n' string|"'dev_type'" op|':' string|"'type-PF'" op|'}' op|']' op|')' op|']' newline|'\n' name|'self' op|'.' name|'assertIsNone' op|'(' name|'self' op|'.' name|'pci_stats' op|'.' name|'consume_requests' op|'(' name|'pci_requests' op|')' op|')' newline|'\n' nl|'\n' DECL|member|test_consume_VF_and_PF_same_prodict_id_failed dedent|'' dedent|'' name|'def' name|'test_consume_VF_and_PF_same_prodict_id_failed' op|'(' name|'self' op|')' op|':' newline|'\n' indent|' ' name|'with' name|'test' op|'.' name|'nested' op|'(' nl|'\n' name|'mock' op|'.' name|'patch' op|'.' name|'object' op|'(' name|'objects' op|'.' name|'PciDevice' op|',' string|"'get_by_dev_addr'" op|',' nl|'\n' name|'side_effect' op|'=' name|'self' op|'.' name|'_fake_pci_device_get_by_addr' op|')' op|',' nl|'\n' name|'mock' op|'.' name|'patch' op|'.' name|'object' op|'(' name|'objects' op|'.' name|'PciDeviceList' op|',' string|"'get_by_parent_address'" op|',' nl|'\n' name|'side_effect' op|'=' name|'self' op|'.' name|'_fake_get_by_parent_address' op|')' op|')' op|':' newline|'\n' indent|' ' name|'self' op|'.' name|'_create_pci_devices' op|'(' name|'pf_product_id' op|'=' number|'1515' op|')' newline|'\n' name|'pci_requests' op|'=' op|'[' name|'objects' op|'.' name|'InstancePCIRequest' op|'(' name|'count' op|'=' number|'9' op|',' nl|'\n' name|'spec' op|'=' op|'[' op|'{' string|"'product_id'" op|':' string|"'1515'" op|'}' op|']' op|')' op|']' newline|'\n' name|'self' op|'.' name|'assertIsNone' op|'(' name|'self' op|'.' name|'pci_stats' op|'.' name|'consume_requests' op|'(' name|'pci_requests' op|')' op|')' newline|'\n' dedent|'' dedent|'' dedent|'' endmarker|'' end_unit
11.877546
88
0.588147
7,083
46,655
3.757306
0.041367
0.171345
0.086424
0.101003
0.913839
0.894713
0.870853
0.844813
0.813813
0.778567
0
0.010723
0.100482
46,655
3,927
89
11.88057
0.623418
0
0
0.963331
0
0
0.342064
0.032108
0
0
0
0
0.017316
0
null
null
0.000764
0.002546
null
null
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
1
0
0
0
0
0
0
0
0
8
79965c81817cdd4b28acc4ae1826adf0858113ac
228
py
Python
aiflearn/algorithms/inprocessing/celisMeta/__init__.py
gusrabbit/aif360-learn
b14a9b98e96dd2756faf312047e9a50ccc1559fa
[ "Apache-2.0" ]
null
null
null
aiflearn/algorithms/inprocessing/celisMeta/__init__.py
gusrabbit/aif360-learn
b14a9b98e96dd2756faf312047e9a50ccc1559fa
[ "Apache-2.0" ]
null
null
null
aiflearn/algorithms/inprocessing/celisMeta/__init__.py
gusrabbit/aif360-learn
b14a9b98e96dd2756faf312047e9a50ccc1559fa
[ "Apache-2.0" ]
null
null
null
from aiflearn.algorithms.inprocessing.celisMeta.FalseDiscovery import FalseDiscovery from aiflearn.algorithms.inprocessing.celisMeta.StatisticalRate import StatisticalRate import aiflearn.algorithms.inprocessing.celisMeta.utils
57
86
0.903509
22
228
9.363636
0.409091
0.262136
0.436893
0.567961
0.417476
0
0
0
0
0
0
0
0.04386
228
3
87
76
0.944954
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
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
8
8ddf9121970848b72b08d6a8d93ab4e46a7f47b7
3,432
py
Python
examples/python/test_concat.py
SmartEconomyWorkshop/workshop
5961dcc8832f60b3a0407cb9a8361ba5485ac280
[ "MIT" ]
79
2017-10-22T03:35:06.000Z
2021-12-02T10:28:06.000Z
examples/python/test_concat.py
SmartEconomyWorkshop/workshop
5961dcc8832f60b3a0407cb9a8361ba5485ac280
[ "MIT" ]
122
2017-10-19T12:34:08.000Z
2020-08-20T12:38:17.000Z
examples/python/test_concat.py
SmartEconomyWorkshop/workshop
5961dcc8832f60b3a0407cb9a8361ba5485ac280
[ "MIT" ]
76
2017-10-19T05:09:55.000Z
2020-12-08T12:03:59.000Z
from boa_test.tests.boa_test import BoaTest from boa.compiler import Compiler from neo.Prompt.Commands.BuildNRun import TestBuild class TestContract(BoaTest): def test_Concat1(self): output = Compiler.instance().load('%s/boa_test/example/ConcatTest.py' % TestContract.dirname).default out = output.write() tx, results, total_ops, engine = TestBuild(out, [], self.GetWallet1(), '', '07') self.assertEqual(len(results), 1) self.assertEqual(results[0].GetString(), 'helloworld') def test_Concat2(self): output = Compiler.instance().load('%s/boa_test/example/ConcatTest2.py' % TestContract.dirname).default out = output.write() tx, results, total_ops, engine = TestBuild(out, ['concat', "['hello','world']"], self.GetWallet1(), '10', '07') self.assertEqual(len(results), 1) self.assertEqual(results[0].GetString(), 'helloworld') tx, results, total_ops, engine = TestBuild(out, ['blah', "['hello','world']"], self.GetWallet1(), '10', '07') self.assertEqual(len(results), 1) self.assertEqual(results[0].GetBoolean(), False) tx, results, total_ops, engine = TestBuild(out, ['concat', "['blah']"], self.GetWallet1(), '10', '07') self.assertEqual(len(results), 1) self.assertEqual(results[0].GetBoolean(), False) tx, results, total_ops, engine = TestBuild(out, ['concat', "['hello','world','third']"], self.GetWallet1(), '10', '07') self.assertEqual(len(results), 1) self.assertEqual(results[0].GetString(), 'helloworld') tx, results, total_ops, engine = TestBuild(out, ['concat', "['1','neo']"], self.GetWallet1(), '10', '07') self.assertEqual(len(results), 1) self.assertEqual(results[0].GetString(), '\x01neo') tx, results, total_ops, engine = TestBuild(out, ['concat', "['','neo']"], self.GetWallet1(), '10', '07') self.assertEqual(len(results), 1) self.assertEqual(results[0].GetString(), 'neo') # Testinvoke args need to be fixed # tx, results, total_ops, engine = TestBuild(out, ['concat',"[bytearray(b'\x01\xa0\x04'),bytearray(b'\x04\x02\x04')]"], self.GetWallet1(), '10','07') # self.assertEqual(len(results), 1) # self.assertEqual(results[0].GetByteArray(), bytearray(b'\x01\xa0\x04\x04\x02\x04')) def test_Take(self): output = Compiler.instance().load('%s/boa_test/example/TakeTest.py' % TestContract.dirname).default out = output.write() tx, results, total_ops, engine = TestBuild(out, [2], self.GetWallet1(), '02', '07') self.assertEqual(len(results), 1) self.assertEqual(results[0].GetString(), 'he') tx, results, total_ops, engine = TestBuild(out, [0], self.GetWallet1(), '02', '07') self.assertEqual(len(results), 1) self.assertEqual(results[0].GetString(), '') tx, results, total_ops, engine = TestBuild(out, [12], self.GetWallet1(), '02', '07') self.assertEqual(len(results), 1) self.assertEqual(results[0].GetString(), 'helloworld12') tx, results, total_ops, engine = TestBuild(out, [40], self.GetWallet1(), '02', '07') self.assertEqual(len(results), 1) self.assertEqual(results[0].GetString(), 'helloworld1234567') tx, results, total_ops, engine = TestBuild(out, [-2], self.GetWallet1(), '02', '07') self.assertEqual(len(results), 0)
48.338028
156
0.630536
407
3,432
5.265356
0.181818
0.174988
0.084928
0.103126
0.839944
0.822212
0.822212
0.773215
0.732151
0.669155
0
0.047042
0.182401
3,432
70
157
49.028571
0.716679
0.092949
0
0.395833
0
0
0.10843
0.039575
0
0
0
0
0.479167
1
0.0625
false
0
0.0625
0
0.145833
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
1
0
0
0
0
0
0
0
0
0
7
5c0946952b71037bb1f97ce65af023f47196a25c
35,474
py
Python
files/runs_small/cores_2/ocean.cont/power.py
ST4NSB/sniper-simulator-predictions
1f0fe2a10fda55fceea053464ea202bfe2effafc
[ "MIT" ]
1
2021-03-08T03:39:23.000Z
2021-03-08T03:39:23.000Z
files/runs_small/cores_2/ocean.cont/power.py
ST4NSB/sniper-simulator-predictions
1f0fe2a10fda55fceea053464ea202bfe2effafc
[ "MIT" ]
null
null
null
files/runs_small/cores_2/ocean.cont/power.py
ST4NSB/sniper-simulator-predictions
1f0fe2a10fda55fceea053464ea202bfe2effafc
[ "MIT" ]
null
null
null
power = {'BUSES': {'Area': 1.08752, 'Bus/Area': 1.08752, 'Bus/Gate Leakage': 0.00541455, 'Bus/Peak Dynamic': 0.0, 'Bus/Runtime Dynamic': 0.0, 'Bus/Subthreshold Leakage': 0.0564625, 'Bus/Subthreshold Leakage with power gating': 0.0211734, 'Gate Leakage': 0.00541455, 'Peak Dynamic': 0.0, 'Runtime Dynamic': 0.0, 'Subthreshold Leakage': 0.0564625, 'Subthreshold Leakage with power gating': 0.0211734}, 'Core': [{'Area': 32.6082, 'Execution Unit/Area': 8.2042, 'Execution Unit/Complex ALUs/Area': 0.235435, 'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646, 'Execution Unit/Complex ALUs/Peak Dynamic': 0.0955308, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.277723, 'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111, 'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163, 'Execution Unit/Floating Point Units/Area': 4.6585, 'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156, 'Execution Unit/Floating Point Units/Peak Dynamic': 0.852868, 'Execution Unit/Floating Point Units/Runtime Dynamic': 0.679223, 'Execution Unit/Floating Point Units/Subthreshold Leakage': 0.994829, 'Execution Unit/Floating Point Units/Subthreshold Leakage with power gating': 0.373061, 'Execution Unit/Gate Leakage': 0.122718, 'Execution Unit/Instruction Scheduler/Area': 2.17927, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Area': 0.328073, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Gate Leakage': 0.00115349, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Peak Dynamic': 1.20978, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Runtime Dynamic': 0.337297, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage': 0.017004, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage with power gating': 0.00962066, 'Execution Unit/Instruction Scheduler/Gate Leakage': 0.00730101, 'Execution Unit/Instruction Scheduler/Instruction Window/Area': 1.00996, 'Execution Unit/Instruction Scheduler/Instruction Window/Gate Leakage': 0.00529112, 'Execution Unit/Instruction Scheduler/Instruction Window/Peak Dynamic': 2.07911, 'Execution Unit/Instruction Scheduler/Instruction Window/Runtime Dynamic': 0.584077, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage': 0.0800117, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage with power gating': 0.0455351, 'Execution Unit/Instruction Scheduler/Peak Dynamic': 4.84781, 'Execution Unit/Instruction Scheduler/ROB/Area': 0.841232, 'Execution Unit/Instruction Scheduler/ROB/Gate Leakage': 0.000856399, 'Execution Unit/Instruction Scheduler/ROB/Peak Dynamic': 1.55892, 'Execution Unit/Instruction Scheduler/ROB/Runtime Dynamic': 0.377493, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage': 0.0178624, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage with power gating': 0.00897339, 'Execution Unit/Instruction Scheduler/Runtime Dynamic': 1.29887, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage': 0.114878, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage with power gating': 0.0641291, 'Execution Unit/Integer ALUs/Area': 0.47087, 'Execution Unit/Integer ALUs/Gate Leakage': 0.0265291, 'Execution Unit/Integer ALUs/Peak Dynamic': 0.202647, 'Execution Unit/Integer ALUs/Runtime Dynamic': 0.319665, 'Execution Unit/Integer ALUs/Subthreshold Leakage': 0.40222, 'Execution Unit/Integer ALUs/Subthreshold Leakage with power gating': 0.150833, 'Execution Unit/Peak Dynamic': 6.59121, 'Execution Unit/Register Files/Area': 0.570804, 'Execution Unit/Register Files/Floating Point RF/Area': 0.208131, 'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788, 'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 0.161125, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.0122273, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage': 0.00399698, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage with power gating': 0.00176968, 'Execution Unit/Register Files/Gate Leakage': 0.000622708, 'Execution Unit/Register Files/Integer RF/Area': 0.362673, 'Execution Unit/Register Files/Integer RF/Gate Leakage': 0.00038992, 'Execution Unit/Register Files/Integer RF/Peak Dynamic': 0.110483, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0904283, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage': 0.00614175, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage with power gating': 0.00246675, 'Execution Unit/Register Files/Peak Dynamic': 0.271608, 'Execution Unit/Register Files/Runtime Dynamic': 0.102656, 'Execution Unit/Register Files/Subthreshold Leakage': 0.0101387, 'Execution Unit/Register Files/Subthreshold Leakage with power gating': 0.00423643, 'Execution Unit/Results Broadcast Bus/Area Overhead': 0.0442632, 'Execution Unit/Results Broadcast Bus/Gate Leakage': 0.00607074, 'Execution Unit/Results Broadcast Bus/Peak Dynamic': 0.293143, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.835198, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.0920413, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0345155, 'Execution Unit/Runtime Dynamic': 3.51333, 'Execution Unit/Subthreshold Leakage': 1.83518, 'Execution Unit/Subthreshold Leakage with power gating': 0.709678, 'Gate Leakage': 0.372997, 'Instruction Fetch Unit/Area': 5.86007, 'Instruction Fetch Unit/Branch Predictor/Area': 0.138516, 'Instruction Fetch Unit/Branch Predictor/Chooser/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Chooser/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Chooser/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Chooser/Runtime Dynamic': 0.000781008, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/Gate Leakage': 0.000757657, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Runtime Dynamic': 0.000781008, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Area': 0.0257064, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Gate Leakage': 0.000154548, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Peak Dynamic': 0.0142575, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Runtime Dynamic': 0.000675581, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage': 0.00384344, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage with power gating': 0.00198631, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Area': 0.0151917, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Gate Leakage': 8.00196e-05, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Peak Dynamic': 0.00527447, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Runtime Dynamic': 0.000258971, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage': 0.00181347, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage with power gating': 0.000957045, 'Instruction Fetch Unit/Branch Predictor/Peak Dynamic': 0.0597838, 'Instruction Fetch Unit/Branch Predictor/RAS/Area': 0.0105732, 'Instruction Fetch Unit/Branch Predictor/RAS/Gate Leakage': 4.63858e-05, 'Instruction Fetch Unit/Branch Predictor/RAS/Peak Dynamic': 0.0117602, 'Instruction Fetch Unit/Branch Predictor/RAS/Runtime Dynamic': 0.00129901, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage': 0.000932505, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage with power gating': 0.000494733, 'Instruction Fetch Unit/Branch Predictor/Runtime Dynamic': 0.00353661, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage': 0.0199703, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage with power gating': 0.0103282, 'Instruction Fetch Unit/Branch Target Buffer/Area': 0.64954, 'Instruction Fetch Unit/Branch Target Buffer/Gate Leakage': 0.00272758, 'Instruction Fetch Unit/Branch Target Buffer/Peak Dynamic': 0.177867, 'Instruction Fetch Unit/Branch Target Buffer/Runtime Dynamic': 0.0076553, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage': 0.0811682, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage with power gating': 0.0435357, 'Instruction Fetch Unit/Gate Leakage': 0.0590479, 'Instruction Fetch Unit/Instruction Buffer/Area': 0.0226323, 'Instruction Fetch Unit/Instruction Buffer/Gate Leakage': 6.83558e-05, 'Instruction Fetch Unit/Instruction Buffer/Peak Dynamic': 0.606827, 'Instruction Fetch Unit/Instruction Buffer/Runtime Dynamic': 0.0869311, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682, 'Instruction Fetch Unit/Instruction Cache/Area': 3.14635, 'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931, 'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 5.52956, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.213019, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage': 0.367022, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage with power gating': 0.180386, 'Instruction Fetch Unit/Instruction Decoder/Area': 1.85799, 'Instruction Fetch Unit/Instruction Decoder/Gate Leakage': 0.0222493, 'Instruction Fetch Unit/Instruction Decoder/Peak Dynamic': 1.37404, 'Instruction Fetch Unit/Instruction Decoder/Runtime Dynamic': 0.295257, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104, 'Instruction Fetch Unit/Peak Dynamic': 8.02054, 'Instruction Fetch Unit/Runtime Dynamic': 0.606399, 'Instruction Fetch Unit/Subthreshold Leakage': 0.932587, 'Instruction Fetch Unit/Subthreshold Leakage with power gating': 0.408542, 'L2/Area': 4.53318, 'L2/Gate Leakage': 0.015464, 'L2/Peak Dynamic': 0.152811, 'L2/Runtime Dynamic': 0.0364529, 'L2/Subthreshold Leakage': 0.834142, 'L2/Subthreshold Leakage with power gating': 0.401066, 'Load Store Unit/Area': 8.80969, 'Load Store Unit/Data Cache/Area': 6.84535, 'Load Store Unit/Data Cache/Gate Leakage': 0.0279261, 'Load Store Unit/Data Cache/Peak Dynamic': 3.72689, 'Load Store Unit/Data Cache/Runtime Dynamic': 1.24846, 'Load Store Unit/Data Cache/Subthreshold Leakage': 0.527675, 'Load Store Unit/Data Cache/Subthreshold Leakage with power gating': 0.25085, 'Load Store Unit/Gate Leakage': 0.0351387, 'Load Store Unit/LoadQ/Area': 0.0836782, 'Load Store Unit/LoadQ/Gate Leakage': 0.00059896, 'Load Store Unit/LoadQ/Peak Dynamic': 0.08055, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0805499, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 4.10881, 'Load Store Unit/Runtime Dynamic': 1.72626, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.198623, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.397245, 'Load Store Unit/StoreQ/Subthreshold Leakage': 0.0345621, 'Load Store Unit/StoreQ/Subthreshold Leakage with power gating': 0.0197004, 'Load Store Unit/Subthreshold Leakage': 0.591622, 'Load Store Unit/Subthreshold Leakage with power gating': 0.283406, 'Memory Management Unit/Area': 0.434579, 'Memory Management Unit/Dtlb/Area': 0.0879726, 'Memory Management Unit/Dtlb/Gate Leakage': 0.00088729, 'Memory Management Unit/Dtlb/Peak Dynamic': 0.0704918, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0727723, 'Memory Management Unit/Dtlb/Subthreshold Leakage': 0.0155699, 'Memory Management Unit/Dtlb/Subthreshold Leakage with power gating': 0.00887485, 'Memory Management Unit/Gate Leakage': 0.00813591, 'Memory Management Unit/Itlb/Area': 0.301552, 'Memory Management Unit/Itlb/Gate Leakage': 0.00393464, 'Memory Management Unit/Itlb/Peak Dynamic': 0.343808, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.0347031, 'Memory Management Unit/Itlb/Subthreshold Leakage': 0.0413758, 'Memory Management Unit/Itlb/Subthreshold Leakage with power gating': 0.0235842, 'Memory Management Unit/Peak Dynamic': 0.624173, 'Memory Management Unit/Runtime Dynamic': 0.107475, 'Memory Management Unit/Subthreshold Leakage': 0.0769113, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0399462, 'Peak Dynamic': 24.0592, 'Renaming Unit/Area': 0.369768, 'Renaming Unit/FP Front End RAT/Area': 0.168486, 'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00489731, 'Renaming Unit/FP Front End RAT/Peak Dynamic': 3.33511, 'Renaming Unit/FP Front End RAT/Runtime Dynamic': 0.562129, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage': 0.0437281, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage with power gating': 0.024925, 'Renaming Unit/Free List/Area': 0.0414755, 'Renaming Unit/Free List/Gate Leakage': 4.15911e-05, 'Renaming Unit/Free List/Peak Dynamic': 0.0401324, 'Renaming Unit/Free List/Runtime Dynamic': 0.0240118, 'Renaming Unit/Free List/Subthreshold Leakage': 0.000670426, 'Renaming Unit/Free List/Subthreshold Leakage with power gating': 0.000377987, 'Renaming Unit/Gate Leakage': 0.00863632, 'Renaming Unit/Int Front End RAT/Area': 0.114751, 'Renaming Unit/Int Front End RAT/Gate Leakage': 0.00038343, 'Renaming Unit/Int Front End RAT/Peak Dynamic': 0.86945, 'Renaming Unit/Int Front End RAT/Runtime Dynamic': 0.163866, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage': 0.00611897, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00348781, 'Renaming Unit/Peak Dynamic': 4.56169, 'Renaming Unit/Runtime Dynamic': 0.750006, 'Renaming Unit/Subthreshold Leakage': 0.070483, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0362779, 'Runtime Dynamic': 6.73993, 'Subthreshold Leakage': 6.21877, 'Subthreshold Leakage with power gating': 2.58311}, {'Area': 32.6082, 'Execution Unit/Area': 8.2042, 'Execution Unit/Complex ALUs/Area': 0.235435, 'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646, 'Execution Unit/Complex ALUs/Peak Dynamic': 0.0955837, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.277764, 'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111, 'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163, 'Execution Unit/Floating Point Units/Area': 4.6585, 'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156, 'Execution Unit/Floating Point Units/Peak Dynamic': 0.853885, 'Execution Unit/Floating Point Units/Runtime Dynamic': 0.679669, 'Execution Unit/Floating Point Units/Subthreshold Leakage': 0.994829, 'Execution Unit/Floating Point Units/Subthreshold Leakage with power gating': 0.373061, 'Execution Unit/Gate Leakage': 0.122718, 'Execution Unit/Instruction Scheduler/Area': 2.17927, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Area': 0.328073, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Gate Leakage': 0.00115349, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Peak Dynamic': 1.20978, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Runtime Dynamic': 0.337724, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage': 0.017004, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage with power gating': 0.00962066, 'Execution Unit/Instruction Scheduler/Gate Leakage': 0.00730101, 'Execution Unit/Instruction Scheduler/Instruction Window/Area': 1.00996, 'Execution Unit/Instruction Scheduler/Instruction Window/Gate Leakage': 0.00529112, 'Execution Unit/Instruction Scheduler/Instruction Window/Peak Dynamic': 2.07911, 'Execution Unit/Instruction Scheduler/Instruction Window/Runtime Dynamic': 0.584816, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage': 0.0800117, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage with power gating': 0.0455351, 'Execution Unit/Instruction Scheduler/Peak Dynamic': 4.84781, 'Execution Unit/Instruction Scheduler/ROB/Area': 0.841232, 'Execution Unit/Instruction Scheduler/ROB/Gate Leakage': 0.000856399, 'Execution Unit/Instruction Scheduler/ROB/Peak Dynamic': 1.55892, 'Execution Unit/Instruction Scheduler/ROB/Runtime Dynamic': 0.377927, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage': 0.0178624, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage with power gating': 0.00897339, 'Execution Unit/Instruction Scheduler/Runtime Dynamic': 1.30047, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage': 0.114878, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage with power gating': 0.0641291, 'Execution Unit/Integer ALUs/Area': 0.47087, 'Execution Unit/Integer ALUs/Gate Leakage': 0.0265291, 'Execution Unit/Integer ALUs/Peak Dynamic': 0.202914, 'Execution Unit/Integer ALUs/Runtime Dynamic': 0.319906, 'Execution Unit/Integer ALUs/Subthreshold Leakage': 0.40222, 'Execution Unit/Integer ALUs/Subthreshold Leakage with power gating': 0.150833, 'Execution Unit/Peak Dynamic': 6.59314, 'Execution Unit/Register Files/Area': 0.570804, 'Execution Unit/Register Files/Floating Point RF/Area': 0.208131, 'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788, 'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 0.161317, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.0122428, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage': 0.00399698, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage with power gating': 0.00176968, 'Execution Unit/Register Files/Gate Leakage': 0.000622708, 'Execution Unit/Register Files/Integer RF/Area': 0.362673, 'Execution Unit/Register Files/Integer RF/Gate Leakage': 0.00038992, 'Execution Unit/Register Files/Integer RF/Peak Dynamic': 0.110585, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0905428, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage': 0.00614175, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage with power gating': 0.00246675, 'Execution Unit/Register Files/Peak Dynamic': 0.271902, 'Execution Unit/Register Files/Runtime Dynamic': 0.102786, 'Execution Unit/Register Files/Subthreshold Leakage': 0.0101387, 'Execution Unit/Register Files/Subthreshold Leakage with power gating': 0.00423643, 'Execution Unit/Results Broadcast Bus/Area Overhead': 0.0442632, 'Execution Unit/Results Broadcast Bus/Gate Leakage': 0.00607074, 'Execution Unit/Results Broadcast Bus/Peak Dynamic': 0.293405, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.836102, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.0920413, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0345155, 'Execution Unit/Runtime Dynamic': 3.5167, 'Execution Unit/Subthreshold Leakage': 1.83518, 'Execution Unit/Subthreshold Leakage with power gating': 0.709678, 'Gate Leakage': 0.372997, 'Instruction Fetch Unit/Area': 5.86007, 'Instruction Fetch Unit/Branch Predictor/Area': 0.138516, 'Instruction Fetch Unit/Branch Predictor/Chooser/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Chooser/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Chooser/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Chooser/Runtime Dynamic': 0.000782126, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/Gate Leakage': 0.000757657, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Runtime Dynamic': 0.000782126, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Area': 0.0257064, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Gate Leakage': 0.000154548, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Peak Dynamic': 0.0142575, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Runtime Dynamic': 0.000676533, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage': 0.00384344, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage with power gating': 0.00198631, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Area': 0.0151917, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Gate Leakage': 8.00196e-05, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Peak Dynamic': 0.00527447, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Runtime Dynamic': 0.000259327, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage': 0.00181347, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage with power gating': 0.000957045, 'Instruction Fetch Unit/Branch Predictor/Peak Dynamic': 0.0597838, 'Instruction Fetch Unit/Branch Predictor/RAS/Area': 0.0105732, 'Instruction Fetch Unit/Branch Predictor/RAS/Gate Leakage': 4.63858e-05, 'Instruction Fetch Unit/Branch Predictor/RAS/Peak Dynamic': 0.0117602, 'Instruction Fetch Unit/Branch Predictor/RAS/Runtime Dynamic': 0.00130065, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage': 0.000932505, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage with power gating': 0.000494733, 'Instruction Fetch Unit/Branch Predictor/Runtime Dynamic': 0.00354144, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage': 0.0199703, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage with power gating': 0.0103282, 'Instruction Fetch Unit/Branch Target Buffer/Area': 0.64954, 'Instruction Fetch Unit/Branch Target Buffer/Gate Leakage': 0.00272758, 'Instruction Fetch Unit/Branch Target Buffer/Peak Dynamic': 0.177867, 'Instruction Fetch Unit/Branch Target Buffer/Runtime Dynamic': 0.0076668, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage': 0.0811682, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage with power gating': 0.0435357, 'Instruction Fetch Unit/Gate Leakage': 0.0590479, 'Instruction Fetch Unit/Instruction Buffer/Area': 0.0226323, 'Instruction Fetch Unit/Instruction Buffer/Gate Leakage': 6.83558e-05, 'Instruction Fetch Unit/Instruction Buffer/Peak Dynamic': 0.606827, 'Instruction Fetch Unit/Instruction Buffer/Runtime Dynamic': 0.0870411, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682, 'Instruction Fetch Unit/Instruction Cache/Area': 3.14635, 'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931, 'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 5.53656, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.212864, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage': 0.367022, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage with power gating': 0.180386, 'Instruction Fetch Unit/Instruction Decoder/Area': 1.85799, 'Instruction Fetch Unit/Instruction Decoder/Gate Leakage': 0.0222493, 'Instruction Fetch Unit/Instruction Decoder/Peak Dynamic': 1.37404, 'Instruction Fetch Unit/Instruction Decoder/Runtime Dynamic': 0.295631, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104, 'Instruction Fetch Unit/Peak Dynamic': 8.02789, 'Instruction Fetch Unit/Runtime Dynamic': 0.606744, 'Instruction Fetch Unit/Subthreshold Leakage': 0.932587, 'Instruction Fetch Unit/Subthreshold Leakage with power gating': 0.408542, 'L2/Area': 4.53318, 'L2/Gate Leakage': 0.015464, 'L2/Peak Dynamic': 0.152816, 'L2/Runtime Dynamic': 0.036542, 'L2/Subthreshold Leakage': 0.834142, 'L2/Subthreshold Leakage with power gating': 0.401066, 'Load Store Unit/Area': 8.80969, 'Load Store Unit/Data Cache/Area': 6.84535, 'Load Store Unit/Data Cache/Gate Leakage': 0.0279261, 'Load Store Unit/Data Cache/Peak Dynamic': 3.73104, 'Load Store Unit/Data Cache/Runtime Dynamic': 1.25059, 'Load Store Unit/Data Cache/Subthreshold Leakage': 0.527675, 'Load Store Unit/Data Cache/Subthreshold Leakage with power gating': 0.25085, 'Load Store Unit/Gate Leakage': 0.0351387, 'Load Store Unit/LoadQ/Area': 0.0836782, 'Load Store Unit/LoadQ/Gate Leakage': 0.00059896, 'Load Store Unit/LoadQ/Peak Dynamic': 0.0806842, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0806842, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 4.1136, 'Load Store Unit/Runtime Dynamic': 1.72918, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.198953, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.397907, 'Load Store Unit/StoreQ/Subthreshold Leakage': 0.0345621, 'Load Store Unit/StoreQ/Subthreshold Leakage with power gating': 0.0197004, 'Load Store Unit/Subthreshold Leakage': 0.591622, 'Load Store Unit/Subthreshold Leakage with power gating': 0.283406, 'Memory Management Unit/Area': 0.434579, 'Memory Management Unit/Dtlb/Area': 0.0879726, 'Memory Management Unit/Dtlb/Gate Leakage': 0.00088729, 'Memory Management Unit/Dtlb/Peak Dynamic': 0.0706092, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0728902, 'Memory Management Unit/Dtlb/Subthreshold Leakage': 0.0155699, 'Memory Management Unit/Dtlb/Subthreshold Leakage with power gating': 0.00887485, 'Memory Management Unit/Gate Leakage': 0.00813591, 'Memory Management Unit/Itlb/Area': 0.301552, 'Memory Management Unit/Itlb/Gate Leakage': 0.00393464, 'Memory Management Unit/Itlb/Peak Dynamic': 0.344243, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.0346814, 'Memory Management Unit/Itlb/Subthreshold Leakage': 0.0413758, 'Memory Management Unit/Itlb/Subthreshold Leakage with power gating': 0.0235842, 'Memory Management Unit/Peak Dynamic': 0.624811, 'Memory Management Unit/Runtime Dynamic': 0.107572, 'Memory Management Unit/Subthreshold Leakage': 0.0769113, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0399462, 'Peak Dynamic': 24.0739, 'Renaming Unit/Area': 0.369768, 'Renaming Unit/FP Front End RAT/Area': 0.168486, 'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00489731, 'Renaming Unit/FP Front End RAT/Peak Dynamic': 3.33511, 'Renaming Unit/FP Front End RAT/Runtime Dynamic': 0.562798, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage': 0.0437281, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage with power gating': 0.024925, 'Renaming Unit/Free List/Area': 0.0414755, 'Renaming Unit/Free List/Gate Leakage': 4.15911e-05, 'Renaming Unit/Free List/Peak Dynamic': 0.0401324, 'Renaming Unit/Free List/Runtime Dynamic': 0.0240417, 'Renaming Unit/Free List/Subthreshold Leakage': 0.000670426, 'Renaming Unit/Free List/Subthreshold Leakage with power gating': 0.000377987, 'Renaming Unit/Gate Leakage': 0.00863632, 'Renaming Unit/Int Front End RAT/Area': 0.114751, 'Renaming Unit/Int Front End RAT/Gate Leakage': 0.00038343, 'Renaming Unit/Int Front End RAT/Peak Dynamic': 0.86945, 'Renaming Unit/Int Front End RAT/Runtime Dynamic': 0.164074, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage': 0.00611897, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00348781, 'Renaming Unit/Peak Dynamic': 4.56169, 'Renaming Unit/Runtime Dynamic': 0.750914, 'Renaming Unit/Subthreshold Leakage': 0.070483, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0362779, 'Runtime Dynamic': 6.74765, 'Subthreshold Leakage': 6.21877, 'Subthreshold Leakage with power gating': 2.58311}], 'DRAM': {'Area': 0, 'Gate Leakage': 0, 'Peak Dynamic': 3.72117540729286, 'Runtime Dynamic': 3.72117540729286, 'Subthreshold Leakage': 4.252, 'Subthreshold Leakage with power gating': 4.252}, 'L3': [{'Area': 61.9075, 'Gate Leakage': 0.0484137, 'Peak Dynamic': 0.569896, 'Runtime Dynamic': 0.377251, 'Subthreshold Leakage': 6.80085, 'Subthreshold Leakage with power gating': 3.32364}], 'Processor': {'Area': 128.211, 'Gate Leakage': 0.799822, 'Peak Dynamic': 48.7031, 'Peak Power': 68.7978, 'Runtime Dynamic': 13.8648, 'Subthreshold Leakage': 19.2949, 'Subthreshold Leakage with power gating': 8.76959, 'Total Cores/Area': 65.2164, 'Total Cores/Gate Leakage': 0.745993, 'Total Cores/Peak Dynamic': 48.1332, 'Total Cores/Runtime Dynamic': 13.4876, 'Total Cores/Subthreshold Leakage': 12.4375, 'Total Cores/Subthreshold Leakage with power gating': 5.16621, 'Total L3s/Area': 61.9075, 'Total L3s/Gate Leakage': 0.0484137, 'Total L3s/Peak Dynamic': 0.569896, 'Total L3s/Runtime Dynamic': 0.377251, 'Total L3s/Subthreshold Leakage': 6.80085, 'Total L3s/Subthreshold Leakage with power gating': 3.32364, 'Total Leakage': 20.0947, 'Total NoCs/Area': 1.08752, 'Total NoCs/Gate Leakage': 0.00541455, 'Total NoCs/Peak Dynamic': 0.0, 'Total NoCs/Runtime Dynamic': 0.0, 'Total NoCs/Subthreshold Leakage': 0.0564625, 'Total NoCs/Subthreshold Leakage with power gating': 0.0211734}}
73.59751
124
0.677398
4,172
35,474
5.754075
0.090364
0.126635
0.109973
0.090977
0.932975
0.927227
0.919062
0.887778
0.872698
0.867033
0
0.133584
0.227857
35,474
482
125
73.59751
0.742835
0
0
0.659751
0
0
0.650909
0.046512
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
0
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
308daa2e30e1d8b40f5ee398ffef986b33d17ed9
55,355
py
Python
hotkeynet/projects/warmane/hkn_script/mode/raid.py
Mario-Kart-Felix/hotkeynet-project
81b218e86ef85d69ea0e639937f765c7218c2686
[ "MIT" ]
2
2021-07-25T11:26:23.000Z
2022-02-02T20:03:20.000Z
hotkeynet/projects/warmane/hkn_script/mode/raid.py
Mario-Kart-Felix/hotkeynet-project
81b218e86ef85d69ea0e639937f765c7218c2686
[ "MIT" ]
null
null
null
hotkeynet/projects/warmane/hkn_script/mode/raid.py
Mario-Kart-Felix/hotkeynet-project
81b218e86ef85d69ea0e639937f765c7218c2686
[ "MIT" ]
2
2021-03-04T07:20:30.000Z
2021-07-25T11:26:25.000Z
# -*- coding: utf-8 -*- from ...config import Config, ActiveCharacterConfig from ...constant.characters import CharacterFactory from ...constant.talent_category_association import T, TC from .....script import Script, Hotkey, SendLabel, Key from ... import act from ..... import keyname, utils from .._config_and_script import script class Mode: @classmethod def set_mode_solo_raid_10p_batlefury_luxiaofeng_core_team(cls, config: Config): config.game_client_config.use_1600_900_resolution() config.game_client_config.use_n_windows(10) config.game_client_config.use_credential_list_luxiaofeng() config.toggle_window_config.key1_to_25_window_index = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] config.toggle_window_config.round_robin_window_index = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] config.active_character_config = ActiveCharacterConfig( active_characters=[ CharacterFactory.make_char_fatmulti1_batlefury_pve_protect_pala().evolve(is_tank1=True, is_dr_pala1=True), CharacterFactory.make_char_fatmulti2_quentin_pve_elemental_shaman().evolve(), CharacterFactory.make_char_fatmulti3_opiitou_pve_balance_druid().evolve(), CharacterFactory.make_char_fatmulti4_swagsonic_pve_arcane_mage().evolve(), CharacterFactory.make_char_fatmulti5_kangliu_pve_shadow_priest().evolve(), CharacterFactory.make_char_fitsheep_kindhearted_pve_demonology_warlock().evolve(), CharacterFactory.make_char_fatmulti6_kapacuk_pve_marksman_hunter().evolve(), CharacterFactory.make_char_fatmulti8_bunnysisters_pve_resto_druid().evolve(), CharacterFactory.make_char_fatmulti9_glowyy_pve_holy_pala().evolve(is_dr_pala2=True), CharacterFactory.make_char_fatmulti10_luxiaofeng_pve_blood_tank_dk().evolve(is_tank2=True), ] ) config.active_character_config.set_leader1_window_index(1) config.active_character_config.set_leader2_window_index(10) def post_hook(config: Config, script: Script): print("set_mode_solo_raid_10p_batlefury_flydps_core_team") config.post_hook = post_hook @classmethod def post_hook_set_mode_solo_raid_10p_batlefury_flydps_core_team(cls, config: Config, script: Script): pass @classmethod def set_mode_solo_raid_22p_batlefury_flydps_4_druid_4_priest_4_shaman_core_team(cls, config: Config): # config.game_client_config.use_1600_900_resolution() config.game_client_config.use_1176_664_resolution() config.game_client_config.use_n_windows(22) config.game_client_config.use_credential_list_default() config.toggle_window_config.key1_to_25_window_index = list(range(1, 22 + 1)) config.toggle_window_config.round_robin_window_index = list(range(1, 22 + 1)) config.active_character_config = ActiveCharacterConfig( active_characters=[ CharacterFactory.make_char_fatmulti1_batlefury_pve_protect_pala().evolve(is_tank1=True, is_dr_pala1=True), CharacterFactory.make_char_fatmulti2_quentin_pve_elemental_shaman().evolve(), CharacterFactory.make_char_fatmulti3_opiitou_pve_balance_druid().evolve(), CharacterFactory.make_char_fatmulti4_swagsonic_pve_arcane_mage().evolve(), CharacterFactory.make_char_fatmulti5_kangliu_pve_shadow_priest().evolve(), CharacterFactory.make_char_fitsheep_kindhearted_pve_demonology_warlock().evolve(), CharacterFactory.make_char_fatmulti6_kapacuk_pve_marksman_hunter().evolve(), CharacterFactory.make_char_fatmulti8_bunnysisters_pve_resto_druid().evolve(), # CharacterFactory.make_char_fatmulti9_glowyy_pve_holy_pala().evolve(is_dr_pala2=True), CharacterFactory.make_char_fatmulti9_glowyy_pve_protect_pala().evolve(is_dr_pala2=True), # CharacterFactory.make_char_monkey130_flydps_pve_blood_tank_dk().evolve(is_tank2=True), # CharacterFactory.make_char_makun7551_laoshou_retri_paladin().evolve(), CharacterFactory.make_char_makun7551_ganjj_pve_blood_tank_dk().evolve(), CharacterFactory.make_char_fatmulti11_litgugua_pve_balance_druid(), CharacterFactory.make_char_fatmulti12_litgugub_pve_balance_druid(), CharacterFactory.make_char_fatmulti13_litguguc_pve_balance_druid(), CharacterFactory.make_char_fatmulti14_litgugud_pvp_resto_druid(), CharacterFactory.make_char_fatmulti19_lgmsi_pve_shadow_priest(), CharacterFactory.make_char_fatmulti20_lgmsj_pve_shadow_priest(), CharacterFactory.make_char_fatmulti21_lgmsk_pve_shadow_priest(), CharacterFactory.make_char_fatmulti22_lgmsl_pve_shadow_priest(), # CharacterFactory.make_char_fatmulti23_lgsmm_pve_elemental_shaman(), # CharacterFactory.make_char_fatmulti24_lgsmn_pve_elemental_shaman(), # CharacterFactory.make_char_fatmulti25_lgsmo_pve_elemental_shaman(), # CharacterFactory.make_char_fatmulti26_lgsmp_pve_elemental_shaman(), CharacterFactory.make_char_fatmulti23_lgsmm_pve_resto_shaman(), CharacterFactory.make_char_fatmulti24_lgsmn_pve_resto_shaman(), CharacterFactory.make_char_fatmulti25_lgsmo_pve_resto_shaman(), CharacterFactory.make_char_fatmulti26_lgsmp_pve_resto_shaman(), ] ) config.active_character_config.set_leader1_window_index(1) config.active_character_config.set_leader2_window_index(10) @classmethod def set_mode_solo_raid_10p_naxx10_team2_batlefury_litgugu_abcd(cls, config: Config): config.game_client_config.use_1600_900_resolution() # config.game_client_config.use_1176_664_resolution() config.game_client_config.use_n_windows(22) config.game_client_config.use_credential_list_default() config.toggle_window_config.key1_to_25_window_index = list(range(1, 22 + 1)) config.toggle_window_config.round_robin_window_index = list(range(1, 22 + 1)) config.active_character_config = ActiveCharacterConfig( active_characters=[ CharacterFactory.make_char_fatmulti1_batlefury_pve_protect_pala().evolve(is_tank1=True, is_dr_pala1=True), CharacterFactory.make_char_fatmulti2_litgoatssb_pve_demo_warlock().evolve(), CharacterFactory.make_char_fatmulti3_opiitou_pve_balance_druid().evolve(), CharacterFactory.make_char_fatmulti4_swagsonic_pve_arcane_mage().evolve(), CharacterFactory.make_char_fatmulti5_litgoatsse_pve_demo_warlock().evolve(), CharacterFactory.make_char_fatmulti11_litgugua_pve_balance_druid().evolve(), CharacterFactory.make_char_fatmulti12_litgugub_pve_balance_druid().evolve(), CharacterFactory.make_char_fatmulti13_litguguc_pve_balance_druid().evolve(), CharacterFactory.make_char_fatmulti14_litgugud_pvp_resto_druid().evolve(is_tank2=True), CharacterFactory.make_char_makun7551_ganjj_pve_blood_tank_dk(), ] ) config.active_character_config.set_leader1_window_index(1) config.active_character_config.set_leader2_window_index(10) @classmethod def set_mode_solo_raid_10p_naxx10_team3_glowyy_litgoatss_abcd(cls, config: Config): config.game_client_config.use_1600_900_resolution() # config.game_client_config.use_1176_664_resolution() config.game_client_config.use_n_windows(22) config.game_client_config.use_credential_list_default() config.toggle_window_config.key1_to_25_window_index = list(range(1, 22 + 1)) config.active_character_config = ActiveCharacterConfig( active_characters=[ CharacterFactory.make_char_fatmulti1_litgoatssa_pve_demo_warlock().evolve(), CharacterFactory.make_char_fatmulti2_quentin_pve_elemental_shaman().evolve(), CharacterFactory.make_char_fatmulti3_litgoatssc_pve_demo_warlock().evolve(), CharacterFactory.make_char_fatmulti4_litgoatssd_pve_demo_warlock().evolve(), CharacterFactory.make_char_fatmulti5_kangliu_pve_shadow_priest().evolve(), CharacterFactory.make_char_fitsheep_kindhearted_pve_demonology_warlock().evolve(), CharacterFactory.make_char_fatmulti6_kapacuk_pve_marksman_hunter().evolve(), CharacterFactory.make_char_fatmulti8_bunnysisters_pve_resto_druid().evolve(), CharacterFactory.make_char_fatmulti9_glowyy_pve_protect_pala().evolve(is_tank1=True, is_dr_pala1=True), CharacterFactory.make_char_makun7551_laoshou_retri_paladin().evolve(), ] ) config.toggle_window_config.round_robin_window_index = list(range(1, 22 + 1)) config.active_character_config.set_leader1_window_index(9) config.active_character_config.set_leader2_window_index(9) @classmethod def set_mode_solo_raid_10p_naxx10_team4_lgms(cls, config: Config): config.game_client_config.use_1600_900_resolution() # config.game_client_config.use_1176_664_resolution() config.game_client_config.use_n_windows(22) config.game_client_config.use_credential_list_default() config.toggle_window_config.key1_to_25_window_index = list(range(1, 22 + 1)) config.active_character_config = ActiveCharacterConfig( active_characters=[ CharacterFactory.make_char_monkey130_flydps_pve_blood_tank_dk().evolve(), CharacterFactory.make_char_fatmulti19_lgmsi_pve_shadow_priest().evolve(), CharacterFactory.make_char_fatmulti20_lgmsj_pve_shadow_priest().evolve(), CharacterFactory.make_char_fatmulti21_lgmsk_pve_shadow_priest().evolve(), CharacterFactory.make_char_fatmulti22_lgmsl_pve_shadow_priest().evolve(), ] ) config.toggle_window_config.round_robin_window_index = list(range(1, 22 + 1)) config.active_character_config.set_leader1_window_index(10) config.active_character_config.set_leader2_window_index(10) @classmethod def set_mode_solo_raid_10p_naxx10_team5_lgsm(cls, config: Config): config.game_client_config.use_1600_900_resolution() # config.game_client_config.use_1176_664_resolution() config.game_client_config.use_n_windows(22) config.game_client_config.use_credential_list_default() config.toggle_window_config.key1_to_25_window_index = list(range(1, 22 + 1)) config.active_character_config = ActiveCharacterConfig( active_characters=[ CharacterFactory.make_char_monkey130_flydps_pve_blood_tank_dk().evolve(), CharacterFactory.make_char_fatmulti23_lgsmm_pve_elemental_shaman().evolve(), CharacterFactory.make_char_fatmulti24_lgsmn_pve_elemental_shaman().evolve(), CharacterFactory.make_char_fatmulti25_lgsmo_pve_elemental_shaman().evolve(), CharacterFactory.make_char_fatmulti26_lgsmp_pve_elemental_shaman().evolve(), ] ) config.toggle_window_config.round_robin_window_index = list(range(1, 22 + 1)) config.active_character_config.set_leader1_window_index(10) config.active_character_config.set_leader2_window_index(10) @classmethod def set_mode_solo_raid_10p_naxx10_team6_temp(cls, config: Config): config.game_client_config.use_1600_900_resolution() # config.game_client_config.use_1176_664_resolution() config.game_client_config.use_n_windows(22) config.game_client_config.use_credential_list_default() config.toggle_window_config.key1_to_25_window_index = list(range(1, 22 + 1)) config.active_character_config = ActiveCharacterConfig( active_characters=[ # 1 - 5 # CharacterFactory.make_char_fatmulti1_batlefury_pve_protect_pala().evolve(), # CharacterFactory.make_char_fatmulti1_batlefury_pve_retri_pala().evolve(), # CharacterFactory.make_char_fatmulti1_litgoatssa_pve_demo_warlock().evolve(), CharacterFactory.make_char_fatmulti1_litgoatdka_pve_blood_dk().evolve(), # CharacterFactory.make_char_fatmulti1_litgoatdka_pvp_frost_dk().evolve(), # # CharacterFactory.make_char_fatmulti2_quentin_pve_elemental_shaman().evolve(), # CharacterFactory.make_char_fatmulti2_quentin_pve_resto_shaman().evolve(), # CharacterFactory.make_char_fatmulti2_litgoatssb_pve_demo_warlock().evolve(), CharacterFactory.make_char_fatmulti2_litgoatdkb_pve_unholy_dk().evolve(), # CharacterFactory.make_char_fatmulti2_litgoatdkb_pvp_frost_dk().evolve(), # # CharacterFactory.make_char_fatmulti3_opiitou_pve_balance_druid().evolve(), # CharacterFactory.make_char_fatmulti3_opiitou_pve_bear_druid().evolve(), # CharacterFactory.make_char_fatmulti3_litgoatssc_pve_demo_warlock().evolve(), CharacterFactory.make_char_fatmulti3_litgoatdkc_pve_unholy_dk().evolve(), # CharacterFactory.make_char_fatmulti3_litgoatdkc_pvp_frost_dk().evolve(), # # CharacterFactory.make_char_fatmulti4_swagsonic_pve_arcane_mage().evolve(), # CharacterFactory.make_char_fatmulti4_swagsonic_pve_fire_mage().evolve(), # CharacterFactory.make_char_fatmulti4_litgoatssd_pve_demo_warlock().evolve(), CharacterFactory.make_char_fatmulti4_litgoatdkd_pve_unholy_dk().evolve(), # CharacterFactory.make_char_fatmulti4_litgoatdkd_pvp_frost_dk().evolve(), # # CharacterFactory.make_char_fatmulti5_kangliu_pve_shadow_priest().evolve(), # CharacterFactory.make_char_fatmulti5_kangliu_pve_disco_priest().evolve(), # CharacterFactory.make_char_fatmulti5_litgoatsse_pve_demo_warlock().evolve(), CharacterFactory.make_char_fatmulti5_litgoatdke_pve_unholy_dk().evolve(), # CharacterFactory.make_char_fatmulti5_litgoatdke_pvp_frost_dk().evolve(), # 6 - 10 # CharacterFactory.make_char_fitsheep_kindhearted_pve_demonology_warlock().evolve(), # CharacterFactory.make_char_fitsheep_kindhearted_pvp_destruction_warlock().evolve(), # CharacterFactory.make_char_fitsheep_bordercollie_pve_shadow_priest().evolve(), # CharacterFactory.make_char_fitsheep_bordercollie_pve_disco_priest().evolve(), # # CharacterFactory.make_char_fatmulti6_kapacuk_pve_marksman_hunter().evolve(), # CharacterFactory.make_char_fatmulti6_kapacuk_pvp_beast_hunter().evolve(), # # CharacterFactory.make_char_fatmulti8_bunnysisters_pve_resto_druid().evolve(), # CharacterFactory.make_char_fatmulti8_bunnysisters_pve_balance_druid().evolve(), # # CharacterFactory.make_char_fatmulti9_glowyy_pve_holy_pala().evolve(), # CharacterFactory.make_char_fatmulti9_glowyy_pve_protect_pala().evolve(), # CharacterFactory.make_char_monkey130_flydps_pve_blood_tank_dk().evolve(), # # CharacterFactory.make_char_makun7551_ganjj_pve_blood_tank_dk().evolve(), # CharacterFactory.make_char_makun7551_laoshou_retri_paladin().evolve(), # 11 - 14 # CharacterFactory.make_char_fatmulti11_litgugua_pve_balance_druid().evolve(), # CharacterFactory.make_char_fatmulti11_litgugua_pvp_resto_druid().evolve(), # # CharacterFactory.make_char_fatmulti12_litgugub_pve_balance_druid().evolve(), # CharacterFactory.make_char_fatmulti12_litgugub_pvp_resto_druid().evolve(), # # CharacterFactory.make_char_fatmulti13_litguguc_pve_balance_druid().evolve(), # CharacterFactory.make_char_fatmulti13_litguguc_pvp_resto_druid().evolve(), # # CharacterFactory.make_char_fatmulti14_litgugud_pve_balance_druid().evolve(), # CharacterFactory.make_char_fatmulti14_litgugud_pvp_resto_druid().evolve(), # 15 - 18 # CharacterFactory.make_char_fatmulti19_lgmsi_pve_shadow_priest().evolve(), # CharacterFactory.make_char_fatmulti20_lgmsj_pve_shadow_priest().evolve(), # CharacterFactory.make_char_fatmulti21_lgmsk_pve_shadow_priest().evolve(), # CharacterFactory.make_char_fatmulti22_lgmsl_pve_shadow_priest().evolve(), # 19 - 22 # CharacterFactory.make_char_fatmulti23_lgsmm_pve_elemental_shaman().evolve(), # CharacterFactory.make_char_fatmulti24_lgsmn_pve_elemental_shaman().evolve(), # CharacterFactory.make_char_fatmulti25_lgsmo_pve_elemental_shaman().evolve(), # CharacterFactory.make_char_fatmulti26_lgsmp_pve_elemental_shaman().evolve(), ] ) config.toggle_window_config.round_robin_window_index = list(range(1, 22 + 1)) config.active_character_config.set_leader1_window_index(10) config.active_character_config.set_leader2_window_index(10) @classmethod def set_mode_solo_raid_25p_naxx25_full_run(cls, config: Config): # config.game_client_config.use_1600_900_resolution() config.game_client_config.use_1176_664_resolution() config.game_client_config.use_n_windows(22) config.game_client_config.use_credential_list_default() config.toggle_window_config.key1_to_25_window_index = list(range(1, 22 + 1)) config.active_character_config = ActiveCharacterConfig( active_characters=[ # 1 - 5 CharacterFactory.make_char_fatmulti1_batlefury_pve_protect_pala().evolve(is_tank1=True), # CharacterFactory.make_char_fatmulti1_batlefury_pve_retri_pala().evolve(), # CharacterFactory.make_char_fatmulti1_litgoatssa_pve_demo_warlock().evolve(), # CharacterFactory.make_char_fatmulti1_litgoatdka_pve_blood_dk().evolve(), # CharacterFactory.make_char_fatmulti1_litgoatdka_pvp_frost_dk().evolve(), # CharacterFactory.make_char_fatmulti2_quentin_pve_elemental_shaman().evolve(), # CharacterFactory.make_char_fatmulti2_quentin_pve_resto_shaman().evolve(), # CharacterFactory.make_char_fatmulti2_litgoatssb_pve_demo_warlock().evolve(), # CharacterFactory.make_char_fatmulti2_litgoatdkb_pve_unholy_dk().evolve(), # CharacterFactory.make_char_fatmulti2_litgoatdkb_pvp_frost_dk().evolve(), # CharacterFactory.make_char_fatmulti3_opiitou_pve_balance_druid().evolve(), # CharacterFactory.make_char_fatmulti3_opiitou_pve_bear_druid().evolve(), # CharacterFactory.make_char_fatmulti3_litgoatssc_pve_demo_warlock().evolve(), # CharacterFactory.make_char_fatmulti3_litgoatdkc_pve_unholy_dk().evolve(), # CharacterFactory.make_char_fatmulti3_litgoatdkc_pvp_frost_dk().evolve(), # CharacterFactory.make_char_fatmulti4_swagsonic_pve_arcane_mage().evolve(), # CharacterFactory.make_char_fatmulti4_swagsonic_pve_fire_mage().evolve(), # CharacterFactory.make_char_fatmulti4_litgoatssd_pve_demo_warlock().evolve(), # CharacterFactory.make_char_fatmulti4_litgoatdkd_pve_unholy_dk().evolve(), # CharacterFactory.make_char_fatmulti4_litgoatdkd_pvp_frost_dk().evolve(), # CharacterFactory.make_char_fatmulti5_kangliu_pve_shadow_priest().evolve(), # CharacterFactory.make_char_fatmulti5_kangliu_pve_disco_priest().evolve(), # CharacterFactory.make_char_fatmulti5_litgoatsse_pve_demo_warlock().evolve(), # CharacterFactory.make_char_fatmulti5_litgoatdke_pve_unholy_dk().evolve(), # CharacterFactory.make_char_fatmulti5_litgoatdke_pvp_frost_dk().evolve(), # 6 - 10 CharacterFactory.make_char_fitsheep_kindhearted_pve_demonology_warlock().evolve(), # CharacterFactory.make_char_fitsheep_kindhearted_pvp_destruction_warlock().evolve(), # CharacterFactory.make_char_fitsheep_bordercollie_pve_shadow_priest().evolve(), # CharacterFactory.make_char_fitsheep_bordercollie_pve_disco_priest().evolve(), # CharacterFactory.make_char_fatmulti6_kapacuk_pve_marksman_hunter().evolve(), # CharacterFactory.make_char_fatmulti6_kapacuk_pvp_beast_hunter().evolve(), # CharacterFactory.make_char_fatmulti8_bunnysisters_pve_resto_druid().evolve(), # CharacterFactory.make_char_fatmulti8_bunnysisters_pve_balance_druid().evolve(), # CharacterFactory.make_char_fatmulti9_glowyy_pve_holy_pala().evolve(), # CharacterFactory.make_char_fatmulti9_glowyy_pve_protect_pala().evolve(), # # CharacterFactory.make_char_monkey130_flydps_pve_blood_tank_dk().evolve(), CharacterFactory.make_char_fatmulti10_luxiaofeng_pve_blood_tank_dk().evolve(is_tank2=True), # # CharacterFactory.make_char_makun7551_ganjj_pve_blood_tank_dk().evolve(), # CharacterFactory.make_char_makun7551_laoshou_retri_paladin().evolve(), # 11 - 14 # CharacterFactory.make_char_fatmulti11_litgugua_pve_balance_druid().evolve(), # CharacterFactory.make_char_fatmulti11_litgugua_pvp_resto_druid().evolve(), # # CharacterFactory.make_char_fatmulti12_litgugub_pve_balance_druid().evolve(), # CharacterFactory.make_char_fatmulti12_litgugub_pvp_resto_druid().evolve(), # # CharacterFactory.make_char_fatmulti13_litguguc_pve_balance_druid().evolve(), # CharacterFactory.make_char_fatmulti13_litguguc_pvp_resto_druid().evolve(), # # CharacterFactory.make_char_fatmulti14_litgugud_pve_balance_druid().evolve(), # CharacterFactory.make_char_fatmulti14_litgugud_pvp_resto_druid().evolve(), CharacterFactory.make_char_fatmulti15_litgugue_pvp_balance_druid().evolve(), CharacterFactory.make_char_fatmulti16_litguguf_pvp_balance_druid().evolve(), CharacterFactory.make_char_fatmulti17_litgugug_pvp_balance_druid().evolve(), CharacterFactory.make_char_fatmulti18_litguguh_pvp_resto_druid().evolve(), # Healer # 15 - 18 CharacterFactory.make_char_fatmulti19_lgmsi_pve_shadow_priest().evolve(), CharacterFactory.make_char_fatmulti20_lgmsj_pve_shadow_priest().evolve(), CharacterFactory.make_char_fatmulti21_lgmsk_pve_shadow_priest().evolve(), CharacterFactory.make_char_fatmulti22_lgmsl_pve_shadow_priest().evolve(), # 19 - 22 CharacterFactory.make_char_fatmulti23_lgsmm_pve_elemental_shaman().evolve(), CharacterFactory.make_char_fatmulti24_lgsmn_pve_elemental_shaman().evolve(), # CharacterFactory.make_char_fatmulti25_lgsmo_pve_elemental_shaman().evolve(), CharacterFactory.make_char_fatmulti25_lgsmo_pve_resto_shaman().evolve(), # CharacterFactory.make_char_fatmulti26_lgsmp_pve_elemental_shaman().evolve(), CharacterFactory.make_char_fatmulti26_lgsmp_pve_resto_shaman().evolve(), ] ) config.toggle_window_config.round_robin_window_index = list(range(1, 22 + 1)) config.active_character_config.set_leader1_window_index(1) config.active_character_config.set_leader2_window_index(10) #--- UDR @classmethod def set_mode_solo_raid_10p_udr10_team1_kindhearted_litgoatdk_lgsm(cls, config: Config): config.game_client_config.use_1600_900_resolution() # config.game_client_config.use_1176_664_resolution() config.game_client_config.use_n_windows(22) config.game_client_config.use_credential_list_default() config.toggle_window_config.key1_to_25_window_index = list(range(1, 22 + 1)) config.active_character_config = ActiveCharacterConfig( active_characters=[ CharacterFactory.make_char_fatmulti1_litgoatdka_pvp_frost_dk().evolve(), CharacterFactory.make_char_fatmulti3_litgoatdkc_pvp_frost_dk().evolve(), CharacterFactory.make_char_fatmulti2_litgoatdkb_pvp_frost_dk().evolve(), CharacterFactory.make_char_fatmulti4_litgoatdkd_pvp_frost_dk().evolve(), CharacterFactory.make_char_fatmulti5_litgoatdke_pvp_frost_dk().evolve(), CharacterFactory.make_char_fitsheep_kindhearted_pve_demonology_warlock().evolve(), CharacterFactory.make_char_fatmulti23_lgsmm_pve_elemental_shaman().evolve(), CharacterFactory.make_char_fatmulti24_lgsmn_pve_elemental_shaman().evolve(), CharacterFactory.make_char_fatmulti25_lgsmo_pve_elemental_shaman().evolve(), CharacterFactory.make_char_fatmulti26_lgsmp_pve_elemental_shaman().evolve(), ] ) config.toggle_window_config.round_robin_window_index = list(range(1, 22 + 1)) config.active_character_config.set_leader1_window_index(6) config.active_character_config.set_leader2_window_index(6) @classmethod def set_mode_solo_raid_25p_udr25_team2_litgoatss_litgugua_lgms(cls, config: Config): config.game_client_config.use_1600_900_resolution() # config.game_client_config.use_1176_664_resolution() config.game_client_config.use_n_windows(22) config.game_client_config.use_credential_list_default() config.toggle_window_config.key1_to_25_window_index = list(range(1, 22 + 1)) config.active_character_config = ActiveCharacterConfig( active_characters=[ CharacterFactory.make_char_fatmulti1_litgoatssa_pve_demo_warlock().evolve(), CharacterFactory.make_char_fatmulti2_litgoatssb_pve_demo_warlock().evolve(), CharacterFactory.make_char_fatmulti3_litgoatssc_pve_demo_warlock().evolve(), CharacterFactory.make_char_fatmulti4_litgoatssd_pve_demo_warlock().evolve(), CharacterFactory.make_char_fatmulti5_litgoatsse_pve_demo_warlock().evolve(), CharacterFactory.make_char_fatmulti6_kapacuk_pve_marksman_hunter().evolve(), CharacterFactory.make_char_fatmulti8_bunnysisters_pve_resto_druid().evolve(), CharacterFactory.make_char_fatmulti9_glowyy_pve_protect_pala().evolve(), CharacterFactory.make_char_makun7551_laoshou_retri_paladin().evolve(), CharacterFactory.make_char_fatmulti11_litgugua_pve_balance_druid().evolve(), CharacterFactory.make_char_fatmulti12_litgugub_pve_balance_druid().evolve(), CharacterFactory.make_char_fatmulti13_litguguc_pve_balance_druid().evolve(), CharacterFactory.make_char_fatmulti14_litgugud_pve_balance_druid().evolve(), CharacterFactory.make_char_fatmulti19_lgmsi_pve_shadow_priest().evolve(), CharacterFactory.make_char_fatmulti20_lgmsj_pve_shadow_priest().evolve(), CharacterFactory.make_char_fatmulti21_lgmsk_pve_shadow_priest().evolve(), CharacterFactory.make_char_fatmulti22_lgmsl_pve_shadow_priest().evolve(), ] ) config.toggle_window_config.round_robin_window_index = list(range(1, 22 + 1)) config.active_character_config.set_leader1_window_index(7) config.active_character_config.set_leader2_window_index(7) #--- VOA @classmethod def set_mode_solo_raid_10p_voa10_team1_batlefury_team(cls, config: Config): config.game_client_config.use_1600_900_resolution() config.game_client_config.use_n_windows(22) config.game_client_config.use_credential_list_default() config.toggle_window_config.key1_to_25_window_index = list(range(1, 22 + 1)) config.toggle_window_config.round_robin_window_index = list(range(1, 22 + 1)) config.active_character_config = ActiveCharacterConfig( active_characters=[ CharacterFactory.make_char_fatmulti1_batlefury_pve_protect_pala().evolve(is_tank1=True), CharacterFactory.make_char_fatmulti2_litgoatssb_pve_demo_warlock().evolve(), CharacterFactory.make_char_fatmulti3_opiitou_pve_balance_druid().evolve(), CharacterFactory.make_char_fatmulti4_swagsonic_pve_arcane_mage().evolve(), CharacterFactory.make_char_fatmulti5_litgoatsse_pve_demo_warlock().evolve(), CharacterFactory.make_char_fitsheep_bordercollie_pve_shadow_priest().evolve(), CharacterFactory.make_char_fatmulti6_kapacuk_pve_marksman_hunter().evolve(), CharacterFactory.make_char_makun7551_laoshou_retri_paladin().evolve(is_tank2=True), CharacterFactory.make_char_fatmulti13_litguguc_pve_balance_druid().evolve(), CharacterFactory.make_char_fatmulti14_litgugud_pvp_resto_druid().evolve(), ] ) config.active_character_config.set_leader1_window_index(1) config.active_character_config.set_leader2_window_index(10) @classmethod def set_mode_solo_raid_10p_voa10_team2_glowyy_team(cls, config: Config): config.game_client_config.use_1600_900_resolution() config.game_client_config.use_n_windows(22) config.game_client_config.use_credential_list_default() config.toggle_window_config.key1_to_25_window_index = list(range(1, 22 + 1)) config.active_character_config = ActiveCharacterConfig( active_characters=[ CharacterFactory.make_char_fatmulti1_litgoatssa_pve_demo_warlock().evolve(), CharacterFactory.make_char_fatmulti2_quentin_pve_elemental_shaman().evolve(), CharacterFactory.make_char_fatmulti3_litgoatssc_pve_demo_warlock().evolve(), CharacterFactory.make_char_fatmulti4_litgoatssd_pve_demo_warlock().evolve(), CharacterFactory.make_char_fatmulti5_kangliu_pve_shadow_priest().evolve(), CharacterFactory.make_char_fatmulti8_bunnysisters_pve_resto_druid().evolve(), CharacterFactory.make_char_fatmulti9_glowyy_pve_protect_pala().evolve(is_tank1=True), CharacterFactory.make_char_makun7551_ganjj_pve_blood_tank_dk().evolve(is_tank2=True), CharacterFactory.make_char_fatmulti11_litgugua_pve_balance_druid().evolve(), CharacterFactory.make_char_fatmulti12_litgugub_pve_balance_druid().evolve(), ] ) config.toggle_window_config.round_robin_window_index = list(range(1, 22 + 1)) config.active_character_config.set_leader1_window_index(9) config.active_character_config.set_leader2_window_index(10) @classmethod def set_mode_solo_raid_10p_voa10_team4_luxiaofeng_2_priest_2_shaman_team(cls, config: Config): config.game_client_config.use_1600_900_resolution() config.game_client_config.use_n_windows(22) config.game_client_config.use_credential_list_luxiaofeng() config.toggle_window_config.key1_to_25_window_index = list(range(1, 22 + 1)) config.active_character_config = ActiveCharacterConfig( active_characters=[ CharacterFactory.make_char_fatmulti2_litgoatdkb_pve_unholy_dk().evolve(), CharacterFactory.make_char_fatmulti3_litgoatdkc_pve_unholy_dk().evolve(), CharacterFactory.make_char_fitsheep_kindhearted_pve_demonology_warlock(), CharacterFactory.make_char_fatmulti10_luxiaofeng_pve_blood_tank_dk().evolve(is_tank1=True), # CharacterFactory.make_char_fatmulti15_litgugue_pvp_balance_druid().evolve(), # CharacterFactory.make_char_fatmulti16_litguguf_pvp_balance_druid().evolve(), CharacterFactory.make_char_fatmulti19_lgmsi_pve_shadow_priest().evolve(), CharacterFactory.make_char_fatmulti20_lgmsj_pve_shadow_priest().evolve(), # CharacterFactory.make_char_fatmulti23_lgsmm_pve_elemental_shaman().evolve(), CharacterFactory.make_char_fatmulti23_lgsmm_pve_resto_shaman().evolve(), # CharacterFactory.make_char_fatmulti24_lgsmn_pve_elemental_shaman().evolve(), CharacterFactory.make_char_fatmulti24_lgsmn_pve_resto_shaman().evolve(), ] ) config.toggle_window_config.round_robin_window_index = list(range(1, 22 + 1)) config.active_character_config.set_leader1_window_index(10) config.active_character_config.set_leader2_window_index(10) @classmethod def set_mode_solo_raid_10p_voa10_team5_flydps_2_priest_2_shaman_team(cls, config: Config): config.game_client_config.use_1600_900_resolution() config.game_client_config.use_n_windows(22) config.game_client_config.use_credential_list_flydps() config.toggle_window_config.key1_to_25_window_index = list(range(1, 22 + 1)) config.active_character_config = ActiveCharacterConfig( active_characters=[ CharacterFactory.make_char_monkey130_flydps_pve_blood_tank_dk().evolve(is_tank1=True), CharacterFactory.make_char_fatmulti1_litgoatdka_pve_blood_dk().evolve(is_tank2=True), CharacterFactory.make_char_fatmulti4_litgoatdkd_pve_unholy_dk().evolve(), CharacterFactory.make_char_fatmulti5_litgoatdke_pve_unholy_dk().evolve(), CharacterFactory.make_char_fatmulti21_lgmsk_pve_shadow_priest().evolve(), CharacterFactory.make_char_fatmulti22_lgmsl_pve_shadow_priest().evolve(), CharacterFactory.make_char_fatmulti25_lgsmo_pve_elemental_shaman().evolve(), # CharacterFactory.make_char_fatmulti25_lgsmo_pve_resto_shaman().evolve(), # CharacterFactory.make_char_fatmulti26_lgsmp_pve_elemental_shaman().evolve(), CharacterFactory.make_char_fatmulti26_lgsmp_pve_resto_shaman().evolve(), ] ) config.toggle_window_config.round_robin_window_index = list(range(1, 22 + 1)) config.active_character_config.set_leader1_window_index(10) config.active_character_config.set_leader2_window_index(1) # VOA 10 four team. # batlefury team = 10 p # litgoatss x 5, litgoatdk x 5 = 10p # litgugu x 8, lgms x 4, lgsm x 4 = 16 p # bordercollie, laoshou, ganjj, flydps = 4p @classmethod def set_mode_solo_raid_10p_voa10_team5(cls, config: Config): config.game_client_config.use_1600_900_resolution() config.game_client_config.use_n_windows(22) config.game_client_config.use_credential_list_default() config.toggle_window_config.key1_to_25_window_index = list(range(1, 22 + 1)) config.toggle_window_config.round_robin_window_index = list(range(1, 22 + 1)) config.active_character_config = ActiveCharacterConfig( active_characters=[ CharacterFactory.make_char_fatmulti1_batlefury_pve_protect_pala().evolve(is_tank1=True), CharacterFactory.make_char_fatmulti2_litgoatssb_pve_demo_warlock().evolve(), CharacterFactory.make_char_fatmulti3_litgoatdkc_pve_unholy_dk().evolve(), CharacterFactory.make_char_fatmulti4_swagsonic_pve_arcane_mage().evolve(), CharacterFactory.make_char_fitsheep_bordercollie_pve_shadow_priest().evolve(), CharacterFactory.make_char_makun7551_ganjj_pve_unholy_dps_dk().evolve(), CharacterFactory.make_char_fatmulti11_litgugua_pvp_resto_druid().evolve(), CharacterFactory.make_char_fatmulti16_litguguf_pvp_balance_druid().evolve(), CharacterFactory.make_char_fatmulti19_lgmsi_pve_shadow_priest().evolve(), CharacterFactory.make_char_fatmulti23_lgsmm_pve_elemental_shaman().evolve(), ] ) config.active_character_config.set_leader1_window_index(1) config.active_character_config.set_leader2_window_index(10) @classmethod def set_mode_solo_raid_10p_voa10_team6(cls, config: Config): config.game_client_config.use_1600_900_resolution() config.game_client_config.use_n_windows(22) config.game_client_config.use_credential_list_default() config.toggle_window_config.key1_to_25_window_index = list(range(1, 22 + 1)) config.active_character_config = ActiveCharacterConfig( active_characters=[ CharacterFactory.make_char_fatmulti9_glowyy_pve_protect_pala().evolve(is_tank1=True), CharacterFactory.make_char_fatmulti1_litgoatssa_pve_demo_warlock().evolve(), CharacterFactory.make_char_fatmulti3_litgoatssc_pve_demo_warlock().evolve(), CharacterFactory.make_char_fatmulti2_litgoatdkb_pve_unholy_dk().evolve(), CharacterFactory.make_char_fatmulti5_kangliu_pve_shadow_priest().evolve(), CharacterFactory.make_char_fatmulti8_bunnysisters_pve_balance_druid().evolve(), CharacterFactory.make_char_fatmulti13_litguguc_pvp_resto_druid().evolve(), CharacterFactory.make_char_fatmulti18_litguguh_pvp_balance_druid().evolve(), CharacterFactory.make_char_fatmulti20_lgmsj_pve_shadow_priest().evolve(), CharacterFactory.make_char_fatmulti24_lgsmn_pve_elemental_shaman().evolve(), ] ) config.toggle_window_config.round_robin_window_index = list(range(1, 22 + 1)) config.active_character_config.set_leader1_window_index(9) config.active_character_config.set_leader2_window_index(9) @classmethod def set_mode_solo_raid_10p_voa10_team7(cls, config: Config): config.game_client_config.use_1600_900_resolution() config.game_client_config.use_n_windows(22) config.game_client_config.use_credential_list_luxiaofeng() config.toggle_window_config.key1_to_25_window_index = list(range(1, 22 + 1)) config.active_character_config = ActiveCharacterConfig( active_characters=[ CharacterFactory.make_char_fatmulti10_luxiaofeng_pve_blood_tank_dk().evolve(is_tank1=True), CharacterFactory.make_char_makun7551_laoshou_protect_paladin_at_window_9().evolve(is_tank2=True), CharacterFactory.make_char_fatmulti4_litgoatssd_pve_demo_warlock().evolve(), CharacterFactory.make_char_fatmulti5_litgoatdke_pve_unholy_dk().evolve(), CharacterFactory.make_char_fatmulti2_quentin_pve_elemental_shaman().evolve(), CharacterFactory.make_char_fitsheep_kindhearted_pve_demonology_warlock().evolve(), CharacterFactory.make_char_fatmulti15_litgugue_pvp_balance_druid().evolve(), CharacterFactory.make_char_fatmulti12_litgugub_pvp_resto_druid().evolve(), CharacterFactory.make_char_fatmulti21_lgmsk_pve_shadow_priest().evolve(), CharacterFactory.make_char_fatmulti25_lgsmo_pve_elemental_shaman().evolve(), ] ) config.toggle_window_config.round_robin_window_index = list(range(1, 22 + 1)) config.active_character_config.set_leader1_window_index(10) config.active_character_config.set_leader2_window_index(9) @classmethod def set_mode_solo_raid_10p_voa10_team8(cls, config: Config): config.game_client_config.use_1600_900_resolution() config.game_client_config.use_n_windows(22) config.game_client_config.use_credential_list_flydps() config.toggle_window_config.key1_to_25_window_index = list(range(1, 22 + 1)) config.active_character_config = ActiveCharacterConfig( active_characters=[ CharacterFactory.make_char_monkey130_flydps_pve_blood_tank_dk().evolve(is_tank1=True), CharacterFactory.make_char_fatmulti1_litgoatdka_pve_blood_dk().evolve(is_tank2=True), CharacterFactory.make_char_fatmulti3_opiitou_pve_balance_druid().evolve(), CharacterFactory.make_char_fatmulti5_litgoatsse_pve_demo_warlock().evolve(), CharacterFactory.make_char_fatmulti4_litgoatdkd_pve_unholy_dk().evolve(), CharacterFactory.make_char_fatmulti6_kapacuk_pve_marksman_hunter().evolve(), CharacterFactory.make_char_fatmulti17_litgugug_pvp_balance_druid().evolve(), CharacterFactory.make_char_fatmulti14_litgugud_pvp_resto_druid().evolve(), CharacterFactory.make_char_fatmulti22_lgmsl_pve_shadow_priest().evolve(), CharacterFactory.make_char_fatmulti26_lgsmp_pve_elemental_shaman().evolve(), ] ) config.toggle_window_config.round_robin_window_index = list(range(1, 22 + 1)) config.active_character_config.set_leader1_window_index(10) config.active_character_config.set_leader2_window_index(1) @classmethod def set_mode_solo_raid_22p_voa25_batlefury_2_priest_2_shaman_team1(cls, config: Config): # config.game_client_config.use_1600_900_resolution() config.game_client_config.use_1176_664_resolution() config.game_client_config.use_n_windows(22) config.game_client_config.use_credential_list_default() config.toggle_window_config.key1_to_25_window_index = list(range(1, 22 + 1)) config.toggle_window_config.round_robin_window_index = list(range(1, 22 + 1)) config.active_character_config = ActiveCharacterConfig( active_characters=[ # 1 - 5 CharacterFactory.make_char_fatmulti1_batlefury_pve_protect_pala().evolve(is_tank2=True), CharacterFactory.make_char_fatmulti2_quentin_pve_elemental_shaman().evolve(), CharacterFactory.make_char_fatmulti3_opiitou_pve_balance_druid().evolve(), CharacterFactory.make_char_fatmulti4_litgoatdkd_pve_unholy_dk().evolve(), CharacterFactory.make_char_fatmulti5_litgoatdke_pve_unholy_dk().evolve(), # 6 - 10 CharacterFactory.make_char_fitsheep_bordercollie_pve_disco_priest().evolve(), # Healer CharacterFactory.make_char_fatmulti9_glowyy_pve_holy_pala().evolve(), # Healer CharacterFactory.make_char_fatmulti10_luxiaofeng_pve_blood_tank_dk().evolve(is_tank1=True), # 11 - 14 CharacterFactory.make_char_fatmulti15_litgugue_pvp_balance_druid().evolve(), CharacterFactory.make_char_fatmulti16_litguguf_pvp_balance_druid().evolve(), CharacterFactory.make_char_fatmulti17_litgugug_pvp_balance_druid().evolve(), CharacterFactory.make_char_fatmulti18_litguguh_pvp_resto_druid().evolve(), # Healer # 15 - 18 CharacterFactory.make_char_fatmulti19_lgmsi_pve_shadow_priest().evolve(), CharacterFactory.make_char_fatmulti20_lgmsj_pve_shadow_priest().evolve(), # 19 - 22 CharacterFactory.make_char_fatmulti23_lgsmm_pve_elemental_shaman().evolve(), CharacterFactory.make_char_fatmulti24_lgsmn_pve_elemental_shaman().evolve(), CharacterFactory.make_char_makun7551_ganjj_pve_unholy_dps_dk_at_window_22().evolve(), ] ) config.active_character_config.set_leader1_window_index(1) config.active_character_config.set_leader2_window_index(10) @classmethod def set_mode_solo_raid_22p_voa25_litgoatdk_2_priest_2_shaman_team2(cls, config: Config): # config.game_client_config.use_1600_900_resolution() config.game_client_config.use_1176_664_resolution() config.game_client_config.use_n_windows(22) config.game_client_config.use_credential_list_default() config.toggle_window_config.key1_to_25_window_index = list(range(1, 22 + 1)) config.toggle_window_config.round_robin_window_index = list(range(1, 22 + 1)) config.active_character_config = ActiveCharacterConfig( active_characters=[ # 1 - 5 CharacterFactory.make_char_fatmulti1_litgoatdka_pve_blood_dk().evolve(is_tank2=True), CharacterFactory.make_char_fatmulti3_litgoatdkc_pve_unholy_dk().evolve(), CharacterFactory.make_char_fatmulti2_litgoatdkb_pve_unholy_dk().evolve(), CharacterFactory.make_char_fatmulti4_swagsonic_pve_arcane_mage().evolve(), CharacterFactory.make_char_fatmulti5_kangliu_pve_shadow_priest().evolve(), # 6 - 10 CharacterFactory.make_char_fitsheep_kindhearted_pve_demonology_warlock().evolve(), CharacterFactory.make_char_fatmulti6_kapacuk_pve_marksman_hunter().evolve(), CharacterFactory.make_char_fatmulti8_bunnysisters_pve_resto_druid().evolve(), # Healer CharacterFactory.make_char_monkey130_flydps_pve_blood_tank_dk().evolve(is_tank1=True), # 11 - 14 CharacterFactory.make_char_fatmulti11_litgugua_pve_balance_druid().evolve(), CharacterFactory.make_char_fatmulti12_litgugub_pve_balance_druid().evolve(), # CharacterFactory.make_char_fatmulti11_litgugua_pvp_resto_druid().evolve(), # CharacterFactory.make_char_fatmulti12_litgugub_pvp_resto_druid().evolve(), CharacterFactory.make_char_fatmulti13_litguguc_pvp_resto_druid().evolve(), # Healer CharacterFactory.make_char_fatmulti14_litgugud_pve_balance_druid().evolve(), # 15 - 18 CharacterFactory.make_char_fatmulti21_lgmsk_pve_shadow_priest().evolve(), CharacterFactory.make_char_fatmulti22_lgmsl_pve_shadow_priest().evolve(), # 19 - 22 CharacterFactory.make_char_makun7551_laoshou_retri_paladin_at_window_19().evolve(), CharacterFactory.make_char_fatmulti25_lgsmo_pve_elemental_shaman().evolve(), CharacterFactory.make_char_fatmulti26_lgsmp_pve_elemental_shaman().evolve(), ] ) config.active_character_config.set_leader1_window_index(1) config.active_character_config.set_leader2_window_index(10) @classmethod def set_mode_solo_raid_22p_voa25_team3(cls, config: Config): config.game_client_config.use_1600_900_resolution() # config.game_client_config.use_1176_664_resolution() config.game_client_config.use_n_windows(22) config.game_client_config.use_credential_list_default() config.toggle_window_config.key1_to_25_window_index = list(range(1, 22 + 1)) config.toggle_window_config.round_robin_window_index = list(range(1, 22 + 1)) config.active_character_config = ActiveCharacterConfig( active_characters=[ # 1 - 5 CharacterFactory.make_char_fatmulti1_litgoatssa_pve_demo_warlock().evolve(), CharacterFactory.make_char_fatmulti2_litgoatssb_pve_demo_warlock().evolve(), CharacterFactory.make_char_fatmulti3_litgoatssc_pve_demo_warlock().evolve(), CharacterFactory.make_char_fatmulti4_litgoatssd_pve_demo_warlock().evolve(), CharacterFactory.make_char_fatmulti5_litgoatsse_pve_demo_warlock().evolve(), CharacterFactory.make_char_freiliheng_stophealing_pve_blood_tank_dk().evolve(is_tank1=True), ] ) config.active_character_config.set_leader2_window_index(10) #--- ICC @classmethod def set_mode_solo_raid_10p_icc10_lich_king_team(cls, config: Config): """ :param config: :return: """ config.game_client_config.use_1600_900_resolution() # config.game_client_config.use_1176_664_resolution() config.game_client_config.use_n_windows(22) config.game_client_config.use_credential_list_default() config.toggle_window_config.key1_to_25_window_index = list(range(1, 22 + 1)) config.active_character_config = ActiveCharacterConfig( active_characters=[ # 1 - 5 CharacterFactory.make_char_fatmulti1_batlefury_pve_protect_pala().evolve(), CharacterFactory.make_char_fatmulti2_quentin_pve_elemental_shaman().evolve(), # CharacterFactory.make_char_fatmulti2_quentin_pve_resto_shaman().evolve(), CharacterFactory.make_char_fatmulti3_opiitou_pve_balance_druid().evolve(), CharacterFactory.make_char_fatmulti4_swagsonic_pve_arcane_mage().evolve(), CharacterFactory.make_char_fatmulti5_kangliu_pve_shadow_priest().evolve(), # 6 - 10 CharacterFactory.make_char_fitsheep_kindhearted_pve_demonology_warlock().evolve(), CharacterFactory.make_char_fatmulti6_kapacuk_pve_marksman_hunter().evolve(), CharacterFactory.make_char_fatmulti8_bunnysisters_pve_resto_druid().evolve(), CharacterFactory.make_char_fatmulti9_glowyy_pve_holy_pala().evolve(), CharacterFactory.make_char_monkey130_flydps_pve_blood_tank_dk().evolve(), ] ) config.toggle_window_config.round_robin_window_index = list(range(1, 22 + 1)) config.active_character_config.set_leader1_window_index(1) config.active_character_config.set_leader2_window_index(10) @classmethod def set_mode_solo_raid_10p_onyxia(cls, config: Config): """ :param config: :return: """ config.game_client_config.use_1600_900_resolution() config.game_client_config.use_n_windows(22) config.game_client_config.use_credential_list_default() config.toggle_window_config.key1_to_25_window_index = list(range(1, 22 + 1)) config.active_character_config = ActiveCharacterConfig( active_characters=[ # 1 - 5 CharacterFactory.make_char_fatmulti1_batlefury_pve_protect_pala().evolve(leader2_window_index=10), CharacterFactory.make_char_fatmulti2_quentin_pve_elemental_shaman().evolve(leader1_window_index=10, leader2_window_index=10), CharacterFactory.make_char_fatmulti3_opiitou_pve_balance_druid().evolve(leader1_window_index=10, leader2_window_index=10), CharacterFactory.make_char_fatmulti4_swagsonic_pve_arcane_mage().evolve(leader1_window_index=10, leader2_window_index=10), CharacterFactory.make_char_fatmulti5_kangliu_pve_shadow_priest().evolve(leader1_window_index=10, leader2_window_index=10), # 6 - 10 CharacterFactory.make_char_fitsheep_kindhearted_pve_demonology_warlock().evolve(leader1_window_index=10, leader2_window_index=10), CharacterFactory.make_char_fatmulti6_kapacuk_pve_marksman_hunter().evolve(leader1_window_index=10, leader2_window_index=10), CharacterFactory.make_char_fatmulti8_bunnysisters_pve_resto_druid().evolve(leader1_window_index=10, leader2_window_index=10), CharacterFactory.make_char_fatmulti9_glowyy_pve_holy_pala().evolve(leader1_window_index=1, leader2_window_index=10), CharacterFactory.make_char_fatmulti10_luxiaofeng_pve_blood_tank_dk().evolve(), ] ) config.toggle_window_config.round_robin_window_index = list(range(1, 22 + 1)) from .. import hk_g03_1_to_12 from .. import hk_g07_skills send_label = hk_g03_1_to_12.hk_1.get_send_label_by_name(T.paladin_pve_holy.name) send_label.actions = [ act.Target.TARGET_FOCUS, Key(name=keyname.KEY_1), ] send_label = hk_g03_1_to_12.hk_2.get_send_label_by_name(T.paladin_pve_holy.name) send_label.actions = [ act.Target.TARGET_FOCUS, Key(name=keyname.KEY_2), ] send_label = hk_g03_1_to_12.hk_0_short_term_buff.get_send_label_by_name(TC.paladin_healer.name) send_label.actions = [ act.Target.TARGET_W10_LUXIAOFENG, act.Paladin.HOLY_SPEC_KEY_0_BEACON_OF_LIGHT, ] hk_c = Hotkey( name="C", key=keyname.SCROLOCK_ON(keyname.C), actions=[ SendLabel( name=TC.priest.name, to=config.lbs_by_tc(tc=TC.priest), actions=[ act.Target.TARGET_W10_LUXIAOFENG, act.Priest.ALL_SPEC_FEAR_WARD, ] ), ], script=script, ) hk_v = Hotkey( name="V", key=keyname.SCROLOCK_ON(keyname.V), actions=[ SendLabel( name=TC.paladin_protect.name, to=config.lbs_by_tc(tc=TC.paladin_protect), actions=[ act.Paladin.ALL_SPEC_DIVINE_PROTECTION, ] ), ], script=script, ) hk_b = Hotkey( name="B", key=keyname.SCROLOCK_ON(keyname.B), actions=[ SendLabel( name=TC.paladin_protect.name, to=config.lbs_by_tc(tc=TC.paladin_protect), actions=[ act.Paladin.ALL_SPEC_DIVINE_SACRIFICE, ] ), SendLabel( name=TC.paladin_non_protect.name, to=config.lbs_by_tc(tc=TC.paladin_non_protect), actions=[ act.Paladin.ALL_SPEC_AURA_MASTERY, ] ), ], script=script, )
57.842215
146
0.70579
5,987
55,355
5.944881
0.044931
0.200607
0.240728
0.220836
0.966959
0.963138
0.961817
0.95159
0.917341
0.896156
0
0.035631
0.217686
55,355
956
147
57.90272
0.78626
0.160871
0
0.72126
0
0
0.001125
0.00106
0
0
0
0
0
1
0.03937
false
0.001575
0.014173
0
0.055118
0.001575
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
0
0
10
eb960309622657a4555075159c9849c4bd223e79
21,118
py
Python
test/test_crypto.py
voisine/addressimo
0943a399796f518b5ccca1746e379ab1aed2997d
[ "BSD-3-Clause" ]
2
2015-09-09T01:18:00.000Z
2021-10-31T04:29:25.000Z
test/test_crypto.py
voisine/addressimo
0943a399796f518b5ccca1746e379ab1aed2997d
[ "BSD-3-Clause" ]
null
null
null
test/test_crypto.py
voisine/addressimo
0943a399796f518b5ccca1746e379ab1aed2997d
[ "BSD-3-Clause" ]
1
2021-10-31T04:29:18.000Z
2021-10-31T04:29:18.000Z
__author__ = 'Matt David' from mock import patch, Mock from test import AddressimoTestCase from addressimo.crypto import * class TestDeriveBranch(AddressimoTestCase): def setUp(self): self.patcher1 = patch('addressimo.crypto.iptools') self.patcher2 = patch('addressimo.crypto.request') self.mockIpTools = self.patcher1.start() self.mockRequest = self.patcher2.start() def testGoRightAbove2147483648(self): # Setup Test Case self.mockIpTools.ipv4.ip2long.return_value = 3000000000 ret_val = derive_branch() self.assertEqual(24064, ret_val) self.assertEqual(1, self.mockIpTools.ipv4.ip2long.call_count) self.assertEqual(self.mockRequest.remote_addr, self.mockIpTools.ipv4.ip2long.call_args[0][0]) def testGoRightBelow2147483648(self): # Setup Test Case self.mockIpTools.ipv4.ip2long.return_value = 1000000000 ret_val = derive_branch() self.assertEqual(51712, ret_val) self.assertEqual(1, self.mockIpTools.ipv4.ip2long.call_count) self.assertEqual(self.mockRequest.remote_addr, self.mockIpTools.ipv4.ip2long.call_args[0][0]) class TestGenerateBIP32AddressFromExtendedPublicKey(AddressimoTestCase): def setUp(self): self.patcher1 = patch('addressimo.crypto.BIP32Node') self.mockBIP32Node = self.patcher1.start() def test_go_right(self): ret_val = generate_bip32_address_from_extended_pubkey('xpub_extended_pubkey', 1231244, 3) self.assertEqual(self.mockBIP32Node.from_wallet_key.return_value.subkey_for_path.return_value.address.return_value, ret_val) self.assertEqual(1, self.mockBIP32Node.from_wallet_key.call_count) self.assertEqual('xpub_extended_pubkey', self.mockBIP32Node.from_wallet_key.call_args[0][0]) self.assertEqual(1, self.mockBIP32Node.from_wallet_key.return_value.subkey_for_path.call_count) self.assertEqual('1231244/3', self.mockBIP32Node.from_wallet_key.return_value.subkey_for_path.call_args[0][0]) self.assertEqual(1, self.mockBIP32Node.from_wallet_key.return_value.subkey_for_path.return_value.address.call_count) class TestGetCerts(AddressimoTestCase): def setUp(self): self.patcher1 = patch('addressimo.crypto.ssl') self.mockSsl = self.patcher1.start() def test_go_right_single_cert(self): data = ''' test-data -----END CERTIFICATE----- ''' ret_val = get_certs(data) self.assertIn(self.mockSsl.PEM_cert_to_DER_cert.return_value, ret_val) self.assertEqual(1, len(ret_val)) self.assertEqual(1, self.mockSsl.PEM_cert_to_DER_cert.call_count) self.assertEqual(data.replace('\n','').strip(), self.mockSsl.PEM_cert_to_DER_cert.call_args[0][0]) def test_go_right_multiple_certs(self): data = ''' test-data -----END CERTIFICATE----- test-data2 -----END CERTIFICATE----- test-data3 -----END CERTIFICATE----- ''' ret_val = get_certs(data) self.assertIn(self.mockSsl.PEM_cert_to_DER_cert.return_value, ret_val) self.assertEqual(3, len(ret_val)) self.assertEqual(3, self.mockSsl.PEM_cert_to_DER_cert.call_count) self.assertEqual('test-data-----END CERTIFICATE-----', self.mockSsl.PEM_cert_to_DER_cert.call_args_list[0][0][0]) self.assertEqual('test-data2-----END CERTIFICATE-----', self.mockSsl.PEM_cert_to_DER_cert.call_args_list[1][0][0]) self.assertEqual('test-data3-----END CERTIFICATE-----', self.mockSsl.PEM_cert_to_DER_cert.call_args_list[2][0][0]) class GeneratePaymentRequest(AddressimoTestCase): def setUp(self): self.patcher1 = patch('addressimo.crypto.serialize_script') self.patcher2 = patch('addressimo.crypto.b58check_to_hex') self.patcher3 = patch('addressimo.crypto.PluginManager') self.patcher4 = patch('addressimo.crypto.get_certs') self.patcher5 = patch('addressimo.crypto.datetime', wraps=datetime, spec=datetime) self.mockSerializeScript = self.patcher1.start() self.mockB58CheckToHex = self.patcher2.start() self.mockPluginManager = self.patcher3.start() self.mockGetCerts = self.patcher4.start() self.mockDatetime = self.patcher5.start() self.mockSerializeScript.return_value = 'BFFBFFBFFBFF' self.mockSigner = Mock() self.mockSigner.sign.return_value = 'signature' self.mockSigner.get_pki_type.return_value = 'pki_type' self.mockGetCerts.return_value = ['cert1', 'cert2'] self.crypto_addr = '1abdcdefg123456789' self.x509_cert = 'x509_cert' self.mockDatetime.utcnow.return_value = datetime(2015, 6, 13, 9, 0, 0) def test_go_right_defaults(self): ret_val = generate_payment_request(self.crypto_addr, self.x509_cert, self.mockSigner) self.assertIsNotNone(ret_val) self.assertEqual(1, self.mockSerializeScript.call_count) self.assertEqual([OP_DUP, OP_HASH160, self.mockB58CheckToHex.return_value, OP_EQUALVERIFY, OP_CHECKSIG], self.mockSerializeScript.call_args[0][0]) self.assertEqual(1, self.mockB58CheckToHex.call_count) self.assertEqual(self.crypto_addr, self.mockB58CheckToHex.call_args[0][0]) self.assertEqual(1, self.mockPluginManager.get_plugin.call_count) self.assertEqual('LOGGER', self.mockPluginManager.get_plugin.call_args[0][0]) self.assertEqual(1, self.mockGetCerts.call_count) self.assertEqual(self.x509_cert, self.mockGetCerts.call_args[0][0]) self.assertEqual(2, self.mockDatetime.utcnow.call_count) self.assertEqual(1, self.mockSigner.sign.call_count) pr = PaymentRequest() pr.ParseFromString(ret_val) self.assertEqual(1, pr.payment_details_version) self.assertEqual('\n\x05cert1\n\x05cert2', pr.pki_data) self.assertEqual('pki_type', pr.pki_type) self.assertEqual('signature', pr.signature) pd = PaymentDetails() pd.ParseFromString(pr.serialized_payment_details) self.assertEqual(1434212100, pd.expires) self.assertEqual('', pd.memo) self.assertEqual('', pd.merchant_data) self.assertEqual('main', pd.network) self.assertEqual('', pd.payment_url) self.assertEqual(1434211200, pd.time) for output in pd.outputs: self.assertEqual(0, output.amount) self.assertEqual('\xbf\xfb\xff\xbf\xfb\xff', output.script) def test_go_right_all_args(self): ret_val = generate_payment_request( self.crypto_addr, self.x509_cert, self.mockSigner, amount=9999, expires=datetime(2015,7,1), memo='memo', payment_url='https://payme.domain.com/path?query', merchant_data='merchant_data' ) self.assertIsNotNone(ret_val) self.assertEqual(1, self.mockSerializeScript.call_count) self.assertEqual([OP_DUP, OP_HASH160, self.mockB58CheckToHex.return_value, OP_EQUALVERIFY, OP_CHECKSIG], self.mockSerializeScript.call_args[0][0]) self.assertEqual(1, self.mockB58CheckToHex.call_count) self.assertEqual(self.crypto_addr, self.mockB58CheckToHex.call_args[0][0]) self.assertEqual(1, self.mockPluginManager.get_plugin.call_count) self.assertEqual('LOGGER', self.mockPluginManager.get_plugin.call_args[0][0]) self.assertEqual(1, self.mockGetCerts.call_count) self.assertEqual(self.x509_cert, self.mockGetCerts.call_args[0][0]) self.assertEqual(1, self.mockDatetime.utcnow.call_count) self.assertEqual(1, self.mockSigner.sign.call_count) pr = PaymentRequest() pr.ParseFromString(ret_val) self.assertEqual(1, pr.payment_details_version) self.assertEqual('\n\x05cert1\n\x05cert2', pr.pki_data) self.assertEqual('pki_type', pr.pki_type) self.assertEqual('signature', pr.signature) pd = PaymentDetails() pd.ParseFromString(pr.serialized_payment_details) self.assertEqual(1435734000, pd.expires) self.assertEqual('memo', pd.memo) self.assertEqual('merchant_data', pd.merchant_data) self.assertEqual('main', pd.network) self.assertEqual('https://payme.domain.com/path?query', pd.payment_url) self.assertEqual(1434211200, pd.time) for output in pd.outputs: self.assertEqual(999900000000, output.amount) self.assertEqual('\xbf\xfb\xff\xbf\xfb\xff', output.script) def test_no_signer(self): ret_val = generate_payment_request(self.crypto_addr, self.x509_cert) self.assertIsNotNone(ret_val) self.assertEqual(1, self.mockSerializeScript.call_count) self.assertEqual([OP_DUP, OP_HASH160, self.mockB58CheckToHex.return_value, OP_EQUALVERIFY, OP_CHECKSIG], self.mockSerializeScript.call_args[0][0]) self.assertEqual(1, self.mockB58CheckToHex.call_count) self.assertEqual(self.crypto_addr, self.mockB58CheckToHex.call_args[0][0]) self.assertEqual(1, self.mockPluginManager.get_plugin.call_count) self.assertEqual('LOGGER', self.mockPluginManager.get_plugin.call_args[0][0]) self.assertEqual(0, self.mockGetCerts.call_count) self.assertEqual(2, self.mockDatetime.utcnow.call_count) self.assertEqual(0, self.mockSigner.sign.call_count) pr = PaymentRequest() pr.ParseFromString(ret_val) self.assertEqual(1, pr.payment_details_version) self.assertEqual('', pr.pki_data) self.assertEqual('none', pr.pki_type) self.assertEqual('', pr.signature) pd = PaymentDetails() pd.ParseFromString(pr.serialized_payment_details) self.assertEqual(1434212100, pd.expires) self.assertEqual('', pd.memo) self.assertEqual('', pd.merchant_data) self.assertEqual('main', pd.network) self.assertEqual('', pd.payment_url) self.assertEqual(1434211200, pd.time) for output in pd.outputs: self.assertEqual(0, output.amount) self.assertEqual('\xbf\xfb\xff\xbf\xfb\xff', output.script) def test_go_right_non_P2KH_non_hex_addr(self): ret_val = generate_payment_request('addr', self.x509_cert, self.mockSigner) self.assertIsNotNone(ret_val) self.assertEqual(0, self.mockSerializeScript.call_count) self.assertEqual(0, self.mockB58CheckToHex.call_count) self.assertEqual(1, self.mockPluginManager.get_plugin.call_count) self.assertEqual('LOGGER', self.mockPluginManager.get_plugin.call_args[0][0]) self.assertEqual(1, self.mockGetCerts.call_count) self.assertEqual(self.x509_cert, self.mockGetCerts.call_args[0][0]) self.assertEqual(2, self.mockDatetime.utcnow.call_count) self.assertEqual(1, self.mockSigner.sign.call_count) pr = PaymentRequest() pr.ParseFromString(ret_val) self.assertEqual(1, pr.payment_details_version) self.assertEqual('\n\x05cert1\n\x05cert2', pr.pki_data) self.assertEqual('pki_type', pr.pki_type) self.assertEqual('signature', pr.signature) pd = PaymentDetails() pd.ParseFromString(pr.serialized_payment_details) self.assertEqual(1434212100, pd.expires) self.assertEqual('', pd.memo) self.assertEqual('', pd.merchant_data) self.assertEqual('main', pd.network) self.assertEqual('', pd.payment_url) self.assertEqual(1434211200, pd.time) for output in pd.outputs: self.assertEqual(0, output.amount) self.assertEqual('addr', output.script) def test_go_right_non_P2KH_hex_addr(self): ret_val = generate_payment_request('abcf9975', self.x509_cert, self.mockSigner) self.assertIsNotNone(ret_val) self.assertEqual(0, self.mockSerializeScript.call_count) self.assertEqual(0, self.mockB58CheckToHex.call_count) self.assertEqual(1, self.mockPluginManager.get_plugin.call_count) self.assertEqual('LOGGER', self.mockPluginManager.get_plugin.call_args[0][0]) self.assertEqual(1, self.mockGetCerts.call_count) self.assertEqual(self.x509_cert, self.mockGetCerts.call_args[0][0]) self.assertEqual(2, self.mockDatetime.utcnow.call_count) self.assertEqual(1, self.mockSigner.sign.call_count) pr = PaymentRequest() pr.ParseFromString(ret_val) self.assertEqual(1, pr.payment_details_version) self.assertEqual('\n\x05cert1\n\x05cert2', pr.pki_data) self.assertEqual('pki_type', pr.pki_type) self.assertEqual('signature', pr.signature) pd = PaymentDetails() pd.ParseFromString(pr.serialized_payment_details) self.assertEqual(1434212100, pd.expires) self.assertEqual('', pd.memo) self.assertEqual('', pd.merchant_data) self.assertEqual('main', pd.network) self.assertEqual('', pd.payment_url) self.assertEqual(1434211200, pd.time) for output in pd.outputs: self.assertEqual(0, output.amount) self.assertEqual('\xab\xcf\x99u', output.script) def test_expires_datetime(self): ret_val = generate_payment_request(self.crypto_addr, self.x509_cert, self.mockSigner, expires=datetime(2015,7,1)) self.assertIsNotNone(ret_val) self.assertEqual(1, self.mockSerializeScript.call_count) self.assertEqual([OP_DUP, OP_HASH160, self.mockB58CheckToHex.return_value, OP_EQUALVERIFY, OP_CHECKSIG], self.mockSerializeScript.call_args[0][0]) self.assertEqual(1, self.mockB58CheckToHex.call_count) self.assertEqual(self.crypto_addr, self.mockB58CheckToHex.call_args[0][0]) self.assertEqual(1, self.mockPluginManager.get_plugin.call_count) self.assertEqual('LOGGER', self.mockPluginManager.get_plugin.call_args[0][0]) self.assertEqual(1, self.mockGetCerts.call_count) self.assertEqual(self.x509_cert, self.mockGetCerts.call_args[0][0]) self.assertEqual(1, self.mockDatetime.utcnow.call_count) self.assertEqual(1, self.mockSigner.sign.call_count) pr = PaymentRequest() pr.ParseFromString(ret_val) self.assertEqual(1, pr.payment_details_version) self.assertEqual('\n\x05cert1\n\x05cert2', pr.pki_data) self.assertEqual('pki_type', pr.pki_type) self.assertEqual('signature', pr.signature) pd = PaymentDetails() pd.ParseFromString(pr.serialized_payment_details) self.assertEqual(1435734000, pd.expires) self.assertEqual('', pd.memo) self.assertEqual('', pd.merchant_data) self.assertEqual('main', pd.network) self.assertEqual('', pd.payment_url) self.assertEqual(1434211200, pd.time) for output in pd.outputs: self.assertEqual(0, output.amount) self.assertEqual('\xbf\xfb\xff\xbf\xfb\xff', output.script) def test_expires_number(self): ret_val = generate_payment_request(self.crypto_addr, self.x509_cert, self.mockSigner, expires=3600) self.assertIsNotNone(ret_val) self.assertEqual(1, self.mockSerializeScript.call_count) self.assertEqual([OP_DUP, OP_HASH160, self.mockB58CheckToHex.return_value, OP_EQUALVERIFY, OP_CHECKSIG], self.mockSerializeScript.call_args[0][0]) self.assertEqual(1, self.mockB58CheckToHex.call_count) self.assertEqual(self.crypto_addr, self.mockB58CheckToHex.call_args[0][0]) self.assertEqual(1, self.mockPluginManager.get_plugin.call_count) self.assertEqual('LOGGER', self.mockPluginManager.get_plugin.call_args[0][0]) self.assertEqual(1, self.mockGetCerts.call_count) self.assertEqual(self.x509_cert, self.mockGetCerts.call_args[0][0]) self.assertEqual(2, self.mockDatetime.utcnow.call_count) self.assertEqual(1, self.mockSigner.sign.call_count) pr = PaymentRequest() pr.ParseFromString(ret_val) self.assertEqual(1, pr.payment_details_version) self.assertEqual('\n\x05cert1\n\x05cert2', pr.pki_data) self.assertEqual('pki_type', pr.pki_type) self.assertEqual('signature', pr.signature) pd = PaymentDetails() pd.ParseFromString(pr.serialized_payment_details) self.assertEqual(1434214800, pd.expires) self.assertEqual('', pd.memo) self.assertEqual('', pd.merchant_data) self.assertEqual('main', pd.network) self.assertEqual('', pd.payment_url) self.assertEqual(1434211200, pd.time) for output in pd.outputs: self.assertEqual(0, output.amount) self.assertEqual('\xbf\xfb\xff\xbf\xfb\xff', output.script) class TestGetUnusedPresignedPaymentRequest(AddressimoTestCase): def setUp(self): self.patcher1 = patch('addressimo.crypto.Redis') self.patcher2 = patch('addressimo.crypto.get_addrs_from_paymentrequest') self.patcher3 = patch('addressimo.crypto.PluginManager') self.mockRedis = self.patcher1.start() self.mockGetAddressFromPR = self.patcher2.start() self.mockPluginManager = self.patcher3.start() self.mockGetAddressFromPR.return_value = ['123456789'] self.id_obj = Mock() self.id_obj.presigned_payment_requests = [ 'PR1'.encode('hex'), 'PR2'.encode('hex') ] self.mockRedis.from_url.return_value.get.return_value = False def test_go_right_no_pr_used(self): ret_val = get_unused_presigned_payment_request(self.id_obj) self.assertEqual('PR1'.encode('hex'), ret_val) self.assertEqual(1, self.mockRedis.from_url.call_count) self.assertEqual(1, self.mockRedis.from_url.return_value.get.call_count) self.assertEqual(1, self.mockGetAddressFromPR.call_count) self.assertEqual(0, self.mockPluginManager.get_plugin.call_count) self.assertEqual(0, self.id_obj.save.call_count) def test_go_right_first_pr_used(self): self.mockRedis.from_url.return_value.get.side_effect = [True, None] ret_val = get_unused_presigned_payment_request(self.id_obj) self.assertEqual('PR2'.encode('hex'), ret_val) self.assertEqual(1, self.mockRedis.from_url.call_count) self.assertEqual(2, self.mockRedis.from_url.return_value.get.call_count) self.assertEqual(2, self.mockGetAddressFromPR.call_count) self.assertEqual(1, self.mockPluginManager.get_plugin.call_count) self.assertEqual('RESOLVER', self.mockPluginManager.get_plugin.call_args[0][0]) self.assertEqual('REDIS', self.mockPluginManager.get_plugin.call_args[0][1]) self.assertEqual(1, self.mockPluginManager.get_plugin.return_value.save.call_count) self.assertEqual(self.id_obj, self.mockPluginManager.get_plugin.return_value.save.call_args[0][0]) self.assertNotIn('PR1'.encode('hex'), self.id_obj.presigned_payment_requests) def test_go_right_all_pr_used(self): self.mockRedis.from_url.return_value.get.side_effect = [True, True] ret_val = get_unused_presigned_payment_request(self.id_obj) self.assertIsNone(ret_val) self.assertEqual(1, self.mockRedis.from_url.call_count) self.assertEqual(2, self.mockRedis.from_url.return_value.get.call_count) self.assertEqual(2, self.mockGetAddressFromPR.call_count) self.assertEqual(1, self.mockPluginManager.get_plugin.call_count) self.assertEqual('RESOLVER', self.mockPluginManager.get_plugin.call_args[0][0]) self.assertEqual('REDIS', self.mockPluginManager.get_plugin.call_args[0][1]) self.assertEqual(1, self.mockPluginManager.get_plugin.return_value.save.call_count) self.assertEqual(self.id_obj, self.mockPluginManager.get_plugin.return_value.save.call_args[0][0]) self.assertNotIn('PR1'.encode('hex'), self.id_obj.presigned_payment_requests) self.assertNotIn('PR2'.encode('hex'), self.id_obj.presigned_payment_requests) class TestGetAddrsFromPaymentRequest(AddressimoTestCase): def setUp(self): self.crypto_addr1 = '1HjDauL2kth6KJUz5vX198Nvp1xN1hgYRb' self.crypto_addr2 = '13HFqPr9Ceh2aBvcjxNdUycHuFG7PReGH4' self.pd = PaymentDetails() output1 = self.pd.outputs.add() output1.script = serialize_script([OP_DUP, OP_HASH160, b58check_to_hex(self.crypto_addr1), OP_EQUALVERIFY, OP_CHECKSIG]).decode('hex') output2 = self.pd.outputs.add() output2.script = serialize_script([OP_DUP, OP_HASH160, b58check_to_hex(self.crypto_addr2), OP_EQUALVERIFY, OP_CHECKSIG]).decode('hex') self.pd.time = int(datetime.utcnow().strftime('%s')) self.pr = PaymentRequest() self.pr.serialized_payment_details = self.pd.SerializeToString() def test_go_right(self): ret_val = get_addrs_from_paymentrequest(self.pr.SerializeToString()) self.assertIn('1HjDauL2kth6KJUz5vX198Nvp1xN1hgYRb', ret_val) self.assertIn('13HFqPr9Ceh2aBvcjxNdUycHuFG7PReGH4', ret_val)
41.246094
154
0.702339
2,547
21,118
5.615626
0.08402
0.201356
0.04999
0.092288
0.853527
0.823534
0.79319
0.775781
0.757603
0.724883
0
0.039404
0.180415
21,118
512
155
41.246094
0.786977
0.001468
0
0.64011
0
0
0.07318
0.035001
0
0
0
0
0.568681
1
0.06044
false
0
0.008242
0
0.085165
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
1
0
0
0
0
0
0
0
0
0
8
ebe8795f7e16dd2873119fd17f5310fb3b54813d
36,633
py
Python
nlte/nde_cvae.py
cdiazbas/bayesflows
c62bf982627453f5c1c43ca954dbc332d502dfef
[ "MIT" ]
4
2021-08-17T10:14:34.000Z
2021-08-19T19:26:01.000Z
nlte/nde_cvae.py
cdiazbas/bayesflows
c62bf982627453f5c1c43ca954dbc332d502dfef
[ "MIT" ]
null
null
null
nlte/nde_cvae.py
cdiazbas/bayesflows
c62bf982627453f5c1c43ca954dbc332d502dfef
[ "MIT" ]
null
null
null
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from torch.nn import init # +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ def _strictly_tril_size(n): """Unique elements outside the diagonal """ return n * (n-1) // 2 # +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ class create_Coder(nn.Module): """Creates a encoder or a decoder according to input parameters """ def __init__(self, input_size, output_size, hidden_size=[64,64], activation=nn.ELU(), full_cov=True, methodfullcov="scale_tril"): super(create_Coder, self).__init__() self.activation = activation self.relu = nn.ReLU() self.elu = nn.ELU() self.sigmoid = nn.Sigmoid() self.tanh = nn.Tanh() self.epsrho = 1e-2 self.full_cov = full_cov self.methodfullcov = methodfullcov # Input layers coder_net_list = [] coder_net_list.append( nn.Linear(input_size, hidden_size[0])) for i in range(1, len(hidden_size)): coder_net_list.append(nn.Linear(hidden_size[i-1], hidden_size[i])) self.coder_net_list = nn.ModuleList(coder_net_list) # Output layers self.output_mu = nn.Linear(hidden_size[-1], output_size) self.output_logvar = nn.Linear(hidden_size[-1], output_size) if self.full_cov is True: self.output_chol_net = nn.Linear(hidden_size[-1], _strictly_tril_size(output_size)) self.lt_indices = torch.tril_indices(output_size, output_size, -1) def forward(self, xx): # Pass through input layers for ii, ilayer in enumerate(self.coder_net_list): xx = self.activation(ilayer(xx)) # Pass through output layers mu = self.output_mu(xx) logvar = -self.elu(self.output_logvar(xx)) if self.full_cov is False: dist = torch.distributions.Independent(torch.distributions.Normal(loc=mu, scale=torch.exp(logvar.mul(0.5))),1) return mu, logvar, dist else: if self.methodfullcov == "scale_tril": rho = self.output_chol_net(xx) diagA = torch.exp(logvar.mul(0.5)) diagB = torch.exp(logvar) diag = torch.diag_embed(diagA) chol = torch.zeros_like(diag) chol[..., self.lt_indices[0], self.lt_indices[1]] = rho chol = chol + diag dist = torch.distributions.MultivariateNormal(loc=mu, scale_tril=chol) elif self.methodfullcov == "covariance_matrix": rho = self.tanh(self.output_chol_net(xx))* (1.0- self.epsrho) diagA = torch.exp(logvar.mul(0.5)) diagB = torch.exp(logvar) diag = torch.diag_embed(diagB) chol = torch.zeros_like(diag) for jj in range(self.lt_indices.shape[1]): chol[..., self.lt_indices[0][jj], self.lt_indices[1][jj]] = rho[:,jj]*diagA[:,self.lt_indices[0][jj]]*diagA[:,self.lt_indices[1][jj]] chol[..., self.lt_indices[1][jj], self.lt_indices[0][jj]] = rho[:,jj]*diagA[:,self.lt_indices[0][jj]]*diagA[:,self.lt_indices[1][jj]] chol = chol + diag # torch.cholesky(chol) dist = torch.distributions.MultivariateNormal(loc=mu, covariance_matrix=chol) return mu, [logvar, rho], dist # +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ class CVAE(nn.Module): """Conditional Variational Autoencoder (CVAE) """ def __init__(self, y_size, x_size, latent_size, full_cov=True, hidden_size = [64, 64, 64], train_loader=None, methodfullcov="scale_tril"): super(CVAE, self).__init__() self.y_size = y_size self.x_size = x_size self.latent_size = latent_size self.hidden_size = hidden_size self.full_cov = full_cov self.relu = nn.ReLU() self.sigmoid = nn.Sigmoid() self.tanh = nn.Tanh() self.device = torch.device("cuda" if torch.cuda.is_available() else "cpu") self.methodfullcov = methodfullcov self.encoder1_ = create_Coder(self.x_size, self.latent_size, full_cov=False, hidden_size=self.hidden_size) self.encoder2_ = create_Coder(self.y_size + self.x_size, self.latent_size, full_cov=False, hidden_size=self.hidden_size) self.decoder_ = create_Coder(self.latent_size + self.x_size, self.y_size, full_cov=self.full_cov, hidden_size=self.hidden_size,methodfullcov=self.methodfullcov) if self.full_cov is True: self.lt_indices = self.decoder_.lt_indices if train_loader is not None: self.x_std = train_loader.dataset.observations.std((0,1)) self.y_std = train_loader.dataset.modelparameters.std((0)) else: self.y_std = 1.0 self.x_std = 1.0 def encode1(self, x): # x # Conditional Prior network mu_E , logvar_E, dum = self.encoder1_(x) return mu_E, logvar_E def encode2(self, x, y): # y + x # Recognition network inputs = torch.cat([x, y], 1) mu_K, logvar_K, dum = self.encoder2_(inputs) return mu_K, logvar_K def reparametrize(self, mu, logvar): std = torch.exp(logvar.mul(0.5)) eps = torch.empty_like(std).normal_() eps.to(self.device) return eps.mul(std).add_(mu) def decode(self, z, x): # Generation network inputs = torch.cat([z, x], 1) # (bs, latent_size+class_size) mu_D, logvar_D, dist = self.decoder_(inputs) return mu_D, logvar_D, dist def forward(self, y, x, split=False): y = y/self.y_std x = x/self.x_std mu_E, logvar_E = self.encode1(x.view(-1, self.x_size)) mu_K, logvar_K = self.encode2(x.view(-1, self.x_size), y) z = self.reparametrize(mu_K, logvar_K) mu_D, logvar_D, dist = self.decode(z,x) loss, i_rec, i_kld = self.loss_function(y, dist, mu_K, logvar_K, mu_E, logvar_E) if split == False: return loss else: return loss, i_rec, i_kld def loss_function(self, y, dist, mu_K, logvar_K, mu_E, logvar_E): # Reconstruction loss neg_logp_total = dist.log_prob(y) rec = -torch.mean(neg_logp_total) # KL divergence loss var_K = logvar_K.exp() var_E = logvar_E.exp() kl_div = var_K/var_E + (mu_K - mu_E)**2.0 / var_E + logvar_E - logvar_K - 1.0 kld = torch.mean(kl_div.sum(dim=1) / 2.0) return rec+kld, rec, kld def sample(self, x): # Forward pass x = x/self.x_std mu_E, logvar_E = self.encode1(x.view(-1, self.x_size)) z = self.reparametrize(mu_E, logvar_E) mu_D, logvar_D, dist = self.decode(z,x) return dist.sample()*self.y_std # +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ class GSNN(nn.Module): """Gaussian Stochastic Neural network (GSNN) """ # It is like CVAE but without the recognition encoder def __init__(self, y_size, x_size, latent_size, full_cov=True, hidden_size = [64, 64, 64], train_loader=None, methodfullcov="scale_tril"): super(GSNN, self).__init__() self.y_size = y_size self.x_size = x_size self.latent_size = latent_size self.hidden_size = hidden_size self.full_cov = full_cov self.relu = nn.ReLU() self.sigmoid = nn.Sigmoid() self.tanh = nn.Tanh() self.device = torch.device("cuda" if torch.cuda.is_available() else "cpu") self.methodfullcov = methodfullcov self.encoder1_ = create_Coder(self.x_size, self.latent_size, full_cov=False, hidden_size=self.hidden_size) self.decoder_ = create_Coder(self.latent_size + self.x_size, self.y_size, full_cov=self.full_cov, hidden_size=self.hidden_size,methodfullcov=self.methodfullcov) if self.full_cov is True: self.lt_indices = self.decoder_.lt_indices if train_loader is not None: self.x_std = train_loader.dataset.observations.std((0,1)) self.y_std = train_loader.dataset.modelparameters.std((0)) else: self.y_std = 1.0 self.x_std = 1.0 def encode1(self, x): # x # Conditional Prior network mu_E , logvar_E, dum = self.encoder1_(x) return mu_E, logvar_E def reparametrize(self, mu, logvar): std = torch.exp(logvar.mul(0.5)) eps = torch.empty_like(std).normal_() eps.to(self.device) return eps.mul(std).add_(mu) def decode(self, z, x): # Generation network inputs = torch.cat([z, x], 1) # (bs, latent_size+class_size) mu_D, logvar_D, dist = self.decoder_(inputs) return mu_D, logvar_D, dist def forward(self, y, x): y = y/self.y_std x = x/self.x_std mu_E, logvar_E = self.encode1(x.view(-1, self.x_size)) z = self.reparametrize(mu_E, logvar_E) mu_D, logvar_D, dist = self.decode(z,x) loss, i_rec, i_kld = self.loss_function(y, dist, mu_E, logvar_E, mu_E, logvar_E) return loss def loss_function(self, y, dist, mu_K, logvar_K, mu_E, logvar_E): # Reconstruction loss neg_logp_total = dist.log_prob(y) rec = -torch.mean(neg_logp_total) # KL divergence loss = 0 kld = torch.zeros([1], dtype=torch.int32) return rec+kld, rec, kld def sample(self, x): # Forward pass x = x/self.x_std mu_E, logvar_E = self.encode1(x.view(-1, self.x_size)) z = self.reparametrize(mu_E, logvar_E) mu_D, logvar_D, dist = self.decode(z,x) # Sampling return dist.sample()*self.y_std # +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ class GDNN(nn.Module): """Gaussian Deterministic Neural network (GDNN) """ # It is like CVAE but without the recognition encoder and without the reparameterization trick def __init__(self, y_size, x_size, latent_size, full_cov=True, hidden_size = [64, 64, 64], train_loader=None, methodfullcov="scale_tril"): super(GDNN, self).__init__() self.y_size = y_size self.x_size = x_size self.latent_size = latent_size self.hidden_size = hidden_size self.full_cov = full_cov self.relu = nn.ReLU() self.sigmoid = nn.Sigmoid() self.tanh = nn.Tanh() self.device = torch.device("cuda" if torch.cuda.is_available() else "cpu") self.methodfullcov = methodfullcov self.decoder_ = create_Coder(self.x_size, self.y_size, full_cov=self.full_cov, hidden_size=self.hidden_size,methodfullcov=self.methodfullcov) if self.full_cov is True: self.lt_indices = self.decoder_.lt_indices if train_loader is not None: print('[INFO] Normalizing to training set') self.x_std = train_loader.dataset.modelparameters.std((0)) self.x_mean = train_loader.dataset.modelparameters.mean((0)) self.y_std = train_loader.dataset.observations.std((0)) self.y_mean = train_loader.dataset.observations.mean((0)) else: self.y_std = 1.0 self.y_mean = 0.0 self.x_std = 1.0 self.x_mean = 0.0 def forward(self, y, x): y = (y-self.y_mean)/self.y_std x = (x-self.x_mean)/self.x_std mu_D, logvar_D, dist = self.decoder_(x) return self.loss_function(y, dist) def loss_function(self, y, dist): # Reconstruction loss neg_logp_total = dist.log_prob(y) return -torch.mean(neg_logp_total) def sample(self, x): # Forward pass x = (x-self.x_mean)/self.x_std mu_D, logvar_D, dist = self.decoder_(x) # Sampling return dist.sample()*self.y_std + self.y_mean def obtain_samples(self, x, nsamples): # Forward pass x = (x-self.x_mean)/self.x_std x = torch.from_numpy(x).unsqueeze(0)#.to(device) mu_D, logvar_D, dist = self.decoder_(x) return dist.sample((nsamples,))*self.y_std + self.y_mean # +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ class ResidualBlock(nn.Module): """A general-purpose residual block. Works only with 1-dim inputs.""" def __init__( self, features, context_features, activation=F.relu, dropout_probability=0.0, use_batch_norm=False, zero_initialization=True, ): super().__init__() self.activation = activation self.use_batch_norm = use_batch_norm if use_batch_norm: self.batch_norm_layers = nn.ModuleList( [nn.BatchNorm1d(features, eps=1e-3) for _ in range(2)] ) if context_features is not None: self.context_layer = nn.Linear(context_features, features) self.linear_layers = nn.ModuleList( [nn.Linear(features, features) for _ in range(2)] ) self.dropout = nn.Dropout(p=dropout_probability) if zero_initialization: init.uniform_(self.linear_layers[-1].weight, -1e-3, 1e-3) init.uniform_(self.linear_layers[-1].bias, -1e-3, 1e-3) def forward(self, inputs, context=None): temps = inputs if self.use_batch_norm: temps = self.batch_norm_layers[0](temps) temps = self.activation(temps) temps = self.linear_layers[0](temps) if self.use_batch_norm: temps = self.batch_norm_layers[1](temps) temps = self.activation(temps) temps = self.dropout(temps) temps = self.linear_layers[1](temps) if context is not None: temps = F.glu(torch.cat((temps, self.context_layer(context)), dim=1), dim=1) return inputs + temps class ResidualNet(nn.Module): """A general-purpose residual network. Works only with 1-dim inputs.""" def __init__( self, in_features, out_features, hidden_features, context_features=None, num_blocks=2, activation=F.elu, dropout_probability=0.0, use_batch_norm=False, zero_initialization=True, train_loader=None, ): super().__init__() self.hidden_features = hidden_features self.context_features = context_features if context_features is not None: self.initial_layer = nn.Linear( in_features + context_features, hidden_features ) else: self.initial_layer = nn.Linear(in_features, hidden_features) self.blocks = nn.ModuleList( [ ResidualBlock( features=hidden_features, context_features=context_features, activation=activation, dropout_probability=dropout_probability, use_batch_norm=use_batch_norm, zero_initialization=zero_initialization, ) for _ in range(num_blocks) ] ) self.output_mu = nn.Linear(hidden_features, out_features) self.output_logvar = nn.Linear(hidden_features, out_features) if train_loader is not None: print('[INFO] Normalizing to training set') self.x_std = train_loader.dataset.modelparameters.std((0)) self.x_mean = train_loader.dataset.modelparameters.mean((0)) self.y_std = train_loader.dataset.observations.std((0)) self.y_mean = train_loader.dataset.observations.mean((0)) else: self.y_std = 1.0 self.y_mean = 0.0 self.x_std = 1.0 self.x_mean = 0.0 # print(self.y_std) # print(self.x_std) self.l1loss = nn.L1Loss() self.l1loss = nn.MSELoss() def forward_mu(self, inputs, context=None): if context is None: temps = self.initial_layer(inputs) else: temps = self.initial_layer(torch.cat((inputs, context), dim=1)) for block in self.blocks: temps = block(temps, context=context) # Pass through output layers mu = self.output_mu(temps) logvar = self.output_logvar(temps) return mu def forwardX(self, inputs, context=None): if context is None: temps = self.initial_layer(inputs) else: temps = self.initial_layer(torch.cat((inputs, context), dim=1)) for block in self.blocks: temps = block(temps, context=context) # Pass through output layers mu = self.output_mu(temps) logvar = self.output_logvar(temps) dist = torch.distributions.Independent(torch.distributions.Normal(loc=mu, scale=torch.exp(logvar.mul(0.5))),1) return dist def forward(self, y, x): y = (y-self.y_mean)/self.y_std x = (x-self.x_mean)/self.x_std dist = self.forwardX(x) return self.loss_function(y, dist) def loss_function(self, y, dist): # Reconstruction loss neg_logp_total = dist.log_prob(y) return -torch.mean(neg_logp_total) def sample(self, x): # Forward pass x = (x-self.x_mean)/self.x_std dist = self.forwardX(x) # Sampling return dist.sample()*self.y_std + self.y_mean def obtain_samples(self, x, nsamples): # Forward pass x = (x-self.x_mean)/self.x_std x = torch.from_numpy(x).unsqueeze(0)#.to(device) dist = self.forwardX(x) return dist.sample((nsamples,))*self.y_std + self.y_mean def evaluate(self, x): # y = (y-self.y_mean)/self.y_std if torch.is_tensor(x) is False: x = torch.from_numpy(x).unsqueeze(0)#.to(device) x = (x-self.x_mean)/self.x_std # x = torch.from_numpy(x).unsqueeze(0)#.to(device) return self.forward_mu(x).detach().numpy()*self.y_std + self.y_mean def forward_mse(self, y, x): y = (y-self.y_mean)/self.y_std x = (x-self.x_mean)/self.x_std mu = self.forward_mu(x) return self.loss_function_mse(y, mu) def loss_function_mse(self, y, dist): # print(y.shape,dist.shape) # return +torch.mean(torch.abs(y - dist)) return self.l1loss(y,dist) class ResidualNet2(nn.Module): """A general-purpose residual network. Works only with 1-dim inputs. Only mu!""" def __init__( self, in_features, out_features, hidden_features, context_features=None, num_blocks=2, activation=F.elu, dropout_probability=0.0, use_batch_norm=False, zero_initialization=True, train_loader=None, ): super().__init__() self.hidden_features = hidden_features self.context_features = context_features if context_features is not None: self.initial_layer = nn.Linear( in_features + context_features, hidden_features ) else: self.initial_layer = nn.Linear(in_features, hidden_features) self.blocks = nn.ModuleList( [ ResidualBlock( features=hidden_features, context_features=context_features, activation=activation, dropout_probability=dropout_probability, use_batch_norm=use_batch_norm, zero_initialization=zero_initialization, ) for _ in range(num_blocks) ] ) self.output_mu = nn.Linear(hidden_features, out_features) if train_loader is not None: print('[INFO] Normalizing to training set') self.x_std = train_loader.dataset.modelparameters.std((0)) self.x_mean = train_loader.dataset.modelparameters.mean((0)) self.y_std = train_loader.dataset.observations.std((0)) self.y_mean = train_loader.dataset.observations.mean((0)) else: self.y_std = 1.0 self.y_mean = 0.0 self.x_std = 1.0 self.x_mean = 0.0 # self.l1loss = nn.L1Loss() self.l1loss = nn.MSELoss() def forward_mu(self, inputs, context=None): if context is None: temps = self.initial_layer(inputs) else: temps = self.initial_layer(torch.cat((inputs, context), dim=1)) for block in self.blocks: temps = block(temps, context=context) # Pass through output layers mu = self.output_mu(temps) return mu def obtain_samples(self, x, nsamples): # Forward pass x = (x-self.x_mean)/self.x_std x = torch.from_numpy(x).unsqueeze(0)#.to(device) dist = self.forward_mu(x) return torch.unsqueeze(dist, 0).detach().numpy()*self.y_std + self.y_mean def evaluate(self, x): # y = (y-self.y_mean)/self.y_std if torch.is_tensor(x) is False: x = torch.from_numpy(x).unsqueeze(0)#.to(device) x = (x-self.x_mean)/self.x_std # x = torch.from_numpy(x).unsqueeze(0)#.to(device) return self.forward_mu(x).detach().numpy()*self.y_std + self.y_mean def forward_mse(self, y, x): y = (y-self.y_mean)/self.y_std x = (x-self.x_mean)/self.x_std mu = self.forward_mu(x) return self.loss_function_mse(y, mu) def loss_function_mse(self, y, dist): # return +torch.mean(torch.abs(y - dist)) return self.l1loss(y,dist) class ResidualNet3(nn.Module): """A general-purpose residual network. Works only with 1-dim inputs. 1 trainable Fourier""" def __init__( self, in_features, out_features, hidden_features, context_features=None, num_blocks=2, activation=F.elu, dropout_probability=0.0, use_batch_norm=False, zero_initialization=True, train_loader=None, ): super().__init__() fourier = 2 in_features = int(fourier*in_features) self.hidden_features = hidden_features self.context_features = context_features if context_features is not None: self.initial_layer = nn.Linear( in_features + context_features, hidden_features ) else: self.initial_layer = nn.Linear(in_features, hidden_features) self.blocks = nn.ModuleList( [ ResidualBlock( features=hidden_features, context_features=context_features, activation=activation, dropout_probability=dropout_probability, use_batch_norm=use_batch_norm, zero_initialization=zero_initialization, ) for _ in range(num_blocks) ] ) self.output_mu = nn.Linear(hidden_features, out_features) if train_loader is not None: print('[INFO] Normalizing to training set') self.x_std = train_loader.dataset.modelparameters.std((0)) self.x_mean = train_loader.dataset.modelparameters.mean((0)) self.y_std = train_loader.dataset.observations.std((0)) self.y_mean = train_loader.dataset.observations.mean((0)) else: self.y_std = 1.0 self.y_mean = 0.0 self.x_std = 1.0 self.x_mean = 0.0 # self.l1loss = nn.L1Loss() self.l1loss = nn.MSELoss() self.register_parameter(name='A0', param=torch.nn.Parameter(torch.randn(int(in_features/fourier)))) self.register_parameter(name='w0', param=torch.nn.Parameter(torch.randn(int(in_features/fourier)))) self.register_parameter(name='b0', param=torch.nn.Parameter(torch.randn(int(in_features/fourier)))) # print('in_features',in_features) def forward_mu(self, inputs, context=None): # print(inputs.max((0))) # print(self.w0) # print(inputs.shape) # print(torch.sin(inputs).shape) # print(torch.sin(self.w0*inputs).shape) inputs = torch.cat((inputs, 3*self.A0*torch.sin(self.w0*inputs+self.b0)), dim=1) # print(inputs.max()) if context is None: temps = self.initial_layer(inputs) else: temps = self.initial_layer(torch.cat((inputs, context), dim=1)) for block in self.blocks: temps = block(temps, context=context) # Pass through output layers mu = self.output_mu(temps) return mu def obtain_samples(self, x, nsamples): # Forward pass x = (x-self.x_mean)/self.x_std x = torch.from_numpy(x).unsqueeze(0)#.to(device) dist = self.forward_mu(x) return torch.unsqueeze(dist, 0).detach().numpy()*self.y_std + self.y_mean def evaluate(self, x): # y = (y-self.y_mean)/self.y_std # print('---------') # print(self.w0) # print(self.A0) # print(self.b0) # print('---------') if torch.is_tensor(x) is False: x = torch.from_numpy(x).unsqueeze(0)#.to(device) x = (x-self.x_mean)/self.x_std # x = torch.from_numpy(x).unsqueeze(0)#.to(device) return self.forward_mu(x).detach().numpy()*self.y_std + self.y_mean def forward_mse(self, y, x): y = (y-self.y_mean)/self.y_std x = (x-self.x_mean)/self.x_std mu = self.forward_mu(x) return self.loss_function_mse(y, mu) def loss_function_mse(self, y, dist): # return +torch.mean(torch.abs(y - dist)) return self.l1loss(y,dist) class ResidualNet4(nn.Module): """A general-purpose residual network. Works only with 1-dim inputs. Fourier feature""" def __init__( self, in_features, out_features, hidden_features, context_features=None, num_blocks=2, activation=F.elu, dropout_probability=0.0, use_batch_norm=False, zero_initialization=True, train_loader=None, fourier = 128, trainble=True, matrix=True, ): super().__init__() self.matrix = matrix in_features_ori = int(in_features*1.0) in_features = int(fourier*in_features) if self.matrix: in_features = int(fourier-1 + in_features_ori) self.hidden_features = hidden_features self.context_features = context_features if context_features is not None: self.initial_layer = nn.Linear( in_features + context_features, hidden_features ) else: self.initial_layer = nn.Linear(in_features, hidden_features) self.blocks = nn.ModuleList( [ ResidualBlock( features=hidden_features, context_features=context_features, activation=activation, dropout_probability=dropout_probability, use_batch_norm=use_batch_norm, zero_initialization=zero_initialization, ) for _ in range(num_blocks) ] ) self.output_mu = nn.Linear(hidden_features, out_features) if train_loader is not None: print('[INFO] Normalizing to training set') self.x_std = train_loader.dataset.modelparameters.std((0)) self.x_mean = train_loader.dataset.modelparameters.mean((0)) self.y_std = train_loader.dataset.observations.std((0)) self.y_mean = train_loader.dataset.observations.mean((0)) else: self.y_std = 1.0 self.y_mean = 0.0 self.x_std = 1.0 self.x_mean = 0.0 # self.l1loss = nn.L1Loss() self.l1loss = nn.MSELoss() # self.register_parameter(name='A0', param=torch.nn.Parameter(torch.randn(int(fourier-1),in_features_ori)), requires_grad=False) # self.register_parameter(name='w0', param=torch.nn.Parameter(torch.randn(int(fourier-1),in_features_ori))) # self.register_parameter(name='b0', param=torch.nn.Parameter(torch.randn(int(fourier-1),in_features_ori))) self.A0 = nn.Parameter(torch.nn.Parameter(torch.randn(int(fourier-1),in_features_ori)), requires_grad=trainble ) self.w0 = nn.Parameter(torch.nn.Parameter(torch.randn(int(fourier-1),in_features_ori)), requires_grad=trainble ) self.b0 = nn.Parameter(torch.nn.Parameter(torch.randn(int(fourier-1),in_features_ori)), requires_grad=trainble ) print('[X] in_features',in_features) print('[X] in_features_ori',in_features_ori) print('[X] fourier',fourier) print('[X] trainble',trainble) # print('[X] (fourier-1)*in_features_ori',(fourier-1)*in_features_ori) print('') def forward_mu(self, inputs, context=None): # print(inputs.max((0))) # print(self.w0) # x_proj = (2. * np.pi * x) @ B.t() # print(self.A0) # print(inputs.shape) # print(self.A0.shape) # if self.matrix: # (self.A0 @ inputs.t()) if self.matrix is True: nA0 = (self.A0 @ inputs.t()).t() nw0 = (self.w0 @ inputs.t()).t() nb0 = (self.b0 @ torch.ones_like(inputs).t()).t() ninput = nA0* torch.sin(nw0+nb0) inputs = torch.cat((inputs,ninput), dim=1) # new_tensor = torch.cat(inputs.shape[0]*[self.A0]) # new_tensor = self.A0.repeat(inputs.shape[0], 1, 1).t()*inputs # print('new_tensor',new_tensor.shape) # new_tensor torch.Size([12700, 27]) # ninput = self.A0.repeat(inputs.shape[0], 1, 1)*torch.sin(self.w0.repeat(inputs.shape[0], 1, 1)*inputs+self.b0.repeat(inputs.shape[0], 1, 1)) # print('ninput',ninput.shape) # print( (self.A0[0,:]*inputs).shape ) # print(self.A0.shape[0]) # print( ' torch.cat((inputs, self.A0[0,:]*inputs), dim=1)', torch.cat((inputs, self.A0[0,:]*inputs), dim=1)) else: for jj in range(self.A0.shape[0]): inputs = torch.cat((inputs, self.A0[jj,:]*torch.sin(self.w0[jj,:]*inputs[:,:self.A0.shape[1]]+self.b0[jj,:]) ), dim=1) # print(torch.sin(inputs).shape) # print(torch.sin(self.w0*inputs).shape) # print('after',inputs.shape) # inputs = torch.cat((inputs, 3*self.A0*torch.sin(self.w0*inputs+self.b0)), dim=1) # print(inputs.max()) if context is None: temps = self.initial_layer(inputs) else: temps = self.initial_layer(torch.cat((inputs, context), dim=1)) for block in self.blocks: temps = block(temps, context=context) # Pass through output layers mu = self.output_mu(temps) return mu def obtain_samples(self, x, nsamples): # Forward pass x = (x-self.x_mean)/self.x_std x = torch.from_numpy(x).unsqueeze(0)#.to(device) dist = self.forward_mu(x) return torch.unsqueeze(dist, 0).detach().numpy()*self.y_std + self.y_mean def evaluate(self, x): # y = (y-self.y_mean)/self.y_std # print('---------') # print(self.w0) # print(self.A0) # print(self.b0) # print('---------') if torch.is_tensor(x) is False: x = torch.from_numpy(x)#.to(device) if len(x.shape)<1.5: x = x.unsqueeze(0) x = (x-self.x_mean)/self.x_std # x = torch.from_numpy(x).unsqueeze(0)#.to(device) if x.shape[0] ==1: return self.forward_mu(x)[0,:].detach().numpy()*self.y_std + self.y_mean else: return self.forward_mu(x).detach().numpy()*self.y_std + self.y_mean def forward_mse(self, y, x): y = (y-self.y_mean)/self.y_std x = (x-self.x_mean)/self.x_std mu = self.forward_mu(x) return self.loss_function_mse(y, mu) def loss_function_mse(self, y, dist): # return +torch.mean(torch.abs(y - dist)) return self.l1loss(y,dist) class ResidualNet5(nn.Module): """A general-purpose residual network. Works only with 1-dim inputs. Only mu!""" def __init__( self, in_features, out_features, hidden_features, context_features=None, num_blocks=2, activation=F.elu, dropout_probability=0.0, use_batch_norm=False, zero_initialization=True, train_loader=None, input_encoder=None, ): super().__init__() self.hidden_features = hidden_features self.context_features = context_features if context_features is not None: self.initial_layer = nn.Linear( in_features + context_features, hidden_features ) else: self.initial_layer = nn.Linear(in_features, hidden_features) self.blocks = nn.ModuleList( [ ResidualBlock( features=hidden_features, context_features=context_features, activation=activation, dropout_probability=dropout_probability, use_batch_norm=use_batch_norm, zero_initialization=zero_initialization, ) for _ in range(num_blocks) ] ) self.output_mu = nn.Linear(hidden_features, out_features) if train_loader is not None: print('[INFO] Normalizing to training set') self.x_std = train_loader.dataset.modelparameters.std((0)) self.x_mean = train_loader.dataset.modelparameters.mean((0)) self.y_std = train_loader.dataset.observations.std((0)) self.y_mean = train_loader.dataset.observations.mean((0)) else: self.y_std = 1.0 self.y_mean = 0.0 self.x_std = 1.0 self.x_mean = 0.0 # self.l1loss = nn.L1Loss() self.l1loss = nn.MSELoss() if input_encoder is not None: print('[INFO] Using a pretrained input encoder') self.input_encoder = torch.load(input_encoder) for parami in self.input_encoder.parameters(): parami.requires_grad = False self.y_std = self.input_encoder.y_std self.y_mean = self.input_encoder.y_mean self.x_std = self.input_encoder.x_std self.x_mean = self.input_encoder.x_mean self.input_encoder.x_std = 1.0 self.input_encoder.x_mean = 0.0 self.input_encoder.y_std = 1.0 self.input_encoder.y_mean = 0.0 def forward_mu(self, inputs, context=None): sinputs = torch.from_numpy(self.input_encoder.evaluate(inputs)) if context is None: temps = self.initial_layer(inputs) else: temps = self.initial_layer(torch.cat((inputs, context), dim=1)) for block in self.blocks: temps = block(temps, context=context) # Pass through output layers mu = self.output_mu(temps) return mu+sinputs def obtain_samples(self, x, nsamples): # Forward pass x = (x-self.x_mean)/self.x_std x = torch.from_numpy(x).unsqueeze(0)#.to(device) dist = self.forward_mu(x) return torch.unsqueeze(dist, 0).detach().numpy()*self.y_std + self.y_mean def evaluate(self, x): # y = (y-self.y_mean)/self.y_std if torch.is_tensor(x) is False: x = torch.from_numpy(x).unsqueeze(0)#.to(device) x = (x-self.x_mean)/self.x_std # x = torch.from_numpy(x).unsqueeze(0)#.to(device) return self.forward_mu(x).detach().numpy()*self.y_std + self.y_mean def forward_mse(self, y, x): y = (y-self.y_mean)/self.y_std x = (x-self.x_mean)/self.x_std mu = self.forward_mu(x) return self.loss_function_mse(y, mu) def loss_function_mse(self, y, dist): # return +torch.mean(torch.abs(y - dist)) return self.l1loss(y,dist)
35.774414
153
0.583681
4,809
36,633
4.237887
0.055729
0.028214
0.018842
0.008243
0.844603
0.814671
0.786016
0.772375
0.766438
0.752993
0
0.014917
0.286327
36,633
1,023
154
35.809384
0.764611
0.125816
0
0.752475
0
0
0.012374
0
0
0
0
0
0
1
0.083451
false
0
0.007072
0.007072
0.178218
0.016973
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
ccf6c8308c0748656b1317ca366ed5b4daaa3e9b
90,206
py
Python
google/ads/google_ads/v6/proto/common/segments_pb2.py
arammaliachi/google-ads-python
a4fe89567bd43eb784410523a6306b5d1dd9ee67
[ "Apache-2.0" ]
null
null
null
google/ads/google_ads/v6/proto/common/segments_pb2.py
arammaliachi/google-ads-python
a4fe89567bd43eb784410523a6306b5d1dd9ee67
[ "Apache-2.0" ]
null
null
null
google/ads/google_ads/v6/proto/common/segments_pb2.py
arammaliachi/google-ads-python
a4fe89567bd43eb784410523a6306b5d1dd9ee67
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/ads/googleads/v6/common/segments.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() from google.ads.google_ads.v6.proto.common import criteria_pb2 as google_dot_ads_dot_googleads_dot_v6_dot_common_dot_criteria__pb2 from google.ads.google_ads.v6.proto.enums import ad_destination_type_pb2 as google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_ad__destination__type__pb2 from google.ads.google_ads.v6.proto.enums import ad_network_type_pb2 as google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_ad__network__type__pb2 from google.ads.google_ads.v6.proto.enums import budget_campaign_association_status_pb2 as google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_budget__campaign__association__status__pb2 from google.ads.google_ads.v6.proto.enums import click_type_pb2 as google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_click__type__pb2 from google.ads.google_ads.v6.proto.enums import conversion_action_category_pb2 as google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_conversion__action__category__pb2 from google.ads.google_ads.v6.proto.enums import conversion_attribution_event_type_pb2 as google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_conversion__attribution__event__type__pb2 from google.ads.google_ads.v6.proto.enums import conversion_lag_bucket_pb2 as google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_conversion__lag__bucket__pb2 from google.ads.google_ads.v6.proto.enums import conversion_or_adjustment_lag_bucket_pb2 as google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_conversion__or__adjustment__lag__bucket__pb2 from google.ads.google_ads.v6.proto.enums import day_of_week_pb2 as google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_day__of__week__pb2 from google.ads.google_ads.v6.proto.enums import device_pb2 as google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_device__pb2 from google.ads.google_ads.v6.proto.enums import external_conversion_source_pb2 as google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_external__conversion__source__pb2 from google.ads.google_ads.v6.proto.enums import hotel_date_selection_type_pb2 as google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_hotel__date__selection__type__pb2 from google.ads.google_ads.v6.proto.enums import hotel_price_bucket_pb2 as google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_hotel__price__bucket__pb2 from google.ads.google_ads.v6.proto.enums import hotel_rate_type_pb2 as google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_hotel__rate__type__pb2 from google.ads.google_ads.v6.proto.enums import month_of_year_pb2 as google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_month__of__year__pb2 from google.ads.google_ads.v6.proto.enums import placeholder_type_pb2 as google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_placeholder__type__pb2 from google.ads.google_ads.v6.proto.enums import product_channel_pb2 as google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_product__channel__pb2 from google.ads.google_ads.v6.proto.enums import product_channel_exclusivity_pb2 as google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_product__channel__exclusivity__pb2 from google.ads.google_ads.v6.proto.enums import product_condition_pb2 as google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_product__condition__pb2 from google.ads.google_ads.v6.proto.enums import search_engine_results_page_type_pb2 as google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_search__engine__results__page__type__pb2 from google.ads.google_ads.v6.proto.enums import search_term_match_type_pb2 as google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_search__term__match__type__pb2 from google.ads.google_ads.v6.proto.enums import slot_pb2 as google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_slot__pb2 from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 DESCRIPTOR = _descriptor.FileDescriptor( name='google/ads/googleads/v6/common/segments.proto', package='google.ads.googleads.v6.common', syntax='proto3', serialized_options=b'\n\"com.google.ads.googleads.v6.commonB\rSegmentsProtoP\001ZDgoogle.golang.org/genproto/googleapis/ads/googleads/v6/common;common\242\002\003GAA\252\002\036Google.Ads.GoogleAds.V6.Common\312\002\036Google\\Ads\\GoogleAds\\V6\\Common\352\002\"Google::Ads::GoogleAds::V6::Common', create_key=_descriptor._internal_create_key, serialized_pb=b'\n-google/ads/googleads/v6/common/segments.proto\x12\x1egoogle.ads.googleads.v6.common\x1a-google/ads/googleads/v6/common/criteria.proto\x1a\x37google/ads/googleads/v6/enums/ad_destination_type.proto\x1a\x33google/ads/googleads/v6/enums/ad_network_type.proto\x1a\x46google/ads/googleads/v6/enums/budget_campaign_association_status.proto\x1a.google/ads/googleads/v6/enums/click_type.proto\x1a>google/ads/googleads/v6/enums/conversion_action_category.proto\x1a\x45google/ads/googleads/v6/enums/conversion_attribution_event_type.proto\x1a\x39google/ads/googleads/v6/enums/conversion_lag_bucket.proto\x1aGgoogle/ads/googleads/v6/enums/conversion_or_adjustment_lag_bucket.proto\x1a/google/ads/googleads/v6/enums/day_of_week.proto\x1a*google/ads/googleads/v6/enums/device.proto\x1a>google/ads/googleads/v6/enums/external_conversion_source.proto\x1a=google/ads/googleads/v6/enums/hotel_date_selection_type.proto\x1a\x36google/ads/googleads/v6/enums/hotel_price_bucket.proto\x1a\x33google/ads/googleads/v6/enums/hotel_rate_type.proto\x1a\x31google/ads/googleads/v6/enums/month_of_year.proto\x1a\x34google/ads/googleads/v6/enums/placeholder_type.proto\x1a\x33google/ads/googleads/v6/enums/product_channel.proto\x1a?google/ads/googleads/v6/enums/product_channel_exclusivity.proto\x1a\x35google/ads/googleads/v6/enums/product_condition.proto\x1a\x43google/ads/googleads/v6/enums/search_engine_results_page_type.proto\x1a:google/ads/googleads/v6/enums/search_term_match_type.proto\x1a(google/ads/googleads/v6/enums/slot.proto\x1a\x1cgoogle/api/annotations.proto\"\x96+\n\x08Segments\x12\x64\n\x13\x61\x64_destination_type\x18\x88\x01 \x01(\x0e\x32\x46.google.ads.googleads.v6.enums.AdDestinationTypeEnum.AdDestinationType\x12W\n\x0f\x61\x64_network_type\x18\x03 \x01(\x0e\x32>.google.ads.googleads.v6.enums.AdNetworkTypeEnum.AdNetworkType\x12l\n\"budget_campaign_association_status\x18\x86\x01 \x01(\x0b\x32?.google.ads.googleads.v6.common.BudgetCampaignAssociationStatus\x12J\n\nclick_type\x18\x1a \x01(\x0e\x32\x36.google.ads.googleads.v6.enums.ClickTypeEnum.ClickType\x12\x1e\n\x11\x63onversion_action\x18q \x01(\tH\x00\x88\x01\x01\x12x\n\x1a\x63onversion_action_category\x18\x35 \x01(\x0e\x32T.google.ads.googleads.v6.enums.ConversionActionCategoryEnum.ConversionActionCategory\x12#\n\x16\x63onversion_action_name\x18r \x01(\tH\x01\x88\x01\x01\x12\"\n\x15\x63onversion_adjustment\x18s \x01(\x08H\x02\x88\x01\x01\x12\x8b\x01\n!conversion_attribution_event_type\x18\x02 \x01(\x0e\x32`.google.ads.googleads.v6.enums.ConversionAttributionEventTypeEnum.ConversionAttributionEventType\x12i\n\x15\x63onversion_lag_bucket\x18\x32 \x01(\x0e\x32J.google.ads.googleads.v6.enums.ConversionLagBucketEnum.ConversionLagBucket\x12\x8f\x01\n#conversion_or_adjustment_lag_bucket\x18\x33 \x01(\x0e\x32\x62.google.ads.googleads.v6.enums.ConversionOrAdjustmentLagBucketEnum.ConversionOrAdjustmentLagBucket\x12\x11\n\x04\x64\x61te\x18O \x01(\tH\x03\x88\x01\x01\x12K\n\x0b\x64\x61y_of_week\x18\x05 \x01(\x0e\x32\x36.google.ads.googleads.v6.enums.DayOfWeekEnum.DayOfWeek\x12@\n\x06\x64\x65vice\x18\x01 \x01(\x0e\x32\x30.google.ads.googleads.v6.enums.DeviceEnum.Device\x12x\n\x1a\x65xternal_conversion_source\x18\x37 \x01(\x0e\x32T.google.ads.googleads.v6.enums.ExternalConversionSourceEnum.ExternalConversionSource\x12\x1f\n\x12geo_target_airport\x18t \x01(\tH\x04\x88\x01\x01\x12\x1e\n\x11geo_target_canton\x18u \x01(\tH\x05\x88\x01\x01\x12\x1c\n\x0fgeo_target_city\x18v \x01(\tH\x06\x88\x01\x01\x12\x1f\n\x12geo_target_country\x18w \x01(\tH\x07\x88\x01\x01\x12\x1e\n\x11geo_target_county\x18x \x01(\tH\x08\x88\x01\x01\x12 \n\x13geo_target_district\x18y \x01(\tH\t\x88\x01\x01\x12\x1d\n\x10geo_target_metro\x18z \x01(\tH\n\x88\x01\x01\x12.\n!geo_target_most_specific_location\x18{ \x01(\tH\x0b\x88\x01\x01\x12#\n\x16geo_target_postal_code\x18| \x01(\tH\x0c\x88\x01\x01\x12 \n\x13geo_target_province\x18} \x01(\tH\r\x88\x01\x01\x12\x1e\n\x11geo_target_region\x18~ \x01(\tH\x0e\x88\x01\x01\x12\x1d\n\x10geo_target_state\x18\x7f \x01(\tH\x0f\x88\x01\x01\x12\'\n\x19hotel_booking_window_days\x18\x87\x01 \x01(\x03H\x10\x88\x01\x01\x12\x1c\n\x0fhotel_center_id\x18P \x01(\x03H\x11\x88\x01\x01\x12 \n\x13hotel_check_in_date\x18Q \x01(\tH\x12\x88\x01\x01\x12Z\n\x1ahotel_check_in_day_of_week\x18\t \x01(\x0e\x32\x36.google.ads.googleads.v6.enums.DayOfWeekEnum.DayOfWeek\x12\x17\n\nhotel_city\x18R \x01(\tH\x13\x88\x01\x01\x12\x18\n\x0bhotel_class\x18S \x01(\x05H\x14\x88\x01\x01\x12\x1a\n\rhotel_country\x18T \x01(\tH\x15\x88\x01\x01\x12s\n\x19hotel_date_selection_type\x18\r \x01(\x0e\x32P.google.ads.googleads.v6.enums.HotelDateSelectionTypeEnum.HotelDateSelectionType\x12!\n\x14hotel_length_of_stay\x18U \x01(\x05H\x16\x88\x01\x01\x12\x1f\n\x12hotel_rate_rule_id\x18V \x01(\tH\x17\x88\x01\x01\x12W\n\x0fhotel_rate_type\x18J \x01(\x0e\x32>.google.ads.googleads.v6.enums.HotelRateTypeEnum.HotelRateType\x12`\n\x12hotel_price_bucket\x18N \x01(\x0e\x32\x44.google.ads.googleads.v6.enums.HotelPriceBucketEnum.HotelPriceBucket\x12\x18\n\x0bhotel_state\x18W \x01(\tH\x18\x88\x01\x01\x12\x11\n\x04hour\x18X \x01(\x05H\x19\x88\x01\x01\x12*\n\x1dinteraction_on_this_extension\x18Y \x01(\x08H\x1a\x88\x01\x01\x12\x38\n\x07keyword\x18= \x01(\x0b\x32\'.google.ads.googleads.v6.common.Keyword\x12\x12\n\x05month\x18Z \x01(\tH\x1b\x88\x01\x01\x12Q\n\rmonth_of_year\x18\x12 \x01(\x0e\x32:.google.ads.googleads.v6.enums.MonthOfYearEnum.MonthOfYear\x12\x1d\n\x10partner_hotel_id\x18[ \x01(\tH\x1c\x88\x01\x01\x12\\\n\x10placeholder_type\x18\x14 \x01(\x0e\x32\x42.google.ads.googleads.v6.enums.PlaceholderTypeEnum.PlaceholderType\x12#\n\x15product_aggregator_id\x18\x84\x01 \x01(\x03H\x1d\x88\x01\x01\x12,\n\x1fproduct_bidding_category_level1\x18\\ \x01(\tH\x1e\x88\x01\x01\x12,\n\x1fproduct_bidding_category_level2\x18] \x01(\tH\x1f\x88\x01\x01\x12,\n\x1fproduct_bidding_category_level3\x18^ \x01(\tH \x88\x01\x01\x12,\n\x1fproduct_bidding_category_level4\x18_ \x01(\tH!\x88\x01\x01\x12,\n\x1fproduct_bidding_category_level5\x18` \x01(\tH\"\x88\x01\x01\x12\x1a\n\rproduct_brand\x18\x61 \x01(\tH#\x88\x01\x01\x12Y\n\x0fproduct_channel\x18\x1e \x01(\x0e\x32@.google.ads.googleads.v6.enums.ProductChannelEnum.ProductChannel\x12{\n\x1bproduct_channel_exclusivity\x18\x1f \x01(\x0e\x32V.google.ads.googleads.v6.enums.ProductChannelExclusivityEnum.ProductChannelExclusivity\x12_\n\x11product_condition\x18 \x01(\x0e\x32\x44.google.ads.googleads.v6.enums.ProductConditionEnum.ProductCondition\x12\x1c\n\x0fproduct_country\x18\x62 \x01(\tH$\x88\x01\x01\x12&\n\x19product_custom_attribute0\x18\x63 \x01(\tH%\x88\x01\x01\x12&\n\x19product_custom_attribute1\x18\x64 \x01(\tH&\x88\x01\x01\x12&\n\x19product_custom_attribute2\x18\x65 \x01(\tH\'\x88\x01\x01\x12&\n\x19product_custom_attribute3\x18\x66 \x01(\tH(\x88\x01\x01\x12&\n\x19product_custom_attribute4\x18g \x01(\tH)\x88\x01\x01\x12\x1c\n\x0fproduct_item_id\x18h \x01(\tH*\x88\x01\x01\x12\x1d\n\x10product_language\x18i \x01(\tH+\x88\x01\x01\x12!\n\x13product_merchant_id\x18\x85\x01 \x01(\x03H,\x88\x01\x01\x12\x1d\n\x10product_store_id\x18j \x01(\tH-\x88\x01\x01\x12\x1a\n\rproduct_title\x18k \x01(\tH.\x88\x01\x01\x12\x1c\n\x0fproduct_type_l1\x18l \x01(\tH/\x88\x01\x01\x12\x1c\n\x0fproduct_type_l2\x18m \x01(\tH0\x88\x01\x01\x12\x1c\n\x0fproduct_type_l3\x18n \x01(\tH1\x88\x01\x01\x12\x1c\n\x0fproduct_type_l4\x18o \x01(\tH2\x88\x01\x01\x12\x1c\n\x0fproduct_type_l5\x18p \x01(\tH3\x88\x01\x01\x12\x15\n\x07quarter\x18\x80\x01 \x01(\tH4\x88\x01\x01\x12\x83\x01\n\x1fsearch_engine_results_page_type\x18\x46 \x01(\x0e\x32Z.google.ads.googleads.v6.enums.SearchEngineResultsPageTypeEnum.SearchEngineResultsPageType\x12j\n\x16search_term_match_type\x18\x16 \x01(\x0e\x32J.google.ads.googleads.v6.enums.SearchTermMatchTypeEnum.SearchTermMatchType\x12:\n\x04slot\x18\x17 \x01(\x0e\x32,.google.ads.googleads.v6.enums.SlotEnum.Slot\x12\x15\n\x07webpage\x18\x81\x01 \x01(\tH5\x88\x01\x01\x12\x12\n\x04week\x18\x82\x01 \x01(\tH6\x88\x01\x01\x12\x12\n\x04year\x18\x83\x01 \x01(\x05H7\x88\x01\x01\x42\x14\n\x12_conversion_actionB\x19\n\x17_conversion_action_nameB\x18\n\x16_conversion_adjustmentB\x07\n\x05_dateB\x15\n\x13_geo_target_airportB\x14\n\x12_geo_target_cantonB\x12\n\x10_geo_target_cityB\x15\n\x13_geo_target_countryB\x14\n\x12_geo_target_countyB\x16\n\x14_geo_target_districtB\x13\n\x11_geo_target_metroB$\n\"_geo_target_most_specific_locationB\x19\n\x17_geo_target_postal_codeB\x16\n\x14_geo_target_provinceB\x14\n\x12_geo_target_regionB\x13\n\x11_geo_target_stateB\x1c\n\x1a_hotel_booking_window_daysB\x12\n\x10_hotel_center_idB\x16\n\x14_hotel_check_in_dateB\r\n\x0b_hotel_cityB\x0e\n\x0c_hotel_classB\x10\n\x0e_hotel_countryB\x17\n\x15_hotel_length_of_stayB\x15\n\x13_hotel_rate_rule_idB\x0e\n\x0c_hotel_stateB\x07\n\x05_hourB \n\x1e_interaction_on_this_extensionB\x08\n\x06_monthB\x13\n\x11_partner_hotel_idB\x18\n\x16_product_aggregator_idB\"\n _product_bidding_category_level1B\"\n _product_bidding_category_level2B\"\n _product_bidding_category_level3B\"\n _product_bidding_category_level4B\"\n _product_bidding_category_level5B\x10\n\x0e_product_brandB\x12\n\x10_product_countryB\x1c\n\x1a_product_custom_attribute0B\x1c\n\x1a_product_custom_attribute1B\x1c\n\x1a_product_custom_attribute2B\x1c\n\x1a_product_custom_attribute3B\x1c\n\x1a_product_custom_attribute4B\x12\n\x10_product_item_idB\x13\n\x11_product_languageB\x16\n\x14_product_merchant_idB\x13\n\x11_product_store_idB\x10\n\x0e_product_titleB\x12\n\x10_product_type_l1B\x12\n\x10_product_type_l2B\x12\n\x10_product_type_l3B\x12\n\x10_product_type_l4B\x12\n\x10_product_type_l5B\n\n\x08_quarterB\n\n\x08_webpageB\x07\n\x05_weekB\x07\n\x05_year\"|\n\x07Keyword\x12\x1f\n\x12\x61\x64_group_criterion\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x39\n\x04info\x18\x02 \x01(\x0b\x32+.google.ads.googleads.v6.common.KeywordInfoB\x15\n\x13_ad_group_criterion\"\xb9\x01\n\x1f\x42udgetCampaignAssociationStatus\x12\x15\n\x08\x63\x61mpaign\x18\x01 \x01(\tH\x00\x88\x01\x01\x12r\n\x06status\x18\x02 \x01(\x0e\x32\x62.google.ads.googleads.v6.enums.BudgetCampaignAssociationStatusEnum.BudgetCampaignAssociationStatusB\x0b\n\t_campaignB\xe8\x01\n\"com.google.ads.googleads.v6.commonB\rSegmentsProtoP\x01ZDgoogle.golang.org/genproto/googleapis/ads/googleads/v6/common;common\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V6.Common\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V6\\Common\xea\x02\"Google::Ads::GoogleAds::V6::Commonb\x06proto3' , dependencies=[google_dot_ads_dot_googleads_dot_v6_dot_common_dot_criteria__pb2.DESCRIPTOR,google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_ad__destination__type__pb2.DESCRIPTOR,google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_ad__network__type__pb2.DESCRIPTOR,google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_budget__campaign__association__status__pb2.DESCRIPTOR,google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_click__type__pb2.DESCRIPTOR,google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_conversion__action__category__pb2.DESCRIPTOR,google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_conversion__attribution__event__type__pb2.DESCRIPTOR,google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_conversion__lag__bucket__pb2.DESCRIPTOR,google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_conversion__or__adjustment__lag__bucket__pb2.DESCRIPTOR,google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_day__of__week__pb2.DESCRIPTOR,google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_device__pb2.DESCRIPTOR,google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_external__conversion__source__pb2.DESCRIPTOR,google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_hotel__date__selection__type__pb2.DESCRIPTOR,google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_hotel__price__bucket__pb2.DESCRIPTOR,google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_hotel__rate__type__pb2.DESCRIPTOR,google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_month__of__year__pb2.DESCRIPTOR,google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_placeholder__type__pb2.DESCRIPTOR,google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_product__channel__pb2.DESCRIPTOR,google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_product__channel__exclusivity__pb2.DESCRIPTOR,google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_product__condition__pb2.DESCRIPTOR,google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_search__engine__results__page__type__pb2.DESCRIPTOR,google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_search__term__match__type__pb2.DESCRIPTOR,google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_slot__pb2.DESCRIPTOR,google_dot_api_dot_annotations__pb2.DESCRIPTOR,]) _SEGMENTS = _descriptor.Descriptor( name='Segments', full_name='google.ads.googleads.v6.common.Segments', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='ad_destination_type', full_name='google.ads.googleads.v6.common.Segments.ad_destination_type', index=0, number=136, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='ad_network_type', full_name='google.ads.googleads.v6.common.Segments.ad_network_type', index=1, number=3, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='budget_campaign_association_status', full_name='google.ads.googleads.v6.common.Segments.budget_campaign_association_status', index=2, number=134, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='click_type', full_name='google.ads.googleads.v6.common.Segments.click_type', index=3, number=26, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='conversion_action', full_name='google.ads.googleads.v6.common.Segments.conversion_action', index=4, number=113, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='conversion_action_category', full_name='google.ads.googleads.v6.common.Segments.conversion_action_category', index=5, number=53, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='conversion_action_name', full_name='google.ads.googleads.v6.common.Segments.conversion_action_name', index=6, number=114, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='conversion_adjustment', full_name='google.ads.googleads.v6.common.Segments.conversion_adjustment', index=7, number=115, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='conversion_attribution_event_type', full_name='google.ads.googleads.v6.common.Segments.conversion_attribution_event_type', index=8, number=2, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='conversion_lag_bucket', full_name='google.ads.googleads.v6.common.Segments.conversion_lag_bucket', index=9, number=50, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='conversion_or_adjustment_lag_bucket', full_name='google.ads.googleads.v6.common.Segments.conversion_or_adjustment_lag_bucket', index=10, number=51, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='date', full_name='google.ads.googleads.v6.common.Segments.date', index=11, number=79, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='day_of_week', full_name='google.ads.googleads.v6.common.Segments.day_of_week', index=12, number=5, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='device', full_name='google.ads.googleads.v6.common.Segments.device', index=13, number=1, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='external_conversion_source', full_name='google.ads.googleads.v6.common.Segments.external_conversion_source', index=14, number=55, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='geo_target_airport', full_name='google.ads.googleads.v6.common.Segments.geo_target_airport', index=15, number=116, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='geo_target_canton', full_name='google.ads.googleads.v6.common.Segments.geo_target_canton', index=16, number=117, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='geo_target_city', full_name='google.ads.googleads.v6.common.Segments.geo_target_city', index=17, number=118, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='geo_target_country', full_name='google.ads.googleads.v6.common.Segments.geo_target_country', index=18, number=119, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='geo_target_county', full_name='google.ads.googleads.v6.common.Segments.geo_target_county', index=19, number=120, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='geo_target_district', full_name='google.ads.googleads.v6.common.Segments.geo_target_district', index=20, number=121, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='geo_target_metro', full_name='google.ads.googleads.v6.common.Segments.geo_target_metro', index=21, number=122, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='geo_target_most_specific_location', full_name='google.ads.googleads.v6.common.Segments.geo_target_most_specific_location', index=22, number=123, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='geo_target_postal_code', full_name='google.ads.googleads.v6.common.Segments.geo_target_postal_code', index=23, number=124, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='geo_target_province', full_name='google.ads.googleads.v6.common.Segments.geo_target_province', index=24, number=125, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='geo_target_region', full_name='google.ads.googleads.v6.common.Segments.geo_target_region', index=25, number=126, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='geo_target_state', full_name='google.ads.googleads.v6.common.Segments.geo_target_state', index=26, number=127, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='hotel_booking_window_days', full_name='google.ads.googleads.v6.common.Segments.hotel_booking_window_days', index=27, number=135, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='hotel_center_id', full_name='google.ads.googleads.v6.common.Segments.hotel_center_id', index=28, number=80, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='hotel_check_in_date', full_name='google.ads.googleads.v6.common.Segments.hotel_check_in_date', index=29, number=81, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='hotel_check_in_day_of_week', full_name='google.ads.googleads.v6.common.Segments.hotel_check_in_day_of_week', index=30, number=9, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='hotel_city', full_name='google.ads.googleads.v6.common.Segments.hotel_city', index=31, number=82, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='hotel_class', full_name='google.ads.googleads.v6.common.Segments.hotel_class', index=32, number=83, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='hotel_country', full_name='google.ads.googleads.v6.common.Segments.hotel_country', index=33, number=84, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='hotel_date_selection_type', full_name='google.ads.googleads.v6.common.Segments.hotel_date_selection_type', index=34, number=13, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='hotel_length_of_stay', full_name='google.ads.googleads.v6.common.Segments.hotel_length_of_stay', index=35, number=85, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='hotel_rate_rule_id', full_name='google.ads.googleads.v6.common.Segments.hotel_rate_rule_id', index=36, number=86, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='hotel_rate_type', full_name='google.ads.googleads.v6.common.Segments.hotel_rate_type', index=37, number=74, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='hotel_price_bucket', full_name='google.ads.googleads.v6.common.Segments.hotel_price_bucket', index=38, number=78, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='hotel_state', full_name='google.ads.googleads.v6.common.Segments.hotel_state', index=39, number=87, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='hour', full_name='google.ads.googleads.v6.common.Segments.hour', index=40, number=88, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='interaction_on_this_extension', full_name='google.ads.googleads.v6.common.Segments.interaction_on_this_extension', index=41, number=89, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='keyword', full_name='google.ads.googleads.v6.common.Segments.keyword', index=42, number=61, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='month', full_name='google.ads.googleads.v6.common.Segments.month', index=43, number=90, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='month_of_year', full_name='google.ads.googleads.v6.common.Segments.month_of_year', index=44, number=18, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='partner_hotel_id', full_name='google.ads.googleads.v6.common.Segments.partner_hotel_id', index=45, number=91, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='placeholder_type', full_name='google.ads.googleads.v6.common.Segments.placeholder_type', index=46, number=20, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='product_aggregator_id', full_name='google.ads.googleads.v6.common.Segments.product_aggregator_id', index=47, number=132, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='product_bidding_category_level1', full_name='google.ads.googleads.v6.common.Segments.product_bidding_category_level1', index=48, number=92, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='product_bidding_category_level2', full_name='google.ads.googleads.v6.common.Segments.product_bidding_category_level2', index=49, number=93, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='product_bidding_category_level3', full_name='google.ads.googleads.v6.common.Segments.product_bidding_category_level3', index=50, number=94, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='product_bidding_category_level4', full_name='google.ads.googleads.v6.common.Segments.product_bidding_category_level4', index=51, number=95, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='product_bidding_category_level5', full_name='google.ads.googleads.v6.common.Segments.product_bidding_category_level5', index=52, number=96, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='product_brand', full_name='google.ads.googleads.v6.common.Segments.product_brand', index=53, number=97, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='product_channel', full_name='google.ads.googleads.v6.common.Segments.product_channel', index=54, number=30, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='product_channel_exclusivity', full_name='google.ads.googleads.v6.common.Segments.product_channel_exclusivity', index=55, number=31, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='product_condition', full_name='google.ads.googleads.v6.common.Segments.product_condition', index=56, number=32, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='product_country', full_name='google.ads.googleads.v6.common.Segments.product_country', index=57, number=98, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='product_custom_attribute0', full_name='google.ads.googleads.v6.common.Segments.product_custom_attribute0', index=58, number=99, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='product_custom_attribute1', full_name='google.ads.googleads.v6.common.Segments.product_custom_attribute1', index=59, number=100, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='product_custom_attribute2', full_name='google.ads.googleads.v6.common.Segments.product_custom_attribute2', index=60, number=101, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='product_custom_attribute3', full_name='google.ads.googleads.v6.common.Segments.product_custom_attribute3', index=61, number=102, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='product_custom_attribute4', full_name='google.ads.googleads.v6.common.Segments.product_custom_attribute4', index=62, number=103, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='product_item_id', full_name='google.ads.googleads.v6.common.Segments.product_item_id', index=63, number=104, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='product_language', full_name='google.ads.googleads.v6.common.Segments.product_language', index=64, number=105, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='product_merchant_id', full_name='google.ads.googleads.v6.common.Segments.product_merchant_id', index=65, number=133, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='product_store_id', full_name='google.ads.googleads.v6.common.Segments.product_store_id', index=66, number=106, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='product_title', full_name='google.ads.googleads.v6.common.Segments.product_title', index=67, number=107, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='product_type_l1', full_name='google.ads.googleads.v6.common.Segments.product_type_l1', index=68, number=108, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='product_type_l2', full_name='google.ads.googleads.v6.common.Segments.product_type_l2', index=69, number=109, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='product_type_l3', full_name='google.ads.googleads.v6.common.Segments.product_type_l3', index=70, number=110, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='product_type_l4', full_name='google.ads.googleads.v6.common.Segments.product_type_l4', index=71, number=111, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='product_type_l5', full_name='google.ads.googleads.v6.common.Segments.product_type_l5', index=72, number=112, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='quarter', full_name='google.ads.googleads.v6.common.Segments.quarter', index=73, number=128, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='search_engine_results_page_type', full_name='google.ads.googleads.v6.common.Segments.search_engine_results_page_type', index=74, number=70, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='search_term_match_type', full_name='google.ads.googleads.v6.common.Segments.search_term_match_type', index=75, number=22, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='slot', full_name='google.ads.googleads.v6.common.Segments.slot', index=76, number=23, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='webpage', full_name='google.ads.googleads.v6.common.Segments.webpage', index=77, number=129, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='week', full_name='google.ads.googleads.v6.common.Segments.week', index=78, number=130, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='year', full_name='google.ads.googleads.v6.common.Segments.year', index=79, number=131, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ _descriptor.OneofDescriptor( name='_conversion_action', full_name='google.ads.googleads.v6.common.Segments._conversion_action', index=0, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_conversion_action_name', full_name='google.ads.googleads.v6.common.Segments._conversion_action_name', index=1, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_conversion_adjustment', full_name='google.ads.googleads.v6.common.Segments._conversion_adjustment', index=2, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_date', full_name='google.ads.googleads.v6.common.Segments._date', index=3, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_geo_target_airport', full_name='google.ads.googleads.v6.common.Segments._geo_target_airport', index=4, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_geo_target_canton', full_name='google.ads.googleads.v6.common.Segments._geo_target_canton', index=5, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_geo_target_city', full_name='google.ads.googleads.v6.common.Segments._geo_target_city', index=6, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_geo_target_country', full_name='google.ads.googleads.v6.common.Segments._geo_target_country', index=7, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_geo_target_county', full_name='google.ads.googleads.v6.common.Segments._geo_target_county', index=8, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_geo_target_district', full_name='google.ads.googleads.v6.common.Segments._geo_target_district', index=9, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_geo_target_metro', full_name='google.ads.googleads.v6.common.Segments._geo_target_metro', index=10, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_geo_target_most_specific_location', full_name='google.ads.googleads.v6.common.Segments._geo_target_most_specific_location', index=11, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_geo_target_postal_code', full_name='google.ads.googleads.v6.common.Segments._geo_target_postal_code', index=12, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_geo_target_province', full_name='google.ads.googleads.v6.common.Segments._geo_target_province', index=13, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_geo_target_region', full_name='google.ads.googleads.v6.common.Segments._geo_target_region', index=14, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_geo_target_state', full_name='google.ads.googleads.v6.common.Segments._geo_target_state', index=15, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_hotel_booking_window_days', full_name='google.ads.googleads.v6.common.Segments._hotel_booking_window_days', index=16, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_hotel_center_id', full_name='google.ads.googleads.v6.common.Segments._hotel_center_id', index=17, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_hotel_check_in_date', full_name='google.ads.googleads.v6.common.Segments._hotel_check_in_date', index=18, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_hotel_city', full_name='google.ads.googleads.v6.common.Segments._hotel_city', index=19, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_hotel_class', full_name='google.ads.googleads.v6.common.Segments._hotel_class', index=20, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_hotel_country', full_name='google.ads.googleads.v6.common.Segments._hotel_country', index=21, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_hotel_length_of_stay', full_name='google.ads.googleads.v6.common.Segments._hotel_length_of_stay', index=22, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_hotel_rate_rule_id', full_name='google.ads.googleads.v6.common.Segments._hotel_rate_rule_id', index=23, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_hotel_state', full_name='google.ads.googleads.v6.common.Segments._hotel_state', index=24, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_hour', full_name='google.ads.googleads.v6.common.Segments._hour', index=25, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_interaction_on_this_extension', full_name='google.ads.googleads.v6.common.Segments._interaction_on_this_extension', index=26, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_month', full_name='google.ads.googleads.v6.common.Segments._month', index=27, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_partner_hotel_id', full_name='google.ads.googleads.v6.common.Segments._partner_hotel_id', index=28, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_product_aggregator_id', full_name='google.ads.googleads.v6.common.Segments._product_aggregator_id', index=29, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_product_bidding_category_level1', full_name='google.ads.googleads.v6.common.Segments._product_bidding_category_level1', index=30, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_product_bidding_category_level2', full_name='google.ads.googleads.v6.common.Segments._product_bidding_category_level2', index=31, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_product_bidding_category_level3', full_name='google.ads.googleads.v6.common.Segments._product_bidding_category_level3', index=32, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_product_bidding_category_level4', full_name='google.ads.googleads.v6.common.Segments._product_bidding_category_level4', index=33, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_product_bidding_category_level5', full_name='google.ads.googleads.v6.common.Segments._product_bidding_category_level5', index=34, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_product_brand', full_name='google.ads.googleads.v6.common.Segments._product_brand', index=35, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_product_country', full_name='google.ads.googleads.v6.common.Segments._product_country', index=36, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_product_custom_attribute0', full_name='google.ads.googleads.v6.common.Segments._product_custom_attribute0', index=37, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_product_custom_attribute1', full_name='google.ads.googleads.v6.common.Segments._product_custom_attribute1', index=38, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_product_custom_attribute2', full_name='google.ads.googleads.v6.common.Segments._product_custom_attribute2', index=39, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_product_custom_attribute3', full_name='google.ads.googleads.v6.common.Segments._product_custom_attribute3', index=40, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_product_custom_attribute4', full_name='google.ads.googleads.v6.common.Segments._product_custom_attribute4', index=41, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_product_item_id', full_name='google.ads.googleads.v6.common.Segments._product_item_id', index=42, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_product_language', full_name='google.ads.googleads.v6.common.Segments._product_language', index=43, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_product_merchant_id', full_name='google.ads.googleads.v6.common.Segments._product_merchant_id', index=44, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_product_store_id', full_name='google.ads.googleads.v6.common.Segments._product_store_id', index=45, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_product_title', full_name='google.ads.googleads.v6.common.Segments._product_title', index=46, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_product_type_l1', full_name='google.ads.googleads.v6.common.Segments._product_type_l1', index=47, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_product_type_l2', full_name='google.ads.googleads.v6.common.Segments._product_type_l2', index=48, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_product_type_l3', full_name='google.ads.googleads.v6.common.Segments._product_type_l3', index=49, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_product_type_l4', full_name='google.ads.googleads.v6.common.Segments._product_type_l4', index=50, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_product_type_l5', full_name='google.ads.googleads.v6.common.Segments._product_type_l5', index=51, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_quarter', full_name='google.ads.googleads.v6.common.Segments._quarter', index=52, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_webpage', full_name='google.ads.googleads.v6.common.Segments._webpage', index=53, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_week', full_name='google.ads.googleads.v6.common.Segments._week', index=54, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_year', full_name='google.ads.googleads.v6.common.Segments._year', index=55, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), ], serialized_start=1434, serialized_end=6960, ) _KEYWORD = _descriptor.Descriptor( name='Keyword', full_name='google.ads.googleads.v6.common.Keyword', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='ad_group_criterion', full_name='google.ads.googleads.v6.common.Keyword.ad_group_criterion', index=0, number=3, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='info', full_name='google.ads.googleads.v6.common.Keyword.info', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ _descriptor.OneofDescriptor( name='_ad_group_criterion', full_name='google.ads.googleads.v6.common.Keyword._ad_group_criterion', index=0, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), ], serialized_start=6962, serialized_end=7086, ) _BUDGETCAMPAIGNASSOCIATIONSTATUS = _descriptor.Descriptor( name='BudgetCampaignAssociationStatus', full_name='google.ads.googleads.v6.common.BudgetCampaignAssociationStatus', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='campaign', full_name='google.ads.googleads.v6.common.BudgetCampaignAssociationStatus.campaign', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='status', full_name='google.ads.googleads.v6.common.BudgetCampaignAssociationStatus.status', index=1, number=2, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ _descriptor.OneofDescriptor( name='_campaign', full_name='google.ads.googleads.v6.common.BudgetCampaignAssociationStatus._campaign', index=0, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), ], serialized_start=7089, serialized_end=7274, ) _SEGMENTS.fields_by_name['ad_destination_type'].enum_type = google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_ad__destination__type__pb2._ADDESTINATIONTYPEENUM_ADDESTINATIONTYPE _SEGMENTS.fields_by_name['ad_network_type'].enum_type = google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_ad__network__type__pb2._ADNETWORKTYPEENUM_ADNETWORKTYPE _SEGMENTS.fields_by_name['budget_campaign_association_status'].message_type = _BUDGETCAMPAIGNASSOCIATIONSTATUS _SEGMENTS.fields_by_name['click_type'].enum_type = google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_click__type__pb2._CLICKTYPEENUM_CLICKTYPE _SEGMENTS.fields_by_name['conversion_action_category'].enum_type = google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_conversion__action__category__pb2._CONVERSIONACTIONCATEGORYENUM_CONVERSIONACTIONCATEGORY _SEGMENTS.fields_by_name['conversion_attribution_event_type'].enum_type = google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_conversion__attribution__event__type__pb2._CONVERSIONATTRIBUTIONEVENTTYPEENUM_CONVERSIONATTRIBUTIONEVENTTYPE _SEGMENTS.fields_by_name['conversion_lag_bucket'].enum_type = google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_conversion__lag__bucket__pb2._CONVERSIONLAGBUCKETENUM_CONVERSIONLAGBUCKET _SEGMENTS.fields_by_name['conversion_or_adjustment_lag_bucket'].enum_type = google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_conversion__or__adjustment__lag__bucket__pb2._CONVERSIONORADJUSTMENTLAGBUCKETENUM_CONVERSIONORADJUSTMENTLAGBUCKET _SEGMENTS.fields_by_name['day_of_week'].enum_type = google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_day__of__week__pb2._DAYOFWEEKENUM_DAYOFWEEK _SEGMENTS.fields_by_name['device'].enum_type = google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_device__pb2._DEVICEENUM_DEVICE _SEGMENTS.fields_by_name['external_conversion_source'].enum_type = google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_external__conversion__source__pb2._EXTERNALCONVERSIONSOURCEENUM_EXTERNALCONVERSIONSOURCE _SEGMENTS.fields_by_name['hotel_check_in_day_of_week'].enum_type = google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_day__of__week__pb2._DAYOFWEEKENUM_DAYOFWEEK _SEGMENTS.fields_by_name['hotel_date_selection_type'].enum_type = google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_hotel__date__selection__type__pb2._HOTELDATESELECTIONTYPEENUM_HOTELDATESELECTIONTYPE _SEGMENTS.fields_by_name['hotel_rate_type'].enum_type = google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_hotel__rate__type__pb2._HOTELRATETYPEENUM_HOTELRATETYPE _SEGMENTS.fields_by_name['hotel_price_bucket'].enum_type = google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_hotel__price__bucket__pb2._HOTELPRICEBUCKETENUM_HOTELPRICEBUCKET _SEGMENTS.fields_by_name['keyword'].message_type = _KEYWORD _SEGMENTS.fields_by_name['month_of_year'].enum_type = google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_month__of__year__pb2._MONTHOFYEARENUM_MONTHOFYEAR _SEGMENTS.fields_by_name['placeholder_type'].enum_type = google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_placeholder__type__pb2._PLACEHOLDERTYPEENUM_PLACEHOLDERTYPE _SEGMENTS.fields_by_name['product_channel'].enum_type = google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_product__channel__pb2._PRODUCTCHANNELENUM_PRODUCTCHANNEL _SEGMENTS.fields_by_name['product_channel_exclusivity'].enum_type = google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_product__channel__exclusivity__pb2._PRODUCTCHANNELEXCLUSIVITYENUM_PRODUCTCHANNELEXCLUSIVITY _SEGMENTS.fields_by_name['product_condition'].enum_type = google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_product__condition__pb2._PRODUCTCONDITIONENUM_PRODUCTCONDITION _SEGMENTS.fields_by_name['search_engine_results_page_type'].enum_type = google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_search__engine__results__page__type__pb2._SEARCHENGINERESULTSPAGETYPEENUM_SEARCHENGINERESULTSPAGETYPE _SEGMENTS.fields_by_name['search_term_match_type'].enum_type = google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_search__term__match__type__pb2._SEARCHTERMMATCHTYPEENUM_SEARCHTERMMATCHTYPE _SEGMENTS.fields_by_name['slot'].enum_type = google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_slot__pb2._SLOTENUM_SLOT _SEGMENTS.oneofs_by_name['_conversion_action'].fields.append( _SEGMENTS.fields_by_name['conversion_action']) _SEGMENTS.fields_by_name['conversion_action'].containing_oneof = _SEGMENTS.oneofs_by_name['_conversion_action'] _SEGMENTS.oneofs_by_name['_conversion_action_name'].fields.append( _SEGMENTS.fields_by_name['conversion_action_name']) _SEGMENTS.fields_by_name['conversion_action_name'].containing_oneof = _SEGMENTS.oneofs_by_name['_conversion_action_name'] _SEGMENTS.oneofs_by_name['_conversion_adjustment'].fields.append( _SEGMENTS.fields_by_name['conversion_adjustment']) _SEGMENTS.fields_by_name['conversion_adjustment'].containing_oneof = _SEGMENTS.oneofs_by_name['_conversion_adjustment'] _SEGMENTS.oneofs_by_name['_date'].fields.append( _SEGMENTS.fields_by_name['date']) _SEGMENTS.fields_by_name['date'].containing_oneof = _SEGMENTS.oneofs_by_name['_date'] _SEGMENTS.oneofs_by_name['_geo_target_airport'].fields.append( _SEGMENTS.fields_by_name['geo_target_airport']) _SEGMENTS.fields_by_name['geo_target_airport'].containing_oneof = _SEGMENTS.oneofs_by_name['_geo_target_airport'] _SEGMENTS.oneofs_by_name['_geo_target_canton'].fields.append( _SEGMENTS.fields_by_name['geo_target_canton']) _SEGMENTS.fields_by_name['geo_target_canton'].containing_oneof = _SEGMENTS.oneofs_by_name['_geo_target_canton'] _SEGMENTS.oneofs_by_name['_geo_target_city'].fields.append( _SEGMENTS.fields_by_name['geo_target_city']) _SEGMENTS.fields_by_name['geo_target_city'].containing_oneof = _SEGMENTS.oneofs_by_name['_geo_target_city'] _SEGMENTS.oneofs_by_name['_geo_target_country'].fields.append( _SEGMENTS.fields_by_name['geo_target_country']) _SEGMENTS.fields_by_name['geo_target_country'].containing_oneof = _SEGMENTS.oneofs_by_name['_geo_target_country'] _SEGMENTS.oneofs_by_name['_geo_target_county'].fields.append( _SEGMENTS.fields_by_name['geo_target_county']) _SEGMENTS.fields_by_name['geo_target_county'].containing_oneof = _SEGMENTS.oneofs_by_name['_geo_target_county'] _SEGMENTS.oneofs_by_name['_geo_target_district'].fields.append( _SEGMENTS.fields_by_name['geo_target_district']) _SEGMENTS.fields_by_name['geo_target_district'].containing_oneof = _SEGMENTS.oneofs_by_name['_geo_target_district'] _SEGMENTS.oneofs_by_name['_geo_target_metro'].fields.append( _SEGMENTS.fields_by_name['geo_target_metro']) _SEGMENTS.fields_by_name['geo_target_metro'].containing_oneof = _SEGMENTS.oneofs_by_name['_geo_target_metro'] _SEGMENTS.oneofs_by_name['_geo_target_most_specific_location'].fields.append( _SEGMENTS.fields_by_name['geo_target_most_specific_location']) _SEGMENTS.fields_by_name['geo_target_most_specific_location'].containing_oneof = _SEGMENTS.oneofs_by_name['_geo_target_most_specific_location'] _SEGMENTS.oneofs_by_name['_geo_target_postal_code'].fields.append( _SEGMENTS.fields_by_name['geo_target_postal_code']) _SEGMENTS.fields_by_name['geo_target_postal_code'].containing_oneof = _SEGMENTS.oneofs_by_name['_geo_target_postal_code'] _SEGMENTS.oneofs_by_name['_geo_target_province'].fields.append( _SEGMENTS.fields_by_name['geo_target_province']) _SEGMENTS.fields_by_name['geo_target_province'].containing_oneof = _SEGMENTS.oneofs_by_name['_geo_target_province'] _SEGMENTS.oneofs_by_name['_geo_target_region'].fields.append( _SEGMENTS.fields_by_name['geo_target_region']) _SEGMENTS.fields_by_name['geo_target_region'].containing_oneof = _SEGMENTS.oneofs_by_name['_geo_target_region'] _SEGMENTS.oneofs_by_name['_geo_target_state'].fields.append( _SEGMENTS.fields_by_name['geo_target_state']) _SEGMENTS.fields_by_name['geo_target_state'].containing_oneof = _SEGMENTS.oneofs_by_name['_geo_target_state'] _SEGMENTS.oneofs_by_name['_hotel_booking_window_days'].fields.append( _SEGMENTS.fields_by_name['hotel_booking_window_days']) _SEGMENTS.fields_by_name['hotel_booking_window_days'].containing_oneof = _SEGMENTS.oneofs_by_name['_hotel_booking_window_days'] _SEGMENTS.oneofs_by_name['_hotel_center_id'].fields.append( _SEGMENTS.fields_by_name['hotel_center_id']) _SEGMENTS.fields_by_name['hotel_center_id'].containing_oneof = _SEGMENTS.oneofs_by_name['_hotel_center_id'] _SEGMENTS.oneofs_by_name['_hotel_check_in_date'].fields.append( _SEGMENTS.fields_by_name['hotel_check_in_date']) _SEGMENTS.fields_by_name['hotel_check_in_date'].containing_oneof = _SEGMENTS.oneofs_by_name['_hotel_check_in_date'] _SEGMENTS.oneofs_by_name['_hotel_city'].fields.append( _SEGMENTS.fields_by_name['hotel_city']) _SEGMENTS.fields_by_name['hotel_city'].containing_oneof = _SEGMENTS.oneofs_by_name['_hotel_city'] _SEGMENTS.oneofs_by_name['_hotel_class'].fields.append( _SEGMENTS.fields_by_name['hotel_class']) _SEGMENTS.fields_by_name['hotel_class'].containing_oneof = _SEGMENTS.oneofs_by_name['_hotel_class'] _SEGMENTS.oneofs_by_name['_hotel_country'].fields.append( _SEGMENTS.fields_by_name['hotel_country']) _SEGMENTS.fields_by_name['hotel_country'].containing_oneof = _SEGMENTS.oneofs_by_name['_hotel_country'] _SEGMENTS.oneofs_by_name['_hotel_length_of_stay'].fields.append( _SEGMENTS.fields_by_name['hotel_length_of_stay']) _SEGMENTS.fields_by_name['hotel_length_of_stay'].containing_oneof = _SEGMENTS.oneofs_by_name['_hotel_length_of_stay'] _SEGMENTS.oneofs_by_name['_hotel_rate_rule_id'].fields.append( _SEGMENTS.fields_by_name['hotel_rate_rule_id']) _SEGMENTS.fields_by_name['hotel_rate_rule_id'].containing_oneof = _SEGMENTS.oneofs_by_name['_hotel_rate_rule_id'] _SEGMENTS.oneofs_by_name['_hotel_state'].fields.append( _SEGMENTS.fields_by_name['hotel_state']) _SEGMENTS.fields_by_name['hotel_state'].containing_oneof = _SEGMENTS.oneofs_by_name['_hotel_state'] _SEGMENTS.oneofs_by_name['_hour'].fields.append( _SEGMENTS.fields_by_name['hour']) _SEGMENTS.fields_by_name['hour'].containing_oneof = _SEGMENTS.oneofs_by_name['_hour'] _SEGMENTS.oneofs_by_name['_interaction_on_this_extension'].fields.append( _SEGMENTS.fields_by_name['interaction_on_this_extension']) _SEGMENTS.fields_by_name['interaction_on_this_extension'].containing_oneof = _SEGMENTS.oneofs_by_name['_interaction_on_this_extension'] _SEGMENTS.oneofs_by_name['_month'].fields.append( _SEGMENTS.fields_by_name['month']) _SEGMENTS.fields_by_name['month'].containing_oneof = _SEGMENTS.oneofs_by_name['_month'] _SEGMENTS.oneofs_by_name['_partner_hotel_id'].fields.append( _SEGMENTS.fields_by_name['partner_hotel_id']) _SEGMENTS.fields_by_name['partner_hotel_id'].containing_oneof = _SEGMENTS.oneofs_by_name['_partner_hotel_id'] _SEGMENTS.oneofs_by_name['_product_aggregator_id'].fields.append( _SEGMENTS.fields_by_name['product_aggregator_id']) _SEGMENTS.fields_by_name['product_aggregator_id'].containing_oneof = _SEGMENTS.oneofs_by_name['_product_aggregator_id'] _SEGMENTS.oneofs_by_name['_product_bidding_category_level1'].fields.append( _SEGMENTS.fields_by_name['product_bidding_category_level1']) _SEGMENTS.fields_by_name['product_bidding_category_level1'].containing_oneof = _SEGMENTS.oneofs_by_name['_product_bidding_category_level1'] _SEGMENTS.oneofs_by_name['_product_bidding_category_level2'].fields.append( _SEGMENTS.fields_by_name['product_bidding_category_level2']) _SEGMENTS.fields_by_name['product_bidding_category_level2'].containing_oneof = _SEGMENTS.oneofs_by_name['_product_bidding_category_level2'] _SEGMENTS.oneofs_by_name['_product_bidding_category_level3'].fields.append( _SEGMENTS.fields_by_name['product_bidding_category_level3']) _SEGMENTS.fields_by_name['product_bidding_category_level3'].containing_oneof = _SEGMENTS.oneofs_by_name['_product_bidding_category_level3'] _SEGMENTS.oneofs_by_name['_product_bidding_category_level4'].fields.append( _SEGMENTS.fields_by_name['product_bidding_category_level4']) _SEGMENTS.fields_by_name['product_bidding_category_level4'].containing_oneof = _SEGMENTS.oneofs_by_name['_product_bidding_category_level4'] _SEGMENTS.oneofs_by_name['_product_bidding_category_level5'].fields.append( _SEGMENTS.fields_by_name['product_bidding_category_level5']) _SEGMENTS.fields_by_name['product_bidding_category_level5'].containing_oneof = _SEGMENTS.oneofs_by_name['_product_bidding_category_level5'] _SEGMENTS.oneofs_by_name['_product_brand'].fields.append( _SEGMENTS.fields_by_name['product_brand']) _SEGMENTS.fields_by_name['product_brand'].containing_oneof = _SEGMENTS.oneofs_by_name['_product_brand'] _SEGMENTS.oneofs_by_name['_product_country'].fields.append( _SEGMENTS.fields_by_name['product_country']) _SEGMENTS.fields_by_name['product_country'].containing_oneof = _SEGMENTS.oneofs_by_name['_product_country'] _SEGMENTS.oneofs_by_name['_product_custom_attribute0'].fields.append( _SEGMENTS.fields_by_name['product_custom_attribute0']) _SEGMENTS.fields_by_name['product_custom_attribute0'].containing_oneof = _SEGMENTS.oneofs_by_name['_product_custom_attribute0'] _SEGMENTS.oneofs_by_name['_product_custom_attribute1'].fields.append( _SEGMENTS.fields_by_name['product_custom_attribute1']) _SEGMENTS.fields_by_name['product_custom_attribute1'].containing_oneof = _SEGMENTS.oneofs_by_name['_product_custom_attribute1'] _SEGMENTS.oneofs_by_name['_product_custom_attribute2'].fields.append( _SEGMENTS.fields_by_name['product_custom_attribute2']) _SEGMENTS.fields_by_name['product_custom_attribute2'].containing_oneof = _SEGMENTS.oneofs_by_name['_product_custom_attribute2'] _SEGMENTS.oneofs_by_name['_product_custom_attribute3'].fields.append( _SEGMENTS.fields_by_name['product_custom_attribute3']) _SEGMENTS.fields_by_name['product_custom_attribute3'].containing_oneof = _SEGMENTS.oneofs_by_name['_product_custom_attribute3'] _SEGMENTS.oneofs_by_name['_product_custom_attribute4'].fields.append( _SEGMENTS.fields_by_name['product_custom_attribute4']) _SEGMENTS.fields_by_name['product_custom_attribute4'].containing_oneof = _SEGMENTS.oneofs_by_name['_product_custom_attribute4'] _SEGMENTS.oneofs_by_name['_product_item_id'].fields.append( _SEGMENTS.fields_by_name['product_item_id']) _SEGMENTS.fields_by_name['product_item_id'].containing_oneof = _SEGMENTS.oneofs_by_name['_product_item_id'] _SEGMENTS.oneofs_by_name['_product_language'].fields.append( _SEGMENTS.fields_by_name['product_language']) _SEGMENTS.fields_by_name['product_language'].containing_oneof = _SEGMENTS.oneofs_by_name['_product_language'] _SEGMENTS.oneofs_by_name['_product_merchant_id'].fields.append( _SEGMENTS.fields_by_name['product_merchant_id']) _SEGMENTS.fields_by_name['product_merchant_id'].containing_oneof = _SEGMENTS.oneofs_by_name['_product_merchant_id'] _SEGMENTS.oneofs_by_name['_product_store_id'].fields.append( _SEGMENTS.fields_by_name['product_store_id']) _SEGMENTS.fields_by_name['product_store_id'].containing_oneof = _SEGMENTS.oneofs_by_name['_product_store_id'] _SEGMENTS.oneofs_by_name['_product_title'].fields.append( _SEGMENTS.fields_by_name['product_title']) _SEGMENTS.fields_by_name['product_title'].containing_oneof = _SEGMENTS.oneofs_by_name['_product_title'] _SEGMENTS.oneofs_by_name['_product_type_l1'].fields.append( _SEGMENTS.fields_by_name['product_type_l1']) _SEGMENTS.fields_by_name['product_type_l1'].containing_oneof = _SEGMENTS.oneofs_by_name['_product_type_l1'] _SEGMENTS.oneofs_by_name['_product_type_l2'].fields.append( _SEGMENTS.fields_by_name['product_type_l2']) _SEGMENTS.fields_by_name['product_type_l2'].containing_oneof = _SEGMENTS.oneofs_by_name['_product_type_l2'] _SEGMENTS.oneofs_by_name['_product_type_l3'].fields.append( _SEGMENTS.fields_by_name['product_type_l3']) _SEGMENTS.fields_by_name['product_type_l3'].containing_oneof = _SEGMENTS.oneofs_by_name['_product_type_l3'] _SEGMENTS.oneofs_by_name['_product_type_l4'].fields.append( _SEGMENTS.fields_by_name['product_type_l4']) _SEGMENTS.fields_by_name['product_type_l4'].containing_oneof = _SEGMENTS.oneofs_by_name['_product_type_l4'] _SEGMENTS.oneofs_by_name['_product_type_l5'].fields.append( _SEGMENTS.fields_by_name['product_type_l5']) _SEGMENTS.fields_by_name['product_type_l5'].containing_oneof = _SEGMENTS.oneofs_by_name['_product_type_l5'] _SEGMENTS.oneofs_by_name['_quarter'].fields.append( _SEGMENTS.fields_by_name['quarter']) _SEGMENTS.fields_by_name['quarter'].containing_oneof = _SEGMENTS.oneofs_by_name['_quarter'] _SEGMENTS.oneofs_by_name['_webpage'].fields.append( _SEGMENTS.fields_by_name['webpage']) _SEGMENTS.fields_by_name['webpage'].containing_oneof = _SEGMENTS.oneofs_by_name['_webpage'] _SEGMENTS.oneofs_by_name['_week'].fields.append( _SEGMENTS.fields_by_name['week']) _SEGMENTS.fields_by_name['week'].containing_oneof = _SEGMENTS.oneofs_by_name['_week'] _SEGMENTS.oneofs_by_name['_year'].fields.append( _SEGMENTS.fields_by_name['year']) _SEGMENTS.fields_by_name['year'].containing_oneof = _SEGMENTS.oneofs_by_name['_year'] _KEYWORD.fields_by_name['info'].message_type = google_dot_ads_dot_googleads_dot_v6_dot_common_dot_criteria__pb2._KEYWORDINFO _KEYWORD.oneofs_by_name['_ad_group_criterion'].fields.append( _KEYWORD.fields_by_name['ad_group_criterion']) _KEYWORD.fields_by_name['ad_group_criterion'].containing_oneof = _KEYWORD.oneofs_by_name['_ad_group_criterion'] _BUDGETCAMPAIGNASSOCIATIONSTATUS.fields_by_name['status'].enum_type = google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_budget__campaign__association__status__pb2._BUDGETCAMPAIGNASSOCIATIONSTATUSENUM_BUDGETCAMPAIGNASSOCIATIONSTATUS _BUDGETCAMPAIGNASSOCIATIONSTATUS.oneofs_by_name['_campaign'].fields.append( _BUDGETCAMPAIGNASSOCIATIONSTATUS.fields_by_name['campaign']) _BUDGETCAMPAIGNASSOCIATIONSTATUS.fields_by_name['campaign'].containing_oneof = _BUDGETCAMPAIGNASSOCIATIONSTATUS.oneofs_by_name['_campaign'] DESCRIPTOR.message_types_by_name['Segments'] = _SEGMENTS DESCRIPTOR.message_types_by_name['Keyword'] = _KEYWORD DESCRIPTOR.message_types_by_name['BudgetCampaignAssociationStatus'] = _BUDGETCAMPAIGNASSOCIATIONSTATUS _sym_db.RegisterFileDescriptor(DESCRIPTOR) Segments = _reflection.GeneratedProtocolMessageType('Segments', (_message.Message,), { 'DESCRIPTOR' : _SEGMENTS, '__module__' : 'google.ads.googleads.v6.common.segments_pb2' # @@protoc_insertion_point(class_scope:google.ads.googleads.v6.common.Segments) }) _sym_db.RegisterMessage(Segments) Keyword = _reflection.GeneratedProtocolMessageType('Keyword', (_message.Message,), { 'DESCRIPTOR' : _KEYWORD, '__module__' : 'google.ads.googleads.v6.common.segments_pb2' # @@protoc_insertion_point(class_scope:google.ads.googleads.v6.common.Keyword) }) _sym_db.RegisterMessage(Keyword) BudgetCampaignAssociationStatus = _reflection.GeneratedProtocolMessageType('BudgetCampaignAssociationStatus', (_message.Message,), { 'DESCRIPTOR' : _BUDGETCAMPAIGNASSOCIATIONSTATUS, '__module__' : 'google.ads.googleads.v6.common.segments_pb2' # @@protoc_insertion_point(class_scope:google.ads.googleads.v6.common.BudgetCampaignAssociationStatus) }) _sym_db.RegisterMessage(BudgetCampaignAssociationStatus) DESCRIPTOR._options = None # @@protoc_insertion_point(module_scope)
73.100486
10,392
0.800401
12,538
90,206
5.304195
0.049609
0.037652
0.064853
0.058643
0.866715
0.831469
0.803861
0.742406
0.660847
0.635405
0
0.036969
0.08842
90,206
1,233
10,393
73.159773
0.771786
0.005476
0
0.546058
1
0.005809
0.258598
0.211262
0
0
0
0
0
1
0
false
0
0.023237
0
0.023237
0
0
0
0
null
0
0
0
1
1
1
1
0
1
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
6914a1cd08bda4f67656b4c2497dec7df984a675
8,907
py
Python
authors/apps/articles/test_articles_ratings.py
andela/ah-leagueOfLegends
ebe3a4621a5baf36a9345d4b126ba73dc37acd1f
[ "BSD-3-Clause" ]
null
null
null
authors/apps/articles/test_articles_ratings.py
andela/ah-leagueOfLegends
ebe3a4621a5baf36a9345d4b126ba73dc37acd1f
[ "BSD-3-Clause" ]
43
2018-08-27T16:53:58.000Z
2022-03-11T23:28:24.000Z
authors/apps/articles/test_articles_ratings.py
andela/ah-leagueOfLegends
ebe3a4621a5baf36a9345d4b126ba73dc37acd1f
[ "BSD-3-Clause" ]
2
2018-10-30T10:30:35.000Z
2018-11-12T07:48:02.000Z
from ..base_test import BaseTest from django.urls import reverse from rest_framework.views import status import json class ArticleTestCase(BaseTest): """ Class implements tests for artcles """ def create_article(self, token, article): """ Helper method to creates an article """ return self.client.post( '/api/articles', article, HTTP_AUTHORIZATION='Bearer ' + token, format='json' ) def rate_article(self, token, slug, rate): """ Helper method to creates an article """ return self.client.post( '/api/articles/' + slug + '/rate/', rate, HTTP_AUTHORIZATION='Bearer ' + token, format='json' ) def test_cannot_rate_own_article(self): """ Test an article can be searched by title and returned successfully """ response = self.client.post( self.SIGN_UP_URL, self.user_cred, format='json') response = self.client.post( reverse('authentication:user_login'), self.user_cred, format='json') token = response.data['token'] article= { "article": { "title": "How to feed your dragon", "description": "Wanna know how?", "body": "You don't believe?", } } response = self.create_article(token, article) slug = 'how-to-feed-your-dragon' rate={ "rate": { "rating": 5 } } response = self.rate_article(token, slug, rate) self.assertEquals(status.HTTP_401_UNAUTHORIZED, response.status_code) def test_can_rate_article_successfully(self): """ Tests whether a user can delete an article when not author Method registers a user, logs in the user, creates an article, then updates the article """ response = self.client.post( self.SIGN_UP_URL, self.user_cred, format='json') response = self.client.post( reverse('authentication:user_login'), self.user_cred, format='json') token = response.data['token'] article = { "article": { "title": "How to feed your dragon", "description": "Wanna know how?", "body": "You don't believe?", } } response = self.create_article(token, article) # Asserr true that an article has been created self.assertEquals(status.HTTP_201_CREATED, response.status_code) response = self.client.post( self.SIGN_UP_URL, self.user_cred1, format='json') response = self.client.post( reverse('authentication:user_login'), self.user_cred1, format='json') token = response.data['token'] # Delete the article created by another user. # Expects to throw a 404 error slug = 'how-to-feed-your-dragon' rate={ "rate": { "rating": 5, "note": "I loved the dragons story" } } response = self.rate_article(token, slug, rate) self.assertEquals(status.HTTP_201_CREATED, response.status_code) def test_can_rate_article_not_integer(self): """ Tests whether a user can delete an article when not author Method registers a user, logs in the user, creates an article, then updates the article """ response = self.client.post( self.SIGN_UP_URL, self.user_cred, format='json') response = self.client.post( reverse('authentication:user_login'), self.user_cred, format='json') token = response.data['token'] article = { "article": { "title": "How to feed your dragon", "description": "Wanna know how?", "body": "You don't believe?", } } response = self.create_article(token, article) # Asserr true that an article has been created self.assertEquals(status.HTTP_201_CREATED, response.status_code) response = self.client.post( self.SIGN_UP_URL, self.user_cred1, format='json') response = self.client.post( reverse('authentication:user_login'), self.user_cred1, format='json') token = response.data['token'] # Delete the article created by another user. # Expects to throw a 404 error slug = 'how-to-feed-your-dragon' rate={ "rate": { "rating": "5", "note": "I loved the dragons story" } } response = self.rate_article(token, slug, rate) self.assertEquals(status.HTTP_401_UNAUTHORIZED, response.status_code) def test_can_rate_article_rate_value_greater_than_5(self): """ Tests whether a user can delete an article when not author Method registers a user, logs in the user, creates an article, then updates the article """ response = self.client.post( self.SIGN_UP_URL, self.user_cred, format='json') response = self.client.post( reverse('authentication:user_login'), self.user_cred, format='json') token = response.data['token'] article = { "article": { "title": "How to feed your dragon", "description": "Wanna know how?", "body": "You don't believe?", } } response = self.create_article(token, article) # Asserr true that an article has been created self.assertEquals(status.HTTP_201_CREATED, response.status_code) response = self.client.post( self.SIGN_UP_URL, self.user_cred1, format='json') response = self.client.post( reverse('authentication:user_login'), self.user_cred1, format='json') token = response.data['token'] # Delete the article created by another user. # Expects to throw a 404 error slug = 'how-to-feed-your-dragon' rate={ "rate": { "rating": 6, "note": "I loved the dragons story" } } response = self.rate_article(token, slug, rate) self.assertEquals(status.HTTP_401_UNAUTHORIZED, response.status_code) def test_can_rate_article_rate_value_less_than_1(self): """ Tests whether a user can delete an article when not author Method registers a user, logs in the user, creates an article, then updates the article """ response = self.client.post( self.SIGN_UP_URL, self.user_cred, format='json') response = self.client.post( reverse('authentication:user_login'), self.user_cred, format='json') token = response.data['token'] article = { "article": { "title": "How to feed your dragon", "description": "Wanna know how?", "body": "You don't believe?", } } response = self.create_article(token, article) # Asserr true that an article has been created self.assertEquals(status.HTTP_201_CREATED, response.status_code) response = self.client.post( self.SIGN_UP_URL, self.user_cred1, format='json') response = self.client.post( reverse('authentication:user_login'), self.user_cred1, format='json') token = response.data['token'] # Delete the article created by another user. # Expects to throw a 404 error slug = 'how-to-feed-your-dragon' rate={ "rate": { "rating": 0, "note": "I loved the dragons story" } } response = self.rate_article(token, slug, rate) self.assertEquals(status.HTTP_401_UNAUTHORIZED, response.status_code)
31.034843
77
0.516111
897
8,907
4.994426
0.128205
0.075
0.0625
0.088393
0.918973
0.918973
0.918973
0.90067
0.895982
0.889732
0
0.009954
0.390928
8,907
287
78
31.034843
0.815853
0.138543
0
0.765854
0
0
0.146984
0.045681
0
0
0
0
0.043902
1
0.034146
false
0
0.019512
0
0.068293
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
691a54d8c72507cabd3c980e8b03ee2d2d0cd10b
122
py
Python
use1.py
pythontrainernag/python_7
eaff90ac6885f3c1e1db91d885215040b32d8f0f
[ "MIT" ]
null
null
null
use1.py
pythontrainernag/python_7
eaff90ac6885f3c1e1db91d885215040b32d8f0f
[ "MIT" ]
null
null
null
use1.py
pythontrainernag/python_7
eaff90ac6885f3c1e1db91d885215040b32d8f0f
[ "MIT" ]
null
null
null
import arth print arth.addi(4, 8) print arth.subs(4, 8) print arth.mul(4, 8) print arth.a obj = arth.Myclass() print obj
13.555556
21
0.704918
25
122
3.44
0.44
0.418605
0.244186
0.383721
0
0
0
0
0
0
0
0.058252
0.155738
122
8
22
15.25
0.776699
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0.142857
null
null
0.714286
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
1
0
0
0
0
0
0
1
0
7
694e910fd479c311b592de678d764f3d0b499d04
15,259
py
Python
scheduler.py
YangChenye/Khameleon-Scheduler-RL
7ddfe067bf5ebb757b06aede6591e9f86ea4af6a
[ "MIT" ]
null
null
null
scheduler.py
YangChenye/Khameleon-Scheduler-RL
7ddfe067bf5ebb757b06aede6591e9f86ea4af6a
[ "MIT" ]
null
null
null
scheduler.py
YangChenye/Khameleon-Scheduler-RL
7ddfe067bf5ebb757b06aede6591e9f86ea4af6a
[ "MIT" ]
null
null
null
# Created by Chenye Yang on 2020/8/12. # Copyright © 2020 Chenye Yang. All rights reserved. import random import numpy as np import matplotlib.pyplot as plt class Scheduler(): def epsilon_greedy(self, value, e, seed=None): ''' Implement Epsilon-Greedy policy. Inputs: value: numpy ndarray A vector of values of actions to choose from e: float Epsilon seed: None or int Assign an integer value to remove the randomness Outputs: action: int Index of the chosen action ''' assert len(value.shape) == 1 assert 0 <= e <= 1 if seed != None: np.random.seed(seed) ############################ # YOUR CODE STARTS HERE if random.random() > e: # prob = 1-e action = np.argmax(value) else: # prob = e action = random.randrange(value.size) # YOUR CODE ENDS HERE ############################ return action def follow_prediction(self, prediction): ''' choose action from Prediction with max prob. Inputs: prediction: float list A list of predicted probability of actions to choose from Outputs: action: int Index of the chosen action ''' action = prediction.index(max(prediction)) return action def which_action(self, prediction, value, e, seed=None): ''' balance between greedy-policy and predicted distribution. Inputs: prediction: float list A list of predicted probability of actions to choose from value: numpy ndarray A vector of values of actions to choose from e: float Epsilon seed: None or int Assign an integer value to remove the randomness Outputs: action: int Index of the chosen action ''' balance = 0.1 if random.random() > balance: action = self.epsilon_greedy(value, e, seed) # choose action from State using e-greedy policy derived from Q else: action = self.follow_prediction(prediction) # choose action from Prediction with max prob return action def QLearning(self, prediction, env, num_episodes, gamma, lr, e): """ Implement the Q-learning algorithm following the epsilon-greedy exploration. Inputs: env: OpenAI Gym environment env.P: dictionary P[state][action] are tuples of tuples tuples with (probability, nextstate, reward, terminal) probability: float nextstate: int reward: float terminal: boolean env.nS: int number of states env.nA: int number of actions num_episodes: int Number of episodes of training gamma: float Discount factor. lr: float Learning rate. e: float Epsilon value used in the epsilon-greedy method. Outputs: Q: numpy.ndarray """ Q = np.zeros((env.nS, env.nA)) ############################ # YOUR CODE STARTS HERE max_iteration = 600 average_reward_Q = [0 for i in range(num_episodes)] for episode in range(num_episodes): state = random.randint(0, (env.nS - 1)) # randomly initialize start state step = 0 while (not env.P[state][0][0][3] and step < max_iteration): step += 1 action = self.which_action(prediction, Q[state], e) # which action to take reward = env.P[state][action][0][2] # take action, get reward next_state = env.P[state][action][0][1] # take action, get next state diff = Q[next_state] Q[state][action] = Q[state][action] + lr * ( reward + gamma * Q[next_state][np.argmax(Q[next_state])] - Q[state][action]) state = next_state average_reward_Q[episode] += reward if step != 0: average_reward_Q[episode] = average_reward_Q[episode] / step # Plot the learning process of both algorithms for training 1000 episodes. plt.plot([i for i in range(num_episodes)], average_reward_Q, label="Q-Learning") plt.legend() plt.xlabel('episodes numbers') plt.ylabel('average rewards') plt.title('Q-Learning learning process') plt.show() # YOUR CODE ENDS HERE ############################ return Q def SARSA(self, prediction, env, num_episodes, gamma, lr, e): """ Implement the SARSA algorithm following epsilon-greedy exploration. Inputs: env: OpenAI Gym environment env.P: dictionary P[state][action] are tuples of tuples tuples with (probability, nextstate, reward, terminal) probability: float nextstate: int reward: float terminal: boolean env.nS: int number of states env.nA: int number of actions num_episodes: int Number of episodes of training gamma: float Discount factor. lr: float Learning rate. e: float Epsilon value used in the epsilon-greedy method. Outputs: Q: numpy.ndarray State-action values """ Q = np.zeros((env.nS, env.nA)) ############################ # YOUR CODE STARTS HERE max_iteration = 600 average_reward_SARSA = [0 for i in range(num_episodes)] for episode in range(num_episodes): state = random.randint(0, (env.nS - 1)) # randomly initialize start state action = self.which_action(prediction, Q[state], e) # which action to take step = 0 while (not env.P[state][0][0][3] and step < max_iteration): step += 1 reward = env.P[state][action][0][2] # take action, get reward next_state = env.P[state][action][0][1] # take action, get next state next_action = self.which_action(prediction, Q[next_state], e) # which action to take diff = [Q[next_state][a] - Q[state][action] for a in range(env.nA)] Q[state][action] = Q[state][action] + lr * (reward + gamma * Q[next_state][next_action] - Q[state][action]) state = next_state action = next_action average_reward_SARSA[episode] += reward if step != 0: average_reward_SARSA[episode] = average_reward_SARSA[episode] / step # Plot the learning process of both algorithms for training 1000 episodes. plt.plot([i for i in range(num_episodes)], average_reward_SARSA, label="SARSA") plt.legend() plt.xlabel('episodes numbers') plt.ylabel('average rewards') plt.title('SARSA learning process') plt.show() # YOUR CODE ENDS HERE ############################ return Q class Scheduler_Dynamic(): def epsilon_greedy(self, value, e, seed=None): ''' Implement Epsilon-Greedy policy. Inputs: value: numpy ndarray A vector of values of actions to choose from e: float Epsilon seed: None or int Assign an integer value to remove the randomness Outputs: action: int Index of the chosen action ''' assert len(value.shape) == 1 assert 0 <= e <= 1 if seed != None: np.random.seed(seed) ############################ # YOUR CODE STARTS HERE if random.random() > e: # prob = 1-e action = np.argmax(value) else: # prob = e action = random.randrange(value.size) # YOUR CODE ENDS HERE ############################ return action def follow_prediction(self, prediction): ''' choose action from Prediction with max prob. Inputs: prediction: float list A list of predicted probability of actions to choose from Outputs: action: int Index of the chosen action ''' action = prediction.index(max(prediction)) return action def which_action(self, prediction, value, e, seed=None): ''' balance between greedy-policy and predicted distribution. Inputs: prediction: float list A list of predicted probability of actions to choose from value: numpy ndarray A vector of values of actions to choose from e: float Epsilon seed: None or int Assign an integer value to remove the randomness Outputs: action: int Index of the chosen action ''' chance = 0 if random.random() > chance: action = self.epsilon_greedy(value, e, seed) # choose action from State using e-greedy policy derived from Q else: action = self.follow_prediction(prediction) # choose action from Prediction with max prob return action def QLearning(self, prediction, env, num_episodes, gamma, lr, e): """ Implement the Q-learning algorithm following the epsilon-greedy exploration. Inputs: env: OpenAI Gym environment env.P: dictionary P[state][action] are tuples of tuples tuples with (probability, nextstate, reward, terminal) probability: float nextstate: int reward: float terminal: boolean env.nS: int number of states env.nA: int number of actions num_episodes: int Number of episodes of training gamma: float Discount factor. lr: float Learning rate. e: float Epsilon value used in the epsilon-greedy method. Outputs: Q: numpy.ndarray """ Q = np.zeros((env.nS, env.nA)) ############################ # YOUR CODE STARTS HERE max_iteration = 600 average_reward_Q = [0 for i in range(num_episodes)] for episode in range(num_episodes): state = random.randint(0, (env.nS - 1)) # randomly initialize start state step = 0 while (step < max_iteration): step += 1 action = self.which_action(prediction, Q[state], e) # which action to take next_state, reward = env.trans(state)[action][0][1:3] # take action, get next state and reward diff = Q[next_state] Q[state][action] = Q[state][action] + lr * ( reward + gamma * Q[next_state][np.argmax(Q[next_state])] - Q[state][action]) state = next_state average_reward_Q[episode] += reward if step != 0: average_reward_Q[episode] = average_reward_Q[episode] / step # Plot the learning process of both algorithms for training 1000 episodes. plt.plot([i for i in range(num_episodes)], average_reward_Q, label="Q-Learning") plt.legend() plt.xlabel('episodes numbers') plt.ylabel('average rewards') plt.title('Q-Learning learning process') plt.show() # YOUR CODE ENDS HERE ############################ return Q def SARSA(self, prediction, env, num_episodes, gamma, lr, e): """ Implement the SARSA algorithm following epsilon-greedy exploration. Inputs: env: OpenAI Gym environment env.trans(): dictionary trans(state)[action] are tuples of tuples tuples with (probability, nextstate, reward, terminal) probability: float nextstate: int reward: float terminal: boolean env.nS: int number of states env.nA: int number of actions num_episodes: int Number of episodes of training gamma: float Discount factor. lr: float Learning rate. e: float Epsilon value used in the epsilon-greedy method. Outputs: Q: numpy.ndarray State-action values """ Q = np.zeros((env.nS, env.nA)) ############################ # YOUR CODE STARTS HERE max_iteration = 600 average_reward_SARSA = [0 for i in range(num_episodes)] for episode in range(num_episodes): state = random.randint(0, (env.nS - 1)) # randomly initialize start state action = self.which_action(prediction, Q[state], e) # which action to take step = 0 while (step < max_iteration): step += 1 next_state, reward = env.trans(state)[action][0][1:3] # take action, get next state and reward next_action = self.which_action(prediction, Q[next_state], e) # which action to take diff = [Q[next_state][a] - Q[state][action] for a in range(env.nA)] Q[state][action] = Q[state][action] + lr * (reward + gamma * Q[next_state][next_action] - Q[state][action]) state = next_state action = next_action average_reward_SARSA[episode] += reward if step != 0: average_reward_SARSA[episode] = average_reward_SARSA[episode] / step # Plot the learning process of both algorithms for training 1000 episodes. plt.plot([i for i in range(num_episodes)], average_reward_SARSA, label="SARSA") plt.legend() plt.xlabel('episodes numbers') plt.ylabel('average rewards') plt.title('SARSA learning process') plt.show() # YOUR CODE ENDS HERE ############################ return Q if __name__ == '__main__': # test import gym from helpers import utils from helpers import evaluation_utils env = gym.make('Taxi-v3') scheduler = Scheduler() Q = scheduler.QLearning(env=env.env, num_episodes=1000, gamma=1, lr=0.1, e=0.1) print('Action values:') print(Q) policy_estimate = utils.action_selection(Q) evaluation_utils.render_episode(env, policy_estimate) Q = scheduler.SARSA(env=env.env, num_episodes=1000, gamma=1, lr=0.1, e=0.1) print('Action values:') print(Q) policy_estimate = utils.action_selection(Q) evaluation_utils.render_episode(env, policy_estimate)
34.136465
123
0.540337
1,729
15,259
4.692886
0.099479
0.04067
0.020705
0.026621
0.953167
0.953167
0.953167
0.953167
0.950579
0.950579
0
0.011574
0.360181
15,259
447
124
34.136465
0.81942
0.376237
0
0.89697
0
0
0.038104
0
0
0
0
0
0.024242
1
0.060606
false
0
0.036364
0
0.169697
0.024242
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
696b2c84c3650d44d65c193d3c953d243a83a508
122
py
Python
data/loader.py
hhio618/golem-dbscan
4f00f1af933c2cec9007080f07df43d6d3742036
[ "Apache-2.0" ]
null
null
null
data/loader.py
hhio618/golem-dbscan
4f00f1af933c2cec9007080f07df43d6d3742036
[ "Apache-2.0" ]
null
null
null
data/loader.py
hhio618/golem-dbscan
4f00f1af933c2cec9007080f07df43d6d3742036
[ "Apache-2.0" ]
1
2021-11-13T13:49:37.000Z
2021-11-13T13:49:37.000Z
import os import numpy as np def load_patches(): return np.genfromtxt("data%spatches.txt" % os.sep, delimiter=',').T
20.333333
71
0.704918
19
122
4.473684
0.842105
0
0
0
0
0
0
0
0
0
0
0
0.147541
122
6
71
20.333333
0.817308
0
0
0
0
0
0.146341
0
0
0
0
0
0
1
0.25
true
0
0.5
0.25
1
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
0
0
0
1
1
0
1
1
1
0
0
7
c605a7e00fc54987fcef71e63543b64b0dec93e1
2,312
py
Python
2017/1_1.py
elmisback/aoc
ceac42bfc6bd925549860c133be2ad7862b9a427
[ "MIT" ]
null
null
null
2017/1_1.py
elmisback/aoc
ceac42bfc6bd925549860c133be2ad7862b9a427
[ "MIT" ]
null
null
null
2017/1_1.py
elmisback/aoc
ceac42bfc6bd925549860c133be2ad7862b9a427
[ "MIT" ]
null
null
null
s = "951484596541141557316984781494999179679767747627132447513171626424561779662873157761442952212296685573452311263445163233493199211387838461594635666699422982947782623317333683978438123261326863959719777179228599319321138948466562743761584836184512984131635354116264899181952748224523953976485816295227945792555726121913344959454458829485471174415775278865324142733339789878929596275998341778873889585819916457474773252249179366599951454182657225576277834669222982366884688565754691273745959468648957498511326215934353963981471593984617554514519623785326888374742147318993423214834751785956958395133486656388454552769722562524415715913869946325551396638593398729938526424994348267935153555851552287223313383583669912941364344694725478258297498969517632881187394141593479818536194597976519254215932257653777455227477617957833273463216593642394215275314734914719726618923177918342664351954252667253233858814365351722938716621544226598956257753212248859258351363174782742336961425325381561575992352415514168782816173861148859478285339529151631429536819286498721812323861771638574344416879476255929929157912984151742613268754779685396125954595318134933366626594498249956388771723777242772654678448815844555372892574747735672368299826548254744359377667294764559334659523233146587568261116253155189394188696831691284711264872914348961888253386971994431352474717376878745948769171243242621219912378731755544387249443997382399714738351857752329367997665166956467544459817582915478514486541453932175598413554259672117364863112592515988922747164842668361925135551248923449968328385889877512156952725198691746951431443497496455761516486573476185321748523644283494181119399874324683922393547682851931435931276267766772798261563117954648576421741384823494187895272582575669685279986988357796138794326125852772995446355723211161523161886222562853546488411563473998633847953246787557146187696947831335722888918172961256498971868946237299523474841983527391489962357196433927251798764362493965894995592683296651874787384247326643886774966828657393717626591578321174832222434128817871765347278152799425565633521152643686221411129463425496425385516719682884157452772141585743166647191938727971366274357874252166721759" A = list(map(int, s)) sum = 0 for i, e in enumerate(A): if e == A[(i+1)%len(A)]: sum += A[i] print sum
256.888889
2,202
0.974481
27
2,312
83.444444
0.62963
0.001775
0
0
0
0
0
0
0
0
0
0.96319
0.012976
2,312
8
2,203
289
0.024102
0
0
0
0
0
0.949827
0.949827
0
1
0
0
0
0
null
null
0
0
null
null
0.166667
1
0
1
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
1
1
1
0
0
0
0
0
1
1
null
1
0
0
0
1
0
0
0
0
0
0
0
0
11
c6559d9757bb500932df87b7a6809811eb6a7cc2
4,866
py
Python
tests/kubectl_test.py
enamrik/krogon
a41a10ed346b7198509929ed9ba1e9fcf778dc78
[ "MIT" ]
1
2020-03-02T14:17:02.000Z
2020-03-02T14:17:02.000Z
tests/kubectl_test.py
enamrik/krogon
a41a10ed346b7198509929ed9ba1e9fcf778dc78
[ "MIT" ]
null
null
null
tests/kubectl_test.py
enamrik/krogon
a41a10ed346b7198509929ed9ba1e9fcf778dc78
[ "MIT" ]
null
null
null
import json from krogon import gke_conn from krogon.k8s.providers.gke_provider import GKEProvider from tests.helpers.assert_diff import assert_same_dict from tests.helpers.mock_os_system import MockOsSystem from unittest.mock import patch from krogon.config import config from base64 import b64encode, b64decode from tests.helpers.entry_mocks import mock_krogon_dsl def test_gke_conn_can_get_project_id_if_exits(): def _run_dsl(_args): project_id = "someId" service_account_key = {"key": "someKey"} service_account_b64 = b64encode(json.dumps(service_account_key).encode('utf-8')).decode('utf-8') conf = config() k_ctl = gke_conn(cluster_regex='.*', project_id=project_id, service_account_b64=service_account_b64)(conf) provider: GKEProvider = k_ctl.get_provider() assert provider.get_project_id() == project_id mock_krogon_dsl(_run_dsl) def test_gke_conn_can_get_project_id_if_exits_as_env_variable(): def _run_dsl(args): os: MockOsSystem = args['os_system'] project_id = "someId" os.mock_get_env('KG_PROJECT_ID', return_values=[project_id]) os.mock_get_env('KG_DELETE', return_values=["true"]) os.mock_get_env('KG_TEMPLATE', return_values=["false"]) service_account_key = {'key': 'someKey'} service_account_b64 = b64encode(json.dumps(service_account_key).encode('utf-8')).decode('utf-8') conf = config() k_ctl = gke_conn(cluster_regex='.*', project_id=project_id, service_account_b64=service_account_b64)(conf) provider: GKEProvider = k_ctl.get_provider() assert provider.get_project_id() == project_id mock_krogon_dsl(_run_dsl) def test_gke_conn_can_raise_error_if_project_id_missing(): def _run_dsl(_args): project_id = None service_account_key = {"key": "someKey"} service_account_b64 = b64encode(json.dumps(service_account_key).encode('utf-8')).decode('utf-8') conf = config() with patch('sys.exit', return_value="RaisedError"): k_ctl = gke_conn(cluster_regex='.*', project_id=project_id, service_account_b64=service_account_b64)(conf) provider: GKEProvider = k_ctl.get_provider() assert provider.get_project_id() == "RaisedError" mock_krogon_dsl(_run_dsl) def test_gke_conn_can_get_service_account_if_exits(): def _run_dsl(_args): project_id = "someId" service_account_key = {"key": "someKey"} service_account_b64 = b64encode(json.dumps(service_account_key).encode('utf-8')).decode('utf-8') conf = config() k_ctl = gke_conn(cluster_regex='.*', project_id=project_id, service_account_b64=service_account_b64)(conf) provider: GKEProvider = k_ctl.get_provider() assert_same_dict( provider.get_service_account_info(), service_account_key) mock_krogon_dsl(_run_dsl) def test_gke_conn_can_get_service_account_if_exits_as_env_variable(): def _run_dsl(args): os: MockOsSystem = args['os_system'] project_id = "someId" service_account_key = {"key": "someKey"} service_account_b64 = b64encode(json.dumps(service_account_key).encode('utf-8')).decode('utf-8') os.mock_get_env('KG_SERVICE_ACCOUNT_B64', return_values=[service_account_b64]) os.mock_get_env('KG_DELETE', return_values=["true"]) os.mock_get_env('KG_TEMPLATE', return_values=["false"]) conf = config() k_ctl = gke_conn(cluster_regex='.*', project_id=project_id)(conf) provider: GKEProvider = k_ctl.get_provider() assert_same_dict( provider.get_service_account_info(), service_account_key) mock_krogon_dsl(_run_dsl) def test_gke_conn_can_raise_error_if_service_account_missing(): def _run_dsl(_args): project_id = "someProjectId" conf = config() with patch('sys.exit', return_value=b64encode('{"error": "RaisedError"}'.encode('utf-8')).decode('utf-8')): k_ctl = gke_conn(cluster_regex='.*', project_id=project_id)(conf) provider: GKEProvider = k_ctl.get_provider() assert provider.get_service_account_info()['error'] == 'RaisedError' mock_krogon_dsl(_run_dsl) def test_gke_conn_can_get_service_account_info_if_exits(): def _run_dsl(_args): project_id = "someId" service_account_key = {"key": "someKey"} service_account_b64 = b64encode(json.dumps(service_account_key).encode('utf-8')).decode('utf-8') conf = config() k_ctl = gke_conn(cluster_regex='.*', project_id=project_id, service_account_b64=service_account_b64)(conf) provider: GKEProvider = k_ctl.get_provider() assert_same_dict( provider.get_service_account_info(), service_account_key) mock_krogon_dsl(_run_dsl)
38.314961
118
0.699548
655
4,866
4.738931
0.116031
0.184923
0.098582
0.052191
0.849549
0.834729
0.828286
0.809601
0.788982
0.788982
0
0.017938
0.186601
4,866
126
119
38.619048
0.766296
0
0
0.731183
0
0
0.077271
0.004521
0
0
0
0
0.086022
1
0.150538
false
0
0.096774
0
0.247312
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
d6a00332aaa6a33cfdf44a8861b624766d4a68ad
19,855
py
Python
python/swagger_client/api/services_api.py
alextselegidis/easyappointments-sdk
8ba969dc1221ea614b70d4d52313f20fc85df1e1
[ "CC-BY-3.0" ]
null
null
null
python/swagger_client/api/services_api.py
alextselegidis/easyappointments-sdk
8ba969dc1221ea614b70d4d52313f20fc85df1e1
[ "CC-BY-3.0" ]
null
null
null
python/swagger_client/api/services_api.py
alextselegidis/easyappointments-sdk
8ba969dc1221ea614b70d4d52313f20fc85df1e1
[ "CC-BY-3.0" ]
null
null
null
# coding: utf-8 """ Easy!Appointments API These are the OpenAPI specs that describe the REST API of Easy!Appointments. # noqa: E501 OpenAPI spec version: 1.0.0 Contact: info@easyappointments.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import re # noqa: F401 # python 2 and python 3 compatibility library import six from swagger_client.api_client import ApiClient class ServicesApi(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. Ref: https://github.com/swagger-api/swagger-codegen """ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def services_get(self, **kwargs): # noqa: E501 """Get all services # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.services_get(async_req=True) >>> result = thread.get() :param async_req bool :param int page: :param int length: :param str sort: :param str q: :param str fields: :param str _with: :return: ServiceCollection If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.services_get_with_http_info(**kwargs) # noqa: E501 else: (data) = self.services_get_with_http_info(**kwargs) # noqa: E501 return data def services_get_with_http_info(self, **kwargs): # noqa: E501 """Get all services # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.services_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :param int page: :param int length: :param str sort: :param str q: :param str fields: :param str _with: :return: ServiceCollection If the method is called asynchronously, returns the request thread. """ all_params = ['page', 'length', 'sort', 'q', 'fields', '_with'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method services_get" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 if 'length' in params: query_params.append(('length', params['length'])) # noqa: E501 if 'sort' in params: query_params.append(('sort', params['sort'])) # noqa: E501 if 'q' in params: query_params.append(('q', params['q'])) # noqa: E501 if 'fields' in params: query_params.append(('fields', params['fields'])) # noqa: E501 if '_with' in params: query_params.append(('with', params['_with'])) # noqa: E501 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 = ['BasicAuth', 'BearerToken'] # noqa: E501 return self.api_client.call_api( '/services', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ServiceCollection', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def services_post(self, body, **kwargs): # noqa: E501 """Create a service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.services_post(body, async_req=True) >>> result = thread.get() :param async_req bool :param ServicePayload body: (required) :return: ServiceRecord If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.services_post_with_http_info(body, **kwargs) # noqa: E501 else: (data) = self.services_post_with_http_info(body, **kwargs) # noqa: E501 return data def services_post_with_http_info(self, body, **kwargs): # noqa: E501 """Create a service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.services_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool :param ServicePayload body: (required) :return: ServiceRecord If the method is called asynchronously, returns the request thread. """ all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method services_post" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params or params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `services_post`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = 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 = ['BasicAuth', 'BearerToken'] # noqa: E501 return self.api_client.call_api( '/services', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ServiceRecord', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def services_service_id_delete(self, service_id, **kwargs): # noqa: E501 """Delete a service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.services_service_id_delete(service_id, async_req=True) >>> result = thread.get() :param async_req bool :param int service_id: (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.services_service_id_delete_with_http_info(service_id, **kwargs) # noqa: E501 else: (data) = self.services_service_id_delete_with_http_info(service_id, **kwargs) # noqa: E501 return data def services_service_id_delete_with_http_info(self, service_id, **kwargs): # noqa: E501 """Delete a service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.services_service_id_delete_with_http_info(service_id, async_req=True) >>> result = thread.get() :param async_req bool :param int service_id: (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['service_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') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method services_service_id_delete" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'service_id' is set if ('service_id' not in params or params['service_id'] is None): raise ValueError("Missing the required parameter `service_id` when calling `services_service_id_delete`") # noqa: E501 collection_formats = {} path_params = {} if 'service_id' in params: path_params['serviceId'] = params['service_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 = ['BasicAuth', 'BearerToken'] # noqa: E501 return self.api_client.call_api( '/services/{serviceId}', '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=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def services_service_id_get(self, service_id, **kwargs): # noqa: E501 """Get a service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.services_service_id_get(service_id, async_req=True) >>> result = thread.get() :param async_req bool :param int service_id: (required) :return: ServiceRecord If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.services_service_id_get_with_http_info(service_id, **kwargs) # noqa: E501 else: (data) = self.services_service_id_get_with_http_info(service_id, **kwargs) # noqa: E501 return data def services_service_id_get_with_http_info(self, service_id, **kwargs): # noqa: E501 """Get a service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.services_service_id_get_with_http_info(service_id, async_req=True) >>> result = thread.get() :param async_req bool :param int service_id: (required) :return: ServiceRecord If the method is called asynchronously, returns the request thread. """ all_params = ['service_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') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method services_service_id_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'service_id' is set if ('service_id' not in params or params['service_id'] is None): raise ValueError("Missing the required parameter `service_id` when calling `services_service_id_get`") # noqa: E501 collection_formats = {} path_params = {} if 'service_id' in params: path_params['serviceId'] = params['service_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 = ['BasicAuth', 'BearerToken'] # noqa: E501 return self.api_client.call_api( '/services/{serviceId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ServiceRecord', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def services_service_id_put(self, body, service_id, **kwargs): # noqa: E501 """Update a service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.services_service_id_put(body, service_id, async_req=True) >>> result = thread.get() :param async_req bool :param ServicePayload body: (required) :param int service_id: (required) :return: ServiceRecord If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.services_service_id_put_with_http_info(body, service_id, **kwargs) # noqa: E501 else: (data) = self.services_service_id_put_with_http_info(body, service_id, **kwargs) # noqa: E501 return data def services_service_id_put_with_http_info(self, body, service_id, **kwargs): # noqa: E501 """Update a service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.services_service_id_put_with_http_info(body, service_id, async_req=True) >>> result = thread.get() :param async_req bool :param ServicePayload body: (required) :param int service_id: (required) :return: ServiceRecord If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'service_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') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method services_service_id_put" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params or params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `services_service_id_put`") # noqa: E501 # verify the required parameter 'service_id' is set if ('service_id' not in params or params['service_id'] is None): raise ValueError("Missing the required parameter `service_id` when calling `services_service_id_put`") # noqa: E501 collection_formats = {} path_params = {} if 'service_id' in params: path_params['serviceId'] = params['service_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = 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 = ['BasicAuth', 'BearerToken'] # noqa: E501 return self.api_client.call_api( '/services/{serviceId}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ServiceRecord', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
37.391714
131
0.602266
2,262
19,855
5.022546
0.074713
0.055453
0.037409
0.031687
0.93284
0.914796
0.907315
0.893407
0.888214
0.87994
0
0.015636
0.304256
19,855
530
132
37.462264
0.80679
0.30209
0
0.768421
0
0
0.181953
0.044451
0
0
0
0
0
1
0.038596
false
0
0.014035
0
0.108772
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
d6c52cce8668de87d7506656273e4762c8a397c3
38
py
Python
budgetkey_list_manager/__init__.py
OpenBudget/budgetkey-list-manager
63f144e08117b2f044b6e92dece57d7227ea4d73
[ "MIT" ]
5
2017-07-08T06:16:33.000Z
2018-09-03T04:04:00.000Z
flowmanager/__init__.py
datopian/specstore
d605a9d4d796a9059ad91a3fc17f6565b279a852
[ "MIT" ]
35
2017-07-25T07:36:13.000Z
2018-11-02T06:04:42.000Z
flowmanager/__init__.py
datahq/specstore
d605a9d4d796a9059ad91a3fc17f6565b279a852
[ "MIT" ]
1
2017-07-03T16:10:54.000Z
2017-07-03T16:10:54.000Z
from .blueprint import make_blueprint
19
37
0.868421
5
38
6.4
0.8
0
0
0
0
0
0
0
0
0
0
0
0.105263
38
1
38
38
0.941176
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
1
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
0
1
0
1
1
0
7
d6c8ca81c2fd2b09e27a407f46b17168bba80423
30,652
py
Python
DQM/RPCMonitorClient/test/rpcTier0Source_cfg.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
DQM/RPCMonitorClient/test/rpcTier0Source_cfg.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
DQM/RPCMonitorClient/test/rpcTier0Source_cfg.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
import FWCore.ParameterSet.Config as cms process = cms.Process("rpcTier0SourceProcess") ################# Input ######################## readFiles = cms.untracked.vstring() secFiles = cms.untracked.vstring() process.source = cms.Source ("PoolSource",fileNames = readFiles, secondaryFileNames = secFiles) readFiles.extend( [ '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/FCA6CCE5-F2C2-DE11-A1BB-000423D9A212.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/FC59F5F3-C7C2-DE11-AB94-0030487A1990.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/FC394E44-DAC2-DE11-919E-001617C3B6C6.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/FC083776-E1C2-DE11-91E8-001617E30D12.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/F89E64F2-BEC2-DE11-B984-003048D375AA.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/F623F5C4-BAC2-DE11-BF8E-001D09F24FEC.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/F2415DA2-E7C2-DE11-BA54-000423D98B6C.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/F2313D20-FEC2-DE11-AFB3-000423D94990.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/F04E02BA-CFC2-DE11-B168-000423D98834.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/F0475EDA-EBC2-DE11-BCE5-000423D998BA.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/EEF6D8F3-E6C2-DE11-AA4C-000423D99E46.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/EEE2407C-F1C2-DE11-A4FC-000423D991F0.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/ECE73220-FEC2-DE11-A7F9-000423D6006E.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/EC69873D-D3C2-DE11-8CB0-0030487A1990.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/EC626D04-E2C2-DE11-9E55-001D09F2512C.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/EA4E255B-D5C2-DE11-B23B-000423D94524.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/E89F19A5-D4C2-DE11-97EA-0030487A1FEC.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/E885472E-D8C2-DE11-AFC4-000423D9989E.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/E61B1A33-D6C2-DE11-A3C9-003048D37580.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/E4DBF8B2-CDC2-DE11-8F0D-001D09F2906A.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/E46E74FB-DAC2-DE11-8756-003048D3750A.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/E2D59FEB-B9C2-DE11-BA6D-001D09F2B2CF.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/E2A34759-C2C2-DE11-9986-001D09F25041.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/E2959B5D-B4C2-DE11-B118-001D09F24353.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/E251AE30-CCC2-DE11-A0A1-000423D98EC8.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/E20DF622-D1C2-DE11-AA54-001D09F24DDF.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/E09CB035-F9C2-DE11-B364-000423D94A20.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/E094A157-D5C2-DE11-BD15-001617C3B6DE.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/E07875FD-F4C2-DE11-8470-000423D9880C.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/DEC1F652-E1C2-DE11-ADA2-001617DBCF6A.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/DEB4C428-EBC2-DE11-9EC5-000423D98800.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/DC1F764A-B4C2-DE11-92D3-001D09F290CE.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/DA0D8A39-C0C2-DE11-A936-000423D98DC4.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/D8E547A8-E0C2-DE11-908F-001D09F25208.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/D8D555DF-D8C2-DE11-A0A9-000423D94E70.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/D8BB30CA-F0C2-DE11-AC96-000423D98FBC.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/D8B5B3D1-E4C2-DE11-841B-000423D986A8.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/D8A5D8F8-DFC2-DE11-ACFD-001D09F2905B.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/D8771A8F-B3C2-DE11-A49A-001D09F2546F.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/D81130B1-F5C2-DE11-906F-000423D99CEE.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/D6F2D788-BFC2-DE11-B8BD-001D09F24E39.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/D68DC430-CCC2-DE11-8E8F-000423D99EEE.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/D6856365-F6C2-DE11-828D-000423D98950.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/D668014B-F4C2-DE11-B38E-000423D99F1E.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/D656795E-D5C2-DE11-9A0E-003048D375AA.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/D0ED3528-EBC2-DE11-AD7C-000423D99EEE.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/D0379158-E8C2-DE11-9B69-000423D98930.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/CEF0E5EA-F4C2-DE11-9C58-000423D991D4.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/CEE83EC4-CAC2-DE11-9323-000423D99CEE.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/CE914214-DDC2-DE11-936A-000423D6C8EE.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/CE3C47F2-C7C2-DE11-B92E-000423D99CEE.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/CE295014-DDC2-DE11-985A-000423D98B08.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/CCABF0BB-E2C2-DE11-BBAB-001617E30F48.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/CC7B593A-D6C2-DE11-8DD4-001D09F29849.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/CC78FCBD-E9C2-DE11-A81F-000423D987E0.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/C86BDA0D-C3C2-DE11-BB6C-0019B9F705A3.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/C828068F-B3C2-DE11-B273-001D09F27003.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/C823F2B0-F5C2-DE11-84BE-000423D98634.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/C801FEEF-CCC2-DE11-A6C9-003048D373AE.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/C6533358-D5C2-DE11-8006-001617C3B6C6.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/C6276566-D0C2-DE11-B9ED-0019DB29C614.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/C411BB02-E2C2-DE11-9F86-001D09F23C73.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/C0E02F24-D6C2-DE11-9DD7-001617C3B6DE.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/C07BB0F8-CCC2-DE11-B0C4-003048D37456.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/C0798AA6-BAC2-DE11-BC3A-001D09F24F65.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/C03541EF-F4C2-DE11-8A15-000423D99896.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/BEA93C43-F2C2-DE11-B3DA-000423D9890C.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/BCFF2DE0-D8C2-DE11-903D-001617C3B6DE.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/BC703366-E1C2-DE11-B562-001D09F24DDF.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/BA708659-E8C2-DE11-9579-000423D99AAA.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/BA47BE0B-F0C2-DE11-B746-000423D8FA38.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/BA3CFE66-F6C2-DE11-A3FA-000423D98930.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/BA0C97CE-E4C2-DE11-B0CE-000423D98804.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/B8D080AB-D4C2-DE11-9E3C-001617E30D52.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/B885A819-B7C2-DE11-9E65-001D09F29146.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/B850E01F-D1C2-DE11-AAAF-001D09F25401.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/B84D0C7A-F8C2-DE11-BF05-000423D98950.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/B8331907-E2C2-DE11-B047-001D09F25456.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/B6433E84-D2C2-DE11-B381-000423D6C8E6.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/B4E3C0AA-DBC2-DE11-8D4F-000423D987FC.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/B42AEDEC-BCC2-DE11-88A5-001D09F290CE.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/B2A3A73B-D3C2-DE11-BA82-000423D6B444.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/B0807DB3-CDC2-DE11-8A65-001D09F27003.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/B07BEAC8-C8C2-DE11-AA5C-003048D375AA.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/AE7009F2-D3C2-DE11-913A-001D09F2512C.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/AE5A86CC-DDC2-DE11-B3C2-0030487A18F2.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/ACEC74BF-E9C2-DE11-B53C-000423D9880C.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/AC94BCCB-F7C2-DE11-9DF5-000423D94494.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/AC623E8C-BFC2-DE11-8321-001D09F2426D.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/AC4C4A2F-CCC2-DE11-96FC-000423D6B444.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/AC4AABE8-F9C2-DE11-95D9-000423D944FC.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/AC448DB9-CFC2-DE11-BB48-001D09F29849.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/A8D45EB3-CDC2-DE11-BE14-001D09F231C9.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/A8941FE5-F2C2-DE11-90D0-000423D94494.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/A6835D30-B9C2-DE11-8201-000423D94990.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/A4E98A4D-23C3-DE11-96C2-0030487D1BCC.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/A26A7443-F2C2-DE11-8D26-000423D60FF6.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/A0F43DC2-D6C2-DE11-9E44-000423D6CA6E.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/A00BFAA1-E7C2-DE11-9AA3-000423D94C68.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/9CC31EC3-DEC2-DE11-966F-0030487A18F2.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/9C950E1B-F7C2-DE11-9D7B-000423D9A2AE.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/9C6889F8-DFC2-DE11-BCF2-001D09F2A49C.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/9C296C1A-F7C2-DE11-BB09-000423D94A20.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/9C203BF0-D3C2-DE11-B1D3-001D09F276CF.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/9AC3DDA2-E7C2-DE11-9B62-000423D99996.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/9A793A07-E9C2-DE11-BD96-000423D98800.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/9A256437-C5C2-DE11-BAC7-003048D2C020.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/9A14D23F-D3C2-DE11-8CAE-001617E30D52.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/98F9D126-F5C2-DE11-A746-000423D98EC4.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/9875C8CF-F7C2-DE11-9BA6-000423D98C20.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/96D3CF47-F4C2-DE11-8B36-000423D98930.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/9696DB3E-C0C2-DE11-8E9D-000423D990CC.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/94ED99CA-B7C2-DE11-877D-001D09F24399.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/94A836C6-F0C2-DE11-9A33-000423D94A20.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/946B9273-0BC3-DE11-9C46-000423D985B0.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/945D024C-C7C2-DE11-A1CF-003048D3756A.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/943641B2-EEC2-DE11-B8ED-000423D9517C.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/94164665-EDC2-DE11-9B64-000423D98DC4.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/92DEDE3A-E6C2-DE11-8214-000423D6CA02.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/92776C04-E2C2-DE11-83B1-001D09F24EE3.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/90B2A168-C9C2-DE11-B141-000423D6CA72.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/904726A9-BAC2-DE11-86B4-001D09F24353.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/902A50B9-CFC2-DE11-A11C-001D09F297EF.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/901FF406-BCC2-DE11-A52E-003048D37514.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/8EF69DC4-CAC2-DE11-AC1B-000423D94908.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/8EE1FEE9-F4C2-DE11-8876-000423D98BC4.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/8E74E872-EFC2-DE11-8B3F-000423D9A2AE.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/8CAF2223-D1C2-DE11-B530-0030487A1990.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/8C90136B-D0C2-DE11-B395-000423D6CA72.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/8C856F06-E9C2-DE11-8A31-000423D8FA38.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/8A9FB004-E7C2-DE11-94B1-000423D9A212.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/8A251C62-B6C2-DE11-B06A-000423D98B08.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/883364F8-DFC2-DE11-BDF3-001D09F29538.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/86D305E9-B9C2-DE11-93A6-001D09F24F1F.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/86916825-E4C2-DE11-B4A4-0030487C6062.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/84E46631-CAC2-DE11-9342-003048D375AA.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/849C73B0-DBC2-DE11-8CE7-000423D99AAE.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/845F98D1-BEC2-DE11-9295-003048D37560.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/82FEB962-C9C2-DE11-88C2-000423D6B42C.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/82DADEFA-DAC2-DE11-9157-000423D944F0.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/82928183-EDC2-DE11-8BF6-000423D944DC.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/822FF46D-FDC2-DE11-86BC-000423D99614.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/80EEFE81-E5C2-DE11-AF04-000423D99AA2.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/80BF1924-E4C2-DE11-AD9C-000423D94908.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/7E6393F2-CCC2-DE11-ABE9-001617C3B5F4.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/7CEF98A0-F3C2-DE11-8E35-000423D99394.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/7C03A392-D9C2-DE11-8CF7-000423D6C8EE.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/7AA499EF-B9C2-DE11-A34A-001D09F2932B.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/7A4EDF77-C4C2-DE11-93A5-001D09F242EA.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/7A039E67-E3C2-DE11-9309-000423D98B28.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/76C6D86F-D7C2-DE11-9463-001617C3B6C6.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/7696647C-F1C2-DE11-A6AB-000423D99AAA.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/742485C2-D6C2-DE11-8503-000423D9870C.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/72C52153-CEC2-DE11-8676-00304867342C.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/728BF467-D0C2-DE11-87E8-001D09F24600.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/72626AB7-CFC2-DE11-8D9D-001D09F276CF.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/721B9B59-D5C2-DE11-B0BA-003048D3750A.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/70E648CB-DDC2-DE11-B321-000423D996C8.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/70512CA9-D4C2-DE11-8E85-003048D2BED6.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/70316F33-B9C2-DE11-A74E-001617C3B654.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/6EEEC267-D0C2-DE11-A368-0019B9F7312C.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/6EA5735D-DCC2-DE11-9A87-000423D94524.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/6E830331-B9C2-DE11-B897-000423D98800.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/6C9060D5-C5C2-DE11-A3E7-003048D37560.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/6C0E783C-D3C2-DE11-8DCF-0030487A1FEC.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/6AD95306-0AC3-DE11-82AA-000423D6CA02.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/686796CC-F7C2-DE11-8E81-000423D987E0.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/66E7AD45-DAC2-DE11-A1B0-000423D987FC.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/66518F61-DCC2-DE11-9F31-000423D98750.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/662E8588-BFC2-DE11-A302-001D09F25401.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/64B314F5-CCC2-DE11-8E7B-003048D374F2.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/64B30D8D-D2C2-DE11-987C-000423D952C0.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/648A4272-E1C2-DE11-8BA7-001D09F2AF96.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/647F1E10-F0C2-DE11-A933-000423D99394.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/64313667-E3C2-DE11-8F3F-000423D9997E.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/62AE5BCA-B7C2-DE11-83A1-001D09F2441B.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/6297F16E-FDC2-DE11-976E-001D09F292D1.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/60F0DC22-E4C2-DE11-BEF8-000423D99AA2.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/5EE555F6-CCC2-DE11-9BFB-003048D37560.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/5E8FE45B-EDC2-DE11-84E3-000423D94C68.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/5CCD7DB9-E2C2-DE11-8E98-000423D99AAA.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/587DBABC-E2C2-DE11-99AC-001617E30D12.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/58360FE5-F2C2-DE11-A6AB-000423D99996.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/56FD2CB0-DBC2-DE11-B0A4-000423D99E46.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/56C45C23-D1C2-DE11-B3F3-001D09F231C9.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/56A578F3-CCC2-DE11-84B9-0030487A1990.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/56589B72-D7C2-DE11-8677-000423D94E70.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/521F52CA-DDC2-DE11-B06D-001617C3B6DE.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/50F3EF75-EFC2-DE11-AD80-000423D98634.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/50B20D65-C9C2-DE11-8C87-001D09F25401.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/50A618F3-B4C2-DE11-B2A5-000423D98EC4.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/5004FBD8-C5C2-DE11-8848-001D09F2841C.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/4EC2DF19-B7C2-DE11-9C5F-001D09F253C0.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/4ACA0E5B-EDC2-DE11-BED2-000423D99E46.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/4A82C7A3-D4C2-DE11-B41A-003048678098.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/4A663065-D0C2-DE11-A9C7-001617C3B6DE.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/4A163D75-EFC2-DE11-B17C-000423D9853C.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/48C049F0-D3C2-DE11-A00E-001D09F2437B.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/46F394B9-CFC2-DE11-97C9-0030487A1990.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/468EFE98-FAC2-DE11-9409-000423D6B444.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/46376C4F-CEC2-DE11-96E7-0030486780B8.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/44920320-D1C2-DE11-BD2C-001617C3B6DE.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/42F888E2-BBC2-DE11-AC28-001D09F29597.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/42A24261-EDC2-DE11-9613-000423D944F0.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/4256F520-D1C2-DE11-A4C0-000423D98EC8.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/40D68156-F5C2-DE11-ACD3-000423D98804.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/403A496E-FDC2-DE11-B458-000423D99F1E.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/3E8100B1-F5C2-DE11-A768-000423D992A4.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/3E010A43-E4C2-DE11-A80D-001617E30F48.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/3CEB4546-F4C2-DE11-BCBB-000423D98634.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/3CEA32B6-CFC2-DE11-A83A-001D09F231C9.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/3CC5E22F-DFC2-DE11-A625-000423D944DC.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/38D934D8-F7C2-DE11-AC3F-000423D98750.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/38737793-ECC2-DE11-890A-000423D951D4.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/364DD314-DDC2-DE11-AAEF-000423D98B5C.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/34CAD00D-E9C2-DE11-8C2E-000423D98B6C.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/3495D6A5-C1C2-DE11-9706-001D09F2841C.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/34405CCE-D1C2-DE11-9644-000423D6AF24.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/3413DE95-ECC2-DE11-A6B0-000423D94534.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/327A3DCC-DDC2-DE11-A41F-0030487A1FEC.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/3250268C-D2C2-DE11-B22D-000423D985E4.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/30FB4E03-E9C2-DE11-9C1E-000423D9997E.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/306BA5FA-DAC2-DE11-9155-001617E30F50.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/2ED73B74-0BC3-DE11-988D-000423D98950.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/2E3F5ECE-D1C2-DE11-8277-000423D99CEE.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/2C2A6D56-E8C2-DE11-9D0A-000423D99AA2.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/24B570AE-CDC2-DE11-8A0D-003048D37580.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/24348D10-EEC2-DE11-A5B2-000423D99AA2.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/22F6B4DA-EBC2-DE11-BADA-000423D94C68.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/20FEE07D-CBC2-DE11-8027-000423D6BA18.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/2080842F-CCC2-DE11-A825-000423D99CEE.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/1EF252DF-D8C2-DE11-ADAF-001617E30D52.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/1E90A797-ECC2-DE11-8772-000423D94E1C.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/1AA5B634-DFC2-DE11-A590-000423D996C8.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/18EB81E7-F9C2-DE11-9B36-000423D9A2AE.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/18A4D704-E2C2-DE11-B77B-001D09F241B9.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/1875E2CF-D1C2-DE11-9CBE-000423D99BF2.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/162C932F-DFC2-DE11-8D56-000423D94534.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/160F5695-ECC2-DE11-9295-000423D98800.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/16069AB1-DBC2-DE11-AF43-000423D98B08.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/14AB2D4C-CEC2-DE11-BFB4-003048D2C0F0.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/148BF98C-D2C2-DE11-B57A-000423D98EC8.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/145997CA-DDC2-DE11-81D3-000423D944F0.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/128398AC-F5C2-DE11-A296-000423D6CA42.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/124F66F5-CCC2-DE11-867E-003048D2BED6.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/109748FB-DAC2-DE11-88F5-000423D94524.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/106E6C43-EDC2-DE11-8205-000423D94908.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/0CDFAF05-BCC2-DE11-A818-000423D99394.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/0CDC89FB-DAC2-DE11-B825-000423D998BA.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/0C5324B9-CFC2-DE11-B83C-001D09F29538.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/0ABCA514-F5C2-DE11-BE62-000423D944DC.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/0AA0CF63-E3C2-DE11-A539-000423D98930.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/087186DA-EBC2-DE11-A7F9-000423D9A212.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/080E8524-C5C2-DE11-9194-000423D986A8.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/06BF2310-F0C2-DE11-87C5-000423D987E0.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/04C5C4A3-C1C2-DE11-A82F-0019B9F709A4.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/04AC6AB8-CFC2-DE11-A451-000423D6B444.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/0423630A-C3C2-DE11-B403-001D09F2AD7F.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/00B844A7-E0C2-DE11-8A95-0019B9F72CE5.root', '/store/data/Commissioning09/Cosmics/RECO/v9/000/118/367/005A0AA9-E0C2-DE11-BE1B-001D09F2512C.root'] ); secFiles.extend( [ ] ) process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(50000)) ################# Geometry ###################### process.load("Geometry.MuonCommonData.muonIdealGeometryXML_cfi") process.load("Geometry.RPCGeometry.rpcGeometry_cfi") process.load("Geometry.MuonNumbering.muonNumberingInitialization_cfi") process.load("CondCore.DBCommon.CondDBSetup_cfi") ################# RPC Unpacker ###################### process.rpcunpacker = cms.EDProducer("RPCUnpackingModule", InputLabel = cms.untracked.InputTag("source"), doSynchro = cms.bool(False) ) process.load("EventFilter.RPCRawToDigi.RPCSQLiteCabling_cfi") ################# RPC Rec Hits ###################### process.load("RecoLocalMuon.RPCRecHit.rpcRecHits_cfi") process.rpcRecHits.rpcDigiLabel = 'rpcunpacker' ################# DQM Cetral Modules ################### process.load("DQMServices.Core.DQM_cfg") process.load("DQMServices.Components.DQMEnvironment_cfi") process.dqmEnv.subSystemFolder = 'RPC' process.dqmSaver.convention = 'Online' ############# Message Logger #################### process.MessageLogger = cms.Service("MessageLogger", cerr = cms.untracked.PSet( enable = cms.untracked.bool(False) ), cout = cms.untracked.PSet( enable = cms.untracked.bool(True), threshold = cms.untracked.string('INFO') ), debugModules = cms.untracked.vstring('*') ) ############## Output module ##################*_MEtoEDMConverter_*_* process.out = cms.OutputModule("PoolOutputModule", fileName = cms.untracked.string('out.root'), outputCommands = cms.untracked.vstring("keep *_MEtoEDMConverter_*_*") ) process.load("DQMServices.Components.EDMtoMEConverter_cfi") process.load("DQMServices.Components.MEtoEDMConverter_cfi") process.load("DQM.RPCMonitorClient.RPCTier0Client_cff") process.load("DQM.RPCMonitorClient.RPCTier0Source_cff") ################# Path ########################### process.p = cms.Path(process.rpcTier0Source*process.MEtoEDMConverter*process.EDMtoMEConverter*process.rpcTier0Client*process.dqmSaver) #process.outpath = cms.EndPath(process.out) #*process.EDMtoMEConverter*process.rpcTier0Client*process.dqmSaver)
89.364431
134
0.751925
4,130
30,652
5.576271
0.204358
0.101607
0.270951
0.349978
0.664438
0.664438
0.659314
0.656014
0.656014
0.654017
0
0.300406
0.076569
30,652
342
135
89.625731
0.513231
0.007634
0
0.006601
0
0.858086
0.858419
0.855065
0
1
0
0
0
1
0
false
0
0.0033
0
0.0033
0
0
0
0
null
0
1
1
0
0
0
0
0
1
0
1
0
0
0
0
0
0
0
0
0
0
1
1
1
null
1
0
0
0
0
0
0
0
0
0
0
0
0
8
d6ccfdf5739933432bc120e85172c968deff2d98
233
py
Python
ml-agents-envs/mlagents_envs/side_channel/__init__.py
bobcy2015/ml-agents
5d02292ad889f1884fa98bd92f127f17cbfe0112
[ "Apache-2.0" ]
5
2019-02-01T04:53:19.000Z
2021-02-17T21:27:56.000Z
ml-agents-envs/mlagents_envs/side_channel/__init__.py
bobcy2015/ml-agents
5d02292ad889f1884fa98bd92f127f17cbfe0112
[ "Apache-2.0" ]
5
2020-09-26T01:23:05.000Z
2022-02-10T01:58:20.000Z
ml-agents-envs/mlagents_envs/side_channel/__init__.py
bobcy2015/ml-agents
5d02292ad889f1884fa98bd92f127f17cbfe0112
[ "Apache-2.0" ]
5
2020-04-15T10:46:39.000Z
2020-05-06T20:52:03.000Z
from mlagents_envs.side_channel.incoming_message import IncomingMessage # noqa from mlagents_envs.side_channel.outgoing_message import OutgoingMessage # noqa from mlagents_envs.side_channel.side_channel import SideChannel # noqa
46.6
79
0.866953
30
233
6.433333
0.433333
0.227979
0.248705
0.310881
0.46114
0.321244
0
0
0
0
0
0
0.094421
233
4
80
58.25
0.914692
0.060086
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
ba38851d8d5656515286c8c8b9256173c4019b85
15,154
py
Python
scale/storage/test/messages/test_delete_files.py
kaydoh/scale
1b6a3b879ffe83e10d3b9d9074835a4c3bf476ee
[ "Apache-2.0" ]
121
2015-11-18T18:15:33.000Z
2022-03-10T01:55:00.000Z
scale/storage/test/messages/test_delete_files.py
kaydoh/scale
1b6a3b879ffe83e10d3b9d9074835a4c3bf476ee
[ "Apache-2.0" ]
1,415
2015-12-23T23:36:04.000Z
2022-01-07T14:10:09.000Z
scale/storage/test/messages/test_delete_files.py
kaydoh/scale
1b6a3b879ffe83e10d3b9d9074835a4c3bf476ee
[ "Apache-2.0" ]
66
2015-12-03T20:38:56.000Z
2020-07-27T15:28:11.000Z
from __future__ import unicode_literals import os import django from django.test import TestCase from job.test import utils as job_test_utils from product.models import FileAncestryLink from product.test import utils as product_test_utils from storage.messages.delete_files import create_delete_files_messages, DeleteFiles from storage.models import PurgeResults, ScaleFile from storage.test import utils as storage_test_utils import trigger.test.utils as trigger_test_utils class TestDeleteFiles(TestCase): def setUp(self): django.setup() self.source_file = storage_test_utils.create_file(file_type='SOURCE') trigger = trigger_test_utils.create_trigger_event() PurgeResults.objects.create(source_file_id=self.source_file.id, trigger_event=trigger) def test_json(self): """Tests coverting a DeleteFiles message to and from JSON""" job = job_test_utils.create_job() job_exe = job_test_utils.create_job_exe(job=job) trigger = trigger_test_utils.create_trigger_event() PurgeResults.objects.create(source_file_id=self.source_file.id, trigger_event=trigger) file_path_1 = os.path.join('my_dir', 'my_file.txt') file_path_2 = os.path.join('my_dir', 'my_file.json') file_1 = storage_test_utils.create_file(file_path=file_path_1, job_exe=job_exe) file_2 = storage_test_utils.create_file(file_path=file_path_2, job_exe=job_exe) # Add files to message message = DeleteFiles() message.purge = True message.job_id = job.id message.trigger_id = trigger.id message.source_file_id = self.source_file.id if message.can_fit_more(): message.add_file(file_1.id) if message.can_fit_more(): message.add_file(file_2.id) # Convert message to JSON and back, and then execute message_json_dict = message.to_json() new_message = DeleteFiles.from_json(message_json_dict) result = new_message.execute() self.assertTrue(result) # Both files should have been deleted self.assertEqual(ScaleFile.objects.filter(id=file_1.id).count(), 0) self.assertEqual(ScaleFile.objects.filter(id=file_2.id).count(), 0) # One new job for create_purge_jobs_messages self.assertEqual(len(new_message.new_messages), 1) def test_execute(self): """Tests calling DeleteFile.execute() successfully""" job = job_test_utils.create_job() job_exe = job_test_utils.create_job_exe(job=job) trigger = trigger_test_utils.create_trigger_event() PurgeResults.objects.create(source_file_id=self.source_file.id, trigger_event=trigger) file_path_1 = os.path.join('my_dir', 'my_file.txt') file_path_2 = os.path.join('my_dir', 'my_file1.json') file_path_3 = os.path.join('my_dir', 'my_file2.json') file_path_4 = os.path.join('my_dir', 'my_file3.json') file_1 = storage_test_utils.create_file(file_path=file_path_1, job_exe=job_exe) file_2 = storage_test_utils.create_file(file_path=file_path_2, job_exe=job_exe) file_3 = storage_test_utils.create_file(file_path=file_path_3, job_exe=job_exe) file_4 = storage_test_utils.create_file(file_path=file_path_4, job_exe=job_exe) # Add files to message message = DeleteFiles() message.purge = False message.job_id = job.id message.trigger_id = trigger.id message.source_file_id = self.source_file.id if message.can_fit_more(): message.add_file(file_1.id) if message.can_fit_more(): message.add_file(file_2.id) if message.can_fit_more(): message.add_file(file_3.id) if message.can_fit_more(): message.add_file(file_4.id) # Execute message result = message.execute() self.assertTrue(result) # All files should have marked as deleted self.assertTrue(ScaleFile.objects.filter(id=file_1.id).values('is_deleted')) self.assertTrue(ScaleFile.objects.filter(id=file_2.id).values('is_deleted')) self.assertTrue(ScaleFile.objects.filter(id=file_3.id).values('is_deleted')) self.assertTrue(ScaleFile.objects.filter(id=file_4.id).values('is_deleted')) file_5 = storage_test_utils.create_file(file_path=file_path_1) file_6 = storage_test_utils.create_file(file_path=file_path_2) file_7 = storage_test_utils.create_file(file_path=file_path_3) file_8 = storage_test_utils.create_file(file_path=file_path_4) # Add files to message message = DeleteFiles() message.purge = True message.job_id = job.id message.trigger_id = trigger.id message.source_file_id = self.source_file.id if message.can_fit_more(): message.add_file(file_5.id) if message.can_fit_more(): message.add_file(file_6.id) if message.can_fit_more(): message.add_file(file_7.id) if message.can_fit_more(): message.add_file(file_8.id) # Execute message result = message.execute() self.assertTrue(result) # All files should have been purged self.assertEqual(ScaleFile.objects.filter(id=file_5.id).count(), 0) self.assertEqual(ScaleFile.objects.filter(id=file_6.id).count(), 0) self.assertEqual(ScaleFile.objects.filter(id=file_7.id).count(), 0) self.assertEqual(ScaleFile.objects.filter(id=file_8.id).count(), 0) def test_create_message(self): """ Tests calling the create message function for DeleteFiles """ job = job_test_utils.create_job() job_exe = job_test_utils.create_job_exe(job=job) trigger = trigger_test_utils.create_trigger_event() file_path_1 = os.path.join('my_dir', 'my_file.txt') file_path_2 = os.path.join('my_dir', 'my_file1.json') file_path_3 = os.path.join('my_dir', 'my_file2.json') file_path_4 = os.path.join('my_dir', 'my_file3.json') file_1 = storage_test_utils.create_file(file_path=file_path_1, job_exe=job_exe) file_2 = storage_test_utils.create_file(file_path=file_path_2, job_exe=job_exe) file_3 = storage_test_utils.create_file(file_path=file_path_3, job_exe=job_exe) file_4 = storage_test_utils.create_file(file_path=file_path_4, job_exe=job_exe) files = [file_1, file_2, file_3, file_4] # No exception is success create_delete_files_messages(files=files, job_id=job.id, trigger_id=trigger.id, source_file_id=self.source_file.id, purge=True) def test_execute_check_results(self): """Tests calling DeleteFile.execute() successfully""" # Create PurgeResults entry source_file = storage_test_utils.create_file() trigger = trigger_test_utils.create_trigger_event() PurgeResults.objects.create(source_file_id=source_file.id, trigger_event=trigger) self.assertEqual(PurgeResults.objects.values_list('num_products_deleted', flat=True).get( source_file_id=source_file.id), 0) job = job_test_utils.create_job() job_exe = job_test_utils.create_job_exe(job=job) file_path_1 = os.path.join('my_dir', 'my_file.txt') file_path_2 = os.path.join('my_dir', 'my_file1.json') file_path_3 = os.path.join('my_dir', 'my_file2.json') file_path_4 = os.path.join('my_dir', 'my_file3.json') file_1 = storage_test_utils.create_file(file_path=file_path_1, job_exe=job_exe) file_2 = storage_test_utils.create_file(file_path=file_path_2, job_exe=job_exe) file_3 = storage_test_utils.create_file(file_path=file_path_3, job_exe=job_exe) file_4 = storage_test_utils.create_file(file_path=file_path_4, job_exe=job_exe) # Add files to message message = DeleteFiles() message.purge = True message.job_id = job.id message.source_file_id = source_file.id message.trigger_id = trigger.id if message.can_fit_more(): message.add_file(file_1.id) if message.can_fit_more(): message.add_file(file_2.id) if message.can_fit_more(): message.add_file(file_3.id) if message.can_fit_more(): message.add_file(file_4.id) # Execute message result = message.execute() self.assertTrue(result) # Check results are accurate self.assertEqual(PurgeResults.objects.values_list('num_products_deleted', flat=True).get( source_file_id=source_file.id), 4) def test_execute_force_stop(self): """Tests calling DeleteFile.execute() successfully""" # Create PurgeResults entry source_file = storage_test_utils.create_file() trigger = trigger_test_utils.create_trigger_event() PurgeResults.objects.create(source_file_id=source_file.id, trigger_event=trigger, force_stop_purge=True) self.assertEqual(PurgeResults.objects.values_list('num_products_deleted', flat=True).get( source_file_id=source_file.id), 0) job = job_test_utils.create_job() job_exe = job_test_utils.create_job_exe(job=job) file_path_1 = os.path.join('my_dir', 'my_file.txt') file_path_2 = os.path.join('my_dir', 'my_file1.json') file_path_3 = os.path.join('my_dir', 'my_file2.json') file_path_4 = os.path.join('my_dir', 'my_file3.json') file_1 = storage_test_utils.create_file(file_path=file_path_1, job_exe=job_exe) file_2 = storage_test_utils.create_file(file_path=file_path_2, job_exe=job_exe) file_3 = storage_test_utils.create_file(file_path=file_path_3, job_exe=job_exe) file_4 = storage_test_utils.create_file(file_path=file_path_4, job_exe=job_exe) # Add files to message message = DeleteFiles() message.purge = True message.job_id = job.id message.source_file_id = source_file.id message.trigger_id = trigger.id if message.can_fit_more(): message.add_file(file_1.id) if message.can_fit_more(): message.add_file(file_2.id) if message.can_fit_more(): message.add_file(file_3.id) if message.can_fit_more(): message.add_file(file_4.id) # Execute message result = message.execute() self.assertTrue(result) # Check results are accurate self.assertEqual(PurgeResults.objects.values_list('num_products_deleted', flat=True).get( source_file_id=source_file.id), 0) def test_execute_check_results_no_purge(self): """Tests calling DeleteFile.execute() successfully""" # Create PurgeResults entry source_file = storage_test_utils.create_file() trigger = trigger_test_utils.create_trigger_event() PurgeResults.objects.create(source_file_id=source_file.id, trigger_event=trigger) self.assertEqual(PurgeResults.objects.values_list('num_products_deleted', flat=True).get( source_file_id=source_file.id), 0) job = job_test_utils.create_job() job_exe = job_test_utils.create_job_exe(job=job) file_path_1 = os.path.join('my_dir', 'my_file.txt') file_path_2 = os.path.join('my_dir', 'my_file1.json') file_path_3 = os.path.join('my_dir', 'my_file2.json') file_path_4 = os.path.join('my_dir', 'my_file3.json') file_1 = storage_test_utils.create_file(file_path=file_path_1, job_exe=job_exe) file_2 = storage_test_utils.create_file(file_path=file_path_2, job_exe=job_exe) file_3 = storage_test_utils.create_file(file_path=file_path_3, job_exe=job_exe) file_4 = storage_test_utils.create_file(file_path=file_path_4, job_exe=job_exe) # Add files to message message = DeleteFiles() message.purge = False message.job_id = job.id message.source_file_id = source_file.id message.trigger_id = trigger.id if message.can_fit_more(): message.add_file(file_1.id) if message.can_fit_more(): message.add_file(file_2.id) if message.can_fit_more(): message.add_file(file_3.id) if message.can_fit_more(): message.add_file(file_4.id) # Execute message result = message.execute() self.assertTrue(result) # Check results are accurate. Should be 0 since purge flag was False self.assertEqual(PurgeResults.objects.values_list('num_products_deleted', flat=True).get( source_file_id=self.source_file.id), 0) def test_execute_ancestor(self): """Tests calling DeleteFile.execute() successfully""" # Create PurgeResults entry source_file = storage_test_utils.create_file() trigger = trigger_test_utils.create_trigger_event() PurgeResults.objects.create(source_file_id=source_file.id, trigger_event=trigger) self.assertEqual(PurgeResults.objects.values_list('num_products_deleted', flat=True).get( source_file_id=source_file.id), 0) job = job_test_utils.create_job() job_exe = job_test_utils.create_job_exe(job=job) file_path_1 = os.path.join('my_dir', 'my_file.txt') file_path_2 = os.path.join('my_dir', 'my_file1.json') file_path_3 = os.path.join('my_dir', 'my_file2.json') file_path_4 = os.path.join('my_dir', 'my_file3.json') file_1 = storage_test_utils.create_file(file_path=file_path_1, job_exe=job_exe) file_2 = storage_test_utils.create_file(file_path=file_path_2, job_exe=job_exe) file_3 = storage_test_utils.create_file(file_path=file_path_3, job_exe=job_exe) file_4 = storage_test_utils.create_file(file_path=file_path_4, job_exe=job_exe) product_test_utils.create_file_link(ancestor=source_file, descendant=file_1, job=job, job_exe=job_exe) product_test_utils.create_file_link(ancestor=source_file, descendant=file_2, job=job, job_exe=job_exe) product_test_utils.create_file_link(ancestor=source_file, descendant=file_3, job=job, job_exe=job_exe) product_test_utils.create_file_link(ancestor=source_file, descendant=file_4, job=job, job_exe=job_exe) # Add files to message message = DeleteFiles() message.purge = True message.job_id = job.id message.source_file_id = source_file.id message.trigger_id = trigger.id if message.can_fit_more(): message.add_file(file_1.id) if message.can_fit_more(): message.add_file(file_2.id) if message.can_fit_more(): message.add_file(file_3.id) if message.can_fit_more(): message.add_file(file_4.id) # Execute message result = message.execute() self.assertTrue(result) # Check results are accurate. self.assertEqual(PurgeResults.objects.values_list('num_products_deleted', flat=True).get( trigger_event=trigger), 4)
42.929178
112
0.686815
2,199
15,154
4.371533
0.05457
0.07157
0.095184
0.077083
0.880682
0.873193
0.867471
0.846146
0.841049
0.841049
0
0.013771
0.214135
15,154
352
113
43.051136
0.793434
0.07107
0
0.774194
0
0
0.048939
0
0
0
0
0
0.104839
1
0.032258
false
0
0.044355
0
0.080645
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
baead20ddf26fca9fce761fbf2634b83c6ec0903
125
py
Python
pterradactyl/util/package.py
GiampaoloFalqui/pterradactyl
3d34f8088784c53e3d0871d8ca81f2381f2c2be9
[ "Apache-2.0" ]
2
2022-03-31T09:02:49.000Z
2022-03-31T18:56:52.000Z
pterradactyl/util/package.py
GiampaoloFalqui/pterradactyl
3d34f8088784c53e3d0871d8ca81f2381f2c2be9
[ "Apache-2.0" ]
4
2021-12-20T18:31:47.000Z
2022-03-14T16:31:49.000Z
pterradactyl/util/package.py
GiampaoloFalqui/pterradactyl
3d34f8088784c53e3d0871d8ca81f2381f2c2be9
[ "Apache-2.0" ]
null
null
null
import pkg_resources def entry_points(group): return {c.name: c for c in pkg_resources.iter_entry_points(group=group)}
20.833333
76
0.776
21
125
4.380952
0.619048
0.26087
0.347826
0
0
0
0
0
0
0
0
0
0.136
125
5
77
25
0.851852
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.333333
0.333333
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
1
0
0
1
1
1
0
0
8