text
string
size
int64
token_count
int64
import bs4 import requests from urllib.request import urlopen from itertools import chain from html.parser import HTMLParser from requests import get import os import time from pathlib import Path import pandas as pd from keras.preprocessing.text import text_to_word_sequence # WIKI TEXT BODY SCRAPING FUNCTION def wiki_text(url): response = requests.get(url) para_text = [] if response is not None: html = bs4.BeautifulSoup(response.text, 'html.parser') title = html.select("#firstHeading")[0].text paragraphs = html.select("p") for para in paragraphs: para_text.append(para.text.strip()) return ' '.join([x for x in para_text]) # FUNCTIONS/CLASS TO SCRAPE LINKS FROM A WEBSITE class LinkParser(HTMLParser): def reset(self): HTMLParser.reset(self) self.links = iter([]) def handle_starttag(self, tag, attrs): if tag == 'a': for name, value in attrs: if name == 'href': self.links = chain(self.links, [value]) def gen_links(f, parser): encoding = f.headers.get_content_charset() or 'UTF-8' for line in f: parser.feed(line.decode(encoding)) yield from parser.links # WIKIPEDIA SPECIFIC LINK-SCRAPING FUNCTION def wiki_gen_links(f, parser): links_list = [] wiki_list = [] links = gen_links(f, parser) for i in links: links_list.append(i) for i in links_list: if i[0:6] == "/wiki/": if ":" not in i: if "#" not in i: wiki_list.append(i[6:]) set_links_list = [x for x in set(list(wiki_list))] return set_links_list # BASE URLs FROM WHICH TO SCRAPE ADDITIONAL ARTICLES base_urls = ['https://en.wikipedia.org/wiki/Graphic_design', 'https://en.wikipedia.org/wiki/Marketing', 'https://en.wikipedia.org/wiki/Communication', 'https://en.wikipedia.org/wiki/Sales', 'https://en.wikipedia.org/wiki/Finance', 'https://en.wikipedia.org/wiki/Accounting', 'https://en.wikipedia.org/wiki/Law', 'https://en.wikipedia.org/wiki/Business', 'https://en.wikipedia.org/wiki/Business_administration', 'https://en.wikipedia.org/wiki/Value-added_reseller', 'https://en.wikipedia.org/wiki/Customer_service', 'https://en.wikipedia.org/wiki/User_experience', 'https://en.wikipedia.org/wiki/Energy', 'https://en.wikipedia.org/wiki/Transport', 'https://en.wikipedia.org/wiki/Industry', 'https://en.wikipedia.org/wiki/Manufacturing', 'https://en.wikipedia.org/wiki/Electronics', 'https://en.wikipedia.org/wiki/Software', 'https://en.wikipedia.org/wiki/Engineering', 'https://en.wikipedia.org/wiki/Technology', 'https://en.wikipedia.org/wiki/Mathematics', 'https://en.wikipedia.org/wiki/System', 'https://en.wikipedia.org/wiki/Knowledge', 'https://en.wikipedia.org/wiki/Logic', 'https://en.wikipedia.org/wiki/Engineer', 'https://en.wikipedia.org/wiki/Microcontroller', 'https://en.wikipedia.org/wiki/Industrial_control_system', 'https://en.wikipedia.org/wiki/PID_controller', 'https://en.wikipedia.org/wiki/Control_loop', 'https://en.wikipedia.org/wiki/Programmable_logic_controller', 'https://en.wikipedia.org/wiki/Assembly_line', 'https://en.wikipedia.org/wiki/Robotics', 'https://en.wikipedia.org/wiki/Petroleum_engineering', 'https://en.wikipedia.org/wiki/Industrial_engineering', 'https://en.wikipedia.org/wiki/Open-source_software', 'https://en.wikipedia.org/wiki/Electrical_engineering', 'https://en.wikipedia.org/wiki/Computer_engineering', 'https://en.wikipedia.org/wiki/Computer_science', 'https://en.wikipedia.org/wiki/Mechanical_engineering', 'https://en.wikipedia.org/wiki/Microsoft_Windows', 'https://en.wikipedia.org/wiki/Operating_system', 'https://en.wikipedia.org/wiki/Computer_program', 'https://en.wikipedia.org/wiki/Human%E2%80%93computer_interaction', 'https://en.wikipedia.org/wiki/History', 'https://en.wikipedia.org/wiki/Art', 'https://en.wikipedia.org/wiki/Music', 'https://en.wikipedia.org/wiki/Food', 'https://en.wikipedia.org/wiki/Education', 'https://en.wikipedia.org/wiki/Health', 'https://en.wikipedia.org/wiki/Medicine', 'https://en.wikipedia.org/wiki/Politics', 'https://en.wikipedia.org/wiki/Management', 'https://en.wikipedia.org/wiki/Chemistry', 'https://en.wikipedia.org/wiki/Biology', 'https://en.wikipedia.org/wiki/Physics', 'https://en.wikipedia.org/wiki/Geology', 'https://en.wikipedia.org/wiki/Astronomy', 'https://en.wikipedia.org/wiki/Anthropology', 'https://en.wikipedia.org/wiki/Sociology', 'https://en.wikipedia.org/wiki/Psychology', 'https://en.wikipedia.org/wiki/Science', 'https://en.wikipedia.org/wiki/Formal_science', 'https://en.wikipedia.org/wiki/Natural_science', 'https://en.wikipedia.org/wiki/Social_science', 'https://en.wikipedia.org/wiki/Game_theory', 'https://en.wikipedia.org/wiki/Network_theory', 'https://en.wikipedia.org/wiki/Artificial_neural_network', 'https://en.wikipedia.org/wiki/Broadcast_network', 'https://en.wikipedia.org/wiki/Electrical_network', 'https://en.wikipedia.org/wiki/Social_networking_service', 'https://en.wikipedia.org/wiki/Telecommunications_network', 'https://en.wikipedia.org/wiki/Computer_network', 'https://en.wikipedia.org/wiki/Transport_network', 'https://en.wikipedia.org/wiki/Money', 'https://en.wikipedia.org/wiki/Bitcoin', 'https://en.wikipedia.org/wiki/Gold', 'https://en.wikipedia.org/wiki/Silver', 'https://en.wikipedia.org/wiki/Fiat_money', 'https://en.wikipedia.org/wiki/Bank', 'https://en.wikipedia.org/wiki/Economics', 'https://en.wikipedia.org/wiki/Production_(economics)', 'https://en.wikipedia.org/wiki/Service_(economics)', 'https://en.wikipedia.org/wiki/Utility', 'https://en.wikipedia.org/wiki/The_arts', 'https://en.wikipedia.org/wiki/Philosophy', 'https://en.wikipedia.org/wiki/Theatre', 'https://en.wikipedia.org/wiki/Film', 'https://en.wikipedia.org/wiki/Dance', 'https://en.wikipedia.org/wiki/Fine_art', 'https://en.wikipedia.org/wiki/Applied_arts', 'https://en.wikipedia.org/wiki/Linguistics', 'https://en.wikipedia.org/wiki/Slang', 'https://en.wikipedia.org/wiki/Sarcasm', 'https://en.wikipedia.org/wiki/Culture', 'https://en.wikipedia.org/wiki/Security', 'https://en.wikipedia.org/wiki/Media', 'https://en.wikipedia.org/wiki/List_of_countries_by_spoken_languages', 'https://en.wikipedia.org/wiki/Humanities', 'https://en.wikipedia.org/wiki/Sport', 'https://en.wikipedia.org/wiki/Relationship', 'https://en.wikipedia.org/wiki/Religion', 'https://en.wikipedia.org/wiki/Faith', 'https://en.wikipedia.org/wiki/Spirituality', 'https://en.wikipedia.org/wiki/Literature', 'https://en.wikipedia.org/wiki/Fiction', 'https://en.wikipedia.org/wiki/Nonfiction', 'https://en.wikipedia.org/wiki/Classics', 'https://en.wikipedia.org/wiki/Western_world', 'https://en.wikipedia.org/wiki/Eastern_world', 'https://en.wikipedia.org/wiki/Renaissance', 'https://en.wikipedia.org/wiki/History_by_period', 'https://en.wikipedia.org/wiki/List_of_time_periods', 'https://en.wikipedia.org/wiki/Category:History_of_science_and_technology_by_country'] # COLLECTION OF LINKS FROM WIKIPEDIA ARTICLES url_list = [] wiki_base = "https://en.wikipedia.org/wiki/" for i in base_urls: if i not in url_list: url_list.append(i) parser = LinkParser() f = urlopen(i) wlinks = wiki_gen_links(f, parser) for l in wlinks: if l not in url_list: url_list.append(wiki_base + l) # GATHER BODY TEXT FROM ALL ARTICLES IN url_list # Use time.sleep(1) or greater between downloads def wiki_all_text(url_list): print("Downloading {} documents...\n".format(len(url_list))) all_docs = [] for i in url_list: print("Fetching text from: {}".format(i)) all_docs.append(wiki_text(i)) time.sleep(0.5) print("Download complete.\n") return all_docs # RUN IT idx = url_list doc = wiki_all_text(url_list) # CREATE DATAFRAME AND CSV FILE FOR EXPORT wiki_df = pd.DataFrame({'index':[x for x in idx], 'doc':[' '.join(text_to_word_sequence(str(x))) for x in doc]}) wiki_df.to_csv('wiki_df.csv') wiki_df.head(30)
8,709
2,912
# Import external modules from google.appengine.ext import ndb import json import logging import os import webapp2 # Import app modules from configuration import const as conf import httpServer import linkKey import proposal import reason import requestForProposals import user import text from text import LogMessage class SubmitNewReason(webapp2.RequestHandler): def post(self): logging.debug(LogMessage('SubmitNewReason', 'request.body=', self.request.body)) # Collect inputs requestLogId = os.environ.get( conf.REQUEST_LOG_ID ) inputData = json.loads( self.request.body ) logging.debug(LogMessage('SubmitNewReason', 'inputData=', inputData)) linkKeyStr = inputData.get( 'linkKey', None ) proposalId = str( int( inputData.get( 'proposalId', None ) ) ) proOrCon = inputData.get( 'proOrCon', None ) reasonContent = text.formTextToStored( inputData.get('reasonContent', '') ) browserCrumb = inputData.get( 'crumb', '' ) loginCrumb = inputData.get( 'crumbForLogin', '' ) logging.debug(LogMessage('SubmitNewReason', 'linkKeyStr=', linkKeyStr, 'proposalId=', proposalId, 'proOrCon=', proOrCon, 'reasonContent=', reasonContent, 'browserCrumb=', browserCrumb, 'loginCrumb=', loginCrumb)) # User id from cookie, crumb... responseData = { 'success':False, 'requestLogId':requestLogId } cookieData = httpServer.validate( self.request, inputData, responseData, self.response ) if not cookieData.valid(): return userId = cookieData.id() # Check reason length. if not httpServer.isLengthOk( reasonContent, '', conf.minLengthReason ): return httpServer.outputJson( cookieData, responseData, self.response, errorMessage=conf.TOO_SHORT ) # Retrieve link-key record linkKeyRec = linkKey.LinkKey.get_by_id( linkKeyStr ) if linkKeyRec is None: return httpServer.outputJson( cookieData, responseData, self.response, errorMessage='linkKey not found' ) logging.debug(LogMessage('SubmitNewReason', 'linkKeyRec=', linkKeyRec)) if linkKeyRec.loginRequired and not cookieData.loginId: return httpServer.outputJson( cookieData, responseData, self.response, errorMessage=conf.NO_LOGIN ) # Retrieve proposal record proposalRec = proposal.Proposal.get_by_id( int(proposalId) ) if proposalRec is None: return httpServer.outputJson( cookieDataresponseData, self.response, errorMessage='proposal not found' ) logging.debug(LogMessage('SubmitNewReason', 'proposalRec=', proposalRec)) # Verify that reason belongs to linkKey's request/proposal, and check whether frozen requestId = None if linkKeyRec.destinationType == conf.PROPOSAL_CLASS_NAME: if proposalId != linkKeyRec.destinationId: return httpServer.outputJson( cookieData, responseData, self.response, errorMessage='proposalId != linkKeyRec.destinationId' ) if proposalRec.hideReasons: return httpServer.outputJson( cookieData, responseData, self.response, errorMessage='reasons hidden' ) if proposalRec.freezeUserInput: return httpServer.outputJson( cookieData, responseData, self.response, errorMessage=conf.FROZEN ) elif linkKeyRec.destinationType == conf.REQUEST_CLASS_NAME: requestId = proposalRec.requestId if requestId != linkKeyRec.destinationId: return httpServer.outputJson( cookieData, responseData, self.response, errorMessage='requestId != linkKeyRec.destinationId' ) # Retrieve request-for-proposals, and check whether frozen requestRec = requestForProposals.RequestForProposals.get_by_id( int(requestId) ) if not requestRec: return httpServer.outputJson( cookieData, responseData, self.response, errorMessage='requestRec is null' ) if requestRec.hideReasons: return httpServer.outputJson( cookieData, responseData, self.response, errorMessage='reasons hidden' ) if requestRec.freezeUserInput: return httpServer.outputJson( cookieData, responseData, self.response, errorMessage=conf.FROZEN ) else: return httpServer.outputJson( cookieData, responseData, self.response, errorMessage='linkKey destinationType=' + linkKeyRec.destinationType ) # Retrieve any existing identical reason, to prevent duplicates existingReasons = reason.Reason.query( reason.Reason.requestId==requestId , reason.Reason.proposalId==proposalId , reason.Reason.proOrCon==proOrCon , reason.Reason.content==reasonContent ).fetch( 1 ) if existingReasons: return httpServer.outputJson( cookieData, responseData, self.response, errorMessage=conf.DUPLICATE ) # Construct new reason record reasonRecord = reason.Reason( requestId=requestId, proposalId=proposalId, creator=userId, proOrCon=proOrCon, allowEdit=True ) reasonRecord.setContent( reasonContent ) # Store reason record reasonRecordKey = reasonRecord.put() logging.debug(LogMessage('SubmitNewReason', 'reasonRecordKey=', reasonRecordKey)) # Display reason reasonDisplay = httpServer.reasonToDisplay( reasonRecord, userId ) responseData.update( { 'success':True, 'reason':reasonDisplay } ) httpServer.outputJson( cookieData, responseData, self.response ) # Mark proposal as not editable. if proposalRec.allowEdit: proposal.setEditable( proposalId, False ) class SubmitEditReason(webapp2.RequestHandler): def post(self): logging.debug(LogMessage('SubmitEditReason', 'request.body=', self.request.body)) # Collect inputs requestLogId = os.environ.get( conf.REQUEST_LOG_ID ) inputData = json.loads( self.request.body ) logging.debug(LogMessage('SubmitEditReason', 'inputData=', inputData)) linkKeyStr = inputData.get( 'linkKey', None ) reasonId = str( int( inputData.get( 'reasonId', None ) ) ) reasonContent = text.formTextToStored( inputData.get('inputContent', '') ) browserCrumb = inputData.get( 'crumb', '' ) loginCrumb = inputData.get( 'crumbForLogin', '' ) logging.debug(LogMessage('SubmitEditReason', 'linkKeyStr=', linkKeyStr, 'reasonId=', reasonId, 'reasonContent=', reasonContent, 'browserCrumb=', browserCrumb, 'loginCrumb=', loginCrumb)) # User id from cookie, crumb... responseData = { 'success':False, 'requestLogId':requestLogId } cookieData = httpServer.validate( self.request, inputData, responseData, self.response ) if not cookieData.valid(): return userId = cookieData.id() # Check reason length. if not httpServer.isLengthOk( reasonContent, '', conf.minLengthReason ): return httpServer.outputJson( cookieData, responseData, self.response, errorMessage=conf.TOO_SHORT ) # Retrieve link-key record linkKeyRec = linkKey.LinkKey.get_by_id( linkKeyStr ) if linkKeyRec is None: return httpServer.outputJson( cookieData, responseData, self.response, errorMessage='linkKey not found' ) logging.debug(LogMessage('SubmitEditReason', 'linkKeyRec=', linkKeyRec)) if linkKeyRec.loginRequired and not cookieData.loginId: return httpServer.outputJson( cookieData, responseData, self.response, errorMessage=conf.NO_LOGIN ) # Retrieve reason record reasonRec = reason.Reason.get_by_id( int(reasonId) ) if reasonRec is None: return httpServer.outputJson( cookieData, responseData, self.response, errorMessage='reason not found' ) logging.debug(LogMessage('SubmitEditReason', 'reasonRec=', reasonRec)) # Verify that reason belongs to linkKey's request/proposal if linkKeyRec.destinationType == conf.PROPOSAL_CLASS_NAME: if reasonRec.proposalId != linkKeyRec.destinationId: return httpServer.outputJson( cookieData, responseData, self.response, errorMessage='reasonRec.proposalId != linkKeyRec.destinationId' ) # Retrieve proposal record, and check whether frozen proposalRec = proposal.Proposal.get_by_id( int(reasonRec.proposalId) ) if not proposalRec: return httpServer.outputJson( cookieDataresponseData, self.response, errorMessage='proposalRec is null' ) if proposalRec.freezeUserInput: return httpServer.outputJson( cookieData, responseData, self.response, errorMessage=conf.FROZEN ) elif linkKeyRec.destinationType == conf.REQUEST_CLASS_NAME: if reasonRec.requestId != linkKeyRec.destinationId: return httpServer.outputJson( cookieData, responseData, self.response, errorMessage='reasonRec.requestId != linkKeyRec.destinationId' ) # Retrieve request-for-proposals, and check whether frozen requestRec = requestForProposals.RequestForProposals.get_by_id( int(reasonRec.requestId) ) if not requestRec: return httpServer.outputJson( cookieData, responseData, self.response, errorMessage='requestRec is null' ) if requestRec.freezeUserInput: return httpServer.outputJson( cookieData, responseData, self.response, errorMessage=conf.FROZEN ) else: return httpServer.outputJson( cookieData, responseData, self.response, errorMessage='linkKey destinationType=' + linkKeyRec.destinationType ) # Verify that proposal is editable if userId != reasonRec.creator: return httpServer.outputJson( cookieData, responseData, self.response, errorMessage=conf.NOT_OWNER ) if not reasonRec.allowEdit: return httpServer.outputJson( cookieData, responseData, self.response, errorMessage=conf.HAS_RESPONSES ) # Retrieve any existing identical reason, to prevent duplicates existingReasons = reason.Reason.query( reason.Reason.requestId==reasonRec.requestId , reason.Reason.proposalId==reasonRec.proposalId , reason.Reason.proOrCon==reasonRec.proOrCon , reason.Reason.content==reasonContent ).fetch( 1 ) if existingReasons: return httpServer.outputJson( cookieData, responseData, self.response, errorMessage=conf.DUPLICATE ) # Update reason record reasonRec.setContent( reasonContent ) reasonRec.put() # Display reason. reasonDisplay = httpServer.reasonToDisplay( reasonRec, userId ) responseData.update( { 'success':True, 'reason':reasonDisplay } ) httpServer.outputJson( cookieData, responseData, self.response ) # Route HTTP request app = webapp2.WSGIApplication([ ('/newReason', SubmitNewReason) , ('/editReason', SubmitEditReason) ])
10,680
2,980
exec("x=0;N=int(input());print(2**(sum()+1));"*int(input()))
62
31
# !/usr/bin/env python # coding=UTF-8 """ @Author: WEN Hao @LastEditors: WEN Hao @Description: @Date: 2021-09-09 @LastEditTime: 2022-04-17 文章Natural Language Adversarial Attack and Defense in Word Level中提出的遗传算法 注意!中文因为切词,可能进行 crossover 的操作之后,词的数目发生变化, 目前暂时把搜索范围截断为两个句子词数目较小的句子的词数目。 """ from typing import NoReturn, List, Tuple import numpy as np from .genetic_algorithm_base import GeneticAlgorithmBase from .population_based_search import PopulationMember from ..attacked_text import AttackedText from ..goal_functions import GoalFunctionResult from ..misc import DEFAULTS __all__ = [ "ImprovedGeneticAlgorithm", ] class ImprovedGeneticAlgorithm(GeneticAlgorithmBase): """ """ __name__ = "ImprovedGeneticAlgorithm" def __init__( self, pop_size: int = 60, max_iters: int = 20, temp: float = 0.3, give_up_if_no_improvement: bool = False, post_crossover_check: bool = True, max_crossover_retries: int = 20, max_replace_times_per_index: int = 5, ) -> NoReturn: """ Args: pop_size: The population size. Defaults to 20. max_iters: The maximum number of iterations to use. Defaults to 50. temp: Temperature for softmax function used to normalize probability dist when sampling parents. Higher temperature increases the sensitivity to lower probability candidates. give_up_if_no_improvement: If True, stop the search early if no candidate that improves the score is found. post_crossover_check: If True, check if child produced from crossover step passes the constraints. max_crossover_retries: Maximum number of crossover retries if resulting child fails to pass the constraints. Applied only when `post_crossover_check` is set to `True`. Setting it to 0 means we immediately take one of the parents at random as the child upon failure. max_replace_times_per_index: Maximum times words at the same index can be replaced in this algorithm. """ super().__init__( pop_size=pop_size, max_iters=max_iters, temp=temp, give_up_if_no_improvement=give_up_if_no_improvement, post_crossover_check=post_crossover_check, max_crossover_retries=max_crossover_retries, ) self.max_replace_times_per_index = max_replace_times_per_index def _modify_population_member( self, pop_member: PopulationMember, new_text: AttackedText, new_result: GoalFunctionResult, word_idx: int, ) -> PopulationMember: """Modify `pop_member` by returning a new copy with `new_text`, `new_result`, and `num_replacements_left` altered appropriately for given `word_idx`""" num_replacements_left = np.copy(pop_member.attributes["num_replacements_left"]) num_replacements_left[word_idx] -= 1 return PopulationMember( new_text, result=new_result, attributes={"num_replacements_left": num_replacements_left}, ) def _get_word_select_prob_weights(self, pop_member: PopulationMember) -> int: """Get the attribute of `pop_member` that is used for determining probability of each word being selected for perturbation.""" return pop_member.attributes["num_replacements_left"] def _crossover_operation( self, pop_member1: PopulationMember, pop_member2: PopulationMember, ) -> Tuple[AttackedText, dict]: """Actual operation that takes `pop_member1` text and `pop_member2` text and mixes the two to generate crossover between `pop_member1` and `pop_member2`. Args: pop_member1: The first population member. pop_member2: The second population member. Returns: Tuple of `AttackedText` and a dictionary of attributes. """ indices_to_replace = [] words_to_replace = [] num_replacements_left = np.copy(pop_member1.attributes["num_replacements_left"]) # print("num_replacements_left:", num_replacements_left) # print("num_replacements_left.shape:", num_replacements_left.shape) # To better simulate the reproduction and biological crossover, # IGA randomly cut the text from two parents and concat two fragments into a new text # rather than randomly choose a word of each position from the two parents. end_point = min( pop_member1.num_words, pop_member2.num_words, len(num_replacements_left) ) crossover_point = DEFAULTS.RNG.integers(0, end_point) # print(f"crossover_point, pop_member1.num_words, pop_member2.num_words: {crossover_point, pop_member1.num_words, pop_member2.num_words}") # if pop_member1.num_words != pop_member2.num_words: # print(f"pop_member1: {pop_member1.attacked_text.text}") # print(f"pop_member2: {pop_member2.attacked_text.text}") end_point = max(crossover_point, end_point) for i in range(crossover_point, end_point): indices_to_replace.append(i) words_to_replace.append(pop_member2.words[i]) num_replacements_left[i] = pop_member2.attributes["num_replacements_left"][ i ] new_text = pop_member1.attacked_text.replace_words_at_indices( indices_to_replace, words_to_replace ) return new_text, {"num_replacements_left": num_replacements_left} def _initialize_population( self, initial_result: GoalFunctionResult, pop_size: int, ) -> List[PopulationMember]: """ Initialize a population of size `pop_size` with `initial_result` Args: initial_result: Original text pop_size: size of population Returns: population as `list[PopulationMember]` """ words = initial_result.attacked_text.words # For IGA, `num_replacements_left` represents the number of times the word at each index can be modified num_replacements_left = np.array( [self.max_replace_times_per_index] * len(words) ) population = [] # IGA initializes the first population by replacing each word by its optimal synonym for idx in range(len(words)): pop_member = PopulationMember( initial_result.attacked_text, initial_result, attributes={"num_replacements_left": np.copy(num_replacements_left)}, ) pop_member = self._perturb(pop_member, initial_result, index=idx) population.append(pop_member) return population[:pop_size] def extra_repr_keys(self) -> List[str]: return super().extra_repr_keys() + ["max_replace_times_per_index"]
6,921
2,151
# Generated by Django 3.2.7 on 2021-10-02 15:44 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('main', '0010_cartorder_cartorderitems'), ] operations = [ migrations.AlterModelOptions( name='cartorder', options={'verbose_name_plural': '8. Order'}, ), migrations.AlterModelOptions( name='cartorderitems', options={'verbose_name_plural': '9. OrderItems'}, ), migrations.AlterField( model_name='cartorderitems', name='image', field=models.ImageField(max_length=200, upload_to=''), ), migrations.CreateModel( name='ProductReview', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('review_text', models.TextField()), ('review_rating', models.CharField(choices=[(1, '1'), (2, '2'), (3, '3'), (4, '4'), (5, '5')], max_length=150)), ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.product')), ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ], ), ]
1,471
459
import re def count_words(sentence): words: list[str] = [match.group(0) for match in re.finditer(r"[a-z0-9]+(['][a-z]+)?", sentence.lower())] word_occurrences: dict[str, int] = {word: 0 for word in words} for word in words: word_occurrences[word] += 1 return word_occurrences
303
116
import pytest from eight_bit_computer.operations import set_op from eight_bit_computer.data_structures import get_machine_code_byte_template from eight_bit_computer.exceptions import OperationParsingError def generate_parse_line_test_data(): ret = [] test_input = "" expected = [] ret.append((test_input, expected)) test_input = " \t" expected = [] ret.append((test_input, expected)) test_input = "LOAD [#123] A" expected = [] ret.append((test_input, expected)) test_input = "SET A #123" mc_0 = get_machine_code_byte_template() mc_0["byte_type"] = "instruction" mc_0["bitstring"] = "00111001" mc_1 = get_machine_code_byte_template() mc_1["byte_type"] = "constant" mc_1["constant"] = "#123" ret.append((test_input, [mc_0, mc_1])) test_input = " SET B $monkey " mc_0 = get_machine_code_byte_template() mc_0["byte_type"] = "instruction" mc_0["bitstring"] = "00111010" mc_1 = get_machine_code_byte_template() mc_1["byte_type"] = "constant" mc_1["constant"] = "$monkey" ret.append((test_input, [mc_0, mc_1])) return ret @pytest.mark.parametrize( "test_input,expected", generate_parse_line_test_data() ) def test_parse_line(test_input, expected): assert set_op.parse_line(test_input) == expected @pytest.mark.parametrize("test_input", [ "SET", "SET A", "SET A B", "SET #123", "SET BLAH #123", "SET A #123 FOO", ]) def test_parse_line_raises(test_input): with pytest.raises(OperationParsingError): set_op.parse_line(test_input)
1,595
629
from tensorflow import keras from tensorflow.keras.layers import Conv2D, MaxPooling2D, Conv2DTranspose,\ Activation, Add def build_vgg(weights_path, input_width=224, input_height=224): # input_height and width must be devisible by 32 because maxpooling with # filter size = (2,2) is operated 5 times, which makes the input_height and # width 2^5 = 32 times smaller assert input_width % 32 == 0 assert input_height % 32 == 0 IMAGE_ORDERING = "channels_last" # VGG model vgg = keras.models.Sequential() # Block1 vgg.add(Conv2D(64, (3, 3), activation="relu", padding="same", name="block1_conv1", data_format=IMAGE_ORDERING, input_shape=(input_width, input_height, 3))) vgg.add(Conv2D(64, (3, 3), activation="relu", padding="same", name="block1_conv2", data_format=IMAGE_ORDERING)) vgg.add(MaxPooling2D((2, 2), strides=(2, 2), name="block1_pool", data_format=IMAGE_ORDERING)) # Block2 vgg.add(Conv2D(128, (3, 3), activation="relu", padding="same", name="block2_conv1", data_format=IMAGE_ORDERING)) vgg.add(Conv2D(128, (3, 3), activation="relu", padding="same", name="block2_conv2", data_format=IMAGE_ORDERING)) vgg.add(MaxPooling2D((2, 2), strides=(2, 2), name="block2_pool", data_format=IMAGE_ORDERING)) # Block3 vgg.add(Conv2D(256, (3, 3), activation="relu", padding="same", name="block3_conv1", data_format=IMAGE_ORDERING)) vgg.add(Conv2D(256, (3, 3), activation="relu", padding="same", name="block3_conv2", data_format=IMAGE_ORDERING)) vgg.add(Conv2D(256, (3, 3), activation="relu", padding="same", name="block3_conv3", data_format=IMAGE_ORDERING)) vgg.add(MaxPooling2D((2, 2), strides=(2, 2), name="block3_pool", data_format=IMAGE_ORDERING)) # Block4 vgg.add(Conv2D(512, (3, 3), activation="relu", padding="same", name="block4_conv1", data_format=IMAGE_ORDERING)) vgg.add(Conv2D(512, (3, 3), activation="relu", padding="same", name="block4_conv2", data_format=IMAGE_ORDERING)) vgg.add(Conv2D(512, (3, 3), activation="relu", padding="same", name="block4_conv3", data_format=IMAGE_ORDERING)) vgg.add(MaxPooling2D((2, 2), strides=(2, 2), name="block4_pool", data_format=IMAGE_ORDERING)) # Block5 vgg.add(Conv2D(512, (3, 3), activation="relu", padding="same", name="block5_conv1", data_format=IMAGE_ORDERING)) vgg.add(Conv2D(512, (3, 3), activation="relu", padding="same", name="block5_conv2", data_format=IMAGE_ORDERING)) vgg.add(Conv2D(512, (3, 3), activation="relu", padding="same", name="block5_conv3", data_format=IMAGE_ORDERING)) vgg.add(MaxPooling2D((2, 2), strides=(2, 2), name="block5_pool", data_format=IMAGE_ORDERING)) # Dense layers of the original VGG16 model are discarded vgg.load_weights(weights_path.as_posix()) return vgg def FCN8(vgg, num_classes, input_width=224, input_height=224): assert input_width % 32 == 0 assert input_height % 32 == 0 IMAGE_ORDERING = "channels_last" # Deconvolution layers of the FCN8 pool5 = vgg.get_layer("block5_pool").output fctoconv_1 = (Conv2D(4096, (7, 7), activation="relu", padding="same", name="fctoconv_1", data_format=IMAGE_ORDERING))(pool5) fctoconv_2 = (Conv2D(4096, (1, 1), activation="relu", padding="same", name="fctoconv_2", data_format=IMAGE_ORDERING))(fctoconv_1) # 2 times up-sampling deconv1 = Conv2DTranspose(num_classes, kernel_size=(2, 2), strides=(2, 2), use_bias=False, data_format=IMAGE_ORDERING)(fctoconv_2) # 2 times up-sampling pool4 = vgg.get_layer("block4_pool").output predict2 = (Conv2D(num_classes, (1, 1), activation="relu", padding="same", name="predict2", data_format=IMAGE_ORDERING))(pool4) sum1 = Add(name="add1")([predict2, deconv1]) deconv2 = Conv2DTranspose(num_classes, (2, 2), strides=(2, 2), use_bias=False, data_format=IMAGE_ORDERING)(sum1) # 8 times up-sampling pool3 = vgg.get_layer("block3_pool").output predict3 = (Conv2D(num_classes, (1, 1), activation="relu", padding="same", name="predict3", data_format=IMAGE_ORDERING))(pool3) sum2 = Add(name="add2")([deconv2, predict3]) deconv3 = (Conv2DTranspose(num_classes, kernel_size=(8, 8), strides=( 8, 8), use_bias=False, data_format=IMAGE_ORDERING))(sum2) output = (Activation("softmax"))(deconv3) model = keras.Model(vgg.input, output) return model
5,066
1,835
import numpy as np import scipy.spatial.distance from scipy import linalg import procrustes_analysis import util from Landmark import Landmark from models.CenterInitializationModel import CenterInitializationModel class ToothModel: def __init__(self, name, landmarks, pcaComponents, sampleAmount): self.name = name self.landmarks = landmarks self.preprocessedLandmarks = [] self.meanLandmark = None # type: Landmark self.meanTheta = None self.meanScale = None self.pcaComponents = pcaComponents self.eigenvalues = np.array([]) self.eigenvectors = np.array([]) self.sampleAmount = sampleAmount self.meanProfilesForLandmarkPoints = {} self.grayLevelModelCovarianceMatrices = {} self.initializationModel = CenterInitializationModel(landmarks, 28) # TODO def doProcrustesAnalysis(self): # procrustes_analysis.drawLandmarks(self.landmarks, "before") self.preprocessedLandmarks, self.meanLandmark, self.meanScale, self.meanTheta \ = procrustes_analysis.performProcrustesAnalysis(self.landmarks) # procrustes_analysis.drawLandmarks(self.preprocessedLandmarks, "after") return self def getTranslatedMean(self, x, y): """ Returns the mean landmark translated to x and y. """ return self.meanLandmark.translate(x, y) def getTranslatedAndInverseScaledMean(self, x, y): """ Returns the mean landmark rescaled back from unit variance (after procrustes) and translated to x and y. """ return self.meanLandmark.scale(self.meanScale * 0.75).translate(x, y) def doPCA(self): """ Perform PCA on the landmarks after procrustes analysis and store the eigenvalues and eigenvectors. """ data = [l.points for l in self.preprocessedLandmarks] data.append(data[0]) S = np.cov(np.transpose(data)) eigenvalues, eigenvectors = np.linalg.eig(S) sorted_values = np.flip(eigenvalues.argsort(), 0)[:self.pcaComponents] self.eigenvalues = eigenvalues[sorted_values] self.eigenvectors = eigenvectors[:, sorted_values] # print(self.eigenvalues) return self def getShapeParametersForLandmark(self, landmark): b = self.eigenvectors.T @ (landmark.points - self.meanLandmark.points) return b.reshape((self.pcaComponents, -1)) def reconstructLandmarkForShapeParameters(self, b): return Landmark(self.meanLandmark.points + (self.eigenvectors @ b).flatten()) def buildGrayLevelModels(self): """ Builds gray level models for each of the tooth's landmark points. Build gray level models for each of the mean landmark points by averaging the gray level profiles for each point of each landmark. """ self.grayLevelModelCovarianceMatrices = {} self.meanProfilesForLandmarkPoints = {} # Build gray level model for each landmark for i, landmark in enumerate(self.landmarks): # Get the gray level profiles for each of the 40 landmark points normalizedGrayLevelProfiles = landmark.normalizedGrayLevelProfilesForLandmarkPoints( img=landmark.getCorrectRadiographPart(), grayLevelModelSize=self.sampleAmount ) for j, normalizedProfile in normalizedGrayLevelProfiles.items(): if j not in self.meanProfilesForLandmarkPoints: self.meanProfilesForLandmarkPoints[j] = [] self.meanProfilesForLandmarkPoints[j].append(normalizedProfile) for pointIdx in range(len(self.meanProfilesForLandmarkPoints)): cov = np.cov(np.transpose(self.meanProfilesForLandmarkPoints[pointIdx])) self.grayLevelModelCovarianceMatrices[pointIdx] = linalg.pinv(cov) # Replace each point's list of gray level profiles by their means self.meanProfilesForLandmarkPoints[pointIdx] = np.mean(self.meanProfilesForLandmarkPoints[pointIdx], axis=0) return self def mahalanobisDistance(self, normalizedGrayLevelProfile, landmarkPointIndex): """ Returns the squared Mahalanobis distance of a new gray level profile from the built gray level model with index landmarkPointIndex. """ Sp = self.grayLevelModelCovarianceMatrices[landmarkPointIndex] pMinusMeanTrans = (normalizedGrayLevelProfile - self.meanProfilesForLandmarkPoints[landmarkPointIndex]) return pMinusMeanTrans.T @ Sp @ pMinusMeanTrans def findBetterFittingLandmark(self, img, landmark): """ Active Shape Model Algorithm: An iterative approach to improving the fit of an instance X. Returns a landmark that is a better fit on the image than the given according to the gray level pointProfiles of points of the landmark and the mahalanobis distance. """ # Examine a region of the image around each point X_i to find the best nearby match for the point X_i' # Get the gray level pointProfiles of points on normal lines of the landmark's points profilesForLandmarkPoints = landmark.getGrayLevelProfilesForNormalPoints( img=img, grayLevelModelSize=self.sampleAmount, sampleAmount=self.sampleAmount, derive=True ) bestPoints = [] # landmarkPointIdx = the points 0 to 39 on the landmark for landmarkPointIdx in range(len(profilesForLandmarkPoints)): # landmarkPointProfiles = list of {grayLevelProfile, normalPoint, grayLevelProfilePoints} landmarkPointProfiles = profilesForLandmarkPoints[landmarkPointIdx] distances = [] for profileContainer in landmarkPointProfiles: grayLevelProfile = profileContainer["grayLevelProfile"] normalPoint = profileContainer["normalPoint"] d = self.mahalanobisDistance(grayLevelProfile, landmarkPointIdx) distances.append((abs(d), normalPoint)) # print("Mahalanobis dist: {:.2f}, p: {}".format(abs(d), normalPoint)) bestPoints.append(min(reversed(distances), key=lambda x: x[0])[1]) landmark = landmark.copy(np.asarray(bestPoints).flatten()) # Find the pose parameters that best fit the new found points X landmark, (translateX, translateY), scale, theta = landmark.superimpose(self.meanLandmark) # Apply constraints to the parameters b to ensure plausible shapes b = self.getShapeParametersForLandmark(landmark) # Constrain the shape parameters to lie within certain limits for i in range(len(b)): limit = 2 * np.sqrt(abs(self.eigenvalues[i])) b[i] = np.clip(b[i], -limit, limit) return self.reconstructLandmarkForShapeParameters(b) \ .rotate(-theta).scale(scale).translate(-translateX, -translateY) def matchModelPointsToTargetPoints(self, landmarkY): """ A simple iterative approach towards finding the best pose and shape parameters to match a model instance X to a new set of image points Y. """ b = np.zeros((self.pcaComponents, 1)) diff = float("inf") translateX = 0 translateY = 0 theta = 0 scale = 0 while diff > 1e-9: # Generate model points using x = x' + Pb x = self.reconstructLandmarkForShapeParameters(b) # Project Y into the model coordinate frame by superimposition # and get the parameters of the transformation y, (translateX, translateY), scale, theta = landmarkY.superimpose(x) # Update the model parameters b newB = self.getShapeParametersForLandmark(y) diff = scipy.spatial.distance.euclidean(b, newB) b = newB return self.reconstructLandmarkForShapeParameters(b) \ .rotate(-theta).scale(scale).translate(-translateX, -translateY) def reconstruct(self, landmark): """ Reconstructs a landmark. Be sure to create b for a preprocessed landmark. PCA is done on preprocessed landmarks. """ procrustes_analysis.plotLandmarks([self.meanLandmark], "self.meanLandmark") superimposed, (translateX, translateY), scale, theta = landmark.superimpose(self.meanLandmark) procrustes_analysis.plotLandmarks([superimposed], "superimposed landmark") b = self.getShapeParametersForLandmark(superimposed) reconstructed = self.reconstructLandmarkForShapeParameters(b) procrustes_analysis.plotLandmarks([reconstructed], "reconstructed landmark") reconstructed = reconstructed.rotate(-theta).scale(scale).translate(-translateX, -translateY) procrustes_analysis.plotLandmarks([landmark, reconstructed], "original + reconstructed and inverse transformed landmark") print("shape b = {}, shape eigenvectors = {}".format(b.shape, self.eigenvectors.shape)) return reconstructed def buildModels(radiographs, PCAComponents, sampleAmount): # 1.1 Load the provided landmarks into your program landmarks = [] for radiograph in radiographs: landmarks += list(radiograph.landmarks.values()) # 1.2 Pre-process the landmarks to normalize translation, rotation, and scale differences models = [] for t in util.TEETH: models.append( ToothModel( name=t, landmarks=[l for l in landmarks if l.toothNumber == t], pcaComponents=PCAComponents, sampleAmount=sampleAmount, ) .buildGrayLevelModels() .doProcrustesAnalysis() ) # 1.3 Analyze the data using a Principal Component Analysis (PCA), exposing shape class variations for model in models: model.doPCA() # model.reconstruct() # Build gray level model for each point of the mean landmarks of the models return models
10,098
2,795
import os import sys import getopt import random as r from PIL import Image from pixelsort import pixelsort def randomize_params(): angle = r.randint(90, 359) # --- DEFINE ALL PARAMETERS --- params = { 1: 'interval_function', 2: 'randomness', 3: 'lower_threshold', 4: 'upper_threshold', 5: 'sorting_function', } # --- RANDOMIZE COUNT AND CHOICE OF PARAMS --- param_count = r.randint(1, 5) selected_params = [] for _ in range(param_count): param_choice = r.randint(1, 5) if params[param_choice] not in selected_params: selected_params.append(params[param_choice]) # --- SET DEFAULTS FOR PARAMS --- args = {} args['angle'] = angle args['interval_function'] = 'threshold' args['lower_threshold'] = 0.5 args['upper_threshold'] = 0.8 args['randomness'] = 0.5 args['sorting_function'] = 'lightness' # --- UPDATE WITH RANDOMIZED VALUES --- for param in selected_params: if param == 'interval_function': interval_fns = ['random', 'threshold', 'waves'] args['interval_function'] = r.choice(interval_fns) elif param == 'randomness': args['randomness'] = r.uniform(0.5, 1) elif param == 'sorting_function': sorting_fns = ['lightness', 'hue', 'saturation', 'intensity', 'minimum'] args['sorting_function'] = r.choice(sorting_fns) elif param == 'lower_threshold': args['lower_threshold'] = r.uniform(0.5, 1) elif param == 'upper_threshold': up_thresh = r.uniform(0.6, 1) if up_thresh <= args['lower_threshold']: up_thresh += r.uniform(0.1, 1 - args['lower_threshold']) args['upper_threshold'] = up_thresh elif args['upper_threshold'] - args['lower_threshold'] < 0.25: args['lower_threshold'] -= 0.25 return args def perform_sorting(args, img): # --- PERFORM PIXELSORT WITH RANDOMIZED PARAMS --- new_img = pixelsort( image = img, angle = args['angle'], interval_function = args['interval_function'], lower_threshold = args['lower_threshold'], upper_threshold = args['upper_threshold'], randomness = args['randomness'], sorting_function = args['sorting_function'] ) return new_img def Main(): # --- DEFINE ARGS AND SET DEFAULTS --- count = 0 in_path = 'images/' out_path = 'generated/' argument_list = sys.argv[1:] options = 'hi:n:' # --- DEFINE TERMINAL ARG OPERATIONS --- try: args, _ = getopt.getopt(argument_list, options) for current_argument, current_value in args: if current_argument in ('-h'): print('-'*30) print('-h : args description') print('-i : pass location of input img-file') print('-n : number of outputs required') print('-'*30) if current_argument in ('-i'): print('-'*30) in_path += current_value print(f'[+] Input-file: {in_path}') if current_argument in ('-n'): count = int(current_value) print(f'[+] Output-Count: {current_value}') print('-'*30) except getopt.error as error: print(str(error)) # --- DELETE PREVIOUS RESULTS --- for file in os.listdir(out_path): os.remove(os.path.join(out_path, file)) # --- GENERATE 'N=COUNT' INSTANCES --- for index in range(count): # --- CALL PARAMETER FUNCTION --- args = randomize_params() # --- PRINT RANDOMIZED CHOICES --- for arg in args.items(): print(arg[0], ':', arg[1]) # --- DEFINE LOCATIONS FOR LOAD AND SAVE --- in_file = in_path out_file = out_path + f'result-0{index + 1}.png' img = Image.open(in_file) # --- CALL SORT FUNCTION --- new_img = perform_sorting(args, img) # --- SAVE NEW FILE --- new_img.save(out_file) print('-'*30) if __name__ == "__main__": Main()
4,169
1,355
import requests import time import subprocess as sp start_time = 0 running_instances = {} errCount = 0 reqCount = 0 def printStatus(hostname,version): global running_instances global start_time, errCount, reqCount elapsed_time = int(time.time() - start_time) # if (elapsed_time % 2) == 0 : string_to_print = "\n" for x in running_instances: string_to_print += "\tVersion: " + x + ", Instances: " + str(len(running_instances[x])) + "\n" sp.call('clear',shell=True) print(f"Instances seen in past {elapsed_time} seconds ", string_to_print + "Requests: " + str(reqCount) + ", Errors: " + str(errCount)) if elapsed_time >=30: start_time = time.time() running_instances = {} errCount = 0 reqCount = 0 if running_instances and version in running_instances: if not hostname in running_instances[version]: running_instances[version].append(hostname) else: running_instances[version] = [hostname] def main(): URL = "http://10.104.84.249" global start_time, errCount, reqCount start_time = time.time() while True: try: res = requests.get(url = URL) data = res.json() printStatus(data["os"]["name"],data["version"]) reqCount+=1 except: errCount+=1 time.sleep(0.005) if __name__ == '__main__': main()
1,434
473
import argparse # Parse command line args def argparser(): parser = argparse.ArgumentParser() parser.add_argument('-c', '--continue_train', action='store_true', help='when set, training will continue from before') #error: ambiguous option: --test could match --test_only, --test_ratio parser.add_argument('-test_only', dest='test_only', action='store_true', help='when set, testing will be done (we are in the TEST PHASE, no need to train)') parser.add_argument('--dataset', default='news_cat', type=str, choices=['stan_sent', 'news_cat', 'fake_news', 'emo_aff'], help='dataset to use', dest='dataset') parser.add_argument('--models', nargs='+', type=str, required=True, help='model(s) to run') # TODO: Add choices? parser.add_argument('--feats', nargs='+', type=str, help='features to use while training', dest='feats') parser.add_argument('--save_path', type=str, help='path to where models would be saved', dest='save_path') parser.add_argument('--load_path', type=str, help='provide path to where models were saved', dest='load_path') parser.add_argument('--split_ratio', type=float, default=1.0, help='train / val split ratio ($\in$ [0.0, 1.0])', dest='split_ratio') #optional: dataset is too large; takes too long to train or test the whole (This is for debugging convenience) parser.add_argument('--test_ratio', type=float, default=0.0, help='ratio to test, when set to 0.0 uses the above val split ratio otherwise use test_ratio * num of samples', dest='test_ratio') parser.add_argument('-sd', '--save_data', action='store_true', help='when set, cleaned dataset will be saved') parser.add_argument('-lc', '--load_clean', action='store_true', help='when set, cleaned dataset will be loaded') parser.add_argument('-sr', '--save_results', action='store_true', help='when set, final results will be saved') args = parser.parse_args() return args
2,835
734
""" Utility functions useful for testing """ import filecmp from typing import Tuple from core.data_block import DataBlock from core.data_stream import TextFileDataStream from core.data_encoder_decoder import DataDecoder, DataEncoder from core.prob_dist import ProbabilityDist from utils.bitarray_utils import BitArray, get_random_bitarray import tempfile import os import numpy as np def get_random_data_block(prob_dist: ProbabilityDist, size: int, seed: int = None): """generates i.i.d random data from the given prob distribution Args: prob_dist (ProbabilityDist): input probability distribution size (int): size of the block to be returned seed (int): random seed used to generate the data """ rng = np.random.default_rng(seed) data = rng.choice(prob_dist.alphabet, size=size, p=prob_dist.prob_list) return DataBlock(data) def create_random_text_file(file_path: str, file_size: int, prob_dist: ProbabilityDist): """creates a random text file at the given path Args: file_path (str): file path to which random data needs to be written file_size (int): The size of the random file to be generated prob_dist (ProbabilityDist): the distribution to use to generate the random data """ data_block = get_random_data_block(prob_dist, file_size) with TextFileDataStream(file_path, "w") as fds: fds.write_block(data_block) def are_blocks_equal(data_block_1: DataBlock, data_block_2: DataBlock): """ return True is the blocks are equal """ if data_block_1.size != data_block_2.size: return False # check if the encoding/decoding was lossless for inp_symbol, out_symbol in zip(data_block_1.data_list, data_block_2.data_list): if inp_symbol != out_symbol: return False return True def try_lossless_compression( data_block: DataBlock, encoder: DataEncoder, decoder: DataDecoder, add_extra_bits_to_encoder_output: bool = False, ) -> Tuple[bool, int, BitArray]: """Encodes the data_block using data_compressor and returns True if the compression was lossless Args: data_block (DataBlock): input data_block to encode encoder (DataEncoder): Encoder obj decoder (DataDecoder): Decoder obj to test with append_extra_bits_to_encoder_output (bool, optional): This flag adds a random number of slack bits at the end of encoder output. This is to test the scenario where we are concatenating multiple encoder outputs in the same bitstream. Defaults to False. Returns: Tuple[bool, int, BitArray]: whether encoding is lossless, size of the output block, encoded bitarray """ # test encode encoded_bitarray = encoder.encode_block(data_block) # if True, add some random bits to the encoder output encoded_bitarray_extra = BitArray(encoded_bitarray) # make a copy if add_extra_bits_to_encoder_output: num_extra_bits = int(np.random.randint(100)) encoded_bitarray_extra += get_random_bitarray(num_extra_bits) # test decode decoded_block, num_bits_consumed = decoder.decode_block(encoded_bitarray_extra) assert num_bits_consumed == len(encoded_bitarray) # compare blocks return are_blocks_equal(data_block, decoded_block), num_bits_consumed, encoded_bitarray def try_file_lossless_compression( input_file_path: str, encoder: DataEncoder, decoder: DataDecoder, encode_block_size=1000 ): """try encoding the input file and check if it is lossless Args: input_file_path (str): input file path encoder (DataEncoder): encoder object decoder (DataDecoder): decoder object """ with tempfile.TemporaryDirectory() as tmpdirname: encoded_file_path = os.path.join(tmpdirname, "encoded_file.bin") reconst_file_path = os.path.join(tmpdirname, "reconst_file.txt") # encode data using the FixedBitWidthEncoder and write to the binary file encoder.encode_file(input_file_path, encoded_file_path, block_size=encode_block_size) # decode data using th eFixedBitWidthDecoder and write output to a text file decoder.decode_file(encoded_file_path, reconst_file_path) # check if the reconst file and input match return filecmp.cmp(input_file_path, reconst_file_path)
4,352
1,313
# This Python file uses the following encoding: utf-8 """autogenerated by genpy from mavros_msgs/CommandCode.msg. Do not edit.""" import codecs import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct class CommandCode(genpy.Message): _md5sum = "9c980aa1230f756ac9d693ff35accb29" _type = "mavros_msgs/CommandCode" _has_header = False # flag to mark the presence of a Header object _full_text = """# MAV_CMD command codes. # Actual meaning and params you may find in MAVLink documentation # https://mavlink.io/en/messages/common.html#MAV_CMD # [[[cog: # from pymavlink.dialects.v20 import common # from collections import OrderedDict # import re # # def wr_enum(enum, ename, pfx='', bsz=16): # cog.outl("# " + ename + "_" + pfx) # for k, e in enum: # # exclude also deprecated commands # if 'MAV_CMD' + "_" + pfx in e.name and not re.search('deprecated', e.description, re.IGNORECASE): # sn = e.name[len('MAV_CMD') + 1:] # l = "uint{bsz} {sn} = {k}".format(**locals()) # if e.description: # l += ' ' * (50 - len(l)) + ' # ' + e.description # cog.outl(l) # cog.out('\n') # # def decl_enum(ename): # enum = sorted(common.enums[ename].items()) # enum.pop() # remove ENUM_END # # enumt = [] # # exception list of commands to not include # exlist = ['SPATIAL', 'USER', 'WAYPOINT'] # for k, e in enum: # enumt.extend(e.name[len(ename) + 1:].split('_')[0:1]) # # enumt = sorted(set(enumt)) # enumt = [word for word in enumt if word not in exlist] # # for key in enumt: # wr_enum(enum, ename, key) # # decl_enum('MAV_CMD') # ]]] # MAV_CMD_AIRFRAME uint16 AIRFRAME_CONFIGURATION = 2520 # MAV_CMD_ARM uint16 ARM_AUTHORIZATION_REQUEST = 3001 # Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. If approved the progress of command_ack message should be set with period of time that this authorization is valid in seconds or in case it was denied it should be set with one of the reasons in ARM_AUTH_DENIED_REASON. # MAV_CMD_COMPONENT uint16 COMPONENT_ARM_DISARM = 400 # Arms / Disarms a component # MAV_CMD_CONDITION uint16 CONDITION_DELAY = 112 # Delay mission state machine. uint16 CONDITION_CHANGE_ALT = 113 # Ascend/descend at rate. Delay mission state machine until desired altitude reached. uint16 CONDITION_DISTANCE = 114 # Delay mission state machine until within desired distance of next NAV point. uint16 CONDITION_YAW = 115 # Reach a certain target angle. uint16 CONDITION_LAST = 159 # NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration # MAV_CMD_CONTROL uint16 CONTROL_HIGH_LATENCY = 2600 # Request to start/stop transmitting over the high latency telemetry # MAV_CMD_DO uint16 DO_FOLLOW = 32 # Being following a target uint16 DO_FOLLOW_REPOSITION = 33 # Reposition the MAV after a follow target command has been sent uint16 DO_SET_MODE = 176 # Set system mode. uint16 DO_JUMP = 177 # Jump to the desired command in the mission list. Repeat this action only the specified number of times uint16 DO_CHANGE_SPEED = 178 # Change speed and/or throttle set points. uint16 DO_SET_HOME = 179 # Changes the home location either to the current location or a specified location. uint16 DO_SET_PARAMETER = 180 # Set a system parameter. Caution! Use of this command requires knowledge of the numeric enumeration value of the parameter. uint16 DO_SET_RELAY = 181 # Set a relay to a condition. uint16 DO_REPEAT_RELAY = 182 # Cycle a relay on and off for a desired number of cycles with a desired period. uint16 DO_SET_SERVO = 183 # Set a servo to a desired PWM value. uint16 DO_REPEAT_SERVO = 184 # Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period. uint16 DO_FLIGHTTERMINATION = 185 # Terminate flight immediately uint16 DO_CHANGE_ALTITUDE = 186 # Change altitude set point. uint16 DO_LAND_START = 189 # Mission command to perform a landing. This is used as a marker in a mission to tell the autopilot where a sequence of mission items that represents a landing starts. It may also be sent via a COMMAND_LONG to trigger a landing, in which case the nearest (geographically) landing sequence in the mission will be used. The Latitude/Longitude is optional, and may be set to 0 if not needed. If specified then it will be used to help find the closest landing sequence. uint16 DO_RALLY_LAND = 190 # Mission command to perform a landing from a rally point. uint16 DO_GO_AROUND = 191 # Mission command to safely abort an autonomous landing. uint16 DO_REPOSITION = 192 # Reposition the vehicle to a specific WGS84 global position. uint16 DO_PAUSE_CONTINUE = 193 # If in a GPS controlled position mode, hold the current position or continue. uint16 DO_SET_REVERSE = 194 # Set moving direction to forward or reverse. uint16 DO_SET_ROI_LOCATION = 195 # Sets the region of interest (ROI) to a location. This can then be used by the vehicles control system to control the vehicle attitude and the attitude of various sensors such as cameras. uint16 DO_SET_ROI_WPNEXT_OFFSET = 196 # Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicles control system to control the vehicle attitude and the attitude of various sensors such as cameras. uint16 DO_SET_ROI_NONE = 197 # Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicles control system to control the vehicle attitude and the attitude of various sensors such as cameras. uint16 DO_CONTROL_VIDEO = 200 # Control onboard camera system. uint16 DO_SET_ROI = 201 # Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicles control system to control the vehicle attitude and the attitude of various sensors such as cameras. uint16 DO_DIGICAM_CONFIGURE = 202 # Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see https://mavlink.io/en/services/camera_def.html ). uint16 DO_DIGICAM_CONTROL = 203 # Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see https://mavlink.io/en/services/camera_def.html ). uint16 DO_MOUNT_CONFIGURE = 204 # Mission command to configure a camera or antenna mount uint16 DO_MOUNT_CONTROL = 205 # Mission command to control a camera or antenna mount uint16 DO_SET_CAM_TRIGG_DIST = 206 # Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera. uint16 DO_FENCE_ENABLE = 207 # Mission command to enable the geofence uint16 DO_PARACHUTE = 208 # Mission command to trigger a parachute uint16 DO_MOTOR_TEST = 209 # Mission command to perform motor test. uint16 DO_INVERTED_FLIGHT = 210 # Change to/from inverted flight. uint16 DO_SET_CAM_TRIGG_INTERVAL = 214 # Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera. uint16 DO_MOUNT_CONTROL_QUAT = 220 # Mission command to control a camera or antenna mount, using a quaternion as reference. uint16 DO_GUIDED_MASTER = 221 # set id of master controller uint16 DO_GUIDED_LIMITS = 222 # Set limits for external control uint16 DO_ENGINE_CONTROL = 223 # Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines uint16 DO_SET_MISSION_CURRENT = 224 # Set the mission item with sequence number seq as current item. This means that the MAV will continue to this mission item on the shortest path (not following the mission items in-between). uint16 DO_LAST = 240 # NOP - This command is only used to mark the upper limit of the DO commands in the enumeration uint16 DO_JUMP_TAG = 601 # Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number. uint16 DO_TRIGGER_CONTROL = 2003 # Enable or disable on-board camera triggering system. uint16 DO_VTOL_TRANSITION = 3000 # Request VTOL transition # MAV_CMD_GET uint16 GET_HOME_POSITION = 410 # Request the home position from the vehicle. uint16 GET_MESSAGE_INTERVAL = 510 # Request the interval between messages for a particular MAVLink message ID # MAV_CMD_IMAGE uint16 IMAGE_START_CAPTURE = 2000 # Start image capture sequence. Sends CAMERA_IMAGE_CAPTURED after each capture. Use NaN for reserved values. uint16 IMAGE_STOP_CAPTURE = 2001 # Stop image capture sequence Use NaN for reserved values. # MAV_CMD_JUMP uint16 JUMP_TAG = 600 # Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG. # MAV_CMD_LOGGING uint16 LOGGING_START = 2510 # Request to start streaming logging data over MAVLink (see also LOGGING_DATA message) uint16 LOGGING_STOP = 2511 # Request to stop streaming log data over MAVLink # MAV_CMD_MISSION uint16 MISSION_START = 300 # start running a mission # MAV_CMD_NAV uint16 NAV_WAYPOINT = 16 # Navigate to waypoint. uint16 NAV_LOITER_UNLIM = 17 # Loiter around this waypoint an unlimited amount of time uint16 NAV_LOITER_TURNS = 18 # Loiter around this waypoint for X turns uint16 NAV_LOITER_TIME = 19 # Loiter around this waypoint for X seconds uint16 NAV_RETURN_TO_LAUNCH = 20 # Return to launch location uint16 NAV_LAND = 21 # Land at location. uint16 NAV_TAKEOFF = 22 # Takeoff from ground / hand uint16 NAV_LAND_LOCAL = 23 # Land at local position (local frame only) uint16 NAV_TAKEOFF_LOCAL = 24 # Takeoff from local position (local frame only) uint16 NAV_FOLLOW = 25 # Vehicle following, i.e. this waypoint represents the position of a moving vehicle uint16 NAV_CONTINUE_AND_CHANGE_ALT = 30 # Continue on the current course and climb/descend to specified altitude. When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached. uint16 NAV_LOITER_TO_ALT = 31 # Begin loiter at the specified Latitude and Longitude. If Lat=Lon=0, then loiter at the current position. Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint. uint16 NAV_ROI = 80 # Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicles control system to control the vehicle attitude and the attitude of various sensors such as cameras. uint16 NAV_PATHPLANNING = 81 # Control autonomous path planning on the MAV. uint16 NAV_SPLINE_WAYPOINT = 82 # Navigate to waypoint using a spline path. uint16 NAV_VTOL_TAKEOFF = 84 # Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. uint16 NAV_VTOL_LAND = 85 # Land using VTOL mode uint16 NAV_GUIDED_ENABLE = 92 # hand control over to an external controller uint16 NAV_DELAY = 93 # Delay the next navigation command a number of seconds or until a specified time uint16 NAV_PAYLOAD_PLACE = 94 # Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload. uint16 NAV_LAST = 95 # NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration uint16 NAV_SET_YAW_SPEED = 213 # Sets a desired vehicle turn angle and speed change. uint16 NAV_FENCE_RETURN_POINT = 5000 # Fence return point. There can only be one fence return point. uint16 NAV_FENCE_POLYGON_VERTEX_INCLUSION = 5001 # Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required. uint16 NAV_FENCE_POLYGON_VERTEX_EXCLUSION = 5002 # Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required. uint16 NAV_FENCE_CIRCLE_INCLUSION = 5003 # Circular fence area. The vehicle must stay inside this area. uint16 NAV_FENCE_CIRCLE_EXCLUSION = 5004 # Circular fence area. The vehicle must stay outside this area. uint16 NAV_RALLY_POINT = 5100 # Rally point. You can have multiple rally points defined. # MAV_CMD_OVERRIDE uint16 OVERRIDE_GOTO = 252 # Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position. # MAV_CMD_PANORAMA uint16 PANORAMA_CREATE = 2800 # Create a panorama at the current position # MAV_CMD_PAYLOAD uint16 PAYLOAD_PREPARE_DEPLOY = 30001 # Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity. uint16 PAYLOAD_CONTROL_DEPLOY = 30002 # Control the payload deployment. # MAV_CMD_PREFLIGHT uint16 PREFLIGHT_CALIBRATION = 241 # Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero. uint16 PREFLIGHT_SET_SENSOR_OFFSETS = 242 # Set sensor offsets. This command will be only accepted if in pre-flight mode. uint16 PREFLIGHT_UAVCAN = 243 # Trigger UAVCAN config. This command will be only accepted if in pre-flight mode. uint16 PREFLIGHT_STORAGE = 245 # Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode. uint16 PREFLIGHT_REBOOT_SHUTDOWN = 246 # Request the reboot or shutdown of system components. # MAV_CMD_REQUEST uint16 REQUEST_MESSAGE = 512 # Request the target system(s) emit a single instance of a specified message (i.e. a "one-shot" version of MAV_CMD_SET_MESSAGE_INTERVAL). uint16 REQUEST_AUTOPILOT_CAPABILITIES = 520 # Request autopilot capabilities uint16 REQUEST_CAMERA_INFORMATION = 521 # Request camera information (CAMERA_INFORMATION). uint16 REQUEST_CAMERA_SETTINGS = 522 # Request camera settings (CAMERA_SETTINGS). uint16 REQUEST_STORAGE_INFORMATION = 525 # Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage. uint16 REQUEST_CAMERA_CAPTURE_STATUS = 527 # Request camera capture status (CAMERA_CAPTURE_STATUS) uint16 REQUEST_FLIGHT_INFORMATION = 528 # Request flight information (FLIGHT_INFORMATION) # MAV_CMD_RESET uint16 RESET_CAMERA_SETTINGS = 529 # Reset all camera settings to Factory Default # MAV_CMD_SET uint16 SET_MESSAGE_INTERVAL = 511 # Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM uint16 SET_CAMERA_MODE = 530 # Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming. uint16 SET_GUIDED_SUBMODE_STANDARD = 4000 # This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes. uint16 SET_GUIDED_SUBMODE_CIRCLE = 4001 # This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position. # MAV_CMD_START uint16 START_RX_PAIR = 500 # Starts receiver pairing. # MAV_CMD_STORAGE uint16 STORAGE_FORMAT = 526 # Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage. # MAV_CMD_UAVCAN uint16 UAVCAN_GET_NODE_INFO = 5200 # Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages. # MAV_CMD_VIDEO uint16 VIDEO_START_CAPTURE = 2500 # Starts video capture (recording). Use NaN for reserved values. uint16 VIDEO_STOP_CAPTURE = 2501 # Stop the current video capture (recording). Use NaN for reserved values. # [[[end]]] (checksum: 6546a8ab3dac44945e7bbfadae5b0d6f) """ # Pseudo-constants AIRFRAME_CONFIGURATION = 2520 ARM_AUTHORIZATION_REQUEST = 3001 COMPONENT_ARM_DISARM = 400 CONDITION_DELAY = 112 CONDITION_CHANGE_ALT = 113 CONDITION_DISTANCE = 114 CONDITION_YAW = 115 CONDITION_LAST = 159 CONTROL_HIGH_LATENCY = 2600 DO_FOLLOW = 32 DO_FOLLOW_REPOSITION = 33 DO_SET_MODE = 176 DO_JUMP = 177 DO_CHANGE_SPEED = 178 DO_SET_HOME = 179 DO_SET_PARAMETER = 180 DO_SET_RELAY = 181 DO_REPEAT_RELAY = 182 DO_SET_SERVO = 183 DO_REPEAT_SERVO = 184 DO_FLIGHTTERMINATION = 185 DO_CHANGE_ALTITUDE = 186 DO_LAND_START = 189 DO_RALLY_LAND = 190 DO_GO_AROUND = 191 DO_REPOSITION = 192 DO_PAUSE_CONTINUE = 193 DO_SET_REVERSE = 194 DO_SET_ROI_LOCATION = 195 DO_SET_ROI_WPNEXT_OFFSET = 196 DO_SET_ROI_NONE = 197 DO_CONTROL_VIDEO = 200 DO_SET_ROI = 201 DO_DIGICAM_CONFIGURE = 202 DO_DIGICAM_CONTROL = 203 DO_MOUNT_CONFIGURE = 204 DO_MOUNT_CONTROL = 205 DO_SET_CAM_TRIGG_DIST = 206 DO_FENCE_ENABLE = 207 DO_PARACHUTE = 208 DO_MOTOR_TEST = 209 DO_INVERTED_FLIGHT = 210 DO_SET_CAM_TRIGG_INTERVAL = 214 DO_MOUNT_CONTROL_QUAT = 220 DO_GUIDED_MASTER = 221 DO_GUIDED_LIMITS = 222 DO_ENGINE_CONTROL = 223 DO_SET_MISSION_CURRENT = 224 DO_LAST = 240 DO_JUMP_TAG = 601 DO_TRIGGER_CONTROL = 2003 DO_VTOL_TRANSITION = 3000 GET_HOME_POSITION = 410 GET_MESSAGE_INTERVAL = 510 IMAGE_START_CAPTURE = 2000 IMAGE_STOP_CAPTURE = 2001 JUMP_TAG = 600 LOGGING_START = 2510 LOGGING_STOP = 2511 MISSION_START = 300 NAV_WAYPOINT = 16 NAV_LOITER_UNLIM = 17 NAV_LOITER_TURNS = 18 NAV_LOITER_TIME = 19 NAV_RETURN_TO_LAUNCH = 20 NAV_LAND = 21 NAV_TAKEOFF = 22 NAV_LAND_LOCAL = 23 NAV_TAKEOFF_LOCAL = 24 NAV_FOLLOW = 25 NAV_CONTINUE_AND_CHANGE_ALT = 30 NAV_LOITER_TO_ALT = 31 NAV_ROI = 80 NAV_PATHPLANNING = 81 NAV_SPLINE_WAYPOINT = 82 NAV_VTOL_TAKEOFF = 84 NAV_VTOL_LAND = 85 NAV_GUIDED_ENABLE = 92 NAV_DELAY = 93 NAV_PAYLOAD_PLACE = 94 NAV_LAST = 95 NAV_SET_YAW_SPEED = 213 NAV_FENCE_RETURN_POINT = 5000 NAV_FENCE_POLYGON_VERTEX_INCLUSION = 5001 NAV_FENCE_POLYGON_VERTEX_EXCLUSION = 5002 NAV_FENCE_CIRCLE_INCLUSION = 5003 NAV_FENCE_CIRCLE_EXCLUSION = 5004 NAV_RALLY_POINT = 5100 OVERRIDE_GOTO = 252 PANORAMA_CREATE = 2800 PAYLOAD_PREPARE_DEPLOY = 30001 PAYLOAD_CONTROL_DEPLOY = 30002 PREFLIGHT_CALIBRATION = 241 PREFLIGHT_SET_SENSOR_OFFSETS = 242 PREFLIGHT_UAVCAN = 243 PREFLIGHT_STORAGE = 245 PREFLIGHT_REBOOT_SHUTDOWN = 246 REQUEST_MESSAGE = 512 REQUEST_AUTOPILOT_CAPABILITIES = 520 REQUEST_CAMERA_INFORMATION = 521 REQUEST_CAMERA_SETTINGS = 522 REQUEST_STORAGE_INFORMATION = 525 REQUEST_CAMERA_CAPTURE_STATUS = 527 REQUEST_FLIGHT_INFORMATION = 528 RESET_CAMERA_SETTINGS = 529 SET_MESSAGE_INTERVAL = 511 SET_CAMERA_MODE = 530 SET_GUIDED_SUBMODE_STANDARD = 4000 SET_GUIDED_SUBMODE_CIRCLE = 4001 START_RX_PAIR = 500 STORAGE_FORMAT = 526 UAVCAN_GET_NODE_INFO = 5200 VIDEO_START_CAPTURE = 2500 VIDEO_STOP_CAPTURE = 2501 __slots__ = [] _slot_types = [] def __init__(self, *args, **kwds): """ Constructor. Any message fields that are implicitly/explicitly set to None will be assigned a default value. The recommend use is keyword arguments as this is more robust to future message changes. You cannot mix in-order arguments and keyword arguments. The available fields are: :param args: complete set of field values, in .msg order :param kwds: use keyword arguments corresponding to message field names to set specific fields. """ if args or kwds: super(CommandCode, self).__init__(*args, **kwds) def _get_types(self): """ internal API method """ return self._slot_types def serialize(self, buff): """ serialize message into buffer :param buff: buffer, ``StringIO`` """ try: pass except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self))))) except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self))))) def deserialize(self, str): """ unpack serialized message in str into this message instance :param str: byte array of serialized message, ``str`` """ codecs.lookup_error("rosmsg").msg_type = self._type try: end = 0 return self except struct.error as e: raise genpy.DeserializationError(e) # most likely buffer underfill def serialize_numpy(self, buff, numpy): """ serialize message with numpy array types into buffer :param buff: buffer, ``StringIO`` :param numpy: numpy python module """ try: pass except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self))))) except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self))))) def deserialize_numpy(self, str, numpy): """ unpack serialized message in str into this message instance using numpy for array types :param str: byte array of serialized message, ``str`` :param numpy: numpy python module """ codecs.lookup_error("rosmsg").msg_type = self._type try: end = 0 return self except struct.error as e: raise genpy.DeserializationError(e) # most likely buffer underfill _struct_I = genpy.struct_I def _get_struct_I(): global _struct_I return _struct_I
25,332
8,549
from django.contrib import admin from .models import Note class NoteAdmin(admin.ModelAdmin): readonly_fields= ['created_at', 'updated_at', 'author'] def save_model(self, request, obj, form, change): obj.author = request.user super().save_model(request, obj, form, change) admin.site.register(Note, NoteAdmin)
337
101
from django.contrib.auth import views as auth_views from django.contrib.auth.models import User from django.urls import resolve, reverse from django.test import TestCase class PasswordChangeDoneIntoAccountTests(TestCase): def setUp(self): self.user = User.objects.create_user( username='tom', email='tom@dumy.com', password='asdf1234') self.client.login(username='tom', password='asdf1234') def test_password_change_done_view_url_exists_at_desired_location(self): response = self.client.get('/accounts/settings/password/done/') self.assertEquals(response.status_code, 200) def test_password_change_done_view_status_code(self): url = reverse('accounts:password_change_done') response = self.client.get(url) self.assertEqual(response.status_code, 200) def test_password_change_done_view_uses_correct_template(self): response = self.client.get(reverse('accounts:password_change_done')) self.assertEqual(response.status_code, 200) self.assertTemplateUsed(response, 'accounts/password_change_done.html') def test_password_change_done_view_uses_base_template(self): response = self.client.get(reverse('accounts:password_change_done')) self.assertEqual(response.status_code, 200) self.assertTemplateUsed(response, 'base.html') def test_password_change_done_url_resolves_the_correct_view(self): view = resolve(reverse('accounts:password_change_done')) self.assertEquals(view.func.view_class, auth_views.PasswordChangeDoneView) def test_password_change_done_contains_link_home(self): password_change_done_url = reverse('accounts:password_change_done') home_url = reverse('home') response = self.client.get(password_change_done_url) self.assertContains(response, 'href="{0}"'.format(home_url)) def test_password_change_done_contains_link_password_change(self): password_change_done_url = reverse('accounts:password_change_done') password_change_url = reverse('accounts:password_change') response = self.client.get(password_change_done_url) self.assertContains(response, 'href="{0}"'.format(password_change_url)) class LoginRequiredPasswordChangeTests(TestCase): def test_password_change_done_redirection(self): url = reverse('accounts:password_change_done') login_url = reverse('accounts:login') response = self.client.get(url) self.assertRedirects(response, f'{login_url}?next={url}')
2,605
810
import components.protocols as protocols class ClassicalStorage(object): """ A classical storage for messages. """ def __init__(self): self._host_to_msg_dict = {} self._host_to_read_index = {} def _add_new_host_id(self, host_id): self._host_to_msg_dict[host_id] = [] self._host_to_read_index[host_id] = 0 def remove_all_ack(self, from_sender=None): """ Removes all ACK messages stored. If from sender is given, only ACKs from this sender are removed. Args: from_sender (String): Host id of the sender, whos ACKs should be delted. """ def delete_all_ack_for_sender(sender_id): for c, msg in enumerate(self._host_to_msg_dict[sender_id]): if msg.content == protocols.ACK: del self._host_to_msg_dict[sender_id][c] if from_sender is None: for sender in self._host_to_msg_dict.keys(): delete_all_ack_for_sender(sender) elif from_sender in self._host_to_msg_dict.keys(): delete_all_ack_for_sender(from_sender) else: return def add_msg_to_storage(self, message): """ Adds a message to the storage. """ sender_id = message.sender if sender_id not in self._host_to_msg_dict.keys(): self._add_new_host_id(sender_id) self._host_to_msg_dict[sender_id].append(message) def get_all_from_sender(self, sender_id, delete=False): """ Get all stored messages from a sender. If delete option is set, the returned messages are removed from the storage. Args: sender_id (String): The host id of the host. delete (bool): optional, True if returned messages should be removed from storage. Returns: List of messages of the sender. If there are none, an empyt list is returned. """ if delete: raise ValueError("delete option not implemented yet!") if sender_id in self._host_to_msg_dict: return self._host_to_msg_dict[sender_id] return [] def get_next_from_sender(self, sender_id): """ Gets the next, unread, message from the sender. If there isn't one, None is returned. Args: sender_id (String): The sender id of the message to get. Returns: Message object, if such a message exists, or none. """ if sender_id not in self._host_to_msg_dict.keys(): return None if len(self._host_to_msg_dict[sender_id]) <= self._host_to_read_index[sender_id]: return None msg = self._host_to_msg_dict[sender_id][self._host_to_read_index[sender_id]] self._host_to_read_index[sender_id] += 1 return msg def get_all(self): """ Returns all Messages as a list. """ ret = [] for host_id in self._host_to_msg_dict.keys(): ret += self._host_to_msg_dict[host_id] return ret
3,094
923
import re import os from sys import exit, argv from platform import machine from functools import reduce def is_exe(fpath): return os.path.isfile(fpath) and os.access(fpath, os.X_OK) def which(program): if os.name == 'nt': program += '.exe' fpath, fname = os.path.split(program) if fpath and is_exe(program): return program else: for path in os.environ["PATH"].split(os.pathsep): exe_file = os.path.join(path, program) if is_exe(exe_file): return exe_file def find_cc(): return os.getenv('CC') or which('cc') or which('gcc') or which('clang') def transform_fmt(fmt): return '-DGOIMG_COMPILE_FMT_%s' % fmt.upper() def build_fmt_opts(files): if len(argv) < 2: return '' opt = [] for fmt in argv[1].split('+'): opt.append(transform_fmt(fmt)) files.append('fmt_'+fmt) return ' '.join(opt) def sys(*args): cmd = ' '.join(args) print(cmd) code = os.system(cmd) if code != 0: exit(code) def ppath(prefix, *args): return '%s%s%s' % (prefix, os.sep, os.sep.join(args)) def arm_opts(): try: with open('/proc/device-tree/model', 'r') as f: model = f.read() if model.find('Raspberry Pi 3') != -1: return '-mcpu=cortex-a53 -mtune=cortex-a53 ' elif model.find('Raspberry Pi 2') != -1: return '-mcpu=cortex-a7 -mfloat-abi=hard -mfpu=neon-vfpv4 ' elif model.find('Raspberry Pi ') != -1: return '-mcpu=arm1176jzf-s -mfloat-abi=hard -mfpu=vfp ' elif model.find('Xunlong Orange Pi PC') != -1: return '-mcpu=cortex-a7 -mtune=cortex-a7 -mfloat-abi=hard -mfpu=neon-vfpv4 ' else: return '' except FileNotFoundError: return '' def x86_opts(): try: f = open('/proc/cpuinfo', 'r') line = f.readline() while line: if line.find('flags') == 0: break line = f.readline() f.close() if not line: return opts = [ r'mmx\s', r'avx\s', r'avx2\s', r'sse\s', r'sse2\s', r'sse3\s', r'ssse3\s', r'sse4\s', r'sse4a\s', r'sse4_1\s', r'sse4_2\s', ] for opt in opts: if re.search(opt, line) != None: yield '-m'+opt[:-2].replace('_', '.') if opt == r'sse\s': yield '-mfpmath=sse' except FileNotFoundError: return # https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html # https://stackoverflow.com/questions/661338/sse-sse2-and-sse3-for-gnu-c/662250 # https://gist.github.com/fm4dd/c663217935dc17f0fc73c9c81b0aa845 # https://en.wikipedia.org/wiki/Uname def optimized(): if os.getenv('UNOPTIMIZED'): return '' m = machine().upper() either = lambda *args: reduce(lambda x,y: x or y, map(lambda x: m == x, map(str.upper, args))) if either('aarch64', 'armv7l', 'armv6l'): return arm_opts() elif either('i686', 'i386', 'x86', 'x86_64', 'amd64'): return ' '.join(x86_opts()) + ' ' else: return '' def build(install=None): # change to source dir os.chdir('src') files = ['goio', 'allocator', 'color', 'image', 'util'] ccopt = '-std=c99 -pedantic -fPIC -Wall -O3 ' + optimized() + build_fmt_opts(files) outlib = 'libgoimg.a' objs = [f+'.o' for f in files] cfiles = [f+'.c' for f in files] # build .o files cc = find_cc() for f in cfiles: sys(cc, ccopt, '-c', f) # pack libgoimg.a sys('ar rcs', outlib, *objs) sys('ranlib', outlib) # cleanup .o files sys('rm -f *.o') # install if install: hfiles = ' '.join(f+'.h' for f in files if f != 'util' and f[:4] != 'fmt_') + ' goimg.h' sys('mkdir -p', ppath(install, 'include', 'goimg')) sys('mkdir -p', ppath(install, 'lib')) sys('cp libgoimg.a', ppath(install, 'lib')) sys('cp', hfiles, ppath(install, 'include', 'goimg')) if __name__ == '__main__': if len(argv) > 1 and argv[1][:2] == '-i': argv = argv[1:] build(install=argv[0][3:]) else: build()
4,331
1,636
#!/usr/bin/env python from cafysis.file_io.sisbp import SisbpFile import sys f = SisbpFile(sys.argv[1]) f.open_to_read() while f.has_more_data(): pairs = f.read_onestep() for p in pairs: print(f" ({p[0]:d}, {p[1]:d})", end='') print("") f.close()
273
122
#/usr/bin/env python import smtplib mail_server = 'localhost' mail_server_port = 25 from_addr = 'sender@devcentos.example.com' to_addr = 'root@devcentos.example.com' from_header = 'From: %s\r\n' % from_addr to_header = 'To: %s\r\n\r\n' % to_addr subject_header = 'Subject: nothing interesting' body = 'This is not-very-interestng email.' email_message = '%s\n%s\n%s\n\n%s' %(from_header, to_header, subject_header, body) s = smtplib.SMTP(mail_server, mail_server_port) s.sendmail(from_addr, to_addr, email_message) s.quit()
535
225
import logging from cliff.command import Command from factioncli.processing.docker.logs import get_logs class Log(Command): "Handles Log Command" def get_parser(self, prog_name): parser = super(Log, self).get_parser(prog_name) parser.add_argument('-f','--follow', help="Enable log following", action="store_true") parser.add_argument('--container', help="Target container name", action="store", nargs=1) return parser def take_action(self, parsed_args): get_logs(parsed_args.container, parsed_args.follow)
717
181
from .base import RunLauncher from .cli_api_run_launcher import CliApiRunLauncher
82
27
""" Option_merge uses this Path object to encapsulate the idea of a path and the converters that are available to use. We are able to use this to store a reference to the root of the configuration as well as whether the converters should be ignored or not. It's purpose is to behave like a string regardless of whether it is a string or a list of strings. """ from .joiner import dot_joiner, join from .not_found import NotFound class Path(object): """ Encapsulate a path; a root configuration; a list of converters; and whether the converters should be used or not A path may be just a string or a list of strings. """ @classmethod def convert( kls, path, configuration=None, converters=None, ignore_converters=None, joined=None ): """ Get us a Path object from this path If path is already a Path instance, it is returned as is. Otherwise, a joined version of the string is created and used, along with the other kwargs to this function, to produce a new Path instance """ path_type = type(path) if path_type is Path: return path else: joined = dot_joiner(path, item_type=path_type) return Path(path, configuration, converters, ignore_converters, joined=joined) def __init__( self, path, configuration=None, converters=None, ignore_converters=False, joined=None, joined_function=None, ): self.path = path self.path_type = type(self.path) self.path_is_string = self.path_type is str self._joined = joined self._joined_function = joined_function self.converters = converters self.configuration = configuration self.ignore_converters = ignore_converters def __unicode__(self): """alias for self.joined""" return self.joined() def __str__(self): """alias for self.joined""" return self.joined() def __nonzero__(self): """Whether we have any path or not""" return any(self.path) def __len__(self): """ The length of our path * If we have no path, then 0 * if path is a string, then 1 * if path is an array, then the length of the array """ if self.path_is_string: if self.path: return 1 else: return 0 else: if self.path_type in (list, tuple): if not any(item for item in self.path): return 0 return len(self.path) def __iter__(self): """Iterate through the parts of our path""" if self.path_is_string: if self.path: yield self.path else: for part in self.path: yield part def __repr__(self): return f"<Path({str(self)})>" def __eq__(self, other): """ Compare the joined version of this path and the joined version of the other path """ joined = self.joined() if not other and not joined: return True if other and joined: return dot_joiner(other) == self.joined() return False def __ne__(self, other): """Negation of whether other is equal to this path""" return not self.__eq__(other) def __add__(self, other): """Create a copy of this path joined with other""" if not other: return self.clone() else: return self.using(join(self, other)) def __hash__(self): """The hash of the joined version of this path""" return hash(self.joined()) def __getitem__(self, key): """ If the path is a string, treat it as a list of that one string, otherwise, treat path as it is and get the index of the path as specified by key """ path = self.path if self.path_is_string: path = [path] return path[key] def without(self, base): """Return a clone of this path without the base""" base_type = type(base) if base_type is not str: base = dot_joiner(base, base_type) if not self.startswith(base): raise NotFound() if self.path_is_string: path = self.path[len(base) :] while path and path[0] == ".": path = path[1:] return self.using(path, joined=path) else: if not base: res = [part for part in self.path] else: res = [] for part in self.path: if not base: res.append(part) continue part_type = type(part) if part_type is str: joined_part = part else: joined_part = dot_joiner(part, part_type) if base.startswith(joined_part): base = base[len(joined_part) :] while base and base[0] == ".": base = base[1:] elif joined_part.startswith(base): res.append(joined_part[len(base) :]) base = "" return self.using(res, joined=dot_joiner(res, list)) def prefixed(self, prefix): """Return a clone with this prefix to the path""" if not prefix: return self.clone() else: return self.using(join(prefix, self)) def first_part_is(self, key): """Return whether the first part of this path is this string""" if self.path_is_string: return self.path.startswith(str(key) + ".") if not self.path: return not bool(key) if self.path_type is list: return self.path[0] == key if self.path_type is Path: return self.path.first_part_is(key) return self.joined().startswith(str(key) + ".") def startswith(self, base): """Does the path start with this string?""" if self.path_is_string: return self.path.startswith(base) if not self.path: return not bool(base) if self.path_type is list and len(self.path) == 1: return self.path[0].startswith(base) return self.joined().startswith(base) def endswith(self, suffix): """Does the path end with this string?""" return self.joined().endswith(suffix) def using( self, path, configuration=None, converters=None, ignore_converters=False, joined=None ): """Return a clone of this path and override with provided values""" if configuration is None: configuration = self.configuration if converters is None: converters = self.converters if ( path == self.path and self.configuration is configuration and self.converters is converters and self.ignore_converters is ignore_converters ): return self joined_function = None if joined is None: if type(path) is Path: joined_function = lambda: dot_joiner(path.path, path.path_type) else: joined_function = lambda: dot_joiner(path) return self.__class__( path, configuration, converters, ignore_converters=ignore_converters, joined_function=joined_function, ) def clone(self): """Return a clone of this path with all the same values""" joined_function = lambda: dot_joiner(self.path, self.path_type) return self.__class__( self.path, self.configuration, self.converters, self.ignore_converters, joined_function=joined_function, ) def ignoring_converters(self, ignore_converters=True): """Return a clone of this path with ignore_converters set to True""" if self.ignore_converters == ignore_converters: return self return self.using(self.path, ignore_converters=ignore_converters, joined=self.joined()) def do_conversion(self, value): """ Do the conversion on some path if any conversion exists Return (converted, did_conversion) Where ``did_conversion`` is a boolean indicating whether a conversion took place. """ converter, found = self.find_converter() if not found: return value, False else: converted = converter(self, value) self.converters.done(self, converted) if hasattr(converted, "post_setup"): converted.post_setup() return converted, True def find_converter(self): """Find appropriate converter for this path""" if self.ignore_converters: return None, False return self.converters.matches(self) def converted(self): """Determine if this path has been converted""" if self.converters: return self.converters.converted(self) return False def converted_val(self): """Return the converted value for this path""" return self.converters.converted_val(self) def waiting(self): """Return whether we're waiting for this value""" return self.converters.waiting(self) def joined(self): """Return the dot_join of of the path""" joined = self._joined if self._joined is None and self._joined_function is not None: joined = self._joined = self._joined_function() if joined is None: if self.path_is_string: joined = self._joined = self.path else: joined = self._joined = dot_joiner(self.path, self.path_type) return joined
10,097
2,717
#******************************************************************************* # Copyright (c) 2015 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. #******************************************************************************/ import os import sys import requests import subprocess import signal import time import conftest from helpers.dbutils import CloudantDbUtils class AcmeAirUtils: """ Test AcmeAir app related functions """ _api_context_root = "/rest/api" _app_host = "http://localhost:9080" _test_properties = None FORM_CONTENT_TYPE = "application/x-www-form-urlencoded; charset=UTF-8" test_properties = conftest.test_properties() def __init__(self): try: acmeair_path = os.environ["ACMEAIR_HOME"] if os.path.exists(acmeair_path): print ("\nAcmeAir Nodejs app home: ", acmeair_path) self.acmehome = acmeair_path else: raise RuntimeError("Invalid AcmeAir Nodejs app home:", jarpath) except KeyError: raise RuntimeError("Environment variable ACMEAIR_HOME not set") if not all(x in ["cloudantusername", "cloudantpassword", "cloudanthost"] for x in self.test_properties): raise RuntimeError("test_properties does not contain all required cloudant properties") def start_acmeair(self): """ Set the required env vars for cloudant and start the AcmeAir app locally If app is already running, check if it's functioning """ app_status = self.is_acmeair_running(); if app_status == -1: raise RuntimeError("AcmeAir is already running but malfunctioning. Please shut it down.") elif app_status == 1: print ("AcmeAir app is already running, will not attempt to start\n") return cloudantUtils = CloudantDbUtils(self.test_properties) cloudantUtils.check_databases() # set the env vars required to start the app new_env = os.environ.copy() new_env["dbtype"] = "cloudant" new_env["CLOUDANT_URL"] = "https://{}:{}@{}".format( self.test_properties["cloudantusername"], self.test_properties["cloudantpassword"], self.test_properties["cloudanthost"]) # start the acmeair app os.chdir(self.acmehome) command = ["node", "app.js"] self.proc = subprocess.Popen(command, env=new_env, stdout=subprocess.PIPE, stderr=subprocess.PIPE) # wait at most 10 sec for app to come up timeout = time.time() + 10 while (True): if not self.is_acmeair_running() == 1: time.sleep(1) else: print ("\nAcemAir started!") break if time.time() > timeout: raise RuntimeError("Cannot connect to AcmeAir!") def stop_acmeair(self): """ Stop the AcmeAir App that was started by this util """ if hasattr(self, "proc"): os.kill(self.proc.pid, signal.SIGTERM) print ("AcmeAir is shutdown") def is_acmeair_running(self): """ Check if AcmeAir app is running Return 0: app is not running Return 1: app is running Return -1: app is running but malfunctioning, possibly because db were rebuilt when app was running """ r = requests.Session() url = "{}{}/{}".format( self._app_host, self._api_context_root, "config/countCustomers") try: response = r.get(url) if response.status_code == 200: status = 1 else: # happens when db were rebuilt while app is running status = -1 except: # happens when app is not running status = 0 return status def load_data(self, num_of_customers): """ Call the AcmeAir app REST API to populate with the given # of users """ cloudantUtils = CloudantDbUtils(self.test_properties) if cloudantUtils.get_doc_count("n_customer") > 0: raise RuntimeException("Test databases already contains unknown data so AcmeAir data loader will not run!") r = requests.Session() url = "{}{}/{}".format( self._app_host, self._api_context_root, "loader/load") if isinstance(num_of_customers, int): num_of_customers = str(num_of_customers) param = {"numCustomers" : num_of_customers} headers = { "Content-Type" : self.FORM_CONTENT_TYPE} print ("Start AcmeAir database loader with num_of_customers = ", num_of_customers) start_time = time.time() try: r.get(url, headers=headers, params=param) except requests.exceptions.ConnectionError: # the request aborts after 2 mins due to server timeout, wait until expected # of rows is reached cloudantUtils.wait_for_doc_count("n_customer", num_of_customers, int(num_of_customers) / 500) cloudantUtils.wait_for_doc_count("n_airportcodemapping", 14, 5) cloudantUtils.wait_for_doc_count("n_flightsegment", 395, 5) cloudantUtils.wait_for_doc_count("n_flight", 1971, 20) print ("Database load completed after {} mins\n".format(int(round((time.time() - start_time) / 60)))) def login(self, user): """ Create a user session for the given user. It's needed in order to book a flight. @return session ID """ r = requests.Session() url = "{}{}/{}".format( self._app_host, self._api_context_root, "login") payload = {"login" : user, "password" : "password"} headers = { "Content-Type" : self.FORM_CONTENT_TYPE} print ("Login as user: ", user) response = r.post(url, headers=headers, data=payload) if response.status_code == 200: # get session ID return response.cookies["sessionid"] else: raise RuntimeError(response.text) def book_flights(self, user, toFlightId, retFlightId): """ Login as the given user and booking flights. Set retFlightId=None if booking one way. """ r = requests.Session() url = "{}{}/{}".format( self._app_host, self._api_context_root, "bookings/bookflights") headers = { "Content-Type" : self.FORM_CONTENT_TYPE } payload = {"userid" : user, "toFlightId" : toFlightId} # see if it's round trip if retFlightId is None: payload["oneWayFlight"] = "true" else: payload["oneWayFlight"] = "false" payload["retFlightId"] = retFlightId # the request must include the cookie retrieved from login sessionId = self.login(user) cookies = { "sessionid" : sessionId, "loggedinuser" : user } print ("Book flight(s) " + str(payload)) response = r.post(url, headers=headers, data=payload, cookies=cookies) if response.status_code == 200: print ("\nFlight(s) booked: {}\n".format(response.text)) else: raise RuntimeError(response.text) def get_flightId_by_number(self, flightNum): """ Get the generated flight ID for the given flight number """ cloudantUtils = CloudantDbUtils(self.test_properties) url = "https://{}/{}".format( self.test_properties["cloudanthost"], "n_flight/_design/view/_search/n_flights?q=flightSegmentId:" + flightNum) param = {"q" : "flightSegmentId:" + flightNum} response = cloudantUtils.r.get(url, params=param) data = response.json() if int(data["total_rows"]) > 0: # just get one from the dict return data["rows"][0]["id"] else: raise RuntimeError("n_flights has no data for ", flightNum)
7,468
2,832
# https://www.hackerrank.com/challenges/py-collections-namedtuple/problem from collections import namedtuple if __name__ == '__main__': test_cases = int(input()) length = test_cases sum_marks = 0 colums = input().split() while(test_cases > 0): attributes = input().split() Student = namedtuple('Student', colums) s = Student(attributes[0], attributes[1], attributes[2], attributes[3]) sum_marks += int(s.MARKS) test_cases -= 1 print("{:.02f}".format(sum_marks / length))
596
203
import urllib from logging import Logger import re import requests from cloudshell.cm.customscript.domain.cancellation_sampler import CancellationSampler from cloudshell.cm.customscript.domain.script_file import ScriptFile class HttpAuth(object): def __init__(self, username, password): self.username = username self.password = password class ScriptDownloader(object): CHUNK_SIZE = 1024 * 1024 def __init__(self, logger, cancel_sampler): """ :type logger: Logger :type cancel_sampler: CancellationSampler """ self.logger = logger self.cancel_sampler = cancel_sampler self.filename_pattern = r'(?P<filename>^.*\.(sh|bash|ps1)$)' self.filename_patterns = { "content-disposition": "\s*((?i)inline|attachment|extension-token)\s*;\s*filename=" + self.filename_pattern, "x-artifactory-filename": self.filename_pattern } def download(self, url, auth): """ :type url: str :type auth: HttpAuth :rtype ScriptFile """ response = requests.get(url, auth=(auth.username, auth.password) if auth else None, stream=True) file_name = self._get_filename(response) file_txt = '' for chunk in response.iter_content(ScriptDownloader.CHUNK_SIZE): if chunk: file_txt += ''.join(chunk) self.cancel_sampler.throw_if_canceled() self._validate_response(response, file_txt) return ScriptFile(name=file_name, text=file_txt) def _validate_response(self, response, content): if response.status_code < 200 or response.status_code > 300: raise Exception('Failed to download script file: '+str(response.status_code)+' '+response.reason+ '. Please make sure the URL is valid, and the credentials are correct and necessary.') if content.lstrip('\n\r').lower().startswith('<!doctype html>'): raise Exception('Failed to download script file: url points to an html file') def _get_filename(self, response): file_name = None for header_value, pattern in self.filename_patterns.iteritems(): matching = re.match(pattern, response.headers.get(header_value, "")) if matching: file_name = matching.group('filename') break # fallback, couldn't find file name from header, get it from url if not file_name: file_name_from_url = urllib.unquote(response.url[response.url.rfind('/') + 1:]) matching = re.match(self.filename_pattern, file_name_from_url) if matching: file_name = matching.group('filename') if not file_name: raise Exception("Script file of supported types: '.sh', '.bash', '.ps1' was not found") return file_name.strip()
2,898
812
import numpy as np from abc import ABC class Dispatcher(ABC): """ This class describes a dispatcher for a transport service. The dispatcher is called to affect requests online or punctually. The Dispatcher class allows a complete specification (punctual and online) and separation (from the operator and the algorithms it uses) of the dispatching strategy. The parameters needed to initialise and run the dispatcher should be provided in the operator operationParameters attribute. """ #: json schema for the operation parameters SCHEMA = { "type": "object", "properties": {} } def __init__(self, simulation_model, operator, verb=False): """ Initialise the dispatcher and its algorithm. The operator's dispatcher is initialised only once. It is then called on various situations to realise a dispatch. :param simulation_model: SimulationModel :param operator: id of the operator of the dispatched service :param verb: verbose boolean """ #: simulation object self.sim = simulation_model #: transport operator id self.operator = operator #: operation parameters self.operationParameters = self.operator.operationParameters #: verbose option self.verb = verb #: dispatch algorithm self.algorithm = None self.init_algorithm() #: algorithm result self.result = None #: online request, in case of online dispatch self.online_request = None @property def name(self): return self.__class__.__name__ def init_algorithm(self): """ Initialise the algorithm's structure used by the dispatcher. """ def dispatch(self): """ Realise the complete dispatch process. """ # setup the algorithm and parameters self.setup_dispatch() # run the algorithm and store the result in punctual_result self.run_algorithm() # update the plannings according to the proposed solution self.update_from_solution() def setup_dispatch(self): """ Setup the dispatch with current simulation data. """ def run_algorithm(self): """ Run the algorithm on the current problem instance. """ def update_from_solution(self): """ Update the operator plannings based on the dispatch solution. """ # dispatching loop for punctual algorithms def dispatching_loop_(self): self.log_message("Dispatching loop not implemented", lvl=40) raise NotImplementedError # method for online dispatch of requests def online_dispatch(self, request): self.log_message("Online dispatch method not implemented", lvl=40) raise NotImplementedError # logs and trace def log_message(self, message, lvl=15): """ Log a message using the operator's dedicated method. :param message: :param lvl: """ if self.verb or lvl >= 30: # add the name of the dispatcher as a prefix message = "{} : {}".format(self.name, message) # log message using the operator method self.operator.log_message(message, lvl=lvl) # utils def compute_matrix_of(self, stop_points, dimension, mode): """ Compute the distance matrix (in the given dimension) between the given stop points, on the given topology graph. :param stop_points: list of stop point ids :param dimension: dimension of the distance to compute :param mode: travel mode between modes :return: matrix[i, j] = distance from stop i to stop j. """ matrix = np.zeros((len(stop_points), len(stop_points))) for i in range(len(stop_points)): origin = self.operator.stopPoints[stop_points[i]].position _, lengths = self.sim.environment.topologies[mode].dijkstra_shortest_path_and_length(origin, None, dimension) for j in range(len(stop_points)): matrix[i, j] = int(lengths[self.operator.stopPoints[stop_points[j]].position]) if dimension == "time": matrix = matrix.astype(int) return matrix
4,365
1,123
#!/usr/bin/env python2.7 # # courtesy of pjlao307 (https://github.com/pjlao307/) # this is just his original implementation but # in openpilot service form so it's always on # # with the highest bit rates, the video is approx. 0.5MB per second # the default value is set to 2.56Mbps = 0.32MB per second # import os import time import datetime dashcam_videos = '/sdcard/dashcam/' duration = 180 # max is 180 bit_rates = 2560000 # max is 4000000 max_size_per_file = bit_rates/8*duration # 2.56Mbps / 8 * 180 = 57.6MB per 180 seconds max_storage = max_size_per_file/duration*1024*1024*60*60*6 # 6 hours worth of footage (around 6.5gb) def dashcamd_thread(): if not os.path.exists(dashcam_videos): os.makedirs(dashcam_videos) while 1: now = datetime.datetime.now() file_name = now.strftime("%Y-%m-%d_%H-%M-%S") os.system("screenrecord --bit-rate %s --time-limit %s %s%s.mp4 &" % (bit_rates, duration, dashcam_videos, file_name)) # we should clean up files here if use too much spaces used_spaces = get_used_spaces() #print("used spaces: %s" % used_spaces) last_used_spaces = used_spaces # when used spaces greater than max available storage if used_spaces >= max_storage: # get all the files in the dashcam_videos path files = [f for f in sorted(os.listdir(dashcam_videos)) if os.path.isfile(dashcam_videos + f)] for file in files: # delete file one by one and once it has enough space for 1 video, we skip deleting if used_spaces - last_used_spaces < max_size_per_file: os.system("rm -fr %s" % (dashcam_videos + file)) #print("Cleaning") last_used_spaces = get_used_spaces() #print("last used spaces: %s" % last_used_spaces) else: break # we start the process 1 second before screenrecord ended # so we can make sure there are no missing footage time.sleep(duration-1) def get_used_spaces(): return sum(os.path.getsize(dashcam_videos + f) for f in os.listdir(dashcam_videos) if os.path.isfile(dashcam_videos + f)) def main(gctx=None): dashcamd_thread() if __name__ == "__main__": main()
2,147
786
from tests.base_test import BaseTest class FlaskEndpointsTest(BaseTest): def test_defects_endpoint_exists(self): with self.app_context(): response = self.app.get(r'/defects') self.assertEqual(response.status_code, 200) def test_defects_empty(self): with self.app_context(): response = self.app.get(r'/defects') self.assertEqual(response.json, {}) def test_popup_operational(self): with self.app_context(): response = self.app.get(r'/popup_operational_check') self.assertEqual(response.json, {}) self.assertEqual(response.status_code, 200)
666
214
from django.shortcuts import render from django.http import HttpResponse from rest_framework import viewsets, filters, generics from rest_framework.views import APIView from django_filters.rest_framework import DjangoFilterBackend from rest_framework.pagination import PageNumberPagination from cms.models import Page from cms.serializers import PageSerializer def cms_home(request): return HttpResponse("<h>Works</h1>") class PageViewSet(viewsets.ModelViewSet): serializer_class = PageSerializer queryset = Page.objects.all() filter_backends = [DjangoFilterBackend, filters.OrderingFilter] # pagination_class = StandardResultsSetPagination filterset_fields = ('title', 'parent', 'in_navigation', 'language', 'active', '_cached_url') ordering_fields = ('id', 'title', 'parent') ordering = 'title' def filter_queryset(self, queryset): queryset = super(PageViewSet, self).filter_queryset(queryset) return queryset.order_by('active')
989
282
# https://leetcode.com/problems/find-the-winner-of-the-circular-game/ class ListNode: def __init__(self, val=0, next=None, prev=None): self.val = val self.next = next self.prev = prev class Solution: def findTheWinner(self, n: int, k: int) -> int: if n == 1: return 1 # Model friends first_node = ListNode(1) last_node = first_node for i in range(2, n + 1): curr_node = ListNode(i, next=first_node, prev=last_node) last_node.next = curr_node last_node = curr_node first_node.prev = last_node # Simulate game curr_node = first_node nr_of_players = n k -= 1 # In every iteration, we are supposed to make k - 1 steps. while nr_of_players != 1: steps_to_make = k % nr_of_players # No need to run in circles. for _ in range(steps_to_make): curr_node = curr_node.next curr_node.prev.next, curr_node.next.prev, curr_node = ( curr_node.next, curr_node.prev, curr_node.next) nr_of_players -= 1 # We have the winner return curr_node.val
1,196
389
# -*- coding: utf-8 -*- # strings to recognize as NaN NULL = "null" INF = "∞" UNDEFINED = "�" null_values = [NULL, INF, UNDEFINED] GTF = "gtf" TAB = "tab" VCF = "vcf" string_aliases = ['string', 'char'] int_aliases = ['long', 'int', 'integer'] float_aliases = ['double', 'float'] bool_aliases = ['bool', 'boolean'] allowed_types = ['bed', 'tab'] COORDS_ZERO_BASED = '0-based' COORDS_ONE_BASED = '1-based' COORDS_DEFAULT = 'default' coordinate_systems = {COORDS_ZERO_BASED, COORDS_ONE_BASED, COORDS_DEFAULT} def get_parsing_function(type_string): if type_string in string_aliases: return str elif type_string in int_aliases: return int elif type_string in float_aliases: return float elif type_string in bool_aliases: return bool else: raise ValueError("This type is not supported") def get_type_name(type_class): if type_class == str: return "string" elif type_class == int: return "integer" elif type_class == float: return "double" elif type_class == bool: return 'bool' else: raise ValueError("This type is not supported") from .RegionParser import * from .Parsers import * from .MetadataParser import *
1,237
431
"""Support for safely atomically updating files This module provides tools for overwriting files in such a way that a reader will never see a partially written file. Portions borrowed from https://code.activestate.com/recipes/579097-safely-and-atomically-write-to-a-file/, also under the MIT license. """ __version__ = "1.0.1" from typing import Optional, Union, TextIO, BinaryIO, ContextManager import os import sys import stat import sys import tempfile import contextlib import subprocess from pwd import getpwnam from grp import getgrnam # Import os.replace if possible; otherwise emulate it as well as possible try: from os import replace # Python 3.3 and better. except ImportError: if sys.platform == 'win32': # This is definitely not atomic! # But it's how (for example) Mercurial does it, as of 2016-03-23 # https://selenic.com/repo/hg/file/tip/mercurial/windows.py def replace(source, destination): assert sys.platform == 'win32' try: os.rename(source, dest) except OSError as err: if err.winerr != 183: raise os.remove(dest) os.rename(source, dest) else: # Atomic on POSIX. Not sure about Cygwin, OS/2 or others. from os import rename as replace def current_umask(thread_safe: bool=True) -> int: """Makes a best attempt to determine the current umask value of the calling process in a safe way. Unfortunately, os.umask() is not threadsafe and poses a security risk, since there is no way to read the current umask without temporarily setting it to a new value, then restoring it, which will affect permissions on files created by other threads in this process during the time the umask is changed, or by any child processses that were forked during this time. On recent linux kernels (>= 4.1), the current umask can be read from /proc/self/status. On older systems, the simplest safe way is to spawn a shell and execute the 'umask' command. The shell will inherit the current process's umask, and will use the unsafe call, but it does so in a separate, single-threaded process, which makes it safe. Args: thread_safe: If False, allows the current umask to be determined in a potentially unsafe, but more efficient way. Should only be set to False if the caller can guarantee that there are no other threads running in the current process that might read or set the umask, create files, or spawn child processes. Default is True. Returns: int: The current process's umask value """ if not thread_safe: mask = os.umask(0o066) # 0o066 is arbitrary but poses the least security risk if there is a race. # WARNING: At this point, and other threads that create files, or spawn subprocesses that create files, # will be using an incorrect umask of 0o066, which denies all access to anyone but the owner. os.umask(mask) else: mask: Optional[int] = None try: with open('/proc/self/status') as fd: for line in fd: if line.startswith('Umask:'): mask = int(line[6:].strip(), 8) break except FileNotFoundError: pass except ValueError: pass if mask is None: # As a last resort, do the dangerous call under a forked, single-threaded subprocess. mask = int(subprocess.check_output('umask', shell=True).decode('utf-8').strip(), 8) return mask def normalize_uid(uid: Optional[Union[int, str]]) -> Optional[int]: """ Normalizes a posix user ID that may be expressed as: 1. An integer UID 2. A string containing a decimal UID 3. A string containing a valid posix username 4. None, which causes None to be returned Args: uid: An integer UID, a decimal string UID, a posix username, or None. Returns: Optional[int]: The integer UID corresponding to `uid`, or None if `uid` is None Raises: KeyError: A nondecimal string was provided and the posix username does not exist """ if not uid is None: try: uid = int(uid) return uid except ValueError: uid = getpwnam(uid).pw_uid return uid def normalize_gid(gid: Optional[Union[int, str]]) -> Optional[int]: """ Normalizes a posix group ID that may be expressed as: 1. An integer GID 2. A string containing a decimal GID 3. A string containing a valid posix group name 4. None, which causes None to be returned Args: gid: An integer GID, a decimal string GID, a poxix group name, or None. Returns: Optional[int]: The integer GID corresponding to `gid`, or None if `gid` is None Raises: KeyError: A nondecimal string was provided and the posix group name does not exist """ if not gid is None: try: gid = int(gid) return gid except ValueError: gid = getgrnam(gid).gr_gid return gid @contextlib.contextmanager def atomic_open( filename: str, mode: str='w', replace_perms: bool=False, effective_umask: Optional[int]=None, uid: Optional[Union[int, str]]=None, gid: Optional[Union[int, str]]=None, perms: Optional[int]=None, temp_file_base_name: Optional[str]=None, temp_file_suffix: str='.tmp', keep_temp_file_on_error: bool=False, buffering: int=-1, encoding: Optional[str]=None, errors: Optional[str]=None, newline: Optional[str]=None, ) -> ContextManager[Union[TextIO, BinaryIO]]: """Open a file for atomic create or overwrite, using a temporary file managed by a context. Args: filename: The final filename to create or overwrite. mode: The open mode, as defined for `open()`. Only 'w' and 'wb' are allowed. Default is 'w'. replace_perms: True if the file's UID, GID, and perms should be replaced even if the file already exists. Default is False. effective_umask: Optionally, a umask value to use for creation of a new file. If None, the current process's umask is use. If 0, none of the bits in `perms`will be masked. Any bits set to 1 will be masked off in the final file permissions if a new file is created. Ignored if `replace_perms` is False and a file already exists. Default is None. uid: If the file does not exist or `replace_perms` is True, the owner UID to use for the new file, or None to use the default UID. For convenience, a string containing the decimal UID or a username may be provided. Ignored if the file exists and `replace_perms` is False. Default is None. gid: If the file does not exist or `replace_perms` is True, the group GID to use for the new file, or None to use the default GID. For convenience, a string containing the decimal GID or a group name may be provided. Ignored if the file exists and `replace_perms` is False. Default is None. perms: If the file does not exist or `replace_perms` is True, the permission mode bits to use for the new file, or None to use the default mode bits (typically 0o664). Ignored if the file exists and `replace_perms` is False. Default is None. temp_file_base_name: The name to use for the temporary file (after a '.', a random string, and `temp_file_suffix` is appended), or None to use `filename` as the base name. Default is None. temp_file_suffix: A string to put at the end of the temp file name. Defaults to '.tmp' keep_temp_file_on_error: True if the temporary file should be retained if a failure occurs before it is fully written and atomically moved to the final `filename`. Default is False buffering: As defined for open() encoding: As defined for open() errors: How to handle encoding errors, as defined for open() newline: As defined for open() Returns: A `ContextManager` that will provide an open, writeable stream to a temporary file. On context exit without any exception raised, the temporary file will be renamed to atomically replace any previous file. Example: Update the linux hostname file atomically (must be run as root): ``` with atomic_open("/etc/hostname", 'w', perms=0o644) as f: f.write("myhostname") ``` The behavior of this function mimics `open(filename, 'w')` as nearly as possible, except that the target file will appear, to readers, to be atomically replaced at with-block exit time, and update will be cancelled if an exception is raised within the with-block. The context manager opens a temporary file for writing in the same directory as `filename`. On cleanly exiting the with-block, the temporary file is renamed to the given filename. If the original file already exists, it will be overwritten and any existing contents replaced. On POSIX systems, the rename is atomic. Other operating systems may not support atomic renames, in which case a best effort is made. The temporary file will be created in the same directory as `filename`, and will have the name `f"{base_name}.{random_8_chars}{temp_file_suffix}"`, where `base_name` is `temp_file_base_name` if provided, or `filename` otherwise. `random_8_chars` is a random 8-character string as generated by `tempfile.mkstemp()`. The temporary file naturally ceases to exists with successful completion of the with-block. If an uncaught exception occurs inside the with-block, the original file is left untouched. If `keep_temp_file_on_error` is True, the temporary file is also preserved, for diagnosis or data recovery. If False (the default), the temporary file is deleted on any catchable exception. In this case, any errors in deleting the temporary file are ignored. Of course, uncatchable exceptions or system failures may result in a leaked temporary file; it is the caller's responsibility to periodically clean up orphaned temporary files. By default, the temporary file is opened in text mode. To use binary mode, pass `mode='wb'` as an argument. On some operating systems, this makes no difference. Applications that use this function generally will want to set the final value of UID, GID, and permissions mode bits on the temporary file before it is renamed to the target filename. For this reason, additional optional arguments can be included to make this simple and seamless. If these arguments are omitted, the UID, GID, and permission mode bits of the target file will be as defined for `open()`. If `filename` exists and `replace_perms` is False, then the existing UID, GID, and permission mode bits of `filename` will be applied to the temporary file before it is written, and preserved when the temporary file replaces the original. If `filename` does not exist, or `replace_perms` is True, then `uid`, `gid`, and `perms` are used--if one or more of these is None, then defaults are used as with open(). Note that in the case of the perms bits, the defaults are as constrained by the current umask or parameter `effective_umask`--this is different than tempfile.mkstemp() which limits permissions to 0o600, but is consistent with the behavior of `open()`. In any case, the final UID, GID, and permissions mode bits have already been set appropriately on entry to the with-block, so the caller is free to make further adjustments to them before exiting the with-block, and their adjustments will not be overwritten. """ if not mode in ['w', 'wt', 'wb']: raise ValueError(f"atomic_open() does not support open mode \"{mode}\"") is_text = mode != 'wb' if temp_file_base_name is None: temp_file_base_name = filename pathname = os.path.realpath(filename) uid = normalize_uid(uid) gid = normalize_gid(gid) if not replace_perms: try: st = os.stat(pathname) uid = st.st_uid gid = st.st_gid perms = stat.S_IMODE(st.st_mode) # since we are using an existing file's perms, we never want to mask off permission bits. effective_umask = 0 except FileNotFoundError: pass if perms is None: perms = 0o666 # By default, newly created files will get all permissions (except execute) not excluded by umask if effective_umask is None: effective_umask = current_umask() perms = perms & (~effective_umask) dirpath = os.path.dirname(pathname) fd: Optional[int] = None temp_pathname: Optional[str] = None need_close = True need_delete = not keep_temp_file_on_error fd, temp_pathname = tempfile.mkstemp(suffix=temp_file_suffix, prefix=temp_file_base_name + '.', dir=dirpath, text=is_text) # Note that at this point the temporary file is owned by the calling user, with permission bits 600 as defined by `mkstemp`. # This is different than the default behavior for open() which uses default umask permissions, typically 664 for users and # 644 for root. Since we want to mimic open(), we will need to compensate for that. try: fctx = os.fdopen(fd, mode=mode, buffering=buffering, encoding=encoding, errors=errors, newline=newline) need_close = False # fd is now owned by fctx and will be closed on exit from the with block with fctx as f: # We update the owner, group, and permission mode bits before returning the context manager; this allows # the caller to make additional changes to these properties if desired before exiting the context. To avoid potential # permission errors, only make changes if they are necessary. st = os.stat(fd) current_perms = stat.S_IMODE(st.st_mode) current_uid = st.st_uid current_gid = st.st_gid if not (uid is None or uid == current_uid) or not (gid is None or gid == current_gid): os.fchown(fd, uid=(-1 if (uid is None or uid == current_uid) else uid), gid=(-1 if (gid is None or gid == current_gid) else gid)) if perms != current_perms: os.fchmod(fd, perms) yield f # return context manager to the caller, and wait until the context is closed # At this point the context returned to the caller has been closed # If we get here, the caller has cleanly closed the context without raising an exception, and the temporary file is complete and closed. # Perform an atomic rename (if possible). This will be atomic on POSIX systems, and Windows for Python 3.3 or higher. replace(temp_pathname, pathname) # The rename was successful, so there is no need to try to delete the temporary file. need_delete = False finally: try: if need_close: os.close(fd) finally: if need_delete: # Silently delete the temporary file. Suppress any errors (original exceptions will propagate), while passing signals, etc. try: os.unlink(temp_pathname) except Exception: pass
15,321
4,309
timely6_7_7 = 2972 untimely6_7_7 = 52 record7 = [[({'t4.110.126.0': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.110.126.0': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.110.126.0': [0.326, 1.6], 't2.110.126.0': [0.415, 1.6]}), 'osboxes-0'], [({'t5.113.126.1': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5.113.126.1': [0.475, 1.6]}), 'mec-3'], [({'t4.111.126.2': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.111.126.2': [0.337, 1.6]}), 'mec-1'], [({'t2.111.126.3': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.111.126.3': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.111.126.3': [0.384, 1.6], 't3.111.126.3': [0.436, 1.6]}), 'mec-1'], [({'t1.111.126.4': {'wcet': 3, 'period': 20, 'deadline': 15}, 't5.111.126.4': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3.111.126.4': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1.111.126.4': [0.442, 1.6], 't5.111.126.4': [0.456, 1.6], 't3.111.126.4': [0.426, 1.6]}), 'mec-1'], [({'t3.111.126.5': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3.111.126.5': [0.405, 1.6]}), 'mec-1'], [({'t4.113.126.6': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1.113.126.6': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4.113.126.6': [0.326, 1.6], 't1.113.126.6': [0.36, 1.6]}), 'mec-3'], [({'t2.111.126.7': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.111.126.7': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.111.126.7': [0.514, 1.6], 't3.111.126.7': [0.336, 1.6]}), 'mec-1'], [({'t2.112.126.8': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.112.126.8': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.112.126.8': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2.112.126.8': [0.325, 1.6], 't4.112.126.8': [0.53, 1.6], 't5.112.126.8': [0.302, 1.6]}), 'mec-2'], [({'t4.116.126.9': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.116.126.9': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.116.126.9': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.116.126.9': [0.329, 1.6], 't3.116.126.9': [0.319, 1.6], 't2.116.126.9': [0.462, 1.6]}), 'mec-6'], [({'t4.114.126.10': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.114.126.10': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.114.126.10': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.114.126.10': [0.324, 1.6], 't2.114.126.10': [0.361, 1.6], 't3.114.126.10': [0.466, 1.6]}), 'mec-4'], [({'t5.116.126.11': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2.116.126.11': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5.116.126.11': [0.412, 1.6], 't2.116.126.11': [0.356, 1.6]}), 'mec-6'], [({'t4.116.126.12': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.116.126.12': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2.116.126.12': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.116.126.12': [0.505, 1.6], 't5.116.126.12': [0.502, 1.6], 't2.116.126.12': [0.531, 1.6]}), 'mec-6'], [({'t2.113.126.13': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.113.126.13': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.113.126.13': [0.37, 1.6], 't4.113.126.13': [0.549, 1.6]}), 'mec-3'], [({'t2.114.126.14': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5.114.126.14': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4.114.126.14': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.114.126.14': [0.419, 1.6], 't5.114.126.14': [0.331, 1.6], 't4.114.126.14': [0.422, 1.6]}), 'mec-4'], [({'t2.114.126.15': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5.114.126.15': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3.114.126.15': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.114.126.15': [0.487, 1.6], 't5.114.126.15': [0.408, 1.6], 't3.114.126.15': [0.497, 1.6]}), 'mec-4'], [({'t5.112.126.16': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5.112.126.16': [0.461, 1.6]}), 'mec-2'], [({'t2.114.126.17': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.114.126.17': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.114.126.17': [0.342, 1.6], 't4.114.126.17': [0.382, 1.6]}), 'mec-4'], [({'t4.114.126.18': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.114.126.18': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.114.126.18': [0.31, 1.6], 't2.114.126.18': [0.459, 1.6]}), 'mec-4'], [({'t3.111.126.19': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3.111.126.19': [0.39, 1.6]}), 'mec-1'], [({'t4.114.126.20': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.114.126.20': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.114.126.20': [0.344, 1.6], 't5.114.126.20': [0.341, 1.6]}), 'mec-4'], [({'t2.111.126.21': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5.111.126.21': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2.111.126.21': [0.363, 1.6], 't5.111.126.21': [0.537, 1.6]}), 'mec-1'], [({'t5.115.126.22': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3.115.126.22': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5.115.126.22': [0.383, 1.6], 't3.115.126.22': [0.49, 1.6]}), 'mec-5'], [({'t2.116.126.23': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.116.126.23': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.116.126.23': [0.523, 1.6], 't3.116.126.23': [0.349, 1.6]}), 'mec-6'], [({'t3.111.126.24': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.111.126.24': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.111.126.24': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3.111.126.24': [0.302, 1.6], 't4.111.126.24': [0.457, 1.6], 't5.111.126.24': [0.369, 1.6]}), 'mec-1'], [({'t4.115.126.25': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.115.126.25': [0.368, 1.6]}), 'mec-5'], [({'t5.111.126.26': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2.111.126.26': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5.111.126.26': [0.457, 1.6], 't2.111.126.26': [0.331, 1.6]}), 'mec-1'], [({'t4.114.126.27': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.114.126.27': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.114.126.27': [0.342, 1.6], 't3.114.126.27': [0.306, 1.6]}), 'mec-4'], [({'t5.113.126.28': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4.113.126.28': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5.113.126.28': [0.327, 1.6], 't4.113.126.28': [0.355, 1.6]}), 'mec-3'], [({'t1.110.126.29': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3.110.126.29': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1.110.126.29': [0.352, 1.6], 't3.110.126.29': [0.362, 1.6]}), 'osboxes-0'], [({'t1.112.126.30': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2.112.126.30': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.112.126.30': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1.112.126.30': [0.356, 1.6], 't2.112.126.30': [0.311, 1.6], 't3.112.126.30': [0.524, 1.6]}), 'mec-2'], [({'t2.110.126.31': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.110.126.31': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.110.126.31': [0.4, 1.6], 't4.110.126.31': [0.509, 1.6]}), 'osboxes-0'], [({'t5.111.126.32': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1.111.126.32': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4.111.126.32': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5.111.126.32': [0.549, 1.6], 't1.111.126.32': [0.38, 1.6], 't4.111.126.32': [0.324, 1.6]}), 'mec-1'], [({'t2.110.126.33': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2.110.126.33': [0.304, 1.6]}), 'osboxes-0'], [({'t4.113.126.34': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.113.126.34': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.113.126.34': [0.334, 1.6], 't3.113.126.34': [0.389, 1.6]}), 'mec-3'], [({'t5.110.126.35': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2.110.126.35': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5.110.126.35': [0.483, 1.6], 't2.110.126.35': [0.508, 1.6]}), 'osboxes-0'], [({'t5.110.126.36': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2.110.126.36': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5.110.126.36': [0.336, 1.6], 't2.110.126.36': [0.479, 1.6]}), 'osboxes-0'], [({'t4.113.126.37': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.113.126.37': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.113.126.37': [0.495, 1.6], 't5.113.126.37': [0.32, 1.6]}), 'mec-3'], [({'t1.113.126.38': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4.113.126.38': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1.113.126.38': [0.313, 1.6], 't4.113.126.38': [0.486, 1.6]}), 'mec-3'], [({'t2.116.126.39': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.116.126.39': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.116.126.39': [0.326, 1.6], 't3.116.126.39': [0.504, 1.6]}), 'mec-6'], [({'t3.115.126.40': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.115.126.40': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3.115.126.40': [0.523, 1.6], 't2.115.126.40': [0.454, 1.6]}), 'mec-5'], [({'t2.113.126.41': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.113.126.41': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.113.126.41': [0.416, 1.6], 't3.113.126.41': [0.343, 1.6]}), 'mec-3'], [({'t3.110.126.42': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3.110.126.42': [0.446, 1.6]}), 'osboxes-0'], [({'t2.110.126.43': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1.110.126.43': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t2.110.126.43': [0.375, 1.6], 't1.110.126.43': [0.424, 1.6]}), 'osboxes-0'], [({'t5.111.126.44': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3.111.126.44': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5.111.126.44': [0.536, 1.6], 't3.111.126.44': [0.39, 1.6]}), 'mec-1'], [({'t4.116.126.45': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.116.126.45': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.116.126.45': [0.467, 1.6], 't5.116.126.45': [0.376, 1.6]}), 'mec-6'], [({'t4.111.126.46': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.111.126.46': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.111.126.46': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.111.126.46': [0.545, 1.6], 't2.111.126.46': [0.508, 1.6], 't3.111.126.46': [0.41, 1.6]}), 'mec-1'], [({'t2.111.126.47': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.111.126.47': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.111.126.47': [0.431, 1.6], 't3.111.126.47': [0.378, 1.6]}), 'mec-1'], [({'t5.111.126.48': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2.111.126.48': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5.111.126.48': [0.374, 1.6], 't2.111.126.48': [0.387, 1.6]}), 'mec-1'], [({'t4.110.126.49': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.110.126.49': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.110.126.49': [0.482, 1.6], 't2.110.126.49': [0.477, 1.6]}), 'osboxes-0'], [({'t2.110.126.50': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5.110.126.50': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2.110.126.50': [0.354, 1.6], 't5.110.126.50': [0.424, 1.6]}), 'osboxes-0'], [({'t2.110.126.51': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.110.126.51': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.110.126.51': [0.343, 1.6], 't3.110.126.51': [0.423, 1.6]}), 'osboxes-0'], [({'t2.112.126.52': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.112.126.52': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.112.126.52': [0.434, 1.6], 't4.112.126.52': [0.466, 1.6]}), 'mec-2'], [({'t4.114.126.53': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.114.126.53': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.114.126.53': [0.326, 1.6], 't2.114.126.53': [0.435, 1.6]}), 'mec-4'], [({'t4.110.126.54': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.110.126.54': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.110.126.54': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.110.126.54': [0.496, 1.6], 't2.110.126.54': [0.305, 1.6], 't3.110.126.54': [0.516, 1.6]}), 'osboxes-0'], [({'t5.112.126.55': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1.112.126.55': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t5.112.126.55': [0.539, 1.6], 't1.112.126.55': [0.499, 1.6]}), 'mec-2'], [({'t4.113.126.56': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1.113.126.56': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4.113.126.56': [0.423, 1.6], 't1.113.126.56': [0.39, 1.6]}), 'mec-3'], [({'t4.110.126.57': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.110.126.57': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5.110.126.57': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.110.126.57': [0.468, 1.6], 't2.110.126.57': [0.374, 1.6], 't5.110.126.57': [0.483, 1.6]}), 'osboxes-0'], [({'t2.115.126.58': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2.115.126.58': [0.312, 1.6]}), 'mec-5'], [({'t2.115.126.59': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.115.126.59': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.115.126.59': [0.406, 1.6], 't3.115.126.59': [0.479, 1.6]}), 'mec-5'], [({'t3.113.126.60': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3.113.126.60': [0.429, 1.6]}), 'mec-3'], [({'t2.115.126.61': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.115.126.61': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.115.126.61': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.115.126.61': [0.526, 1.6], 't4.115.126.61': [0.536, 1.6], 't3.115.126.61': [0.509, 1.6]}), 'mec-5'], [({'t3.111.126.62': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.111.126.62': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.111.126.62': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.111.126.62': [0.399, 1.6], 't2.111.126.62': [0.362, 1.6], 't4.111.126.62': [0.491, 1.6]}), 'mec-1'], [({'t5.112.126.63': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2.112.126.63': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.112.126.63': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5.112.126.63': [0.389, 1.6], 't2.112.126.63': [0.475, 1.6], 't4.112.126.63': [0.507, 1.6]}), 'mec-2'], [({'t4.112.126.64': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.112.126.64': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.112.126.64': [0.3, 1.6], 't3.112.126.64': [0.31, 1.6]}), 'mec-2'], [({'t4.115.126.65': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.115.126.65': [0.547, 1.6]}), 'mec-5'], [({'t1.114.126.66': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4.114.126.66': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1.114.126.66': [0.482, 1.6], 't4.114.126.66': [0.456, 1.6]}), 'mec-4'], [({'t4.112.126.67': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.112.126.67': [0.348, 1.6]}), 'mec-2'], [({'t4.116.126.68': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.116.126.68': [0.305, 1.6]}), 'mec-6'], [({'t5.112.126.69': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4.112.126.69': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5.112.126.69': [0.309, 1.6], 't4.112.126.69': [0.474, 1.6]}), 'mec-2'], [({'t4.111.126.70': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.111.126.70': [0.338, 1.6]}), 'mec-1'], [({'t5.115.126.71': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2.115.126.71': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5.115.126.71': [0.496, 1.6], 't2.115.126.71': [0.47, 1.6]}), 'mec-5'], [({'t4.111.126.72': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.111.126.72': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.111.126.72': [0.385, 1.6], 't3.111.126.72': [0.465, 1.6]}), 'mec-1'], [({'t4.116.126.73': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.116.126.73': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.116.126.73': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.116.126.73': [0.542, 1.6], 't3.116.126.73': [0.456, 1.6], 't2.116.126.73': [0.392, 1.6]}), 'mec-6'], [({'t5.110.126.74': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1.110.126.74': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t5.110.126.74': [0.486, 1.6], 't1.110.126.74': [0.496, 1.6]}), 'osboxes-0'], [({'t3.114.126.75': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3.114.126.75': [0.33, 1.6]}), 'mec-4'], [({'t2.116.126.76': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.116.126.76': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.116.126.76': [0.455, 1.6], 't3.116.126.76': [0.308, 1.6]}), 'mec-6'], [({'t3.116.126.77': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.116.126.77': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.116.126.77': [0.368, 1.6], 't4.116.126.77': [0.532, 1.6]}), 'mec-6'], [({'t2.111.126.78': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.111.126.78': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.111.126.78': [0.394, 1.6], 't3.111.126.78': [0.406, 1.6]}), 'mec-1'], [({'t2.115.126.79': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.115.126.79': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.115.126.79': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.115.126.79': [0.342, 1.6], 't4.115.126.79': [0.401, 1.6], 't3.115.126.79': [0.432, 1.6]}), 'mec-5'], [({'t4.114.126.80': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.114.126.80': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5.114.126.80': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.114.126.80': [0.467, 1.6], 't3.114.126.80': [0.34, 1.6], 't5.114.126.80': [0.34, 1.6]}), 'mec-4'], [({'t2.112.126.81': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.112.126.81': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.112.126.81': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2.112.126.81': [0.32, 1.6], 't4.112.126.81': [0.313, 1.6], 't5.112.126.81': [0.317, 1.6]}), 'mec-2'], [({'t4.111.126.82': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.111.126.82': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.111.126.82': [0.435, 1.6], 't3.111.126.82': [0.375, 1.6]}), 'mec-1'], [({'t3.116.126.83': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.116.126.83': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3.116.126.83': [0.314, 1.6], 't2.116.126.83': [0.361, 1.6]}), 'mec-6'], [({'t4.113.126.84': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.113.126.84': [0.534, 1.6]}), 'mec-3'], [({'t3.114.126.85': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.114.126.85': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3.114.126.85': [0.421, 1.6], 't2.114.126.85': [0.503, 1.6]}), 'mec-4'], [({'t4.115.126.86': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1.115.126.86': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2.115.126.86': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.115.126.86': [0.322, 1.6], 't1.115.126.86': [0.472, 1.6], 't2.115.126.86': [0.368, 1.6]}), 'mec-5'], [({'t3.110.126.87': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3.110.126.87': [0.332, 1.6]}), 'osboxes-0'], [({'t3.110.126.88': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.110.126.88': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3.110.126.88': [0.337, 1.6], 't2.110.126.88': [0.303, 1.6]}), 'osboxes-0'], [({'t1.110.126.89': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4.110.126.89': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1.110.126.89': [0.427, 1.6], 't4.110.126.89': [0.38, 1.6]}), 'osboxes-0'], [({'t4.111.126.90': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.111.126.90': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.111.126.90': [0.344, 1.6], 't5.111.126.90': [0.376, 1.6]}), 'mec-1'], [({'t4.110.126.91': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.110.126.91': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.110.126.91': [0.515, 1.6], 't5.110.126.91': [0.308, 1.6]}), 'osboxes-0'], [({'t5.115.126.92': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1.115.126.92': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t5.115.126.92': [0.541, 1.6], 't1.115.126.92': [0.311, 1.6]}), 'mec-5'], [({'t4.110.126.93': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.110.126.93': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.110.126.93': [0.512, 1.6], 't5.110.126.93': [0.304, 1.6]}), 'osboxes-0'], [({'t3.115.126.94': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.115.126.94': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.115.126.94': [0.389, 1.6], 't4.115.126.94': [0.473, 1.6]}), 'mec-5'], [({'t4.113.126.95': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1.113.126.95': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3.113.126.95': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.113.126.95': [0.42, 1.6], 't1.113.126.95': [0.382, 1.6], 't3.113.126.95': [0.305, 1.6]}), 'mec-3'], [({'t4.113.126.96': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.113.126.96': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.113.126.96': [0.368, 1.6], 't5.113.126.96': [0.472, 1.6]}), 'mec-3'], [({'t2.111.126.97': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5.111.126.97': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2.111.126.97': [0.483, 1.6], 't5.111.126.97': [0.359, 1.6]}), 'mec-1'], [({'t2.111.126.98': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2.111.126.98': [0.482, 1.6]}), 'mec-1'], [({'t2.114.126.99': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5.114.126.99': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3.114.126.99': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.114.126.99': [0.326, 1.6], 't5.114.126.99': [0.305, 1.6], 't3.114.126.99': [0.353, 1.6]}), 'mec-4'], [({'t2.114.126.100': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.114.126.100': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.114.126.100': [0.409, 1.6], 't4.114.126.100': [0.43, 1.6]}), 'mec-4'], [({'t1.112.126.101': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2.112.126.101': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.112.126.101': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1.112.126.101': [0.333, 1.6], 't2.112.126.101': [0.547, 1.6], 't4.112.126.101': [0.443, 1.6]}), 'mec-2'], [({'t3.116.126.102': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.116.126.102': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.116.126.102': [0.363, 1.6], 't4.116.126.102': [0.313, 1.6]}), 'mec-6'], [({'t4.112.126.103': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.112.126.103': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.112.126.103': [0.454, 1.6], 't5.112.126.103': [0.349, 1.6]}), 'mec-2'], [({'t4.110.126.104': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.110.126.104': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.110.126.104': [0.349, 1.6], 't3.110.126.104': [0.36, 1.6]}), 'osboxes-0'], [({'t3.111.126.105': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3.111.126.105': [0.458, 1.6]}), 'mec-1'], [({'t2.111.126.106': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5.111.126.106': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2.111.126.106': [0.343, 1.6], 't5.111.126.106': [0.453, 1.6]}), 'mec-1'], [({'t4.116.126.107': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.116.126.107': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.116.126.107': [0.339, 1.6], 't5.116.126.107': [0.451, 1.6]}), 'mec-6'], [({'t4.114.126.108': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.114.126.108': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2.114.126.108': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.114.126.108': [0.453, 1.6], 't5.114.126.108': [0.341, 1.6], 't2.114.126.108': [0.328, 1.6]}), 'mec-4'], [({'t2.111.126.109': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.111.126.109': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.111.126.109': [0.38, 1.6], 't4.111.126.109': [0.376, 1.6]}), 'mec-1'], [({'t2.112.126.110': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.112.126.110': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.112.126.110': [0.481, 1.6], 't4.112.126.110': [0.343, 1.6]}), 'mec-2'], [({'t3.111.126.111': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.111.126.111': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.111.126.111': [0.302, 1.6], 't4.111.126.111': [0.455, 1.6]}), 'mec-1'], [({'t5.110.126.112': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4.110.126.112': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.110.126.112': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5.110.126.112': [0.526, 1.6], 't4.110.126.112': [0.534, 1.6], 't3.110.126.112': [0.357, 1.6]}), 'osboxes-0'], [({'t4.111.126.113': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.111.126.113': [0.442, 1.6]}), 'mec-1'], [({'t4.110.126.114': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.110.126.114': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.110.126.114': [0.317, 1.6], 't5.110.126.114': [0.482, 1.6]}), 'osboxes-0'], [({'t4.116.126.115': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.116.126.115': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.116.126.115': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.116.126.115': [0.397, 1.6], 't3.116.126.115': [0.539, 1.6], 't2.116.126.115': [0.355, 1.6]}), 'mec-6'], [({'t1.116.126.116': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2.116.126.116': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.116.126.116': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1.116.126.116': [0.394, 1.6], 't2.116.126.116': [0.544, 1.6], 't3.116.126.116': [0.429, 1.6]}), 'mec-6'], [({'t2.116.126.117': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2.116.126.117': [0.459, 1.6]}), 'mec-6'], [({'t1.114.126.118': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2.114.126.118': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.114.126.118': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1.114.126.118': [0.301, 1.6], 't2.114.126.118': [0.396, 1.6], 't4.114.126.118': [0.345, 1.6]}), 'mec-4'], [({'t1.112.126.119': {'wcet': 3, 'period': 20, 'deadline': 15}, 't5.112.126.119': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t1.112.126.119': [0.471, 1.6], 't5.112.126.119': [0.41, 1.6]}), 'mec-2'], [({'t3.114.126.120': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.114.126.120': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.114.126.120': [0.527, 1.6], 't4.114.126.120': [0.434, 1.6]}), 'mec-4'], [({'t3.116.126.121': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.116.126.121': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.116.126.121': [0.334, 1.6], 't4.116.126.121': [0.408, 1.6]}), 'mec-6'], [({'t2.116.126.122': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.116.126.122': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.116.126.122': [0.506, 1.6], 't4.116.126.122': [0.451, 1.6]}), 'mec-6'], [({'t3.110.126.123': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3.110.126.123': [0.371, 1.6]}), 'osboxes-0'], [({'t3.110.126.124': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.110.126.124': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3.110.126.124': [0.538, 1.6], 't2.110.126.124': [0.441, 1.6]}), 'osboxes-0'], [({'t2.116.126.125': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2.116.126.125': [0.494, 1.6]}), 'mec-6'], [({'t3.114.126.126': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.114.126.126': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.114.126.126': [0.486, 1.6], 't4.114.126.126': [0.458, 1.6]}), 'mec-4'], [({'t2.110.126.127': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5.110.126.127': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2.110.126.127': [0.542, 1.6], 't5.110.126.127': [0.459, 1.6]}), 'osboxes-0'], [({'t1.110.126.128': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2.110.126.128': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.110.126.128': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1.110.126.128': [0.536, 1.6], 't2.110.126.128': [0.336, 1.6], 't4.110.126.128': [0.33, 1.6]}), 'osboxes-0'], [({'t4.111.126.129': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.111.126.129': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.111.126.129': [0.334, 1.6], 't3.111.126.129': [0.386, 1.6]}), 'mec-1'], [({'t5.116.126.130': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2.116.126.130': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5.116.126.130': [0.357, 1.6], 't2.116.126.130': [0.332, 1.6]}), 'mec-6'], [({'t4.115.126.131': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.115.126.131': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.115.126.131': [0.499, 1.6], 't3.115.126.131': [0.335, 1.6]}), 'mec-5'], [({'t5.114.126.132': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3.114.126.132': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.114.126.132': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5.114.126.132': [0.493, 1.6], 't3.114.126.132': [0.433, 1.6], 't4.114.126.132': [0.512, 1.6]}), 'mec-4'], [({'t3.112.126.133': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.112.126.133': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.112.126.133': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.112.126.133': [0.33, 1.6], 't2.112.126.133': [0.485, 1.6], 't4.112.126.133': [0.493, 1.6]}), 'mec-2'], [({'t4.116.126.134': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.116.126.134': [0.345, 1.6]}), 'mec-6'], [({'t4.114.126.135': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1.114.126.135': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3.114.126.135': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.114.126.135': [0.46, 1.6], 't1.114.126.135': [0.438, 1.6], 't3.114.126.135': [0.471, 1.6]}), 'mec-4'], [({'t3.114.126.136': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.114.126.136': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.114.126.136': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.114.126.136': [0.374, 1.6], 't2.114.126.136': [0.303, 1.6], 't4.114.126.136': [0.439, 1.6]}), 'mec-4'], [({'t4.116.126.137': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.116.126.137': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1.116.126.137': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4.116.126.137': [0.482, 1.6], 't5.116.126.137': [0.363, 1.6], 't1.116.126.137': [0.491, 1.6]}), 'mec-6'], [({'t4.114.126.138': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.114.126.138': [0.533, 1.6]}), 'mec-4'], [({'t5.112.126.139': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3.112.126.139': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5.112.126.139': [0.506, 1.6], 't3.112.126.139': [0.325, 1.6]}), 'mec-2'], [({'t3.113.126.140': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5.113.126.140': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4.113.126.140': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.113.126.140': [0.472, 1.6], 't5.113.126.140': [0.315, 1.6], 't4.113.126.140': [0.433, 1.6]}), 'mec-3'], [({'t3.111.126.141': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.111.126.141': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.111.126.141': [0.528, 1.6], 't4.111.126.141': [0.383, 1.6]}), 'mec-1'], [({'t3.115.126.142': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3.115.126.142': [0.451, 1.6]}), 'mec-5'], [({'t2.114.126.143': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.114.126.143': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.114.126.143': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.114.126.143': [0.419, 1.6], 't3.114.126.143': [0.518, 1.6], 't4.114.126.143': [0.325, 1.6]}), 'mec-4'], [({'t4.112.126.144': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.112.126.144': [0.405, 1.6]}), 'mec-2'], [({'t3.110.126.145': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.110.126.145': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.110.126.145': [0.477, 1.6], 't4.110.126.145': [0.342, 1.6]}), 'osboxes-0'], [({'t2.110.126.146': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.110.126.146': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.110.126.146': [0.528, 1.6], 't4.110.126.146': [0.433, 1.6]}), 'osboxes-0'], [({'t4.116.126.147': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.116.126.147': [0.308, 1.6]}), 'mec-6'], [({'t5.115.126.148': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3.115.126.148': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5.115.126.148': [0.41, 1.6], 't3.115.126.148': [0.346, 1.6]}), 'mec-5'], [({'t5.110.126.149': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2.110.126.149': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.110.126.149': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5.110.126.149': [0.466, 1.6], 't2.110.126.149': [0.329, 1.6], 't4.110.126.149': [0.338, 1.6]}), 'osboxes-0'], [({'t4.116.126.150': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.116.126.150': [0.44, 1.6]}), 'mec-6'], [({'t5.115.126.151': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2.115.126.151': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5.115.126.151': [0.314, 1.6], 't2.115.126.151': [0.357, 1.6]}), 'mec-5'], [({'t4.115.126.152': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.115.126.152': [0.52, 1.6]}), 'mec-5'], [({'t2.114.126.153': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.114.126.153': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.114.126.153': [0.496, 1.6], 't4.114.126.153': [0.46, 1.6]}), 'mec-4'], [({'t4.115.126.154': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.115.126.154': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.115.126.154': [0.51, 1.6], 't2.115.126.154': [0.462, 1.6]}), 'mec-5'], [({'t2.114.126.155': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.114.126.155': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.114.126.155': [0.43, 1.6], 't4.114.126.155': [0.35, 1.6]}), 'mec-4'], [({'t5.114.126.156': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1.114.126.156': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t5.114.126.156': [0.536, 1.6], 't1.114.126.156': [0.541, 1.6]}), 'mec-4'], [({'t4.110.126.157': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1.110.126.157': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4.110.126.157': [0.45, 1.6], 't1.110.126.157': [0.433, 1.6]}), 'osboxes-0'], [({'t3.112.126.158': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5.112.126.158': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2.112.126.158': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3.112.126.158': [0.472, 1.6], 't5.112.126.158': [0.504, 1.6], 't2.112.126.158': [0.483, 1.6]}), 'mec-2'], [({'t4.112.126.159': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.112.126.159': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.112.126.159': [0.447, 1.6], 't3.112.126.159': [0.362, 1.6]}), 'mec-2'], [({'t1.113.126.160': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4.113.126.160': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.113.126.160': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t1.113.126.160': [0.39, 1.6], 't4.113.126.160': [0.371, 1.6], 't5.113.126.160': [0.477, 1.6]}), 'mec-3'], [({'t1.116.126.161': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3.116.126.161': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.116.126.161': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t1.116.126.161': [0.431, 1.6], 't3.116.126.161': [0.537, 1.6], 't2.116.126.161': [0.308, 1.6]}), 'mec-6'], [({'t4.112.126.162': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.112.126.162': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.112.126.162': [0.397, 1.6], 't5.112.126.162': [0.394, 1.6]}), 'mec-2'], [({'t5.113.126.163': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5.113.126.163': [0.379, 1.6]}), 'mec-3'], [({'t4.113.126.164': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.113.126.164': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.113.126.164': [0.311, 1.6], 't5.113.126.164': [0.476, 1.6]}), 'mec-3'], [({'t2.110.126.165': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.110.126.165': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.110.126.165': [0.383, 1.6], 't3.110.126.165': [0.543, 1.6]}), 'osboxes-0'], [({'t5.111.126.166': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3.111.126.166': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5.111.126.166': [0.41, 1.6], 't3.111.126.166': [0.485, 1.6]}), 'mec-1'], [({'t2.114.126.167': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5.114.126.167': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2.114.126.167': [0.493, 1.6], 't5.114.126.167': [0.415, 1.6]}), 'mec-4'], [({'t4.116.126.168': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.116.126.168': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.116.126.168': [0.519, 1.6], 't3.116.126.168': [0.423, 1.6]}), 'mec-6'], [({'t3.115.126.169': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.115.126.169': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.115.126.169': [0.505, 1.6], 't4.115.126.169': [0.544, 1.6]}), 'mec-5'], [({'t3.110.126.170': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.110.126.170': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5.110.126.170': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3.110.126.170': [0.356, 1.6], 't2.110.126.170': [0.47, 1.6], 't5.110.126.170': [0.515, 1.6]}), 'osboxes-0'], [({'t2.113.126.171': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.113.126.171': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.113.126.171': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.113.126.171': [0.43, 1.6], 't4.113.126.171': [0.311, 1.6], 't3.113.126.171': [0.536, 1.6]}), 'mec-3'], [({'t4.116.126.172': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.116.126.172': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1.116.126.172': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4.116.126.172': [0.436, 1.6], 't5.116.126.172': [0.376, 1.6], 't1.116.126.172': [0.39, 1.6]}), 'mec-6'], [({'t2.111.126.173': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5.111.126.173': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1.111.126.173': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t2.111.126.173': [0.428, 1.6], 't5.111.126.173': [0.325, 1.6], 't1.111.126.173': [0.506, 1.6]}), 'mec-1'], [({'t2.115.126.174': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2.115.126.174': [0.388, 1.6]}), 'mec-5'], [({'t5.115.126.175': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3.115.126.175': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.115.126.175': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5.115.126.175': [0.528, 1.6], 't3.115.126.175': [0.379, 1.6], 't4.115.126.175': [0.361, 1.6]}), 'mec-5'], [({'t4.112.126.176': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.112.126.176': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.112.126.176': [0.31, 1.6], 't2.112.126.176': [0.326, 1.6]}), 'mec-2'], [({'t3.115.126.177': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5.115.126.177': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3.115.126.177': [0.348, 1.6], 't5.115.126.177': [0.537, 1.6]}), 'mec-5'], [({'t4.116.126.178': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.116.126.178': [0.488, 1.6]}), 'mec-6'], [({'t4.111.126.179': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.111.126.179': [0.539, 1.6]}), 'mec-1'], [({'t2.116.126.180': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.116.126.180': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.116.126.180': [0.312, 1.6], 't3.116.126.180': [0.491, 1.6]}), 'mec-6'], [({'t3.110.126.181': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.110.126.181': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.110.126.181': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3.110.126.181': [0.428, 1.6], 't4.110.126.181': [0.499, 1.6], 't2.110.126.181': [0.383, 1.6]}), 'osboxes-0'], [({'t2.115.126.182': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5.115.126.182': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2.115.126.182': [0.417, 1.6], 't5.115.126.182': [0.422, 1.6]}), 'mec-5'], [({'t4.110.126.183': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.110.126.183': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.110.126.183': [0.481, 1.6], 't3.110.126.183': [0.356, 1.6]}), 'osboxes-0'], [({'t4.112.126.184': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.112.126.184': [0.374, 1.6]}), 'mec-2'], [({'t4.115.126.185': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.115.126.185': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.115.126.185': [0.307, 1.6], 't3.115.126.185': [0.414, 1.6]}), 'mec-5'], [({'t2.112.126.186': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.112.126.186': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.112.126.186': [0.411, 1.6], 't4.112.126.186': [0.368, 1.6]}), 'mec-2'], [({'t3.112.126.187': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.112.126.187': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3.112.126.187': [0.539, 1.6], 't2.112.126.187': [0.372, 1.6]}), 'mec-2'], [({'t4.114.126.188': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1.114.126.188': {'wcet': 3, 'period': 20, 'deadline': 15}, 't5.114.126.188': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.114.126.188': [0.347, 1.6], 't1.114.126.188': [0.437, 1.6], 't5.114.126.188': [0.392, 1.6]}), 'mec-4'], [({'t4.115.126.189': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.115.126.189': [0.443, 1.6]}), 'mec-5'], [({'t3.116.126.190': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3.116.126.190': [0.44, 1.6]}), 'mec-6'], [({'t3.116.126.191': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.116.126.191': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.116.126.191': [0.353, 1.6], 't4.116.126.191': [0.319, 1.6]}), 'mec-6'], [({'t3.114.126.192': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3.114.126.192': [0.46, 1.6]}), 'mec-4'], [({'t3.110.126.193': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.110.126.193': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.110.126.193': [0.393, 1.6], 't4.110.126.193': [0.408, 1.6]}), 'osboxes-0'], [({'t3.112.126.194': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5.112.126.194': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3.112.126.194': [0.547, 1.6], 't5.112.126.194': [0.475, 1.6]}), 'mec-2'], [({'t5.113.126.195': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2.113.126.195': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5.113.126.195': [0.532, 1.6], 't2.113.126.195': [0.534, 1.6]}), 'mec-3'], [({'t3.116.126.196': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.116.126.196': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.116.126.196': [0.446, 1.6], 't4.116.126.196': [0.377, 1.6]}), 'mec-6'], [({'t4.116.126.197': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.116.126.197': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.116.126.197': [0.494, 1.6], 't2.116.126.197': [0.365, 1.6]}), 'mec-6'], [({'t3.111.126.198': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.111.126.198': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.111.126.198': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.111.126.198': [0.317, 1.6], 't2.111.126.198': [0.308, 1.6], 't4.111.126.198': [0.454, 1.6]}), 'mec-1'], [({'t5.113.126.199': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5.113.126.199': [0.516, 1.6]}), 'mec-3'], [({'t3.116.126.200': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5.116.126.200': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4.116.126.200': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.116.126.200': [0.541, 1.6], 't5.116.126.200': [0.523, 1.6], 't4.116.126.200': [0.459, 1.6]}), 'mec-6'], [({'t4.116.126.201': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.116.126.201': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.116.126.201': [0.328, 1.6], 't3.116.126.201': [0.503, 1.6]}), 'mec-6'], [({'t2.113.126.202': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5.113.126.202': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4.113.126.202': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.113.126.202': [0.323, 1.6], 't5.113.126.202': [0.46, 1.6], 't4.113.126.202': [0.336, 1.6]}), 'mec-3'], [({'t4.111.126.203': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.111.126.203': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.111.126.203': [0.484, 1.6], 't3.111.126.203': [0.334, 1.6]}), 'mec-1'], [({'t4.113.126.204': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.113.126.204': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.113.126.204': [0.424, 1.6], 't3.113.126.204': [0.311, 1.6]}), 'mec-3'], [({'t3.114.126.205': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5.114.126.205': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2.114.126.205': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3.114.126.205': [0.402, 1.6], 't5.114.126.205': [0.45, 1.6], 't2.114.126.205': [0.309, 1.6]}), 'mec-4'], [({'t2.111.126.206': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.111.126.206': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.111.126.206': [0.358, 1.6], 't4.111.126.206': [0.443, 1.6]}), 'mec-1'], [({'t4.113.126.207': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.113.126.207': [0.517, 1.6]}), 'mec-3'], [({'t3.113.126.208': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.113.126.208': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.113.126.208': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.113.126.208': [0.437, 1.6], 't2.113.126.208': [0.373, 1.6], 't4.113.126.208': [0.482, 1.6]}), 'mec-3'], [({'t5.116.126.209': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3.116.126.209': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5.116.126.209': [0.377, 1.6], 't3.116.126.209': [0.499, 1.6]}), 'mec-6'], [({'t4.114.126.210': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.114.126.210': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.114.126.210': [0.392, 1.6], 't5.114.126.210': [0.484, 1.6]}), 'mec-4'], [({'t4.116.126.211': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.116.126.211': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.116.126.211': [0.368, 1.6], 't3.116.126.211': [0.336, 1.6]}), 'mec-6'], [({'t1.113.126.212': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4.113.126.212': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1.113.126.212': [0.369, 1.6], 't4.113.126.212': [0.388, 1.6]}), 'mec-3'], [({'t4.111.126.213': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.111.126.213': [0.448, 1.6]}), 'mec-1'], [({'t5.115.126.214': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3.115.126.214': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5.115.126.214': [0.381, 1.6], 't3.115.126.214': [0.512, 1.6]}), 'mec-5'], [({'t5.113.126.215': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4.113.126.215': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5.113.126.215': [0.48, 1.6], 't4.113.126.215': [0.456, 1.6]}), 'mec-3'], [({'t3.114.126.216': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.114.126.216': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5.114.126.216': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3.114.126.216': [0.481, 1.6], 't2.114.126.216': [0.424, 1.6], 't5.114.126.216': [0.442, 1.6]}), 'mec-4'], [({'t2.112.126.217': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.112.126.217': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.112.126.217': [0.411, 1.6], 't3.112.126.217': [0.334, 1.6]}), 'mec-2'], [({'t4.115.126.218': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.115.126.218': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.115.126.218': [0.389, 1.6], 't5.115.126.218': [0.373, 1.6]}), 'mec-5'], [({'t2.111.126.219': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.111.126.219': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.111.126.219': [0.312, 1.6], 't3.111.126.219': [0.332, 1.6]}), 'mec-1'], [({'t3.116.126.220': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.116.126.220': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.116.126.220': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3.116.126.220': [0.353, 1.6], 't4.116.126.220': [0.337, 1.6], 't2.116.126.220': [0.519, 1.6]}), 'mec-6'], [({'t2.113.126.221': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.113.126.221': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.113.126.221': [0.43, 1.6], 't3.113.126.221': [0.419, 1.6]}), 'mec-3'], [({'t2.115.126.222': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2.115.126.222': [0.451, 1.6]}), 'mec-5'], [({'t4.112.126.223': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.112.126.223': [0.423, 1.6]}), 'mec-2'], [({'t3.113.126.224': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.113.126.224': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3.113.126.224': [0.485, 1.6], 't2.113.126.224': [0.388, 1.6]}), 'mec-3'], [({'t3.111.126.225': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5.111.126.225': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3.111.126.225': [0.373, 1.6], 't5.111.126.225': [0.326, 1.6]}), 'mec-1'], [({'t3.110.126.226': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3.110.126.226': [0.363, 1.6]}), 'osboxes-0'], [({'t5.116.126.227': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4.116.126.227': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5.116.126.227': [0.364, 1.6], 't4.116.126.227': [0.348, 1.6]}), 'mec-6'], [({'t5.113.126.228': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3.113.126.228': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5.113.126.228': [0.512, 1.6], 't3.113.126.228': [0.495, 1.6]}), 'mec-3'], [({'t5.113.126.229': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2.113.126.229': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.113.126.229': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5.113.126.229': [0.476, 1.6], 't2.113.126.229': [0.357, 1.6], 't4.113.126.229': [0.434, 1.6]}), 'mec-3'], [({'t4.116.126.230': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.116.126.230': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.116.126.230': [0.458, 1.6], 't3.116.126.230': [0.33, 1.6]}), 'mec-6'], [({'t2.113.126.231': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1.113.126.231': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4.113.126.231': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.113.126.231': [0.519, 1.6], 't1.113.126.231': [0.392, 1.6], 't4.113.126.231': [0.49, 1.6]}), 'mec-3'], [({'t2.111.126.232': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.111.126.232': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.111.126.232': [0.451, 1.6], 't3.111.126.232': [0.306, 1.6]}), 'mec-1'], [({'t4.111.126.233': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.111.126.233': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5.111.126.233': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.111.126.233': [0.378, 1.6], 't3.111.126.233': [0.317, 1.6], 't5.111.126.233': [0.357, 1.6]}), 'mec-1'], [({'t4.113.126.234': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.113.126.234': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.113.126.234': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.113.126.234': [0.373, 1.6], 't3.113.126.234': [0.427, 1.6], 't2.113.126.234': [0.324, 1.6]}), 'mec-3'], [({'t5.110.126.235': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2.110.126.235': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5.110.126.235': [0.347, 1.6], 't2.110.126.235': [0.423, 1.6]}), 'osboxes-0'], [({'t2.116.126.236': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.116.126.236': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.116.126.236': [0.442, 1.6], 't3.116.126.236': [0.374, 1.6]}), 'mec-6'], [({'t3.113.126.237': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.113.126.237': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.113.126.237': [0.359, 1.6], 't4.113.126.237': [0.339, 1.6]}), 'mec-3'], [({'t3.115.126.238': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.115.126.238': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.115.126.238': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3.115.126.238': [0.304, 1.6], 't4.115.126.238': [0.489, 1.6], 't5.115.126.238': [0.433, 1.6]}), 'mec-5'], [({'t3.112.126.239': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5.112.126.239': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3.112.126.239': [0.539, 1.6], 't5.112.126.239': [0.35, 1.6]}), 'mec-2'], [({'t2.113.126.240': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.113.126.240': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.113.126.240': [0.405, 1.6], 't3.113.126.240': [0.364, 1.6]}), 'mec-3'], [({'t3.113.126.241': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.113.126.241': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.113.126.241': [0.381, 1.6], 't4.113.126.241': [0.408, 1.6]}), 'mec-3'], [({'t2.113.126.242': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1.113.126.242': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4.113.126.242': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.113.126.242': [0.45, 1.6], 't1.113.126.242': [0.528, 1.6], 't4.113.126.242': [0.446, 1.6]}), 'mec-3'], [({'t3.110.126.243': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.110.126.243': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.110.126.243': [0.426, 1.6], 't4.110.126.243': [0.509, 1.6]}), 'osboxes-0'], [({'t2.114.126.244': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1.114.126.244': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t2.114.126.244': [0.345, 1.6], 't1.114.126.244': [0.481, 1.6]}), 'mec-4'], [({'t2.110.126.245': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.110.126.245': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1.110.126.245': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t2.110.126.245': [0.549, 1.6], 't3.110.126.245': [0.466, 1.6], 't1.110.126.245': [0.531, 1.6]}), 'osboxes-0'], [({'t4.111.126.246': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.111.126.246': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.111.126.246': [0.315, 1.6], 't3.111.126.246': [0.533, 1.6]}), 'mec-1'], [({'t4.113.126.247': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.113.126.247': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3.113.126.247': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.113.126.247': [0.382, 1.6], 't5.113.126.247': [0.329, 1.6], 't3.113.126.247': [0.341, 1.6]}), 'mec-3'], [({'t1.115.126.248': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4.115.126.248': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1.115.126.248': [0.496, 1.6], 't4.115.126.248': [0.518, 1.6]}), 'mec-5'], [({'t2.111.126.249': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2.111.126.249': [0.318, 1.6]}), 'mec-1'], [({'t2.111.126.250': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1.111.126.250': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t2.111.126.250': [0.405, 1.6], 't1.111.126.250': [0.371, 1.6]}), 'mec-1'], [({'t4.115.126.251': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1.115.126.251': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4.115.126.251': [0.502, 1.6], 't1.115.126.251': [0.436, 1.6]}), 'mec-5'], [({'t5.110.126.252': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1.110.126.252': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t5.110.126.252': [0.472, 1.6], 't1.110.126.252': [0.544, 1.6]}), 'osboxes-0'], [({'t4.114.126.253': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.114.126.253': [0.547, 1.6]}), 'mec-4'], [({'t4.116.126.254': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.116.126.254': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.116.126.254': [0.523, 1.6], 't3.116.126.254': [0.517, 1.6]}), 'mec-6'], [({'t2.114.126.255': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.114.126.255': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1.114.126.255': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t2.114.126.255': [0.33, 1.6], 't4.114.126.255': [0.302, 1.6], 't1.114.126.255': [0.465, 1.6]}), 'mec-4'], [({'t3.110.126.256': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.110.126.256': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.110.126.256': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.110.126.256': [0.527, 1.6], 't2.110.126.256': [0.381, 1.6], 't4.110.126.256': [0.339, 1.6]}), 'osboxes-0'], [({'t3.113.126.257': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3.113.126.257': [0.39, 1.6]}), 'mec-3'], [({'t4.113.126.258': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.113.126.258': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5.113.126.258': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.113.126.258': [0.372, 1.6], 't3.113.126.258': [0.442, 1.6], 't5.113.126.258': [0.503, 1.6]}), 'mec-3'], [({'t1.115.126.259': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2.115.126.259': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.115.126.259': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1.115.126.259': [0.55, 1.6], 't2.115.126.259': [0.329, 1.6], 't4.115.126.259': [0.415, 1.6]}), 'mec-5'], [({'t3.110.126.260': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5.110.126.260': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3.110.126.260': [0.48, 1.6], 't5.110.126.260': [0.503, 1.6]}), 'osboxes-0'], [({'t3.114.126.261': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3.114.126.261': [0.453, 1.6]}), 'mec-4'], [({'t2.110.126.262': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.110.126.262': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.110.126.262': [0.448, 1.6], 't3.110.126.262': [0.527, 1.6]}), 'osboxes-0'], [({'t5.110.126.263': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4.110.126.263': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5.110.126.263': [0.477, 1.6], 't4.110.126.263': [0.313, 1.6]}), 'osboxes-0'], [({'t3.116.126.264': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3.116.126.264': [0.302, 1.6]}), 'mec-6'], [({'t5.111.126.265': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3.111.126.265': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5.111.126.265': [0.528, 1.6], 't3.111.126.265': [0.369, 1.6]}), 'mec-1'], [({'t1.110.126.266': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3.110.126.266': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1.110.126.266': [0.31, 1.6], 't3.110.126.266': [0.389, 1.6]}), 'osboxes-0'], [({'t4.112.126.267': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1.112.126.267': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4.112.126.267': [0.32, 1.6], 't1.112.126.267': [0.482, 1.6]}), 'mec-2'], [({'t2.116.126.268': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.116.126.268': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.116.126.268': [0.501, 1.6], 't4.116.126.268': [0.393, 1.6]}), 'mec-6'], [({'t4.115.126.269': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.115.126.269': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1.115.126.269': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4.115.126.269': [0.533, 1.6], 't5.115.126.269': [0.397, 1.6], 't1.115.126.269': [0.505, 1.6]}), 'mec-5'], [({'t4.114.126.270': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.114.126.270': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.114.126.270': [0.314, 1.6], 't2.114.126.270': [0.535, 1.6]}), 'mec-4'], [({'t3.114.126.271': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5.114.126.271': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3.114.126.271': [0.366, 1.6], 't5.114.126.271': [0.338, 1.6]}), 'mec-4'], [({'t3.115.126.272': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.115.126.272': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3.115.126.272': [0.48, 1.6], 't2.115.126.272': [0.381, 1.6]}), 'mec-5'], [({'t2.113.126.273': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5.113.126.273': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4.113.126.273': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.113.126.273': [0.335, 1.6], 't5.113.126.273': [0.321, 1.6], 't4.113.126.273': [0.401, 1.6]}), 'mec-3'], [({'t5.115.126.274': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3.115.126.274': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.115.126.274': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5.115.126.274': [0.39, 1.6], 't3.115.126.274': [0.538, 1.6], 't4.115.126.274': [0.518, 1.6]}), 'mec-5'], [({'t3.110.126.275': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.110.126.275': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3.110.126.275': [0.532, 1.6], 't2.110.126.275': [0.473, 1.6]}), 'osboxes-0'], [({'t5.110.126.276': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3.110.126.276': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5.110.126.276': [0.343, 1.6], 't3.110.126.276': [0.441, 1.6]}), 'osboxes-0'], [({'t3.110.126.277': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.110.126.277': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5.110.126.277': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3.110.126.277': [0.452, 1.6], 't2.110.126.277': [0.476, 1.6], 't5.110.126.277': [0.421, 1.6]}), 'osboxes-0'], [({'t2.116.126.278': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5.116.126.278': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2.116.126.278': [0.447, 1.6], 't5.116.126.278': [0.435, 1.6]}), 'mec-6'], [({'t3.114.126.279': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.114.126.279': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.114.126.279': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3.114.126.279': [0.343, 1.6], 't4.114.126.279': [0.463, 1.6], 't2.114.126.279': [0.364, 1.6]}), 'mec-4'], [({'t2.112.126.280': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.112.126.280': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.112.126.280': [0.49, 1.6], 't4.112.126.280': [0.382, 1.6]}), 'mec-2'], [({'t2.114.126.281': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.114.126.281': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.114.126.281': [0.353, 1.6], 't4.114.126.281': [0.55, 1.6]}), 'mec-4'], [({'t3.111.126.282': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.111.126.282': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.111.126.282': [0.466, 1.6], 't4.111.126.282': [0.427, 1.6]}), 'mec-1'], [({'t3.114.126.283': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.114.126.283': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.114.126.283': [0.49, 1.6], 't4.114.126.283': [0.519, 1.6]}), 'mec-4'], [({'t4.114.126.284': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.114.126.284': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.114.126.284': [0.387, 1.6], 't5.114.126.284': [0.472, 1.6]}), 'mec-4'], [({'t5.110.126.285': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4.110.126.285': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5.110.126.285': [0.513, 1.6], 't4.110.126.285': [0.374, 1.6]}), 'osboxes-0'], [({'t3.115.126.286': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.115.126.286': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.115.126.286': [0.492, 1.6], 't4.115.126.286': [0.424, 1.6]}), 'mec-5'], [({'t3.111.126.287': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.111.126.287': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5.111.126.287': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3.111.126.287': [0.537, 1.6], 't2.111.126.287': [0.447, 1.6], 't5.111.126.287': [0.375, 1.6]}), 'mec-1'], [({'t2.110.126.288': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.110.126.288': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.110.126.288': [0.408, 1.6], 't3.110.126.288': [0.381, 1.6]}), 'osboxes-0'], [({'t4.115.126.289': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.115.126.289': [0.34, 1.6]}), 'mec-5'], [({'t3.111.126.290': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5.111.126.290': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3.111.126.290': [0.416, 1.6], 't5.111.126.290': [0.361, 1.6]}), 'mec-1'], [({'t2.110.126.291': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2.110.126.291': [0.369, 1.6]}), 'osboxes-0'], [({'t5.115.126.292': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3.115.126.292': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5.115.126.292': [0.489, 1.6], 't3.115.126.292': [0.484, 1.6]}), 'mec-5'], [({'t2.116.126.293': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.116.126.293': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.116.126.293': [0.304, 1.6], 't3.116.126.293': [0.33, 1.6]}), 'mec-6'], [({'t5.115.126.294': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3.115.126.294': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5.115.126.294': [0.351, 1.6], 't3.115.126.294': [0.416, 1.6]}), 'mec-5'], [({'t3.112.126.295': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.112.126.295': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.112.126.295': [0.474, 1.6], 't4.112.126.295': [0.365, 1.6]}), 'mec-2'], [({'t4.111.126.296': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.111.126.296': [0.346, 1.6]}), 'mec-1'], [({'t3.110.126.297': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.110.126.297': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.110.126.297': [0.354, 1.6], 't4.110.126.297': [0.482, 1.6]}), 'osboxes-0'], [({'t3.111.126.298': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.111.126.298': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3.111.126.298': [0.527, 1.6], 't2.111.126.298': [0.301, 1.6]}), 'mec-1'], [({'t3.115.126.299': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.115.126.299': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.115.126.299': [0.341, 1.6], 't4.115.126.299': [0.46, 1.6]}), 'mec-5'], [({'t2.110.126.300': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.110.126.300': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.110.126.300': [0.407, 1.6], 't3.110.126.300': [0.369, 1.6]}), 'osboxes-0'], [({'t4.111.126.301': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.111.126.301': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.111.126.301': [0.38, 1.6], 't3.111.126.301': [0.496, 1.6]}), 'mec-1'], [({'t4.113.126.302': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.113.126.302': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.113.126.302': [0.368, 1.6], 't3.113.126.302': [0.375, 1.6]}), 'mec-3'], [({'t4.110.126.303': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.110.126.303': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.110.126.303': [0.485, 1.6], 't2.110.126.303': [0.494, 1.6]}), 'osboxes-0'], [({'t4.110.126.304': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.110.126.304': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.110.126.304': [0.304, 1.6], 't3.110.126.304': [0.452, 1.6]}), 'osboxes-0'], [({'t4.112.126.305': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.112.126.305': [0.417, 1.6]}), 'mec-2'], [({'t2.115.126.306': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.115.126.306': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.115.126.306': [0.31, 1.6], 't4.115.126.306': [0.396, 1.6]}), 'mec-5'], [({'t3.113.126.307': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.113.126.307': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.113.126.307': [0.378, 1.6], 't4.113.126.307': [0.384, 1.6]}), 'mec-3'], [({'t2.115.126.308': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.115.126.308': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.115.126.308': [0.358, 1.6], 't4.115.126.308': [0.349, 1.6]}), 'mec-5'], [({'t4.115.126.309': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.115.126.309': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.115.126.309': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.115.126.309': [0.465, 1.6], 't3.115.126.309': [0.524, 1.6], 't2.115.126.309': [0.418, 1.6]}), 'mec-5'], [({'t5.111.126.310': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4.111.126.310': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5.111.126.310': [0.425, 1.6], 't4.111.126.310': [0.449, 1.6]}), 'mec-1'], [({'t3.112.126.311': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.112.126.311': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.112.126.311': [0.343, 1.6], 't4.112.126.311': [0.367, 1.6]}), 'mec-2'], [({'t4.113.126.312': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.113.126.312': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5.113.126.312': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.113.126.312': [0.508, 1.6], 't3.113.126.312': [0.508, 1.6], 't5.113.126.312': [0.442, 1.6]}), 'mec-3'], [({'t5.113.126.313': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3.113.126.313': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5.113.126.313': [0.449, 1.6], 't3.113.126.313': [0.378, 1.6]}), 'mec-3'], [({'t2.110.126.314': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.110.126.314': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.110.126.314': [0.526, 1.6], 't4.110.126.314': [0.43, 1.6]}), 'osboxes-0'], [({'t5.113.126.315': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4.113.126.315': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5.113.126.315': [0.36, 1.6], 't4.113.126.315': [0.496, 1.6]}), 'mec-3'], [({'t1.114.126.316': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3.114.126.316': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1.114.126.316': [0.537, 1.6], 't3.114.126.316': [0.462, 1.6]}), 'mec-4'], [({'t3.111.126.317': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.111.126.317': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.111.126.317': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3.111.126.317': [0.47, 1.6], 't4.111.126.317': [0.481, 1.6], 't5.111.126.317': [0.538, 1.6]}), 'mec-1'], [({'t4.111.126.318': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.111.126.318': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.111.126.318': [0.528, 1.6], 't2.111.126.318': [0.329, 1.6]}), 'mec-1'], [({'t4.115.126.319': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.115.126.319': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.115.126.319': [0.364, 1.6], 't5.115.126.319': [0.483, 1.6]}), 'mec-5'], [({'t1.113.126.320': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4.113.126.320': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1.113.126.320': [0.368, 1.6], 't4.113.126.320': [0.32, 1.6]}), 'mec-3'], [({'t4.115.126.321': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.115.126.321': [0.493, 1.6]}), 'mec-5'], [({'t3.114.126.322': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3.114.126.322': [0.41, 1.6]}), 'mec-4'], [({'t1.112.126.323': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2.112.126.323': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t1.112.126.323': [0.422, 1.6], 't2.112.126.323': [0.313, 1.6]}), 'mec-2'], [({'t5.116.126.324': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3.116.126.324': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5.116.126.324': [0.326, 1.6], 't3.116.126.324': [0.369, 1.6]}), 'mec-6'], [({'t4.116.126.325': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.116.126.325': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.116.126.325': [0.502, 1.6], 't3.116.126.325': [0.385, 1.6]}), 'mec-6'], [({'t4.110.126.326': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.110.126.326': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.110.126.326': [0.301, 1.6], 't5.110.126.326': [0.539, 1.6]}), 'osboxes-0'], [({'t5.115.126.327': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4.115.126.327': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5.115.126.327': [0.346, 1.6], 't4.115.126.327': [0.425, 1.6]}), 'mec-5'], [({'t3.111.126.328': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1.111.126.328': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3.111.126.328': [0.402, 1.6], 't1.111.126.328': [0.313, 1.6]}), 'mec-1'], [({'t3.111.126.329': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3.111.126.329': [0.501, 1.6]}), 'mec-1'], [({'t4.116.126.330': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.116.126.330': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.116.126.330': [0.41, 1.6], 't5.116.126.330': [0.4, 1.6]}), 'mec-6'], [({'t2.110.126.331': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2.110.126.331': [0.521, 1.6]}), 'osboxes-0'], [({'t3.111.126.332': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.111.126.332': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.111.126.332': [0.413, 1.6], 't4.111.126.332': [0.424, 1.6]}), 'mec-1'], [({'t5.115.126.333': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3.115.126.333': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.115.126.333': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5.115.126.333': [0.505, 1.6], 't3.115.126.333': [0.342, 1.6], 't4.115.126.333': [0.493, 1.6]}), 'mec-5'], [({'t2.112.126.334': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.112.126.334': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1.112.126.334': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t2.112.126.334': [0.433, 1.6], 't4.112.126.334': [0.491, 1.6], 't1.112.126.334': [0.463, 1.6]}), 'mec-2'], [({'t4.115.126.335': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.115.126.335': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.115.126.335': [0.487, 1.6], 't5.115.126.335': [0.368, 1.6]}), 'mec-5'], [({'t2.115.126.336': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5.115.126.336': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2.115.126.336': [0.403, 1.6], 't5.115.126.336': [0.304, 1.6]}), 'mec-5'], [({'t4.113.126.337': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.113.126.337': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.113.126.337': [0.478, 1.6], 't3.113.126.337': [0.459, 1.6]}), 'mec-3'], [({'t4.110.126.338': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.110.126.338': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.110.126.338': [0.419, 1.6], 't2.110.126.338': [0.516, 1.6]}), 'osboxes-0'], [({'t4.112.126.339': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.112.126.339': [0.309, 1.6]}), 'mec-2'], [({'t5.112.126.340': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3.112.126.340': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5.112.126.340': [0.375, 1.6], 't3.112.126.340': [0.463, 1.6]}), 'mec-2'], [({'t4.115.126.341': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.115.126.341': [0.485, 1.6]}), 'mec-5'], [({'t3.111.126.342': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.111.126.342': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.111.126.342': [0.544, 1.6], 't4.111.126.342': [0.374, 1.6]}), 'mec-1'], [({'t1.114.126.343': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2.114.126.343': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t1.114.126.343': [0.448, 1.6], 't2.114.126.343': [0.457, 1.6]}), 'mec-4'], [({'t4.110.126.344': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.110.126.344': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.110.126.344': [0.437, 1.6], 't2.110.126.344': [0.401, 1.6]}), 'osboxes-0'], [({'t4.110.126.345': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1.110.126.345': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4.110.126.345': [0.527, 1.6], 't1.110.126.345': [0.477, 1.6]}), 'osboxes-0'], [({'t2.114.126.346': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.114.126.346': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.114.126.346': [0.4, 1.6], 't3.114.126.346': [0.384, 1.6]}), 'mec-4'], [({'t4.111.126.347': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.111.126.347': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.111.126.347': [0.476, 1.6], 't3.111.126.347': [0.367, 1.6]}), 'mec-1'], [({'t3.111.126.348': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3.111.126.348': [0.515, 1.6]}), 'mec-1'], [({'t3.116.126.349': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3.116.126.349': [0.343, 1.6]}), 'mec-6'], [({'t5.111.126.350': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3.111.126.350': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5.111.126.350': [0.45, 1.6], 't3.111.126.350': [0.412, 1.6]}), 'mec-1'], [({'t4.113.126.351': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.113.126.351': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.113.126.351': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.113.126.351': [0.327, 1.6], 't3.113.126.351': [0.373, 1.6], 't2.113.126.351': [0.485, 1.6]}), 'mec-3'], [({'t3.116.126.352': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5.116.126.352': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3.116.126.352': [0.407, 1.6], 't5.116.126.352': [0.435, 1.6]}), 'mec-6'], [({'t2.110.126.353': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5.110.126.353': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2.110.126.353': [0.35, 1.6], 't5.110.126.353': [0.405, 1.6]}), 'osboxes-0'], [({'t5.110.126.354': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3.110.126.354': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.110.126.354': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5.110.126.354': [0.422, 1.6], 't3.110.126.354': [0.454, 1.6], 't2.110.126.354': [0.301, 1.6]}), 'osboxes-0'], [({'t3.112.126.355': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5.112.126.355': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3.112.126.355': [0.539, 1.6], 't5.112.126.355': [0.42, 1.6]}), 'mec-2'], [({'t4.112.126.356': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.112.126.356': [0.483, 1.6]}), 'mec-2'], [({'t5.110.126.357': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1.110.126.357': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4.110.126.357': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5.110.126.357': [0.316, 1.6], 't1.110.126.357': [0.378, 1.6], 't4.110.126.357': [0.451, 1.6]}), 'osboxes-0'], [({'t4.110.126.358': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.110.126.358': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.110.126.358': [0.5, 1.6], 't5.110.126.358': [0.309, 1.6]}), 'osboxes-0'], [({'t5.111.126.359': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2.111.126.359': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.111.126.359': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5.111.126.359': [0.388, 1.6], 't2.111.126.359': [0.504, 1.6], 't4.111.126.359': [0.523, 1.6]}), 'mec-1'], [({'t4.115.126.360': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.115.126.360': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.115.126.360': [0.365, 1.6], 't5.115.126.360': [0.493, 1.6]}), 'mec-5'], [({'t1.110.126.361': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3.110.126.361': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.110.126.361': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1.110.126.361': [0.412, 1.6], 't3.110.126.361': [0.511, 1.6], 't4.110.126.361': [0.444, 1.6]}), 'osboxes-0'], [({'t2.111.126.362': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2.111.126.362': [0.347, 1.6]}), 'mec-1'], [({'t3.112.126.363': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5.112.126.363': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4.112.126.363': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.112.126.363': [0.437, 1.6], 't5.112.126.363': [0.373, 1.6], 't4.112.126.363': [0.311, 1.6]}), 'mec-2'], [({'t3.114.126.364': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1.114.126.364': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3.114.126.364': [0.451, 1.6], 't1.114.126.364': [0.505, 1.6]}), 'mec-4'], [({'t4.116.126.365': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.116.126.365': [0.495, 1.6]}), 'mec-6'], [({'t3.114.126.366': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3.114.126.366': [0.341, 1.6]}), 'mec-4'], [({'t2.115.126.367': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2.115.126.367': [0.412, 1.6]}), 'mec-5'], [({'t3.115.126.368': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.115.126.368': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.115.126.368': [0.475, 1.6], 't4.115.126.368': [0.454, 1.6]}), 'mec-5'], [({'t3.111.126.369': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.111.126.369': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.111.126.369': [0.543, 1.6], 't4.111.126.369': [0.515, 1.6]}), 'mec-1'], [({'t4.113.126.370': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.113.126.370': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.113.126.370': [0.521, 1.6], 't3.113.126.370': [0.441, 1.6]}), 'mec-3'], [({'t5.111.126.371': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4.111.126.371': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5.111.126.371': [0.308, 1.6], 't4.111.126.371': [0.518, 1.6]}), 'mec-1'], [({'t4.115.126.372': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.115.126.372': [0.435, 1.6]}), 'mec-5'], [({'t4.115.126.373': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.115.126.373': [0.417, 1.6]}), 'mec-5'], [({'t5.116.126.374': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3.116.126.374': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.116.126.374': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5.116.126.374': [0.366, 1.6], 't3.116.126.374': [0.362, 1.6], 't2.116.126.374': [0.529, 1.6]}), 'mec-6'], [({'t4.114.126.375': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.114.126.375': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.114.126.375': [0.342, 1.6], 't2.114.126.375': [0.302, 1.6]}), 'mec-4'], [({'t3.113.126.376': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3.113.126.376': [0.417, 1.6]}), 'mec-3'], [({'t5.114.126.377': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2.114.126.377': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1.114.126.377': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t5.114.126.377': [0.344, 1.6], 't2.114.126.377': [0.536, 1.6], 't1.114.126.377': [0.486, 1.6]}), 'mec-4'], [({'t4.111.126.378': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.111.126.378': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1.111.126.378': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4.111.126.378': [0.368, 1.6], 't5.111.126.378': [0.402, 1.6], 't1.111.126.378': [0.534, 1.6]}), 'mec-1'], [({'t4.115.126.379': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.115.126.379': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.115.126.379': [0.462, 1.6], 't3.115.126.379': [0.432, 1.6]}), 'mec-5'], [({'t4.111.126.380': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.111.126.380': [0.485, 1.6]}), 'mec-1'], [({'t3.110.126.381': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5.110.126.381': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4.110.126.381': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.110.126.381': [0.514, 1.6], 't5.110.126.381': [0.453, 1.6], 't4.110.126.381': [0.492, 1.6]}), 'osboxes-0'], [({'t4.114.126.382': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.114.126.382': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.114.126.382': [0.381, 1.6], 't3.114.126.382': [0.312, 1.6]}), 'mec-4'], [({'t4.112.126.383': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.112.126.383': [0.491, 1.6]}), 'mec-2'], [({'t5.114.126.384': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2.114.126.384': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5.114.126.384': [0.455, 1.6], 't2.114.126.384': [0.487, 1.6]}), 'mec-4'], [({'t4.115.126.385': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.115.126.385': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.115.126.385': [0.445, 1.6], 't3.115.126.385': [0.42, 1.6]}), 'mec-5'], [({'t2.112.126.386': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.112.126.386': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.112.126.386': [0.437, 1.6], 't3.112.126.386': [0.351, 1.6]}), 'mec-2'], [({'t3.113.126.387': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.113.126.387': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.113.126.387': [0.31, 1.6], 't4.113.126.387': [0.499, 1.6]}), 'mec-3'], [({'t5.113.126.388': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3.113.126.388': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5.113.126.388': [0.458, 1.6], 't3.113.126.388': [0.361, 1.6]}), 'mec-3'], [({'t5.115.126.389': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4.115.126.389': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5.115.126.389': [0.373, 1.6], 't4.115.126.389': [0.516, 1.6]}), 'mec-5'], [({'t3.113.126.390': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5.113.126.390': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2.113.126.390': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3.113.126.390': [0.511, 1.6], 't5.113.126.390': [0.53, 1.6], 't2.113.126.390': [0.342, 1.6]}), 'mec-3'], [({'t3.112.126.391': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1.112.126.391': {'wcet': 3, 'period': 20, 'deadline': 15}, 't5.112.126.391': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3.112.126.391': [0.404, 1.6], 't1.112.126.391': [0.368, 1.6], 't5.112.126.391': [0.371, 1.6]}), 'mec-2'], [({'t2.110.126.392': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2.110.126.392': [0.391, 1.6]}), 'osboxes-0'], [({'t3.113.126.393': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.113.126.393': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.113.126.393': [0.321, 1.6], 't4.113.126.393': [0.384, 1.6]}), 'mec-3'], [({'t4.110.126.394': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.110.126.394': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1.110.126.394': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4.110.126.394': [0.355, 1.6], 't2.110.126.394': [0.361, 1.6], 't1.110.126.394': [0.319, 1.6]}), 'osboxes-0'], [({'t2.115.126.395': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1.115.126.395': {'wcet': 3, 'period': 20, 'deadline': 15}, 't5.115.126.395': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2.115.126.395': [0.35, 1.6], 't1.115.126.395': [0.462, 1.6], 't5.115.126.395': [0.418, 1.6]}), 'mec-5'], [({'t1.116.126.396': {'wcet': 3, 'period': 20, 'deadline': 15}, 't5.116.126.396': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t1.116.126.396': [0.432, 1.6], 't5.116.126.396': [0.339, 1.6]}), 'mec-6'], [({'t4.110.126.397': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.110.126.397': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.110.126.397': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.110.126.397': [0.431, 1.6], 't2.110.126.397': [0.523, 1.6], 't3.110.126.397': [0.503, 1.6]}), 'osboxes-0'], [({'t2.113.126.398': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.113.126.398': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.113.126.398': [0.406, 1.6], 't4.113.126.398': [0.4, 1.6]}), 'mec-3'], [({'t2.112.126.399': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5.112.126.399': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2.112.126.399': [0.46, 1.6], 't5.112.126.399': [0.512, 1.6]}), 'mec-2'], [({'t3.114.126.400': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3.114.126.400': [0.379, 1.6]}), 'mec-4'], [({'t5.116.126.401': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5.116.126.401': [0.543, 1.6]}), 'mec-6'], [({'t4.116.126.402': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.116.126.402': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.116.126.402': [0.322, 1.6], 't2.116.126.402': [0.492, 1.6]}), 'mec-6'], [({'t2.112.126.403': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.112.126.403': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.112.126.403': [0.342, 1.6], 't3.112.126.403': [0.356, 1.6]}), 'mec-2'], [({'t2.110.126.404': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.110.126.404': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.110.126.404': [0.369, 1.6], 't4.110.126.404': [0.473, 1.6]}), 'osboxes-0'], [({'t3.114.126.405': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.114.126.405': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1.114.126.405': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3.114.126.405': [0.362, 1.6], 't2.114.126.405': [0.456, 1.6], 't1.114.126.405': [0.487, 1.6]}), 'mec-4'], [({'t3.115.126.406': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.115.126.406': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.115.126.406': [0.444, 1.6], 't4.115.126.406': [0.394, 1.6]}), 'mec-5'], [({'t5.112.126.407': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4.112.126.407': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5.112.126.407': [0.429, 1.6], 't4.112.126.407': [0.37, 1.6]}), 'mec-2'], [({'t2.114.126.408': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2.114.126.408': [0.395, 1.6]}), 'mec-4'], [({'t4.116.126.409': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.116.126.409': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1.116.126.409': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4.116.126.409': [0.41, 1.6], 't3.116.126.409': [0.428, 1.6], 't1.116.126.409': [0.413, 1.6]}), 'mec-6'], [({'t5.114.126.410': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3.114.126.410': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.114.126.410': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5.114.126.410': [0.43, 1.6], 't3.114.126.410': [0.376, 1.6], 't4.114.126.410': [0.351, 1.6]}), 'mec-4'], [({'t3.113.126.411': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3.113.126.411': [0.309, 1.6]}), 'mec-3'], [({'t1.114.126.412': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4.114.126.412': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1.114.126.412': [0.459, 1.6], 't4.114.126.412': [0.301, 1.6]}), 'mec-4'], [({'t3.116.126.413': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.116.126.413': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.116.126.413': [0.472, 1.6], 't4.116.126.413': [0.384, 1.6]}), 'mec-6'], [({'t4.114.126.414': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.114.126.414': [0.508, 1.6]}), 'mec-4'], [({'t4.111.126.415': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.111.126.415': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.111.126.415': [0.503, 1.6], 't5.111.126.415': [0.489, 1.6]}), 'mec-1'], [({'t4.114.126.416': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.114.126.416': [0.447, 1.6]}), 'mec-4'], [({'t2.115.126.417': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.115.126.417': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.115.126.417': [0.33, 1.6], 't4.115.126.417': [0.346, 1.6]}), 'mec-5'], [({'t2.114.126.418': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.114.126.418': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.114.126.418': [0.395, 1.6], 't4.114.126.418': [0.416, 1.6]}), 'mec-4'], [({'t4.112.126.419': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.112.126.419': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.112.126.419': [0.407, 1.6], 't3.112.126.419': [0.495, 1.6]}), 'mec-2'], [({'t5.116.126.420': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2.116.126.420': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5.116.126.420': [0.439, 1.6], 't2.116.126.420': [0.364, 1.6]}), 'mec-6'], [({'t4.116.126.421': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.116.126.421': [0.485, 1.6]}), 'mec-6'], [({'t3.111.126.422': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.111.126.422': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.111.126.422': [0.423, 1.6], 't4.111.126.422': [0.355, 1.6]}), 'mec-1'], [({'t3.112.126.423': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.112.126.423': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.112.126.423': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3.112.126.423': [0.509, 1.6], 't4.112.126.423': [0.536, 1.6], 't2.112.126.423': [0.447, 1.6]}), 'mec-2'], [({'t4.112.126.424': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1.112.126.424': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3.112.126.424': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.112.126.424': [0.46, 1.6], 't1.112.126.424': [0.346, 1.6], 't3.112.126.424': [0.502, 1.6]}), 'mec-2'], [({'t4.113.126.425': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.113.126.425': [0.443, 1.6]}), 'mec-3'], [({'t4.115.126.426': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.115.126.426': [0.462, 1.6]}), 'mec-5'], [({'t2.114.126.427': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2.114.126.427': [0.492, 1.6]}), 'mec-4'], [({'t5.114.126.428': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3.114.126.428': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.114.126.428': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5.114.126.428': [0.409, 1.6], 't3.114.126.428': [0.459, 1.6], 't4.114.126.428': [0.487, 1.6]}), 'mec-4'], [({'t3.115.126.429': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.115.126.429': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.115.126.429': [0.386, 1.6], 't4.115.126.429': [0.326, 1.6]}), 'mec-5'], [({'t1.110.126.430': {'wcet': 3, 'period': 20, 'deadline': 15}, 't5.110.126.430': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t1.110.126.430': [0.315, 1.6], 't5.110.126.430': [0.371, 1.6]}), 'osboxes-0'], [({'t3.111.126.431': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1.111.126.431': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3.111.126.431': [0.36, 1.6], 't1.111.126.431': [0.38, 1.6]}), 'mec-1'], [({'t3.111.126.432': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.111.126.432': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.111.126.432': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3.111.126.432': [0.377, 1.6], 't4.111.126.432': [0.512, 1.6], 't5.111.126.432': [0.462, 1.6]}), 'mec-1'], [({'t2.116.126.433': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.116.126.433': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.116.126.433': [0.426, 1.6], 't4.116.126.433': [0.495, 1.6]}), 'mec-6'], [({'t4.113.126.434': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.113.126.434': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.113.126.434': [0.414, 1.6], 't5.113.126.434': [0.37, 1.6]}), 'mec-3'], [({'t2.115.126.435': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2.115.126.435': [0.549, 1.6]}), 'mec-5'], [({'t1.110.126.436': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t1.110.126.436': [0.375, 1.6]}), 'osboxes-0'], [({'t5.115.126.437': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2.115.126.437': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5.115.126.437': [0.513, 1.6], 't2.115.126.437': [0.328, 1.6]}), 'mec-5'], [({'t5.111.126.438': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4.111.126.438': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5.111.126.438': [0.445, 1.6], 't4.111.126.438': [0.464, 1.6]}), 'mec-1'], [({'t2.115.126.439': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2.115.126.439': [0.313, 1.6]}), 'mec-5'], [({'t4.110.126.440': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.110.126.440': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.110.126.440': [0.375, 1.6], 't2.110.126.440': [0.461, 1.6]}), 'osboxes-0'], [({'t3.115.126.441': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.115.126.441': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.115.126.441': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3.115.126.441': [0.441, 1.6], 't4.115.126.441': [0.415, 1.6], 't2.115.126.441': [0.476, 1.6]}), 'mec-5'], [({'t3.114.126.442': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.114.126.442': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.114.126.442': [0.334, 1.6], 't4.114.126.442': [0.512, 1.6]}), 'mec-4'], [({'t5.116.126.443': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4.116.126.443': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5.116.126.443': [0.306, 1.6], 't4.116.126.443': [0.523, 1.6]}), 'mec-6'], [({'t4.113.126.444': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.113.126.444': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.113.126.444': [0.499, 1.6], 't5.113.126.444': [0.362, 1.6]}), 'mec-3'], [({'t4.115.126.445': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.115.126.445': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.115.126.445': [0.451, 1.6], 't2.115.126.445': [0.347, 1.6]}), 'mec-5'], [({'t2.114.126.446': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.114.126.446': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.114.126.446': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.114.126.446': [0.357, 1.6], 't4.114.126.446': [0.46, 1.6], 't3.114.126.446': [0.312, 1.6]}), 'mec-4'], [({'t4.114.126.447': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.114.126.447': [0.358, 1.6]}), 'mec-4'], [({'t5.113.126.448': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4.113.126.448': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5.113.126.448': [0.509, 1.6], 't4.113.126.448': [0.402, 1.6]}), 'mec-3'], [({'t3.115.126.449': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.115.126.449': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3.115.126.449': [0.48, 1.6], 't2.115.126.449': [0.416, 1.6]}), 'mec-5'], [({'t4.115.126.450': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.115.126.450': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.115.126.450': [0.401, 1.6], 't3.115.126.450': [0.519, 1.6]}), 'mec-5'], [({'t4.112.126.451': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.112.126.451': [0.433, 1.6]}), 'mec-2'], [({'t2.113.126.452': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2.113.126.452': [0.327, 1.6]}), 'mec-3'], [({'t4.115.126.453': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.115.126.453': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.115.126.453': [0.519, 1.6], 't5.115.126.453': [0.483, 1.6]}), 'mec-5'], [({'t5.111.126.454': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4.111.126.454': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.111.126.454': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5.111.126.454': [0.46, 1.6], 't4.111.126.454': [0.547, 1.6], 't2.111.126.454': [0.374, 1.6]}), 'mec-1'], [({'t4.116.126.455': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.116.126.455': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.116.126.455': [0.303, 1.6], 't2.116.126.455': [0.532, 1.6]}), 'mec-6'], [({'t3.114.126.456': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3.114.126.456': [0.353, 1.6]}), 'mec-4'], [({'t2.111.126.457': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.111.126.457': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.111.126.457': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2.111.126.457': [0.357, 1.6], 't4.111.126.457': [0.544, 1.6], 't5.111.126.457': [0.347, 1.6]}), 'mec-1'], [({'t1.114.126.458': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2.114.126.458': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t1.114.126.458': [0.361, 1.6], 't2.114.126.458': [0.361, 1.6]}), 'mec-4'], [({'t2.115.126.459': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2.115.126.459': [0.405, 1.6]}), 'mec-5'], [({'t5.114.126.460': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2.114.126.460': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5.114.126.460': [0.39, 1.6], 't2.114.126.460': [0.543, 1.6]}), 'mec-4'], [({'t4.115.126.461': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.115.126.461': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.115.126.461': [0.52, 1.6], 't5.115.126.461': [0.357, 1.6]}), 'mec-5'], [({'t2.111.126.462': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2.111.126.462': [0.527, 1.6]}), 'mec-1'], [({'t1.113.126.463': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3.113.126.463': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.113.126.463': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1.113.126.463': [0.54, 1.6], 't3.113.126.463': [0.51, 1.6], 't4.113.126.463': [0.458, 1.6]}), 'mec-3'], [({'t2.113.126.464': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1.113.126.464': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t2.113.126.464': [0.511, 1.6], 't1.113.126.464': [0.529, 1.6]}), 'mec-3'], [({'t4.115.126.465': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.115.126.465': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.115.126.465': [0.362, 1.6], 't2.115.126.465': [0.494, 1.6]}), 'mec-5'], [({'t5.113.126.466': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4.113.126.466': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.113.126.466': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5.113.126.466': [0.326, 1.6], 't4.113.126.466': [0.469, 1.6], 't2.113.126.466': [0.386, 1.6]}), 'mec-3'], [({'t4.113.126.467': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.113.126.467': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.113.126.467': [0.357, 1.6], 't3.113.126.467': [0.361, 1.6]}), 'mec-3'], [({'t3.110.126.468': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.110.126.468': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.110.126.468': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3.110.126.468': [0.344, 1.6], 't4.110.126.468': [0.486, 1.6], 't2.110.126.468': [0.304, 1.6]}), 'osboxes-0'], [({'t5.114.126.469': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3.114.126.469': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.114.126.469': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5.114.126.469': [0.356, 1.6], 't3.114.126.469': [0.37, 1.6], 't2.114.126.469': [0.472, 1.6]}), 'mec-4'], [({'t4.112.126.470': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.112.126.470': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.112.126.470': [0.392, 1.6], 't2.112.126.470': [0.481, 1.6]}), 'mec-2'], [({'t3.114.126.471': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5.114.126.471': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4.114.126.471': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.114.126.471': [0.516, 1.6], 't5.114.126.471': [0.4, 1.6], 't4.114.126.471': [0.311, 1.6]}), 'mec-4'], [({'t1.112.126.472': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3.112.126.472': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1.112.126.472': [0.37, 1.6], 't3.112.126.472': [0.302, 1.6]}), 'mec-2'], [({'t3.116.126.473': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.116.126.473': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3.116.126.473': [0.478, 1.6], 't2.116.126.473': [0.533, 1.6]}), 'mec-6'], [({'t2.111.126.474': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5.111.126.474': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4.111.126.474': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.111.126.474': [0.426, 1.6], 't5.111.126.474': [0.439, 1.6], 't4.111.126.474': [0.505, 1.6]}), 'mec-1'], [({'t4.116.126.475': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.116.126.475': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.116.126.475': [0.311, 1.6], 't2.116.126.475': [0.54, 1.6]}), 'mec-6'], [({'t4.113.126.476': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.113.126.476': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2.113.126.476': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.113.126.476': [0.406, 1.6], 't5.113.126.476': [0.367, 1.6], 't2.113.126.476': [0.468, 1.6]}), 'mec-3'], [({'t3.113.126.477': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1.113.126.477': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4.113.126.477': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.113.126.477': [0.387, 1.6], 't1.113.126.477': [0.331, 1.6], 't4.113.126.477': [0.452, 1.6]}), 'mec-3'], [({'t3.114.126.478': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3.114.126.478': [0.431, 1.6]}), 'mec-4'], [({'t2.112.126.479': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5.112.126.479': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3.112.126.479': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.112.126.479': [0.42, 1.6], 't5.112.126.479': [0.433, 1.6], 't3.112.126.479': [0.419, 1.6]}), 'mec-2'], [({'t4.113.126.480': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.113.126.480': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.113.126.480': [0.355, 1.6], 't3.113.126.480': [0.324, 1.6]}), 'mec-3'], [({'t2.110.126.481': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.110.126.481': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.110.126.481': [0.376, 1.6], 't4.110.126.481': [0.355, 1.6]}), 'osboxes-0'], [({'t2.112.126.482': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.112.126.482': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.112.126.482': [0.529, 1.6], 't3.112.126.482': [0.417, 1.6]}), 'mec-2'], [({'t2.112.126.483': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.112.126.483': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.112.126.483': [0.337, 1.6], 't3.112.126.483': [0.355, 1.6]}), 'mec-2'], [({'t2.114.126.484': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.114.126.484': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.114.126.484': [0.304, 1.6], 't4.114.126.484': [0.368, 1.6]}), 'mec-4'], [({'t2.111.126.485': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.111.126.485': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.111.126.485': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2.111.126.485': [0.343, 1.6], 't4.111.126.485': [0.346, 1.6], 't5.111.126.485': [0.53, 1.6]}), 'mec-1'], [({'t5.112.126.486': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4.112.126.486': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5.112.126.486': [0.446, 1.6], 't4.112.126.486': [0.486, 1.6]}), 'mec-2'], [({'t4.112.126.487': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.112.126.487': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.112.126.487': [0.3, 1.6], 't3.112.126.487': [0.397, 1.6]}), 'mec-2'], [({'t4.111.126.488': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.111.126.488': [0.469, 1.6]}), 'mec-1'], [({'t1.113.126.489': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4.113.126.489': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1.113.126.489': [0.335, 1.6], 't4.113.126.489': [0.457, 1.6]}), 'mec-3'], [({'t4.111.126.490': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.111.126.490': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.111.126.490': [0.38, 1.6], 't2.111.126.490': [0.411, 1.6]}), 'mec-1'], [({'t5.110.126.491': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3.110.126.491': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5.110.126.491': [0.313, 1.6], 't3.110.126.491': [0.358, 1.6]}), 'osboxes-0'], [({'t4.111.126.492': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.111.126.492': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.111.126.492': [0.322, 1.6], 't2.111.126.492': [0.428, 1.6]}), 'mec-1'], [({'t2.116.126.493': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.116.126.493': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.116.126.493': [0.433, 1.6], 't4.116.126.493': [0.544, 1.6]}), 'mec-6'], [({'t3.111.126.494': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3.111.126.494': [0.326, 1.6]}), 'mec-1'], [({'t4.116.126.495': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.116.126.495': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.116.126.495': [0.543, 1.6], 't5.116.126.495': [0.375, 1.6]}), 'mec-6'], [({'t3.113.126.496': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5.113.126.496': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3.113.126.496': [0.384, 1.6], 't5.113.126.496': [0.405, 1.6]}), 'mec-3'], [({'t2.112.126.497': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.112.126.497': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.112.126.497': [0.335, 1.6], 't4.112.126.497': [0.355, 1.6]}), 'mec-2'], [({'t4.110.126.498': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.110.126.498': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.110.126.498': [0.446, 1.6], 't2.110.126.498': [0.311, 1.6]}), 'osboxes-0'], [({'t3.112.126.499': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.112.126.499': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.112.126.499': [0.36, 1.6], 't4.112.126.499': [0.301, 1.6]}), 'mec-2'], [({'t4.116.126.500': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.116.126.500': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.116.126.500': [0.415, 1.6], 't5.116.126.500': [0.513, 1.6]}), 'mec-6'], [({'t2.115.126.501': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.115.126.501': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.115.126.501': [0.471, 1.6], 't4.115.126.501': [0.536, 1.6]}), 'mec-5'], [({'t5.110.126.502': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5.110.126.502': [0.368, 1.6]}), 'osboxes-0'], [({'t3.114.126.503': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.114.126.503': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.114.126.503': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3.114.126.503': [0.452, 1.6], 't4.114.126.503': [0.308, 1.6], 't5.114.126.503': [0.498, 1.6]}), 'mec-4'], [({'t5.114.126.504': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3.114.126.504': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5.114.126.504': [0.456, 1.6], 't3.114.126.504': [0.419, 1.6]}), 'mec-4'], [({'t3.112.126.505': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.112.126.505': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.112.126.505': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.112.126.505': [0.429, 1.6], 't2.112.126.505': [0.506, 1.6], 't4.112.126.505': [0.412, 1.6]}), 'mec-2'], [({'t2.110.126.506': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2.110.126.506': [0.386, 1.6]}), 'osboxes-0'], [({'t4.112.126.507': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.112.126.507': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.112.126.507': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.112.126.507': [0.398, 1.6], 't3.112.126.507': [0.364, 1.6], 't2.112.126.507': [0.525, 1.6]}), 'mec-2'], [({'t2.111.126.508': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2.111.126.508': [0.372, 1.6]}), 'mec-1'], [({'t2.116.126.509': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.116.126.509': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.116.126.509': [0.392, 1.6], 't4.116.126.509': [0.301, 1.6]}), 'mec-6'], [({'t4.111.126.510': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.111.126.510': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5.111.126.510': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.111.126.510': [0.332, 1.6], 't3.111.126.510': [0.529, 1.6], 't5.111.126.510': [0.417, 1.6]}), 'mec-1'], [({'t3.113.126.511': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.113.126.511': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.113.126.511': [0.308, 1.6], 't4.113.126.511': [0.401, 1.6]}), 'mec-3'], [({'t2.111.126.512': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.111.126.512': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.111.126.512': [0.454, 1.6], 't4.111.126.512': [0.521, 1.6]}), 'mec-1'], [({'t2.110.126.513': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.110.126.513': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.110.126.513': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.110.126.513': [0.331, 1.6], 't4.110.126.513': [0.425, 1.6], 't3.110.126.513': [0.372, 1.6]}), 'osboxes-0'], [({'t4.115.126.514': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.115.126.514': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.115.126.514': [0.304, 1.6], 't3.115.126.514': [0.44, 1.6]}), 'mec-5'], [({'t2.112.126.515': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2.112.126.515': [0.477, 1.6]}), 'mec-2'], [({'t5.115.126.516': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3.115.126.516': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5.115.126.516': [0.45, 1.6], 't3.115.126.516': [0.458, 1.6]}), 'mec-5'], [({'t2.116.126.517': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.116.126.517': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.116.126.517': [0.443, 1.6], 't3.116.126.517': [0.4, 1.6]}), 'mec-6'], [({'t1.116.126.518': {'wcet': 3, 'period': 20, 'deadline': 15}, 't5.116.126.518': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t1.116.126.518': [0.489, 1.6], 't5.116.126.518': [0.517, 1.6]}), 'mec-6'], [({'t1.112.126.519': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3.112.126.519': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.112.126.519': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1.112.126.519': [0.38, 1.6], 't3.112.126.519': [0.32, 1.6], 't4.112.126.519': [0.449, 1.6]}), 'mec-2'], [({'t1.110.126.520': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3.110.126.520': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1.110.126.520': [0.396, 1.6], 't3.110.126.520': [0.543, 1.6]}), 'osboxes-0'], [({'t5.115.126.521': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1.115.126.521': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t5.115.126.521': [0.32, 1.6], 't1.115.126.521': [0.481, 1.6]}), 'mec-5'], [({'t4.115.126.522': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.115.126.522': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.115.126.522': [0.515, 1.6], 't3.115.126.522': [0.479, 1.6]}), 'mec-5'], [({'t2.110.126.523': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.110.126.523': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.110.126.523': [0.39, 1.6], 't4.110.126.523': [0.488, 1.6]}), 'osboxes-0'], [({'t4.115.126.524': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.115.126.524': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.115.126.524': [0.52, 1.6], 't2.115.126.524': [0.505, 1.6]}), 'mec-5'], [({'t5.110.126.525': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3.110.126.525': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5.110.126.525': [0.537, 1.6], 't3.110.126.525': [0.525, 1.6]}), 'osboxes-0'], [({'t3.112.126.526': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3.112.126.526': [0.392, 1.6]}), 'mec-2'], [({'t5.112.126.527': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3.112.126.527': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5.112.126.527': [0.386, 1.6], 't3.112.126.527': [0.533, 1.6]}), 'mec-2'], [({'t4.114.126.528': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.114.126.528': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.114.126.528': [0.449, 1.6], 't5.114.126.528': [0.498, 1.6]}), 'mec-4'], [({'t5.111.126.529': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5.111.126.529': [0.42, 1.6]}), 'mec-1'], [({'t4.113.126.530': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.113.126.530': [0.337, 1.6]}), 'mec-3'], [({'t2.112.126.531': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2.112.126.531': [0.306, 1.6]}), 'mec-2'], [({'t3.116.126.532': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1.116.126.532': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3.116.126.532': [0.4, 1.6], 't1.116.126.532': [0.378, 1.6]}), 'mec-6'], [({'t3.112.126.533': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.112.126.533': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.112.126.533': [0.417, 1.6], 't4.112.126.533': [0.466, 1.6]}), 'mec-2'], [({'t4.111.126.534': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.111.126.534': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2.111.126.534': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.111.126.534': [0.534, 1.6], 't5.111.126.534': [0.354, 1.6], 't2.111.126.534': [0.326, 1.6]}), 'mec-1'], [({'t4.111.126.535': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.111.126.535': [0.511, 1.6]}), 'mec-1'], [({'t4.112.126.536': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1.112.126.536': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3.112.126.536': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.112.126.536': [0.346, 1.6], 't1.112.126.536': [0.459, 1.6], 't3.112.126.536': [0.449, 1.6]}), 'mec-2'], [({'t4.111.126.537': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.111.126.537': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.111.126.537': [0.307, 1.6], 't2.111.126.537': [0.398, 1.6]}), 'mec-1'], [({'t2.114.126.538': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.114.126.538': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.114.126.538': [0.304, 1.6], 't3.114.126.538': [0.443, 1.6]}), 'mec-4'], [({'t4.113.126.539': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.113.126.539': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.113.126.539': [0.452, 1.6], 't5.113.126.539': [0.487, 1.6]}), 'mec-3'], [({'t2.111.126.540': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.111.126.540': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.111.126.540': [0.504, 1.6], 't4.111.126.540': [0.497, 1.6]}), 'mec-1'], [({'t2.114.126.541': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2.114.126.541': [0.348, 1.6]}), 'mec-4'], [({'t5.111.126.542': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4.111.126.542': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5.111.126.542': [0.378, 1.6], 't4.111.126.542': [0.414, 1.6]}), 'mec-1'], [({'t2.116.126.543': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5.116.126.543': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2.116.126.543': [0.434, 1.6], 't5.116.126.543': [0.387, 1.6]}), 'mec-6'], [({'t2.113.126.544': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2.113.126.544': [0.396, 1.6]}), 'mec-3'], [({'t2.113.126.545': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.113.126.545': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.113.126.545': [0.473, 1.6], 't3.113.126.545': [0.506, 1.6]}), 'mec-3'], [({'t4.115.126.546': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.115.126.546': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.115.126.546': [0.517, 1.6], 't2.115.126.546': [0.304, 1.6]}), 'mec-5'], [({'t4.115.126.547': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.115.126.547': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.115.126.547': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.115.126.547': [0.491, 1.6], 't2.115.126.547': [0.435, 1.6], 't3.115.126.547': [0.304, 1.6]}), 'mec-5'], [({'t3.114.126.548': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.114.126.548': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3.114.126.548': [0.345, 1.6], 't2.114.126.548': [0.463, 1.6]}), 'mec-4'], [({'t3.115.126.549': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.115.126.549': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1.115.126.549': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3.115.126.549': [0.482, 1.6], 't2.115.126.549': [0.549, 1.6], 't1.115.126.549': [0.482, 1.6]}), 'mec-5'], [({'t5.115.126.550': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3.115.126.550': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5.115.126.550': [0.351, 1.6], 't3.115.126.550': [0.315, 1.6]}), 'mec-5'], [({'t1.110.126.551': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2.110.126.551': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t1.110.126.551': [0.52, 1.6], 't2.110.126.551': [0.495, 1.6]}), 'osboxes-0'], [({'t3.110.126.552': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.110.126.552': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3.110.126.552': [0.325, 1.6], 't2.110.126.552': [0.489, 1.6]}), 'osboxes-0'], [({'t5.113.126.553': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5.113.126.553': [0.336, 1.6]}), 'mec-3'], [({'t4.112.126.554': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.112.126.554': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.112.126.554': [0.512, 1.6], 't3.112.126.554': [0.346, 1.6]}), 'mec-2'], [({'t2.110.126.555': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.110.126.555': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.110.126.555': [0.517, 1.6], 't3.110.126.555': [0.439, 1.6]}), 'osboxes-0'], [({'t3.115.126.556': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.115.126.556': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.115.126.556': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3.115.126.556': [0.32, 1.6], 't4.115.126.556': [0.482, 1.6], 't2.115.126.556': [0.489, 1.6]}), 'mec-5'], [({'t3.110.126.557': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5.110.126.557': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2.110.126.557': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3.110.126.557': [0.427, 1.6], 't5.110.126.557': [0.341, 1.6], 't2.110.126.557': [0.341, 1.6]}), 'osboxes-0'], [({'t2.112.126.558': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.112.126.558': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.112.126.558': [0.457, 1.6], 't4.112.126.558': [0.319, 1.6]}), 'mec-2'], [({'t3.114.126.559': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3.114.126.559': [0.375, 1.6]}), 'mec-4'], [({'t5.115.126.560': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4.115.126.560': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5.115.126.560': [0.451, 1.6], 't4.115.126.560': [0.466, 1.6]}), 'mec-5'], [({'t4.110.126.561': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1.110.126.561': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4.110.126.561': [0.405, 1.6], 't1.110.126.561': [0.507, 1.6]}), 'osboxes-0'], [({'t2.115.126.562': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.115.126.562': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.115.126.562': [0.322, 1.6], 't4.115.126.562': [0.492, 1.6]}), 'mec-5'], [({'t3.110.126.563': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5.110.126.563': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3.110.126.563': [0.466, 1.6], 't5.110.126.563': [0.433, 1.6]}), 'osboxes-0'], [({'t1.110.126.564': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3.110.126.564': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1.110.126.564': [0.444, 1.6], 't3.110.126.564': [0.496, 1.6]}), 'osboxes-0'], [({'t3.110.126.565': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5.110.126.565': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4.110.126.565': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.110.126.565': [0.313, 1.6], 't5.110.126.565': [0.446, 1.6], 't4.110.126.565': [0.312, 1.6]}), 'osboxes-0'], [({'t2.113.126.566': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.113.126.566': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.113.126.566': [0.512, 1.6], 't3.113.126.566': [0.496, 1.6]}), 'mec-3'], [({'t4.110.126.567': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.110.126.567': [0.382, 1.6]}), 'osboxes-0'], [({'t3.113.126.568': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5.113.126.568': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4.113.126.568': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.113.126.568': [0.31, 1.6], 't5.113.126.568': [0.483, 1.6], 't4.113.126.568': [0.307, 1.6]}), 'mec-3'], [({'t5.113.126.569': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2.113.126.569': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5.113.126.569': [0.43, 1.6], 't2.113.126.569': [0.433, 1.6]}), 'mec-3'], [({'t5.112.126.570': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3.112.126.570': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.112.126.570': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5.112.126.570': [0.399, 1.6], 't3.112.126.570': [0.538, 1.6], 't4.112.126.570': [0.301, 1.6]}), 'mec-2'], [({'t4.112.126.571': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.112.126.571': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.112.126.571': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.112.126.571': [0.413, 1.6], 't3.112.126.571': [0.474, 1.6], 't2.112.126.571': [0.367, 1.6]}), 'mec-2'], [({'t5.113.126.572': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2.113.126.572': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5.113.126.572': [0.455, 1.6], 't2.113.126.572': [0.441, 1.6]}), 'mec-3'], [({'t3.110.126.573': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.110.126.573': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3.110.126.573': [0.417, 1.6], 't2.110.126.573': [0.515, 1.6]}), 'osboxes-0'], [({'t3.115.126.574': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.115.126.574': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.115.126.574': [0.307, 1.6], 't4.115.126.574': [0.453, 1.6]}), 'mec-5'], [({'t4.110.126.575': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.110.126.575': [0.528, 1.6]}), 'osboxes-0'], [({'t1.115.126.576': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2.115.126.576': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t1.115.126.576': [0.374, 1.6], 't2.115.126.576': [0.301, 1.6]}), 'mec-5'], [({'t1.116.126.577': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4.116.126.577': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.116.126.577': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1.116.126.577': [0.523, 1.6], 't4.116.126.577': [0.48, 1.6], 't3.116.126.577': [0.422, 1.6]}), 'mec-6'], [({'t4.115.126.578': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.115.126.578': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.115.126.578': [0.336, 1.6], 't2.115.126.578': [0.543, 1.6]}), 'mec-5'], [({'t4.111.126.579': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.111.126.579': [0.486, 1.6]}), 'mec-1'], [({'t4.112.126.580': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1.112.126.580': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4.112.126.580': [0.391, 1.6], 't1.112.126.580': [0.423, 1.6]}), 'mec-2'], [({'t5.113.126.581': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2.113.126.581': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5.113.126.581': [0.386, 1.6], 't2.113.126.581': [0.361, 1.6]}), 'mec-3'], [({'t5.114.126.582': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2.114.126.582': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.114.126.582': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5.114.126.582': [0.496, 1.6], 't2.114.126.582': [0.373, 1.6], 't4.114.126.582': [0.425, 1.6]}), 'mec-4'], [({'t4.111.126.583': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.111.126.583': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.111.126.583': [0.471, 1.6], 't3.111.126.583': [0.333, 1.6]}), 'mec-1'], [({'t4.112.126.584': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1.112.126.584': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4.112.126.584': [0.477, 1.6], 't1.112.126.584': [0.377, 1.6]}), 'mec-2'], [({'t2.114.126.585': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.114.126.585': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.114.126.585': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.114.126.585': [0.474, 1.6], 't4.114.126.585': [0.452, 1.6], 't3.114.126.585': [0.53, 1.6]}), 'mec-4'], [({'t4.111.126.586': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.111.126.586': [0.529, 1.6]}), 'mec-1'], [({'t1.110.126.587': {'wcet': 3, 'period': 20, 'deadline': 15}, 't5.110.126.587': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t1.110.126.587': [0.409, 1.6], 't5.110.126.587': [0.519, 1.6]}), 'osboxes-0'], [({'t4.112.126.588': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.112.126.588': [0.36, 1.6]}), 'mec-2'], [({'t4.116.126.589': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.116.126.589': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.116.126.589': [0.416, 1.6], 't3.116.126.589': [0.422, 1.6]}), 'mec-6'], [({'t5.113.126.590': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5.113.126.590': [0.352, 1.6]}), 'mec-3'], [({'t2.114.126.591': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.114.126.591': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.114.126.591': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2.114.126.591': [0.384, 1.6], 't4.114.126.591': [0.327, 1.6], 't5.114.126.591': [0.526, 1.6]}), 'mec-4'], [({'t1.113.126.592': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t1.113.126.592': [0.489, 1.6]}), 'mec-3'], [({'t2.116.126.593': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.116.126.593': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.116.126.593': [0.384, 1.6], 't3.116.126.593': [0.478, 1.6]}), 'mec-6'], [({'t4.116.126.594': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.116.126.594': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.116.126.594': [0.426, 1.6], 't3.116.126.594': [0.55, 1.6]}), 'mec-6'], [({'t2.110.126.595': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.110.126.595': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.110.126.595': [0.319, 1.6], 't3.110.126.595': [0.34, 1.6]}), 'osboxes-0'], [({'t3.116.126.596': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.116.126.596': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3.116.126.596': [0.499, 1.6], 't2.116.126.596': [0.431, 1.6]}), 'mec-6'], [({'t4.114.126.597': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.114.126.597': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.114.126.597': [0.52, 1.6], 't2.114.126.597': [0.476, 1.6]}), 'mec-4'], [({'t3.115.126.598': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5.115.126.598': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1.115.126.598': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3.115.126.598': [0.303, 1.6], 't5.115.126.598': [0.385, 1.6], 't1.115.126.598': [0.405, 1.6]}), 'mec-5'], [({'t4.114.126.599': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.114.126.599': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.114.126.599': [0.486, 1.6], 't3.114.126.599': [0.324, 1.6]}), 'mec-4'], [({'t2.113.126.600': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2.113.126.600': [0.314, 1.6]}), 'mec-3'], [({'t3.115.126.601': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.115.126.601': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.115.126.601': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3.115.126.601': [0.398, 1.6], 't4.115.126.601': [0.313, 1.6], 't5.115.126.601': [0.401, 1.6]}), 'mec-5'], [({'t3.113.126.602': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3.113.126.602': [0.395, 1.6]}), 'mec-3'], [({'t2.116.126.603': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.116.126.603': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.116.126.603': [0.509, 1.6], 't4.116.126.603': [0.466, 1.6]}), 'mec-6'], [({'t3.111.126.604': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.111.126.604': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3.111.126.604': [0.477, 1.6], 't2.111.126.604': [0.547, 1.6]}), 'mec-1'], [({'t2.110.126.605': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.110.126.605': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.110.126.605': [0.443, 1.6], 't4.110.126.605': [0.313, 1.6]}), 'osboxes-0'], [({'t2.115.126.606': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2.115.126.606': [0.397, 1.6]}), 'mec-5'], [({'t4.114.126.607': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.114.126.607': [0.375, 1.6]}), 'mec-4'], [({'t5.110.126.608': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5.110.126.608': [0.302, 1.6]}), 'osboxes-0'], [({'t4.112.126.609': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.112.126.609': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.112.126.609': [0.448, 1.6], 't3.112.126.609': [0.433, 1.6]}), 'mec-2'], [({'t4.114.126.610': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.114.126.610': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.114.126.610': [0.322, 1.6], 't3.114.126.610': [0.456, 1.6]}), 'mec-4'], [({'t2.113.126.611': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.113.126.611': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.113.126.611': [0.407, 1.6], 't4.113.126.611': [0.311, 1.6]}), 'mec-3'], [({'t5.116.126.612': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3.116.126.612': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5.116.126.612': [0.323, 1.6], 't3.116.126.612': [0.424, 1.6]}), 'mec-6'], [({'t3.111.126.613': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3.111.126.613': [0.328, 1.6]}), 'mec-1'], [({'t4.111.126.614': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1.111.126.614': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4.111.126.614': [0.462, 1.6], 't1.111.126.614': [0.423, 1.6]}), 'mec-1'], [({'t3.111.126.615': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.111.126.615': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3.111.126.615': [0.452, 1.6], 't2.111.126.615': [0.398, 1.6]}), 'mec-1'], [({'t1.116.126.616': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t1.116.126.616': [0.488, 1.6]}), 'mec-6'], [({'t3.110.126.617': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.110.126.617': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.110.126.617': [0.425, 1.6], 't4.110.126.617': [0.461, 1.6]}), 'osboxes-0'], [({'t4.116.126.618': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.116.126.618': [0.513, 1.6]}), 'mec-6'], [({'t4.110.126.619': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.110.126.619': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3.110.126.619': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.110.126.619': [0.472, 1.6], 't5.110.126.619': [0.394, 1.6], 't3.110.126.619': [0.362, 1.6]}), 'osboxes-0'], [({'t4.110.126.620': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.110.126.620': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.110.126.620': [0.478, 1.6], 't3.110.126.620': [0.447, 1.6]}), 'osboxes-0'], [({'t3.110.126.621': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.110.126.621': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.110.126.621': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.110.126.621': [0.327, 1.6], 't2.110.126.621': [0.356, 1.6], 't4.110.126.621': [0.524, 1.6]}), 'osboxes-0'], [({'t4.116.126.622': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.116.126.622': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.116.126.622': [0.548, 1.6], 't3.116.126.622': [0.302, 1.6]}), 'mec-6'], [({'t3.112.126.623': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5.112.126.623': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3.112.126.623': [0.53, 1.6], 't5.112.126.623': [0.433, 1.6]}), 'mec-2'], [({'t2.115.126.624': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.115.126.624': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5.115.126.624': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2.115.126.624': [0.455, 1.6], 't3.115.126.624': [0.448, 1.6], 't5.115.126.624': [0.344, 1.6]}), 'mec-5'], [({'t5.116.126.625': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3.116.126.625': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5.116.126.625': [0.334, 1.6], 't3.116.126.625': [0.392, 1.6]}), 'mec-6'], [({'t3.115.126.626': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.115.126.626': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3.115.126.626': [0.499, 1.6], 't2.115.126.626': [0.506, 1.6]}), 'mec-5'], [({'t4.112.126.627': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.112.126.627': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.112.126.627': [0.474, 1.6], 't2.112.126.627': [0.327, 1.6]}), 'mec-2'], [({'t4.112.126.628': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.112.126.628': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.112.126.628': [0.342, 1.6], 't3.112.126.628': [0.414, 1.6]}), 'mec-2'], [({'t2.115.126.629': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.115.126.629': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.115.126.629': [0.326, 1.6], 't4.115.126.629': [0.418, 1.6]}), 'mec-5'], [({'t2.110.126.630': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5.110.126.630': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2.110.126.630': [0.539, 1.6], 't5.110.126.630': [0.353, 1.6]}), 'osboxes-0'], [({'t4.114.126.631': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.114.126.631': [0.444, 1.6]}), 'mec-4'], [({'t4.114.126.632': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.114.126.632': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.114.126.632': [0.409, 1.6], 't3.114.126.632': [0.505, 1.6]}), 'mec-4'], [({'t4.114.126.633': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.114.126.633': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.114.126.633': [0.391, 1.6], 't3.114.126.633': [0.416, 1.6]}), 'mec-4'], [({'t1.112.126.634': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3.112.126.634': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1.112.126.634': [0.534, 1.6], 't3.112.126.634': [0.334, 1.6]}), 'mec-2'], [({'t3.112.126.635': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1.112.126.635': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3.112.126.635': [0.549, 1.6], 't1.112.126.635': [0.322, 1.6]}), 'mec-2'], [({'t2.111.126.636': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.111.126.636': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.111.126.636': [0.447, 1.6], 't3.111.126.636': [0.475, 1.6]}), 'mec-1'], [({'t2.113.126.637': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.113.126.637': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.113.126.637': [0.424, 1.6], 't3.113.126.637': [0.303, 1.6]}), 'mec-3'], [({'t2.111.126.638': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.111.126.638': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.111.126.638': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.111.126.638': [0.487, 1.6], 't3.111.126.638': [0.344, 1.6], 't4.111.126.638': [0.451, 1.6]}), 'mec-1'], [({'t4.115.126.639': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.115.126.639': [0.461, 1.6]}), 'mec-5'], [({'t1.114.126.640': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4.114.126.640': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.114.126.640': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t1.114.126.640': [0.454, 1.6], 't4.114.126.640': [0.521, 1.6], 't2.114.126.640': [0.336, 1.6]}), 'mec-4'], [({'t3.113.126.641': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5.113.126.641': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4.113.126.641': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.113.126.641': [0.436, 1.6], 't5.113.126.641': [0.48, 1.6], 't4.113.126.641': [0.542, 1.6]}), 'mec-3'], [({'t1.114.126.642': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3.114.126.642': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1.114.126.642': [0.425, 1.6], 't3.114.126.642': [0.444, 1.6]}), 'mec-4'], [({'t4.116.126.643': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.116.126.643': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.116.126.643': [0.383, 1.6], 't5.116.126.643': [0.312, 1.6]}), 'mec-6'], [({'t3.112.126.644': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.112.126.644': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.112.126.644': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3.112.126.644': [0.497, 1.6], 't4.112.126.644': [0.356, 1.6], 't5.112.126.644': [0.307, 1.6]}), 'mec-2'], [({'t3.110.126.645': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.110.126.645': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.110.126.645': [0.494, 1.6], 't4.110.126.645': [0.458, 1.6]}), 'osboxes-0'], [({'t4.111.126.646': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.111.126.646': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.111.126.646': [0.483, 1.6], 't3.111.126.646': [0.512, 1.6]}), 'mec-1'], [({'t3.110.126.647': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3.110.126.647': [0.471, 1.6]}), 'osboxes-0'], [({'t2.112.126.648': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.112.126.648': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.112.126.648': [0.31, 1.6], 't3.112.126.648': [0.314, 1.6]}), 'mec-2'], [({'t2.115.126.649': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5.115.126.649': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2.115.126.649': [0.434, 1.6], 't5.115.126.649': [0.485, 1.6]}), 'mec-5'], [({'t2.114.126.650': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.114.126.650': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.114.126.650': [0.474, 1.6], 't4.114.126.650': [0.473, 1.6]}), 'mec-4'], [({'t2.110.126.651': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.110.126.651': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.110.126.651': [0.487, 1.6], 't3.110.126.651': [0.488, 1.6]}), 'osboxes-0'], [({'t3.115.126.652': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.115.126.652': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3.115.126.652': [0.536, 1.6], 't2.115.126.652': [0.334, 1.6]}), 'mec-5'], [({'t4.113.126.653': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.113.126.653': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.113.126.653': [0.339, 1.6], 't3.113.126.653': [0.494, 1.6]}), 'mec-3'], [({'t3.112.126.654': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.112.126.654': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.112.126.654': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.112.126.654': [0.474, 1.6], 't2.112.126.654': [0.533, 1.6], 't4.112.126.654': [0.333, 1.6]}), 'mec-2'], [({'t5.110.126.655': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1.110.126.655': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t5.110.126.655': [0.497, 1.6], 't1.110.126.655': [0.378, 1.6]}), 'osboxes-0'], [({'t5.115.126.656': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3.115.126.656': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5.115.126.656': [0.429, 1.6], 't3.115.126.656': [0.41, 1.6]}), 'mec-5'], [({'t3.110.126.657': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.110.126.657': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.110.126.657': [0.537, 1.6], 't4.110.126.657': [0.319, 1.6]}), 'osboxes-0'], [({'t4.114.126.658': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.114.126.658': [0.417, 1.6]}), 'mec-4'], [({'t5.110.126.659': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5.110.126.659': [0.41, 1.6]}), 'osboxes-0'], [({'t4.116.126.660': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.116.126.660': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.116.126.660': [0.474, 1.6], 't3.116.126.660': [0.474, 1.6]}), 'mec-6'], [({'t4.116.126.661': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.116.126.661': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.116.126.661': [0.492, 1.6], 't5.116.126.661': [0.328, 1.6]}), 'mec-6'], [({'t4.111.126.662': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1.111.126.662': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2.111.126.662': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.111.126.662': [0.332, 1.6], 't1.111.126.662': [0.329, 1.6], 't2.111.126.662': [0.316, 1.6]}), 'mec-1'], [({'t2.110.126.663': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.110.126.663': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.110.126.663': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.110.126.663': [0.492, 1.6], 't3.110.126.663': [0.488, 1.6], 't4.110.126.663': [0.355, 1.6]}), 'osboxes-0'], [({'t2.110.126.664': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.110.126.664': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.110.126.664': [0.548, 1.6], 't3.110.126.664': [0.318, 1.6]}), 'osboxes-0'], [({'t1.112.126.665': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3.112.126.665': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1.112.126.665': [0.487, 1.6], 't3.112.126.665': [0.35, 1.6]}), 'mec-2'], [({'t3.115.126.666': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5.115.126.666': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3.115.126.666': [0.411, 1.6], 't5.115.126.666': [0.389, 1.6]}), 'mec-5'], [({'t4.110.126.667': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.110.126.667': [0.332, 1.6]}), 'osboxes-0'], [({'t1.112.126.668': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4.112.126.668': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1.112.126.668': [0.361, 1.6], 't4.112.126.668': [0.534, 1.6]}), 'mec-2'], [({'t5.116.126.669': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4.116.126.669': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5.116.126.669': [0.502, 1.6], 't4.116.126.669': [0.315, 1.6]}), 'mec-6'], [({'t4.114.126.670': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.114.126.670': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.114.126.670': [0.547, 1.6], 't5.114.126.670': [0.34, 1.6]}), 'mec-4'], [({'t3.110.126.671': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.110.126.671': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.110.126.671': [0.404, 1.6], 't4.110.126.671': [0.426, 1.6]}), 'osboxes-0'], [({'t4.112.126.672': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.112.126.672': [0.532, 1.6]}), 'mec-2'], [({'t2.110.126.673': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.110.126.673': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.110.126.673': [0.307, 1.6], 't4.110.126.673': [0.465, 1.6]}), 'osboxes-0'], [({'t4.114.126.674': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.114.126.674': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.114.126.674': [0.367, 1.6], 't5.114.126.674': [0.341, 1.6]}), 'mec-4'], [({'t4.113.126.675': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.113.126.675': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.113.126.675': [0.542, 1.6], 't3.113.126.675': [0.441, 1.6]}), 'mec-3'], [({'t2.113.126.676': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.113.126.676': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.113.126.676': [0.464, 1.6], 't3.113.126.676': [0.434, 1.6]}), 'mec-3'], [({'t3.110.126.677': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3.110.126.677': [0.457, 1.6]}), 'osboxes-0'], [({'t5.116.126.678': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5.116.126.678': [0.351, 1.6]}), 'mec-6'], [({'t4.110.126.679': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.110.126.679': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.110.126.679': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.110.126.679': [0.441, 1.6], 't3.110.126.679': [0.497, 1.6], 't2.110.126.679': [0.433, 1.6]}), 'osboxes-0'], [({'t5.113.126.680': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1.113.126.680': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2.113.126.680': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5.113.126.680': [0.46, 1.6], 't1.113.126.680': [0.412, 1.6], 't2.113.126.680': [0.351, 1.6]}), 'mec-3'], [({'t3.113.126.681': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5.113.126.681': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3.113.126.681': [0.376, 1.6], 't5.113.126.681': [0.467, 1.6]}), 'mec-3'], [({'t3.113.126.682': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3.113.126.682': [0.488, 1.6]}), 'mec-3'], [({'t3.111.126.683': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.111.126.683': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.111.126.683': [0.328, 1.6], 't4.111.126.683': [0.375, 1.6]}), 'mec-1'], [({'t2.113.126.684': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.113.126.684': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.113.126.684': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2.113.126.684': [0.521, 1.6], 't4.113.126.684': [0.546, 1.6], 't5.113.126.684': [0.445, 1.6]}), 'mec-3'], [({'t3.115.126.685': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5.115.126.685': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3.115.126.685': [0.529, 1.6], 't5.115.126.685': [0.459, 1.6]}), 'mec-5'], [({'t1.112.126.686': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2.112.126.686': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t1.112.126.686': [0.526, 1.6], 't2.112.126.686': [0.47, 1.6]}), 'mec-2'], [({'t3.111.126.687': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5.111.126.687': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3.111.126.687': [0.389, 1.6], 't5.111.126.687': [0.526, 1.6]}), 'mec-1'], [({'t4.116.126.688': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.116.126.688': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.116.126.688': [0.383, 1.6], 't5.116.126.688': [0.306, 1.6]}), 'mec-6'], [({'t3.112.126.689': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3.112.126.689': [0.438, 1.6]}), 'mec-2'], [({'t4.111.126.690': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.111.126.690': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.111.126.690': [0.473, 1.6], 't2.111.126.690': [0.336, 1.6]}), 'mec-1'], [({'t4.110.126.691': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.110.126.691': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.110.126.691': [0.51, 1.6], 't5.110.126.691': [0.469, 1.6]}), 'osboxes-0'], [({'t4.112.126.692': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.112.126.692': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.112.126.692': [0.396, 1.6], 't3.112.126.692': [0.408, 1.6]}), 'mec-2'], [({'t2.111.126.693': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.111.126.693': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.111.126.693': [0.525, 1.6], 't3.111.126.693': [0.423, 1.6]}), 'mec-1'], [({'t5.115.126.694': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4.115.126.694': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5.115.126.694': [0.498, 1.6], 't4.115.126.694': [0.476, 1.6]}), 'mec-5'], [({'t3.115.126.695': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3.115.126.695': [0.349, 1.6]}), 'mec-5'], [({'t4.113.126.696': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.113.126.696': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.113.126.696': [0.459, 1.6], 't3.113.126.696': [0.461, 1.6]}), 'mec-3'], [({'t1.111.126.697': {'wcet': 3, 'period': 20, 'deadline': 15}, 't4.111.126.697': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t1.111.126.697': [0.546, 1.6], 't4.111.126.697': [0.439, 1.6]}), 'mec-1'], [({'t3.115.126.698': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.115.126.698': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.115.126.698': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.115.126.698': [0.417, 1.6], 't2.115.126.698': [0.468, 1.6], 't4.115.126.698': [0.336, 1.6]}), 'mec-5'], [({'t2.116.126.699': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.116.126.699': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.116.126.699': [0.361, 1.6], 't3.116.126.699': [0.425, 1.6]}), 'mec-6'], [({'t5.115.126.700': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5.115.126.700': [0.414, 1.6]}), 'mec-5'], [({'t5.116.126.701': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2.116.126.701': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.116.126.701': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5.116.126.701': [0.491, 1.6], 't2.116.126.701': [0.329, 1.6], 't4.116.126.701': [0.305, 1.6]}), 'mec-6'], [({'t3.115.126.702': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.115.126.702': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.115.126.702': [0.474, 1.6], 't4.115.126.702': [0.499, 1.6]}), 'mec-5'], [({'t3.112.126.703': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5.112.126.703': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3.112.126.703': [0.344, 1.6], 't5.112.126.703': [0.378, 1.6]}), 'mec-2'], [({'t3.114.126.704': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.114.126.704': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.114.126.704': [0.334, 1.6], 't4.114.126.704': [0.464, 1.6]}), 'mec-4'], [({'t2.115.126.705': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.115.126.705': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.115.126.705': [0.478, 1.6], 't3.115.126.705': [0.5, 1.6]}), 'mec-5'], [({'t3.112.126.706': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.112.126.706': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.112.126.706': [0.428, 1.6], 't4.112.126.706': [0.499, 1.6]}), 'mec-2'], [({'t3.116.126.707': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.116.126.707': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.116.126.707': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.116.126.707': [0.353, 1.6], 't2.116.126.707': [0.478, 1.6], 't4.116.126.707': [0.477, 1.6]}), 'mec-6'], [({'t5.114.126.708': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3.114.126.708': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5.114.126.708': [0.375, 1.6], 't3.114.126.708': [0.317, 1.6]}), 'mec-4'], [({'t5.112.126.709': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3.112.126.709': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5.112.126.709': [0.432, 1.6], 't3.112.126.709': [0.379, 1.6]}), 'mec-2'], [({'t4.115.126.710': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.115.126.710': [0.432, 1.6]}), 'mec-5'], [({'t3.115.126.711': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.115.126.711': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.115.126.711': [0.318, 1.6], 't4.115.126.711': [0.401, 1.6]}), 'mec-5'], [({'t3.111.126.712': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3.111.126.712': [0.55, 1.6]}), 'mec-1'], [({'t3.115.126.713': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3.115.126.713': [0.42, 1.6]}), 'mec-5'], [({'t2.111.126.714': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.111.126.714': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.111.126.714': [0.359, 1.6], 't3.111.126.714': [0.376, 1.6]}), 'mec-1'], [({'t2.113.126.715': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5.113.126.715': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2.113.126.715': [0.518, 1.6], 't5.113.126.715': [0.36, 1.6]}), 'mec-3'], [({'t2.111.126.716': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5.111.126.716': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2.111.126.716': [0.308, 1.6], 't5.111.126.716': [0.487, 1.6]}), 'mec-1'], [({'t4.112.126.717': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.112.126.717': [0.514, 1.6]}), 'mec-2'], [({'t5.115.126.718': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5.115.126.718': [0.512, 1.6]}), 'mec-5'], [({'t3.116.126.719': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.116.126.719': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3.116.126.719': [0.494, 1.6], 't2.116.126.719': [0.437, 1.6]}), 'mec-6'], [({'t3.114.126.720': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.114.126.720': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.114.126.720': [0.435, 1.6], 't4.114.126.720': [0.36, 1.6]}), 'mec-4'], [({'t5.111.126.721': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1.111.126.721': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3.111.126.721': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5.111.126.721': [0.362, 1.6], 't1.111.126.721': [0.397, 1.6], 't3.111.126.721': [0.473, 1.6]}), 'mec-1'], [({'t5.113.126.722': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4.113.126.722': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5.113.126.722': [0.41, 1.6], 't4.113.126.722': [0.374, 1.6]}), 'mec-3'], [({'t4.112.126.723': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.112.126.723': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.112.126.723': [0.468, 1.6], 't2.112.126.723': [0.455, 1.6]}), 'mec-2'], [({'t3.113.126.724': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3.113.126.724': [0.397, 1.6]}), 'mec-3'], [({'t3.112.126.725': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1.112.126.725': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3.112.126.725': [0.439, 1.6], 't1.112.126.725': [0.513, 1.6]}), 'mec-2'], [({'t5.111.126.726': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3.111.126.726': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5.111.126.726': [0.487, 1.6], 't3.111.126.726': [0.546, 1.6]}), 'mec-1'], [({'t5.116.126.727': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2.116.126.727': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5.116.126.727': [0.472, 1.6], 't2.116.126.727': [0.384, 1.6]}), 'mec-6'], [({'t3.116.126.728': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5.116.126.728': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3.116.126.728': [0.549, 1.6], 't5.116.126.728': [0.343, 1.6]}), 'mec-6'], [({'t3.112.126.729': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3.112.126.729': [0.306, 1.6]}), 'mec-2'], [({'t5.113.126.730': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4.113.126.730': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5.113.126.730': [0.499, 1.6], 't4.113.126.730': [0.468, 1.6]}), 'mec-3'], [({'t2.116.126.731': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2.116.126.731': [0.465, 1.6]}), 'mec-6'], [({'t4.114.126.732': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.114.126.732': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.114.126.732': [0.493, 1.6], 't2.114.126.732': [0.441, 1.6]}), 'mec-4'], [({'t1.111.126.733': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t1.111.126.733': [0.541, 1.6]}), 'mec-1'], [({'t3.116.126.734': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.116.126.734': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.116.126.734': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.116.126.734': [0.413, 1.6], 't2.116.126.734': [0.504, 1.6], 't4.116.126.734': [0.435, 1.6]}), 'mec-6'], [({'t4.112.126.735': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.112.126.735': [0.479, 1.6]}), 'mec-2'], [({'t4.115.126.736': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.115.126.736': [0.312, 1.6]}), 'mec-5'], [({'t2.111.126.737': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5.111.126.737': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2.111.126.737': [0.443, 1.6], 't5.111.126.737': [0.546, 1.6]}), 'mec-1'], [({'t4.116.126.738': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.116.126.738': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5.116.126.738': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.116.126.738': [0.316, 1.6], 't2.116.126.738': [0.483, 1.6], 't5.116.126.738': [0.53, 1.6]}), 'mec-6'], [({'t2.112.126.739': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1.112.126.739': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t2.112.126.739': [0.373, 1.6], 't1.112.126.739': [0.353, 1.6]}), 'mec-2'], [({'t4.116.126.740': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.116.126.740': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.116.126.740': [0.33, 1.6], 't5.116.126.740': [0.325, 1.6]}), 'mec-6'], [({'t2.113.126.741': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5.113.126.741': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4.113.126.741': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.113.126.741': [0.34, 1.6], 't5.113.126.741': [0.471, 1.6], 't4.113.126.741': [0.524, 1.6]}), 'mec-3'], [({'t3.112.126.742': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.112.126.742': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.112.126.742': [0.47, 1.6], 't4.112.126.742': [0.326, 1.6]}), 'mec-2'], [({'t2.116.126.743': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.116.126.743': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.116.126.743': [0.361, 1.6], 't3.116.126.743': [0.518, 1.6]}), 'mec-6'], [({'t4.116.126.744': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.116.126.744': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.116.126.744': [0.502, 1.6], 't5.116.126.744': [0.442, 1.6]}), 'mec-6'], [({'t4.116.126.745': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.116.126.745': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.116.126.745': [0.399, 1.6], 't2.116.126.745': [0.385, 1.6]}), 'mec-6'], [({'t2.116.126.746': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.116.126.746': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.116.126.746': [0.439, 1.6], 't3.116.126.746': [0.377, 1.6]}), 'mec-6'], [({'t2.112.126.747': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.112.126.747': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.112.126.747': [0.503, 1.6], 't4.112.126.747': [0.485, 1.6]}), 'mec-2'], [({'t1.113.126.748': {'wcet': 3, 'period': 20, 'deadline': 15}, 't5.113.126.748': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2.113.126.748': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t1.113.126.748': [0.471, 1.6], 't5.113.126.748': [0.397, 1.6], 't2.113.126.748': [0.368, 1.6]}), 'mec-3'], [({'t2.115.126.749': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.115.126.749': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.115.126.749': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.115.126.749': [0.412, 1.6], 't3.115.126.749': [0.421, 1.6], 't4.115.126.749': [0.504, 1.6]}), 'mec-5'], [({'t2.114.126.750': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.114.126.750': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.114.126.750': [0.333, 1.6], 't4.114.126.750': [0.325, 1.6]}), 'mec-4'], [({'t4.114.126.751': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.114.126.751': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.114.126.751': [0.485, 1.6], 't2.114.126.751': [0.339, 1.6]}), 'mec-4'], [({'t2.113.126.752': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.113.126.752': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.113.126.752': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.113.126.752': [0.482, 1.6], 't4.113.126.752': [0.306, 1.6], 't3.113.126.752': [0.379, 1.6]}), 'mec-3'], [({'t5.115.126.753': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3.115.126.753': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5.115.126.753': [0.429, 1.6], 't3.115.126.753': [0.498, 1.6]}), 'mec-5'], [({'t2.114.126.754': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.114.126.754': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.114.126.754': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.114.126.754': [0.473, 1.6], 't4.114.126.754': [0.319, 1.6], 't3.114.126.754': [0.411, 1.6]}), 'mec-4'], [({'t3.111.126.755': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.111.126.755': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3.111.126.755': [0.34, 1.6], 't2.111.126.755': [0.535, 1.6]}), 'mec-1'], [({'t2.113.126.756': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.113.126.756': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.113.126.756': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.113.126.756': [0.436, 1.6], 't3.113.126.756': [0.512, 1.6], 't4.113.126.756': [0.501, 1.6]}), 'mec-3'], [({'t4.113.126.757': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.113.126.757': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.113.126.757': [0.314, 1.6], 't5.113.126.757': [0.519, 1.6]}), 'mec-3'], [({'t5.111.126.758': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4.111.126.758': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1.111.126.758': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t5.111.126.758': [0.47, 1.6], 't4.111.126.758': [0.399, 1.6], 't1.111.126.758': [0.48, 1.6]}), 'mec-1'], [({'t5.113.126.759': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4.113.126.759': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5.113.126.759': [0.486, 1.6], 't4.113.126.759': [0.305, 1.6]}), 'mec-3'], [({'t1.114.126.760': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t1.114.126.760': [0.47, 1.6]}), 'mec-4'], [({'t2.112.126.761': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2.112.126.761': [0.424, 1.6]}), 'mec-2'], [({'t3.114.126.762': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5.114.126.762': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3.114.126.762': [0.421, 1.6], 't5.114.126.762': [0.301, 1.6]}), 'mec-4'], [({'t2.113.126.763': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.113.126.763': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.113.126.763': [0.335, 1.6], 't3.113.126.763': [0.403, 1.6]}), 'mec-3'], [({'t4.112.126.764': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.112.126.764': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.112.126.764': [0.464, 1.6], 't2.112.126.764': [0.542, 1.6]}), 'mec-2'], [({'t4.111.126.765': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.111.126.765': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.111.126.765': [0.306, 1.6], 't3.111.126.765': [0.432, 1.6]}), 'mec-1'], [({'t4.113.126.766': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.113.126.766': [0.416, 1.6]}), 'mec-3'], [({'t4.112.126.767': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.112.126.767': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.112.126.767': [0.393, 1.6], 't3.112.126.767': [0.508, 1.6]}), 'mec-2'], [({'t5.112.126.768': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1.112.126.768': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2.112.126.768': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5.112.126.768': [0.536, 1.6], 't1.112.126.768': [0.49, 1.6], 't2.112.126.768': [0.34, 1.6]}), 'mec-2'], [({'t4.112.126.769': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.112.126.769': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.112.126.769': [0.458, 1.6], 't3.112.126.769': [0.446, 1.6]}), 'mec-2'], [({'t2.114.126.770': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.114.126.770': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.114.126.770': [0.434, 1.6], 't4.114.126.770': [0.533, 1.6]}), 'mec-4'], [({'t2.113.126.771': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.113.126.771': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.113.126.771': [0.438, 1.6], 't4.113.126.771': [0.492, 1.6]}), 'mec-3'], [({'t2.114.126.772': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.114.126.772': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.114.126.772': [0.336, 1.6], 't3.114.126.772': [0.312, 1.6]}), 'mec-4'], [({'t3.115.126.773': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.115.126.773': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.115.126.773': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3.115.126.773': [0.362, 1.6], 't4.115.126.773': [0.475, 1.6], 't2.115.126.773': [0.54, 1.6]}), 'mec-5'], [({'t2.114.126.774': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.114.126.774': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.114.126.774': [0.424, 1.6], 't4.114.126.774': [0.476, 1.6]}), 'mec-4'], [({'t2.115.126.775': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5.115.126.775': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2.115.126.775': [0.456, 1.6], 't5.115.126.775': [0.512, 1.6]}), 'mec-5'], [({'t3.111.126.776': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1.111.126.776': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3.111.126.776': [0.422, 1.6], 't1.111.126.776': [0.472, 1.6]}), 'mec-1'], [({'t4.113.126.777': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.113.126.777': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.113.126.777': [0.442, 1.6], 't5.113.126.777': [0.369, 1.6]}), 'mec-3'], [({'t4.113.126.778': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.113.126.778': [0.535, 1.6]}), 'mec-3'], [({'t5.115.126.779': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4.115.126.779': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5.115.126.779': [0.349, 1.6], 't4.115.126.779': [0.428, 1.6]}), 'mec-5'], [({'t4.114.126.780': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.114.126.780': [0.402, 1.6]}), 'mec-4'], [({'t3.111.126.781': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5.111.126.781': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2.111.126.781': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3.111.126.781': [0.361, 1.6], 't5.111.126.781': [0.361, 1.6], 't2.111.126.781': [0.42, 1.6]}), 'mec-1'], [({'t3.113.126.782': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.113.126.782': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3.113.126.782': [0.432, 1.6], 't2.113.126.782': [0.426, 1.6]}), 'mec-3'], [({'t3.111.126.783': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3.111.126.783': [0.52, 1.6]}), 'mec-1'], [({'t2.111.126.784': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.111.126.784': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.111.126.784': [0.42, 1.6], 't4.111.126.784': [0.318, 1.6]}), 'mec-1'], [({'t2.115.126.785': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.115.126.785': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.115.126.785': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.115.126.785': [0.542, 1.6], 't3.115.126.785': [0.301, 1.6], 't4.115.126.785': [0.525, 1.6]}), 'mec-5'], [({'t4.113.126.786': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1.113.126.786': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3.113.126.786': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.113.126.786': [0.501, 1.6], 't1.113.126.786': [0.429, 1.6], 't3.113.126.786': [0.332, 1.6]}), 'mec-3'], [({'t1.111.126.787': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2.111.126.787': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t1.111.126.787': [0.385, 1.6], 't2.111.126.787': [0.355, 1.6]}), 'mec-1'], [({'t4.114.126.788': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.114.126.788': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.114.126.788': [0.326, 1.6], 't3.114.126.788': [0.33, 1.6]}), 'mec-4'], [({'t4.113.126.789': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.113.126.789': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3.113.126.789': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.113.126.789': [0.34, 1.6], 't5.113.126.789': [0.52, 1.6], 't3.113.126.789': [0.495, 1.6]}), 'mec-3'], [({'t3.111.126.790': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.111.126.790': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.111.126.790': [0.375, 1.6], 't4.111.126.790': [0.394, 1.6]}), 'mec-1'], [({'t2.113.126.791': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2.113.126.791': [0.466, 1.6]}), 'mec-3'], [({'t3.114.126.792': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.114.126.792': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3.114.126.792': [0.429, 1.6], 't2.114.126.792': [0.379, 1.6]}), 'mec-4'], [({'t4.111.126.793': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.111.126.793': [0.528, 1.6]}), 'mec-1'], [({'t3.112.126.794': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.112.126.794': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.112.126.794': [0.464, 1.6], 't4.112.126.794': [0.376, 1.6]}), 'mec-2'], [({'t4.114.126.795': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.114.126.795': [0.421, 1.6]}), 'mec-4'], [({'t4.115.126.796': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.115.126.796': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.115.126.796': [0.388, 1.6], 't3.115.126.796': [0.368, 1.6]}), 'mec-5'], [({'t2.112.126.797': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2.112.126.797': [0.533, 1.6]}), 'mec-2'], [({'t4.114.126.798': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.114.126.798': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.114.126.798': [0.479, 1.6], 't3.114.126.798': [0.525, 1.6]}), 'mec-4'], [({'t5.114.126.799': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3.114.126.799': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.114.126.799': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5.114.126.799': [0.439, 1.6], 't3.114.126.799': [0.429, 1.6], 't4.114.126.799': [0.31, 1.6]}), 'mec-4'], [({'t2.113.126.800': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5.113.126.800': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2.113.126.800': [0.407, 1.6], 't5.113.126.800': [0.334, 1.6]}), 'mec-3'], [({'t4.112.126.801': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.112.126.801': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.112.126.801': [0.423, 1.6], 't2.112.126.801': [0.342, 1.6]}), 'mec-2'], [({'t3.114.126.802': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5.114.126.802': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3.114.126.802': [0.321, 1.6], 't5.114.126.802': [0.322, 1.6]}), 'mec-4'], [({'t4.111.126.803': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.111.126.803': [0.329, 1.6]}), 'mec-1'], [({'t4.111.126.804': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.111.126.804': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.111.126.804': [0.308, 1.6], 't3.111.126.804': [0.337, 1.6]}), 'mec-1'], [({'t2.112.126.805': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2.112.126.805': [0.348, 1.6]}), 'mec-2'], [({'t4.114.126.806': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.114.126.806': [0.393, 1.6]}), 'mec-4'], [({'t1.111.126.807': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2.111.126.807': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t1.111.126.807': [0.344, 1.6], 't2.111.126.807': [0.343, 1.6]}), 'mec-1'], [({'t4.112.126.808': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.112.126.808': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.112.126.808': [0.537, 1.6], 't2.112.126.808': [0.49, 1.6]}), 'mec-2'], [({'t4.112.126.809': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.112.126.809': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.112.126.809': [0.514, 1.6], 't2.112.126.809': [0.354, 1.6]}), 'mec-2'], [({'t3.113.126.810': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.113.126.810': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.113.126.810': [0.386, 1.6], 't4.113.126.810': [0.524, 1.6]}), 'mec-3'], [({'t1.112.126.811': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3.112.126.811': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t1.112.126.811': [0.513, 1.6], 't3.112.126.811': [0.463, 1.6]}), 'mec-2'], [({'t5.112.126.812': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5.112.126.812': [0.39, 1.6]}), 'mec-2'], [({'t5.111.126.813': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2.111.126.813': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5.111.126.813': [0.466, 1.6], 't2.111.126.813': [0.406, 1.6]}), 'mec-1'], [({'t4.113.126.814': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.113.126.814': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.113.126.814': [0.408, 1.6], 't5.113.126.814': [0.404, 1.6]}), 'mec-3'], [({'t3.111.126.815': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1.111.126.815': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3.111.126.815': [0.336, 1.6], 't1.111.126.815': [0.464, 1.6]}), 'mec-1'], [({'t3.111.126.816': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3.111.126.816': [0.548, 1.6]}), 'mec-1'], [({'t3.112.126.817': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.112.126.817': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.112.126.817': [0.545, 1.6], 't4.112.126.817': [0.329, 1.6]}), 'mec-2'], [({'t3.111.126.818': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.111.126.818': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5.111.126.818': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3.111.126.818': [0.398, 1.6], 't2.111.126.818': [0.443, 1.6], 't5.111.126.818': [0.491, 1.6]}), 'mec-1'], [({'t5.113.126.819': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2.113.126.819': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.113.126.819': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5.113.126.819': [0.529, 1.6], 't2.113.126.819': [0.405, 1.6], 't4.113.126.819': [0.537, 1.6]}), 'mec-3'], [({'t2.111.126.820': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.111.126.820': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.111.126.820': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t2.111.126.820': [0.354, 1.6], 't3.111.126.820': [0.306, 1.6], 't4.111.126.820': [0.502, 1.6]}), 'mec-1'], [({'t3.113.126.821': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.113.126.821': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3.113.126.821': [0.523, 1.6], 't2.113.126.821': [0.501, 1.6]}), 'mec-3'], [({'t3.114.126.822': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3.114.126.822': [0.453, 1.6]}), 'mec-4'], [({'t3.114.126.823': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3.114.126.823': [0.341, 1.6]}), 'mec-4'], [({'t3.113.126.824': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.113.126.824': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.113.126.824': [0.501, 1.6], 't4.113.126.824': [0.482, 1.6]}), 'mec-3'], [({'t5.112.126.825': {'wcet': 3, 'period': 15, 'deadline': 12}, 't1.112.126.825': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t5.112.126.825': [0.467, 1.6], 't1.112.126.825': [0.446, 1.6]}), 'mec-2'], [({'t3.114.126.826': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.114.126.826': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3.114.126.826': [0.428, 1.6], 't2.114.126.826': [0.441, 1.6]}), 'mec-4'], [({'t4.112.126.827': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.112.126.827': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.112.126.827': [0.428, 1.6], 't5.112.126.827': [0.419, 1.6]}), 'mec-2'], [({'t3.113.126.828': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1.113.126.828': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t3.113.126.828': [0.313, 1.6], 't1.113.126.828': [0.52, 1.6]}), 'mec-3'], [({'t4.113.126.829': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.113.126.829': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.113.126.829': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.113.126.829': [0.526, 1.6], 't2.113.126.829': [0.473, 1.6], 't3.113.126.829': [0.503, 1.6]}), 'mec-3'], [({'t2.114.126.830': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.114.126.830': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5.114.126.830': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2.114.126.830': [0.386, 1.6], 't3.114.126.830': [0.302, 1.6], 't5.114.126.830': [0.453, 1.6]}), 'mec-4'], [({'t3.111.126.831': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.111.126.831': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.111.126.831': [0.345, 1.6], 't4.111.126.831': [0.457, 1.6]}), 'mec-1'], [({'t5.111.126.832': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3.111.126.832': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5.111.126.832': [0.338, 1.6], 't3.111.126.832': [0.391, 1.6]}), 'mec-1'], [({'t2.113.126.833': {'wcet': 1, 'period': 5, 'deadline': 4}, 't4.113.126.833': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.113.126.833': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.113.126.833': [0.33, 1.6], 't4.113.126.833': [0.334, 1.6], 't3.113.126.833': [0.387, 1.6]}), 'mec-3'], [({'t4.111.126.834': {'wcet': 1, 'period': 10, 'deadline': 9}, 't1.111.126.834': {'wcet': 3, 'period': 20, 'deadline': 15}, 't3.111.126.834': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.111.126.834': [0.549, 1.6], 't1.111.126.834': [0.463, 1.6], 't3.111.126.834': [0.317, 1.6]}), 'mec-1'], [({'t4.114.126.835': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.114.126.835': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.114.126.835': [0.482, 1.6], 't5.114.126.835': [0.479, 1.6]}), 'mec-4'], [({'t3.112.126.836': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5.112.126.836': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3.112.126.836': [0.429, 1.6], 't5.112.126.836': [0.524, 1.6]}), 'mec-2'], [({'t5.114.126.837': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2.114.126.837': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5.114.126.837': [0.507, 1.6], 't2.114.126.837': [0.451, 1.6]}), 'mec-4'], [({'t5.112.126.838': {'wcet': 3, 'period': 15, 'deadline': 12}, 't3.112.126.838': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t5.112.126.838': [0.414, 1.6], 't3.112.126.838': [0.547, 1.6]}), 'mec-2'], [({'t3.113.126.839': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5.113.126.839': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3.113.126.839': [0.528, 1.6], 't5.113.126.839': [0.442, 1.6]}), 'mec-3'], [({'t4.112.126.840': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.112.126.840': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.112.126.840': [0.542, 1.6], 't3.112.126.840': [0.345, 1.6]}), 'mec-2'], [({'t2.111.126.841': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.111.126.841': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.111.126.841': [0.376, 1.6], 't3.111.126.841': [0.538, 1.6]}), 'mec-1'], [({'t3.113.126.842': {'wcet': 2, 'period': 10, 'deadline': 8}, 't1.113.126.842': {'wcet': 3, 'period': 20, 'deadline': 15}, 't2.113.126.842': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3.113.126.842': [0.315, 1.6], 't1.113.126.842': [0.444, 1.6], 't2.113.126.842': [0.437, 1.6]}), 'mec-3'], [({'t4.111.126.843': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.111.126.843': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.111.126.843': [0.514, 1.6], 't3.111.126.843': [0.307, 1.6]}), 'mec-1'], [({'t4.112.126.844': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.112.126.844': [0.443, 1.6]}), 'mec-2'], [({'t4.112.126.845': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.112.126.845': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.112.126.845': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.112.126.845': [0.364, 1.6], 't3.112.126.845': [0.342, 1.6], 't2.112.126.845': [0.311, 1.6]}), 'mec-2'], [({'t5.112.126.846': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2.112.126.846': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t5.112.126.846': [0.549, 1.6], 't2.112.126.846': [0.469, 1.6]}), 'mec-2'], [({'t4.114.126.847': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.114.126.847': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.114.126.847': [0.334, 1.6], 't3.114.126.847': [0.374, 1.6]}), 'mec-4'], [({'t3.111.126.848': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5.111.126.848': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3.111.126.848': [0.539, 1.6], 't5.111.126.848': [0.307, 1.6]}), 'mec-1'], [({'t4.112.126.849': {'wcet': 1, 'period': 10, 'deadline': 9}, 't3.112.126.849': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t4.112.126.849': [0.323, 1.6], 't3.112.126.849': [0.515, 1.6]}), 'mec-2'], [({'t3.112.126.850': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t3.112.126.850': [0.498, 1.6]}), 'mec-2'], [({'t4.113.126.851': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t4.113.126.851': [0.366, 1.6]}), 'mec-3'], [({'t3.111.126.852': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5.111.126.852': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2.111.126.852': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3.111.126.852': [0.372, 1.6], 't5.111.126.852': [0.389, 1.6], 't2.111.126.852': [0.351, 1.6]}), 'mec-1'], [({'t3.112.126.853': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5.112.126.853': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3.112.126.853': [0.334, 1.6], 't5.112.126.853': [0.528, 1.6]}), 'mec-2'], [({'t3.114.126.854': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.114.126.854': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5.114.126.854': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t3.114.126.854': [0.366, 1.6], 't2.114.126.854': [0.541, 1.6], 't5.114.126.854': [0.376, 1.6]}), 'mec-4'], [({'t2.113.126.855': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5.113.126.855': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2.113.126.855': [0.376, 1.6], 't5.113.126.855': [0.47, 1.6]}), 'mec-3'], [({'t2.112.126.856': {'wcet': 1, 'period': 5, 'deadline': 4}, 't3.112.126.856': {'wcet': 2, 'period': 10, 'deadline': 8}}, {'t2.112.126.856': [0.414, 1.6], 't3.112.126.856': [0.421, 1.6]}), 'mec-2'], [({'t2.114.126.857': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t2.114.126.857': [0.466, 1.6]}), 'mec-4'], [({'t5.111.126.858': {'wcet': 3, 'period': 15, 'deadline': 12}, 't4.111.126.858': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t5.111.126.858': [0.411, 1.6], 't4.111.126.858': [0.494, 1.6]}), 'mec-1'], [({'t3.112.126.859': {'wcet': 2, 'period': 10, 'deadline': 8}, 't5.112.126.859': {'wcet': 3, 'period': 15, 'deadline': 12}, 't2.112.126.859': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3.112.126.859': [0.472, 1.6], 't5.112.126.859': [0.474, 1.6], 't2.112.126.859': [0.51, 1.6]}), 'mec-2'], [({'t4.111.126.860': {'wcet': 1, 'period': 10, 'deadline': 9}, 't5.111.126.860': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t4.111.126.860': [0.401, 1.6], 't5.111.126.860': [0.535, 1.6]}), 'mec-1'], [({'t3.112.126.861': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.112.126.861': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3.112.126.861': [0.433, 1.6], 't2.112.126.861': [0.35, 1.6]}), 'mec-2'], [({'t3.113.126.862': {'wcet': 2, 'period': 10, 'deadline': 8}, 't2.113.126.862': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t3.113.126.862': [0.362, 1.6], 't2.113.126.862': [0.341, 1.6]}), 'mec-3'], [({'t4.112.126.863': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.112.126.863': {'wcet': 1, 'period': 5, 'deadline': 4}, 't1.112.126.863': {'wcet': 3, 'period': 20, 'deadline': 15}}, {'t4.112.126.863': [0.422, 1.6], 't2.112.126.863': [0.534, 1.6], 't1.112.126.863': [0.361, 1.6]}), 'mec-2'], [({'t4.111.126.864': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.111.126.864': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.111.126.864': [0.394, 1.6], 't2.111.126.864': [0.513, 1.6]}), 'mec-1'], [({'t2.114.126.865': {'wcet': 1, 'period': 5, 'deadline': 4}, 't5.114.126.865': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t2.114.126.865': [0.47, 1.6], 't5.114.126.865': [0.309, 1.6]}), 'mec-4'], [({'t3.114.126.866': {'wcet': 2, 'period': 10, 'deadline': 8}, 't4.114.126.866': {'wcet': 1, 'period': 10, 'deadline': 9}}, {'t3.114.126.866': [0.472, 1.6], 't4.114.126.866': [0.334, 1.6]}), 'mec-4']] host_names7 = {'192.168.122.110': 'osboxes-0', '192.168.122.115': 'mec-5', '192.168.122.116': 'mec-6', '192.168.122.114': 'mec-4', '192.168.122.113': 'mec-3', '192.168.122.112': 'mec-2', '192.168.122.111': 'mec-1'} total_task_sent6_7_7 = 1749 total_split_task6_7_7 = 3024 task_dist6_7_7 = {1: 888, 2: 447, 3: 414} timely_6_7_7 = {'local': 2345, 'mec': 222, 'cloud': 405} untimely_6_7_7 = {'local': 42, 'mec': 1, 'cloud': 9} u_time6_7_7 = {'local': [1.60255, 1.68787, 1.864363, 2.031917, 1.623035, 1.7800539999999998, 1.998575, 1.811075, 1.7988879999999998, 2.043669, 2.288643, 1.654716, 1.632073, 1.652686, 1.740701, 1.738789, 1.984437, 1.663846, 1.6704240000000001, 1.849234, 1.760759, 1.622746, 1.60459, 1.6553939999999998, 1.973692, 2.219617, 1.641894, 1.878224, 2.036031, 2.246852, 2.458456, 1.732164, 1.74894, 2.02051, 1.757403, 1.936026, 2.115339, 1.63204, 1.876885, 1.651479, 1.771953, 1.615882], 'mec': [1.607586], 'cloud': [1.613529, 1.885646, 1.6457609999999998, 1.747395, 1.990408, 3.111867, 3.293584, 3.4981299999999997, 624.907231]} t_time6_7_7 = {'local': [0.627541, 0.8173469999999999, 0.6000719999999999, 0.874691, 1.13047, 0.823823, 0.643034, 0.879489, 1.115755, 1.102216, 1.348543, 0.94463, 1.174125, 0.646699, 0.848648, 1.05616, 1.247386, 0.85139, 1.037108, 1.2278959999999999, 0.642794, 0.9092819999999999, 1.087965, 1.267673, 1.511255, 0.881506, 1.052489, 1.302995, 0.721024, 0.938931, 1.160651, 1.389676, 0.9596159999999999, 1.229017, 1.5194429999999999, 0.887164, 1.179073, 0.749914, 0.984308, 1.156378, 1.344605, 0.885702, 1.15876, 1.383591, 0.9050469999999999, 1.147298, 1.395448, 0.476597, 0.679639, 0.607376, 0.774069, 0.6595289999999999, 0.889315, 0.822496, 1.011549, 1.210092, 1.392392, 0.636122, 0.926851, 1.205191, 0.999516, 1.219102, 1.487018, 0.901377, 1.087467, 1.273722, 0.742158, 0.9896269999999999, 1.197706, 1.365792, 0.61052, 0.9122629999999999, 1.164063, 1.405259, 0.69265, 0.857622, 1.045325, 0.597156, 0.761941, 0.9263859999999999, 1.101703, 0.564201, 0.7464179999999999, 0.933817, 1.112596, 0.9571, 1.236939, 1.422285, 0.541465, 0.802411, 0.893498, 1.1859009999999999, 1.398973, 0.619255, 0.5970719999999999, 0.803489, 1.011826, 0.591347, 0.839735, 1.088428, 0.39797699999999997, 0.5725669999999999, 0.747011, 0.9213349999999999, 0.943623, 1.140452, 1.328819, 1.5061369999999998, 0.767068, 0.9417099999999999, 1.112476, 1.281429, 0.601534, 0.8820359999999999, 1.168804, 0.59355, 0.872304, 1.155849, 0.746073, 0.940268, 1.130345, 0.38858499999999996, 0.6180329999999999, 0.597656, 0.815878, 1.034194, 0.855815, 1.136537, 1.354235, 0.8999459999999999, 1.106015, 1.312417, 1.534593, 0.7125619999999999, 1.00818, 1.2312, 1.161298, 1.382031, 1.582689, 0.8915719999999999, 1.092645, 1.291732, 1.511997, 1.2616939999999999, 1.509547, 1.561715, 0.345686, 0.56362, 0.781667, 0.78425, 1.034982, 0.798465, 0.989385, 0.445584, 0.699789, 0.9641109999999999, 0.75596, 1.054251, 0.769744, 0.9821249999999999, 1.1994449999999999, 1.411718, 0.738887, 0.980358, 1.22832, 0.657794, 0.892986, 1.141785, 1.404312, 0.8159689999999999, 1.042595, 0.66428, 0.943859, 1.199482, 0.913712, 1.1205289999999999, 1.394364, 0.980541, 1.251403, 1.463507, 0.788941, 0.966985, 1.140158, 0.522882, 0.757197, 1.029549, 1.323651, 0.6705679999999999, 0.484434, 0.8274079999999999, 0.9982909999999999, 1.170148, 1.35816, 0.604685, 0.49905, 0.786407, 1.046082, 0.69824, 0.9488749999999999, 1.209766, 0.762065, 1.051564, 1.302614, 0.5526949999999999, 0.802145, 1.051835, 0.633465, 0.8263199999999999, 0.483849, 0.661712, 0.8528159999999999, 0.6461979999999999, 0.929407, 1.131065, 0.728225, 0.943808, 1.172417, 0.6167429999999999, 0.840394, 1.07352, 0.721044, 0.9077649999999999, 1.094526, 1.276274, 0.414191, 0.593352, 0.763543, 0.93129, 1.115866, 0.48111, 0.680094, 0.873649, 0.881757, 1.066935, 1.26319, 0.831658, 0.551491, 0.774574, 1.009038, 0.43998099999999996, 0.649007, 0.927932, 0.580495, 0.7655879999999999, 0.44124199999999997, 0.6120169999999999, 0.7870469999999999, 0.193435, 0.413444, 0.63472, 0.724463, 0.935665, 1.135507, 1.351142, 0.27987, 0.43710099999999996, 0.597239, 0.757417, 0.9976039999999999, 1.285571, 0.335584, 0.493932, 0.652046, 0.8103969999999999, 1.116083, 1.364869, 1.571603, 0.738613, 0.9249219999999999, 1.132577, 1.311119, 0.8769199999999999, 1.124849, 1.372353, 0.642332, 0.840268, 1.043636, 1.236922, 0.626186, 0.742929, 0.931689, 1.107095, 1.288865, 1.451627, 0.7846719999999999, 1.010827, 0.858471, 1.088998, 1.276523, 0.454127, 0.62279, 0.821862, 0.846738, 1.044878, 1.297663, 1.48413, 0.22241899999999998, 0.409173, 0.5939519999999999, 0.517339, 0.763585, 0.638, 0.8913789999999999, 1.141104, 0.47742399999999996, 0.706124, 0.960337, 0.790516, 1.022751, 1.21535, 1.407974, 0.562847, 0.770852, 0.48302399999999995, 0.6827829999999999, 0.431193, 0.681422, 0.8500059999999999, 0.544952, 0.729714, 0.999239, 0.572676, 0.420385, 0.665735, 0.9132619999999999, 0.5643239999999999, 0.785426, 1.060576, 1.341435, 1.589906, 0.8492029999999999, 0.7039799999999999, 0.8817069999999999, 1.043812, 1.211765, 0.671275, 0.9045369999999999, 1.126688, 0.487128, 0.733673, 1.0365199999999999, 0.386737, 0.614614, 0.8003129999999999, 0.778474, 1.022263, 0.48662299999999997, 0.67891, 0.37855, 0.654156, 0.929514, 0.643241, 0.633058, 0.8744299999999999, 1.139959, 0.380469, 0.617518, 0.8538439999999999, 0.489535, 0.6605489999999999, 0.9345779999999999, 0.448851, 0.659832, 0.869811, 0.381917, 0.605579, 0.7969879999999999, 1.008293, 0.8062929999999999, 1.008452, 1.199635, 0.736262, 0.9986309999999999, 1.268271, 0.793729, 0.9818899999999999, 1.256754, 0.61895, 0.5871689999999999, 0.85105, 1.088127, 0.400506, 0.606224, 0.853854, 1.058827, 0.794368, 0.993628, 1.261858, 0.565445, 0.512195, 0.792439, 0.978841, 0.780903, 1.009752, 1.189702, 0.6487109999999999, 0.8805449999999999, 1.1620409999999999, 0.8853, 1.129218, 0.824252, 1.095275, 1.26978, 0.515327, 0.461032, 0.6389309999999999, 0.883018, 0.868946, 1.09254, 0.727822, 0.571516, 0.788443, 0.968561, 1.195735, 0.6939299999999999, 0.9099919999999999, 1.149627, 1.387141, 0.8198519999999999, 0.489811, 0.666661, 0.856668, 1.037849, 0.841243, 0.956545, 1.209729, 0.8114199999999999, 1.083792, 0.742302, 0.929117, 0.771288, 1.051377, 0.39869299999999996, 0.621756, 0.8444309999999999, 0.8363109999999999, 1.094851, 1.366645, 0.824205, 1.017022, 1.210129, 0.5600229999999999, 0.816674, 1.029102, 0.7840119999999999, 1.06986, 1.313623, 0.467199, 0.677094, 0.903057, 1.1174520000000001, 0.5680879999999999, 0.7750579999999999, 0.9888669999999999, 0.7161379999999999, 0.966308, 1.222001, 0.399186, 0.677203, 0.9553609999999999, 0.7061839999999999, 0.9224239999999999, 1.198515, 0.87025, 1.083719, 1.30447, 0.6614209999999999, 0.896574, 1.135083, 0.7813939999999999, 1.0685959999999999, 1.358975, 0.445555, 0.6297969999999999, 0.8933059999999999, 0.812099, 0.985238, 1.276105, 0.664712, 0.888389, 1.106487, 1.311926, 0.690848, 0.8651249999999999, 1.151755, 0.790724, 0.9199729999999999, 1.123763, 1.412439, 0.6407809999999999, 0.812919, 0.7179139999999999, 0.9918079999999999, 1.19456, 0.7082809999999999, 0.63135, 0.47119, 0.727152, 0.984722, 0.48438099999999995, 0.704789, 0.960363, 0.6864089999999999, 0.909759, 1.14882, 0.546831, 0.7316849999999999, 0.9158949999999999, 0.9101319999999999, 0.562782, 0.7820849999999999, 1.022769, 0.7866759999999999, 0.9748359999999999, 0.778883, 1.054524, 1.332747, 0.827453, 1.052535, 1.294674, 1.514576, 0.56835, 0.825924, 1.064167, 0.842092, 1.012991, 1.200798, 0.922276, 1.175545, 0.599173, 0.8068919999999999, 1.010048, 0.856184, 1.133883, 1.425449, 0.795885, 1.07993, 1.369332, 0.680236, 0.878636, 1.11914, 0.88378, 1.1571690000000001, 0.885579, 1.06854, 1.320468, 1.503075, 0.882458, 1.15082, 1.427032, 0.7400629999999999, 0.980668, 1.259354, 0.583706, 0.852924, 1.121684, 0.770612, 0.978007, 1.24104, 1.489399, 0.794894, 0.9850909999999999, 1.163701, 0.89559, 1.052456, 1.243031, 0.938827, 1.157797, 1.394916, 0.8358979999999999, 1.102298, 0.761297, 0.811272, 1.047275, 1.305638, 1.061557, 1.288785, 1.5667879999999998, 0.60007, 0.866282, 1.147554, 0.7101219999999999, 0.895886, 1.088114, 0.5718799999999999, 0.7809269999999999, 0.9770129999999999, 1.184506, 0.857876, 0.692144, 0.9050619999999999, 1.1675740000000001, 0.7452559999999999, 0.997177, 1.271398, 0.995566, 1.248535, 1.491676, 0.502363, 0.692197, 0.865286, 0.7995749999999999, 0.9980899999999999, 1.208135, 1.420471, 0.600401, 0.7955209999999999, 0.989776, 0.533673, 0.737988, 0.941495, 1.129671, 0.699222, 0.921102, 1.149362, 0.897825, 0.7654679999999999, 0.650222, 0.9031079999999999, 1.162835, 0.6764859999999999, 0.8565929999999999, 1.076386, 1.2575560000000001, 0.307867, 0.495791, 0.646215, 0.8346439999999999, 1.02345, 1.217333, 0.976599, 1.2642229999999999, 1.5394649999999999, 0.605653, 0.846131, 1.121889, 0.78304, 0.9653109999999999, 1.155537, 0.9258869999999999, 1.183124, 1.390843, 0.746402, 0.9386979999999999, 1.101068, 0.5759219999999999, 0.751756, 0.948352, 1.1414, 0.525188, 0.730545, 0.9580059999999999, 1.188456, 0.43258199999999997, 0.612861, 0.792202, 0.971973, 0.519569, 0.723641, 0.931925, 0.720919, 0.903401, 1.086338, 0.828415, 1.1039539999999999, 1.338237, 1.507958, 1.043254, 1.230884, 1.5126, 0.616983, 0.822144, 1.010782, 0.832303, 1.065888, 1.2736619999999998, 0.718559, 0.964341, 1.263647, 0.5299119999999999, 0.7913629999999999, 1.010506, 0.565067, 0.834298, 1.087141, 0.715082, 0.954391, 1.22647, 0.6157429999999999, 0.893678, 1.169313, 0.851452, 1.037968, 1.236706, 1.429754, 0.622051, 0.8817659999999999, 1.146998, 0.49467, 0.732891, 0.9306979999999999, 1.122171, 1.331327, 0.6786209999999999, 0.930021, 1.171286, 0.561147, 0.8025319999999999, 1.045196, 1.063425, 0.889435, 1.176556, 1.46928, 0.8737619999999999, 1.042623, 1.3101289999999999, 1.555355, 0.292856, 0.563592, 0.739552, 1.140641, 1.348531, 0.8219569999999999, 1.060913, 1.327382, 0.792688, 1.022926, 1.320517, 0.608436, 0.8661979999999999, 1.110852, 1.097443, 1.341395, 0.561576, 0.830212, 1.100383, 1.111578, 1.297945, 0.8710359999999999, 1.169216, 1.376754, 0.23235799999999998, 0.393765, 0.5948439999999999, 0.756285, 0.6761349999999999, 0.934622, 1.199572, 1.440996, 0.8648469999999999, 1.075339, 1.336266, 0.493122, 0.673744, 0.550173, 0.725325, 0.920705, 1.10701, 0.723878, 0.9809009999999999, 1.251496, 0.707685, 0.92041, 1.098739, 1.275845, 0.70267, 0.991539, 1.2034340000000001, 0.5562309999999999, 0.828573, 1.101048, 0.43704699999999996, 0.614463, 0.841534, 1.025388, 1.066598, 1.297035, 1.513873, 0.710351, 0.9341339999999999, 1.1724350000000001, 0.46651699999999996, 0.6500279999999999, 0.921334, 1.121127, 0.898793, 1.10232, 0.660395, 0.9431689999999999, 0.556102, 0.7929689999999999, 1.046561, 0.85615, 1.13303, 1.400603, 0.8379639999999999, 1.096672, 1.355955, 0.396248, 0.666165, 0.9295059999999999, 0.930319, 1.1599140000000001, 1.424041, 0.786889, 1.072015, 1.277252, 0.28631799999999996, 0.48327, 0.674935, 0.5496869999999999, 0.584824, 0.7822209999999999, 1.000225, 1.214183, 0.296608, 0.703156, 0.965556, 1.225081, 0.762722, 0.9564959999999999, 1.146665, 0.8917539999999999, 1.084476, 1.304452, 1.491719, 0.9221459999999999, 1.133276, 1.393295, 0.6047, 0.419543, 0.667484, 0.851128, 0.46442, 0.745402, 1.0255589999999999, 0.528061, 0.77027, 0.968931, 0.63145, 0.817985, 1.007382, 0.8741099999999999, 1.145144, 1.421243, 0.507811, 0.70688, 0.900921, 0.334107, 0.579689, 0.229483, 0.46168899999999996, 0.6942419999999999, 0.640743, 0.83022, 1.045698, 0.522856, 0.7436769999999999, 0.962329, 0.6462399999999999, 0.848865, 0.7113389999999999, 0.955635, 1.2350539999999999, 0.6540929999999999, 0.8895, 1.140701, 0.5296109999999999, 0.7255729999999999, 0.9473429999999999, 0.7536149999999999, 1.024725, 1.263168, 0.7937529999999999, 1.047625, 1.248541, 0.611494, 0.832785, 0.963472, 1.155786, 1.35856, 1.560861, 0.782504, 1.072504, 1.321714, 0.704361, 0.953629, 1.23948, 0.560164, 0.857748, 0.544613, 0.792592, 1.04101, 0.732281, 0.933496, 1.129334, 1.343005, 0.7809229999999999, 0.6033999999999999, 0.831035, 0.875178, 1.100587, 1.3242289999999999, 1.5431840000000001, 0.551856, 0.7258709999999999, 0.9272229999999999, 1.107119, 0.9399259999999999, 1.150204, 1.387621, 0.329335, 0.605035, 0.881085, 0.731494, 0.9335789999999999, 1.10773, 1.282111, 0.738076, 0.92887, 1.155078, 1.341165, 0.86054, 1.12889, 0.781087, 1.003714, 1.216317, 0.47995499999999996, 0.791623, 1.017851, 1.241504, 0.8683679999999999, 1.132128, 1.39655, 0.572094, 0.8294819999999999, 1.072819, 0.6786099999999999, 0.869027, 1.065007, 1.266732, 0.611629, 0.780785, 0.949858, 1.147844, 0.726522, 0.9915379999999999, 1.238653, 0.507373, 0.7236199999999999, 0.533478, 0.961147, 1.171174, 1.43079, 0.9515009999999999, 0.955781, 1.17231, 1.456345, 0.532164, 0.795746, 1.048115, 1.24033, 1.465377, 0.427348, 0.6724669999999999, 0.917801, 0.638653, 0.843082, 1.053387, 0.826109, 1.02462, 1.226763, 0.659871, 0.9411849999999999, 0.741481, 0.930739, 0.7353959999999999, 0.983217, 1.207325, 0.665237, 0.834988, 1.027459, 1.220548, 0.845251, 1.099197, 1.311951, 0.541693, 0.750323, 0.958221, 1.166932, 0.597348, 0.8282069999999999, 1.04474, 1.262148, 0.702102, 0.941942, 1.226741, 0.841679, 1.106964, 1.27184, 1.4672830000000001, 0.407725, 0.568421, 0.729281, 0.890081, 0.7223649999999999, 1.023157, 1.229182, 0.5351589999999999, 0.800995, 1.079542, 0.5925039999999999, 0.816386, 1.02904, 0.444727, 0.7477929999999999, 0.932373, 1.130776, 1.382237, 0.7365379999999999, 0.9915849999999999, 1.249785, 0.61846, 1.475255, 0.5378649999999999, 0.783256, 1.033175, 1.28804, 1.112627, 1.404188, 0.6675209999999999, 0.900686, 1.153758, 0.8341759999999999, 0.994421, 1.173494, 1.350616, 0.69741, 1.329393, 1.000727, 1.204822, 1.4002409999999998, 0.851958, 1.035125, 0.47997399999999996, 0.706426, 0.689272, 0.873327, 1.151446, 1.209416, 1.438761, 0.59377, 0.821309, 1.049086, 0.839976, 0.857505, 1.109616, 1.3423720000000001, 0.510671, 0.684434, 0.879532, 0.9283359999999999, 0.626427, 0.886613, 1.13095, 1.056222, 1.283992, 1.52188, 0.878527, 1.070214, 1.257259, 1.094636, 1.353008, 1.536773, 0.797924, 1.043979, 1.24114, 0.9869439999999999, 1.191174, 1.411611, 0.689167, 0.962707, 1.249952, 0.92357, 1.14277, 1.353587, 1.573186, 0.457186, 0.821511, 1.032894, 1.226104, 0.468167, 0.652038, 0.818298, 0.984518, 0.748452, 1.013469, 1.262978, 0.6917019999999999, 0.8884719999999999, 1.076464, 0.8431219999999999, 1.065154, 1.3229229999999998, 0.6956479999999999, 0.9083629999999999, 0.5302939999999999, 0.8217439999999999, 1.08974, 0.676712, 0.8871519999999999, 0.649983, 0.937492, 0.6254839999999999, 0.80907, 0.492562, 0.687529, 0.88347, 0.597802, 0.840988, 0.7481019999999999, 0.9527819999999999, 1.222662, 0.613582, 0.833213, 1.068217, 0.539222, 0.7654799999999999, 0.998543, 0.581874, 0.7294999999999999, 0.9470909999999999, 1.17048, 0.735486, 0.9394119999999999, 1.173423, 1.373596, 0.628989, 0.810145, 0.582449, 0.839367, 1.086024, 0.9006949999999999, 1.098657, 1.337835, 0.6588539999999999, 0.959785, 1.231845, 1.488025, 0.725976, 0.7558509999999999, 0.962171, 0.603166, 0.831912, 0.5214019999999999, 0.8027679999999999, 1.072673, 0.67364, 0.9110389999999999, 1.15852, 0.732468, 0.764322, 0.960344, 1.189916, 0.895489, 1.183916, 1.478657, 0.769065, 1.042866, 1.238879, 0.535226, 0.828109, 0.646112, 0.596359, 0.8682519999999999, 1.089675, 0.7519629999999999, 0.938392, 1.1434, 0.6273529999999999, 0.818928, 1.010734, 0.641581, 0.848267, 1.04549, 1.247912, 0.696622, 0.9922519999999999, 1.246242, 1.062629, 1.313957, 0.6925939999999999, 0.9059649999999999, 1.110606, 1.340347, 1.409599, 0.669206, 0.951468, 1.230567, 1.49369, 0.8053939999999999, 0.43720699999999996, 0.6315489999999999, 0.778951, 1.022193, 1.241469, 0.427768, 0.718781, 0.903229, 0.7542519999999999, 0.918967, 1.08411, 1.249642, 0.765038, 0.9583269999999999, 1.151356, 1.361076, 0.841618, 1.084972, 0.5168969999999999, 0.786181, 0.966224, 1.133751, 0.515474, 0.7541519999999999, 1.015031, 1.292154, 0.889629, 1.163074, 1.436071, 0.608664, 0.88311, 1.170735, 0.69251, 0.520631, 0.868977, 1.128406, 1.392377, 0.719158, 1.026297, 1.284132, 0.536432, 0.697496, 0.7514839999999999, 0.937638, 0.721138, 1.009667, 1.210742, 1.392783, 0.8088719999999999, 1.007971, 1.197162, 1.399184, 0.552945, 0.728058, 0.937862, 1.144982, 0.489318, 0.6804049999999999, 0.886892, 1.078473, 0.7438929999999999, 1.011849, 1.31629, 0.780752, 1.083361, 1.3659029999999999, 1.444019, 0.610772, 0.866008, 1.046876, 1.216504, 0.5335989999999999, 0.7427159999999999, 0.94677, 0.29844899999999996, 0.47711099999999995, 0.725636, 0.903686, 0.604934, 0.811993, 1.019047, 1.214083, 0.864896, 1.077825, 0.665009, 0.843352, 1.065924, 0.63379, 0.8367359999999999, 1.022263, 1.235562, 0.730364, 0.9814149999999999, 1.242942, 1.321132, 1.596484, 1.586244, 0.7760429999999999, 0.9962799999999999, 1.207529, 0.606401, 0.865854, 1.037727, 1.242969, 0.843787, 1.06534, 0.910721, 1.137024, 1.393605, 0.6143339999999999, 0.788588, 0.9681789999999999, 0.439129, 0.623161, 0.590629, 0.81121, 1.038545, 1.233141, 1.427935, 0.53574, 0.7374959999999999, 0.576888, 0.763269, 1.039186, 0.834345, 1.064405, 1.304615, 0.6895859999999999, 0.9213469999999999, 1.149152, 0.71714, 0.74242, 0.927176, 1.112836, 1.308838, 0.531284, 0.726233, 0.344676, 0.508014, 0.6928869999999999, 0.855997, 0.784752, 0.968843, 0.522183, 0.830349, 0.604997, 0.796937, 0.507427, 0.72715, 0.926507, 0.811549, 1.020534, 1.23034, 1.451172, 0.644807, 0.8455039999999999, 0.651724, 0.886031, 0.47468899999999997, 0.637694, 0.8462959999999999, 0.5275299999999999, 0.8019299999999999, 1.081169, 0.725622, 1.011898, 0.9643079999999999, 1.154868, 1.34542, 0.6599459999999999, 0.8553959999999999, 1.107836, 0.846907, 1.098164, 1.314537, 0.652713, 0.884917, 1.113096, 0.531453, 0.9971279999999999, 1.229249, 1.419252, 0.53471, 0.622966, 0.785052, 0.8275159999999999, 1.140976, 1.37555, 0.768438, 0.976829, 1.142983, 0.663415, 0.965036, 0.630169, 0.8441909999999999, 1.036602, 1.229052, 0.720189, 0.949062, 1.175358, 0.681738, 0.88625, 1.114714, 1.350164, 0.45858299999999996, 0.678891, 0.891096, 0.6182759999999999, 0.8943869999999999, 1.16982, 0.729753, 0.988849, 1.200153, 1.382385, 0.644208, 0.848653, 1.126819, 0.7858069999999999, 0.9737739999999999, 1.161389, 0.893971, 1.147944, 1.421218, 0.40935699999999997, 0.6601349999999999, 0.803568, 1.081969, 0.7130639999999999, 0.987738, 1.256579, 0.5233099999999999, 0.730453, 0.856903, 1.079241, 1.3744079999999999, 0.747629, 1.02684, 1.294782, 0.6431589999999999, 0.865667, 1.092182, 0.62417, 0.488487, 0.791951, 0.9924219999999999, 1.204815, 1.412099, 0.623732, 0.873877, 1.117424, 0.5037929999999999, 0.788331, 0.9822529999999999, 1.176057, 0.724475, 0.8004789999999999, 1.035744, 1.314478, 0.8124009999999999, 0.975773, 0.579805, 0.8295469999999999, 1.069159, 0.8975409999999999, 1.171588, 1.422051, 0.48790799999999995, 0.7494259999999999, 0.6857369999999999, 0.8298089999999999, 1.036562, 1.232075, 1.432598, 0.504493, 0.704522, 0.9154639999999999, 1.136993, 0.553121, 0.809796, 1.080273, 1.350439, 0.472029, 0.74783, 0.568406, 0.8361689999999999, 1.018359, 1.188841, 0.623365, 0.8395819999999999, 1.034119, 1.024831, 1.288145, 1.541233, 0.43211499999999997, 0.6191059999999999, 0.794257, 0.987023, 0.35647399999999996, 0.623247, 0.8896759999999999, 0.682541, 0.852078, 1.020887, 0.547334, 0.7448779999999999, 0.9571029999999999, 0.907675, 1.092682, 1.278974, 0.344668, 0.570893, 0.797155, 0.747633, 0.9161269999999999, 1.163517, 0.40236, 0.622304, 0.799024, 0.975915, 0.539987, 0.71815, 0.7093729999999999, 0.914831, 0.744972, 0.98766, 1.236027, 0.539218, 0.799337, 1.059757, 0.454048, 0.712066, 0.68175, 0.9045799999999999, 1.144131, 0.580742, 0.807468, 1.062062, 0.438868, 0.6018129999999999, 0.831278, 0.994714, 0.789589, 1.073899, 1.344851, 0.252243, 0.580792, 0.762477, 1.022218, 1.188659, 0.540875, 0.762911, 0.9948199999999999, 0.7326619999999999, 0.923524, 1.146393, 0.513159, 0.7425039999999999, 1.00371, 0.505886, 0.7505689999999999, 0.9998199999999999, 0.7381289999999999, 1.018629, 1.233824, 0.47359799999999996, 0.717882, 0.8995839999999999, 0.627359, 0.552933, 0.7684489999999999, 0.9780679999999999, 1.19163, 0.8485039999999999, 1.070876, 1.365017, 0.823508, 1.009221, 0.479892, 0.709406, 0.935977, 1.164877, 0.577981, 0.793862, 1.005621, 1.20928, 0.925642, 1.160587, 1.425823, 0.833575, 1.028925, 1.232931, 0.689106, 0.894667, 1.106288, 0.839599, 1.0883639999999999, 1.365605, 0.8437159999999999, 0.72075, 0.98656, 1.25228, 0.659843, 0.6077, 0.838989, 1.067887, 0.44379799999999997, 0.631945, 0.820338, 0.622914, 0.817333, 1.096451, 0.514864, 0.7837729999999999, 1.051708, 0.5153059999999999, 0.813097, 1.111066, 0.560389, 0.736939, 0.91365, 0.7016319999999999, 0.974579, 1.254522, 0.6925439999999999, 0.9645619999999999, 0.808225, 1.012795, 1.232007, 1.387543, 0.653874, 0.822163, 0.9859699999999999, 0.499637, 0.6394409999999999, 0.819129, 1.03842, 1.260046, 0.6482629999999999, 0.857524, 0.689126, 0.95654, 0.752973, 1.009109, 1.2649460000000001, 0.331262, 0.494228, 0.527065, 0.51699, 1.215116, 1.372463, 1.5298859999999999, 0.740182, 0.963657, 1.189765, 0.39439799999999997, 0.642135, 0.887053, 0.633308, 0.811781, 0.5559689999999999, 0.729713, 0.95344, 1.132232, 0.478703, 0.659133, 0.531471, 0.760014, 0.989421, 0.8111929999999999, 1.075251, 1.319941, 0.556914, 0.7941159999999999, 1.013397, 0.5991179999999999, 0.7106049999999999, 0.8980849999999999, 1.101796, 1.289093, 0.663167, 0.8930389999999999, 1.123251, 0.9960699999999999, 1.166397, 1.434652, 0.581322, 0.763015, 0.937179, 0.894751, 1.127539, 1.415531, 0.519014, 0.7495689999999999, 0.9503929999999999, 1.133792, 0.6960109999999999, 0.89072, 1.126375, 1.304953, 0.805203, 1.072086, 1.333067, 0.5946899999999999, 0.849028, 0.624664, 0.8412689999999999, 1.074765, 0.47250499999999995, 0.704348, 0.664018, 0.8471289999999999, 1.030403, 1.212803, 0.6466759999999999, 0.6880609999999999, 0.9496159999999999, 1.22999, 0.888508, 1.119501, 1.3550499999999999, 0.609827, 0.894158, 1.089645, 0.615224, 0.798689, 1.100968, 0.578446, 0.833645, 1.088332, 0.715063, 0.9002439999999999, 1.064115, 0.86905, 1.057962, 1.318128, 0.599382, 1.028653, 1.311455, 1.557186, 1.422619, 0.46535899999999997, 0.649801, 0.817815, 0.991672, 0.737555, 0.927878, 1.098964, 0.316921, 0.5526409999999999, 0.8059719999999999, 0.796989, 1.096954, 1.370573, 0.33442299999999997, 0.576324, 0.40159999999999996, 0.586425, 0.761425, 0.7449509999999999, 1.026139, 1.286581, 0.5865699999999999, 0.8414349999999999, 0.5551929999999999, 0.805396, 1.055967, 0.7397469999999999, 1.041785, 1.332899, 0.551304, 0.809978, 1.090701, 0.705777, 0.9490639999999999, 1.138709, 0.546877, 0.801902, 1.056712, 0.590924, 0.847205, 1.065183, 0.6521819999999999, 0.8189639999999999, 1.0946069999999999, 0.76096, 0.42255299999999996, 0.683385, 0.9408559999999999, 1.177665, 1.357767, 1.544718, 0.5436449999999999, 0.722015, 0.898988, 1.069558, 0.292047, 0.5426409999999999, 0.7262259999999999, 0.5763229999999999, 0.74152, 0.906462, 0.86042, 1.126866, 1.308681, 0.757527, 0.958654, 1.186819, 0.484081, 0.728698, 0.9375699999999999, 1.135008, 0.704815, 0.9727739999999999, 1.246521, 0.673512, 0.850046, 1.032087, 1.219727, 0.431587, 0.650922, 0.858984, 0.8887079999999999, 0.501703, 0.740895, 0.48232899999999995, 0.665211, 0.843217, 1.014924, 0.883131, 1.121212, 1.354293, 0.736919, 0.9714649999999999, 1.2231589999999999, 0.514705, 0.7501519999999999, 0.650426, 0.859111, 1.046223, 0.295081, 0.5169779999999999, 0.771851, 0.945006, 1.1862949999999999, 1.404069, 0.866008, 1.122781, 1.333958, 0.738333, 0.988888, 0.7053999999999999, 0.9198909999999999, 1.10587, 0.9712689999999999, 1.2715619999999999, 1.53415, 0.8000349999999999, 1.051951, 1.325502, 0.6060059999999999, 0.88364, 1.163664, 0.826631, 1.119467, 1.3308309999999999, 0.550063, 0.715175, 0.8799039999999999, 1.050606, 0.6636029999999999, 0.907141, 0.51569, 0.7853789999999999, 0.927929, 1.169007, 1.410269, 0.488413, 0.708892, 0.929296, 0.506587, 0.751339, 0.9931409999999999, 0.6704, 0.953916, 1.226433, 0.652223, 0.847961, 0.559323, 0.801145, 1.04945, 0.641421, 0.9274939999999999, 1.2297069999999999, 0.629423, 0.849865, 1.041353, 0.5531269999999999, 0.788099, 1.034359, 0.662871, 0.8858659999999999, 1.132092, 0.8077679999999999, 0.9723609999999999, 1.235529, 0.854835, 1.1108419999999999, 1.354879, 0.8256239999999999, 1.050755, 1.236639, 1.443287, 0.454192, 0.720376, 0.896346, 0.674882, 0.9424089999999999, 1.20422, 0.842024, 1.129658, 1.361445, 0.737711, 0.9380569999999999, 1.208101, 0.437696, 0.654459, 0.8232659999999999, 1.04837, 0.558999, 0.790302, 0.996311, 0.6896249999999999, 0.45825299999999997, 0.682062, 0.858197, 0.866834, 1.176104, 0.553569, 0.7646, 0.47531399999999996, 0.6817259999999999, 0.8978849999999999, 0.678101, 0.8867349999999999, 1.084098, 1.281843, 0.5485869999999999, 0.804176, 1.080634, 0.79314, 0.863065, 1.130989, 1.420281, 0.648973, 0.914806, 1.1734580000000001, 0.642015, 0.839718, 1.085779, 0.7519, 0.9500609999999999, 1.160498, 0.8217679999999999, 1.050605, 1.294893, 0.736254, 1.009093, 0.437059, 0.647573, 0.674576, 0.940975, 1.173499, 0.8730519999999999, 1.12607, 1.421646, 0.601681, 0.889868, 1.143284, 0.699657, 0.9112699999999999, 1.203758, 0.37961799999999996, 0.538654, 0.8914949999999999, 1.170699, 1.437956, 0.535069, 0.763017, 1.032014, 0.68592, 0.92294, 1.158595, 0.473068, 0.672167, 0.644816, 0.935322, 1.230553, 0.843533, 1.021289, 1.308554, 0.46974699999999997, 0.6718379999999999, 0.8827069999999999, 1.07598, 0.646995, 0.8185899999999999, 1.013822, 1.198801, 0.899176, 1.18971, 1.4375339999999999, 0.668208, 0.8436039999999999, 1.087896, 0.489123, 0.776497, 1.086114, 0.584347, 0.82319, 1.055713, 0.8405579999999999, 1.060695, 0.52017, 0.756169, 0.9627699999999999, 0.731992, 0.996502, 0.842031, 1.063679, 1.3324799999999999, 0.690632, 0.9213129999999999, 1.203221, 0.718928, 0.914619, 0.758747, 1.019136, 0.75852, 0.929963, 1.131284, 1.344999, 1.000884, 1.233651, 1.505706, 0.826266, 0.995915, 1.225003, 0.629954, 0.8176869999999999, 1.022308, 0.59853, 0.883058, 1.144733, 0.578618, 0.8712219999999999, 1.158484, 0.7891619999999999, 1.042201, 1.293696, 0.398066, 0.647451, 0.903087, 0.643956, 0.5006459999999999, 0.67414, 0.9104329999999999, 1.076789, 0.526331, 0.7395879999999999, 0.9624349999999999, 0.8941779999999999, 1.138402, 0.683879, 0.9181779999999999, 1.151818, 0.720124, 0.813812, 1.080291, 1.362871, 0.78076, 1.060745, 1.334474, 0.973707, 1.233352, 1.478338, 0.692488, 0.976783, 0.879111, 1.150324, 0.531508, 0.711221, 0.88988, 0.8086899999999999, 1.00698, 1.261834, 0.7229169999999999, 0.9902559999999999, 0.575763, 0.8384689999999999, 1.112301, 0.867618, 1.1477870000000001, 1.375943, 0.643443, 0.850649, 1.045295, 1.24675, 0.729745, 0.747921, 0.9309499999999999, 1.117991, 1.299467, 1.436493, 0.8928039999999999, 1.090779, 1.279291, 1.472788, 0.7848649999999999, 1.040046, 1.274753, 1.305056, 1.581566, 0.765672, 0.9424079999999999, 0.585518, 0.758253, 1.038552, 0.6525909999999999, 0.835461, 1.072026, 1.270921, 0.761022, 0.977389, 1.192178, 1.406933, 0.659484, 0.845752, 1.027161, 1.046821, 1.317131, 1.598601, 0.563775, 0.7933669999999999, 0.997616, 0.851208, 0.487438, 0.7161, 0.9527249999999999, 0.7315959999999999, 0.764033, 0.9640949999999999, 1.22536, 0.415495, 0.476583, 0.66872, 0.8622829999999999, 0.787758, 1.463632, 0.76808, 0.94748, 1.19478, 1.56792, 0.655959, 0.850644, 1.040402, 1.212832, 0.6756209999999999, 0.660585, 0.841567, 1.044564, 0.38465099999999997, 0.613804, 0.736868, 0.9223049999999999, 1.111596, 1.301366, 0.557871, 0.844482, 0.635636, 0.898982, 0.6828069999999999, 0.9568859999999999, 1.162137, 0.84864, 1.1275979999999999, 1.365307, 0.735038, 0.947531, 1.169913, 0.5156339999999999, 0.77179, 1.02249, 0.5841959999999999, 0.803465, 1.037113, 0.79324, 1.041807, 1.227417, 0.5771879999999999, 0.873568, 1.169301, 1.3620459999999999, 0.714581, 0.9309379999999999, 1.205957, 0.6695679999999999, 0.9553539999999999, 1.236231, 0.397744, 0.573689, 0.839001, 1.009224, 0.438608, 0.717336, 0.984857, 0.559385, 0.816118, 1.058797, 1.23786, 0.8079679999999999, 1.066477, 1.32964, 0.585164, 0.84756, 1.115301, 0.6239509999999999, 0.8441569999999999, 1.070129, 0.664921, 0.8921199999999999, 1.125467, 0.804739, 1.078978, 1.26969, 0.762319, 1.044642, 1.307982, 0.40917899999999996, 0.590971, 0.836298, 1.093491, 0.952862, 1.2142629999999999, 1.399436, 0.5776209999999999, 0.775774, 0.9936689999999999, 1.179322, 0.49766099999999996, 0.708583, 0.930654, 1.1390609999999999, 0.919885, 1.090313, 1.344534, 0.543576, 0.799944, 1.05651, 0.636516, 0.910971, 1.144332, 1.217279, 1.488674, 1.112217, 1.330627, 0.798978, 1.037597, 1.314389, 0.546516, 0.741057, 0.925124, 0.6414759999999999, 0.939666, 1.230897, 0.9059659999999999, 1.080818, 1.314241, 0.80262, 0.9682099999999999, 1.126414, 0.8254079999999999, 0.719725, 0.93623, 1.119526, 1.3077239999999999, 0.5140859999999999, 0.8168019999999999, 1.103127, 0.481481, 0.6963509999999999, 0.9012789999999999, 0.720401, 0.9075249999999999, 1.192975, 0.370131, 0.65181, 0.92691, 0.810939, 1.077566, 0.614518, 0.7576579999999999, 0.9709709999999999, 1.195259, 1.4124919999999999, 0.8542099999999999, 1.14568, 1.3250549999999999, 0.657597, 0.86893, 1.074338, 0.624151, 0.882733, 1.125181, 0.7603559999999999, 1.000404, 1.222861, 0.646385, 0.747617, 0.9650439999999999, 1.185385, 1.036417, 1.290112, 1.548505, 0.906188, 1.197232, 1.4714779999999998, 0.840341, 1.084702, 1.329311, 0.825774, 1.034583, 1.261086, 0.49537299999999995, 0.741038, 0.945691, 0.634801, 0.8734449999999999, 0.704666, 0.871265, 1.054249, 1.226544, 0.530455, 0.7095159999999999, 0.957664], 'mec': [0.9384129999999999, 1.168572, 1.391936, 0.929708, 0.9022359999999999, 1.154514, 0.874311, 0.7114699999999999, 0.741749, 0.918365, 0.9491379999999999, 0.844305, 1.112835, 0.66392, 0.555655, 0.7409859999999999, 0.643674, 0.928624, 0.785404, 0.6484329999999999, 0.9734079999999999, 0.9087179999999999, 0.667876, 0.7721439999999999, 0.5294869999999999, 0.7964169999999999, 0.724448, 0.717611, 0.543229, 0.5493049999999999, 0.8032819999999999, 0.643174, 0.881428, 0.7558469999999999, 0.7946799999999999, 1.033917, 0.8702329999999999, 0.793879, 0.5996349999999999, 0.8166289999999999, 0.84454, 0.8352069999999999, 1.098828, 0.51874, 0.815973, 0.759288, 0.656196, 0.944612, 0.9766659999999999, 0.642152, 0.579637, 0.7706879999999999, 0.960071, 1.202005, 0.9708129999999999, 0.5932569999999999, 0.489753, 0.8339329999999999, 0.679804, 0.755674, 0.762977, 0.833496, 0.597556, 0.950314, 0.7518279999999999, 0.50611, 0.5607719999999999, 0.750201, 1.008893, 1.235385, 0.6738, 0.47412299999999996, 0.674256, 0.652516, 0.897581, 0.8340449999999999, 0.642878, 0.865463, 1.087054, 0.8049529999999999, 0.6124539999999999, 0.885143, 0.581911, 0.513461, 0.765112, 1.024792, 1.272379, 0.861382, 1.054617, 0.682341, 0.850954, 0.649729, 0.874952, 0.619447, 0.824297, 0.6274919999999999, 0.673225, 0.8639429999999999, 1.101109, 0.850568, 1.034164, 0.5256879999999999, 1.180323, 1.381818, 0.829129, 1.057478, 1.284846, 0.7599349999999999, 0.976815, 0.7722979999999999, 0.85986, 0.8425229999999999, 0.644189, 0.758915, 0.6958639999999999, 0.704344, 0.5233909999999999, 0.728816, 0.634976, 0.867203, 1.098326, 0.828595, 0.713117, 0.9417129999999999, 0.684688, 0.6616909999999999, 0.561693, 0.503617, 0.689773, 0.556738, 0.760784, 1.3206769999999999, 0.8661449999999999, 1.077153, 0.639173, 0.410082, 0.811064, 0.596967, 0.8435619999999999, 1.096535, 0.8526229999999999, 0.816666, 1.026104, 0.8678939999999999, 0.727468, 0.7745599999999999, 0.753176, 0.49756, 0.651995, 0.45480099999999996, 0.7064079999999999, 0.6584169999999999, 0.878659, 0.500383, 0.7273109999999999, 0.5418649999999999, 0.6346539999999999, 0.568777, 0.484325, 0.949298, 1.197695, 0.7624449999999999, 0.6330199999999999, 0.804093, 1.016214, 0.5133449999999999, 0.6463209999999999, 0.771704, 0.623463, 0.778196, 0.7438859999999999, 0.590569, 0.745989, 0.781739, 0.9331109999999999, 0.748857, 0.8434919999999999, 1.113637, 0.9086179999999999, 0.6592129999999999, 0.5887749999999999, 0.8651479999999999, 0.808553, 0.660666, 0.445078, 0.515788, 0.7322919999999999, 0.632524, 0.8336279999999999, 0.630159, 0.891752, 0.640953, 0.820309, 1.090346, 0.544445, 0.665307, 0.7952119999999999, 0.486423, 0.41229, 0.848537, 1.027817, 1.28893, 0.7178169999999999, 0.9417399999999999, 0.570493, 0.622961, 0.733709, 0.44837699999999997, 0.5970449999999999, 0.7814749999999999, 0.609278, 1.246488, 1.011595, 1.221461, 0.7444189999999999, 0.87874, 0.47190099999999996, 0.657087, 0.677186, 0.929819, 1.161413, 0.968955], 'cloud': [1.011533, 1.246992, 0.64034, 0.69002, 0.749014, 0.9515039999999999, 0.893774, 1.090836, 0.56373, 0.915183, 1.168309, 0.828835, 1.025072, 1.300383, 1.481867, 0.5828019999999999, 0.631037, 0.571004, 0.827487, 1.071727, 1.343407, 0.783909, 0.859794, 1.051018, 0.745957, 0.49852199999999997, 0.5309969999999999, 0.7793829999999999, 1.027959, 0.650359, 0.6209859999999999, 0.48936799999999997, 0.7193609999999999, 0.226877, 0.710251, 0.864487, 1.013796, 0.694766, 0.893056, 0.765228, 0.744533, 0.921399, 0.731781, 0.431166, 0.510149, 0.642046, 1.189048, 1.388624, 0.64023, 0.62737, 0.868207, 1.092936, 0.34573699999999996, 0.592554, 0.860881, 0.660697, 0.902254, 0.5493899999999999, 0.784683, 0.658331, 0.897913, 1.084773, 1.335276, 0.7032079999999999, 0.8617429999999999, 0.571418, 0.633644, 0.910752, 1.177639, 1.44552, 0.389328, 0.753903, 0.6344949999999999, 0.805325, 1.057569, 1.24564, 0.762266, 0.967981, 0.634039, 0.445139, 0.698271, 0.882934, 0.5945309999999999, 0.795507, 0.98368, 0.600262, 0.849321, 1.028381, 1.181849, 0.9866659999999999, 0.759533, 1.026558, 0.660544, 0.804317, 1.034416, 0.782586, 1.022927, 0.685286, 0.93565, 0.8319679999999999, 0.976162, 1.182993, 0.839823, 0.931647, 0.751877, 0.9190959999999999, 0.635637, 0.987765, 0.646424, 0.799844, 0.9966379999999999, 0.535285, 0.897264, 0.881192, 1.065524, 0.7473059999999999, 0.992374, 0.627431, 0.691546, 0.962027, 0.8106359999999999, 0.581742, 0.63772, 0.56751, 0.8431299999999999, 1.114498, 0.9238219999999999, 0.370311, 0.8818929999999999, 0.831666, 1.107167, 0.621852, 0.8993359999999999, 0.196271, 0.7464529999999999, 0.8644259999999999, 1.127529, 1.3755739999999999, 0.690155, 0.561434, 0.39532, 1.028262, 0.843432, 0.630159, 0.9006329999999999, 0.50962, 0.7390559999999999, 0.615945, 0.738645, 0.809759, 1.078565, 0.7273769999999999, 0.451872, 0.666179, 0.7641479999999999, 0.5831259999999999, 0.806275, 0.531863, 0.407564, 0.7186199999999999, 0.801057, 1.059254, 1.209272, 1.4040219999999999, 0.558866, 0.5780959999999999, 0.589086, 0.7901579999999999, 0.995803, 0.7479859999999999, 0.9858509999999999, 0.884076, 0.553909, 0.784229, 0.9636589999999999, 1.254745, 1.5079669999999998, 0.610039, 0.8869389999999999, 0.723785, 0.9900669999999999, 0.786543, 0.972111, 1.1754850000000001, 0.44733, 0.725609, 0.9525429999999999, 1.159454, 1.361611, 0.6379779999999999, 0.871216, 1.070974, 0.55813, 0.699143, 0.9465549999999999, 1.12878, 0.5558529999999999, 0.659503, 0.8656389999999999, 1.079166, 0.735394, 0.633327, 0.954185, 0.9241929999999999, 0.661744, 0.8394079999999999, 0.48880399999999996, 0.5824779999999999, 0.74035, 0.8986879999999999, 0.669379, 0.630763, 0.814882, 1.008518, 0.760166, 1.454462, 0.760469, 0.790906, 0.650627, 0.7085699999999999, 0.984656, 0.78658, 0.55714, 0.677268, 0.662802, 0.843391, 0.564975, 0.7306389999999999, 0.8434729999999999, 0.684605, 0.775164, 0.551559, 0.5334329999999999, 0.8250259999999999, 0.5948559999999999, 0.921381, 0.871215, 0.844244, 0.493432, 0.742466, 0.985923, 0.703731, 0.892605, 0.571584, 0.770007, 0.7625419999999999, 1.001456, 1.235498, 0.7013199999999999, 0.7355309999999999, 0.7689199999999999, 0.8065319999999999, 1.036016, 1.266878, 0.8856489999999999, 0.908837, 1.150601, 1.3921109999999999, 0.43770499999999996, 0.371898, 0.387067, 0.597518, 0.563655, 0.785748, 0.59215, 0.838204, 0.597201, 0.791723, 0.765668, 1.036058, 1.2899639999999999, 0.68196, 0.632938, 0.839908, 0.614445, 0.817622, 1.027667, 0.606105, 0.8778779999999999, 0.757197, 1.001837, 1.264875, 0.7908769999999999, 0.975069, 1.178857, 0.577877, 0.772578, 0.490511, 0.47604199999999997, 0.677962, 0.926588, 1.175089, 0.6760079999999999, 0.42827699999999996, 0.683831, 0.9548859999999999, 0.450607, 0.608601, 1.048331, 1.275345, 1.501482, 1.3768099999999999, 1.590495, 0.597826, 0.782565, 0.461445, 0.6502899999999999, 0.8437129999999999, 0.547792, 0.512272, 0.291524, 0.920493, 1.165739, 0.752128, 0.636118, 0.33615999999999996, 0.851252, 1.056195, 1.293506, 0.872197, 1.105838, 0.83571, 1.054178, 0.695237, 0.6270819999999999, 0.685724, 0.853756, 0.630335, 0.8112889999999999, 1.010885, 1.19649, 1.403544, 0.696803, 0.941777, 0.778303, 1.018457, 0.555016, 0.700035, 0.7948219999999999, 1.071116, 1.348653, 0.682771, 0.937836, 1.149661, 0.877568, 1.098652, 0.7675449999999999, 0.642471, 0.6580809999999999, 0.72175, 0.957634, 1.203367, 0.420654, 0.656094, 0.903925, 0.737837, 0.992972, 1.248308, 1.527194, 0.7153919999999999, 0.6038479999999999, 0.848692, 1.086367, 0.8356319999999999, 0.45826999999999996, 0.589554, 0.8020919999999999, 1.119659, 0.650628, 0.628161, 0.84248, 1.107011, 0.521574, 0.786925, 1.019874, 0.6480779999999999, 0.848775, 0.6955859999999999, 0.49256999999999995, 0.719787, 0.939384, 0.636845, 0.888469, 1.154792, 0.866452, 0.541997, 0.872258, 1.113268, 0.518902, 0.6554559999999999, 0.696997, 0.82688, 1.046933, 1.2075420000000001, 0.552905, 0.544814, 0.703815, 0.6654899999999999, 0.856347, 0.9283129999999999, 0.549955, 0.643057, 0.959336, 0.41262, 0.5879019999999999]}
213,087
161,884
from simba import transfer_function_to_graph, tf2rss from sympy import symbols # passive realisation (g = 0) s = symbols('s') gamma_f, omega_s = symbols('gamma_f omega_s', real=True, positive=True) tf = (s**2 + s * gamma_f + omega_s**2) / (s**2 - s * gamma_f + omega_s**2) h_int = tf2rss(tf).to_slh().split().interaction_hamiltonian print(h_int.expr.simplify()) print(h_int.equations_of_motion) # print(tf2rss(tf).to_slh().interaction_hamiltonian) # print(tf2rss(tf)) transfer_function_to_graph(tf, 'passive_coupled_cavity.pdf', layout='dot') # parameterise with lambda = omega_s**2 - g**2 < 0 lmbda = symbols('lambda', real=True, positive=True) tf = (s**2 + s * gamma_f - lmbda) / (s**2 - s * gamma_f - lmbda) transfer_function_to_graph(tf, 'active_coupled_cavity.pdf', layout='dot')
794
342
# -*- coding: utf-8 -*- import roslib; roslib.load_manifest('iv_plan') from ivutils import * from hironxsys import * import rospy from ar_pose.msg import ARMarkers from tf.transformations import * import operator def encode_FRAME(f): return reduce(operator.__add__, f.mat) + f.vec def decode_FRAME(ds): return FRAME(mat=array(ds[0:9]).reshape(3,3).tolist(), vec=ds[9:]) from setup_rtchandle import * class MyRobotInterface(HIROController): def __init__(self, nameserver): HIROController.__init__(self, nameserver) self.nameserver = nameserver self.lhand_markers = [] def connect(self): HIROController.connect(self) rospy.init_node('pick_piece') rospy.Subscriber('/hiro/lhand/ar_pose_marker', ARMarkers, self.lhand_callback) rospy.Subscriber('/hiro/rhand/ar_pose_marker', ARMarkers, self.rhand_callback) self.ns = setup_rtchandle(self.nameserver) self.h_ctrans = self.ns.rtc_handles['CoordTrans0.rtc'] self.h_ctrans.activate() self.ctsvc = h_ctrans.services['CoordTransService'].provided['CoordTransService0'] def rhand_callback(self, msg): if len(msg.markers) > 0: self.rhand_markers = msg.markers def lhand_callback(self, msg): if len(msg.markers) > 0: self.lhand_markers = msg.markers def recognize(self, camera='lhand', thre=1.5): def parse_marker(marker): if rospy.Time.now().to_sec() - marker.header.stamp.to_sec() > thre: return None else: return [marker.id, marker.pose.pose] if camera == 'lhand': return filter(None, [parse_marker(m) for m in self.lhand_markers]) else: return filter(None, [parse_marker(m) for m in self.rhand_markers]) robotframe = [1,0,0,-150, 0,1,0,0, 0,0,1,0, 0,0,0,1] def pose2mat(pose): f = quaternion_matrix([pose.orientation.x,pose.orientation.y,pose.orientation.z,pose.orientation.w]) scale = 1000.0 f[0:3,3] = array([pose.position.x,pose.position.y,pose.position.z]) * scale return f.reshape(16).tolist() # rr.connect() # pose = rr.recognize()[0][1] # ctsvc.ref.Query('lhandcam', pose2mat(pose), robotframe, rr.get_joint_angles())
2,259
836
import unittest import numpy as np from probnum._randomvariablelist import _RandomVariableList from probnum.random_variables import Dirac class TestRandomVariableList(unittest.TestCase): def setUp(self): self.rv_list = _RandomVariableList([Dirac(0.1), Dirac(0.2)]) def test_inputs(self): """Inputs rejected or accepted according to expected types.""" numpy_array = np.ones(3) * Dirac(0.1) dirac_list = [Dirac(0.1), Dirac(0.4)] number_list = [0.5, 0.41] inputs = [numpy_array, dirac_list, number_list] inputs_acceptable = [False, True, False] for inputs, is_acceptable in zip(inputs, inputs_acceptable): with self.subTest(input=inputs, is_acceptable=is_acceptable): if is_acceptable: _RandomVariableList(inputs) else: with self.assertRaises(TypeError): _RandomVariableList(inputs) def test_mean(self): mean = self.rv_list.mean self.assertEqual(mean.shape, (2,)) def test_cov(self): cov = self.rv_list.cov self.assertEqual(cov.shape, (2,)) def test_var(self): var = self.rv_list.var self.assertEqual(var.shape, (2,)) def test_std(self): std = self.rv_list.std self.assertEqual(std.shape, (2,)) def test_getitem(self): item = self.rv_list[0] self.assertIsInstance(item, Dirac) if __name__ == "__main__": unittest.main()
1,513
494
def mult(m,a): return m * a #Defines the critical functions. def output(m, a, F): out = """ The force you want to find is: {} = {} * {} """. format(F, m, a,) return out #Defines the output. def main(): m = raw_input("What is the mass?") a = raw_input("What is the acceleration?") F = mult(float(m), float(a)) out = output(m, a, F) print out print "Here is the answer!" main() #Defines the main fuction.
416
163
# Erstelle aus gegebnen Daten eine Ausgleichskurve # Und Plotte diese Kurve + die Daten # wechsle die Working Directory zum Versuchsordner, damit das Python-Script von überall ausgeführt werden kann import os,pathlib project_path = pathlib.Path(__file__).absolute().parent.parent os.chdir(project_path) # benutze die matplotlibrc und header-matplotlib.tex Dateien aus dem default Ordner os.environ['MATPLOTLIBRC'] = str(project_path.parent/'default'/'python'/'matplotlibrc') os.environ['TEXINPUTS'] = str(project_path.parent/'default'/'python')+':' # Imports import numpy as np from scipy.optimize import curve_fit import matplotlib.pyplot as plt # Daten einlesen x,y,z = np.genfromtxt('data/NAME.csv',delimiter=',',skip_header=1,unpack=True) # Ausgleichskurven Funktion (hier Ausgleichsgerade) def f(x,a,b): return a*x + b # oder als Lambda Funktion f = lambda x,a,b: a*x + b # Ausgleichskurve berechnen params,pcov = curve_fit(f,x,y) # Parameter a = params[0] b = params[1] # Unsicherheiten a_err = np.absolute(pcov[0][0])**0.5 b_err = np.absolute(pcov[1][1])**0.5 # Werte irgendwie ausgeben lassen # z.B. mit print, aber besser als JSON Datei abspeichern print(f'{a = }+-{a_err}') print(f'{b = :.2f}+-{b_err:.2f}') # Plot der Ausgleichskurve x_linspace = np.linspace(np.min(x), np.max(x), 100) plt.plot(x_linspace, f(x_linspace,*params), 'k-', label='Ausgleichskurve') # Plot der Daten plt.plot(x, y, 'ro', label='Daten') # Achsenbeschriftung mit LaTeX (nur wenn matplotlibrc benutzt wird) plt.xlabel(r'$\alpha \:/\: \si{\ohm}$') plt.ylabel(r'$y \:/\: \si{\micro\joule}$') # in matplotlibrc leider (noch) nicht möglich plt.legend() plt.tight_layout(pad=0, h_pad=1.08, w_pad=1.08) # Plot als PDF speichern plt.savefig('build/plot_NAME.pdf')
1,759
712
# vim: ts=4 sts=4 sw=4 et ##################################################################### # Pachi Counter # Copyright (c) 2011-2020, Yusuke Ohshima All rights reserved. # # License: MIT. # For details, please see LICENSE file. ##################################################################### def bit_is_enable(val, bit): return bool(val & (1 << bit)) def ordering(n): less100 = n % 100 less10 = less100 % 10 if less10 in (1, 2, 3) and not (10 <= less100 < 20): t = str(n) + ('st', 'nd', 'rd')[less10 - 1] else: t = str(n) + 'th' return t def bulk_set_color(d, color): for k in d: d[k]['color'] = color def rgb(r, g, b, a=0xff): return (a << 24) + (r << 16) + (g << 8) + b def decolate_number(num, min_disp_digit, num_color=None, zero_color=None): if zero_color is None: zero_color = '#888888' last_zero_pos = max(min_disp_digit - len(str(num)), 0) raw_num_str = '{{0:0{0}}}'.format(min_disp_digit).format(num) if num_color is None: num_fmt = str(num) else: num_fmt = ('<span color="{0}">{1}</span>' .format(num_color, raw_num_str[last_zero_pos:])) if last_zero_pos == 0: zero_fmt = '' else: zero_fmt = ('<span color="{0}">{1}</span>' .format(zero_color, raw_num_str[0:last_zero_pos])) return ''.join((zero_fmt, num_fmt)) def bonusrate(total, now, ndec=1): nd = 10 ** ndec try: p = int((float(total) / now) * nd) d = p // nd f = p % nd ratestr = '1/{{0}}.{{1:0{}}}'.format(ndec) bonus_rate = ratestr.format(d, f) except ZeroDivisionError: bonus_rate = '1/-.{0}'.format("-"*ndec) return bonus_rate def gen_chain(n_chain, suffix=None): suffix = suffix or "Chain(s)" chain = "" if n_chain > 0: chain = ('\n<span size="xx-large">{0}</span>{1}' .format(decolate_number(n_chain, 3), suffix)) return chain def gen_history(history, n, sep=" ", isfill=False): a = [] if history: n = min(n, 5) for h in list(reversed(history))[0:n]: if h[0] is None: a.append(str(h[1])) else: a.append('{1}<span size="small">({0})</span>'.format(*h)) if isfill: for i in range(5): a.append('') return sep.join(a[:n]) def calcLpsOnNorm(bc, r): return 1.6667 * (-1.0 + ((bc * r) / (250.0 + bc * r))) def calcLpsOnChance(base): return 1.6667 * (-1.0 + base)
2,547
1,011
import pickle #function to run for prediction def detecting_fake_news(var): #retrieving the best model for prediction call load_model = pickle.load(open('model/final_model.sav', 'rb')) prediction = load_model.predict([var]) prob = load_model.predict_proba([var]) return prediction, prob
309
96
import re import random import numpy as np from itertools import product from enum import Enum, unique from abc import ABC, abstractmethod from typing import Iterator, Dict, List SIZE = 3 # board size (represented by numpy.array SIZExSIZE) # for human player KEYS = {'q': (0, 0), 'w': (0, 1), 'e': (0, 2), 'a': (1, 0), 's': (1, 1), 'd': (1, 2), 'z': (2, 0), 'x': (2, 1), 'c': (2, 2)} # first player must be 1 and the second one -1 SYMBOLS = {"player1": 1, "player2": -1} # first player: X, second player: O, empty: . (+ remove array brackets) GUI = {'0': 'O', '1': '.', '2': 'X', '[': None, ']': None, ' ': None} @unique class Status(Enum): INVALID, NOTEND, PLAYER1, PLAYER2, DRAW = range(-1, 4) def get_rcd_sums(board: np.array) -> tuple: """Return a tuple of sums of all rows, columns and diagonals.""" return (*(sum(x) for x in board), # rows *(sum(x) for x in board.T), # columns np.trace(board), np.trace(np.flip(board, 0))) # diagonals def get_status(board: np.array) -> Status: """Return a status of a game for given board.""" total = np.sum(board) # sum of all fields if total not in (0, 1): # because 1 - first player, -1 - second player return Status.INVALID rcd_sums = get_rcd_sums(board) # sum of rows, cols, and diags # do players have 3 in row player1_has3, player2_has3 = 3 in rcd_sums, -3 in rcd_sums # player1 won, unless player2 moved afterwards (invalid) # or winning move was done after player2 won already (invalid) if player1_has3: return Status.INVALID if total == 0 or player2_has3 else Status.PLAYER1 # player2 won, unless player1 moved afterwards (invalid) if player2_has3: return Status.INVALID if total == 1 else Status.PLAYER2 # draw or the game is not done yet return Status.NOTEND if (board == 0).any() else Status.DRAW def get_id(board: np.array) -> int: """Get unique id for a board.""" board_id = 0 # 3 possible state of a field -> the factor 3 ensure uniqueness # -1 -> 2 to avoid negative ids for field in board.flatten(): board_id = 3 * board_id + (field if field >= 0 else 2) return board_id def get_free_cells(board: np.array) -> tuple: """Return a tuple with (i, j) coordinates of available cells.""" return np.argwhere(board == 0) # all possible combinations of -1, 0, 1 on a SIZExSIZE board # (including impossible tic tac toe states) BOARD_GENERATOR = (np.array(state).reshape(SIZE, SIZE) for state in product(range(-1, 2), repeat=SIZE**2)) # (board, state) generator STATE_GENERATOR = ((board, get_status(board)) for board in BOARD_GENERATOR) # dictionary of valid tic tac toe states -> id: board, status, free cells STATES = {get_id(board): {'board': board, 'status': status, 'free': get_free_cells(board)} for board, status in STATE_GENERATOR if status != Status.INVALID} def show_board(board: np.array): """Print given board.""" # board + 1: 0 (player2), 1 (empty), 2 (player1) instead of -1, 0, 1 print(np.array_str(board + 1).translate(str.maketrans(GUI)), end='\n\n') def show_result(status: Status): """Print the game status.""" print(status.name, "won!" if status == Status.PLAYER1 or status == Status.PLAYER2 else '') class Player(ABC): """Abstract player class.""" def __init__(self, symbol: str) -> None: """Assign a symbol - player1: 1, player2: -1""" self.symbol = SYMBOLS[symbol] @abstractmethod def make_move(self, state_id: int) -> tuple: """Return (i, j) coordinates for the next move.""" pass def reset(self): pass def save(self, state_id: int): pass def update_estimates(self): pass class Human_player(Player): def make_move(self, state_id: int) -> tuple: """Take input from keyboard until valid move is provided.""" while True: key = input() if key not in KEYS.keys(): print("Use qweasdzxc.\n") continue if KEYS[key] not in ((i, j) for i, j in STATES[state_id]['free']): print("Choose empty cell.\n") continue return KEYS[key] class Agent(Player): """RL agent.""" def __init__(self, symbol: str, step_size: float=0.1, epsilon: float=0.1)-> None: """ step_size -- the step size used in the temporal-difference rule epsilon -- the probability of exploration """ Player.__init__(self, symbol) self.step_size = step_size self.epsilon = epsilon self.V: Dict[int, float] = dict() # estimates of state-value self.init_estimations() # arbitrary initialized self.history: List[int] = [] # all "visited" states self.explore_ids: List[int] = [] # the indices of exploratory moves def reset(self) -> None: """Clear history etc.""" self.history.clear() self.explore_ids.clear() def save(self, state_id: int) -> None: """Remember all visited state in current episode.""" self.history.append(state_id) def init_estimations(self) -> None: """Initilize estimate V.""" # symbol == 1 for player1 win, lose = ((Status.PLAYER1, Status.PLAYER2) if self.symbol == 1 else (Status.PLAYER2, Status.PLAYER1)) # generate estimates for all possible states for state_id, state in STATES.items(): # win -> 1, lose -> 0, draw or game in progress -> 0.5 reward = (1.0 if state['status'] == win else 0.0 if state['status'] == lose else 0.5) self.V[state_id] = reward def make_move(self, state_id: int) -> tuple: """Exploratory (random) move or based on current est. Q.""" if random.random() < self.epsilon: # exploratory move self.explore_ids.append(len(self.history)) return tuple(random.choice(STATES[state_id]['free'])) values = [] # the list of tuple(estimation, (i, j) - next move) for i, j in STATES[state_id]['free']: # get board and add player's symbol on next free cell board = STATES[state_id]['board'].copy() board[i][j] = self.symbol # value + (i, j) values.append((self.V[get_id(board)], (i, j))) # return (i, j) corresponding to the highest current value return sorted(values, key=lambda x: x[0], reverse=True)[0][1] def update_estimates(self) -> None: """Update estimates according to last episode.""" for i in reversed(range(len(self.history) - 1)): # skip exploratory moves if i in self.explore_ids: continue temp_diff = self.V[self.history[i+1]] - self.V[self.history[i]] self.V[self.history[i]] += self.step_size * temp_diff def stop_exploring(self) -> None: """Only greedy moves will be performed.""" self.epsilon = 0.0 class Game: """A single tic tac toe game.""" def __init__(self, player1: Player, player2: Player) -> None: """Note, that it is hardcoded that player1 = 1 and player2 = -1.""" self.player1 = player1 self.player2 = player2 def queue(self) -> Iterator[Player]: """Next player generator.""" while True: yield self.player1 yield self.player2 def play(self, show=False) -> Status: _queue = self.queue() self.player1.reset() self.player2.reset() self.state_id = 0 # empty board # play until state != NOTEND while STATES[self.state_id]['status'] == Status.NOTEND: player = next(_queue) # current player # get current board and update according to player move board = STATES[self.state_id]['board'].copy() board[player.make_move(self.state_id)] = player.symbol not show or show_board(board) self.state_id = get_id(board) # update board state # save current state in agent's history self.player1.save(self.state_id) self.player2.save(self.state_id) not show or show_result(STATES[self.state_id]['status']) # after an episode it is time to update V self.player1.update_estimates() self.player2.update_estimates() return STATES[self.state_id]['status'] if __name__ == "__main__": agent = Agent("player1") game = Game(agent, Agent("player2")) nof_episodes = 10000 for i in range(nof_episodes): game.play() print("Agent's training... [{:>7.2%}]\r".format(i/nof_episodes), end='') print("\n\nPlay with the agent using qweasdzxc:\n\n") agent.stop_exploring() game = Game(agent, Human_player("player2")) while True: game.play(True)
9,058
2,941
""" Tyson Reimer University of Manitoba January 28th, 2020 """ import os from umbms import get_proj_path, get_script_logger from umbms.loadsave import load_pickle, save_pickle from umbms.beamform.sigproc import iczt ############################################################################### __DATA_DIR = os.path.join(get_proj_path(), 'data/') # Define the parameters for the ICZT, used to convert from the # frequency domain to the time domain __INI_T = 0 __FIN_T = 6e-9 __N_TIME_PTS = 700 # Define the initial and final frequencies used in the phantom scans __INI_F = 1e9 __FIN_F = 8e9 ############################################################################### if __name__ == "__main__": logger = get_script_logger(__file__) # Init logger logger.info("Beginning...Making Calibrated Sinograms...") # Import the frequency-domain, uncalibrated data fd_data = load_pickle(os.path.join(__DATA_DIR, 'fd_data.pickle')) cal_td_data = dict() # Init dict to save for expt_id in fd_data: # For each expt # If the experiment was not an adipose-only reference scan if 'adi' not in expt_id: logger.info('\tCalibrating expt:\t%s...' % expt_id) # Get the target (tumour-containing) and reference # (adipose-only) scan data tar_fd_data = fd_data[expt_id] ref_fd_data = fd_data['%sadi' % expt_id[:-3]] # Perform ideal air-tissue reflection subtraction cal_fd_data = tar_fd_data - ref_fd_data # Convert to the time-domain via ICZT td_cal_data = iczt(fd_data=cal_fd_data, ini_t=__INI_T, fin_t=__FIN_T, n_time_pts=__N_TIME_PTS, ini_f=__INI_F, fin_f=__FIN_F) cal_td_data[expt_id] = td_cal_data # Store this save_pickle(cal_td_data, os.path.join(__DATA_DIR, 'td_cal_data.pickle'))
2,034
742
import pytest from scipy import signal from scipy.interpolate import interp1d import numpy as np from numpy import pi # This package must first be installed with `pip install -e .` or similar from waveform_analysis import (ITU_R_468_weighting_analog, ITU_R_468_weighting, ITU_R_468_weight) # It will plot things for sanity-checking if MPL is installed try: import matplotlib.pyplot as plt mpl = True except ImportError: mpl = False # Rec. ITU-R BS.468-4 Measurement of audio-frequency noise voltage # level in sound broadcasting Table 1 frequencies = np.array(( 31.5, 63, 100, 200, 400, 800, 1000, 2000, 3150, 4000, 5000, 6300, 7100, 8000, 9000, 10000, 12500, 14000, 16000, 20000, 31500 )) responses = np.array(( -29.9, -23.9, -19.8, -13.8, -7.8, -1.9, 0, +5.6, +9.0, +10.5, +11.7, +12.2, +12.0, +11.4, +10.1, +8.1, 0, -5.3, -11.7, -22.2, -42.7 )) upper_limits = np.array(( +2.0, +1.4, +1.0, +0.85, +0.7, +0.55, +0.5, +0.5, +0.5, +0.5, +0.5, +0.01, # Actually 0 tolerance, but specified with 1 significant figure +0.2, +0.4, +0.6, +0.8, +1.2, +1.4, +1.6, +2.0, +2.8 )) lower_limits = np.array(( -2.0, -1.4, -1.0, -0.85, -0.7, -0.55, -0.5, -0.5, -0.5, -0.5, -0.5, -0.01, # Actually 0 tolerance, but specified with 1 significant figure -0.2, -0.4, -0.6, -0.8, -1.2, -1.4, -1.6, -2.0, -float('inf') )) class TestITU468WeightingAnalog(object): def test_invalid_params(self): with pytest.raises(TypeError): ITU_R_468_weighting_analog('eels') def test_freq_resp(self): # Test that frequency response meets tolerance from ITU-R BS.468-4 upper = responses + upper_limits lower = responses + lower_limits z, p, k = ITU_R_468_weighting_analog() w, h = signal.freqs_zpk(z, p, k, 2*pi*frequencies) levels = 20 * np.log10(abs(h)) if mpl: plt.figure('468') plt.title('ITU 468 weighting limits') plt.semilogx(frequencies, levels, alpha=0.7, label='analog') plt.semilogx(frequencies, upper, 'r:', alpha=0.7) plt.semilogx(frequencies, lower, 'r:', alpha=0.7) plt.grid(True, color='0.7', linestyle='-', which='major') plt.grid(True, color='0.9', linestyle='-', which='minor') plt.legend() assert all(np.less_equal(levels, upper)) assert all(np.greater_equal(levels, lower)) class TestITU468Weighting(object): def test_invalid_params(self): with pytest.raises(TypeError): ITU_R_468_weighting(fs='spam') with pytest.raises(ValueError): ITU_R_468_weighting(fs=10000, output='eggs') def test_freq_resp_ba(self): # Test that frequency response meets tolerance from ITU-R BS.468-4 fs = 300000 b, a = ITU_R_468_weighting(fs) w, h = signal.freqz(b, a, 2*pi*frequencies/fs) levels = 20 * np.log10(abs(h)) if mpl: plt.figure('468') plt.semilogx(frequencies, levels, alpha=0.7, label='ba') plt.legend() assert all(np.less_equal(levels, responses + upper_limits)) assert all(np.greater_equal(levels, responses + lower_limits)) def test_freq_resp_zpk(self): # Test that frequency response meets tolerance from ITU-R BS.468-4 fs = 270000 z, p, k = ITU_R_468_weighting(fs, 'zpk') w, h = signal.freqz_zpk(z, p, k, 2*pi*frequencies/fs) levels = 20 * np.log10(abs(h)) if mpl: plt.figure('468') plt.semilogx(frequencies, levels, alpha=0.7, label='zpk') plt.legend() assert all(np.less_equal(levels, responses + upper_limits)) assert all(np.greater_equal(levels, responses + lower_limits)) def test_freq_resp_sos(self): # Test that frequency response meets tolerance from ITU-R BS.468-4 fs = 400000 sos = ITU_R_468_weighting(fs, output='sos') w, h = signal.sosfreqz(sos, 2*pi*frequencies/fs) levels = 20 * np.log10(abs(h)) if mpl: plt.figure('468') plt.semilogx(frequencies, levels, alpha=0.7, label='sos') plt.legend() assert all(np.less_equal(levels, responses + upper_limits)) assert all(np.greater_equal(levels, responses + lower_limits)) class TestITU468Weight(object): def test_invalid_params(self): with pytest.raises(TypeError): ITU_R_468_weight('change this') def test_freq_resp(self): # Test that frequency response meets tolerance from ITU-R BS.468-4 N = 12000 fs = 300000 impulse = signal.unit_impulse(N) out = ITU_R_468_weight(impulse, fs) freq = np.fft.rfftfreq(N, 1/fs) levels = 20 * np.log10(abs(np.fft.rfft(out))) if mpl: plt.figure('468') plt.semilogx(freq, levels, alpha=0.7, label='fft') plt.legend() plt.axis([20, 45000, -50, +15]) # Interpolate FFT points to measure response at spec's frequencies func = interp1d(freq, levels) levels = func(frequencies) assert all(np.less_equal(levels, responses + upper_limits)) assert all(np.greater_equal(levels, responses + lower_limits)) if __name__ == '__main__': # Without capture sys it doesn't work sometimes, I'm not sure why. pytest.main([__file__, "--capture=sys"])
5,477
2,245
import torch from torch import nn, optim from torch.nn import functional as F from torch.utils import data import os import time from collections import deque import numpy as np import torch from a2c_ppo_acktr import algo from a2c_ppo_acktr import utils from a2c_ppo_acktr.envs import make_vec_envs from a2c_ppo_acktr.storage import RolloutStorage from a2c_ppo_acktr.model import Policy class CNNEmbeddingNetwork(nn.Module): def __init__(self, kwargs): super(CNNEmbeddingNetwork, self).__init__() self.main = nn.Sequential( nn.Conv2d(kwargs['in_channels'], 32, (8, 8), stride=(4, 4)), nn.ReLU(), nn.Conv2d(32, 64, (4, 4), stride=(2, 2)), nn.ReLU(), nn.Conv2d(64, 32, (3, 3), stride=(1, 1)), nn.ReLU(), nn.Flatten(), nn.Linear(32 * 7 * 7, kwargs['embedding_size'])) def forward(self, ob): x = self.main(ob) return x class MLPEmbeddingNetwork(nn.Module): def __init__(self, kwargs): super(MLPEmbeddingNetwork, self).__init__() self.main = nn.Sequential( nn.Linear(kwargs['input_dim'], 32), nn.ReLU(), nn.Linear(32, 64), nn.ReLU(), nn.Linear(64, kwargs['embedding_size']) ) def forward(self, ob): x = self.main(ob) return x class DisInverseDynamicModel(nn.Module): def __init__(self, kwargs): super(DisInverseDynamicModel, self).__init__() self.main = nn.Sequential( nn.Linear(kwargs['embedding_size'] * 2, 32), nn.ReLU(), nn.Linear(64, 64), nn.ReLU(), nn.Linear(64, kwargs['action_shape']) ) def forward(self, ob_emb, next_ob_emb): probs = self.main(torch.cat([ob_emb, next_ob_emb], dim=1)) pred_action = F.softmax(probs, dim=1) return pred_action class DisForwardDynamicModel(nn.Module): def __init__(self, kwargs): super(DisForwardDynamicModel, self).__init__() self.nA = kwargs['nA'] self.main = nn.Sequential( nn.Linear(kwargs['embedding_size'] + kwargs['action_shape'], 32), nn.ReLU(), nn.Linear(32, 64), nn.ReLU(), nn.Linear(64, kwargs['embedding_size']) ) def forward(self, ob_emb, true_action): onehot_action = F.one_hot(true_action, num_classes=self.nA) pred_next_ob_emb = self.main(torch.cat([ob_emb, onehot_action], dim=1)) return pred_next_ob_emb class ConInverseDynamicModel(nn.Module): def __init__(self, kwargs): super(ConInverseDynamicModel, self).__init__() self.main = nn.Sequential( nn.Linear(kwargs['embedding_size'] * 2, 32), nn.ReLU(), nn.Linear(32, 64), nn.ReLU(), nn.Linear(64, kwargs['action_shape']) ) def forward(self, ob_emb, next_ob_emb): pred_action = self.main(torch.cat([ob_emb, next_ob_emb], dim=1)) return pred_action class ConForwardDynamicModel(nn.Module): def __init__(self, kwargs): super(ConForwardDynamicModel, self).__init__() self.main = nn.Sequential( nn.Linear(kwargs['embedding_size'] + kwargs['action_shape'], 32), nn.ReLU(), nn.Linear(32, 64), nn.ReLU(), nn.Linear(64, kwargs['embedding_size']) ) def forward(self, ob_emb, true_action): pred_next_ob_emb = self.main(torch.cat([ob_emb, true_action], dim=1)) return pred_next_ob_emb class RIDE: def __init__( self, ob_shape, action_shape, device ): self.ob_shape = ob_shape self.action_shape = action_shape self.device = device if len(ob_shape) == 3: self.embedding_network = CNNEmbeddingNetwork(kwargs={'in_channels': ob_shape[0], 'embedding_size': 128}) self.idm = DisInverseDynamicModel(kwargs={'embedding_size': 128, 'action_shape':action_shape}) self.fdm = DisForwardDynamicModel(kwargs={'embedding_size': 128, 'action_shape':action_shape}) else: self.embedding_network = MLPEmbeddingNetwork(kwargs={'input_dim': ob_shape[0], 'embedding_size': 64}) self.idm = ConInverseDynamicModel(kwargs={'embedding_size': 64, 'action_shape': action_shape[0]}) self.fdm = ConForwardDynamicModel(kwargs={'embedding_size': 64, 'action_shape': action_shape[0]}) self.embedding_network.to(self.device) self.idm.to(self.device) self.fdm.to(self.device) self.optimzer_en = optim.Adam(self.embedding_network.parameters(), lr=5e-4) self.optimzer_idm = optim.Adam(self.idm.parameters(), lr=5e-4) self.optimzer_fdm = optim.Adam(self.fdm.parameters(), lr=5e-4) def compute_rewards(self, obs_buffer): size = obs_buffer.size() obs = obs_buffer[:-1].view(-1, *obs_buffer.size()[2:]) next_obs = obs_buffer[1:].view(-1, *obs_buffer.size()[2:]) obs_emb = self.embedding_network(obs.to(self.device)) next_obs_emb = self.embedding_network(next_obs.to(self.device)) rewards = torch.norm(obs_emb - next_obs_emb, p=2, dim=1) return rewards.view(size[0] - 1, size[1], 1) def pseudo_counts( self, step, episodic_memory, current_c_ob, k=10, kernel_cluster_distance=0.008, kernel_epsilon=0.0001, c=0.001, sm=8, ): counts = torch.zeros(size=(episodic_memory.size()[1], 1)) for process in range(episodic_memory.size()[1]): process_episodic_memory = episodic_memory[:step + 1, process, :] ob_dist = [(c_ob, torch.dist(c_ob, current_c_ob)) for c_ob in process_episodic_memory] # ob_dist = [(c_ob, torch.dist(c_ob, current_c_ob)) for c_ob in episodic_memory] ob_dist.sort(key=lambda x: x[1]) ob_dist = ob_dist[:k] dist = [d[1].item() for d in ob_dist] dist = np.array(dist) # TODO: moving average dist = dist / np.mean(dist) dist = np.max(dist - kernel_cluster_distance, 0) kernel = kernel_epsilon / (dist + kernel_epsilon) s = np.sqrt(np.sum(kernel)) + c if np.isnan(s) or s > sm: counts[process] = 0. else: counts[process] = 1 / s return counts def update(self, obs_buffer, actions_buffer): obs = obs_buffer[:-1].view(-1, *obs_buffer.size()[2:]) next_obs = obs_buffer[1:].view(-1, *obs_buffer.size()[2:]) if len(self.ob_shape) == 3: actions = actions_buffer.view(-1, 1) else: actions = actions_buffer.view(-1, *actions_buffer.size()[2:]) dataset = data.TensorDataset(obs, actions, next_obs) loader = data.DataLoader( dataset=dataset, batch_size=64, shuffle=True, drop_last=True ) for idx, batch_data in enumerate(loader): self.optimzer_en.zero_grad() self.optimzer_idm.zero_grad() self.optimzer_fdm.zero_grad() batch_obs, batch_actions, batch_next_obs = batch_data batch_obs_emb = self.embedding_network(batch_obs.to(self.device)) batch_next_obs_emb = self.embedding_network(batch_next_obs.to(self.device)) batch_actions = batch_actions.to(self.device) if len(self.ob_shape) == 3: pred_actions_logits = self.idm(batch_obs_emb, batch_next_obs_emb) inverse_loss = F.cross_entropy(pred_actions_logits, batch_actions.squeeze(1)) else: pred_actions = self.idm(batch_obs_emb, batch_next_obs_emb) inverse_loss = F.mse_loss(pred_actions, batch_actions) pred_next_obs_emb = self.fdm(batch_obs_emb, batch_actions) forward_loss = F.mse_loss(pred_next_obs_emb, batch_next_obs_emb) total_loss = inverse_loss + forward_loss total_loss.backward() self.optimzer_en.step() self.optimzer_idm.step() self.optimzer_fdm.step() # device = torch.device('cuda:0') # ride = RIDE(ob_shape=[4, 84, 84], nA=7, device=device) # obs_buffer = torch.rand(size=[129, 8, 4, 84, 84]) # actions_buffer = torch.randint(low=0, high=6, size=(128, 8, 1)) # ride.update(obs_buffer, actions_buffer) # rewards = ride.compute_rewards(obs_buffer) # print(rewards, rewards.size()) def train(args): torch.manual_seed(args.seed) torch.cuda.manual_seed_all(args.seed) torch.backends.cudnn.benchmark = False torch.backends.cudnn.deterministic = True log_dir = os.path.expanduser(args.log_dir) # eval_log_dir = log_dir + "_eval" utils.cleanup_log_dir(log_dir) # utils.cleanup_log_dir(eval_log_dir) torch.set_num_threads(1) device = torch.device("cuda:0" if args.cuda else "cpu") envs = make_vec_envs(args.env_name, args.seed, args.num_processes, args.gamma, args.log_dir, device, False) actor_critic = Policy( envs.observation_space.shape, envs.action_space, base_kwargs={'recurrent': args.recurrent_policy}) actor_critic.to(device) agent = algo.PPO( actor_critic, args.clip_param, args.ppo_epoch, args.num_mini_batch, args.value_loss_coef, args.entropy_coef, lr=args.lr, eps=args.eps, max_grad_norm=args.max_grad_norm) rollouts = RolloutStorage(args.num_steps, args.num_processes, envs.observation_space.shape, envs.action_space, actor_critic.recurrent_hidden_state_size) obs = envs.reset() rollouts.obs[0].copy_(obs) rollouts.to(device) ''' ride initialization ''' if envs.observation_space.__class__.__name__ == 'Discrete': ride = RIDE( ob_shape=envs.observation_space.shape, action_shape=envs.action_space.n, device=device ) episodic_emb_memory = torch.zeros(size=(args.num_steps + 1, args.num_processes, 128)).to(device) elif envs.observation_space.__class__.__name__ == 'Box': ride = RIDE( ob_shape=envs.observation_space.shape, action_shape=envs.action_space.shape, device=device ) episodic_emb_memory = torch.zeros(size=(args.num_steps + 1, args.num_processes, 64)).to(device) else: raise NotImplementedError episode_rewards = deque(maxlen=10) start = time.time() num_updates = int( args.num_env_steps) // args.num_steps // args.num_processes for j in range(num_updates): if args.use_linear_lr_decay: # decrease learning rate linearly utils.update_linear_schedule(agent.optimizer, j, num_updates, args.lr) episodic_emb_memory[0, :, :] = ride.embedding_network(rollouts.obs[0].to(device)) pseudo_counts = torch.zeros_like(rollouts.rewards).to(device) for step in range(args.num_steps): # Sample actions with torch.no_grad(): value, action, action_log_prob, recurrent_hidden_obs = actor_critic.act( rollouts.obs[step], rollouts.recurrent_hidden_states[step], rollouts.masks[step]) # Obser reward and next obs obs, reward, done, infos = envs.step(action) ''' pseudo-count ''' next_obs_emb = ride.embedding_network(obs.to(device)) pseudo_counts[step, :, :] = ride.pseudo_counts(step, episodic_emb_memory, next_obs_emb) episodic_emb_memory[step + 1, :, :] = next_obs_emb for info in infos: if 'episode' in info.keys(): episode_rewards.append(info['episode']['r']) # If done then clean the history of observations. masks = torch.FloatTensor( [[0.0] if done_ else [1.0] for done_ in done]) bad_masks = torch.FloatTensor( [[0.0] if 'bad_transition' in info.keys() else [1.0] for info in infos]) rollouts.insert(obs, recurrent_hidden_obs, action, action_log_prob, value, reward, masks, bad_masks) with torch.no_grad(): next_value = actor_critic.get_value( rollouts.obs[-1], rollouts.recurrent_hidden_states[-1], rollouts.masks[-1]).detach() ''' compute intrinsic rewards ''' intrinsic_rewards = ride.compute_rewards(rollouts.obs) rollouts.rewards += intrinsic_rewards * pseudo_counts rollouts.compute_returns(next_value, args.use_gae, args.gamma, args.gae_lambda, args.use_proper_time_limits) value_loss, action_loss, dist_entropy = agent.update(rollouts) rollouts.after_update() ''' update ride ''' ride.update(rollouts.obs, rollouts.actions) # save for every interval-th episode or for the last epoch if (j % args.save_interval == 0 or j == num_updates - 1) and args.save_dir != "": save_path = os.path.join(args.save_dir, args.algo) try: os.makedirs(save_path) except OSError: pass torch.save([ actor_critic, getattr(utils.get_vec_normalize(envs), 'obs_rms', None) ], os.path.join(save_path, args.env_name + ".pt")) if j % args.log_interval == 0 and len(episode_rewards) > 1: total_num_steps = (j + 1) * args.num_processes * args.num_steps end = time.time() print( 'ALGO {}, ENV {}, EPISODE {}, TIME STEPS {}, FPS {} \n MEAN/MEDIAN REWARD {:.3f}|{:.3f}, MIN|MAX REWARDS {:.3f}|{:.3f}\n'.format( args.algo, args.env_name, j, total_num_steps, int(total_num_steps / (end - start)), np.mean(episode_rewards), np.median(episode_rewards), np.min(episode_rewards), np.max(episode_rewards) ))
14,154
4,902
from .client import NISClient, display_visjs_jupyterlab
57
21
# submitted by hybrideagle from random import random from math import pi def in_circle(x_pos, y_pos): radius = 1 # Compute euclidian distance from origin return (x_pos * x_pos + y_pos * y_pos) < (radius * radius) def monte_carlo(n): """ Computes PI using the monte carlo method using `n` points """ pi_count = 0 for i in range(n): x = random() y = random() if in_circle(x, y): pi_count += 1 # This is using a quarter of the unit sphere in a 1x1 box. # The formula is pi = (boxLength^2 / radius^2) * (piCount / n), but we # are only using the upper quadrant and the unit circle, so we can use # 4*piCount/n instead # piEstimate = 4*piCount/n pi_estimate = 4 * pi_count / n print('Pi is {0:} ({1:.4f}% error)'.format( pi_estimate, (pi - pi_estimate) / pi * 100)) # If this file was run directly if __name__ == "__main__": monte_carlo(100000)
957
352
class Solution: def shipWithinDays(self, weights: List[int], D: int) -> int: def isValid(capacity): day_count = 1 cum_sum = 0 for weight in weights: cum_sum += weight if cum_sum > capacity: day_count += 1 cum_sum = weight return day_count <= D low, high = max(weights), sum(weights) while low <= high: mid = low + (high - low)//2 if isValid(mid): high = mid-1 else: low = mid+1 return low
665
175
from time import strftime class API_efaBeta(object): def __init__( self ): self.name = 'efaBeta' self.baseurl = 'https://www3.vvs.de/mngvvs/XML_DM_REQUEST' def convert_station_id( self, station_id ): """ convert station id that is given to the api specific representation if necessary @param station_id: id in general representation @return id in api specific representation """ return station_id def get_params( self, current_time_raw, station ): """ @param current_time_raw: time as gmtime object @param station: station id in general representation @return dict with key value pairs for api parameters """ itdDate = strftime("%Y%m%d", current_time_raw) itdTime = strftime("%H%M", current_time_raw) return { 'SpEncId' : 0, 'coordOutputFormat' : "EPSG:4326", 'deleteAssignedStops' : 1, 'itdDate' : itdDate, 'itdTime' : itdTime, 'limit' : 50, 'mode' : "direct", 'name_dm' : "de:8111:{}".format(self.convert_station_id(station)), 'outputFormat' : "rapidJSON", 'serverInfo' : "1", 'type_dm' : "any", 'useRealtime' : "1", 'version' : "10.2.2.48" } def function_to_call( self, results ): """ function that gets called on an api response @param results: queue object of the api that contains result dicts from the api call. { 'timestamp': gmtime object -> when was the api call made 'name': api's name (id), 'station': station id, 'results': crawl results -> what came back from api } """ results.put(None) converted_results = [] for r in iter(results.get, None): station = {} current_dict = {} station[r['station']] = [current_dict] current_dict['timestamp'] = strftime('%Y-%m-%dT%H:%M:%SZ', r['timestamp']) # "2017-04-14 TEST" current_dict['lines'] = {} if not 'results' in r or not 'stopEvents' in r['results']: continue stop_events = filter(lambda elem: elem['transportation']['product']['name'] == 'S-Bahn', r['results']['stopEvents']) for st_event in stop_events: departure_dict = {} # print st_event if 'isRealtimeControlled' in st_event: departure_dict['isRealtimeControlled'] = st_event['isRealtimeControlled'] else: departure_dict['isRealtimeControlled'] = False if 'isRealtimeControlled' in departure_dict and 'departureTimeEstimated' in st_event: departure_dict['departureTimeEstimated'] = st_event['departureTimeEstimated'] # else: # departure_dict['departureTimeEstimated'] = None departure_dict['departureTimePlanned'] = st_event['departureTimePlanned'] if 'infos' in st_event: departure_dict['infos'] = [] for i in range(len(st_event['infos'])): info = {} if 'content' in st_event['infos'][i]: info['content'] = st_event['infos'][i]['content'] else: info['content'] = "" info['title'] = st_event['infos'][i]['title'] info['subtitle'] = st_event['infos'][i]['subtitle'] info['properties'] = st_event['infos'][i]['properties'] departure_dict['infos'].append(info) line = st_event['transportation']['number'] departure_dict['name'] = st_event['transportation']['product']['name'] departure_dict['class'] = st_event['transportation']['product']['class'] if line in current_dict['lines']: current_dict['lines'][line].append(departure_dict) else: current_dict['lines'][line] = [departure_dict] converted_results.append(station) # print "Results: " # with open("results.json", 'w') as output: # json.dump(converted_results, output, indent=4) # pprint(converted_results) return converted_results
4,703
1,272
class Solution(object): def XXX(self, s): if len(s) % 2 == 1: # 奇数长度 return False d = {'(': ')', '{': '}', '[': ']'} stack = [] for char in s: if char in d: # 左括号入栈 stack.append(char) else: if not stack or d[stack.pop()] != char: # 没入栈就出栈 或 出栈元素不匹配当前元素 return False return True if not stack else False
450
171
#!/usr/bin/env python3 class Day22: deck = list(range(0, 10007)) def dealIntoNewStack(self): self.deck = self.deck[::-1] def cutNCards(self, n): self.deck = self.deck[n:] + self.deck[:n] def incrementN(self, n): deck_copy = [None] * len(self.deck) pointer = 0 while (len(self.deck) > 0): deck_copy[pointer] = self.deck.pop(0) pointer += n if pointer > len(deck_copy): pointer = pointer % len(deck_copy) self.deck = deck_copy def partA(self): with open('input.txt') as fp: for line in fp: words = line.strip().split() if words[0] == 'deal': if words[1] == 'with': self.incrementN(int(words[3])) else: self.dealIntoNewStack() elif words[0] == 'cut': self.cutNCards(int(words[1])) if __name__ == '__main__': d = Day22() d.partA() print(d.deck.index(2019))
1,075
356
#============================================================================== # node_master.py # SNAP Master Node code that interacts with other nodes on the SNAP network # to receive their data and forward it onto a serial-to-Internet gateway for # remote monitoring purposes. This is part of an Exosite-compatible SNAP # network configuration. #============================================================================== ## Copyright (c) 2010, Exosite LLC ## All rights reserved. ## ## Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions are met: ## ## * Redistributions of source code must retain the above copyright notice, ## this list of conditions and the following disclaimer. ## * Redistributions in binary form must reproduce the above copyright ## notice, this list of conditions and the following disclaimer in the ## documentation and/or other materials provided with the distribution. ## * Neither the name of Exosite LLC nor the names of its contributors may ## be used to endorse or promote products derived from this software ## without specific prior written permission. ## ## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ## AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ## ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE ## LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ## CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ## SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ## INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ## CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ## ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ## POSSIBILITY OF SUCH DAMAGE. from synapse.evalBase import * from synapse.switchboard import * from synapse.sysInfo import * NV_DEVICE_NAME_ID = 8 # The device name is stored at this location DEVICE_NAME = 'NODECIKHEREFROMEXOSITEPLATFORM' # Device name is its client interface key HEADER = '12345678' FOOTER = '87654321' NODE_PASSPHRASE = 'exositemasternode' GW_PASSPHRASE = 'exositegateway' NV_DEVICE_GROUP_ID = 5 DEVICE_GROUP = 0x0003 # set to groups 0x0001 and 0x0002 (bit OR) #------------------------------------------------------------------------------ def startupEvent(): # Ran on power-up and reset, hooked into the HOOK_STARTUP event #------------------------------------------------------------------------------ node_name = loadNvParam(NV_DEVICE_NAME_ID) if node_name != DEVICE_NAME: saveNvParam(NV_DEVICE_NAME_ID,DEVICE_NAME) group = loadNvParam(NV_DEVICE_GROUP_ID) if group != DEVICE_GROUP: saveNvParam(NV_DEVICE_GROUP_ID,DEVICE_GROUP) initUart(0, 38400) flowControl(0,False) stdinMode(1, False) # Char Mode, Echo Off crossConnect(DS_STDIO, DS_UART0) # Hook UART to STDIO (print out/Event in) #------------------------------------------------------------------------------ def publishData(node,resource,message): # Invoked when a node publishes a message #------------------------------------------------------------------------------ # Due to crossConnect call above, all print messages sent out UART to GW print HEADER print node print resource print message print FOOTER return #------------------------------------------------------------------------------ def stdinEvent(data_buff): # Invoked when the gateway sends us data via UART. #------------------------------------------------------------------------------ processCommands(data_buff) #------------------------------------------------------------------------------ def processCommands(data_buff): # Process commands received from the gateway #------------------------------------------------------------------------------ if GW_PASSPHRASE == data_buff: # check for gateway 'ping' print NODE_PASSPHRASE # just echo rx'd characters back else: print 'error: unavailable' #============================================================================== # SnappyGen Hooks # Hook up event handlers #============================================================================== snappyGen.setHook(SnapConstants.HOOK_STARTUP, startupEvent) snappyGen.setHook(SnapConstants.HOOK_STDIN, stdinEvent)
4,567
1,356
import scipy.interpolate import scipy.signal from builtins import staticmethod import numpy as np from scripts.utils.ArrayUtils import ArrayUtils class MatlabUtils: @staticmethod def max(array: np.ndarray): if len(array) > 1: return np.amax(array, axis=0) else: return np.amax(array) @staticmethod def min(array: np.ndarray): if len(array) > 1: return np.amin(array, axis=0) else: return np.amin(array) @staticmethod def sum(array: np.ndarray): if len(array.shape) > 1: return np.sum(array, axis=0) else: return np.sum(array) @staticmethod def gausswin(M: int, alpha=2.5): """ This function works like Matlab's Gaussian function. In SciPy (scipy.signal.gaussian) it originally works bit differently. Idea: https://github.com/openworm/open-worm-analysis-toolbox/blob/master/open_worm_analysis_toolbox/utils.py """ N = M - 1 n = np.arange(start=0, stop=M) - N / 2 w = np.exp(-0.5 * np.power((alpha * n / (N / 2)), 2)) return w @staticmethod def hist(a: np.ndarray, bins: np.ndarray, density=False): """Adds np.Inf to the bins end to make Numpy histograms equal to Matlab's. Density helps with decimal values in response.""" new_bins = np.r_[-np.Inf, 0.5 * (bins[:-1] + bins[1:]), np.Inf] return np.histogram(a, new_bins, density=density) @staticmethod def interp(vector: np.ndarray, interp_factor: int, kind: str = 'cubic'): vector_len = len(vector) arange = np.linspace(0, .1, vector_len) interp_fun = scipy.interpolate.interp1d(arange, vector, kind=kind) xnew = np.linspace(0, .1, vector_len * interp_factor) return interp_fun(xnew) @staticmethod def std(array: np.ndarray, axis=None): """https://stackoverflow.com/questions/27600207/why-does-numpy-std-give-a-different-result-to-matlab-std""" return np.std(array, axis, ddof=1) @staticmethod def polyfit_polyval(x: np.ndarray, y: np.ndarray, deg: int, max_desinty_or_percent_rand: float): """ Function that works like polyfit and polyval where polyfit returns three values. https://stackoverflow.com/questions/45338872/matlab-polyval-function-with-three-outputs-equivalent-in-python-numpy/45339206#45339206 """ mu = np.mean(x) std = MatlabUtils.std(y) c_scaled = np.polyfit((x - mu) / std, y, deg) p_scaled = np.poly1d(c_scaled) polyval = p_scaled((max_desinty_or_percent_rand - mu) / std) return polyval @staticmethod def filter2(h, x, mode='same'): """https://stackoverflow.com/questions/43270274/equivalent-of-matlab-filter2filter-image-valid-in-python""" return scipy.signal.convolve2d(x, np.rot90(h, 2), mode) @staticmethod def lscov(A: np.ndarray, B: np.ndarray, weights: np.ndarray): """Least-squares solution in presence of known covariance https://stackoverflow.com/questions/27128688/how-to-use-least-squares-with-weight-matrix-in-python""" W_col_array = weights[:, np.newaxis] Aw = A * np.sqrt(W_col_array) Bw = B * np.sqrt(weights)[:, np.newaxis] return np.linalg.lstsq(Aw, Bw)[0]
3,373
1,218
# python3 def solve(S): brackets = [] for i in range(len(S)): if S[i]=='(' or S[i]==')' or S[i]=='{' or S[i]=='}' or S[i]=='[' or S[i]==']': brackets.append((S[i], i+1)) #print(brackets) stack = [] for bracket in brackets: b, idx = bracket[0], bracket[1] if b=='(' or b=='{' or b=='[': stack.append(bracket) elif b==')' or b=='}' or b==']': if len(stack)==0: return idx else: pre = stack[-1] pre_b, pre_idx = pre[0], pre[1] stack.pop() if b==')': if pre_b!='(': return idx elif b=='}': if pre_b!='{': return idx elif b==']': if pre_b!='[': return idx if len(stack)==0: return "Success" else: return stack[0][1] if __name__ == '__main__': S = input() print(solve(S))
1,185
384
""" Insertion Sort -------------- Builds the sorted array by inserting one at a time. Time Complexity: O(n^2) Space Complexity: O(n) Stable: Yes """ def insertion_sort(A): """ Takes a list of integers and sorts them in ascending order, then returns it. Args: A (arr): A list of integers Returns: arr: A list of sorted integers """ for i in xrange(1, len(A)): x = A[i] j = i-1 while j >= 0 and A[j] > x: A[j+1] = A[j] j -= 1 A[j+1] = x return A
476
210
from infi.rpc.errors import RPCUserException class AppRepoBaseException(RPCUserException): pass class FileAlreadyExists(AppRepoBaseException): pass class FileRejected(AppRepoBaseException): pass class FilenameParsingFailed(FileRejected): pass class FileProcessingFailed(FileRejected): pass class FileNeglectedByIndexers(FileRejected): pass class NoCredentialsException(Exception): pass
428
139
# Python modules # 3rd party modules import wx # Our modules import vespa.simulation.auto_gui.experiment_list as gui_experiment_list import vespa.common.wx_gravy.common_dialogs as common_dialogs import vespa.common.wx_gravy.util as wx_util #------------------------------------------------------------------------------ # Note. GUI Architecture/Style # # Many of the GUI components in Vespa are designed using the WxGlade # application to speed up development times. The GUI components are designed # interactively and users can preview the resultant window/panel/dialog, but # while event functions can be specified, only stub functions with those # names are created. The WxGlade files (with *.wxg extensions) are stored in # the 'wxglade' subdirectory. The ouput of their code generation are stored # in the 'auto_gui' subdirectory. # # To used these GUI classes, each one is inherited into a unique 'vespa' # class, where program specific initialization and other functionality are # written. Also, the original stub functions for widget event handlers are # overloaded to provide program specific event handling. #------------------------------------------------------------------------------ class DialogExperimentList(gui_experiment_list.MyDialog): def __init__(self, parent, metabolite): if not parent: parent = wx.GetApp().GetTopWindow() gui_experiment_list.MyDialog.__init__(self, parent) self.metabolite = metabolite self.SetTitle("Experiments Using %s" % metabolite.name) names = [name for name in metabolite.experiment_names] self.ListExperiments.SetItems(names) self.Layout() self.Center() self.ListExperiments.SetFocus() def on_copy(self, event): s = "Simulation %s:\n" % self.GetTitle() s += "\n".join([name for name in self.metabolite.experiment_names]) wx_util.copy_to_clipboard(s) def on_close(self, event): self.Close()
2,001
553
#!/bin/python3 import math import os import random import re import sys # Complete the cutTheSticks function below. def cutTheSticks(arr): l = len(arr) result = [] referer = list(set(arr)) # print('array is', arr) refer = sorted(referer,reverse = True) # print('reference is', refer) lr = len(refer) for i in range(lr): value = refer[i] result.append(arr.count(value)) # print(result) for i in range(1,lr): result[i] = result[i]+result[i-1] res = result[::-1] for i in res: print(i) if __name__ == '__main__': n = int(input()) arr = list(map(int, input().rstrip().split())) cutTheSticks(arr)
696
248
#!/usr/bin/python # -*- coding: utf-8 -*- """TeNOR Network Service Instance Class and Client""" import requests import json import uuid from tenor_vnfi import TenorVNFI from template_management import create_ssh_client from template_management import render_template from models.instance_configuration import InstanceConfiguration from models.tenor_messages import CriticalError from models.tenor_messages import InstanceDenial from models.tenor_messages import FirstBoot from urlparse import urlparse from scp import SCPClient from Crypto.PublicKey import RSA import os import ConfigParser CONFIG = ConfigParser.RawConfigParser() CONFIG.read('config.cfg') DEFAULT_TENOR_URL = format('{0}:{1}'.format( CONFIG.get('tenor', 'url'), CONFIG.get('tenor', 'port'))) def runtime_mapping(name, tenor_nsi): addresses = tenor_nsi.get_addresses() for addr in addresses: if (name.upper() == 'FLOATING_IP') and (addr['OS-EXT-IPS:type'].upper() == 'FLOATING'): return addr['addr'] if (name.upper() == 'FIXED_IP') and (addr['OS-EXT-IPS:type'].upper() == 'FIXED'): return addr['addr'] return None class TenorNSI(object): """Represents a TeNOR NS Instance""" def __init__(self, nsi_id, tenor_url=DEFAULT_TENOR_URL): self._nsi_id = nsi_id self._tenor_url = tenor_url self._state = "UNKNOWN" self._addresses = [] self._image_id = None self._image_url = None self._code = None self.retrieve() def __repr__(self): return "{0} {1} {2}".format(self._nsi_id, self._state, self._addresses) def retrieve(self): """Get NSI information from tenor instance""" try: resp = requests.get('{0}/ns-instances/{1}'.format( self._tenor_url, self._nsi_id)) except IOError: raise IOError('{0} instance unreachable'.format(self._tenor_url)) try: nsi = json.loads(resp.text) except: self._state = 'UNKNOWN' return {} if 'vnfrs' in nsi: if len(nsi['vnfrs']) > 0: vnfr = nsi['vnfrs'][0] if 'vnfr_id' in vnfr: vnfi = TenorVNFI(vnfr['vnfr_id']) self._image_id = vnfi.get_image_id() self._image_url = vnfi.get_image_url() if 'server' in vnfr: if 'status' in vnfr['server']: if vnfr['server']['status'].upper() == 'ACTIVE': self._state = 'RUNNING' if vnfr['server']['status'].upper() == 'SHUTOFF': self._state = 'DEPLOYED' if 'addresses' in vnfr['server']: self._addresses = vnfr['server']['addresses'] return nsi def create_provider_key(self): """Creates a new RSA key pair and updates the machine with the public one""" for addr in self._addresses[0][1]: if addr['OS-EXT-IPS:type'].upper() == 'FLOATING': server_ip = addr['addr'] key = RSA.generate(2048) pubkey = key.publickey() icds = InstanceConfiguration.objects(service_instance_id=self._nsi_id) if len(icds) < 1: print "ICD NOT FOUND" return ssh = create_ssh_client(server_ip, 'root', icds[0].pkey) command = 'echo \'{0}\' >> /root/.ssh/authorized_keys'.format(pubkey.exportKey('OpenSSH')) print command stdin, stdout, stderr = ssh.exec_command(command) print stdout.readlines() print stderr.readlines() ssh.close() # returns the private key return key.exportKey('PEM') def get_addresses(self): return self._addresses[0][1] def configure(self): """Configures the instance according to consumer needs""" for addr in self._addresses[0][1]: if addr['OS-EXT-IPS:type'].upper() == 'FLOATING': server_ip = addr['addr'] icds = InstanceConfiguration.objects(service_instance_id=self._nsi_id) if len(icds) < 1: print "ICD NOT FOUND" return if len(icds[0].consumer_params) == 0: return try: ssh = create_ssh_client(server_ip, 'root', icds[0].pkey) except: crite = CriticalError(service_instance_id=self._nsi_id, message='Failed to connect to {0}'.format(server_ip), code='CONFIGURATION_FAILED') crite.save() return scp = SCPClient(ssh.get_transport()) for cpar in icds[0].consumer_params: filename = cpar.path if 'content' in cpar: content = cpar.content.encode('utf-8') command = 'echo \'{0}\' > {1}'.format(content, filename) print command try: stdin, stdout, stderr = ssh.exec_command(command) except: crite = CriticalError(service_instance_id=self._nsi_id, message='Failed to configure {0} configuration file'.format(filename), code='CONFIGURATION_FAILED') crite.save() return print stdout.readlines() print stderr.readlines() if 'fields' in cpar: print 'Getting {0}'.format(filename) template_id = str(uuid.uuid4()) template_filename = '/tmp/{0}'.format(template_id) try: scp.get(filename, template_filename) except: crite = CriticalError(service_instance_id=self._nsi_id, message='Failed to retrieve {0} configuration file'.format(filename), code='CONFIGURATION_FAILED') crite.save() return keyvalues = {} for item in cpar.fields: if item.runtime: runtime_value = runtime_mapping(item.name, self) if runtime_value: print "RUNTIME" print item.name print runtime_value keyvalues[item.name] = runtime_value else: keyvalues[item.name] = item.value result = render_template(template_id, keyvalues) render_filename = '/tmp/{0}'.format(uuid.uuid4()) with open(render_filename, 'w') as fhandle: fhandle.write(result) print 'Sending {0}'.format(filename) try: scp.put(render_filename, filename) except: crite = CriticalError(service_instance_id=self._nsi_id, message='Failed to write {0} configuration file'.format(filename), code='CONFIGURATION_FAILED') crite.save() return print 'Removing temporary files' os.remove(template_filename) os.remove(render_filename) print 'Closing ssh client' ssh.close() def start(self): """Sets active all the VNF instances associated""" try: insdens = InstanceDenial.objects(service_instance_id=self._nsi_id) if len(insdens) > 0: InstanceDenial.objects(service_instance_id=self._nsi_id).delete() resp = requests.put('{0}/ns-instances/{1}/start'.format( self._tenor_url, self._nsi_id)) self.retrieve() except: raise IOError('Error starting {0}'.format(self._nsi_id)) return resp def stop(self, denied=False): """Sets shutoff all the VNF instances associated""" try: resp = requests.put('{0}/ns-instances/{1}/stop'.format( self._tenor_url, self._nsi_id)) self.retrieve() if denied==True: insden = InstanceDenial(service_instance_id=self._nsi_id, message='DENIED') insden.save() resp = type('', (object,), {'text': json.dumps({'message': 'Successfully sent state signal', 'state': 'DENIED'}),'status_code': 200})() except: raise IOError('Error stoping {0}'.format(self._nsi_id)) return resp def delete(self): """Deletes the NSI""" try: resp = requests.delete('{0}/ns-instances/{1}'.format( self._tenor_url, self._nsi_id)) except IOError: raise IOError('Error deleting {0}'.format(self._nsi_id)) return resp def create_image(self, name_image): try: resp = requests.post('{0}/ns-instances/{1}/snapshot'.format(self._tenor_url, self._nsi_id), headers={'Content-Type': 'application/json'}, json={'name_image': name_image}) except: raise IOError('Error creating snapshot from {0}'.format(self._nsi_id)) return def get_state_and_addresses(self): """Returns state and addresses associated with the NSI""" addresses = [] self.retrieve() runtime_params = [] for adr in self._addresses: for ipif in adr[1]: if ipif['OS-EXT-IPS:type'] == 'floating': runtime_params.append({'name': 'floating_ip', 'desc': 'Service instance IP address', 'value': ipif['addr']}) addresses.append({'OS-EXT-IPS:type': ipif['OS-EXT-IPS:type'], 'addr': ipif['addr']}) failed = False crites = CriticalError.objects(service_instance_id=self._nsi_id) if len(crites) > 0: failed = True if failed: self._state = 'FAILED' self._code = crites[0].code denied = False insdens = InstanceDenial.objects(service_instance_id=self._nsi_id) if len(insdens) > 0: denied = True if denied: self._state = 'DENIED' fbms = FirstBoot.objects(service_instance_id=self._nsi_id) if len(fbms) > 0: self._state = 'UNKNOWN' result = {'service_instance_id': self._nsi_id, 'state': self._state, 'addresses': addresses, 'runtime_params': runtime_params} if self._code: result['code'] = self._code if self._image_id: result['created_image'] = {'vm_image': self._image_id, 'vm_image_format': 'openstack_id'} if self._image_url: image_path = None try: parsed_url = urlparse(self._image_url) image_path = parsed_url.path.split('/')[-1] except: image_path = None if image_path: result['image_path'] = image_path return result @staticmethod def get_nsi_ids(): """Returns the list of NSI registered in TeNOR""" try: resp = requests.get('{0}/ns-instances/ids'.format(DEFAULT_TENOR_URL)) except: raise IOError('{0} instance unreachable'.format(DEFAULT_TENOR_URL)) try: json.loads(resp.text) except: raise ValueError('Decoding NSI response json response failed') ids = [] for nsi in json.loads(resp.text): ids.append(nsi['id']) return ids if __name__ == "__main__": NSS = TenorNSI.get_nsi_ids() CONFIG = {'config': [ { "target_filename": "/var/www/html/index.html", "context": { "name": "MONDAY", "picture": "https://cdn3.iconfinder.com/data/icons/users-6/100/2-512.png", "cv": "laksdj laskjd aslkjd " } }, { "target_filename": "/root/customer_ip.txt", "content": "192.168.1.1" } ] } for n in NSS: NS = TenorNSI(n) print n print NS.get_state_and_addresses() NS.configure('172.24.4.207', CONFIG)
12,713
3,656
""" Name: loadTables.py Description: Script extracts data (specific to Illuminate assessments) from the edfi ODS and loads it into the AWS Aurora db Note: The following code can be run locally or as a lambda function by converting the main function to a lambda handler. """ import argparse import configparser import os import pymssql import psycopg2 from psycopg2 import extras import re from parseRows import * config = configparser.ConfigParser() def main(): parser = argparse.ArgumentParser( description='Copy data from Source tables to Staging.') parser.add_argument('configuration file', type=str, help='configuration file') parser.add_argument('--test', '-t', action='store_true', default=False, help='print queries only.') args = parser.parse_args() config.read(getattr(args, 'configuration file')) tables = config['tables'] for table in tables: rows = extract_table( table, print_only=args.test, local=True) parsed_rows = parse_rows(rows, table) load_to_staging( parsed_rows, table, print_only=args.test, local=True) def extract_table(table, print_only=False, local=True): """ Loads queried rows from the ODS returns matrix of query results """ cred = config['source'] print('Connecting to source db...') conn = pymssql.connect( server=cred['host'], database=cred['dbname'], user=cred['username'], password=cred['password'], port=cred['port']) print("Extract table: " + table) with open(os.path.join(config['sql']['source'], f'{table}.sql'), 'r', encoding='utf') as f: query = f.read() if print_only: print(query) return [] with conn.cursor() as cursor: cursor.execute(query) rows = cursor.fetchall() conn.close() print("Done query table: " + table) return rows def parse_rows(rows, table): """ parses rows from the ODS for insertion in AFStaged, based on inputted table returns parsed matrix of query results """ if table == 'Assessment': parsed_rows = parse_assessment(rows) elif table == 'AssessmentAcademicSubject': parsed_rows = parse_assessmentacademicsubject(rows) elif table == 'AssessmentAssessedGradeLevel': parsed_rows = parse_assessmentassessedgradelevel(rows) elif table == 'AssessmentItem': parsed_rows = parse_assessmentitem(rows) elif table == 'AssessmentItemCategoryDescriptor': parsed_rows = parse_assessmentitemcategorydescriptor(rows) elif table == 'AssessmentItemLearningStandard': parsed_rows = parse_assessmentitemlearningstandard(rows) elif table == 'AssessmentItemResultDescriptor': parsed_rows = assessmentitemresultdescriptor(rows) elif table == 'AssessmentPerformanceLevel': parsed_rows = parse_assessmentperformancelevel(rows) elif table == 'AssessmentReportingMethodType': parsed_rows = parse_assessmentreportingmethodtype(rows) elif table == 'AssessmentScore': parsed_rows = parse_assessmentscore(rows) elif table == 'Descriptor': parsed_rows = parse_descriptor(rows) elif table == 'LearningStandard': parsed_rows = parse_learningstandard(rows) elif table == 'StudentAssessment': parsed_rows = parse_studentassessment(rows) elif table == 'StudentAssessmentItem': parsed_rows = parse_studentassessmentitem(rows) elif table == 'StudentAssessmentPerformanceLevel': parsed_rows = parse_studentassessmentperformancelevel(rows) elif table == 'StudentAssessmentScoreResult': parsed_rows = parse_studentassessmentscoreresult(rows) else: print('Invalid table name') raise Exception('PythonCatchException') return parsed_rows def load_to_staging(parsed_rows, table, print_only=False, local=True): """ loads parsed rows from ODS into Aurora db """ with open(os.path.join(config["sql"]["staged"], f'{table}.sql'), 'r', encoding='utf') as f: query = f.read() if print_only: print(query) return cred = config['destination'] conn = psycopg2.connect( dbname=cred['dbname'], user=cred['username'], password=cred['password'], host=cred['host'], port=cred['port']) schema = config['sql']['schema'] print(f'Inserting data into {schema}.{table}') with conn.cursor() as cursor: delete_command = f'DELETE FROM {schema}."{table}"' cursor.execute(delete_command) try: extras.execute_batch(cursor, query, parsed_rows) except: print(cursor.query) raise print(f'Done inserting into {schema}.{table}') conn.commit() conn.close() if __name__ == "__main__": main()
5,054
1,430
# Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). # You may not use this file except in compliance with the License. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license" file accompanying this file. This file is distributed # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either # express or implied. See the License for the specific language governing # permissions and limitations under the License. import numpy import autograd.numpy as anp from syne_tune.optimizer.schedulers.searchers.bayesopt.gpautograd.mean import ( ScalarMeanFunction, ) from syne_tune.optimizer.schedulers.searchers.bayesopt.gpautograd.kernel import Matern52 from syne_tune.optimizer.schedulers.searchers.bayesopt.gpautograd.likelihood import ( MarginalLikelihood, ) from syne_tune.optimizer.schedulers.searchers.bayesopt.gpautograd.gp_regression import ( GaussianProcessRegression, ) from syne_tune.optimizer.schedulers.searchers.bayesopt.gpautograd.constants import ( NOISE_VARIANCE_LOWER_BOUND, INVERSE_BANDWIDTHS_LOWER_BOUND, ) from syne_tune.optimizer.schedulers.searchers.bayesopt.gpautograd.gluon_blocks_helpers import ( LogarithmScalarEncoding, PositiveScalarEncoding, ) def test_likelihood_encoding(): mean = ScalarMeanFunction() kernel = Matern52(dimension=1) likelihood = MarginalLikelihood(mean=mean, kernel=kernel) assert isinstance(likelihood.encoding, LogarithmScalarEncoding) likelihood = MarginalLikelihood(mean=mean, kernel=kernel, encoding_type="positive") assert isinstance(likelihood.encoding, PositiveScalarEncoding) def test_gp_regression_no_noise(): def f(x): return anp.sin(x) / x x_train = anp.arange(-5, 5, 0.2) # [-5,-4.8,-4.6,...,4.8] x_test = anp.arange( -4.9, 5, 0.2 ) # [-4.9, -4.7, -4.5,...,4.9], note that train and test points do not overlap y_train = f(x_train) y_test = f(x_test) # to np.ndarray y_train_np_ndarray = anp.array(y_train) x_train_np_ndarray = anp.array(x_train) x_test_np_ndarray = anp.array(x_test) model = GaussianProcessRegression(kernel=Matern52(dimension=1)) model.fit(x_train_np_ndarray, y_train_np_ndarray) # Check that the value of the residual noise variance learned by empirical Bayes is in the same order # as the smallest allowed value (since there is no noise) noise_variance = model.likelihood.get_noise_variance() numpy.testing.assert_almost_equal(noise_variance, NOISE_VARIANCE_LOWER_BOUND) mu_train, var_train = model.predict(x_train_np_ndarray)[0] mu_test, var_test = model.predict(x_test_np_ndarray)[0] numpy.testing.assert_almost_equal(mu_train, y_train, decimal=4) numpy.testing.assert_almost_equal(var_train, [0.0] * len(var_train), decimal=4) # Fewer decimals imposed for the test points numpy.testing.assert_almost_equal(mu_test, y_test, decimal=3) # If we wish plot # import matplotlib.pyplot as plt # plt.plot(x_train, y_train, "r") # plt.errorbar(x=x_train, # y=mu_train, # yerr=var_train) # plt.plot(x_test, y_test, "b") # plt.errorbar(x=x_test, # y=mu_test, # yerr=var_test) # plt.show() def test_gp_regression_with_noise(): def f(x): return anp.sin(x) / x anp.random.seed(7) x_train = anp.arange(-5, 5, 0.2) # [-5, -4.8, -4.6,..., 4.8] x_test = anp.arange( -4.9, 5, 0.2 ) # [-4.9, -4.7, -4.5,..., 4.9], note that train and test points do not overlap y_train = f(x_train) y_test = f(x_test) std_noise = 0.01 noise_train = anp.random.normal(0.0, std_noise, size=y_train.shape) # to anp.ndarray y_train_np_ndarray = anp.array(y_train) noise_train_np_ndarray = anp.array(noise_train) x_train_np_ndarray = anp.array(x_train) x_test_np_ndarray = anp.array(x_test) model = GaussianProcessRegression(kernel=Matern52(dimension=1)) model.fit(x_train_np_ndarray, y_train_np_ndarray + noise_train_np_ndarray) # Check that the value of the residual noise variance learned by empirical Bayes is in the same order as std_noise^2 noise_variance = model.likelihood.get_noise_variance() numpy.testing.assert_almost_equal(noise_variance, std_noise**2, decimal=4) mu_train, _ = model.predict(x_train_np_ndarray)[0] mu_test, _ = model.predict(x_test_np_ndarray)[0] numpy.testing.assert_almost_equal(mu_train, y_train, decimal=2) numpy.testing.assert_almost_equal(mu_test, y_test, decimal=2) def test_gp_regression_2d_with_ard(): def f(x): # Only dependent on the first column of x return anp.sin(x[:, 0]) / x[:, 0] anp.random.seed(7) dimension = 3 # 30 train and test points in R^3 x_train = anp.random.uniform(-5, 5, size=(30, dimension)) x_test = anp.random.uniform(-5, 5, size=(30, dimension)) y_train = f(x_train) y_test = f(x_test) # to np.ndarray y_train_np_ndarray = anp.array(y_train) x_train_np_ndarray = anp.array(x_train) x_test_np_ndarray = anp.array(x_test) model = GaussianProcessRegression(kernel=Matern52(dimension=dimension, ARD=True)) model.fit(x_train_np_ndarray, y_train_np_ndarray) # Check that the value of the residual noise variance learned by empirical Bayes is in the same order as the smallest allowed value (since there is no noise) noise_variance = model.likelihood.get_noise_variance() numpy.testing.assert_almost_equal(noise_variance, NOISE_VARIANCE_LOWER_BOUND) # Check that the bandwidths learned by empirical Bayes reflect the fact that only the first column is useful # In particular, for the useless dimensions indexed by {1,2}, the inverse bandwidths should be close to INVERSE_BANDWIDTHS_LOWER_BOUND # (or conversely, bandwidths should be close to their highest allowed values) sqd = model.likelihood.kernel.squared_distance inverse_bandwidths = sqd.encoding.get(sqd.inverse_bandwidths_internal.data()) assert ( inverse_bandwidths[0] > inverse_bandwidths[1] and inverse_bandwidths[0] > inverse_bandwidths[2] ) numpy.testing.assert_almost_equal( inverse_bandwidths[1], INVERSE_BANDWIDTHS_LOWER_BOUND ) numpy.testing.assert_almost_equal( inverse_bandwidths[2], INVERSE_BANDWIDTHS_LOWER_BOUND ) mu_train, _ = model.predict(x_train_np_ndarray)[0] mu_test, _ = model.predict(x_test_np_ndarray)[0] numpy.testing.assert_almost_equal(mu_train, y_train, decimal=2) # Fewer decimals imposed for the test points numpy.testing.assert_almost_equal(mu_test, y_test, decimal=1)
6,788
2,539
from __future__ import absolute_import, division, print_function import logging import sys logging.basicConfig( stream=sys.stdout, format='%(asctime)s %(name)s-%(levelname)s: %(message)s', datefmt='%Y-%m-%d %H:%M:%S') import numpy as np from .feature_extractor import FeatureExtractor logger = logging.getLogger("KL divergence") class RandomFeatureExtractor(FeatureExtractor): """Class which randomly assigns importance to features""" def __init__(self, name="RAND", **kwargs): FeatureExtractor.__init__(self, name=name, supervised=True, **kwargs) def train(self, data, labels): pass def get_feature_importance(self, model, data, labels): """ returns random values per feature between 0 and 1 """ return np.random.random((data.shape[1], labels.shape[1]))
975
273
class Rejected(Exception): """ Raised when the server rejects with a ctrl.code of 400-499. """ pass
116
44
#!/usr/bin/env python3 import yaml """ Get flatlaf config """ flatlaf_version, flatlaf_style = None, None font_decomp, font_ld = {}, {} try: with open("config.yml", "r") as f: config = yaml.load(f, Loader=yaml.FullLoader) flatlaf_version = config['flatlaf']['version'] flatlaf_style = config['flatlaf']['style'] font_decomp = config['font']['Decompiler'] font_ld = config['font']['Listing Display'] except FileNotFoundError: print("Cannot find \"config.yml\" in the directory. Please make sure there's such file in the same folder ( check config_example.yml )") exit(1) except: import traceback traceback.print_exc() exit(1)
692
223
"""Collection of blocks needed for 3-DoF vehicle model. """ from sysopt import Block, Metadata from sysopt.backends import heaviside import numpy as np class InertiaMassOnly(Block): """ Simple inertia model that evaluates 'vehicle mass (wet)' """ def __init__(self): metadata = Metadata( inputs=["Fuel_flow"], state=["Vehicle_mass_wet"], outputs=["Vehicle_mass_wet", "Fuel_mass"], parameters=["Vehicle mass (dry) in kg", "Initial Fuel mass in kg"], ) super().__init__(metadata) def initial_state(self, parameters): Vehicle_mass_dry, fuel_mass_0 = parameters return [Vehicle_mass_dry + fuel_mass_0] def compute_dynamics(self, t, state, algebraics, inputs, parameters): vehicle_mass_wet = state[0] vehicle_mass_dry, _1 = parameters #fuel_flow = inputs[0] fuel_flow = 0 mdot = 0 #heaviside(vehicle_mass_wet - vehicle_mass_dry) * -1 * fuel_flow return [ mdot ] def compute_outputs(self, t, state, algebraics, inputs, parameters): vehicle_mass_wet = state[0] vehicle_mass_dry, _1 = parameters return [ 30, #vehicle_mass_wet, 0, #vehicle_mass_wet - vehicle_mass_dry ]
1,310
437
"""Advent of Code 2015: Day 20""" from itertools import count from typing import Callable, List def get_factors(n: int) -> List[int]: divisors = [] sqrt = int(n ** 0.5) + 1 for i in range(1, sqrt): if n % i == 0: divisors.append(i) divisors.append(n // i) return divisors def calculate_presents(house: int, presents_per_elf: int, upper_limit: int = 0): factors = get_factors(house) if upper_limit: factors = list(filter(lambda f: f <= upper_limit, factors)) # print(factors) return presents_per_elf * sum(factors) def find_lowest_house(value: int, ppe: int, upper_limit: int = 0): step = 6 for i in count(step, step): if calculate_presents(i, ppe, upper_limit=upper_limit) >= value: lowest = i for j in count(1): if calculate_presents(i - j, ppe, upper_limit=upper_limit) >= value: lowest = i - j else: break return lowest return -1 def part_one(input_value: int) -> int: result = find_lowest_house(input_value, 10) return result def part_two(input_value: int) -> int: result = find_lowest_house(input_value, 11, upper_limit=50) return result def solve(func: Callable[[int], int]): input_value = 34_000_000 result = func(input_value) print(f"The solution for {func.__name__!r} is {result}") def main(): solve(part_one) solve(part_two) if __name__ == "__main__": main()
1,531
537
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. from paddle_serving_client import Client from paddle_serving_app.reader import ChineseBertReader import sys import numpy as np client = Client() client.load_client_config("./bert_seq32_client/serving_client_conf.prototxt") client.connect(["127.0.0.1:9292"]) reader = ChineseBertReader({"max_seq_len": 32}) fetch = ["sequence_10", "sequence_12", "pooled_output"] expected_shape = { "sequence_10": (4, 32, 768), "sequence_12": (4, 32, 768), "pooled_output": (4, 768) } batch_size = 4 feed_batch = {} batch_len = 0 for line in sys.stdin: feed = reader.process(line) if batch_len == 0: for key in feed.keys(): val_len = len(feed[key]) feed_batch[key] = np.array(feed[key]).reshape((1, val_len, 1)) continue if len(feed_batch) < batch_size: for key in feed.keys(): np.concatenate([ feed_batch[key], np.array(feed[key]).reshape((1, val_len, 1)) ]) else: fetch_map = client.predict(feed=feed_batch, fetch=fetch) feed_batch = [] for var_name in fetch: if fetch_map[var_name].shape != expected_shape[var_name]: print("fetch var {} shape error.".format(var_name)) sys.exit(1)
1,864
631
""" Copyright 2019 Goldman Sachs. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. """ import copy import datetime as dt import logging import weakref from abc import ABCMeta from concurrent.futures import Future, ThreadPoolExecutor from threading import Lock from typing import Iterable, Optional, Mapping, Tuple, Union from gs_quant.api.risk import RiskApi from gs_quant.base import Priceable, PricingKey, Scenario from gs_quant.context_base import ContextBaseWithDefault, nullcontext from gs_quant.datetime.date import business_day_offset, is_business_day from gs_quant.risk import DataFrameWithInfo, ErrorValue, FloatWithInfo, MarketDataScenario, \ PricingDateAndMarketDataAsOf, \ ResolvedInstrumentValues, RiskMeasure, RiskPosition, RiskRequest, \ RiskRequestParameters, SeriesWithInfo from gs_quant.risk.results import MultipleRiskMeasureFuture from gs_quant.risk import CompositeScenario, StringWithInfo from gs_quant.session import GsSession from gs_quant.target.data import MarketDataCoordinate as __MarketDataCoordinate _logger = logging.getLogger(__name__) class PricingFuture(Future): def __init__(self, pricing_context): super().__init__() self.__pricing_context = pricing_context def result(self, timeout=None): """Return the result of the call that the future represents. :param timeout: The number of seconds to wait for the result if the future isn't done. If None, then there is no limit on the wait time. Returns: The result of the call that the future represents. Raises: CancelledError: If the future was cancelled. TimeoutError: If the future didn't finish executing before the given timeout. Exception: If the call raised then that exception will be raised. """ if not self.done() and PricingContext.current == self.__pricing_context and self.__pricing_context.is_entered: raise RuntimeError('Cannot evaluate results under the same pricing context being used to produce them') return super().result(timeout=timeout) class MarketDataCoordinate(__MarketDataCoordinate): def __str__(self): return "|".join(f or '' for f in (self.mkt_type, self.mkt_asset, self.mkt_class, '_'.join(self.mkt_point or ()), self.mkt_quoting_style)) class PricingCache(metaclass=ABCMeta): """ Weakref cache for instrument calcs """ __cache = weakref.WeakKeyDictionary() @classmethod def clear(cls): __cache = weakref.WeakKeyDictionary() @classmethod def missing_pricing_keys(cls, priceable: Priceable, risk_measure: RiskMeasure, pricing_key: Optional[PricingKey] = None) -> Tuple[PricingKey, ...]: pricing_key = pricing_key or PricingContext.current.pricing_key if priceable in cls.__cache and risk_measure in cls.__cache[priceable]: cached = cls.__cache[priceable][risk_measure] return tuple(k for k in pricing_key if k not in cached) else: return pricing_key @classmethod def get(cls, priceable: Priceable, risk_measure: RiskMeasure, pricing_key: Optional[PricingKey] = None, return_partial: bool = False) -> Optional[Union[DataFrameWithInfo, FloatWithInfo, SeriesWithInfo]]: if priceable not in cls.__cache or risk_measure not in cls.__cache[priceable]: return pricing_key = pricing_key or PricingContext.current.pricing_key cached = cls.__cache[priceable][risk_measure] if len(pricing_key.pricing_market_data_as_of) > 1: values = [cached[k] for k in pricing_key if k in cached] if values and (return_partial or len(values) == len(pricing_key.pricing_market_data_as_of)): return values[0].compose(values, pricing_key) else: return cached.get(pricing_key) @classmethod def put(cls, priceable: Priceable, risk_measure: RiskMeasure, result: Union[DataFrameWithInfo, FloatWithInfo, SeriesWithInfo], pricing_key: Optional[PricingKey] = None): pricing_key = pricing_key or PricingContext.current.pricing_key if isinstance(result, (DataFrameWithInfo, FloatWithInfo, SeriesWithInfo)): cls.__cache.setdefault(priceable, {}).setdefault(risk_measure, {}).update( {k: result.for_pricing_key(k) for k in pricing_key}) @classmethod def drop(cls, priceable: Priceable): if priceable in cls.__cache: cls.__cache.pop(priceable) class PricingContext(ContextBaseWithDefault): """ A context for controlling pricing and market data behaviour """ def __init__(self, pricing_date: Optional[dt.date] = None, market_data_as_of: Optional[Union[dt.date, dt.datetime]] = None, market_data_location: Optional[str] = None, is_async: bool = False, is_batch: bool = False, use_cache: bool = False, visible_to_gs: bool = False, csa_term: Optional[str] = None, poll_for_batch_results: Optional[bool] = False, batch_results_timeout: Optional[int] = None ): """ The methods on this class should not be called directly. Instead, use the methods on the instruments, as per the examples :param pricing_date: the date for pricing calculations. Default is today :param market_data_as_of: the date/datetime for sourcing market data (defaults to 1 business day before pricing_date) :param market_data_location: the location for sourcing market data ('NYC', 'LDN' or 'HKG' (defaults to LDN) :param is_async: if True, return (a future) immediately. If False, block (defaults to False) :param is_batch: use for calculations expected to run longer than 3 mins, to avoid timeouts. It can be used with is_aync=True|False (defaults to False) :param use_cache: store results in the pricing cache (defaults to False) :param visible_to_gs: are the contents of risk requests visible to GS (defaults to False) :param csa_term: the csa under which the calculations are made. Default is local ccy ois index **Examples** To change the market data location of the default context: >>> from gs_quant.markets import PricingContext >>> import datetime as dt >>> >>> PricingContext.current = PricingContext(market_data_location='LDN') For a blocking, synchronous request: >>> from gs_quant.instrument import IRCap >>> cap = IRCap('5y', 'GBP') >>> >>> with PricingContext(): >>> price_f = cap.dollar_price() >>> >>> price = price_f.result() For an asynchronous request: >>> with PricingContext(is_async=True): >>> price_f = cap.dollar_price() >>> >>> while not price_f.done: >>> ... """ super().__init__() if pricing_date is None: pricing_date = dt.date.today() while not is_business_day(pricing_date): pricing_date -= dt.timedelta(days=1) self.__pricing_date = pricing_date self.__csa_term = csa_term self.__market_data_as_of = market_data_as_of # Do not use self.__class__.current - it will cause a cycle self.__market_data_location = market_data_location or ( self.__class__.path[0].market_data_location if self.__class__.path else 'LDN') self.__is_async = is_async self.__is_batch = is_batch self.__poll_for_batch_results = poll_for_batch_results self.__batch_results_timeout = batch_results_timeout self.__risk_measures_in_scenario_by_provider_and_position = {} self.__futures = {} self.__use_cache = use_cache self.__visible_to_gs = visible_to_gs self.__positions_by_provider = {} self.__lock = Lock() def _on_exit(self, exc_type, exc_val, exc_tb): if exc_val: raise exc_val else: self._calc() def _calc(self): positions_by_provider = self.__active_context.__positions_by_provider session = GsSession.current batch_result = Future() if self.__is_batch else None batch_providers = set() batch_lock = Lock() if self.__is_batch else nullcontext() def handle_results(requests_to_results: Mapping[RiskRequest, dict]): for request_, result in requests_to_results.items(): try: self._handle_results(result, request_) except Exception as e: try: self._handle_results(e, request_) except Exception as he: _logger.error('Error setting error result: ' + str(he)) def run_requests(requests_: Iterable[RiskRequest], provider_: RiskApi): try: with session: results = provider_.calc_multi(requests_) if self.__is_batch: get_batch_results(dict(zip(results, requests_)), provider_) else: handle_results(dict(zip(requests_, results))) except Exception as e: handle_results({r: e for r in requests_}) def get_batch_results(ids_to_requests: Mapping[str, RiskRequest], provider_: RiskApi): def get_results(): try: with session: return provider_.get_results(ids_to_requests, self.__poll_for_batch_results, timeout=self.__batch_results_timeout) except Exception as be: return {r: be for r in ids_to_requests.values()} def set_results(results: Mapping[RiskRequest, Union[Exception, dict]]): handle_results(results) with batch_lock: # Check if we're the last provide and signal done if so batch_providers.remove(provider_) if not batch_providers: batch_result.set_result(True) if self.__is_async: batch_result_pool = ThreadPoolExecutor(1) batch_result_pool.submit(get_results).add_done_callback(lambda f: set_results(f.result())) batch_result_pool.shutdown(wait=False) else: set_results(get_results()) with self.__lock: # Group requests by risk_measures, positions, scenario - so we can create unique RiskRequest objects # Determine how many we will need while self.__risk_measures_in_scenario_by_provider_and_position: provider, risk_measures_by_scenario =\ self.__risk_measures_in_scenario_by_provider_and_position.popitem() for position, scenario_to_risk_measures in risk_measures_by_scenario.items(): for scenario, risk_measures in scenario_to_risk_measures.items(): risk_measures = tuple(sorted(risk_measures, key=lambda m: m.name or m.measure_type.value)) positions_by_provider.setdefault(provider, {}).setdefault((scenario, risk_measures), [])\ .append(position) if self.__positions_by_provider: num_providers = len(self.__positions_by_provider) request_pool = ThreadPoolExecutor(num_providers) if num_providers > 1 or self.__is_async else None batch_providers = set(self.__positions_by_provider.keys()) while self.__positions_by_provider: provider, positions_by_scenario_and_risk_measures = self.__positions_by_provider.popitem() requests = [ RiskRequest( tuple(positions), risk_measures, parameters=self.__parameters, wait_for_results=not self.__is_batch, pricing_location=self.__market_data_location, scenario=scenario, pricing_and_market_data_as_of=self._pricing_market_data_as_of, request_visible_to_gs=self.__visible_to_gs ) for (scenario, risk_measures), positions in positions_by_scenario_and_risk_measures.items() ] if request_pool: request_pool.submit(run_requests, requests, provider) else: run_requests(requests, provider) if request_pool: request_pool.shutdown(wait=not self.__is_async) if batch_result and not self.__is_async: batch_result.result() def _handle_results(self, results: Union[Exception, dict], request: RiskRequest): error = None if isinstance(results, Exception): error = str(results) results = {} _logger.error('Error while handling results: ' + error) with self.__lock: for risk_measure in request.measures: # Get each risk measure from from the request and the corresponding positions --> futures dict positions_for_measure = self.__futures[(request.scenario, risk_measure)] # Get the results for this measure position_results = results.pop(risk_measure, {}) for position in request.positions: # Set the result for this position to the returned value or an error if missing result = position_results.get(position, ErrorValue(self.pricing_key, error=error)) if self.__use_cache and not isinstance(result, ErrorValue): # Populate the cache PricingCache.put(position.instrument, risk_measure, result) # Retrieve from the cache - this is used by HistoricalPricingContext. We ensure the cache has # all values (in case some had already been computed) then populate the result as the final step result = PricingCache.get(position.instrument, risk_measure) # Set the result for the future positions_for_measure.pop(position).set_result(result) if not positions_for_measure: self.__futures.pop((request.scenario, risk_measure)) @property def __active_context(self): return next((c for c in reversed(PricingContext.path) if c.is_entered), self) @property def __parameters(self) -> RiskRequestParameters: return RiskRequestParameters(csa_term=self.__csa_term, raw_results=True) @property def __scenario(self) -> Optional[MarketDataScenario]: scenarios = Scenario.path if not scenarios: return None return MarketDataScenario(scenario=scenarios[0] if len(scenarios) == 1 else CompositeScenario(scenarios=tuple(reversed(scenarios)))) @property def _pricing_market_data_as_of(self) -> Tuple[PricingDateAndMarketDataAsOf, ...]: return PricingDateAndMarketDataAsOf(self.pricing_date, self.market_data_as_of), @property def pricing_date(self) -> dt.date: """Pricing date""" return self.__pricing_date @property def market_data_as_of(self) -> Union[dt.date, dt.datetime]: """Market data as of""" if self.__market_data_as_of: return self.__market_data_as_of elif self.pricing_date == dt.date.today(): return business_day_offset(self.pricing_date, -1, roll='preceding') else: return self.pricing_date @property def market_data_location(self) -> str: """Market data location""" return self.__market_data_location @property def use_cache(self) -> bool: """Cache results""" return self.__use_cache @property def visible_to_gs(self) -> bool: """Request contents visible to GS""" return self.__visible_to_gs @property def pricing_key(self) -> PricingKey: """A key representing information about the pricing environment""" return PricingKey( self._pricing_market_data_as_of, self.__market_data_location, self.__parameters, self.__scenario) def calc(self, priceable: Priceable, risk_measure: Union[RiskMeasure, Iterable[RiskMeasure]])\ -> Union[list, DataFrameWithInfo, ErrorValue, FloatWithInfo, Future, MultipleRiskMeasureFuture, SeriesWithInfo]: """ Calculate the risk measure for the priceable instrument. Do not use directly, use via instruments :param priceable: The priceable (e.g. instrument) :param risk_measure: The measure we wish to calculate :return: A float, Dataframe, Series or Future (depending on is_async or whether the context is entered) **Examples** >>> from gs_quant.instrument import IRSwap >>> from gs_quant.risk import IRDelta >>> >>> swap = IRSwap('Pay', '10y', 'USD', fixed_rate=0.01) >>> delta = swap.calc(IRDelta) """ position = RiskPosition(priceable, priceable.get_quantity()) multiple_measures = not isinstance(risk_measure, RiskMeasure) futures = {} active_context_lock = self.__active_context.__lock if self.__active_context != self else nullcontext() with self.__lock, active_context_lock: for measure in risk_measure if multiple_measures else (risk_measure,): scenario = self.__scenario measure_future = self.__active_context.__futures.get((scenario, measure), {}).get(position) if measure_future is None: measure_future = PricingFuture(self.__active_context) if self.__use_cache: cached_result = PricingCache.get(priceable, risk_measure) if cached_result: measure_future.set_result(cached_result) if not measure_future.done(): self.__risk_measures_in_scenario_by_provider_and_position.setdefault( priceable.provider(), {}).setdefault( position, {}).setdefault(scenario, set()).add(measure) self.__active_context.__futures.setdefault((scenario, measure), {})[position] = measure_future futures[measure] = measure_future future = MultipleRiskMeasureFuture(futures, result_future=PricingFuture(self.__active_context))\ if multiple_measures else futures[risk_measure] if not (self.is_entered or self.__is_async): if not future.done(): self._calc() return future.result() else: return future def resolve_fields(self, priceable: Priceable, in_place: bool) -> Optional[Union[Priceable, Future]]: """ Resolve fields on the priceable which were not supplied. Do not use directly, use via instruments :param priceable: The priceable (e.g. instrument) :param in_place: Resolve in place or return a new Priceable **Examples** >>> from gs_quant.instrument import IRSwap >>> >>> swap = IRSwap('Pay', '10y', 'USD') >>> rate = swap.fixed_rate fixedRate is None >>> swap.resolve() >>> rate = swap.fixed_rate fixed_rate is now the solved value """ resolution_key = self.pricing_key if priceable.resolution_key: if in_place: if resolution_key != priceable.resolution_key: _logger.warning( 'Calling resolve() on an instrument already resolved under a different PricingContext') return elif resolution_key == priceable.resolution_key: return copy.copy(priceable) def check_valid(result_): if isinstance(result_, StringWithInfo): _logger.error('Failed to resolve instrument fields: ' + result_) return priceable if isinstance(result_, ErrorValue): _logger.error('Failed to resolve instrument fields: ' + result_.error) return priceable else: return result_ result = self.calc(priceable, ResolvedInstrumentValues) if in_place: def handle_result(result_): result_ = check_valid(result_) if result_ is not priceable: priceable.unresolved = copy.copy(priceable) priceable.from_instance(result_) priceable.resolution_key = result_.resolution_key if isinstance(result, Future): result.add_done_callback(lambda f: handle_result(f.result())) else: handle_result(result) else: if isinstance(result, Future): result.add_done_callback(lambda f: check_valid(f.result())) return result else: return check_valid(result) class LivePricingContext(PricingContext): def __init__(self, market_data_location: Optional[str] = None, is_async: bool = False, is_batch: bool = False, visible_to_gs: bool = False, csa_term: Optional[str] = None, poll_for_batch_results: Optional[bool] = False, batch_results_timeout: Optional[int] = None ): # TODO we use 23:59:59.999999 as a sentinel value to indicate live pricing for now. Fix this d = business_day_offset(dt.date.today(), -1, roll='preceding') super().__init__( pricing_date=dt.date.today(), market_data_as_of=dt.datetime(d.year, d.month, d.day, 23, 59, 59, 999999), market_data_location=market_data_location, is_async=is_async, is_batch=is_batch, use_cache=False, visible_to_gs=visible_to_gs, csa_term=csa_term, poll_for_batch_results=poll_for_batch_results, batch_results_timeout=batch_results_timeout )
23,434
6,334
# Generated by Django 3.1.4 on 2020-12-21 17:04 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('users', '0001_initial'), ] operations = [ migrations.CreateModel( name='Order', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('date_ordered', models.DateTimeField(auto_now_add=True)), ('complete', models.BooleanField(default=False, null=True)), ('transaction_id', models.CharField(max_length=200, null=True)), ('customer', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='users.customer')), ], ), migrations.CreateModel( name='Product', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=200, null=True)), ('price', models.FloatField()), ('digital', models.BooleanField(default=False, null=True)), ('quantity', models.IntegerField()), ('discount_price', models.FloatField(blank=True, null=True)), ('description', models.TextField(max_length=500, null=True)), ('image', models.ImageField(blank=True, null=True, upload_to='media/')), ('date_created', models.DateField(auto_now_add=True, null=True)), ('label', models.CharField(choices=[('S', 'Standard'), ('N', 'New'), ('B', 'Best Selling')], default='S', max_length=1)), ('category', models.CharField(choices=[('C', 'Clothes'), ('M', 'Mobiles'), ('T', 'TVs')], max_length=2, null=True)), ('review', models.FloatField(default=0)), ('seller', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ], ), migrations.CreateModel( name='WishList', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('customer', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='users.customer')), ], ), migrations.CreateModel( name='WishListItem', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('product', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='products.product')), ('wishList', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='products.wishlist')), ], ), migrations.CreateModel( name='ShippingAddress', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('address', models.CharField(max_length=200)), ('city', models.CharField(max_length=200)), ('state', models.CharField(max_length=200)), ('zipcode', models.CharField(max_length=200)), ('date_added', models.DateTimeField(auto_now_add=True)), ('customer', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='users.customer')), ('order', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='products.order')), ], ), migrations.CreateModel( name='OrderItem', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('quantity', models.IntegerField(blank=True, default=0, null=True)), ('date_added', models.DateTimeField(auto_now_add=True)), ('order', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='products.order')), ('product', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='products.product')), ], ), ]
4,553
1,313
import sys import os this_dir = os.path.dirname(__file__) parent_dir = os.path.dirname(this_dir) sys.path.insert(0, parent_dir) from pcc.evaluater.c_evaluator import CEvaluator import unittest import unittest class TestCevluatar(unittest.TestCase): def test_simple(self): pcc = CEvaluator() # kalei.evaluate('def binary: 1 (x y) y') ret = pcc.evaluate(''' int add(int x, int y){ return x + y; } int main(){ int a = 3; int b = 4; return add(a, b); } ''', llvmdump=True) print("The answer is {}".format(ret)) assert (ret == 7) # This is a good point to self start main # print(pcc.evaluate('main()')) if __name__ == '__main__': # Evaluate some code # if __name__ == '__main__': unittest.main()
898
299
class Address(object): def __init__(self, street, city, region='', zip=''): data = {'Street': street.strip(), 'City': city.strip(), 'Region': region.strip(), 'PostalCode': str(zip).strip()} self.data = {k: v for k, v in data.items() if v}
276
87
""" Test the base classes for managing datasets and tasks. """ import os import sys import pytest import numpy as np from numpy.testing import assert_array_equal from dbcollection.utils.string_ascii import convert_str_to_ascii as str2ascii from dbcollection.utils.pad import pad_list from dbcollection.datasets.mnist.classification import ( Classification, DatasetAnnotationLoader, ClassLabelField, ImageField, LabelIdField, ObjectFieldNamesField, ObjectIdsField, ImagesPerClassList ) @pytest.fixture() def mock_classification_class(): return Classification(data_path='/some/path/data', cache_path='/some/path/cache') @pytest.fixture() def classes_classification(): return ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'] class TestClassificationTask: """Unit tests for the mnist Classification task.""" def test_task_attributes(self, mocker, mock_classification_class, classes_classification): assert mock_classification_class.filename_h5 == 'classification' assert mock_classification_class.classes == classes_classification def test_load_data(self, mocker, mock_classification_class): dummy_data = ['some_data'] mock_load_train = mocker.patch.object(DatasetAnnotationLoader, "load_train_data", return_value=dummy_data) mock_load_test = mocker.patch.object(DatasetAnnotationLoader, "load_test_data", return_value=dummy_data) load_data_generator = mock_classification_class.load_data() if sys.version[0] == '3': train_data = load_data_generator.__next__() test_data = load_data_generator.__next__() else: train_data = load_data_generator.next() test_data = load_data_generator.next() mock_load_train.assert_called_once_with() mock_load_test.assert_called_once_with() assert train_data == {"train": ['some_data']} assert test_data == {"test": ['some_data']} def test_process_set_metadata(self, mocker, mock_classification_class): dummy_ids = [0, 1, 2, 3, 4, 5] mock_class_field = mocker.patch.object(ClassLabelField, "process") mock_image_field = mocker.patch.object(ImageField, "process", return_value=dummy_ids) mock_label_field = mocker.patch.object(LabelIdField, "process", return_value=dummy_ids) mock_objfield_field = mocker.patch.object(ObjectFieldNamesField, "process") mock_objids_field = mocker.patch.object(ObjectIdsField, "process") mock_images_per_class_list = mocker.patch.object(ImagesPerClassList, "process") data = {"classes": 1, "images": 1, "labels": 1, "object_fields": 1, "object_ids": 1, "list_images_per_class": 1} mock_classification_class.process_set_metadata(data, 'train') mock_class_field.assert_called_once_with() mock_image_field.assert_called_once_with() mock_label_field.assert_called_once_with() mock_objfield_field.assert_called_once_with() mock_objids_field.assert_called_once_with(dummy_ids, dummy_ids) mock_images_per_class_list.assert_called_once_with() class TestDatasetAnnotationLoader: """Unit tests for the DatasetAnnotationLoader class.""" @staticmethod @pytest.fixture() def mock_loader_class(): return DatasetAnnotationLoader( classes=['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], data_path='/some/path/data', cache_path='/some/path/cache', verbose=True ) def test_task_attributes(self, mocker, mock_loader_class): assert mock_loader_class.classes == ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'] assert mock_loader_class.data_path == '/some/path/data' assert mock_loader_class.cache_path == '/some/path/cache' assert mock_loader_class.verbose == True def test_load_train_data(self, mocker, mock_loader_class): dummy_data = {"dummy": 'data'} mock_load_data = mocker.patch.object(DatasetAnnotationLoader, 'load_data_set', return_value=dummy_data) data = mock_loader_class.load_train_data() mock_load_data.assert_called_once_with(is_test=False) assert data == dummy_data def test_load_test_data(self, mocker, mock_loader_class): dummy_data = {"dummy": 'data'} mock_load_data = mocker.patch.object(DatasetAnnotationLoader, 'load_data_set', return_value=dummy_data) data = mock_loader_class.load_test_data() mock_load_data.assert_called_once_with(is_test=True) assert data == dummy_data def test_load_data_set(self, mocker, mock_loader_class): dummy_images = np.random.rand(10,28,28) dummy_labels = np.random.randint(0, 9, 10) mock_load_data = mocker.patch.object(DatasetAnnotationLoader, "load_data_annotations", return_value=(dummy_images, dummy_labels)) set_data = mock_loader_class.load_data_set(is_test=True) mock_load_data.assert_called_once_with(True) assert set_data['classes'] == ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'] assert_array_equal(set_data['images'], dummy_images) assert_array_equal(set_data['labels'], dummy_labels) @pytest.mark.parametrize('is_test', [False, True]) def test_load_data_annotations(self, mocker, mock_loader_class, is_test): dummy_images = np.random.rand(10*28*28) dummy_labels = np.random.randint(0,9,10) dummy_set_size = 10 mock_get_data_test = mocker.patch.object(DatasetAnnotationLoader, "get_data_test", return_value=(dummy_images, dummy_labels, dummy_set_size)) mock_get_data_train = mocker.patch.object(DatasetAnnotationLoader, "get_data_train", return_value=(dummy_images, dummy_labels, dummy_set_size)) images, labels = mock_loader_class.load_data_annotations(is_test=is_test) if is_test: mock_get_data_test.assert_called_once_with() mock_get_data_train.assert_not_called() else: mock_get_data_test.assert_not_called() mock_get_data_train.assert_called_once_with() assert_array_equal(images, dummy_images.reshape(dummy_set_size, 28, 28)) assert_array_equal(labels, dummy_labels) def test_get_data_test(self, mocker, mock_loader_class): dummy_images = np.zeros((5,28*28)) dummy_labels = np.random.randint(0,9,5) mock_load_images = mocker.patch.object(DatasetAnnotationLoader, "load_images_numpy", return_value=dummy_images) mock_load_labels = mocker.patch.object(DatasetAnnotationLoader, "load_labels_numpy", return_value=dummy_labels) test_images, test_labels, size_test = mock_loader_class.get_data_test() mock_load_images.assert_called_once_with(os.path.join('/some/path/data', 't10k-images.idx3-ubyte')) mock_load_labels.assert_called_once_with(os.path.join('/some/path/data', 't10k-labels.idx1-ubyte')) assert_array_equal(test_images, dummy_images) assert_array_equal(test_labels, dummy_labels) assert size_test == 10000 def test_get_data_train(self, mocker, mock_loader_class): dummy_images = np.zeros((5,28*28)) dummy_labels = np.random.randint(0,9,5) mock_load_images = mocker.patch.object(DatasetAnnotationLoader, "load_images_numpy", return_value=dummy_images) mock_load_labels = mocker.patch.object(DatasetAnnotationLoader, "load_labels_numpy", return_value=dummy_labels) train_images, train_labels, size_train = mock_loader_class.get_data_train() mock_load_images.assert_called_once_with(os.path.join('/some/path/data', 'train-images.idx3-ubyte')) mock_load_labels.assert_called_once_with(os.path.join('/some/path/data', 'train-labels.idx1-ubyte')) assert_array_equal(train_images, dummy_images) assert_array_equal(train_labels, dummy_labels) assert size_train == 60000 @pytest.fixture() def test_data_loaded(): classes = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'] images = np.random.rand(10,28, 28) labels = np.array(range(10)) return { "classes": classes, "images": images, "labels": labels } @pytest.fixture() def field_kwargs(test_data_loaded): return { "data": test_data_loaded, "set_name": 'train', "hdf5_manager": {'dummy': 'object'}, "verbose": True } class TestClassLabelField: """Unit tests for the ClassLabelField class.""" @staticmethod @pytest.fixture() def mock_classlabel_class(field_kwargs): return ClassLabelField(**field_kwargs) def test_process(self, mocker, mock_classlabel_class): dummy_names = ['car']*10 mock_get_class = mocker.patch.object(ClassLabelField, "get_class_names", return_value=dummy_names) mock_save_hdf5 = mocker.patch.object(ClassLabelField, "save_field_to_hdf5") mock_classlabel_class.process() mock_get_class.assert_called_once_with() assert mock_save_hdf5.called # **disabled until I find a way to do assert calls with numpy arrays** # mock_save_hdf5.assert_called_once_with( # set_name='train', # field='classes', # data=str2ascii(dummy_names), # dtype=np.uint8, # fillvalue=-1 # ) def test_get_class_names(self, mocker, mock_classlabel_class, test_data_loaded): class_names = mock_classlabel_class.get_class_names() assert class_names == test_data_loaded['classes'] class TestImageField: """Unit tests for the ImageField class.""" @staticmethod @pytest.fixture() def mock_image_class(field_kwargs): return ImageField(**field_kwargs) def test_process(self, mocker, mock_image_class): dummy_images = np.random.rand(5, 28, 28) dummy_ids = list(range(5)) mock_get_images = mocker.patch.object(ImageField, "get_images", return_value=(dummy_images, dummy_ids)) mock_save_hdf5 = mocker.patch.object(ImageField, "save_field_to_hdf5") image_ids = mock_image_class.process() assert image_ids == dummy_ids mock_get_images.assert_called_once_with() assert mock_save_hdf5.called # **disabled until I find a way to do assert calls with numpy arrays** # mock_save_hdf5.assert_called_once_with( # set_name='train', # field='images', # data=dummy_images, # dtype=np.uint8, # fillvalue=-1 # ) def test_get_images(self, mocker, mock_image_class, test_data_loaded): images, image_ids = mock_image_class.get_images() assert_array_equal(images, test_data_loaded['images']) assert image_ids == list(range(len(images))) class TestLabelIdField: """Unit tests for the LabelIdField class.""" @staticmethod @pytest.fixture() def mock_label_class(field_kwargs): return LabelIdField(**field_kwargs) def test_process(self, mocker, mock_label_class): dummy_labels = np.array(range(10)) dummy_ids = list(range(10)) mock_get_labels = mocker.patch.object(LabelIdField, "get_labels", return_value=(dummy_labels, dummy_ids)) mock_save_hdf5 = mocker.patch.object(LabelIdField, "save_field_to_hdf5") label_ids = mock_label_class.process() assert label_ids == dummy_ids mock_get_labels.assert_called_once_with() assert mock_save_hdf5.called # **disabled until I find a way to do assert calls with numpy arrays** # mock_save_hdf5.assert_called_once_with( # set_name='train', # field='labels', # data=dummy_labels, # dtype=np.uint8, # fillvalue=0 # ) def test_get_images(self, mocker, mock_label_class, test_data_loaded): labels, label_ids = mock_label_class.get_labels() assert_array_equal(labels, test_data_loaded['labels']) assert label_ids == list(range(len(labels))) class TestObjectFieldNamesField: """Unit tests for the ObjectFieldNamesField class.""" @staticmethod @pytest.fixture() def mock_objfields_class(field_kwargs): return ObjectFieldNamesField(**field_kwargs) def test_process(self, mocker, mock_objfields_class): mock_save_hdf5 = mocker.patch.object(ObjectFieldNamesField, "save_field_to_hdf5") mock_objfields_class.process() assert mock_save_hdf5.called # **disabled until I find a way to do assert calls with numpy arrays** # mock_save_hdf5.assert_called_once_with( # set_name='train', # field='object_fields', # data=str2ascii(['images', 'labels']), # dtype=np.uint8, # fillvalue=0 # ) class TestObjectIdsField: """Unit tests for the ObjectIdsField class.""" @staticmethod @pytest.fixture() def mock_objfids_class(field_kwargs): return ObjectIdsField(**field_kwargs) def test_process(self, mocker, mock_objfids_class): mock_save_hdf5 = mocker.patch.object(ObjectIdsField, "save_field_to_hdf5") image_ids = [0, 1, 2, 3, 4, 5] label_ids = [1, 5, 9, 8, 3, 5] object_ids = mock_objfids_class.process( image_ids=image_ids, label_ids=label_ids ) assert mock_save_hdf5.called # **disabled until I find a way to do assert calls with numpy arrays** # mock_save_hdf5.assert_called_once_with( # set_name='train', # field='object_ids', # data=np.array([[0, 1], [1, 5], [2, 9], [3, 8], [4, 3], [5, 5]], dtype=np.int32), # dtype=np.int32, # fillvalue=-1 # ) # ) class TestImagesPerClassList: """Unit tests for the ImagesPerClassList class.""" @staticmethod @pytest.fixture() def mock_img_per_class_list(field_kwargs): return ImagesPerClassList(**field_kwargs) def test_process(self, mocker, mock_img_per_class_list): dummy_ids = [[0], [2, 3], [4, 5]] dummy_array = np.array([[0, -1], [2, 3], [4, 5]]) mock_get_ids = mocker.patch.object(ImagesPerClassList, "get_image_ids_per_class", return_value=dummy_ids) mock_convert_array = mocker.patch.object(ImagesPerClassList, "convert_list_to_array", return_value=dummy_array) mock_save_hdf5 = mocker.patch.object(ImagesPerClassList, "save_field_to_hdf5") mock_img_per_class_list.process() mock_get_ids.assert_called_once_with() mock_convert_array.assert_called_once_with(dummy_ids) assert mock_save_hdf5.called # **disabled until I find a way to do assert calls with numpy arrays** # mock_save_hdf5.assert_called_once_with( # set_name='train', # field='list_images_per_class', # data=dummy_array, # dtype=np.int32, # fillvalue=-1 # ) def test_get_image_ids_per_class(self, mocker, mock_img_per_class_list): images_per_class_ids = mock_img_per_class_list.get_image_ids_per_class() assert images_per_class_ids == [[0], [1], [2], [3], [4], [5], [6], [7], [8], [9]] def test_convert_list_to_array(self, mocker, mock_img_per_class_list): list_ids = [[0], [2, 3], [4, 5, 6]] images_per_class_array = mock_img_per_class_list.convert_list_to_array(list_ids) expected = np.array(pad_list([[0, -1, -1], [2, 3, -1], [4, 5, 6]], -1), dtype=np.int32) assert_array_equal(images_per_class_array, expected)
15,621
5,235
# -*- coding: utf-8 -*- # Author : Jeonghoonkang, github.com/jeonghoonkang hexstr = '123456' # 1) [ for ... ] hlist = [hexstr[i:i+2] for i in range(0,len(hexstr),2)] #2) re.findall hlist = re.findall(r'..',hexstr) #3) map, zip, iter 이용 hlist = map(''.join, zip(*[iter(hexstr)]*2)) ''' iter(hxstr) 는 글자 하나씩 가져오는 이터레이터 함수 [ 'a' ] * 2 는 [ 'a', 'a'] 이고, 함수 호출 시 f(['a','a'])는 목록이 넘어가지만, f(*['a','a'])는 f('a','a') 와 동일합니다. 즉, 괄호를 벗기는 역할을 합니다. 그러면 결국 zip(iter(hxstr)결과, iter(hxstr)결과) 와 같은 식인데, 첫번째 패러미터와 두번째 패러미터의 값을 한번씩 호출하게 되어있습니다. 그런데 동일한 이터레이터 이므로 하나씩 꺼내게 되므로, (('1','2'), ('3','4'),('5','6')) 의 결과가 나옵니다. 이를 각 항목에 대하여 ''.join <=> cat 을 시키니 ['12','34','56'] '''
669
557
# flake8: noqa # Import all APIs into this package. # If you have many APIs here with many many models used in each API this may # raise a `RecursionError`. # In order to avoid this, import only the API that you directly need like: # # from .api.contact_groups_api import ContactGroupsApi # # or import this package, but before doing it, use: # # import sys # sys.setrecursionlimit(n) # Import APIs into API package: from statuscake.api.contact_groups_api import ContactGroupsApi from statuscake.api.locations_api import LocationsApi from statuscake.api.maintenance_windows_api import MaintenanceWindowsApi from statuscake.api.pagespeed_api import PagespeedApi from statuscake.api.ssl_api import SslApi from statuscake.api.uptime_api import UptimeApi
760
235
########### IMPORTING THE REQURIED LIBRARIES ########### from __future__ import print_function from terminaltables import AsciiTable import sys, time ########## DECLARING THE GLOBAL VARIABLES ############# WORLD_URL = "https://www.worldometers.info/coronavirus" INDIA_URL = "https://www.mohfw.gov.in/" MAX_TIMEOUT = 3 PROXY_TIMEOUT = 3 ########## DECLARING STYLES ########## class style: PURPLE = "\033[95m" CYAN = "\033[96m" DARKCYAN = "\033[36m" BLUE = "\033[94m" GREEN = "\033[92m" YELLOW = "\033[93m" RED = "\033[91m" BOLD = "\033[1m" UNDERLINE = "\033[4m" ITALIC = "\033[3m" END = "\033[0m" ######### EXTRACTING NUMBER FROM STRING ######### def extractNumbers( string ): dig = "" for c in string: if c.isdigit(): dig += c return dig ######### DISPLAYING THE COUNTRYWISE STATISTICS ######### def displayWorldInfo( corona ): print( "\nFetching data. Please wait...\n" ); page = corona.getPageResponse( WORLD_URL ) if not page: print( "\nSorry, couldn't fetch any information for you." ) print( "\nMaybe you don't have a working internet connection or\nthe source are blocking the application\n" ) exit() counts = corona.extractCounts( page, "w" ) table = corona.extractTableData( page, "w" ) print( style.RED + style.BOLD + counts.table + style.END + "\n" ) print( table.table ) ######### DISPLAYING THE STATEWISE STATISTICS ######### def displayCountryInfo( corona ): print( "\nFetching data. Please wait...\n" ); page = corona.getPageResponse( INDIA_URL ) if not page: print( "\nSorry, couldn't fetch any information for you." ) print( "\nMaybe you don't have a working internet connection or\nthe source are blocking the application\n" ) exit() counts = corona.extractCounts( page, "c" ) table = corona.extractTableData( page, "c" ) print( style.RED + style.BOLD + counts.table + style.END + "\n" ) print( table.table ) ######### DISPLAYING THE HELP ######### def displayHelp(): print( "\nUsage : coronastat [ OPTIONS ]\n" ); print( "Commands : " ); table = [ [ "Options", "Functions" ], [ "-h, --help", "Opens the help for this CLI tool." ], [ "-c, --country", "Opens statewise COVID-19 statistics ( only India's data is possible till now )." ], [ "-w, --world", "Opens countrywise COVID-19 statistics." ] ] table = AsciiTable( table ) print( table.table ) ######### DISPLAYING THE ASCII ART ######### def displayASCIIArt(): print( style.CYAN + style.ITALIC + style.BOLD + '''\n ██████╗ ██████╗ ██████╗ ██████╗ ███╗ ██╗ █████╗ ███████╗████████╗ █████╗ ████████╗ ██╔════╝██╔═══██╗██╔══██╗██╔═══██╗████╗ ██║██╔══██╗██╔════╝╚══██╔══╝██╔══██╗╚══██╔══╝ ██║ ██║ ██║██████╔╝██║ ██║██╔██╗ ██║███████║███████╗ ██║ ███████║ ██║ ██║ ██║ ██║██╔══██╗██║ ██║██║╚██╗██║██╔══██║╚════██║ ██║ ██╔══██║ ██║ ╚██████╗╚██████╔╝██║ ██║╚██████╔╝██║ ╚████║██║ ██║███████║ ██║ ██║ ██║ ██║ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ Developed by: Rahul Gupta \n''' + style.END ); ######### DISPLAYING THE LOADING ANIMATION ######### def displayLoadingAnim(): for _ in range( 3 ): loader="\\|/-\\|/-" for l in loader: sys.stdout.write( l ) sys.stdout.flush() sys.stdout.write( '\b' ) time.sleep( 0.2 )
3,383
1,551
import os import shutil from stat import S_ISDIR from datetime import datetime from common_util import Error, Success from host.util import mylog from messages import HostFileTransferMessage __author__ = 'Mike' def send_tree(db, other_id, cloud, requested_root, connection): """ Note: This can't be used to send a tree of files over the network to a mirror on the same host process. It blocks and is bad. Fortunately, this is only used by `nebs mirror` at the momment, so we don't need to worry. :param db: :param other_id: :param cloud: :param requested_root: :param connection: :return: """ mylog('They requested the file {}'.format(requested_root)) # find the file on the system, get it's size. requesting_all = requested_root == '/' filepath = None # if the root is '/', send all of the children of the root if requesting_all: filepath = cloud.root_directory else: filepath = os.path.join(cloud.root_directory, requested_root) mylog('The translated request path was {}'.format(filepath)) send_file_to_other(other_id, cloud, filepath, connection) complete_sending_files(other_id, cloud, filepath, connection) connection.close() def send_file_to_local(db, src_mirror, tgt_mirror, relative_pathname): # type: (SimpleDB, Cloud, Cloud, str) -> ResultAndData rd = Error() full_src_path = os.path.join(src_mirror.root_directory, relative_pathname) full_tgt_path = os.path.join(tgt_mirror.root_directory, relative_pathname) src_file_stat = os.stat(full_src_path) src_file_is_dir = S_ISDIR(src_file_stat.st_mode) rd = Success() try: if src_file_is_dir and not os.path.exists(full_tgt_path): os.mkdir(full_tgt_path) else: shutil.copy2(full_src_path, full_tgt_path) except IOError as e: rd = Error(e) if rd.success: updated_node = tgt_mirror.create_or_update_node(relative_pathname, db) if updated_node is not None: old_modified_on = updated_node.last_modified updated_node.last_modified = datetime.utcfromtimestamp(os.path.getmtime(full_tgt_path)) mylog('update mtime {}=>{}'.format(old_modified_on, updated_node.last_modified)) db.session.commit() else: mylog('ERROR: Failed to create a FileNode for the new file {}'.format(full_tgt_path)) return rd def send_file_to_other(other_id, cloud, filepath, socket_conn, recurse=True): """ Assumes that the other host was already verified, and the cloud is non-null """ req_file_stat = os.stat(filepath) relative_pathname = os.path.relpath(filepath, cloud.root_directory) # print 'relpath({}) in \'{}\' is <{}>'.format(filepath, cloud.name, relative_pathname) req_file_is_dir = S_ISDIR(req_file_stat.st_mode) # mylog('filepath<{}> is_dir={}'.format(filepath, req_file_is_dir)) if req_file_is_dir: if relative_pathname != '.': msg = HostFileTransferMessage( other_id , cloud.uname() , cloud.cname() , relative_pathname , 0 , req_file_is_dir ) socket_conn.send_obj(msg) # TODO#23: The other host should reply with FileTransferSuccessMessage if recurse: subdirectories = os.listdir(filepath) # mylog('Sending children of <{}>={}'.format(filepath, subdirectories)) for f in subdirectories: send_file_to_other(other_id, cloud, os.path.join(filepath, f), socket_conn) else: req_file_size = req_file_stat.st_size requested_file = open(filepath, 'rb') msg = HostFileTransferMessage( other_id , cloud.uname() , cloud.cname() , relative_pathname , req_file_size , req_file_is_dir ) socket_conn.send_obj(msg) l = 1 while l: new_data = requested_file.read(1024) l = socket_conn.send_next_data(new_data) # mylog( # '[{}]Sent {}B of file<{}> data' # .format(cloud.my_id_from_remote, l, filepath) # ) mylog( '[{}]Sent <{}> data to [{}]' .format(cloud.my_id_from_remote, filepath, other_id) ) requested_file.close() def complete_sending_files(other_id, cloud, filepath, socket_conn): msg = HostFileTransferMessage(other_id, cloud.uname(), cloud.cname(), None, None, None) socket_conn.send_obj(msg) mylog('[{}] completed sending files to [{}]' .format(cloud.my_id_from_remote, other_id))
4,744
1,532
from io import open from importlib import import_module from app.Exceptions.exceptions import * def config(): try: config = open("CONFIG.txt", "r+") lines = config.readlines() config.seek(0) all_modules_installed = True for line in lines: if line[0] != "#": try: new_line = check_dependency(line) except ModuleNotInstalledError as e: print(str(e.args[0]) + " is not installed. Please install and try again.") new_line = str(e.args[0]) + "=FALSE" all_modules_installed = False config.write(new_line + "\n") else: config.write(line) return all_modules_installed except IOError: raise ConfigFileMissingError("No Config File") # TODO Ask user if they would like to install the package with pip def check_dependency(config_line): components = config_line.split("=") try: import_module(components[0]) return components[0] + "=" + "TRUE" except ImportError: raise ModuleNotInstalledError(components[0])
1,174
317
import numpy as np import mrob import pytest class TestPointCloud: def test_point_cloud_registration(self): # example equal to ./PC_alignment/examples/example_align.cpp # generate random data N = 500 X = np.random.rand(N,3) T = mrob.geometry.SE3(np.random.rand(6)) Y = T.transform_array(X) print('X = \n', X,'\n T = \n', T.T(),'\n Y =\n', Y) # solve the problem T_arun = mrob.registration.arun(X,Y) print('Arun solution =\n', T_arun.T()) assert(np.ndarray.all(np.isclose(T.T(), T_arun.T()))) W = np.ones(N) T_wp = mrob.registration.weighted(X,Y,W) print('Weighted point optimization solution =\n', T_wp.T()) assert(np.ndarray.all(np.isclose(T.T(),T_wp.T())))
795
299
# # Copyright (c) 2008-2015 Thierry Florac <tflorac AT ulthar.net> # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. # """PyAMS_utils.attr module This module provides an :ref:`ITraversable` adapter which can be used to get access to an object's attribute from a browser URL. This adapter is actually used to get access to 'file' attributes in PyAMS_file package. """ from pyramid.exceptions import NotFound from zope.interface import Interface from zope.traversing.interfaces import ITraversable from pyams_utils.adapter import ContextAdapter, adapter_config __docformat__ = 'restructuredtext' @adapter_config(name='attr', required=Interface, provides=ITraversable) class AttributeTraverser(ContextAdapter): """++attr++ namespace traverser This custom traversing adapter can be used to access an object attribute directly from an URL by using a path like this:: /path/to/object/++attr++name Where *name* is the name of the requested attribute. """ def traverse(self, name, furtherpath=None): # pylint: disable=unused-argument """Traverse from current context to given attribute""" if '.' in name: name = name.split('.', 1)[0] try: return getattr(self.context, name) except AttributeError as exc: raise NotFound from exc
1,698
531
import sys sys.path.append("../../") from appJar import gui count = 0 def press(btn): global count count += 1 app.setLabel("title", "Count=" + str(count)) if btn == "PRESS": app.setFg("white") app.setBg("green") elif btn == "PRESS ME TOO": app.setFg("green") app.setBg("pink") elif btn == "PRESS ME AS WELL": app.setFg("orange") app.setBg("red") if count >= 10: app.infoBox("You win", "You got the counter to 10") app = gui("Demo GUI") app.setBg("yellow") app.setFg("red") app.setFont(15) app.addLabel("title", "Hello World") app.addMessage("info", "This is a simple demo of appJar") app.addButton("PRESS", press) app.addButton("PRESS ME TOO", press) app.addButton("PRESS ME AS WELL", press) app.go()
794
307
""" 811. Subdomain Visit Count Example 1: Input: ["9001 discuss.leetcode.com"] Output: ["9001 discuss.leetcode.com", "9001 leetcode.com", "9001 com"] Explanation: We only have one website domain: "discuss.leetcode.com". As discussed above, the subdomain "leetcode.com" and "com" will also be visited. So they will all be visited 9001 times. Example 2: Input: ["900 google.mail.com", "50 yahoo.com", "1 intel.mail.com", "5 wiki.org"] Output: ["901 mail.com","50 yahoo.com","900 google.mail.com","5 wiki.org","5 org","1 intel.mail.com","951 com"] Explanation: We will visit "google.mail.com" 900 times, "yahoo.com" 50 times, "intel.mail.com" once and "wiki.org" 5 times. For the subdomains, we will visit "mail.com" 900 + 1 = 901 times, "com" 900 + 50 + 1 = 951 times, and "org" 5 times. """ class Solution: def subdomainVisits(self, cpdomains): """ :type cpdomains: List[str] :rtype: List[str] """ dic = collections.defaultdict(int) for domain in cpdomains: count = int(domain[:domain.find(" ")]) ip = domain[domain.find(" "): ] while '.' in ip: dic[ip[1:]] += count ip = ip[ip.find('.',1):] res = [] for k ,v in dic.items(): res.append(str(v)+" "+k) # or use : list(map(lambda kv: str(kv[1])+" "+kv[0], dic.items())) return res class Solution: def subdomainVisits(self, cpdomains): """ :type cpdomains: List[str] :rtype: List[str] """ result = defaultdict(int) for domain in cpdomains: count, domain = domain.split() count = int(count) frags = domain.split('.') curr = [] for i in reversed(range(len(frags))): curr.append(frags[i]) result[".".join(reversed(curr))] += count return ["{} {}".format(count, domain) for domain, count in result.item()]
2,024
739
# -*- coding: utf-8 -*- ### ### DO NOT CHANGE THIS FILE ### ### The code is auto generated, your change will be overwritten by ### code generating. ### from __future__ import absolute_import from .api.timeslots_dentistID import TimeslotsDentistid from .api.timeslots import Timeslots from .api.timeslots_dentistID_timeslotID import TimeslotsDentistidTimeslotid from .api.timeslots_dentistID_timeslotID_cancel import TimeslotsDentistidTimeslotidCancel from .api.timeslots_dentistID_timeslotID_reserve import TimeslotsDentistidTimeslotidReserve routes = [ dict(resource=TimeslotsDentistid, urls=['/timeslots/<int:dentistID>'], endpoint='timeslots_dentistID'), dict(resource=Timeslots, urls=['/timeslots'], endpoint='timeslots'), dict(resource=TimeslotsDentistidTimeslotid, urls=['/timeslots/<int:dentistID>/<int:timeslotID>'], endpoint='timeslots_dentistID_timeslotID'), dict(resource=TimeslotsDentistidTimeslotidCancel, urls=['/timeslots/<int:dentistID>/<int:timeslotID>/cancel'], endpoint='timeslots_dentistID_timeslotID_cancel'), dict(resource=TimeslotsDentistidTimeslotidReserve, urls=['/timeslots/<int:dentistID>/<int:timeslotID>/reserve'], endpoint='timeslots_dentistID_timeslotID_reserve'), ]
1,223
434
#!/usr/bin/python3 from bluetooth import * from protocol import * import sys import threading def chunks(l, n): """ Yield successive n-sized chunks from l. """ for i in range(0, len(l), n): yield l[i:i + n] # MAC address to connect to address = '00:06:66:61:AC:9E' # MicroCar-58 # Whether the processing thread is running running = True def process(socket): while running: data = socket.recv(1024) for msg in chunks(data, 2): if msg[0] == HALL_SENSOR and msg[1] == HALL_SENSOR_ON: print('Magnet detected') elif msg[0] == BATTERY: print('{0:.1f}V'.format(msg[1] / 10.0)) def main(): global running # Open connection socket = BluetoothSocket(RFCOMM) socket.connect((address, 1)) # Start processing thread t_process = threading.Thread(target=process, args=(socket,)) t_process.daemon = True t_process.start() # Main loop try: while True: c = sys.stdin.read(1) # This waits until Enter is pressed if c == 'z': socket.send(bytes([THROTTLE, 0x10])) if c == 'x': socket.send(bytes([THROTTLE, 0x70])) if c == 'c': socket.send(bytes([THROTTLE, 0x0])) if c == 'n': socket.send(bytes([HEADLIGHT, HEADLIGHT_BRIGHT])) if c == 'm': socket.send(bytes([HEADLIGHT, HEADLIGHT_OFF])) except KeyboardInterrupt: # Ctrl-C pressed pass # Cleanup socket print('Shutting down...') running = False t_process.join() socket.close() if __name__ == '__main__': main()
1,523
584
#!/usr/bin/env python # vim: set fileencoding=utf-8 ts=4 sts=4 sw=4 et tw=80 : # # Attempt removal of fading residual ghost image from image set. # # Rob Siverd # Created: 2021-02-16 # Last modified: 2021-02-16 #-------------------------------------------------------------------------- #************************************************************************** #-------------------------------------------------------------------------- ## Logging setup: import logging #logging.basicConfig(level=logging.DEBUG) logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) #logger.setLevel(logging.DEBUG) logger.setLevel(logging.INFO) ## Current version: __version__ = "0.0.1" ## Optional matplotlib control: #from matplotlib import use, rc, rcParams #from matplotlib import use #from matplotlib import rc #from matplotlib import rcParams #use('GTKAgg') # use GTK with Anti-Grain Geometry engine #use('agg') # use Anti-Grain Geometry engine (file only) #use('ps') # use PostScript engine for graphics (file only) #use('cairo') # use Cairo (pretty, file only) #rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']}) #rc('font',**{'family':'serif','serif':['Palatino']}) #rc('font',**{'sans-serif':'Arial','family':'sans-serif'}) #rc('text', usetex=True) # enables text rendering with LaTeX (slow!) #rcParams['axes.formatter.useoffset'] = False # v. 1.4 and later #rcParams['agg.path.chunksize'] = 10000 #rcParams['font.size'] = 10 ## Python version-agnostic module reloading: try: reload # Python 2.7 except NameError: try: from importlib import reload # Python 3.4+ except ImportError: from imp import reload # Python 3.0 - 3.3 ## Modules: #import argparse import shutil #import resource #import signal import glob import os import sys import time import numpy as np #from numpy.lib.recfunctions import append_fields #import datetime as dt #from dateutil import parser as dtp #import scipy.linalg as sla #import scipy.signal as ssig #import scipy.ndimage as ndi #import scipy.optimize as opti #import scipy.interpolate as stp #import scipy.spatial.distance as ssd import matplotlib.pyplot as plt #import matplotlib.cm as cm #import matplotlib.ticker as mt #import matplotlib._pylab_helpers as hlp #from matplotlib.colors import LogNorm #import matplotlib.colors as mplcolors #import matplotlib.collections as mcoll #import matplotlib.gridspec as gridspec #from functools import partial #from collections import OrderedDict #from collections.abc import Iterable #import multiprocessing as mp #np.set_printoptions(suppress=True, linewidth=160) #import pandas as pd #import statsmodels.api as sm #import statsmodels.formula.api as smf #from statsmodels.regression.quantile_regression import QuantReg #import PIL.Image as pli #import seaborn as sns #import cmocean #import theil_sen as ts #import window_filter as wf #import itertools as itt _have_np_vers = float('.'.join(np.__version__.split('.')[:2])) ##--------------------------------------------------------------------------## ## Home-brew robust statistics: try: import robust_stats reload(robust_stats) rs = robust_stats except ImportError: logger.error("module robust_stats not found! Install and retry.") sys.stderr.write("\nError! robust_stats module not found!\n" "Please install and try again ...\n\n") sys.exit(1) ## Fast FITS I/O: #try: # import fitsio #except ImportError: # logger.error("fitsio module not found! Install and retry.") # sys.stderr.write("\nError: fitsio module not found!\n") # sys.exit(1) ## Various from astropy: try: # import astropy.io.ascii as aia import astropy.io.fits as pf # import astropy.io.votable as av # import astropy.table as apt import astropy.time as astt # import astropy.wcs as awcs # from astropy import constants as aconst # from astropy import coordinates as coord # from astropy import units as uu except ImportError: logger.error("astropy module not found! Install and retry.") sys.stderr.write("\nError: astropy module not found!\n") sys.exit(1) ##--------------------------------------------------------------------------## ## Save FITS image with clobber (astropy / pyfits): def qsave(iname, idata, header=None, padkeys=1000, **kwargs): this_func = sys._getframe().f_code.co_name parent_func = sys._getframe(1).f_code.co_name sys.stderr.write("Writing to '%s' ... " % iname) if header: while (len(header) < padkeys): header.append() # pad header if os.path.isfile(iname): os.remove(iname) pf.writeto(iname, idata, header=header, **kwargs) sys.stderr.write("done.\n") ##--------------------------------------------------------------------------## ## Save FITS image with clobber (fitsio): #def qsave(iname, idata, header=None, **kwargs): # this_func = sys._getframe().f_code.co_name # parent_func = sys._getframe(1).f_code.co_name # sys.stderr.write("Writing to '%s' ... " % iname) # #if os.path.isfile(iname): # # os.remove(iname) # fitsio.write(iname, idata, clobber=True, header=header, **kwargs) # sys.stderr.write("done.\n") ##--------------------------------------------------------------------------## ##------------------ Parse Command Line ----------------## ##--------------------------------------------------------------------------## ## Parse arguments and run script: #class MyParser(argparse.ArgumentParser): # def error(self, message): # sys.stderr.write('error: %s\n' % message) # self.print_help() # sys.exit(2) # ### Enable raw text AND display of defaults: #class CustomFormatter(argparse.ArgumentDefaultsHelpFormatter, # argparse.RawDescriptionHelpFormatter): # pass # ### Parse the command line: #if __name__ == '__main__': # # # ------------------------------------------------------------------ # prog_name = os.path.basename(__file__) # descr_txt = """ # PUT DESCRIPTION HERE. # # Version: %s # """ % __version__ # parser = argparse.ArgumentParser( # prog='PROGRAM_NAME_HERE', # prog=os.path.basename(__file__), # #formatter_class=argparse.RawTextHelpFormatter) # description='PUT DESCRIPTION HERE.') # #description=descr_txt) # parser = MyParser(prog=prog_name, description=descr_txt) # #formatter_class=argparse.RawTextHelpFormatter) # # ------------------------------------------------------------------ # parser.set_defaults(thing1='value1', thing2='value2') # # ------------------------------------------------------------------ # parser.add_argument('firstpos', help='first positional argument') # parser.add_argument('-w', '--whatever', required=False, default=5.0, # help='some option with default [def: %(default)s]', type=float) # parser.add_argument('-s', '--site', # help='Site to retrieve data for', required=True) # parser.add_argument('-n', '--number_of_days', default=1, # help='Number of days of data to retrieve.') # parser.add_argument('-o', '--output_file', # default='observations.csv', help='Output filename.') # parser.add_argument('--start', type=str, default=None, # help="Start time for date range query.") # parser.add_argument('--end', type=str, default=None, # help="End time for date range query.") # parser.add_argument('-d', '--dayshift', required=False, default=0, # help='Switch between days (1=tom, 0=today, -1=yest', type=int) # parser.add_argument('-e', '--encl', nargs=1, required=False, # help='Encl to make URL for', choices=all_encls, default=all_encls) # parser.add_argument('-s', '--site', nargs=1, required=False, # help='Site to make URL for', choices=all_sites, default=all_sites) # parser.add_argument('remainder', help='other stuff', nargs='*') # # ------------------------------------------------------------------ # # ------------------------------------------------------------------ # #iogroup = parser.add_argument_group('File I/O') # #iogroup.add_argument('-o', '--output_file', default=None, required=True, # # help='Output filename', type=str) # #iogroup.add_argument('-R', '--ref_image', default=None, required=True, # # help='KELT image with WCS') # # ------------------------------------------------------------------ # # ------------------------------------------------------------------ # ofgroup = parser.add_argument_group('Output format') # fmtparse = ofgroup.add_mutually_exclusive_group() # fmtparse.add_argument('--python', required=False, dest='output_mode', # help='Return Python dictionary with results [default]', # default='pydict', action='store_const', const='pydict') # bash_var = 'ARRAY_NAME' # bash_msg = 'output Bash code snippet (use with eval) to declare ' # bash_msg += 'an associative array %s containing results' % bash_var # fmtparse.add_argument('--bash', required=False, default=None, # help=bash_msg, dest='bash_array', metavar=bash_var) # fmtparse.set_defaults(output_mode='pydict') # # ------------------------------------------------------------------ # # Miscellany: # miscgroup = parser.add_argument_group('Miscellany') # miscgroup.add_argument('--debug', dest='debug', default=False, # help='Enable extra debugging messages', action='store_true') # miscgroup.add_argument('-q', '--quiet', action='count', default=0, # help='less progress/status reporting') # miscgroup.add_argument('-v', '--verbose', action='count', default=0, # help='more progress/status reporting') # # ------------------------------------------------------------------ # # context = parser.parse_args() # context.vlevel = 99 if context.debug else (context.verbose-context.quiet) # context.prog_name = prog_name # ##--------------------------------------------------------------------------## ##--------------------------------------------------------------------------## ##--------------------------------------------------------------------------## ## Where to save results: out_dir = 'fix_test' if os.path.isdir(out_dir): shutil.rmtree(out_dir) os.mkdir(out_dir) ## Images to process: img_dir = 'r17577216' #img_list = sorted(glob.glob('%s/SPITZER_I1_*_hcfix.fits' % img_dir)) img_list = sorted(glob.glob('%s/SPITZER_I1_*_clean.fits' % img_dir)) ## Stacked frame: stack_file = 'zmed_i1_clip30.fits' sdata, shdrs = pf.getdata(stack_file, header=True) sdata -= np.median(sdata) smed, siqrn = rs.calc_ls_med_IQR(sdata) ## Select bright pixels: s_sigcut = 13.0 sbright = sdata > s_sigcut * siqrn #smasked = sdata.copy() #smasked[~bright] = np.nan #qsave('lookie.fits', smasked, overwrite=True) ##--------------------------------------------------------------------------## ## Loop over target images and attempt to fix: i_sigcut = 75.0 data_list = [] hdrs_list = [] ratio_list = [] for ipath in img_list: sys.stderr.write("Examining %s ... \n" % ipath) ibase = os.path.basename(ipath) fpath = os.path.join(out_dir, ibase) idata, ihdrs = pf.getdata(ipath, header=True) data_list.append(idata) hdrs_list.append(ihdrs) # identify bright pixels on target frame: ibright = idata > i_sigcut * siqrn rbright = sbright & ~ibright # safe to scale with ghost_ratio = idata[rbright] / sdata[rbright] rmed, rsig = rs.calc_ls_med_IQR(ghost_ratio) ratio_list.append(rmed) sys.stderr.write("rmed: %10.5f\n" % rmed) sys.stderr.write("rsig: %10.5f\n" % rsig) sys.stderr.write("\n") ifixed = idata - rmed * sdata qsave(fpath, ifixed) tstamps = astt.Time([h['DATE_OBS'] for h in hdrs_list], scale='utc') ##--------------------------------------------------------------------------## ##--------------------------------------------------------------------------## ##--------------------------------------------------------------------------## #plt.style.use('bmh') # Bayesian Methods for Hackers style fig_dims = (10, 8) fig = plt.figure(1, figsize=fig_dims) plt.gcf().clf() #fig, axs = plt.subplots(2, 2, sharex=True, figsize=fig_dims, num=1) # sharex='col' | sharex='row' #fig.frameon = False # disable figure frame drawing #fig.subplots_adjust(left=0.07, right=0.95) #ax1 = plt.subplot(gs[0, 0]) ax1 = fig.add_subplot(111) #ax1 = fig.add_axes([0, 0, 1, 1]) #ax1.patch.set_facecolor((0.8, 0.8, 0.8)) ax1.grid(True) #ax1.axis('off') imtime_sec = 86400.0 * (tstamps.jd - tstamps.jd.min()) ax1.scatter(imtime_sec, ratio_list) ax1.set_xlabel("Time (sec)") ax1.set_ylabel("Ghost ratio (unitless)") ## Disable axis offsets: #ax1.xaxis.get_major_formatter().set_useOffset(False) #ax1.yaxis.get_major_formatter().set_useOffset(False) #ax1.plot(kde_pnts, kde_vals) #blurb = "some text" #ax1.text(0.5, 0.5, blurb, transform=ax1.transAxes) #ax1.text(0.5, 0.5, blurb, transform=ax1.transAxes, # va='top', ha='left', bbox=dict(facecolor='white', pad=10.0)) # fontdict={'family':'monospace'}) # fixed-width #colors = cm.rainbow(np.linspace(0, 1, len(plot_list))) #for camid, c in zip(plot_list, colors): # cam_data = subsets[camid] # xvalue = cam_data['CCDATEMP'] # yvalue = cam_data['PIX_MED'] # yvalue = cam_data['IMEAN'] # ax1.scatter(xvalue, yvalue, color=c, lw=0, label=camid) #mtickpos = [2,5,7] #ndecades = 1.0 # for symlog, set width of linear portion in units of dex #nonposx='mask' | nonposx='clip' | nonposy='mask' | nonposy='clip' #ax1.set_xscale('log', basex=10, nonposx='mask', subsx=mtickpos) #ax1.set_xscale('log', nonposx='clip', subsx=[3]) #ax1.set_yscale('symlog', basey=10, linthreshy=0.1, linscaley=ndecades) #ax1.xaxis.set_major_formatter(formatter) # re-format x ticks #ax1.set_ylim(ax1.get_ylim()[::-1]) #ax1.set_xlabel('whatever', labelpad=30) # push X label down #ax1.set_xticks([1.0, 3.0, 10.0, 30.0, 100.0]) #ax1.set_xticks([1, 2, 3], ['Jan', 'Feb', 'Mar']) #for label in ax1.get_xticklabels(): # label.set_rotation(30) # label.set_fontsize(14) #ax1.xaxis.label.set_fontsize(18) #ax1.yaxis.label.set_fontsize(18) #ax1.set_xlim(nice_limits(xvec, pctiles=[1,99], pad=1.2)) #ax1.set_ylim(nice_limits(yvec, pctiles=[1,99], pad=1.2)) #spts = ax1.scatter(x, y, lw=0, s=5) ##cbar = fig.colorbar(spts, orientation='vertical') # old way #cbnorm = mplcolors.Normalize(*spts.get_clim()) #scm = plt.cm.ScalarMappable(norm=cbnorm, cmap=spts.cmap) #scm.set_array([]) #cbar = fig.colorbar(scm, orientation='vertical') #cbar = fig.colorbar(scm, ticks=cs.levels, orientation='vertical') # contours #cbar.formatter.set_useOffset(False) #cbar.update_ticks() plot_name = 'ratio_decay.png' fig.tight_layout() # adjust boundaries sensibly, matplotlib v1.1+ plt.draw() fig.savefig(plot_name, bbox_inches='tight') # cyclical colormap ... cmocean.cm.phase # cmocean: https://matplotlib.org/cmocean/ ###################################################################### # CHANGELOG (13_removal_test.py): #--------------------------------------------------------------------- # # 2021-02-16: # -- Increased __version__ to 0.0.1. # -- First created 13_removal_test.py. #
15,383
5,245
class PositionHolder: def __init__(self, p=''): self._position = [] @property def position(self): return self._position @position.setter def position(self, new_position): # check for new moves # emit moves to UI if needed self._position = new_position def emit_move(self): pass
353
99
import os import argparse from fsu import __application_name__, longest_path, longest_path_command def fsu(): parser = argparse.ArgumentParser(prog=__application_name__) parser.add_argument("-c", "--command", required=True, help="commands: {longest_path_command}") parser.add_argument("-p", "--path", help="path") args = parser.parse_args() if args.command == longest_path_command: lp = longest_path(args.path) for p in [lp, os.path.abspath(lp)]: print(f"{p} ({len(p)})") else: print(f"{args.command} is not a valid command (use -h for help)") if __name__ == "__main__": fsu()
647
220
from django.shortcuts import render from rest_framework import status from rest_framework.generics import ( RetrieveAPIView, CreateAPIView, DestroyAPIView) from rest_framework.response import Response from .models import UserFollow from .utils import Utilities from .serializers import FollowsSerializer, FollowersSerializer from ..profiles.permissions import IsGetOrIsAuthenticated from ..profiles.renderers import ProfileJSONRenderer from ..profiles.serializers import ProfileSerializer class UserFollowingRetrieveView(RetrieveAPIView): """ get: Get users that the user follows. """ permission_classes = (IsGetOrIsAuthenticated,) serializer_class = FollowsSerializer def retrieve(self, request): """ get: Get profile that user follows """ user = Utilities.get_user(self, request.user.username) following = Utilities.get_followers( self, user=user, follower=request.user.id) context = {"user": user} serializer = self.serializer_class( following, many=True, context=context) response = { "users": serializer.data, "following": user.following.all().count() } return Response({"data": response}, status=status.HTTP_200_OK) class UserFollowersRetrieveView(RetrieveAPIView): """ get: Get users that follow the user's profile. """ permission_classes = (IsGetOrIsAuthenticated,) serializer_class = FollowersSerializer def retrieve(self, request): """ get: Get users follow the user's profile """ user = Utilities.get_user(self, request.user.username) follower = Utilities.get_followers( self, user=user, following=request.user.id) context = {"user": user} serializer = self.serializer_class( follower, many=True, context=context) response = { "users": serializer.data, "followers": user.followers.all().count() } return Response({"data": response}, status=status.HTTP_200_OK) class FollowUserView(CreateAPIView): permission_classes = (IsGetOrIsAuthenticated,) renderer_classes = (ProfileJSONRenderer,) serializer_class = ProfileSerializer def post(self, request, username): """ post: Follow users """ user = Utilities.get_profile(self, username) current_user = Utilities.get_user(self, username) request_user = Utilities.get_user(self, request.user.username) Utilities.validate_user(self, request, username) context = { "request": request.user.username, "username": username } Utilities.follow_user(self, follower=request_user, followee=current_user) serializer = self.serializer_class(user, context=context) return Response(serializer.data, status=status.HTTP_200_OK) class UnfollowUserView(DestroyAPIView): """ delete: Unfollow users """ permission_classes = (IsGetOrIsAuthenticated,) renderer_classes = (ProfileJSONRenderer,) serializer_class = ProfileSerializer def delete(self, request, username): """ delete: Unfollow users """ user = Utilities.get_profile(self, username) current_user = Utilities.get_user(self, username) request_user = Utilities.get_user(self, request.user.username) context = { "request": request.user.username, "username": username } Utilities.unfollow_user( self, follower=request_user, following=current_user) serializer = self.serializer_class(user, context=context) return Response(serializer.data, status=status.HTTP_200_OK)
3,914
1,095
import pytest from dayforce_client.client import Dayforce, DayforceSFTP @pytest.fixture(scope="session") def client(): return Dayforce(username="foo", password="bar", client_namespace="foobar") @pytest.fixture(scope="session") def sftpclient(): return DayforceSFTP( hostname="sftp://foo.bar.com", username="foo", password="bar", port=22 )
364
118
password="pbkdf2(1000,20,sha512)$ba0f5757f7b448ec$d9c2e5887e65f45311047c8ff518f200ee11b98f"
92
76
DEFAULT_KEY = { "ENC": b"\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4A\x4B\x4C\x4D\x4E\x4F", "MAC": b"\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4A\x4B\x4C\x4D\x4E\x4F", "DEK": b"\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4A\x4B\x4C\x4D\x4E\x4F", } def list(key=DEFAULT_KEY): """Lists all applets""" print(key)
328
251
# coding: utf-8 import socketserver import os from HTTP_Parser import HTTP_Parser # Copyright 2013 Abram Hindle, Eddie Antonio Santos, Chase Warwick # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # # Furthermore it is derived from the Python documentation examples thus # some of the code is Copyright © 2001-2013 Python Software # Foundation; All Rights Reserved # # http://docs.python.org/2/library/socketserver.html # # run: python freetests.py # try: curl -v -X GET http://127.0.0.1:8080/ class MyWebServer(socketserver.BaseRequestHandler): def handle(self): """Handles requests from client""" self.redirect = { "./www/deep" : "/deep/" } self.FORBIDDEN_PATHS = ['../'] data = self.request.recv(8192).strip().decode('utf-8') print ("Got a request of: %s\n" % data) self.HTTP_parser = HTTP_Parser(data) if self.should_redirect(): path = self.HTTP_parser.get_path() print("Client should be redirected to a new directory: " + path + " :Sending 301 status code\n") response = self.HTTP_parser.construct_HTTP_response(301, self.redirect[path]) self.request.sendall(bytearray(response,'utf-8')) return if self.is_405_error(): print("Client made an invalid request: " + self.HTTP_parser.get_request_method() + ":Sending 405 status code\n") response = self.HTTP_parser.construct_HTTP_response(405) self.request.sendall(bytearray(response, 'utf-8')) return if self.is_404_error(): print("Client attempted to access nonexistant path: " + self.HTTP_parser.get_path() + ":Sending 404 status code\n") response = self.HTTP_parser.construct_HTTP_response(404) self.request.sendall(bytearray(response, 'utf-8')) return response = self.HTTP_parser.construct_HTTP_response(200) self.request.sendall(bytearray(response,'utf-8')) def should_redirect(self): """ This function checks against a variety of predefined URLs to see if there is a match in the case that there is it returns True """ path = self.HTTP_parser.get_path() return path in self.redirect def is_404_error(self): """ This function checks if a 404 error should be thrown which occurs in two cases, the path does not exist or the path given is outside of www directory """ path = self.HTTP_parser.get_path() if not os.path.exists(path): return True for forbidden_path in self.FORBIDDEN_PATHS: if forbidden_path in path: return True return False def is_405_error(self): """ This function returns true if a 405 error should be thrown which occurs when the client uses a method which is not permitted """ method = self.HTTP_parser.get_request_method() if not method == 'GET': return True return False if __name__ == "__main__": HOST, PORT = "localhost", 8080 socketserver.TCPServer.allow_reuse_address = True # Create the server, binding to localhost on port 8080 server = socketserver.TCPServer((HOST, PORT), MyWebServer) # Activate the server; this will keep running until you # interrupt the program with Ctrl-C server.serve_forever()
3,987
1,179
r""" This is a module for IDW Spatial Interpolation """ import numpy as np from ...utils.distance import haversine, euclidean from ..base import Base from copy import deepcopy def is_row_in_array(row, arr): return list(row) in arr.tolist() def get_index(row, arr): t1 = np.where(arr[:, 0] == row[0]) t2 = np.where(arr[:, 1] == row[1]) index = np.intersect1d(t1, t2)[0] # If length of index exceeds one!! - Uniqueness Error return index class Idw(Base): """A class that is declared for performing IDW Interpolation. For more information on how this method works, kindly refer to https://en.wikipedia.org/wiki/Inverse_distance_weighting Parameters ---------- exponent : positive float, optional The rate of fall of values from source data points. Higher the exponent, lower is the value when we move across space. Default value is 2. Attributes ---------- Interpolated Values : {array-like, 2D matrix}, shape(resolution, resolution) This contains all the interpolated values when the interpolation is performed over a grid, instead of interpolation over a set of points. X : {array-like, 2D matrix}, shape(n_samples, 2) Set of all the coordinates available for interpolation. y : array-like, shape(n_samples,) Set of all the available values at the specified X coordinates. result : array_like, shape(n_to_predict, ) Set of all the interpolated values when interpolating over a given set of data points. """ def __init__(self, exponent=2, resolution="standard", coordinate_type="Euclidean"): super().__init__(resolution, coordinate_type) self.exponent = exponent self.interpolated_values = None self.X = None self.y = None self.result = None if self.coordinate_type == 'Geographic': self.distance = haversine elif self.coordinate_type == 'Euclidean': self.distance = euclidean else: raise NotImplementedError("Only Geographic and Euclidean Coordinates are available") def _fit(self, X, y): """This function is for the IDW Class. This is not expected to be called directly """ self.X = X self.y = y return self def _predict_grid(self, x1lim, x2lim): """ Gridded interpolation for natural neighbors interpolation. This function should not be called directly. """ lims = (*x1lim, *x2lim) x1min, x1max, x2min, x2max = lims x1 = np.linspace(x1min, x1max, self.resolution) x2 = np.linspace(x2min, x2max, self.resolution) X1, X2 = np.meshgrid(x1, x2) return self._predict(np.array([X1.ravel(), X2.ravel()]).T) def _predict(self, X): """The function call to predict using the interpolated data in IDW interpolation. This should not be called directly. """ result = np.zeros(X.shape[0]) for i in range(len(X)): point = X[i] # Preserve point estimates. This is mandatory in IDW flag = is_row_in_array(point, self.X) if flag: index = get_index(point, self.X) result[i] = self.y[index] else: weights = 1 / (self.distance(point, self.X) ** self.exponent) result[i] = np.multiply(self.y.reshape(self.y.shape[0],), weights).sum() / (weights.sum()) self.result = result return self.result
3,542
1,055
from __future__ import unicode_literals from rucken_todo.serializers import AccountSerializer def jwt_response_payload_handler(token, user=None, request=None): user_info = AccountSerializer(user, context={'request': request}) return { 'token': token, 'user': user_info.data }
306
91
import os, sys import subprocess from subprocess import Popen from bitrate_db import influx from flask import Flask from flask import request, Response, make_response from functools import wraps import threading from threading import Thread dpmi = Flask(__name__) interface="ens4" directory="/home/ajheartnett/consumer-bitrate" password="aj_heartnett001" global mainstream mainstream=[] global streams streams=[] def auth(w): @wraps(w) def q(*args, **kwargs): r = request.authorization if r and r.username == 'dpmi' and r.password == 'dpmi': return w(*args, **kwargs) return make_response('\n...Could not verify...\nPlease check the credentials\n', 401, {'WWW-Authenticate' : 'Basic realm = "login required"'}) return q def pkill(): sudo_Password = password stop_command = 'sudo pkill bitrate' kill = os.system('echo %s|sudo -S %s' % (sudo_Password, stop_command)) return def bitrate(str): os.chdir(directory) bitrate=subprocess.Popen(["unbuffer","./bitrate","-i",interface,str],stdout=subprocess.PIPE) influx_thread=threading.Thread(target=influx,args=(bitrate.stdout,str,)) influx_thread.start() @dpmi.route('/startstream/<stream>', methods=['GET']) @auth def main(stream): global mainstream mul=stream.split(',') if len(mul)>1: return '\n...start with only one stream, use "addstream" for adding multiple streams...\n\n' else: if not streams: if stream in mainstream: return '\n... bitrate stream %s is already running...\n\n' %stream else: streams.append(stream) mainstream=mainstream+streams bitrate_thread=threading.Thread(target=bitrate,args=(stream,)) bitrate_thread.deamon=True bitrate_thread.start() return '\n...bitrate stream %s started...\n\n' %stream elif stream in mainstream: return '\n... bitrate stream %s is already running...\n\n' %stream else: return '\n...a stream has already been started, use "addstream" to add the streams...\n\n' @dpmi.route('/showstream', methods=['GET']) @auth def show(): if not mainstream: return '\n...No streams available...\n\n' else: show=" ".join(str(S) for S in mainstream) return '\n...running bitrate streams %s...\n\n' %show @dpmi.route('/addstream/<add>', methods=['GET']) @auth def add(add): global mainstream addstream=add.split(',') b=",".join(addstream) already=[] already=list(set(addstream).intersection(mainstream)) stralready=" ".join(str(j) for j in already) new=[] new=list(set(addstream)-set(already)) strnew=" ".join(str(i) for i in new) mainstream=mainstream+new for s in new: bitrate_add_thread=threading.Thread(target=bitrate,args=(s,)) bitrate_add_thread.deamon=True bitrate_add_thread.start() if not already: return '\n...adding bitrate streams %s...\n\n' %strnew else: return '\n...stream %s already running...\n...streams %s added...\n\n' %(stralready,strnew) @dpmi.route('/deletestream/<delet>', methods=['GET']) @auth def delete(delet): global mainstream delet=delet.split(',') suredel=[] suredel=list(set(delet).intersection(mainstream)) strsuredel=",".join(str(l) for l in suredel) cantdel=[] cantdel=list(set(delet)-set(suredel)) strcantdel=" ".join(str(m) for m in cantdel) mainstream=list(set(mainstream)-set(suredel)) strmainstream=",".join(str(k) for k in mainstream) if not suredel: return '\n...stream(s) not available to delete...\n\n' else: pkill() for h in mainstream: bitrate_add_thread=threading.Thread(target=bitrate,args=(h,)) bitrate_add_thread.deamon=True bitrate_add_thread.start() if set(suredel).intersection(streams)!=0 : del streams[:] if not cantdel: return "\n...bitrate stream %s deleted...\n\n" %(strsuredel) else: return "\n...bitrate stream %s deleted...\n...bitrate stream %s not available to delete...\n\n" %(strsuredel,strcantdel) @dpmi.route('/changestream/<stream>', methods=['GET']) @auth def change(stream): global ch global mainstream ch=stream if ch in mainstream: return '\n...bitrate stream %s already running, change to another stream...\n\n' %ch else: stop() del streams[:] mainstream=list(set(mainstream)-set(streams)) main(ch) return '\n...bitrate stream changed to %s...\n\n' %ch @dpmi.route('/stop', methods=['GET']) @auth def stop(): pkill() del (mainstream[:],streams[:]) return "\n...bitrate stream killed...\n\n" if __name__ == "__main__": dpmi.run(host='localhost', port=5000, debug=True)
4,464
1,742
#!/usr/bin/env python from __future__ import print_function '''Simple command-line tool that wraps OTI to get trees for an argument which is a property value pair e.g. python ot-oti-find-tree.py '{"ot:ottTaxonName": "Bos"}' which is described at https://github.com/OpenTreeOfLife/opentree/wiki/Open-Tree-of-Life-APIs#find_trees ''' import sys import json def ot_find_tree(arg_dict, exact=True, verbose=False, oti_wrapper=None): """Uses a peyotl wrapper around an Open Tree web service to get a list of trees including values `value` for a given property to be searched on `porperty`. The oti_wrapper can be None (in which case the default wrapper from peyotl.sugar will be used. All other arguments correspond to the arguments of the web-service call. """ if oti_wrapper is None: from peyotl.sugar import oti oti_wrapper = oti return oti_wrapper.find_trees(arg_dict, exact=exact, verbose=verbose, wrap_response=True) def print_matching_trees(arg_dict, tree_format, exact, verbose): """The `TreeRef` instance returned by the oti.find_trees(... wrap_response=True) can be used as an argument to the phylesystem_api.get call. If you pass in a string (instead of a TreeRef), the string will be interpreted as a study ID """ from peyotl.sugar import phylesystem_api tree_list = ot_find_tree(arg_dict, exact=exact, verbose=verbose) for tree_ref in tree_list: print(tree_ref) print(phylesystem_api.get(tree_ref, format=tree_format)) def main(argv): """This function sets up a command-line option parser and then calls print_matching_trees to do all of the real work. """ import argparse description = 'Uses Open Tree of Life web services to try to find a tree with the value property pair specified. ' \ 'setting --fuzzy will allow fuzzy matching' parser = argparse.ArgumentParser(prog='ot-get-tree', description=description) parser.add_argument('arg_dict', type=json.loads, help='name(s) for which we will try to find OTT IDs') parser.add_argument('--property', default=None, type=str, required=False) parser.add_argument('--fuzzy', action='store_true', default=False, required=False) # exact matching and verbose not working atm... parser.add_argument('--verbose', action='store_true', default=False, required=False) parser.add_argument('-f', '--format', type=str, default='newick', help='Format of the tree. Should be "newick", "nexson", "nexml", or "nexus"') try: args = parser.parse_args(argv) arg_dict = args.arg_dict exact = not args.fuzzy verbose = args.verbose tree_format = args.format.lower() except: arg_dict = {'ot:ottTaxonName': 'Chamaedorea frondosa'} sys.stderr.write('Running a demonstration query with {}\n'.format(arg_dict)) exact = True verbose = False tree_format = 'newick' if tree_format not in ('newick', 'nexson', 'nexml', 'nexus'): raise ValueError('Unrecognized format "{}"'.format(tree_format)) print_matching_trees(arg_dict, tree_format, exact=exact, verbose=verbose) if __name__ == '__main__': try: main(sys.argv[1:]) except Exception as x: sys.exit('{}\n'.format(str(x)))
3,438
1,040
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ @title: Non-Exhaustive Gaussian Mixture Generative Adversarial Networks (NE-GM-GAN) @topic: I-means Model @author: Jun Zhuang, Mohammad Al Hasan @ref: https://math.stackexchange.com/questions/20593/calculate-variance-from-a-stream-of-sample-values """ import numpy as np from utils import compute_loss class Imeans(): def denoising(self, alist, ts=0.5): """ @topic: Denoising Activation Function @input: 1D list, threshold(float); @output: 1D list. """ if ts > 1 or ts < 0: return "Given threshold should be in the range of [0, 1]." list_dn = [] #list_max, list_min = max(alist), min(alist) list_max, list_min = max(alist), 0 for i in range(len(alist)): # normalize the data i_nm = (alist[i] - list_min) / (list_max - list_min) # filter the data with given threshold if i_nm > ts: list_dn.append(1) else: list_dn.append(0) return list_dn def testing(self, x, i, n_round): """Output the information in n_round""" if n_round <= 0: return "n_round must be larger than zero." if i % n_round == 0: print(x) def imeans(self, X, mu, cov, N, Z=3, WS=100, verbose=True): """ @topic: I-means algorithm: detect the number of new cluster. @input: X: a batch of testing points (array); mu: mean of original clusters (list of list); e.g. mu = [[mu0], [mu1], [mu2], ...] cov: covariance of original clusters (list of list); e.g. cov = [[cov0], [cov1], [cov2], ...] N: the number of samples in original clusters (list of int); N = [n0, n1, n2, ...] Z: the value for "Z sigma rule" based on the test of confidence interval (int); WS: the number of epochs in the warm-up stage for learning beta prior knowledge (int). @output: k_new: the number of new cluster (int). """ # Initializ parameters mu = list(mu) sigma = [np.sqrt(np.diag(cov[i])) for i in range(len(cov))] # convert to (3, 121, 121) diag matrix. ts = [compute_loss(mu[i]+Z*sigma[i], mu[i]) for i in range(len(mu)) if len(mu)==len(sigma)] # threshold list (3,) N_test = list(np.zeros_like(N)) # empty list for storing the number of testing clusters N_loss = [[] for i in range(len(N))] # collect the historical loss_{min} of existing clusters N_sp = [[1, 1] for i in range(len(N))] # store the shape parameters [alpha, beta] for i in range(len(X)): # for each testing point in a batch if verbose: self.testing("Round {0}: ".format(i), i, 100) # Compute the loss to each cluster and find out the loss_{min}. loss_k_list = [] for k in range(len(mu)): loss_k = compute_loss(X[i], mu[k]) loss_k_list.append(loss_k) if verbose: self.testing("The loss to {0} clusters: \n {1}".format(len(loss_k_list), loss_k_list), i, 100) loss_min = min(loss_k_list) # select the min value from loss_k_list. nidx = loss_k_list.index(loss_min) # return the index of loss_min. # Select the threshold TS if len(N_loss[nidx]) <= WS: TS = ts[nidx] # select TS based on "Z sigma rule" (Z=3). ts[nidx] = compute_loss(mu[nidx]+Z*sigma[nidx], mu[nidx]) # Update TS else: # Compute the theta_MAP for "nidx" cluster: theta_MAP = alpha / (alpha + beta) theta_MAP = N_sp[nidx][0] / (N_sp[nidx][0] + N_sp[nidx][1]) ts_idx = int(len(N_loss[nidx])*(1 - theta_MAP)) # compute the threshold TS index based on theta_MAP. TS = N_loss[nidx][ts_idx] # select the "ts_idx"-th norm in "N_loss" as threshold. # Make a decision if loss_min <= TS: # if loss_min < TS: Xi belongs to cluster[nidx]. # Update mu and sigma in streaming data mu_old = mu[nidx] # mu_{n+1} = mu_{n} + (x_{n+1} - mu_{n})/(n+1) mu[nidx] = mu_old + (X[i] - mu[nidx])/(N[nidx]+1) # v_{n+1} = v_{n} + (x_{n+1} - mu_{n})*(x_{n+1} - mu_{n+1}); sigma_{n+1} = √[v_{n+1}/n] sigma[nidx] = np.sqrt(((sigma[nidx]**2)*N[nidx] + (X[i] - mu_old)*(X[i] - mu[nidx]))/N[nidx]) N[nidx] = N[nidx] + 1 N_test[nidx] = N_test[nidx] + 1 N_loss[nidx].append(loss_min) # store the loss_min to corresponding clusters. N_loss[nidx].sort() # sort the list of loss_min. N_sp[nidx][1] = N_sp[nidx][1] + 1 # beta+1 if verbose: self.testing("The number of samples in cluster {0}: {1}.".format(nidx, N[nidx]), i, 50) else: # if loss_min > TS: Xi belongs to new cluster. mu.append(X[i]) # assign current Xi as new mean vector sigma.append(np.zeros_like(X[i])) # the sigma is 0 for only one point ts.append(np.mean(ts)) # use the mean of ts list as the initial threshold of new point N.append(1) N_test.append(1) N_loss.append([loss_min]) # store loss_min to new entry N_sp.append([1,1]) # initialize a beta distribution for new cluster N_sp[nidx][0] = N_sp[nidx][0] + 1 # alpha+1 # Filter the noise inside predicted result if verbose: print("Predicted clusters and corresponding numbers: \n", N_test) N_test_dn = self.denoising(N_test, 0.3) k_new = sum(N_test_dn) return k_new
5,817
1,965
from . import nodes from . import algos from . import simulation
64
16
from status import Chess, GameStatus, Direction class Action(object): def __init__(self, x, y, eat_pos=None, direction=None): self.x = x self.y = y if direction is not None: self.is_move = True self.direction = direction self.to_x = None self.to_y = None else: self.is_move = False self.direction = None self.to_x = eat_pos[0] self.to_y = eat_pos[1] def __str__(self): if self.direction is not None: s = 'm %d %d ' % (self.x, self.y) dir_dict = { Direction.Up: 'u', Direction.Down: 'd', Direction.Left: 'l', Direction.Right: 'r', Direction.LeftUp: 'lu', Direction.LeftDown: 'ld', Direction.RightUp: 'ru', Direction.RightDown: 'rd' } s += dir_dict[self.direction] else: s = 'e %d %d %d %d' % (self.x, self.y, self.to_x, self.to_y) return s def __eq__(self, obj): if obj is None: return False else: return self.x == obj.x and self.y == obj.y \ and self.is_move == obj.is_move \ and self.direction == obj.direction \ and self.to_x == obj.to_x and self.to_y == obj.to_y class Board(object): ''' A class of chess board for Surakarta game. ''' def __init__(self): self.__board = [([Chess.Null] * 6) for i in range(6)] self.__status = GameStatus.RedMoving self.new_game() def __str__(self): s = '' for i in self.__board: for j in i: if j == Chess.Null: s += '- ' elif j == Chess.Red: s += 'R ' else: s += 'B ' s += '\n' return s.rstrip('\n') def __eq__(self, other): for i in range(6): for j in range(6): if self.__board[i][j] != other.__board[i][j]: return False return True def __check_movable(self, x, y): ''' 如果能分出胜负已经在对手的步数,则判断不能移动 ''' chess = self.get_chess(x, y) if chess == Chess.Null: return False if self.__status in [GameStatus.RedWon, GameStatus.BlackWon]: return False if chess == Chess.Black and self.__status == GameStatus.RedMoving: return False if chess == Chess.Red and self.__status == GameStatus.BlackMoving: return False return True def __get_eat_pos(self, x, y, direction, chess, arc_count, original_x, original_y): '''判断(x,y)的子可以吃到的位置''' if chess == Chess.Null: return None, None # 四个角是吃不到子的 if (x, y) in [(0, 0), (0, 5), (5, 0), (5, 5)]: return None, None success, x, y = self.__get_target_pos(x, y, direction) if not success: pos_list = [ (1, -1), (2, -1), (2, 6), (1, 6), (4, -1), (3, -1), (3, 6), (4, 6), (-1, 1), (-1, 2), (6, 2), (6, 1), (-1, 4), (-1, 3), (6, 3), (6, 4) ] x_dir = Direction.Down if y <= 2 else Direction.Up y_dir = Direction.Right if x <= 2 else Direction.Left if x == -1: return self.__get_eat_pos(pos_list[y - 1][0], pos_list[y - 1][1], x_dir, chess, arc_count + 1, original_x, original_y) elif x == 6: return self.__get_eat_pos(pos_list[y + 3][0], pos_list[y + 3][1], x_dir, chess, arc_count + 1, original_x, original_y) elif y == -1: return self.__get_eat_pos(pos_list[x + 7][0], pos_list[x + 7][1], y_dir, chess, arc_count + 1, original_x, original_y) else: # y == 6 return self.__get_eat_pos(pos_list[x + 11][0], pos_list[x + 11][1], y_dir, chess, arc_count + 1, original_x, original_y) else: new_chess = self.get_chess(x, y) # 注意有一个特殊情况。 if new_chess == chess and (x != original_x or y != original_y): return None, None elif new_chess == Chess.Null: return self.__get_eat_pos(x, y, direction, chess, arc_count, original_x, original_y) else: return (x, y) if arc_count else (None, None) def __update_status(self): ''' Update the status of current game. ''' red, black = 0, 0 for i in self.__board: for j in i: if j == Chess.Red: red += 1 elif j == Chess.Black: black += 1 if red == 0: self.__status = GameStatus.BlackWon elif black == 0: self.__status = GameStatus.RedWon elif self.__status == GameStatus.RedMoving: self.__status = GameStatus.BlackMoving elif self.__status == GameStatus.BlackMoving: self.__status = GameStatus.RedMoving @staticmethod def __get_target_pos(x, y, direction): ''' Get the target position of giving position move along the direction. ''' if direction & Direction.Up: y -= 1 elif direction & Direction.Down: y += 1 if direction & Direction.Left: x -= 1 elif direction & Direction.Right: x += 1 success = x in range(6) and y in range(6) return success, x, y @property def status(self): ''' Return the status of current game. ''' return self.__status @property def won(self): ''' Return whether the red or black has already won. ''' return self.__status == GameStatus.RedWon \ or self.__status == GameStatus.BlackWon @property def board_size(self): ''' Return the size of board. ''' return len(self.__board) def new_game(self): ''' Reset the whole board and start a new game. ''' for i in range(6): if i < 2: for j in range(6): self.__board[i][j] = Chess.Black elif i < 4: for j in range(6): self.__board[i][j] = Chess.Null else: for j in range(6): self.__board[i][j] = Chess.Red self.__status = GameStatus.RedMoving def get_chess(self, x, y): ''' Get the status of specific chess on board. ''' if x not in range(6) or y not in range(6): return Chess.Null return self.__board[y][x] def can_move(self, x, y, direction): ''' Check if chess on (x, y) can move with giving direction. ''' if not self.__check_movable(x, y): return False success, x, y = self.__get_target_pos(x, y, direction) if not success: return False if self.get_chess(x, y) != Chess.Null: return False return True def get_can_move(self, x, y): ''' 获得某一个子可以移动的所有的位置 ''' dir_list = [] for i in Direction: if self.can_move(x, y, i): dir_list.append(i) return dir_list def get_can_eat(self, x, y): '''获得可以当前子可以吃的棋''' if not self.__check_movable(x, y): return [] chess_list = [] chess = self.get_chess(x, y) left = self.__get_eat_pos(x, y, Direction.Left, chess, 0, x, y) right = self.__get_eat_pos(x, y, Direction.Right, chess, 0, x, y) up = self.__get_eat_pos(x, y, Direction.Up, chess, 0, x, y) down = self.__get_eat_pos(x, y, Direction.Down, chess, 0, x, y) if left[0] is not None: chess_list.append(left) if right[0] is not None: chess_list.append(right) if up[0] is not None: chess_list.append(up) if down[0] is not None: chess_list.append(down) return chess_list def player_move(self, x, y, direction): ''' Let chess on (x, y) move along the direction. ''' if not self.__check_movable(x, y): return False success, nx, ny = self.__get_target_pos(x, y, direction) if not success: return False if self.get_chess(nx, ny) != Chess.Null: return False self.__board[ny][nx] = self.__board[y][x] self.__board[y][x] = Chess.Null self.__update_status() return True def player_eat(self, x, y, eat_x, eat_y): chess_list = self.get_can_eat(x, y) if (eat_x, eat_y) not in chess_list: return False chess = self.get_chess(x, y) self.__board[eat_y][eat_x] = chess self.__board[y][x] = Chess.Null self.__update_status() return True def apply_action(self, action): ''' Apply an action to board. ''' if action.is_move: return self.player_move(action.x, action.y, action.direction) else: return self.player_eat(action.x, action.y, action.to_x, action.to_y) # some test if __name__ == '__main__': board = Board() print('current board') print(board) print('current status:', board.status)
9,733
3,155
import argparse import sys def get_precision_values(input_file): seednumbs = [] precs = [] with open(input_file) as lines: for line in lines: if "RESULTS_SEEDNUMB" in line: values = line.strip().split() seednumbs.append(str(values[1])) if "RESULTS_AGGREGATION" in line: tokens = line.strip().split(',') mean, median, prec = float(tokens[2]), float(tokens[3]), float(tokens[4]) precs.append(prec) seednumbs.reverse() precs.reverse() return seednumbs, precs def prepare_data(infile, domain, outputdir): seednumbs, precs = get_precision_values(infile) # P@K fname = outputdir + "/prec_" + domain + ".csv" with open(fname, 'w') as f: f.write(','.join(seednumbs) + '\n') f.write(','.join([str(p) for p in precs]) + '\n') def main(): parser = argparse.ArgumentParser() parser.add_argument("-i", "--inputfile", help="input file with data to plot", type=str) parser.add_argument("-o", "--outputdir", help="output directory", type=str) #parser.add_argument("-t", "--plottype", help="plot type: ['prec', 'median', 'mean']", type=str) parser.add_argument("-d", "--domain", help="domain name", type=str) args = parser.parse_args() prepare_data(args.inputfile, args.domain, args.outputdir) if __name__=='__main__': main()
1,422
479
import h5py import pandas as pd import numpy as np import json import scipy as sp import nibabel as nib from glob import glob import fnmatch import os run_name_dict = { "REST1": "REST1_7T_PA", "REST2": "REST2_7T_AP", "REST3": "REST3_7T_PA", "REST4": "REST4_7T_AP", "MOVIE1": 'MOVIE1_CC1', "MOVIE2": 'MOVIE2_HO1', "MOVIE3": 'MOVIE3_CC2', "MOVIE4": 'MOVIE4_HO2' } def mk_TR_by_Feature(clip, feature_file): if clip in run_name_dict.keys(): run_name = run_name_dict[clip] hf = h5py.File(feature_file, 'r') clip_features = hf.get(run_name) clip_features = np.array(clip_features) return clip_features def get_visual_semantic_dropped_TRs(clip): run_name = run_name_dict[clip] hf = h5py.File('../../data/7T_movie_resources/WordNetFeatures.hdf5', 'r') clip_features = hf.get(run_name) clip_features = np.array(clip_features) est_idx = hf.get(run_name + "_est")[()] val_idx = hf.get(run_name + "_val")[()] tr_df = pd.DataFrame((est_idx + val_idx)) tr_idx = tr_df[tr_df.iloc[:,0] == 0].index.tolist() return tr_idx def offset_feature_matrix_by_TRs(feature_mat, offset_TRs = [1, 2, 3, 4, 5, 6, 7, 8]): # includes current TR TR_rows, feature_cols = feature_mat.shape vector_of_0s = pd.concat([pd.DataFrame(np.zeros(feature_cols).reshape(1, -1))]*offset_TRs[0], ignore_index=True) feature_mat_new = np.concatenate((vector_of_0s, feature_mat)) feature_mat_offset = np.hstack((feature_mat, feature_mat_new[0:feature_mat.shape[0], :])) for TR_num in offset_TRs[1:]: vector_of_0s = pd.concat([pd.DataFrame(np.zeros(feature_cols).reshape(1, -1))]*TR_num, ignore_index=True) feature_mat_new = np.concatenate((vector_of_0s, feature_mat)) feature_mat_offset = np.hstack((feature_mat_offset, feature_mat_new[0:feature_mat_offset.shape[0], :])) return feature_mat_offset def read_json_list(fileName): with open(fileName, "r") as fp: b = json.load(fp) return b def get_TRs_with_visual_features(clip, start_stop_pads = (10, 5), subj_list="../../data/train_subjects_list.npy"): # Contact us for access to train_subjects_list subj_list = np.load(subj_list, allow_pickle=True) if clip in run_name_dict.keys(): run_name = run_name_dict[clip] if 'MOVIE' in clip: print("Removing TRs where no visual semantic features") hf = h5py.File('../../data/WordNetFeatures.hdf5', 'r') # File from HCP data from gallant lab's featurizations estIdx = hf.get(run_name + "_est")[()] valIdx = hf.get(run_name + "_val")[()] tr_df = pd.DataFrame((estIdx + valIdx).tolist()) tr_idx = tr_df[tr_df.iloc[:,0] == 1].index.tolist() else: print("This is not a movie 1-4 in HCP data. This function will not work.") return tr_idx def make_TR_by_ROI_dict(clip, start_stop_pads = (10, 5), subj_list="../../data/train_subjects_list.npy"): # Contact us for access to train_subjects_list subj_list = np.load(subj_list, allow_pickle=True) subjwise_ts_dict = {} # Get name clip is referred to in files if clip in run_name_dict.keys(): run_name = run_name_dict[clip] else: print("This is not a movie or resting state 1-4 in HCP data. This function will not work.") if 'MOVIE' in clip: f_suffix = "_tfMRI_" + run_name + "_shen268_roi_ts.txt" data_dir = "../../data/participant_data/pre_processed_movie" elif "REST" in clip: f_suffix = "_rfMRI_" + run_name + "_shen268_roi_ts.txt" data_dir= "../../data/participant_data/pre_processed_rest" # Load data and if movie clip select desired TRs for s,subj in enumerate(subj_list): f_name = data_dir + subj + f_suffix run_data = pd.read_csv(f_name, sep='\t', header=None).dropna(axis=1) run_data = run_data.values # convert to np array # If movie clip subset TRs if 'MOVIE' in clip: tr_idx = get_TRs_to_analyze(clip, start_stop_pads = (10, 5), subj_list="train_subjects_list.npy") run_data = run_data[tr_idx, :] # Zscore movie or rest clip (aka run) subjwise_ts_dict[subj] = sp.stats.zscore(run_data) return subjwise_ts_dict def get_voxels_masked_subset_zscored(nii_file_name, movie_idx, thin_mask): nii = nib.load(nii_file_name) nii_data = np.asanyarray(nii.dataobj).T nii_data_idx = nii_data[movie_idx ,:] nii_data_idx_masked = nii_data_idx[:, thin_mask] niiData_zscored = sp.stats.zscore(nii_data_idx_masked, axis=0) niiData_preprocessed = np.nan_to_num(niiData_zscored, nan=0.0) return niiData_preprocessed def get_voxels_masked(nii_file_name, thin_mask): nii = nib.load(nii_file_name) nii_data = np.asanyarray(nii.dataobj).T nii_data_masked = nii_data[:, thin_mask] return nii_data_masked # Check that all participants were presented the same subtasks in the same order in the motor stimulus def check_subtask_consistency(num_participants, data_file_rows, task_name): #can use this function for other HCP 3T tasks block_order_motor_task = pd.DataFrame(np.zeros((num_participants, data_file_rows))) count = 0 for d in glob("../../data/HCP_3T_Task/*"): if d != "../../data/HCP_3T_Task/pre_processed": for file in os.listdir(d + "../../data/MNINonLinear/Results/" + task_name + "/"): if fnmatch.fnmatch(file, "*_TAB.txt"): data_file = pd.read_csv("../../data/HCP_3T_Task/" + d + "/MNINonLinear/Results/" + task_name + "/" + file, delimiter = "\t") block_order_motor_task.iloc[count, :] = data_file["BlockType"] count += 1 ## check if any columns (subtasks) differ subset_block_order_motor_task = block_order_motor_task.iloc[0:count,:] if subset_block_order_motor_task[subset_block_order_motor_task.columns[subset_block_order_motor_task.apply(lambda s: len(s.unique()) > 1)]].shape[1] > 0: print("For at least 1 participant 1 of the subtasks differs from the other participants. Will need to further investigate the task to continue") else: print("Check complete, can proceed with pre-processing data") def get_timing_RL(timing, first_task, data_file): start_time = "{}Cue.OnsetTime".format(first_task) start_values = data_file[start_time].dropna().unique() timing[sub_idx, 1] = start_values[0] timing[sub_idx, 3] = start_values[1] trs_start_collecting = data_file["CountDownSlide.OnsetTime"] timing[sub_idx, 4] = trs_start_collecting[0] # fixation time - 1st fixation time and 3rd fixation time fixation_onsets = data_file["Fixdot.OnsetTime"].dropna().unique() timing[sub_idx, 8] = fixation_onsets[0] timing[sub_idx, 9] = fixation_onsets[2] return timing def get_timing_LR(timing, first_train_task, first_test_task, data_file): start_time_train = "{}Cue.OnsetTime".format(first_train_task) start_time_test = "{}Cue.OnsetTime".format(first_test_task) start_values_train = data_file[start_time_train].dropna().unique() start_values_test = data_file[start_time_test].dropna().unique() timing[sub_idx, 1] = start_values_train[0] timing[sub_idx, 3] = start_values_test[1] trs_start_collecting = data_file["CountDownSlide.OnsetTime"] timing[sub_idx, 4] = trs_start_collecting[0] # fixation time - 2nd fixation time and 3rd fixation time fixation_onsets = data_file["Fixdot.OnsetTime"].dropna().unique() timing[sub_idx, 8] = fixation_onsets[1] timing[sub_idx, 9] = fixation_onsets[2] return timing def get_motor_task_cue_timing(subject_list, run, last_task): # function for RL or LR encoding of fMRI scan timing = np.zeros((len(subject_list), 12)) sub_without_motor = list() sub_no_tab_file = list() for sub_idx, sub in enumerate(subject_list): d = "../../data/HCP_3T_Task/{}".format(sub) timing[sub_idx, 0] = sub if os.path.isdir(d): for file in os.listdir("{dir_name}/MNINonLinear/Results/{run_name}/".format(dir_name = d, run_name = run)): if fnmatch.fnmatch(file, "*_TAB.txt"): data_file = pd.read_csv("{dir_name}/MNINonLinear/Results/{run_name}/{file_name}".format(dir_name=d, run_name = run, file_name = file), delimiter = "\t") cue_idx = 0 if run contains "RL": timing = get_timing_RL(timing, "LeftHand", data_file) elif run contains "LR": timing = get_timing_LR(timing, "RightHand", "Tongue", data_file) else: # if tab file doesn't exist even though fMRI data exists sub_no_tab_file.append(sub) if os.path.isfile("{dir_name}/MNINonLinear/Results/{run_name}/EVs/{last_task_name}.txt".format(dir_name = d, run_name = run, last_task_name = last_task)): #ev file exists last_task_file = pd.read_csv("{dir_name}/MNINonLinear/Results/{run_name}/EVs/{last_task_name}.txt".format(dir_name = d, run_name = run, last_task_name = last_task), delimiter = "\t") timing[sub_idx, 2] = last_task_file.iloc[-1, 0] else: print("sub {} no ev file".format(sub)) else: sub_without_motor.append(sub) # rescale timing: need to remove the countDownSlide.OnsetTime which is when TRs started being recorded to make # sure timing is in line with tr recording timing[:, 5] = (timing[:, 1] - timing[:, 4]) / 1000 #timing was in milliseconds --> seconds timing[:, 6] = (timing[:, 2] + 12) # time was in seconds timing[:, 7] = (timing[:, 3] - timing[:, 4]) / 1000 #timing was in milliseconds timing[:, 10] = (timing[:, 8] - timing[:, 4]) / 1000 #timing was in milliseconds timing[:, 11] = (timing[:, 9] - timing[:, 4]) / 1000 #timing was in milliseconds return timing, sub_without_motor, sub_no_tab_file def get_motor_task_cue_timing_from_evs(timing_file, subjects_no_tab_file, all_subjects, run, last_task_name): for sub in subjects_no_tab_file: sub_idx = all_subjects.index(sub) # get from idx in sub list d = "../../data/HCP_3T_Task/{}".format(sub) if os.path.isdir(d): cue_file = "{dir_name}/MNINonLinear/Results/{run_name}/EVs/cue.txt".format(dir_name = d, run_name = run) last_task_file = "{dir_name}/MNINonLinear/Results/{run_name}/EVs/{short_task_name}.txt".format(dir_name = d, run_name = run, short_task_name = last_task_name) if os.path.isfile(cue_file): cue = pd.read_csv(cue_file, delimiter = "\t", header = None) cue_times = cue.iloc[:, 0] timing_file[sub_idx, 1] = cue_times.iloc[0] timing_file[sub_idx, 3] = cue_times.iloc[5] if os.path.isfile(last_task_file): last_task = pd.read_csv(last_task_file, delimiter = "\t") last_task_times = last_task.iloc[:, 0] timing_file[sub_idx, 2] = last_task_times.iloc[-1] # timing in ev files is already 0 indexed - as in 0 is start of when TRs collected # to keep timing matrix consistent with matrix from get_motor_task_cue_timing function # just copied these times to later cols timing_file[sub_idx, 5] = timing_file[sub_idx, 1] timing_file[sub_idx, 6] = timing_file[sub_idx, 2] + 12 timing_file[sub_idx, 7] = timing_file[sub_idx, 3] return timing_file
12,058
4,398