content stringlengths 7 1.05M | fixed_cases stringlengths 1 1.28M |
|---|---|
class Point:
def __init__(self, x, y):
self.x = x
self.y = y
def recOverlap(l1, r1, l2, r2):
# if rectangle is to the left side of one another
if (l1.x >= r2.x) or (l2.x >= r1.x):
print('hi')
return False
# if rectangle is one above the other
if (l1.y <= r2.y) or (l2.y <= r1.y):
print('yo')
return False
return True
if __name__ == "__main__":
l1 = Point(0, 10)
r1 = Point(10, 0)
l2 = Point(5, 5)
r2 = Point(15, 0)
if recOverlap(l1, r1, l2, r2):
print("Overlap")
else:
print('Do not overlap') | class Point:
def __init__(self, x, y):
self.x = x
self.y = y
def rec_overlap(l1, r1, l2, r2):
if l1.x >= r2.x or l2.x >= r1.x:
print('hi')
return False
if l1.y <= r2.y or l2.y <= r1.y:
print('yo')
return False
return True
if __name__ == '__main__':
l1 = point(0, 10)
r1 = point(10, 0)
l2 = point(5, 5)
r2 = point(15, 0)
if rec_overlap(l1, r1, l2, r2):
print('Overlap')
else:
print('Do not overlap') |
# uncompyle6 version 3.7.4
# Python bytecode 3.7 (3394)
# Decompiled from: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)]
# Embedded file name: T:\InGame\Gameplay\Scripts\Server\postures\posture_errors.py
# Compiled at: 2018-02-21 00:22:03
# Size of source mod 2**32: 1046 bytes
class PostureGraphError(Exception):
pass
class PostureGraphBoundaryConditionError(PostureGraphError):
pass
class PostureGraphMiddlePathError(PostureGraphError):
pass | class Posturegrapherror(Exception):
pass
class Posturegraphboundaryconditionerror(PostureGraphError):
pass
class Posturegraphmiddlepatherror(PostureGraphError):
pass |
#!/usr/bin/python3
# Constants
DEPTH = 256
NUM_REGISTERS = 8
# Read assembly code from code.txt
with open("code.txt", 'r') as f:
lines = f.readlines()
# Initialize machine code
machineCode = ["0000"]
# Initialize maps
# Memory isn't really a register but acts like one
regMap = {'prefix' : 0, 'a' : 1, 'b' : 2, 'c' : 3, 'd' : 4, 'e' : 5, 'f' : 6, 'pc' : NUM_REGISTERS-1, 'memory' : NUM_REGISTERS+4}
jumpsMap = {'equal' : NUM_REGISTERS, 'unequal' : NUM_REGISTERS+1, 'lt' : NUM_REGISTERS+2, 'gt' : NUM_REGISTERS+3}
labels = {}
# Interpret assembly code and generate machine code
# Could be simplified with more dictionaries at a later date
for i in range(0,len(lines)):
line = lines[i].strip()
if (len(line) == 0 or line[0] == "#"):
continue
cols = line.split()
if (("set" == cols[0]) and (len(cols) < 4)):
if cols[2] in labels:
mc = 0x8000 | (regMap[cols[1]] << 8) | labels[cols[2]]
else:
mc = 0x8000 | (regMap[cols[1]] << 8) | int(cols[2])
machineCode.append(f'{mc:04X}')
elif (("set" == cols[0]) and (len(cols) >= 4)):
if cols[2] in labels:
mc = 0x8000 | (jumpsMap[cols[4]] << 8) | labels[cols[2]]
else:
mc = 0x8000 | (jumpsMap[cols[4]] << 8) | int(cols[2])
machineCode.append(f'{mc:04X}')
elif "nop" == cols[0]:
machineCode.append("0000")
elif "inc" == cols[0]:
mc = 0x0089 | (regMap[cols[1]] << 8)
machineCode.append(f'{mc:04X}')
elif "dec" == cols[0]:
mc = 0x008A | (regMap[cols[1]] << 8)
machineCode.append(f'{mc:04X}')
elif "label" == cols[0]:
labels[cols[1]] = len(machineCode)
elif "copy" == cols[0]:
mc = 0x0000 | (regMap[cols[3]] << 8) | regMap[cols[1]]
machineCode.append(f'{mc:04X}')
elif "add" == cols[0]:
mc = 0x0081 | (regMap[cols[1]] << 8)
machineCode.append(f'{mc:04X}')
elif "sub" == cols[0]:
mc = 0x0082 | (regMap[cols[1]] << 8)
machineCode.append(f'{mc:04X}')
elif "equal" == cols[0]:
mc = 0x0083 | (regMap[cols[1]] << 8)
machineCode.append(f'{mc:04X}')
elif "gt" == cols[0]:
mc = 0x0084 | (regMap[cols[1]] << 8)
machineCode.append(f'{mc:04X}')
elif "lt" == cols[0]:
mc = 0x0085 | (regMap[cols[1]] << 8)
machineCode.append(f'{mc:04X}')
elif "and" == cols[0]:
mc = 0x0086 | (regMap[cols[1]] << 8)
machineCode.append(f'{mc:04X}')
elif "or" == cols[0]:
mc = 0x0087 | (regMap[cols[1]] << 8)
machineCode.append(f'{mc:04X}')
elif "xor" == cols[0]:
mc = 0x0088 | (regMap[cols[1]] << 8)
machineCode.append(f'{mc:04X}')
elif "shiftleft" == cols[0]:
mc = 0x008B | (regMap[cols[1]] << 8)
machineCode.append(f'{mc:04X}')
elif "shiftright" == cols[0]:
mc = 0x008C | (regMap[cols[1]] << 8)
machineCode.append(f'{mc:04X}')
else:
print("Unknown: " + line)
# Write machine code to instructions.txt
with open("instructions.txt", 'w') as f:
for line in machineCode:
f.write("%s\n" % line)
for i in range(0, DEPTH - len(machineCode) + 1):
f.write("0000\n") | depth = 256
num_registers = 8
with open('code.txt', 'r') as f:
lines = f.readlines()
machine_code = ['0000']
reg_map = {'prefix': 0, 'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5, 'f': 6, 'pc': NUM_REGISTERS - 1, 'memory': NUM_REGISTERS + 4}
jumps_map = {'equal': NUM_REGISTERS, 'unequal': NUM_REGISTERS + 1, 'lt': NUM_REGISTERS + 2, 'gt': NUM_REGISTERS + 3}
labels = {}
for i in range(0, len(lines)):
line = lines[i].strip()
if len(line) == 0 or line[0] == '#':
continue
cols = line.split()
if 'set' == cols[0] and len(cols) < 4:
if cols[2] in labels:
mc = 32768 | regMap[cols[1]] << 8 | labels[cols[2]]
else:
mc = 32768 | regMap[cols[1]] << 8 | int(cols[2])
machineCode.append(f'{mc:04X}')
elif 'set' == cols[0] and len(cols) >= 4:
if cols[2] in labels:
mc = 32768 | jumpsMap[cols[4]] << 8 | labels[cols[2]]
else:
mc = 32768 | jumpsMap[cols[4]] << 8 | int(cols[2])
machineCode.append(f'{mc:04X}')
elif 'nop' == cols[0]:
machineCode.append('0000')
elif 'inc' == cols[0]:
mc = 137 | regMap[cols[1]] << 8
machineCode.append(f'{mc:04X}')
elif 'dec' == cols[0]:
mc = 138 | regMap[cols[1]] << 8
machineCode.append(f'{mc:04X}')
elif 'label' == cols[0]:
labels[cols[1]] = len(machineCode)
elif 'copy' == cols[0]:
mc = 0 | regMap[cols[3]] << 8 | regMap[cols[1]]
machineCode.append(f'{mc:04X}')
elif 'add' == cols[0]:
mc = 129 | regMap[cols[1]] << 8
machineCode.append(f'{mc:04X}')
elif 'sub' == cols[0]:
mc = 130 | regMap[cols[1]] << 8
machineCode.append(f'{mc:04X}')
elif 'equal' == cols[0]:
mc = 131 | regMap[cols[1]] << 8
machineCode.append(f'{mc:04X}')
elif 'gt' == cols[0]:
mc = 132 | regMap[cols[1]] << 8
machineCode.append(f'{mc:04X}')
elif 'lt' == cols[0]:
mc = 133 | regMap[cols[1]] << 8
machineCode.append(f'{mc:04X}')
elif 'and' == cols[0]:
mc = 134 | regMap[cols[1]] << 8
machineCode.append(f'{mc:04X}')
elif 'or' == cols[0]:
mc = 135 | regMap[cols[1]] << 8
machineCode.append(f'{mc:04X}')
elif 'xor' == cols[0]:
mc = 136 | regMap[cols[1]] << 8
machineCode.append(f'{mc:04X}')
elif 'shiftleft' == cols[0]:
mc = 139 | regMap[cols[1]] << 8
machineCode.append(f'{mc:04X}')
elif 'shiftright' == cols[0]:
mc = 140 | regMap[cols[1]] << 8
machineCode.append(f'{mc:04X}')
else:
print('Unknown: ' + line)
with open('instructions.txt', 'w') as f:
for line in machineCode:
f.write('%s\n' % line)
for i in range(0, DEPTH - len(machineCode) + 1):
f.write('0000\n') |
# Given a binary tree, find the length of the longest consecutive sequence path.
#
# The path refers to any sequence of nodes from some starting node to any node in the tree along the parent-child connections. The longest consecutive path need to be from parent to child (cannot be the reverse).
#
# For example,
#
# 1
# \
# 3
# / \
# 2 4
# \
# 5
# Longest consecutive sequence path is 3-4-5, so return 3.
#
# 2
# \
# 3
# /
# 2
# /
# 1
# Longest consecutive sequence path is 2-3,not3-2-1, so return 2.
# V0
class Solution(object):
def longestConsecutive(self, root):
if not root:
return 0
self.result = 0
self.helper(root, 1)
return self.result
def helper(self, root, curLen):
self.result = curLen if curLen > self.result else self.result
if root.left:
if root.left.val == root.val + 1:
self.helper(root.left, curLen + 1)
else:
self.helper(root.left, 1)
if root.right:
if root.right.val == root.val + 1:
self.helper(root.right, curLen + 1)
else:
self.helper(root.right, 1)
# V1
# https://www.jianshu.com/p/ebabdeed9bca
# IDEA : DFS
class Solution(object):
def longestConsecutive(self, root):
"""
:type root: TreeNode
:rtype: int
"""
if not root:
return 0
self.result = 0
self.helper(root, 1)
return self.result
def helper(self, root, curLen):
self.result = curLen if curLen > self.result else self.result
if root.left:
if root.left.val == root.val + 1:
self.helper(root.left, curLen + 1)
else:
self.helper(root.left, 1)
if root.right:
if root.right.val == root.val + 1:
self.helper(root.right, curLen + 1)
else:
self.helper(root.right, 1)
### Test case : dev
# V1'
# https://eugenejw.github.io/2017/08/leetcode-298
# IDEA : DFS
class Solution(object):
def __init__(self):
self.ret = 0
def longestConsecutive(self, root):
"""
:type root: TreeNode
:rtype: int
:algorithm: Pre-order DFS, O(n)
:runtimr: 188ms
"""
if not root:
return 0
self.dfs(root, 1)
return self.ret
def dfs(self, root, carry):
"""
:type root: TreeNode
:rtype: void
"""
self.ret = max(self.ret, carry)
if root.left:
if root.left.val - 1 == root.val:
self.dfs(root.left, carry+1)
else:
self.dfs(root.left, 1)
if root.right:
if root.right.val - 1 == root.val:
self.dfs(root.right, carry+1)
else:
self.dfs(root.right, 1)
# V1
# https://blog.csdn.net/qq508618087/article/details/50883425
# JAVA
# /**
# * Definition for a binary tree node.
# * struct TreeNode {
# * int val;
# * TreeNode *left;
# * TreeNode *right;
# * TreeNode(int x) : val(x), left(NULL), right(NULL) {}
# * };
# */
# class Solution {
# public:
# void DFS(TreeNode* root, int pre, int len, int& Max)
# {
# if(!root) return;
# len = (root->val==pre+1)?len+1:1;
# Max = max(Max, len);
# DFS(root->left, root->val, len, Max);
# DFS(root->right, root->val, len, Max);
# }
#
# int longestConsecutive(TreeNode* root) {
# if(!root) return 0;
# int Max = 1;
# DFS(root, root->val, 0, Max);
# return Max;
# }
# };
# V2
# Time: O(n)
# Space: O(h)
class Solution(object):
def longestConsecutive(self, root):
"""
:type root: TreeNode
:rtype: int
"""
self.max_len = 0
def longestConsecutiveHelper(root):
if not root:
return 0
left_len = longestConsecutiveHelper(root.left)
right_len = longestConsecutiveHelper(root.right)
cur_len = 1
if root.left and root.left.val == root.val + 1:
cur_len = max(cur_len, left_len + 1)
if root.right and root.right.val == root.val + 1:
cur_len = max(cur_len, right_len + 1)
self.max_len = max(self.max_len, cur_len)
return cur_len
longestConsecutiveHelper(root)
return self.max_len
| class Solution(object):
def longest_consecutive(self, root):
if not root:
return 0
self.result = 0
self.helper(root, 1)
return self.result
def helper(self, root, curLen):
self.result = curLen if curLen > self.result else self.result
if root.left:
if root.left.val == root.val + 1:
self.helper(root.left, curLen + 1)
else:
self.helper(root.left, 1)
if root.right:
if root.right.val == root.val + 1:
self.helper(root.right, curLen + 1)
else:
self.helper(root.right, 1)
class Solution(object):
def longest_consecutive(self, root):
"""
:type root: TreeNode
:rtype: int
"""
if not root:
return 0
self.result = 0
self.helper(root, 1)
return self.result
def helper(self, root, curLen):
self.result = curLen if curLen > self.result else self.result
if root.left:
if root.left.val == root.val + 1:
self.helper(root.left, curLen + 1)
else:
self.helper(root.left, 1)
if root.right:
if root.right.val == root.val + 1:
self.helper(root.right, curLen + 1)
else:
self.helper(root.right, 1)
class Solution(object):
def __init__(self):
self.ret = 0
def longest_consecutive(self, root):
"""
:type root: TreeNode
:rtype: int
:algorithm: Pre-order DFS, O(n)
:runtimr: 188ms
"""
if not root:
return 0
self.dfs(root, 1)
return self.ret
def dfs(self, root, carry):
"""
:type root: TreeNode
:rtype: void
"""
self.ret = max(self.ret, carry)
if root.left:
if root.left.val - 1 == root.val:
self.dfs(root.left, carry + 1)
else:
self.dfs(root.left, 1)
if root.right:
if root.right.val - 1 == root.val:
self.dfs(root.right, carry + 1)
else:
self.dfs(root.right, 1)
class Solution(object):
def longest_consecutive(self, root):
"""
:type root: TreeNode
:rtype: int
"""
self.max_len = 0
def longest_consecutive_helper(root):
if not root:
return 0
left_len = longest_consecutive_helper(root.left)
right_len = longest_consecutive_helper(root.right)
cur_len = 1
if root.left and root.left.val == root.val + 1:
cur_len = max(cur_len, left_len + 1)
if root.right and root.right.val == root.val + 1:
cur_len = max(cur_len, right_len + 1)
self.max_len = max(self.max_len, cur_len)
return cur_len
longest_consecutive_helper(root)
return self.max_len |
# coding=utf-8
# Author: Jianghan LI
# Question: 066.Plus_One
# Complexity: O(N)
# Date: 2017-08-02 10:51-10:53, 0 wrong try
class Solution(object):
def plusOne(self, digits):
for i in range(len(digits)):
if digits[-1 - i] < 9:
return digits[:-1 - i] + [digits[-1 - i] + 1] + [0] * i
return [1] + [0] * len(0)
def plusOne(self, digits):
for i in range(len(digits)):
if digits[-1 - i] < 9:
digits[-1 - i] += 1
return digits
digits[-1 - i] = 0
return [1] + digits
def plusOne(self, digits):
return (digits[:-1] + [digits[-1] + 1] if digits[-1] < 9 else self.plusOne(digits[:-1]) + [0]) if digits else [1]
| class Solution(object):
def plus_one(self, digits):
for i in range(len(digits)):
if digits[-1 - i] < 9:
return digits[:-1 - i] + [digits[-1 - i] + 1] + [0] * i
return [1] + [0] * len(0)
def plus_one(self, digits):
for i in range(len(digits)):
if digits[-1 - i] < 9:
digits[-1 - i] += 1
return digits
digits[-1 - i] = 0
return [1] + digits
def plus_one(self, digits):
return (digits[:-1] + [digits[-1] + 1] if digits[-1] < 9 else self.plusOne(digits[:-1]) + [0]) if digits else [1] |
"""
inits node 'game_move'
note: stub, does not check for unreachable, relies on simulation
through `setStringSignal("move", -)` then wait for 2s
@ros_param
/game/move/skip_move_validation: bool
should goal move be checked for validity?
default: false (do NOT skip validation)
/game/tower{name}/{x|y|z}: double
[do_move.py] to get the destination tower's position
@ros_sub
/game/state: hanoying_back/GameState
used when validating a move (needed for /game/solve/valid)
[do_move.py] to get the source disk's position
@ros_call
/game/solve/valid: hanoying_back/GameSolveValidate
use to check move validity (if not set to skip)
@ros_action_server
/game/move: hanoying_back/GameMoveAction
processes a game move and reacts accordingly by
moving the robot arm
```GameMove.action'[towers of Hanoi]
string disk # move disk..
string tower # ..to tower
geometry_msgs/Point floating_point # if tower=="floating",
# tries to reach this position
---
bool success # if success==False, refer to reason
int8 reason # -128: aborted/preempted, 0: none, 1: goal not valid,
# 2: disk unreachable, 4: tower unreachable,
# 8: point unreachable
---
float32 percent
geometry_msgs/Transform wrist # maybe?
```
"""
| """
inits node 'game_move'
note: stub, does not check for unreachable, relies on simulation
through `setStringSignal("move", -)` then wait for 2s
@ros_param
/game/move/skip_move_validation: bool
should goal move be checked for validity?
default: false (do NOT skip validation)
/game/tower{name}/{x|y|z}: double
[do_move.py] to get the destination tower's position
@ros_sub
/game/state: hanoying_back/GameState
used when validating a move (needed for /game/solve/valid)
[do_move.py] to get the source disk's position
@ros_call
/game/solve/valid: hanoying_back/GameSolveValidate
use to check move validity (if not set to skip)
@ros_action_server
/game/move: hanoying_back/GameMoveAction
processes a game move and reacts accordingly by
moving the robot arm
```GameMove.action'[towers of Hanoi]
string disk # move disk..
string tower # ..to tower
geometry_msgs/Point floating_point # if tower=="floating",
# tries to reach this position
---
bool success # if success==False, refer to reason
int8 reason # -128: aborted/preempted, 0: none, 1: goal not valid,
# 2: disk unreachable, 4: tower unreachable,
# 8: point unreachable
---
float32 percent
geometry_msgs/Transform wrist # maybe?
```
""" |
coluna = int(input('Entre com a quantidade de colunas '))
contador = 0
linha = int(input('Entre com a quantidade de linhas '))
for i in range (1, linha + 1):
for i in range (1, coluna + 1):
contador += 1
print(contador, end=' ')
print() | coluna = int(input('Entre com a quantidade de colunas '))
contador = 0
linha = int(input('Entre com a quantidade de linhas '))
for i in range(1, linha + 1):
for i in range(1, coluna + 1):
contador += 1
print(contador, end=' ')
print() |
#!/usr/bin/env python3
#Take input from the user in celsius, convert to Fahrenheit and
#use if logic to give feedback regarding the temperature
def main():
temp_celsius = float(input("What is the temperature in Celsius?: "))
f = convert_celsius_to_fahrenheit(temp_celsius)
if f > 80:
print("It's hot outside with a temperature of " + str(f) + " degrees F")
elif f < 40:
print("It's cold outside with a temperature of " + str(f) + " degrees F")
else:
print("It's " + str(f) + " degrees F outside")
def convert_celsius_to_fahrenheit(temp_celsius):
temp_fahrenheit = temp_celsius * 1.8 + 32
return temp_fahrenheit
main() | def main():
temp_celsius = float(input('What is the temperature in Celsius?: '))
f = convert_celsius_to_fahrenheit(temp_celsius)
if f > 80:
print("It's hot outside with a temperature of " + str(f) + ' degrees F')
elif f < 40:
print("It's cold outside with a temperature of " + str(f) + ' degrees F')
else:
print("It's " + str(f) + ' degrees F outside')
def convert_celsius_to_fahrenheit(temp_celsius):
temp_fahrenheit = temp_celsius * 1.8 + 32
return temp_fahrenheit
main() |
print("Enter Two Numbers, And I'll sum It")
try:
first_num = int(input("\nFirst number - "))
sec_num = int(input("\nSecond number - "))
except ValueError:
print("you have entered wrong value!!")
else:
answer = first_num + sec_num
print(answer) | print("Enter Two Numbers, And I'll sum It")
try:
first_num = int(input('\nFirst number - '))
sec_num = int(input('\nSecond number - '))
except ValueError:
print('you have entered wrong value!!')
else:
answer = first_num + sec_num
print(answer) |
name = "rezutil"
version = "1.4.5"
# build with bez build system
build_command = "python {root}/rezbuild.py"
private_build_requires = ["python-2.7+<4"]
def commands():
env = globals()["env"]
env.PYTHONPATH.prepend("{root}/python")
| name = 'rezutil'
version = '1.4.5'
build_command = 'python {root}/rezbuild.py'
private_build_requires = ['python-2.7+<4']
def commands():
env = globals()['env']
env.PYTHONPATH.prepend('{root}/python') |
# Copyright (c) 2010-2013, Regents of the University of California.
# All rights reserved.
#
# Released under the BSD 3-Clause license as published at the link below.
# https://openwsn.atlassian.net/wiki/display/OW/License
class ParserException(Exception):
GENERIC = 1
TOO_SHORT = 2
WRONG_LENGTH = 3
UNKNOWN_OPTION = 4
NO_KEY = 5
DESERIALIZE = 6
descriptions = {
GENERIC: 'generic parsing error',
TOO_SHORT: 'input too short',
WRONG_LENGTH: 'input of the wrong length',
UNKNOWN_OPTION: 'no parser key',
NO_KEY: 'no key',
DESERIALIZE: 'deserialization error',
}
def __init__(self,errorCode,details=None):
self.errorCode = errorCode
self.details = details
def __str__(self):
try:
output = self.descriptions[self.errorCode]
if self.details:
output += ': ' + str(self.details)
return output
except KeyError:
return "Unknown error: #" + str(self.errorCode) | class Parserexception(Exception):
generic = 1
too_short = 2
wrong_length = 3
unknown_option = 4
no_key = 5
deserialize = 6
descriptions = {GENERIC: 'generic parsing error', TOO_SHORT: 'input too short', WRONG_LENGTH: 'input of the wrong length', UNKNOWN_OPTION: 'no parser key', NO_KEY: 'no key', DESERIALIZE: 'deserialization error'}
def __init__(self, errorCode, details=None):
self.errorCode = errorCode
self.details = details
def __str__(self):
try:
output = self.descriptions[self.errorCode]
if self.details:
output += ': ' + str(self.details)
return output
except KeyError:
return 'Unknown error: #' + str(self.errorCode) |
# Definition for singly-linked list.
# class ListNode(object):
# def __init__(self, x):
# self.val = x
# self.next = None
class Solution(object):
def isPalindrome(self, head):
"""
:type head: ListNode
:rtype: bool
"""
if head is None or head.next is None:
return True
# find the mid point
p1, p2 = head, head
while p2.next and p2.next.next:
p1 = p1.next
p2 = p2.next.next
# reverse right part
first, reverse = p1.next, None
while first:
second = first.next
first.next = reverse
reverse = first
first = second
left, right = head, reverse
while right and right.val == left.val:
left, right = left.next, right.next
return right is None
| class Solution(object):
def is_palindrome(self, head):
"""
:type head: ListNode
:rtype: bool
"""
if head is None or head.next is None:
return True
(p1, p2) = (head, head)
while p2.next and p2.next.next:
p1 = p1.next
p2 = p2.next.next
(first, reverse) = (p1.next, None)
while first:
second = first.next
first.next = reverse
reverse = first
first = second
(left, right) = (head, reverse)
while right and right.val == left.val:
(left, right) = (left.next, right.next)
return right is None |
input = """
true.
a(1) :- true.
b(1) :- true.
gen1 :- not a(1).
gen2 :- not b(1).
%%%%%%%%%%%%%%%%%%%%%%
unrel | a(2).
gen3 :- unrel.
gen3 :- gen1.
a(2) :- not gen3.
gen4 :- gen2.
b(2) :- not gen4.
"""
output = """
true.
a(1) :- true.
b(1) :- true.
gen1 :- not a(1).
gen2 :- not b(1).
%%%%%%%%%%%%%%%%%%%%%%
unrel | a(2).
gen3 :- unrel.
gen3 :- gen1.
a(2) :- not gen3.
gen4 :- gen2.
b(2) :- not gen4.
"""
| input = '\ntrue.\na(1) :- true.\nb(1) :- true.\n\ngen1 :- not a(1).\ngen2 :- not b(1).\n\n%%%%%%%%%%%%%%%%%%%%%%\n\nunrel | a(2).\ngen3 :- unrel.\n\ngen3 :- gen1.\na(2) :- not gen3.\n\ngen4 :- gen2.\nb(2) :- not gen4.\n\n'
output = '\ntrue.\na(1) :- true.\nb(1) :- true.\n\ngen1 :- not a(1).\ngen2 :- not b(1).\n\n%%%%%%%%%%%%%%%%%%%%%%\n\nunrel | a(2).\ngen3 :- unrel.\n\ngen3 :- gen1.\na(2) :- not gen3.\n\ngen4 :- gen2.\nb(2) :- not gen4.\n\n' |
N = int(input())
ans = N
for i in range(N+1):
cnt = 0
t = i
while t>0:
cnt+=t%6
t//=6
j=N-i
while j>0:
cnt+=j%9
j//=9
ans = min(ans,cnt)
print(ans) | n = int(input())
ans = N
for i in range(N + 1):
cnt = 0
t = i
while t > 0:
cnt += t % 6
t //= 6
j = N - i
while j > 0:
cnt += j % 9
j //= 9
ans = min(ans, cnt)
print(ans) |
# Copyright 2018 Carsten Blank
# 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.
r"""
Expectations
############
.. currentmodule:: pennylane_qiskit.expval
In addition to the suitable default operations native to PennyLane,
the devices of the ProjectQ plugin support a number of additional expectations
that can be used alongside the native PennyLane expectations when defining
quantum functions:
.. autosummary::
.. AllPauliZ
"""
# from pennylane.operation import Expectation
# class AllPauliZ(Expectation):
# r"""Measure Pauli Z on all qubits.
# .. math:: AllPauliZ = \sigma_z \otimes\dots\otimes \sigma_z
# """
# num_params = 0
# num_wires = 0
# par_domain = None
| """
Expectations
############
.. currentmodule:: pennylane_qiskit.expval
In addition to the suitable default operations native to PennyLane,
the devices of the ProjectQ plugin support a number of additional expectations
that can be used alongside the native PennyLane expectations when defining
quantum functions:
.. autosummary::
.. AllPauliZ
""" |
"""
overly simple example of function to test with pytest
"""
def add_two_ints(first_int, second_int):
"""
function to add two numbers together
:param first_int: the first number to add together
:param second_int: the second number to add together
:return: sum of inputs, may be positive or negative
:rtype: int
"""
return first_int + second_int
| """
overly simple example of function to test with pytest
"""
def add_two_ints(first_int, second_int):
"""
function to add two numbers together
:param first_int: the first number to add together
:param second_int: the second number to add together
:return: sum of inputs, may be positive or negative
:rtype: int
"""
return first_int + second_int |
# --------------
#Code starts here
def palindrome(num):
while True:
num+=1
if str(num) == str(num)[::-1]:
return num
break
print(palindrome(123))
# --------------
#Code starts here
#Function to find anagram of one word in another
def a_scramble(str_1,str_2):
result=True
for i in (str_2.lower()):
if i not in (str_1.lower()):
result=False
break
str_1=str_1.replace(i,'',1) #Removing the letters from str_1 that are already checked
return (result)
#Code ends here
# --------------
#Code starts here
def check_fib(num):
if num == 0: return False
elif num == 1: return True
else:
A = 1
B = 1
FLIP = True
while(True):
new = A + B
if new > num: return False
elif new == num: return True
else:
if(FLIP):
A = new
FLIP = not FLIP
else:
B = new
FLIP = not FLIP
# --------------
def compress(word):
word = word.lower()
if len(word) == 0:
return None
final_arr = []
index = 0
letter = word[0]
for el in word:
if el == letter and ord(el) == ord(letter):
index += 1
else:
final_arr.append(letter + repr(index))
letter = el
index = 1
final_arr.append(letter + repr(index))
return "".join(final_arr)
print(compress("xxcccdex"))
# --------------
#Code starts here
def k_distinct(string,k):
string = string.lower()
if len(list(set(string))) == k:
return True
else:
return False
print(k_distinct('SUBBOOKKEEPER',8))
#Code ends here
| def palindrome(num):
while True:
num += 1
if str(num) == str(num)[::-1]:
return num
break
print(palindrome(123))
def a_scramble(str_1, str_2):
result = True
for i in str_2.lower():
if i not in str_1.lower():
result = False
break
str_1 = str_1.replace(i, '', 1)
return result
def check_fib(num):
if num == 0:
return False
elif num == 1:
return True
else:
a = 1
b = 1
flip = True
while True:
new = A + B
if new > num:
return False
elif new == num:
return True
elif FLIP:
a = new
flip = not FLIP
else:
b = new
flip = not FLIP
def compress(word):
word = word.lower()
if len(word) == 0:
return None
final_arr = []
index = 0
letter = word[0]
for el in word:
if el == letter and ord(el) == ord(letter):
index += 1
else:
final_arr.append(letter + repr(index))
letter = el
index = 1
final_arr.append(letter + repr(index))
return ''.join(final_arr)
print(compress('xxcccdex'))
def k_distinct(string, k):
string = string.lower()
if len(list(set(string))) == k:
return True
else:
return False
print(k_distinct('SUBBOOKKEEPER', 8)) |
'''Simple logger for information and debugging
Used when connected to the microcontroller (e.g. Pyboard) and monitoring the
code via the REPL
'''
class Logger:
def __init__(self, prestring='JETI EX BUS'):
self.default_prestring = prestring
self.prestring = prestring
def log(self, msg_type, message):
# define different debug levels for print statements to the REPL
header = {'info': self.prestring + ' - INFO: ',
'debug': self.prestring + ' - DEBUG: '}
print(header[msg_type] + message)
def empty(self):
print(' ')
def setPreString(self, prestring):
self.prestring = prestring
def resetPreString(self):
self.prestring = self.default_prestring
| """Simple logger for information and debugging
Used when connected to the microcontroller (e.g. Pyboard) and monitoring the
code via the REPL
"""
class Logger:
def __init__(self, prestring='JETI EX BUS'):
self.default_prestring = prestring
self.prestring = prestring
def log(self, msg_type, message):
header = {'info': self.prestring + ' - INFO: ', 'debug': self.prestring + ' - DEBUG: '}
print(header[msg_type] + message)
def empty(self):
print(' ')
def set_pre_string(self, prestring):
self.prestring = prestring
def reset_pre_string(self):
self.prestring = self.default_prestring |
class MoveLog:
def __init__(self):
self.moves = []
self.count = 0
def add(self, move):
self.moves.append(move)
self.count += 1
def pop(self):
self.count -= 1
return self.moves.pop()
def count(self):
return self.count
def reset(self):
self.moves = []
self.count = 0
| class Movelog:
def __init__(self):
self.moves = []
self.count = 0
def add(self, move):
self.moves.append(move)
self.count += 1
def pop(self):
self.count -= 1
return self.moves.pop()
def count(self):
return self.count
def reset(self):
self.moves = []
self.count = 0 |
t = int(input())
while t:
A = input()
B = input()
f = False;
for i in A:
if i in B:
f = True;
break;
if f == True:
print("Yes")
else:
print("No")
t = t-1 | t = int(input())
while t:
a = input()
b = input()
f = False
for i in A:
if i in B:
f = True
break
if f == True:
print('Yes')
else:
print('No')
t = t - 1 |
k = int(input().split(' ')[1])
words = input().split(' ')
currentLine = []
for word in words:
currentLine.append(word)
if len(''.join(currentLine)) > k:
currentLine.pop()
print(' '.join(currentLine))
currentLine = [word]
print(' '.join(currentLine))
| k = int(input().split(' ')[1])
words = input().split(' ')
current_line = []
for word in words:
currentLine.append(word)
if len(''.join(currentLine)) > k:
currentLine.pop()
print(' '.join(currentLine))
current_line = [word]
print(' '.join(currentLine)) |
#if customizations are required when doing a a linking of the jpackage code to the OS
def main(j,jp,force=True):
recipe=jp.getCodeMgmtRecipe()
recipe.link(force=force)
| def main(j, jp, force=True):
recipe = jp.getCodeMgmtRecipe()
recipe.link(force=force) |
#Python 3.X solution for Easy Challenge #0005
#GitHub: https://github.com/Ashkore
#https://www.reddit.com/user/Ashkoree/
def program(username):
print ("Hello "+username)
def login(username,password):
validuser = False
validpass = False
with open("usernames.txt","r") as usernamefile:
usernamelist = usernamefile.readlines()
#clean up carrige returns
for x in range(len(usernamelist)):
usernamelist[x] = usernamelist[x].replace("\n","")
for usernameinfile in usernamelist:
if username == usernameinfile:
validuser = True
usernameindex = usernamelist.index(username)
with open("passwords.txt","r") as passwordfile:
passwordlist = passwordfile.readlines()
#clean up carrige returns
for x in range(len(passwordlist)):
passwordlist[x] = passwordlist[x].replace("\n","")
if password == passwordlist[usernameindex]:
validpass = True
if validuser and validpass:
return True
else:
return False
username = input("What is your username?")
password = input ("What is your password?")
valid = login(username,password)
if valid:
program(username)
else:
print("Invalid Username or Password.")
#Example of passwords.txt
# admin
# username1
# username2
#Example of usernames.txt
# admin
# password1
# password2
#Even more extra credit
#good ol admin, admin because everyone needs a default admin account... right? :P
| def program(username):
print('Hello ' + username)
def login(username, password):
validuser = False
validpass = False
with open('usernames.txt', 'r') as usernamefile:
usernamelist = usernamefile.readlines()
for x in range(len(usernamelist)):
usernamelist[x] = usernamelist[x].replace('\n', '')
for usernameinfile in usernamelist:
if username == usernameinfile:
validuser = True
usernameindex = usernamelist.index(username)
with open('passwords.txt', 'r') as passwordfile:
passwordlist = passwordfile.readlines()
for x in range(len(passwordlist)):
passwordlist[x] = passwordlist[x].replace('\n', '')
if password == passwordlist[usernameindex]:
validpass = True
if validuser and validpass:
return True
else:
return False
username = input('What is your username?')
password = input('What is your password?')
valid = login(username, password)
if valid:
program(username)
else:
print('Invalid Username or Password.') |
class CommandError(Exception):
@property
def msg(self):
if self.args:
return self.args[0]
return "An error occurred while running this command ..."
class ConverterNotFound(CommandError):
pass
class BadArgumentCount(CommandError):
def __init__(self, *args, func):
super().__init__(*args)
self.func = func
def usage(self, name: str):
return self.func.usage.format(name=name)
class ConversionError(CommandError):
msg_format = "{value} is not a valid value"
def __init__(self, value, *args, msg=None, msg_format=None):
msg = msg or (msg_format or self.msg_format).format(value=value)
super().__init__(msg, value, *args)
class CompanyNotFound(ConversionError):
msg_format = 'Company "{value}" not found'
# class CompanyNotFoundNorInt(ConversionError):
# msg_format = ''
| class Commanderror(Exception):
@property
def msg(self):
if self.args:
return self.args[0]
return 'An error occurred while running this command ...'
class Converternotfound(CommandError):
pass
class Badargumentcount(CommandError):
def __init__(self, *args, func):
super().__init__(*args)
self.func = func
def usage(self, name: str):
return self.func.usage.format(name=name)
class Conversionerror(CommandError):
msg_format = '{value} is not a valid value'
def __init__(self, value, *args, msg=None, msg_format=None):
msg = msg or (msg_format or self.msg_format).format(value=value)
super().__init__(msg, value, *args)
class Companynotfound(ConversionError):
msg_format = 'Company "{value}" not found' |
string = str(input("Enter a string. "))
def encode(string):
if not string:
return ""
x = 1
while x < len(string) and string[0] == string[x]:
x += 1
return string[0]+str(x)+encode(string[x:])
print(encode(string)) | string = str(input('Enter a string. '))
def encode(string):
if not string:
return ''
x = 1
while x < len(string) and string[0] == string[x]:
x += 1
return string[0] + str(x) + encode(string[x:])
print(encode(string)) |
class Solution:
def getMoneyAmount(self, n: int) -> int:
@lru_cache(maxsize=None)
def cost(low, high):
""" minmax algorithm:
the minimal values among all possible (worst) scenarios
"""
if low >= high:
return 0
min_cost = float('inf')
for pivot in range(low, high):
worst_scenario = pivot + max(cost(low, pivot-1), cost(pivot+1, high))
min_cost = min(min_cost, worst_scenario)
return min_cost
return cost(0, n)
class SolutionOptimized:
def getMoneyAmount(self, n: int) -> int:
@lru_cache(maxsize=None)
def cost(low, high):
if low >= high:
return 0
min_cost = float('inf')
# only consider using the right half of the elments as pivots,
# as they are the worst scenarios.
for pivot in range((low+high)//2, high):
worst_scenario = pivot + max(cost(low, pivot-1), cost(pivot+1, high))
min_cost = min(min_cost, worst_scenario)
return min_cost
return cost(1, n) | class Solution:
def get_money_amount(self, n: int) -> int:
@lru_cache(maxsize=None)
def cost(low, high):
""" minmax algorithm:
the minimal values among all possible (worst) scenarios
"""
if low >= high:
return 0
min_cost = float('inf')
for pivot in range(low, high):
worst_scenario = pivot + max(cost(low, pivot - 1), cost(pivot + 1, high))
min_cost = min(min_cost, worst_scenario)
return min_cost
return cost(0, n)
class Solutionoptimized:
def get_money_amount(self, n: int) -> int:
@lru_cache(maxsize=None)
def cost(low, high):
if low >= high:
return 0
min_cost = float('inf')
for pivot in range((low + high) // 2, high):
worst_scenario = pivot + max(cost(low, pivot - 1), cost(pivot + 1, high))
min_cost = min(min_cost, worst_scenario)
return min_cost
return cost(1, n) |
# -*- coding: utf-8 -*-
pad = '<pad>'
unk = '<unk>'
bos = '<bos>'
eos = '<eos>'
| pad = '<pad>'
unk = '<unk>'
bos = '<bos>'
eos = '<eos>' |
# Reading input file
f = open("inputs/day01.txt", "r")
lines = f.readlines()
input_numbers = list(map(lambda x: int(x.replace("\n","")), lines))
def part1(numbers):
last_num = total = 0
first_line = True
for number in numbers:
if first_line:
first_line = False
elif number > last_num:
total += 1
last_num = number
return total
def part2():
numbers = []
idx = 0
while idx < len(input_numbers):
if idx >= 2:
numbers.append(input_numbers[idx] + input_numbers[idx-1] + input_numbers[idx-2])
idx += 1
return part1(numbers)
part1(input_numbers)
part2() | f = open('inputs/day01.txt', 'r')
lines = f.readlines()
input_numbers = list(map(lambda x: int(x.replace('\n', '')), lines))
def part1(numbers):
last_num = total = 0
first_line = True
for number in numbers:
if first_line:
first_line = False
elif number > last_num:
total += 1
last_num = number
return total
def part2():
numbers = []
idx = 0
while idx < len(input_numbers):
if idx >= 2:
numbers.append(input_numbers[idx] + input_numbers[idx - 1] + input_numbers[idx - 2])
idx += 1
return part1(numbers)
part1(input_numbers)
part2() |
# MenuTitle: Compare Metrics
# -*- coding: utf-8 -*-
__doc__ = """
Compares the metrics values in all glyphs in the front font with the other opened font.
Any glyphs with differences are coloured accordingly.
"""
Glyphs.clearLog()
COLOR_1 = 3
COLOR_1_Name = 'Yellow'
COLOR_2 = 7
COLOR_2_Name = 'Blue'
COLOR_3 = 0
COLOR_3_Name = 'Red'
tolerence = 0
if len(Glyphs.fonts) == 2:
f1, f2 = Glyphs.fonts
for g1 in [g for g in f1.glyphs if g.export]:
m1 = f1.selectedFontMaster.id
m2 = f2.selectedFontMaster.id
g2 = f2.glyphs[g1.name]
l1 = g1.layers[m1]
try:
l2 = g2.layers[m2]
except (AttributeError, KeyError):
print('"{0}" is not in {1}'.format(g1.name, f2))
continue
if not l1.width + tolerence >= l2.width >= l1.width - tolerence:
# 'Different Width'
g1.setColorIndex_(COLOR_3)
g2.setColorIndex_(COLOR_3)
elif not l1.LSB + tolerence >= l2.LSB >= l1.LSB - tolerence:
# 'Different Left sidebearing'
g1.setColorIndex_(COLOR_1)
g2.setColorIndex_(COLOR_1)
elif not l1.RSB + tolerence >= l2.RSB >= l1.RSB - tolerence:
# 'Different Right sidebearing'
g1.setColorIndex_(COLOR_2)
g2.setColorIndex_(COLOR_2)
else:
if g1.color < 12:
g1.setColorIndex_(9223372036854775807)
if g2.color < 12:
g2.setColorIndex_(9223372036854775807)
print('{} - Different Width'.format(COLOR_3_Name))
print('{} - Different Left sidebearing'.format(COLOR_1_Name))
print('{} - Different Right sidebearing'.format(COLOR_2_Name))
Glyphs.showMacroWindow()
else:
print('Two, and only two, fonts can be open.')
| __doc__ = '\nCompares the metrics values in all glyphs in the front font with the other opened font.\nAny glyphs with differences are coloured accordingly.\n'
Glyphs.clearLog()
color_1 = 3
color_1__name = 'Yellow'
color_2 = 7
color_2__name = 'Blue'
color_3 = 0
color_3__name = 'Red'
tolerence = 0
if len(Glyphs.fonts) == 2:
(f1, f2) = Glyphs.fonts
for g1 in [g for g in f1.glyphs if g.export]:
m1 = f1.selectedFontMaster.id
m2 = f2.selectedFontMaster.id
g2 = f2.glyphs[g1.name]
l1 = g1.layers[m1]
try:
l2 = g2.layers[m2]
except (AttributeError, KeyError):
print('"{0}" is not in {1}'.format(g1.name, f2))
continue
if not l1.width + tolerence >= l2.width >= l1.width - tolerence:
g1.setColorIndex_(COLOR_3)
g2.setColorIndex_(COLOR_3)
elif not l1.LSB + tolerence >= l2.LSB >= l1.LSB - tolerence:
g1.setColorIndex_(COLOR_1)
g2.setColorIndex_(COLOR_1)
elif not l1.RSB + tolerence >= l2.RSB >= l1.RSB - tolerence:
g1.setColorIndex_(COLOR_2)
g2.setColorIndex_(COLOR_2)
else:
if g1.color < 12:
g1.setColorIndex_(9223372036854775807)
if g2.color < 12:
g2.setColorIndex_(9223372036854775807)
print('{} - Different Width'.format(COLOR_3_Name))
print('{} - Different Left sidebearing'.format(COLOR_1_Name))
print('{} - Different Right sidebearing'.format(COLOR_2_Name))
Glyphs.showMacroWindow()
else:
print('Two, and only two, fonts can be open.') |
class ComplianceAlertingException(Exception):
pass
class AwsClientException(ComplianceAlertingException):
pass
class ClientFactoryException(ComplianceAlertingException):
pass
class FilterConfigException(ComplianceAlertingException):
pass
class MissingConfigException(ComplianceAlertingException):
pass
class InvalidConfigException(ComplianceAlertingException):
pass
class NotificationMappingException(ComplianceAlertingException):
pass
class UnsupportedAuditException(ComplianceAlertingException):
pass
class UnsupportedEventException(ComplianceAlertingException):
pass
| class Compliancealertingexception(Exception):
pass
class Awsclientexception(ComplianceAlertingException):
pass
class Clientfactoryexception(ComplianceAlertingException):
pass
class Filterconfigexception(ComplianceAlertingException):
pass
class Missingconfigexception(ComplianceAlertingException):
pass
class Invalidconfigexception(ComplianceAlertingException):
pass
class Notificationmappingexception(ComplianceAlertingException):
pass
class Unsupportedauditexception(ComplianceAlertingException):
pass
class Unsupportedeventexception(ComplianceAlertingException):
pass |
def keep_while(func, items):
for item in items:
result = func(item)
if result:
yield item
| def keep_while(func, items):
for item in items:
result = func(item)
if result:
yield item |
'''
Created on 30.12.2018
@author: ED
'''
name = "PyTrinamic"
desc = "TRINAMIC's Python Technology Access Package"
def showInfo():
print(name + " - " + desc)
" motor types "
class MotorTypes():
DC = 0
BLDC = 1
DC_BLDC = 2
STEPPER = 3
DC_BLDC_STEPPER = 4 | """
Created on 30.12.2018
@author: ED
"""
name = 'PyTrinamic'
desc = "TRINAMIC's Python Technology Access Package"
def show_info():
print(name + ' - ' + desc)
' motor types '
class Motortypes:
dc = 0
bldc = 1
dc_bldc = 2
stepper = 3
dc_bldc_stepper = 4 |
IMAGE_DIR = './data'
CONTENT_IMAGE_NAME = 'octopus.jpg'
STYLE_IMAGE_NAME = 'hockney.jpg'
SIZE = 400
STEPS = 2000
DISPLAY_INTERVAL = 400
| image_dir = './data'
content_image_name = 'octopus.jpg'
style_image_name = 'hockney.jpg'
size = 400
steps = 2000
display_interval = 400 |
"""Custom Exception Classes for Phylotyper Module
"""
class PhylotyperError(Exception):
"""Basic exception for errors raised by Phylotyper modules"""
def __init__(self, subtype, msg=None):
if msg is None:
msg = "An error occured for subtype {}".format(subtype)
super(PhylotyperError, self).__init__(msg)
self.subtype = subtype
class ValuesError(PhylotyperError):
"""Unknown subtype"""
def __init__(self, subtype, msg=None):
super(PhylotyperError, self).__init__(
subtype, msg="Unrecognized subtype {}".format(subtype))
class DatabaseError(PhylotyperError):
"""Missing data in Database"""
def __init__(self, subtype, data, msg=None):
m = "Database is missing data {} for {}".format(data, subtype)
super(PhylotyperError, self).__init__(subtype, m)
self.data = data | """Custom Exception Classes for Phylotyper Module
"""
class Phylotypererror(Exception):
"""Basic exception for errors raised by Phylotyper modules"""
def __init__(self, subtype, msg=None):
if msg is None:
msg = 'An error occured for subtype {}'.format(subtype)
super(PhylotyperError, self).__init__(msg)
self.subtype = subtype
class Valueserror(PhylotyperError):
"""Unknown subtype"""
def __init__(self, subtype, msg=None):
super(PhylotyperError, self).__init__(subtype, msg='Unrecognized subtype {}'.format(subtype))
class Databaseerror(PhylotyperError):
"""Missing data in Database"""
def __init__(self, subtype, data, msg=None):
m = 'Database is missing data {} for {}'.format(data, subtype)
super(PhylotyperError, self).__init__(subtype, m)
self.data = data |
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def isValidSequence(self, root: TreeNode, arr: List[int]) -> bool:
if not root:
return False
if len(arr)==1 and root.val==arr[0] and root.left==None and root.right==None:
return True
if not arr:
return False
if root.val!=arr[0]:
return False
return self.isValidSequence(root.left, arr[1:]) or self.isValidSequence(root.right, arr[1:])
| class Solution:
def is_valid_sequence(self, root: TreeNode, arr: List[int]) -> bool:
if not root:
return False
if len(arr) == 1 and root.val == arr[0] and (root.left == None) and (root.right == None):
return True
if not arr:
return False
if root.val != arr[0]:
return False
return self.isValidSequence(root.left, arr[1:]) or self.isValidSequence(root.right, arr[1:]) |
def numLines(filename):
'telt het aantal regels in een bestand'
infile = open(filename, 'r')
lineList = infile.readlines()
infile.close()
return len(lineList)
maxNummer = 0
lineCount = 1
kaartnummers = open("kaartnummers.txt", 'a')
with open('kaartnummers.txt', 'r') as kaartnummers: # Dit is hetzelfde als kaartnummers = open("kaartnummers.txt", 'a') en hiermee open je het bestand en noem je het kaartnummers
for line in kaartnummers: #Dit loopje lees het bestand per regel en noemt het "line"
nummers = int(line.split(',')[0])
if nummers > maxNummer:
maxNummer = nummers
lineNummer = lineCount
lineCount += 1
numLines = numLines('kaartnummers.txt')
print('Deze file telt '+ str(numLines) +' regels')
print('Het grootste kaartnummer is: {} en dat staat op regel {}'.format(maxNummer, lineNummer)) | def num_lines(filename):
"""telt het aantal regels in een bestand"""
infile = open(filename, 'r')
line_list = infile.readlines()
infile.close()
return len(lineList)
max_nummer = 0
line_count = 1
kaartnummers = open('kaartnummers.txt', 'a')
with open('kaartnummers.txt', 'r') as kaartnummers:
for line in kaartnummers:
nummers = int(line.split(',')[0])
if nummers > maxNummer:
max_nummer = nummers
line_nummer = lineCount
line_count += 1
num_lines = num_lines('kaartnummers.txt')
print('Deze file telt ' + str(numLines) + ' regels')
print('Het grootste kaartnummer is: {} en dat staat op regel {}'.format(maxNummer, lineNummer)) |
nil = 0
num = 0
max = 1
cap = 'A'
low = 'a'
print('Equality : \t', nil, '= =', num, nil == num)
print('Equality : \t', cap, '= =', low, cap == low)
print('Inequality : \t', nil, '!=', max, nil != max)
| nil = 0
num = 0
max = 1
cap = 'A'
low = 'a'
print('Equality : \t', nil, '= =', num, nil == num)
print('Equality : \t', cap, '= =', low, cap == low)
print('Inequality : \t', nil, '!=', max, nil != max) |
File = open("File PROTEK/Data2.txt", "r")
dataMhs = {}
i = 1
for data in File:
dictsiji = {}
dataDict = data.split("|")
dictsiji['NIM'] = dataDict[0]
dictsiji['Nama'] = dataDict[1]
dictsiji['Alamat'] = dataDict[2].rstrip("\n")
dataMhs[i] = dictsiji
i += 1
print(dataMhs)
| file = open('File PROTEK/Data2.txt', 'r')
data_mhs = {}
i = 1
for data in File:
dictsiji = {}
data_dict = data.split('|')
dictsiji['NIM'] = dataDict[0]
dictsiji['Nama'] = dataDict[1]
dictsiji['Alamat'] = dataDict[2].rstrip('\n')
dataMhs[i] = dictsiji
i += 1
print(dataMhs) |
n, m, x, y = map(int, input().split())
horse_position = [[x,y],[x-1,y-2], [x-1, y+2], [x+1, y-2], [x+1, y+2], [x-2, y-1], [x-2, y+1], [x+2, y-1], [x+2, y+1]]
#print(horse_position)
f = [[0, 1]]
#calculating ways without hourse
for i in range(1, n+1):
f.append([1])
if ([i, 0] in horse_position):
f[i][0] = 0
#print("i = {}".format(i))
#print(f)
for j in range(1, m+1):
if (i == 1):
f[0].append(1) # add 1 to f[0][j]
if ([0, j] in horse_position):
f[0][j] = 0
f[i].append(f[i-1][j] + f[i][j-1]) # f(n,m) = f(n, m-1) + f(n-1, m)
#print("i = {}; j ={}" .format(i, j))
if ([i,j] in horse_position):
f[i][j] = 0
#print(f)
print(f[n][m])
| (n, m, x, y) = map(int, input().split())
horse_position = [[x, y], [x - 1, y - 2], [x - 1, y + 2], [x + 1, y - 2], [x + 1, y + 2], [x - 2, y - 1], [x - 2, y + 1], [x + 2, y - 1], [x + 2, y + 1]]
f = [[0, 1]]
for i in range(1, n + 1):
f.append([1])
if [i, 0] in horse_position:
f[i][0] = 0
for j in range(1, m + 1):
if i == 1:
f[0].append(1)
if [0, j] in horse_position:
f[0][j] = 0
f[i].append(f[i - 1][j] + f[i][j - 1])
if [i, j] in horse_position:
f[i][j] = 0
print(f[n][m]) |
#=================================\CONFIG./=====================================
# default System camera access code = 1, if connect with any external camera put 1,2 and so on with the no of connected cameras.
camera_no = 0
# To count the total number of people (True/False).
People_Counter = True
# Set the threshold value for total violations limit.
Threshold = 15
# Set if GPU should be used for computations; Otherwise uses the CPU by default.
USE_GPU = True
MIN_CONF = 0.3
NMS_THRESH = 0.3
#===============================================================================
| camera_no = 0
people__counter = True
threshold = 15
use_gpu = True
min_conf = 0.3
nms_thresh = 0.3 |
def get_file_type_from_extension(ext):
ext_to_file = {
'py': 'python',
'c': 'c',
'cs': 'csharp',
}
return ext_to_file.get(ext)
| def get_file_type_from_extension(ext):
ext_to_file = {'py': 'python', 'c': 'c', 'cs': 'csharp'}
return ext_to_file.get(ext) |
d = float(input('Insira distancia ser percorrida: '))
if d <= 200:
p = d * 0.50
print(f'A viagem vai custar R${p:.2f}')
else:
p = d * 0.45
print(f'A viagem vai custar R${p:.2f}') | d = float(input('Insira distancia ser percorrida: '))
if d <= 200:
p = d * 0.5
print(f'A viagem vai custar R${p:.2f}')
else:
p = d * 0.45
print(f'A viagem vai custar R${p:.2f}') |
# numeros de casos
entrance = int(input())
# variavel
countC = 0
listaP = []
p1 = 2
p2 = 3
p3 = 5
# calcular media
while countC < entrance:
a1, a2, a3 = map(float, input().split(' '))
mediaP = ((a1 * p1) + (a2 * p2) + (a3 * p3))/(p1 + p2 + p3)
listaP.append(mediaP)
countC = countC + 1
# imprimir media
for i in listaP:
print('{:.1f}'.format(i))
| entrance = int(input())
count_c = 0
lista_p = []
p1 = 2
p2 = 3
p3 = 5
while countC < entrance:
(a1, a2, a3) = map(float, input().split(' '))
media_p = (a1 * p1 + a2 * p2 + a3 * p3) / (p1 + p2 + p3)
listaP.append(mediaP)
count_c = countC + 1
for i in listaP:
print('{:.1f}'.format(i)) |
# https://leetcode.com/problems/longest-common-prefix/
# Write a function to find the longest common prefix string amongst an array of
# strings.
# If there is no common prefix, return an empty string "".
################################################################################
# one-pass -> compare with the first string
class Solution:
def longestCommonPrefix(self, strs: List[str]) -> str:
if not strs or len(strs) == 0: return ''
if len(strs) == 1: return strs[0]
ans = ''
for i in range(len(strs[0])):
char = strs[0][i]
for string in strs[1:]: # compare with other strings
if i >= len(string) or char != string[i]:
return ans
ans += char
return ans
| class Solution:
def longest_common_prefix(self, strs: List[str]) -> str:
if not strs or len(strs) == 0:
return ''
if len(strs) == 1:
return strs[0]
ans = ''
for i in range(len(strs[0])):
char = strs[0][i]
for string in strs[1:]:
if i >= len(string) or char != string[i]:
return ans
ans += char
return ans |
# Problem Statement
#
# Given the root of a binary tree, then value v and depth d, you need to add a
# row of nodes with value v at the given depth d. The root node is at depth 1.
#
# The adding rule is: given a positive integer depth d, for each NOT null tree
# nodes N in depth d-1, create two tree nodes with value v as N's left subtree
# root and right subtree root. And N's original left subtree should be the left
# subtree of the new left subtree root, its original right subtree should be the
# right subtree of the new right subtree root. If depth d is 1 that means there
# is no depth d-1 at all, then create a tree node with value v as the new root
# of the whole original tree, and the original tree is the new root's left subtree.
# //
# Example:
# 4 4
# / \ / \
# 2 6 => 1 1
# / \ / / \
# 3 1 5 2 6
# / \ /
# v = 1 3 1 5
# d = 2
# Definition for a binary tree node.
class TreeNode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution:
def addOneRow(self, root: TreeNode, v: int, d: int) -> TreeNode:
if d == 1:
node = TreeNode(v)
node.left = root
return node
if d == 2:
add_left(v, root)
add_right(v, root)
else:
if root.left is not None:
self.addOneRow(root.left, v, d - 1)
if root.right is not None:
self.addOneRow(root.right, v, d - 1)
return root
def add_left(v: int, root: TreeNode):
node_left = TreeNode(v)
node_left.left = root.left
root.left = node_left
def add_right(v: int, root: TreeNode):
node_right = TreeNode(v)
node_right.right = root.right
root.right = node_right
| class Treenode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution:
def add_one_row(self, root: TreeNode, v: int, d: int) -> TreeNode:
if d == 1:
node = tree_node(v)
node.left = root
return node
if d == 2:
add_left(v, root)
add_right(v, root)
else:
if root.left is not None:
self.addOneRow(root.left, v, d - 1)
if root.right is not None:
self.addOneRow(root.right, v, d - 1)
return root
def add_left(v: int, root: TreeNode):
node_left = tree_node(v)
node_left.left = root.left
root.left = node_left
def add_right(v: int, root: TreeNode):
node_right = tree_node(v)
node_right.right = root.right
root.right = node_right |
S = input()
things = []
curr = S[0]
count = 1
for i in range(1,len(S)):
if(S[i] == curr):
count += 1
else:
things.append((count,int(curr)))
count = 1
curr = S[i]
things.append((count,int(curr)))
print(" ".join(str(i) for i in things)) | s = input()
things = []
curr = S[0]
count = 1
for i in range(1, len(S)):
if S[i] == curr:
count += 1
else:
things.append((count, int(curr)))
count = 1
curr = S[i]
things.append((count, int(curr)))
print(' '.join((str(i) for i in things))) |
# https://leetcode.com/problems/remove-duplicates-from-sorted-list-ii/
# Definition for singly-linked list.
class ListNode(object):
def __init__(self, val=0, next=None):
self.val = val
self.next = next
class Solution(object):
# Runtime: 41 ms, faster than 46.10% of Python online submissions for Remove Duplicates from Sorted List II.
# Memory Usage: 13.2 MB, less than 97.59% of Python online submissions for Remove Duplicates from Sorted List II.
def deleteDuplicates(self, head):
"""
:type head: ListNode
:rtype: ListNode
"""
dummynode = ListNode(-1);
dummyNodePointer = dummynode
# create a dummy Node
currentNode = head
unique= head
# keep unique and currentNode on head
count=0
#create a count variable to check how many times number is repeating
while currentNode:
# Below block of code check how many times the number is occuring
while currentNode and currentNode.val == unique.val:
count+=1
currentNode= currentNode.next
# If the number is occuring only once the add the number node to dummyPointer
if count==1:
dummyNodePointer.next =unique
dummyNodePointer=dummyNodePointer.next
dummyNodePointer.next = None
# move the next number
unique = currentNode
count =0
return dummynode.next
# Runtime: 34 ms, faster than 69.50% of Python online submissions for Remove Duplicates from Sorted List II.
# Memory Usage: 13.6 MB, less than 14.45% of Python online submissions for Remove Duplicates from Sorted List II.
def deleteDuplicates(self, head):
"""
:type head: ListNode
:rtype: ListNode
"""
dummynode = ListNode(-1);
dummyNodePointer = dummynode
current = head
while current:
if (current.next and current.val ==current.next.val):
while (current.next and current.val == current.next.val):
current.next = current.next.next
current = current.next
else:
dummyNodePointer.next= current
current = current.next
dummyNodePointer = dummyNodePointer.next
dummyNodePointer.next= None
return dummynode.next
| class Listnode(object):
def __init__(self, val=0, next=None):
self.val = val
self.next = next
class Solution(object):
def delete_duplicates(self, head):
"""
:type head: ListNode
:rtype: ListNode
"""
dummynode = list_node(-1)
dummy_node_pointer = dummynode
current_node = head
unique = head
count = 0
while currentNode:
while currentNode and currentNode.val == unique.val:
count += 1
current_node = currentNode.next
if count == 1:
dummyNodePointer.next = unique
dummy_node_pointer = dummyNodePointer.next
dummyNodePointer.next = None
unique = currentNode
count = 0
return dummynode.next
def delete_duplicates(self, head):
"""
:type head: ListNode
:rtype: ListNode
"""
dummynode = list_node(-1)
dummy_node_pointer = dummynode
current = head
while current:
if current.next and current.val == current.next.val:
while current.next and current.val == current.next.val:
current.next = current.next.next
current = current.next
else:
dummyNodePointer.next = current
current = current.next
dummy_node_pointer = dummyNodePointer.next
dummyNodePointer.next = None
return dummynode.next |
for _ in range(int(input())):
n = int(input())
pages=list(map(int,input().split()))
m = int(input())
mem = []
ans=0
i=0
while i<n:
if pages[i] not in mem:
if len(mem)==m:
mem.pop(0)
mem.append(pages[i])
else:
mem.append(pages[i])
ans+=1
else:
mem.remove(pages[i])
mem.append(pages[i])
i+=1
print(ans)
| for _ in range(int(input())):
n = int(input())
pages = list(map(int, input().split()))
m = int(input())
mem = []
ans = 0
i = 0
while i < n:
if pages[i] not in mem:
if len(mem) == m:
mem.pop(0)
mem.append(pages[i])
else:
mem.append(pages[i])
ans += 1
else:
mem.remove(pages[i])
mem.append(pages[i])
i += 1
print(ans) |
'''
cardlist.py
Name: Wengel Gemu
Collaborators: None
Date: September 6th, 2019
Description: This program checks user input against a list to see if it is valid.
'''
# this is a list containing all of the valid values for a card
cards = ['A','2','3','4','5','6','7','8','9','10','J','Q','K']
card_value = input("Enter a card value: ")
if card_value in cards:
print("the card is valid")
else:
print("the card is invalid")
# Write some code that prompts the user to enter a
# card value and then checks if it is valid or
# not. Print a message saying whether
# or not the card is valid.
# (hint: think about what operator you would use
# to see if a value is in a list)
| """
cardlist.py
Name: Wengel Gemu
Collaborators: None
Date: September 6th, 2019
Description: This program checks user input against a list to see if it is valid.
"""
cards = ['A', '2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K']
card_value = input('Enter a card value: ')
if card_value in cards:
print('the card is valid')
else:
print('the card is invalid') |
"""
0759. Employee Free Time
Hard
We are given a list schedule of employees, which represents the working time for each employee.
Each employee has a list of non-overlapping Intervals, and these intervals are in sorted order.
Return the list of finite intervals representing common, positive-length free time for all employees, also in sorted order.
(Even though we are representing Intervals in the form [x, y], the objects inside are Intervals, not lists or arrays. For example, schedule[0][0].start = 1, schedule[0][0].end = 2, and schedule[0][0][0] is not defined). Also, we wouldn't include intervals like [5, 5] in our answer, as they have zero length.
Example 1:
Input: schedule = [[[1,2],[5,6]],[[1,3]],[[4,10]]]
Output: [[3,4]]
Explanation: There are a total of three employees, and all common
free time intervals would be [-inf, 1], [3, 4], [10, inf].
We discard any intervals that contain inf as they aren't finite.
Example 2:
Input: schedule = [[[1,3],[6,7]],[[2,4]],[[2,5],[9,12]]]
Output: [[5,6],[7,9]]
Constraints:
1 <= schedule.length , schedule[i].length <= 50
0 <= schedule[i].start < schedule[i].end <= 10^8
"""
"""
# Definition for an Interval.
class Interval:
def __init__(self, start: int = None, end: int = None):
self.start = start
self.end = end
"""
class Solution:
def employeeFreeTime(self, schedule: '[[Interval]]') -> '[Interval]':
ints = sorted([i for s in schedule for i in s], key=lambda x: x.start)
res, pre = [], ints[0]
for i in ints[1:]:
if i.start <= pre.end and i.end > pre.end:
pre.end = i.end
elif i.start > pre.end:
res.append(Interval(pre.end, i.start))
pre = i
return res | """
0759. Employee Free Time
Hard
We are given a list schedule of employees, which represents the working time for each employee.
Each employee has a list of non-overlapping Intervals, and these intervals are in sorted order.
Return the list of finite intervals representing common, positive-length free time for all employees, also in sorted order.
(Even though we are representing Intervals in the form [x, y], the objects inside are Intervals, not lists or arrays. For example, schedule[0][0].start = 1, schedule[0][0].end = 2, and schedule[0][0][0] is not defined). Also, we wouldn't include intervals like [5, 5] in our answer, as they have zero length.
Example 1:
Input: schedule = [[[1,2],[5,6]],[[1,3]],[[4,10]]]
Output: [[3,4]]
Explanation: There are a total of three employees, and all common
free time intervals would be [-inf, 1], [3, 4], [10, inf].
We discard any intervals that contain inf as they aren't finite.
Example 2:
Input: schedule = [[[1,3],[6,7]],[[2,4]],[[2,5],[9,12]]]
Output: [[5,6],[7,9]]
Constraints:
1 <= schedule.length , schedule[i].length <= 50
0 <= schedule[i].start < schedule[i].end <= 10^8
"""
'\n# Definition for an Interval.\nclass Interval:\n def __init__(self, start: int = None, end: int = None):\n self.start = start\n self.end = end\n'
class Solution:
def employee_free_time(self, schedule: '[[Interval]]') -> '[Interval]':
ints = sorted([i for s in schedule for i in s], key=lambda x: x.start)
(res, pre) = ([], ints[0])
for i in ints[1:]:
if i.start <= pre.end and i.end > pre.end:
pre.end = i.end
elif i.start > pre.end:
res.append(interval(pre.end, i.start))
pre = i
return res |
def plus_matrix(A,B) :
C = zeroMat(A)
for i in range(len(A)) :
for j in range(len(A[0])) :
C[i][j] = A[i][j] + B[i][j]
return C
def zeroMat(A):
c = []
for i in range(len(A)):
row = []
for _ in range(len(A[i])):
row.append(0)
c.append(row)
return c
# minus
def minus_matrix(A,B) :
C = zeroMat(A)
for i in range(len(A)) :
for j in range(len(A[0])) :
C[i][j] = A[i][j] - B[i][j]
return C
#transpose
def transpose_matrix(A):
n = len(A[0]) ## 2
m = len(A) ###3
arr = []
for i in range(n):
b = []
for j in range(m):
b.append(0)
arr.append(b)
for i in range(n): ### 3
for j in range(m): ### 2
arr[i][j] = A[j][i]
return arr
# mul and power
def mul_matrix(A,B) :
x1 = len(A)
y2 = len(B[0])
C = [ [0]*y2 for i in range(x1) ]
for i in range(len(A)) :
for k in range(len(B[0])) :
sum = 0
for j in range(len(A[0])) :
sum += A[i][j] * B[j][k]
C[i][k] = sum
return C
def power_matrix(A,c) :
tmp = A.copy()
for _ in range(c-1) :
tmp = mul_matrix(tmp,A)
return tmp
# print matrix
def print_matrix(A) :
for i in range(len(A)) :
for j in range(len(A[0])) :
print(f'{A[i][j]:^6}', end = ' ')
print()
A = [[1,2],[3,4],[5,6]]
B = [[7,9,11],[8,10,12]]
C = [[13,14],[15,16]]
D = [[100,50],[20,70]]
c = 2
res = mul_matrix(plus_matrix(A,transpose_matrix(B)), minus_matrix(power_matrix(C,2),D))
print_matrix(res) | def plus_matrix(A, B):
c = zero_mat(A)
for i in range(len(A)):
for j in range(len(A[0])):
C[i][j] = A[i][j] + B[i][j]
return C
def zero_mat(A):
c = []
for i in range(len(A)):
row = []
for _ in range(len(A[i])):
row.append(0)
c.append(row)
return c
def minus_matrix(A, B):
c = zero_mat(A)
for i in range(len(A)):
for j in range(len(A[0])):
C[i][j] = A[i][j] - B[i][j]
return C
def transpose_matrix(A):
n = len(A[0])
m = len(A)
arr = []
for i in range(n):
b = []
for j in range(m):
b.append(0)
arr.append(b)
for i in range(n):
for j in range(m):
arr[i][j] = A[j][i]
return arr
def mul_matrix(A, B):
x1 = len(A)
y2 = len(B[0])
c = [[0] * y2 for i in range(x1)]
for i in range(len(A)):
for k in range(len(B[0])):
sum = 0
for j in range(len(A[0])):
sum += A[i][j] * B[j][k]
C[i][k] = sum
return C
def power_matrix(A, c):
tmp = A.copy()
for _ in range(c - 1):
tmp = mul_matrix(tmp, A)
return tmp
def print_matrix(A):
for i in range(len(A)):
for j in range(len(A[0])):
print(f'{A[i][j]:^6}', end=' ')
print()
a = [[1, 2], [3, 4], [5, 6]]
b = [[7, 9, 11], [8, 10, 12]]
c = [[13, 14], [15, 16]]
d = [[100, 50], [20, 70]]
c = 2
res = mul_matrix(plus_matrix(A, transpose_matrix(B)), minus_matrix(power_matrix(C, 2), D))
print_matrix(res) |
''' List Nesting '''
# List in string
list_str = ['list in string', 'list']
str_nest = list_str
print(str_nest)
# List in List
list0 = ['list', 'in']
list1 = ['list']
list_nest = [list0, list1]
print(list_nest)
# List in Dictionary
list_dict0 = ['list', 'dictionary']
list_dict1 = ['in']
dict_nest = {
'sector': list_dict0[0] + " " + list_dict1[0] + " " + list_dict0[1]
}
print(dict_nest) | """ List Nesting """
list_str = ['list in string', 'list']
str_nest = list_str
print(str_nest)
list0 = ['list', 'in']
list1 = ['list']
list_nest = [list0, list1]
print(list_nest)
list_dict0 = ['list', 'dictionary']
list_dict1 = ['in']
dict_nest = {'sector': list_dict0[0] + ' ' + list_dict1[0] + ' ' + list_dict0[1]}
print(dict_nest) |
class Language(object):
'''
Programming Language mapper that should be subclassed
by any new Language
'''
valid_extensions = []
invalid_extensions = []
ignore_files = []
ignore_dirs = []
def __init__(self):
pass
def load_language( self ):
raise NotImplementedError("load_language should be implemented.... :D")
def add_valid_extension( self, extension ):
self.valid_extensions.append( extension )
def add_invalid_extension( self, extension ):
self.valid_extensions.append( extension )
def add_ignore_file( self, filename ):
if type(filename) is str:
self.ignore_files.append(filename)
if type(filename) is list:
self.add_ignore_files( filename )
def add_ignore_files( self, filenames ):
if type(filenames) is list:
for f in filenames:
self.ignore_files.append(f)
return self.ignore_files
def add_ignore_dir( self, directory ):
if not type(directory) is str:
return
self.ignore_dirs.append( directory )
def add_ignore_dirs( self, directories ):
if not type(directory) is list:
return
for d in directories:
self.ignore_dirs.append(d)
def add_valid_extensions(self, extensions):
if type(extensions) is list:
for ext in extensions:
self.valid_extensions.append( "."+ext if "." not in ext else ext )
def add_invalid_extensions(self, extensions):
if type(extensions) is list:
for ext in extensions:
self.invalid_extensions.append( "."+ext if "." not in ext else ext )
| class Language(object):
"""
Programming Language mapper that should be subclassed
by any new Language
"""
valid_extensions = []
invalid_extensions = []
ignore_files = []
ignore_dirs = []
def __init__(self):
pass
def load_language(self):
raise not_implemented_error('load_language should be implemented.... :D')
def add_valid_extension(self, extension):
self.valid_extensions.append(extension)
def add_invalid_extension(self, extension):
self.valid_extensions.append(extension)
def add_ignore_file(self, filename):
if type(filename) is str:
self.ignore_files.append(filename)
if type(filename) is list:
self.add_ignore_files(filename)
def add_ignore_files(self, filenames):
if type(filenames) is list:
for f in filenames:
self.ignore_files.append(f)
return self.ignore_files
def add_ignore_dir(self, directory):
if not type(directory) is str:
return
self.ignore_dirs.append(directory)
def add_ignore_dirs(self, directories):
if not type(directory) is list:
return
for d in directories:
self.ignore_dirs.append(d)
def add_valid_extensions(self, extensions):
if type(extensions) is list:
for ext in extensions:
self.valid_extensions.append('.' + ext if '.' not in ext else ext)
def add_invalid_extensions(self, extensions):
if type(extensions) is list:
for ext in extensions:
self.invalid_extensions.append('.' + ext if '.' not in ext else ext) |
class Solution(object):
def validUtf8(self, data):
"""
:type data: List[int]
:rtype: bool
"""
data_bin=map(lambda a: bin(a%2**8)[2:].zfill(8), data)
# print data_bin
k=0
while k<len(data_bin):
num=data_bin[k]
# print num
if '0' not in num:
return False
i=num.index('0')
if i==0:
k+=1
elif i==1 or i>4:
return False
else:
n=i-1
test=data_bin[k+1: k+n+1]
if len(test)!=n:
return False
# print test
if any(map(lambda x: x.index('0')!=1, test)):
return False
else:
k+=n+1
return True | class Solution(object):
def valid_utf8(self, data):
"""
:type data: List[int]
:rtype: bool
"""
data_bin = map(lambda a: bin(a % 2 ** 8)[2:].zfill(8), data)
k = 0
while k < len(data_bin):
num = data_bin[k]
if '0' not in num:
return False
i = num.index('0')
if i == 0:
k += 1
elif i == 1 or i > 4:
return False
else:
n = i - 1
test = data_bin[k + 1:k + n + 1]
if len(test) != n:
return False
if any(map(lambda x: x.index('0') != 1, test)):
return False
else:
k += n + 1
return True |
# mistertribs - experiment 2
# https://youtu.be/jZTu6qttvMU
Scale.default = Scale.minor
Root.default = 0
Clock.bpm = 105
~b1 >> bass(dur=8, oct=4)
###
b1.room = 1
b1.shape = PWhite(1)
###
~d1 >> play('V [ -]', dur=2, room=1, mix=.5)
~k1 >> karp([0,3,6,10], dur=.25, sus=.5, echo=.5, amp=var([0,1],[15,1]), oct=7)
###
k1.room = 1
k1.mix = .5
###
###
b1.fmod = 1
b1.pan = (-1,1)
###
b1.lpf=linvar([0,4000],30)
~s1 >> soprano(dur=8, sus=8, amp=[0,1])
s1.degree = var([0,-2,-3],8)
s1.oct = 6
k1.amp = var([0,1.5],[15,1])
b1.degree = s1.degree
###
~k2 >> karp([0,2,4,7], dur=1/3, sus=.5, echo=.5, amp=var([0,1.5],[5,1]), oct=7, room=1, mix=.5)
k1.every(16, 'reverse')
###
###
s1.degree = (0,4,7)+var([0,-2,-3],8)
s1.oct = (5,6)
###
b1.dur = PRand([16,8,12,4])
b1.amp = .8
~b2 >> blip(PWhite(4), dur=PWhite(.1), amp=linvar([0,1,0,0],[6,2,0,0]))
b2.shape = linvar([0,1],12)
b2.dur = PWhite(.3)/var([1,2,3],1)
###
b2.bits = 6
b2.room = .5
b2.mix = linvar([0,1],18)
###
~d2 >> play('#', dur=32, sus=8, chop=64, bits=4)
d1.chop = [128,64,0]
b1.stop()
d1.degree = 'V[-X]o[-=n-]'
d1.dur = 1
d1.fmod = 1
d1.slide = 3
s1.amp = .75
s1.slide = PWhite(-1,1)
~s1 >> soprano((0,4,7)+var([0,-2,-3],8), dur=8, sus=8, amp=[0,.75], oct=(5,6), slide=PWhite(-1,1))
~b1 >> bass(s1.degree, dur=PRand([16,8,12,4]), fmod=1, oct=4, room=1, shape=PWhite(1), pan=(-1,1), lpf=linvar([0,4000],30), amp=.8)
b2.stop()
s1.stop()
d1.stop()
~b2 >> blip(PWhite(4), dur=PWhite(.3)/var([1,2,3],1), amp=linvar([0,1,0,0],[6,2,0,0]), shape=linvar([0,1],12))
b1.stop()
Clock.clear()
| Scale.default = Scale.minor
Root.default = 0
Clock.bpm = 105
~b1 >> bass(dur=8, oct=4)
b1.room = 1
b1.shape = p_white(1)
~d1 >> play('V [ -]', dur=2, room=1, mix=0.5)
~k1 >> karp([0, 3, 6, 10], dur=0.25, sus=0.5, echo=0.5, amp=var([0, 1], [15, 1]), oct=7)
k1.room = 1
k1.mix = 0.5
b1.fmod = 1
b1.pan = (-1, 1)
b1.lpf = linvar([0, 4000], 30)
~s1 >> soprano(dur=8, sus=8, amp=[0, 1])
s1.degree = var([0, -2, -3], 8)
s1.oct = 6
k1.amp = var([0, 1.5], [15, 1])
b1.degree = s1.degree
~k2 >> karp([0, 2, 4, 7], dur=1 / 3, sus=0.5, echo=0.5, amp=var([0, 1.5], [5, 1]), oct=7, room=1, mix=0.5)
k1.every(16, 'reverse')
s1.degree = (0, 4, 7) + var([0, -2, -3], 8)
s1.oct = (5, 6)
b1.dur = p_rand([16, 8, 12, 4])
b1.amp = 0.8
~b2 >> blip(p_white(4), dur=p_white(0.1), amp=linvar([0, 1, 0, 0], [6, 2, 0, 0]))
b2.shape = linvar([0, 1], 12)
b2.dur = p_white(0.3) / var([1, 2, 3], 1)
b2.bits = 6
b2.room = 0.5
b2.mix = linvar([0, 1], 18)
~d2 >> play('#', dur=32, sus=8, chop=64, bits=4)
d1.chop = [128, 64, 0]
b1.stop()
d1.degree = 'V[-X]o[-=n-]'
d1.dur = 1
d1.fmod = 1
d1.slide = 3
s1.amp = 0.75
s1.slide = p_white(-1, 1)
~s1 >> soprano((0, 4, 7) + var([0, -2, -3], 8), dur=8, sus=8, amp=[0, 0.75], oct=(5, 6), slide=p_white(-1, 1))
~b1 >> bass(s1.degree, dur=p_rand([16, 8, 12, 4]), fmod=1, oct=4, room=1, shape=p_white(1), pan=(-1, 1), lpf=linvar([0, 4000], 30), amp=0.8)
b2.stop()
s1.stop()
d1.stop()
~b2 >> blip(p_white(4), dur=p_white(0.3) / var([1, 2, 3], 1), amp=linvar([0, 1, 0, 0], [6, 2, 0, 0]), shape=linvar([0, 1], 12))
b1.stop()
Clock.clear() |
"""
1146
medium
snapshot array
"""
class SnapshotArray:
# memory limit exceeded
def __init__(self, length: int):
self.array = [0] * length
self.snaps = {}
self.count = 0
def set(self, index: int, val: int) -> None:
self.array[index] = val
def snap(self) -> int:
self.snaps[self.count] = self.array.copy()
self.count += 1
return self.count - 1
def get(self, index: int, snap_id: int) -> int:
return self.snaps[snap_id][index] | """
1146
medium
snapshot array
"""
class Snapshotarray:
def __init__(self, length: int):
self.array = [0] * length
self.snaps = {}
self.count = 0
def set(self, index: int, val: int) -> None:
self.array[index] = val
def snap(self) -> int:
self.snaps[self.count] = self.array.copy()
self.count += 1
return self.count - 1
def get(self, index: int, snap_id: int) -> int:
return self.snaps[snap_id][index] |
def main(a, b, c, d):
return 1 if a - c >= 2 and b - d >= 2 else 0
if __name__ == '__main__':
print(main(*map(int, input().split())))
| def main(a, b, c, d):
return 1 if a - c >= 2 and b - d >= 2 else 0
if __name__ == '__main__':
print(main(*map(int, input().split()))) |
def dobro(n):
return n*2
def metade(n):
return n/2
def aumentar(n,v=10):
novo = n
x = (n*v)/100
return novo + x
def diminuir(n,v=13):
novo = n
x = (n*v)/100
return novo - x | def dobro(n):
return n * 2
def metade(n):
return n / 2
def aumentar(n, v=10):
novo = n
x = n * v / 100
return novo + x
def diminuir(n, v=13):
novo = n
x = n * v / 100
return novo - x |
class AbstractRepositoryFile(object):
ADDED = "A"
MODIFIED = "M"
DELETED = "D"
IGNORED = "I"
RENAMED = "R"
UNVERSIONED = "?"
NOT_MODIFIED = " "
CONFLICTED = "C"
STATE_MAP = {
"A": "added",
"M": "modified",
"D": "deleted",
"I": "ignored",
"R": "renamed",
"?": "unversioned",
" ": "not modified",
"C": "conflicted",
}
def __init__(self, workingCopy, status:str, filePath:str):
self.__workingCopy = workingCopy
self.__status = status
self.__filePath = filePath
#
def filePath(self) -> str:
return self.__filePath
#
def status(self) -> str:
return self.__status
#
def statusText(self) -> str:
return self.STATE_MAP[self.__status]
#
def workingCopy(self):
return self.__workingCopy
#
def __str__(self):
return self.__class__.__name__ + "<" + self.STATE_MAP[self.__status] + ": " + repr(self.__filePath) + ">"
#
def __repr__(self):
return self.__class__.__name__ + "<" + self.STATE_MAP[self.__status] + ": " + repr(self.__filePath) + ">"
#
#
| class Abstractrepositoryfile(object):
added = 'A'
modified = 'M'
deleted = 'D'
ignored = 'I'
renamed = 'R'
unversioned = '?'
not_modified = ' '
conflicted = 'C'
state_map = {'A': 'added', 'M': 'modified', 'D': 'deleted', 'I': 'ignored', 'R': 'renamed', '?': 'unversioned', ' ': 'not modified', 'C': 'conflicted'}
def __init__(self, workingCopy, status: str, filePath: str):
self.__workingCopy = workingCopy
self.__status = status
self.__filePath = filePath
def file_path(self) -> str:
return self.__filePath
def status(self) -> str:
return self.__status
def status_text(self) -> str:
return self.STATE_MAP[self.__status]
def working_copy(self):
return self.__workingCopy
def __str__(self):
return self.__class__.__name__ + '<' + self.STATE_MAP[self.__status] + ': ' + repr(self.__filePath) + '>'
def __repr__(self):
return self.__class__.__name__ + '<' + self.STATE_MAP[self.__status] + ': ' + repr(self.__filePath) + '>' |
if PY_V<2.7:
class deque2(collections.deque):
"""
This class add support of <maxlen> for old deque in python2.6.
Thx to Muhammad Alkarouri.
http://stackoverflow.com/a/4020363
"""
def __init__(self, iterable=(), maxlen=None):
collections.deque.__init__(self, iterable, maxlen)
self._maxlen=maxlen
@property
def maxlen(self):
return self._maxlen
else:
deque2=collections.deque
class CaseInsensitiveDict(dict):
@classmethod
def _k(cls, key):
return key.lower() if isinstance(key, basestring) else key
def __init__(self, *args, **kwargs):
super(CaseInsensitiveDict, self).__init__(*args, **kwargs)
self._convert_keys()
def __getitem__(self, key):
return super(CaseInsensitiveDict, self).__getitem__(self.__class__._k(key))
def __setitem__(self, key, value):
super(CaseInsensitiveDict, self).__setitem__(self.__class__._k(key), value)
def __delitem__(self, key):
return super(CaseInsensitiveDict, self).__delitem__(self.__class__._k(key))
def __contains__(self, key):
return super(CaseInsensitiveDict, self).__contains__(self.__class__._k(key))
def has_key(self, key):
return super(CaseInsensitiveDict, self).has_key(self.__class__._k(key))
def pop(self, key, *args, **kwargs):
return super(CaseInsensitiveDict, self).pop(self.__class__._k(key), *args, **kwargs)
def get(self, key, *args, **kwargs):
return super(CaseInsensitiveDict, self).get(self.__class__._k(key), *args, **kwargs)
def setdefault(self, key, *args, **kwargs):
return super(CaseInsensitiveDict, self).setdefault(self.__class__._k(key), *args, **kwargs)
def update(self, E={}, **F):
super(CaseInsensitiveDict, self).update(self.__class__(E))
super(CaseInsensitiveDict, self).update(self.__class__(**F))
def _convert_keys(self):
for k in list(self.keys()):
v=super(CaseInsensitiveDict, self).pop(k)
self.__setitem__(k, v)
class MagicDict(dict):
"""
Get and set values like in Javascript (dict.<key>).
"""
def __getattr__(self, k):
if k[:2]=='__': raise AttributeError(k) #for support PICKLE protocol and correct isFunction() check
return self.__getitem__(k)
# __getattr__=dict.__getitem__
__setattr__=dict.__setitem__
__delattr__=dict.__delitem__
__reduce__=dict.__reduce__
magicDict=MagicDict
class MagicDictCold(MagicDict):
"""
Extended MagicDict, that allow freezing.
"""
def __getattr__(self, k):
if k=='__frozen': return object.__getattribute__(self, '__frozen')
return MagicDict.__getattr__(self, k)
def __freeze(self):
object.__setattr__(self, '__frozen', True)
def __unfreeze(self):
object.__setattr__(self, '__frozen', False)
def __setattr__(self, k, v):
if getattr(self, '__frozen', None): raise RuntimeError('Frozen')
MagicDict.__setattr__(self, k, v)
def __setitem__(self, k, v):
if getattr(self, '__frozen', None): raise RuntimeError('Frozen')
MagicDict.__setitem__(self, k, v)
def __delattr__(self, k):
if getattr(self, '__frozen', None): raise RuntimeError('Frozen')
MagicDict.__delattr__(self, k)
def __delitem__(self, k):
if getattr(self, '__frozen', None): raise RuntimeError('Frozen')
MagicDict.__delitem__(self, k)
magicDictCold=MagicDictCold
def dict2magic(o, recursive=False):
if recursive:
if isArray(o) or isDict(o) or isSet(o) or isTuple(o):
for i in (o if isDict(o) else xrange(len(o))):
o[i]=dict2magic(o[i], recursive=True)
if isDict(o): o=MagicDict(o)
elif isDict(o):
o=MagicDict(o)
return o
dictToMagic=dict2magic
class Circularlist(object):
# https://stackoverflow.com/a/40784706
def __init__(self, size):
self.index=0
self.size=size
self._data=[]
def append(self, value):
if len(self._data)==self.size:
self._data[self.index]=value
else:
self._data.append(value)
self.index=(self.index+1)%self.size
def __getitem__(self, key):
"""Get element by index, relative to the current index"""
if len(self._data)==self.size:
return(self._data[(key+self.index) % self.size])
else:
return(self._data[key])
def __repr__(self):
return self._data.__repr__()+' ('+str(len(self._data))+' items)'
| if PY_V < 2.7:
class Deque2(collections.deque):
"""
This class add support of <maxlen> for old deque in python2.6.
Thx to Muhammad Alkarouri.
http://stackoverflow.com/a/4020363
"""
def __init__(self, iterable=(), maxlen=None):
collections.deque.__init__(self, iterable, maxlen)
self._maxlen = maxlen
@property
def maxlen(self):
return self._maxlen
else:
deque2 = collections.deque
class Caseinsensitivedict(dict):
@classmethod
def _k(cls, key):
return key.lower() if isinstance(key, basestring) else key
def __init__(self, *args, **kwargs):
super(CaseInsensitiveDict, self).__init__(*args, **kwargs)
self._convert_keys()
def __getitem__(self, key):
return super(CaseInsensitiveDict, self).__getitem__(self.__class__._k(key))
def __setitem__(self, key, value):
super(CaseInsensitiveDict, self).__setitem__(self.__class__._k(key), value)
def __delitem__(self, key):
return super(CaseInsensitiveDict, self).__delitem__(self.__class__._k(key))
def __contains__(self, key):
return super(CaseInsensitiveDict, self).__contains__(self.__class__._k(key))
def has_key(self, key):
return super(CaseInsensitiveDict, self).has_key(self.__class__._k(key))
def pop(self, key, *args, **kwargs):
return super(CaseInsensitiveDict, self).pop(self.__class__._k(key), *args, **kwargs)
def get(self, key, *args, **kwargs):
return super(CaseInsensitiveDict, self).get(self.__class__._k(key), *args, **kwargs)
def setdefault(self, key, *args, **kwargs):
return super(CaseInsensitiveDict, self).setdefault(self.__class__._k(key), *args, **kwargs)
def update(self, E={}, **F):
super(CaseInsensitiveDict, self).update(self.__class__(E))
super(CaseInsensitiveDict, self).update(self.__class__(**F))
def _convert_keys(self):
for k in list(self.keys()):
v = super(CaseInsensitiveDict, self).pop(k)
self.__setitem__(k, v)
class Magicdict(dict):
"""
Get and set values like in Javascript (dict.<key>).
"""
def __getattr__(self, k):
if k[:2] == '__':
raise attribute_error(k)
return self.__getitem__(k)
__setattr__ = dict.__setitem__
__delattr__ = dict.__delitem__
__reduce__ = dict.__reduce__
magic_dict = MagicDict
class Magicdictcold(MagicDict):
"""
Extended MagicDict, that allow freezing.
"""
def __getattr__(self, k):
if k == '__frozen':
return object.__getattribute__(self, '__frozen')
return MagicDict.__getattr__(self, k)
def __freeze(self):
object.__setattr__(self, '__frozen', True)
def __unfreeze(self):
object.__setattr__(self, '__frozen', False)
def __setattr__(self, k, v):
if getattr(self, '__frozen', None):
raise runtime_error('Frozen')
MagicDict.__setattr__(self, k, v)
def __setitem__(self, k, v):
if getattr(self, '__frozen', None):
raise runtime_error('Frozen')
MagicDict.__setitem__(self, k, v)
def __delattr__(self, k):
if getattr(self, '__frozen', None):
raise runtime_error('Frozen')
MagicDict.__delattr__(self, k)
def __delitem__(self, k):
if getattr(self, '__frozen', None):
raise runtime_error('Frozen')
MagicDict.__delitem__(self, k)
magic_dict_cold = MagicDictCold
def dict2magic(o, recursive=False):
if recursive:
if is_array(o) or is_dict(o) or is_set(o) or is_tuple(o):
for i in o if is_dict(o) else xrange(len(o)):
o[i] = dict2magic(o[i], recursive=True)
if is_dict(o):
o = magic_dict(o)
elif is_dict(o):
o = magic_dict(o)
return o
dict_to_magic = dict2magic
class Circularlist(object):
def __init__(self, size):
self.index = 0
self.size = size
self._data = []
def append(self, value):
if len(self._data) == self.size:
self._data[self.index] = value
else:
self._data.append(value)
self.index = (self.index + 1) % self.size
def __getitem__(self, key):
"""Get element by index, relative to the current index"""
if len(self._data) == self.size:
return self._data[(key + self.index) % self.size]
else:
return self._data[key]
def __repr__(self):
return self._data.__repr__() + ' (' + str(len(self._data)) + ' items)' |
########################################################################
'''
say something ....
'''
# from epidemix.utils.plot import *
# from epidemix.utils.partition import *
__version__ = "1.1.2"
########################################################################
| """
say something ....
"""
__version__ = '1.1.2' |
f1_scores_001_train = {
'Wake': [0.45828943664803573, 0.47566984186570316, 0.5875755194928342, 0.7704458983749956, 0.8776419969393865,
0.9099441500276573, 0.922647481237028, 0.9350972410673902, 0.9465349405012661, 0.9534392971969388,
0.9572805948925108, 0.9627780979304024, 0.9671772627452403, 0.9684523701540192, 0.9716055990492866,
0.9731932563363663, 0.9741702106414556, 0.9750272331154685, 0.9763683737482866, 0.9776438172104023,
0.9779034872265177, 0.9782498184458969, 0.9790514587703288, 0.9804106722113014, 0.9802716115527991,
0.9813018761692003, 0.9814845932014806],
'REM': [0.21260117157805308, 0.35374807384355084, 0.5103512283642359, 0.7049339859692951, 0.7804678062886637,
0.8131475844498263, 0.8394483436487339, 0.8634476562257954, 0.8858121874421188, 0.898998362634237,
0.9160738813815542, 0.9319316568182859, 0.9472641818444968, 0.9574975686846584, 0.9649491736446937,
0.9709271015844844, 0.9756795855455999, 0.9788204281364097, 0.9807636963996305, 0.9833653715167936,
0.9848436671966083, 0.9857726653549266, 0.987027730685396, 0.9874375662176479, 0.9885864793678666,
0.9896364035519353, 0.99061473486626],
'Non REM': [0.3401838631048861, 0.475220709175341, 0.5374332841107604, 0.6340473156622304, 0.7303350082917914,
0.7759327787793486, 0.8091571662779938, 0.8371759030861152, 0.8542371387331004, 0.8664349470288908,
0.8812739412416539, 0.8957909719398129, 0.9114945790997332, 0.9205330841504897, 0.930866013351348,
0.9387957691035018, 0.9419240026921892, 0.945397904922747, 0.9504453644461172, 0.9537926314588798,
0.9551680485384851, 0.9571398417488634, 0.9595577339564574, 0.962153041039352, 0.9628565892798121,
0.9644391272147212, 0.965803250485636],
'Pre REM': [0.19860624317691192, 0.1884477836851209, 0.161593542507486, 0.32138035252003516, 0.5003342912439154,
0.597080323173599, 0.6383882339403956, 0.6777091347889314, 0.7154756685664183, 0.7457149471099168,
0.7927714646464645, 0.8286919003726221, 0.8679852222991217, 0.8928338793882888, 0.9127351158091093,
0.9285575691722613, 0.9372181620276784, 0.943335761107065, 0.9516857973155537, 0.9570796675253974,
0.9598336604418881, 0.9629075069761112, 0.9667892371446916, 0.9683581857266528, 0.9716692115423892,
0.9725854152074092, 0.9749576790613507],
'Artefakt': [0.5229366001967272, 0.6338351044007543, 0.6570850735373311, 0.6454606333110112, 0.6661511061117361,
0.7106723973046948, 0.8216750921171551, 0.925570332136013, 0.9651614399165265, 0.977290979284187,
0.9842082303329941, 0.9882866708719491, 0.990505776138239, 0.9923858361012373, 0.9937809736663104,
0.9947903504850028, 0.9952559640697606, 0.9958682908334388, 0.9962760940796701, 0.9965954632115481,
0.9968580072178286, 0.9967910694490364, 0.9972373540856032, 0.9972666167329747, 0.9978593391196046,
0.9977720484506494, 0.9978014280989163],
'avg': [0.34652346294092284, 0.425384302594094, 0.49080772960252955, 0.6152536371675134, 0.7109860417750986,
0.7613554467470252, 0.8062632634442612, 0.8478000534608491, 0.8734442750318859, 0.888375706650834,
0.9063216224990356, 0.9214958595866143, 0.9368854044253663, 0.9463405476957387, 0.9547873751041497,
0.9612528093363233, 0.9648495849953367, 0.9676899236230257, 0.9711078651978516, 0.9736953901846043,
0.9749213741242656, 0.9761721803949669, 0.9779327029284953, 0.9791252163855857, 0.9802486461724943,
0.981146974118783, 0.9821323371427286]
}
f1_scores_001_valid = {
'Wake': [0.657405684754522, 0.4611178937310898, 0.843902349955265, 0.855320411392405, 0.885871037659171,
0.9139117987867221, 0.932055717572047, 0.9463877720904695, 0.9570114044125484, 0.9595433464145559,
0.9673044150459424, 0.9634778302470773, 0.9712198478939845, 0.9694530626717489, 0.9703757610181224,
0.9729483335963112, 0.9736898243618004, 0.9754512380346861, 0.9746917814242247, 0.9747490755414686,
0.9774797034945287, 0.9771752369856486, 0.9760045134787286, 0.9766318905963626, 0.9769876682008221,
0.9782155845072908, 0.978478283917023],
'REM': [0.12518034456420268, 0.11241206629307261, 0.2589039585400816, 0.429526563064691, 0.7098027495517035,
0.82624801552302, 0.815959741193386, 0.8383912248628885, 0.8554066130473637, 0.8804795803671787,
0.8694686169227921, 0.8914441629312025, 0.8816533437317216, 0.8909512761020881, 0.8801363378148078,
0.8948485433146827, 0.8946564885496183, 0.895306859205776, 0.9020965570301981, 0.9019078820581999,
0.9002114977888866, 0.9014194050165274, 0.8947568389057751, 0.9020897832817337, 0.9026852028185107,
0.9030291484092209, 0.9097933165926211],
'Non REM': [0.19235930929587544, 0.05094734791291218, 0.5261806039702052, 0.5527151935297515, 0.7126930223617607,
0.7644436245118839, 0.8765320885540361, 0.8957227937195452, 0.9114534991646556, 0.9150781723747001,
0.9210171195724076, 0.9341014545644126, 0.9412280475539623, 0.9429993330254989, 0.9435981463939169,
0.9463633087970351, 0.9507063572149343, 0.9456240555285198, 0.950480413895048, 0.9514810381274992,
0.9523567655424625, 0.9540212443095599, 0.9520783017668742, 0.9555623038769105, 0.9508740589511293,
0.9542678310029782, 0.955841139192567],
'Pre REM': [0.025122883670125617, 0.0, 0.005687203791469194, 0.05966438781852082, 0.24408602150537637,
0.23279847701930925, 0.29683698296836986, 0.36845637583892615, 0.350185873605948, 0.35790219702338766,
0.3778217821782178, 0.4421052631578948, 0.45901639344262296, 0.4576107899807322, 0.4524975514201763,
0.4938271604938272, 0.47925764192139736, 0.45363908275174475, 0.49278707443739184, 0.492874109263658,
0.4843835616438356, 0.4977011494252873, 0.49826989619377154, 0.5121495327102803, 0.47285464098073554,
0.483423749246534, 0.4955116696588868],
'Artefakt': [0.12214863870493008, 0.30966531122927743, 0.31692207368764264, 0.3072642967542504, 0.1799193843898864,
0.2667024416420714, 0.278149386845039, 0.39522437216961714, 0.4789156626506024, 0.4533083059596434,
0.587088915956151, 0.5015259409969481, 0.6417704011065007, 0.5848024316109421, 0.6144964720974985,
0.674123788217748, 0.6778115501519757, 0.6790490341753345, 0.7044728434504792, 0.6750369276218611,
0.7093596059113301, 0.7350993377483444, 0.718241042345277, 0.7056936647955093, 0.7402489626556018,
0.7391304347826086, 0.7164906580016247],
'avg': [0.22444337219793115, 0.18682852383327042, 0.39031923798893275, 0.44089817051192376, 0.5464744430935796,
0.6008208714966013, 0.6399067834265756, 0.6888365077362893, 0.7105946105762235, 0.7132623204278932,
0.7445401699351022, 0.746530930379507, 0.7789776067457584, 0.7691633786782021, 0.7722208537489044,
0.7964222268839208, 0.7952243724399453, 0.7898140539392123, 0.8049057340474682, 0.7992098065225374,
0.8047582268762087, 0.8130832746970735, 0.8078701185380854, 0.8104254350521594, 0.80873010672136,
0.8116133495897264, 0.8112230134725446]
}
f1_scores_001b_train = {
'Wake': [0.8216369980220904, 0.9148960769839647, 0.9262593869783211, 0.9307407224833854, 0.93437170366048,
0.9361000399908336, 0.9392671051507645, 0.9400201522212426, 0.9418583182098613, 0.9437846254933641,
0.946338341153827, 0.947366047470224, 0.9506416673430553, 0.9536365852117317, 0.9544220667476659,
0.9560755262444666, 0.9574754370755671, 0.9591688245954166, 0.9595061192761719, 0.9607198571137889,
0.9619010158824886, 0.9623254215210941, 0.9632624998869199, 0.9635522731181044, 0.9637292094850923,
0.963798692479038, 0.9644366802740792, 0.9649516840398845, 0.9653783125548886, 0.965020268587087,
0.9660741378139082, 0.96624938857588, 0.966527802934251, 0.9665532905493233],
'REM': [0.7614879649890591, 0.8373268950437317, 0.8495166577088742, 0.8565099642697295, 0.8618982536066817,
0.865077676101298, 0.8698590432023432, 0.8729105417891642, 0.8782313756646092, 0.8798407167745147,
0.8843661432401378, 0.8877133079673254, 0.8935266470899431, 0.8974062650676178, 0.9003429061294471,
0.9037400836909708, 0.9074412662469304, 0.9088489483747609, 0.9136049639320211, 0.9160532893077434,
0.9204903945308025, 0.9220649242499485, 0.9274855497949864, 0.9310610510576945, 0.9335377153446659,
0.9375915750915751, 0.9407341310697751, 0.944534277084541, 0.9468975293023822, 0.9514857443194369,
0.952917498894598, 0.9550017517936845, 0.9570201009232268, 0.9595492786173817],
'Non REM': [0.7410094927626485, 0.8106415762384027, 0.8246266402289318, 0.8329492641898353, 0.8406863964188013,
0.8453382895503342, 0.8493045680767863, 0.8539930806625655, 0.8544867556108755, 0.8582889188076507,
0.8609136153572697, 0.8629103075708903, 0.8675721373111749, 0.8700001112631709, 0.8742503643868843,
0.8751135103816733, 0.8809324071899154, 0.8834159853460215, 0.8883650351921429, 0.8933036689998375,
0.896576115330852, 0.8993790358447759, 0.9047234899556027, 0.9094462393529292, 0.9138251845148885,
0.9165407448909715, 0.9195960237486319, 0.9229478077437794, 0.9254691201617989, 0.9279472757229703,
0.9305727633358719, 0.9340084772281172, 0.9347551324823792, 0.9361311893736152],
'Pre REM': [0.5753381066030231, 0.6531545137840069, 0.6639423854992718, 0.6747356480168537, 0.6849267591563796,
0.6943487989537461, 0.7008447600391772, 0.71123301129851, 0.7161349171372642, 0.723404255319149,
0.7289075286415712, 0.7317744996021301, 0.741140639483361, 0.7437676794399561, 0.7549063426922921,
0.7580707265173776, 0.7715358822285547, 0.7753496767947722, 0.7895598710053345, 0.7998757863525263,
0.810965801804322, 0.8188597928521067, 0.8327870151219561, 0.8454052345054489, 0.8554315380902187,
0.8669575986318335, 0.8757138651751545, 0.8838630687105149, 0.8923666810125592, 0.9006305293513857,
0.9053856214253645, 0.9136587506705027, 0.9164822091991458, 0.9226994820670588],
'Artefakt': [0.6938652766639936, 0.7614956514378822, 0.802243083310097, 0.832086492615126, 0.853656827713219,
0.8807399282601607, 0.8989053065632517, 0.9172664322792392, 0.9311935963318795, 0.9459323086477255,
0.9580706087461863, 0.9676724973819959, 0.9757160285830477, 0.98237283536674, 0.9851055788667836,
0.987261516984644, 0.9880737681075107, 0.9903669102397612, 0.9909089146911163, 0.9917719004099512,
0.9928428729367497, 0.9934152467585364, 0.9935917943945166, 0.9937937588487423, 0.9944614190794897,
0.9944220788669544, 0.994568590937306, 0.9947501722448108, 0.9949642451704297, 0.995624290523824,
0.995487583576745, 0.9954585152838427, 0.9960005436154309, 0.9960103672209442],
'avg': [0.718667567808163, 0.7955029426975976, 0.8133176307450991, 0.825404418314986, 0.8351079881111122,
0.8443209465712744, 0.8516361566064645, 0.8590846436501444, 0.8643809925908978, 0.8702501650084807,
0.8757192474277984, 0.8794873319985133, 0.8857194239621166, 0.8894366952698434, 0.8938054517646146,
0.8960522727638264, 0.9010917521696957, 0.9034300690701464, 0.9083889808193574, 0.9123449004367694,
0.916555240097043, 0.9192088842452923, 0.9243700698307963, 0.928651711376584, 0.932197013302871,
0.9358621379920745, 0.9390098582409893, 0.942209401964706, 0.9450151776404117, 0.9481416217009407,
0.9500875210092975, 0.9528753767104053, 0.9541571578308868, 0.9561887215656647]
}
f1_scores_003_train = {
'Wake': [0.34114242511145293, 0.47037630601418756, 0.6231108635424149, 0.7475570095554086, 0.8430910969227903,
0.885049862822802, 0.9044004997858691, 0.9253318162882266, 0.9369672478644814, 0.9452637857181587,
0.9518877048365375, 0.9519492785387302, 0.9599945681694732, 0.9649082267440543, 0.9660711210217642,
0.9688784923862239, 0.9698137676789205, 0.9716789831108208, 0.9731037362477761, 0.9737947680274393,
0.9744066459283712, 0.9748579152435513, 0.9758808743863597, 0.976034107402032, 0.9767549533601143,
0.9779290625638234, 0.9781986046743861, 0.9787328673867658, 0.9787371221786845, 0.9795699657153236],
'REM': [0.33085111174501175, 0.5190163242660332, 0.6481260289892502, 0.7238209275028948, 0.7667388585547388,
0.8039935174143046, 0.8260626269594878, 0.8558023967343915, 0.8703875107984697, 0.8857655272212258,
0.8967234984307647, 0.90612615524313, 0.9239083706933612, 0.9406622293884351, 0.9519391889833348,
0.9603378095636627, 0.9671704328948467, 0.9715075483733787, 0.974906154021158, 0.9778475254730713,
0.9794804545075535, 0.9824130693399407, 0.9832002787329768, 0.9848179517871484, 0.9866099153274057,
0.9870328571644978, 0.9881570777362148, 0.988027534399067, 0.9889871845366134, 0.9895973713299313],
'Non REM': [0.351980942709495, 0.45674395145063235, 0.6163104861034215, 0.6953867850728838, 0.7299422327657482,
0.7585851814110643, 0.7753320906085256, 0.8150885716625269, 0.8421267105371844, 0.8549725358138507,
0.8629687326137754, 0.8676629264992817, 0.8853304856115107, 0.9006314502987507, 0.9104625137754349,
0.9217028741982889, 0.9277105683633874, 0.9353619105730465, 0.9396988364134153, 0.9436405048550341,
0.9474020819890248, 0.948741792126146, 0.9520946470131885, 0.9544484148276688, 0.955918828151282,
0.9582128867830935, 0.9594037442760933, 0.9609816454649645, 0.9616822429906542, 0.9635761778061385],
'Pre REM': [0.1834041799504074, 0.19172531950361177, 0.2620691563697749, 0.4357441721458459, 0.5412528169601871,
0.5956108512258562, 0.6214464441831721, 0.6589435516086408, 0.6936645551961806, 0.7195463930233275,
0.7393872091262431, 0.7650942263833873, 0.8046556204365137, 0.8448039484507814, 0.8718334048948047,
0.8962313657654856, 0.9123335016115879, 0.925423827499539, 0.9335649743286132, 0.9421271146981219,
0.9483699345643773, 0.9526558218179698, 0.9564608925517026, 0.9615418241162585, 0.9643054975170309,
0.9660984001710631, 0.9684122541015474, 0.9698065519587828, 0.9725783718104497, 0.9744826513147659],
'Artefakt': [0.48589423031561074, 0.543264541160224, 0.6045723154061959, 0.6406778841504691, 0.6607212006712118,
0.6792695774318156, 0.719872537659328, 0.8504288920955587, 0.9366815174834616, 0.9621537185779441,
0.9730542964606038, 0.9768481342092279, 0.98624, 0.9903513880799845, 0.9923686356751719,
0.9933174038891155, 0.994170455870351, 0.9945097124644103, 0.9953544424359049, 0.9960429731174956,
0.9959170976396936, 0.9962939545741939, 0.9971403003657302, 0.996839535946632, 0.9972863881729319,
0.9975876425041827, 0.9974713582696311, 0.9976458685966653, 0.9976656875522789, 0.9979570792069576],
'avg': [0.33865457796639553, 0.43622528847893777, 0.5508377700822115, 0.6486373556855003, 0.7083492411749353,
0.7445017980611686, 0.7694228398392765, 0.8211190456778688, 0.8559655083759555, 0.8735403920709015,
0.8848042882935848, 0.8935361441747514, 0.9120258089821718, 0.9282714485924013, 0.9385349728701021,
0.9480935891605553, 0.9542397452838186, 0.9596963964042391, 0.9633256286893734, 0.9666905772342325,
0.9691152429258041, 0.9709925106203603, 0.9729553986099916, 0.974736366815948, 0.9761751165057528,
0.977372169837332, 0.9783286078115745, 0.9790388935612491, 0.9799301218137361, 0.9810366490746233],
}
f1_scores_003b_train = {
'Wake': [0.4313997632363146, 0.5472644332254802, 0.6574325037840122, 0.7680884313500437, 0.8588134397026899,
0.8919537341959567, 0.9053421143972485, 0.9239945636223252, 0.9369187624389362, 0.9463731838711433,
0.9526025930664054, 0.9581055804746945, 0.9621588230217527, 0.9652561530290787, 0.9667060212514758,
0.9690848011621572, 0.9707154757203104, 0.9719770370538449, 0.9728229517281478, 0.9745429120148194,
0.9755435029480436, 0.9757504200535854, 0.9767391156230837, 0.9770848849248879, 0.97815974998183],
'REM': [0.31206495709787546, 0.49244859379372, 0.599596254676487, 0.6896992243708981, 0.756718591412559,
0.7945578835884788, 0.8159464658637544, 0.8423975051342513, 0.8704807892564853, 0.8882604071944886,
0.9014192617382694, 0.9152789166736915, 0.9324890002444389, 0.9443083381034153, 0.9544382748916103,
0.9604561003420753, 0.9671201900093336, 0.9706295405029948, 0.9743208941087327, 0.9764104118516274,
0.9788884428048752, 0.9799045960475505, 0.9818839756837986, 0.9830390404942909, 0.9843418741292628],
'Non REM': [0.37274978333539677, 0.5500774066299743, 0.6232983906688321, 0.6736729998291955, 0.7230304243189293,
0.758483732224806, 0.776876982728234, 0.8099952598465915, 0.8446422480662801, 0.8602145790101109,
0.8692816257709545, 0.8812693740103923, 0.894218425021163, 0.9050085771036476, 0.914490898587497,
0.923859481799396, 0.931428311416481, 0.9361149702780877, 0.9406685538209179, 0.9458101131662622,
0.9468460872339457, 0.9497151321786691, 0.9519047320731936, 0.9541438069356851, 0.9571166531849202],
'Pre REM': [0.19497741293049012, 0.16800126435570542, 0.16935250967481083, 0.3163466554694558, 0.507647510905686,
0.5804237385380916, 0.6210424217673184, 0.6590068080060515, 0.7019758788811907, 0.732017097496438,
0.7558063113618669, 0.7864649474536783, 0.8243962909703971, 0.8548676910992195, 0.8804948954122334,
0.8994615054434776, 0.915765265353057, 0.9270872832988168, 0.9351260438844655, 0.9434567493220058,
0.9468353938262967, 0.9513858486803062, 0.9546299269291768, 0.9582474026226702, 0.9622247070834752],
'Artefakt': [0.5076240511500205, 0.630002083630342, 0.6360896314274426, 0.6419354838709677, 0.6458651841556636,
0.6723094958968346, 0.7098380785164273, 0.8135635145581036, 0.9210007727975271, 0.9601728095045227,
0.9740944653723559, 0.9813190855063206, 0.986806774009054, 0.9890350877192983, 0.9916036536240185,
0.9925792101326806, 0.9937048262998368, 0.9944496826307143, 0.9950039851480337, 0.9952844405985358,
0.995848928206873, 0.996140047252822, 0.996479489623247, 0.996859351451213, 0.9966255968414808],
'avg': [0.3637631935500195, 0.4775587563270444, 0.5371538580463169, 0.6179485589781122, 0.6984150300991057,
0.7395457168888335, 0.7658092126545964, 0.8097915302334646, 0.8550036902880841, 0.8774076154153407,
0.8906408514619704, 0.9044875808237555, 0.9200138626533612, 0.9316951694109317, 0.941546748753367,
0.9490882197759574, 0.9557468137598037, 0.9600517027528916, 0.9635884857380596, 0.9671009253906501,
0.9687924710040068, 0.9705792088425866, 0.9723274479865, 0.9738748972857494, 0.9756937162441938],
}
f1_scores_003c_train = {
'Wake': [0.4466379651005595, 0.5967105208480507, 0.6905195116112043, 0.7632186210321186, 0.8525029797377831,
0.901673584147811, 0.9227019404484612, 0.9377986972508561, 0.9468803155875647, 0.954563166622867,
0.9583437198319427, 0.9611485337143636, 0.965801999156053, 0.967048925153274, 0.9687681580476466,
0.9709119461174325, 0.9717056516054046, 0.9723846181778568, 0.9732127855705962, 0.974165451911593,
0.9744053351747197, 0.97508356950803, 0.9752216247638426, 0.9761454888993859, 0.9760474419576165,
0.9763797410856234, 0.9767382714928017, 0.9773362225220437, 0.9774966372196168, 0.977710334299552,
0.9785559816090283, 0.9788511951005646, 0.9787566555816024, 0.9783548996801396, 0.9794128738828384,
0.9792664636640458, 0.9795714363606624, 0.9793149819863615, 0.9799288398533174, 0.979722392603194,
0.9800211642134043, 0.980373984626288, 0.9801077760511799],
'REM': [0.35829084060139516, 0.5479005299633103, 0.6614117411371289, 0.7207113538845913, 0.770582596655661,
0.8095270500170126, 0.8406305533427293, 0.8636709123154525, 0.8778625954198472, 0.892504855556745,
0.9035875126374805, 0.9088628890418291, 0.9174012855831037, 0.9259944637313228, 0.9334434579117626,
0.9423097489801843, 0.9471379752242631, 0.9507661812914538, 0.9543784772502096, 0.9590064758657951,
0.961684133672026, 0.9648317578041886, 0.9666780652760363, 0.969215929028779, 0.9718473338036824,
0.9722312820940693, 0.9745605183493548, 0.9754018158511517, 0.9770775812372947, 0.9776996194836499,
0.978449452516, 0.9797592334283461, 0.9797842746367309, 0.9806918196083784, 0.9818920496320047,
0.9822859265210833, 0.9826222653172536, 0.9834172947994394, 0.9838167106100555, 0.9841808337435158,
0.9844496792225597, 0.984512100868353, 0.9855340291137131],
'Non REM': [0.3607511530858774, 0.5504250429505342, 0.6417193020019271, 0.6940028995598697, 0.7374172576528648,
0.7770953870620115, 0.816505983500538, 0.8474931822949444, 0.8590294959290193, 0.8674369142831824,
0.8756081306231257, 0.8802045126153162, 0.8874192110541564, 0.8932093137721001, 0.8997403063599703,
0.904781217610743, 0.9109682952564195, 0.9150364566514269, 0.9193118240521125, 0.9232360311624551,
0.9274815664799645, 0.9299842335035204, 0.9315848188875987, 0.9340780087334255, 0.9364647656842452,
0.9386191445331875, 0.9400613294118988, 0.9417801190394746, 0.9433850432562434, 0.9458233101136662,
0.9474758649004659, 0.9477573642615211, 0.9486645716534445, 0.9486910277771438, 0.950510524214249,
0.9517537858055101, 0.9518582960152886, 0.9524135570010271, 0.9537115712517892, 0.954701288625979,
0.9555437568865216, 0.95588680257817, 0.9555457922275032],
'Pre REM': [0.18374680909068378, 0.2051593398423948, 0.28768268886145515, 0.45042921678046977, 0.5319476438678995,
0.6027951866354502, 0.655866640790186, 0.6855784632873456, 0.7096435843119511, 0.7294245429953273,
0.7528146870879399, 0.7634907634907634, 0.7806610873622734, 0.8001155746851586, 0.8206985974601854,
0.8373058830476114, 0.8518580367579885, 0.8636913826090352, 0.874564663307197, 0.885958001420054,
0.8948064578875705, 0.9018009625834498, 0.9068227710469089, 0.9110515792130143, 0.9183075639707451,
0.9218330408818141, 0.92624533152253, 0.9293027224075079, 0.9327364688099529, 0.9367572444435821,
0.9384448406853245, 0.9406133423768228, 0.9428640659074388, 0.9444008790527916, 0.9453199918633823,
0.9483625374131869, 0.9490819243253719, 0.9508971824981591, 0.9521982228165549, 0.9546939685679106,
0.9550856733274572, 0.9555110375596396, 0.9564939405388125],
'Artefakt': [0.5071941697032795, 0.5788057559692271, 0.6224417939351261, 0.6494646182495345, 0.6565630376882645,
0.7059877929798288, 0.8085879905475551, 0.895822906641001, 0.9350009111573617, 0.9585436332113273,
0.9711257204089316, 0.975370983032484, 0.982999622213827, 0.9860012408872344, 0.9885615049528005,
0.9903067115591737, 0.9908207029051602, 0.9917769385357708, 0.9927270961790553, 0.992681459049172,
0.9936681816416114, 0.9942772752446003, 0.9941429584373452, 0.9944239362735574, 0.9950932286555446,
0.9953055293671698, 0.9953165688522678, 0.9950836555838403, 0.9955285975348964, 0.9961421477644864,
0.9957919084132677, 0.996305011571148, 0.9962773970938426, 0.9959955679101141, 0.9965102602237711,
0.996538648517258, 0.9967135967641568, 0.9967137245751176, 0.9969172720288628, 0.9968301505192331,
0.9971409677921269, 0.9969278033794163, 0.9972188186786473],
'avg': [0.37132418751635904, 0.4958002379147034, 0.5807550075093684, 0.6555653419013167, 0.7098027031204946,
0.7594158001684228, 0.808858621725894, 0.8460728323579201, 0.8656833804811488, 0.8804946225338897,
0.8922959541178841, 0.8978155363789513, 0.9068566410738826, 0.914473903645818, 0.9222424049464731,
0.929123101463029, 0.9344981323498471, 0.9387311154531087, 0.9428389692718341, 0.9470094838818138,
0.9504091349711784, 0.9531955597287578, 0.9548900476823464, 0.9569829884296324, 0.9595520668143669,
0.9608737475923729, 0.9625844039257707, 0.9637809070808036, 0.9652448656116007, 0.9668265312209874,
0.9677436096248172, 0.9686572293476805, 0.9692693929746119, 0.9696268388057134, 0.970729139963249,
0.9716414723842168, 0.9719695037565466, 0.9725513481720209, 0.973314523312116, 0.9740257268119665,
0.9744482482884139, 0.9746423458023734, 0.9749800713219713],
}
f1_scores_003d_train = {
'Wake': [0.4590079841931025, 0.6067054566706488, 0.6515180926498967, 0.7531546507066651, 0.8600782527546853,
0.892678799973969, 0.9163818154517432, 0.9321424730219051, 0.9453948677143426, 0.9507330316742083,
0.9569370193156459, 0.9609148287869994, 0.9643283480471143, 0.9672967160603614, 0.9684425392937335,
0.9702420134648647, 0.9711349471858957, 0.9714817167226205, 0.9729300086296951, 0.9731129311402136,
0.9737347679367054, 0.9748944658769215, 0.975002499750025, 0.9756219538808467, 0.975020108426453,
0.975939644593919, 0.9753603693672405, 0.9764022120938095, 0.9768413974219754, 0.9762576879542881,
0.9769249298930557, 0.9770600293624352, 0.977179328654035, 0.9781562115006069, 0.9776499245605424],
'REM': [0.33481608598460044, 0.5535281453713322, 0.6063505380854806, 0.6978732361298888, 0.7795728474001595,
0.8117988189036146, 0.8310854593951084, 0.8479374371169852, 0.8629822507087391, 0.8793104770376279,
0.8891479050365008, 0.8967768132819504, 0.9037667127356582, 0.9092033344529603, 0.9120807778380319,
0.9157758094074526, 0.9185655812816911, 0.9209410540172352, 0.9230169170057205, 0.9261353218018458,
0.9276267450404115, 0.9305781463578536, 0.9318291183232636, 0.935286207634241, 0.9362023808614778,
0.9386513849092646, 0.9402388000336553, 0.9426502490146355, 0.9448859815369567, 0.9458553239591528,
0.9477523117770928, 0.9491336539195482, 0.9510748589724043, 0.9532723101663784, 0.9553321698307332],
'Non REM': [0.37019219058290503, 0.4890113110238528, 0.5435859726526254, 0.6270989302622741, 0.718425307122777,
0.7639560813867466, 0.7899300908925455, 0.8259601254578554, 0.8487402335176895, 0.8608135630538888,
0.8701669644235647, 0.8756279393641303, 0.8827100145266146, 0.8859539433642813, 0.8900190788889876,
0.8913405702834811, 0.8932089452899676, 0.8957117229198717, 0.8988042318634425, 0.8991907694359841,
0.9010568259604094, 0.9029339839680922, 0.9043182985948216, 0.9070512283055253, 0.9078734858681022,
0.9092296214020857, 0.9101751854440512, 0.9136890138872417, 0.9162252105406139, 0.9181735574738754,
0.9210151061521069, 0.9233422309237749, 0.924147513724061, 0.9262288545879136, 0.9282737517554777],
'Pre REM': [0.2185548365218866, 0.2834966603286042, 0.22596656852964792, 0.3356500929249726, 0.5074289076733317,
0.5936133120374141, 0.6262453332233247, 0.6494031374346368, 0.6783503648111229, 0.7065070275897971,
0.726734592855375, 0.7407255753009582, 0.7523349634505172, 0.7598868036329087, 0.7698874029510995,
0.7723171141110287, 0.7786381788327826, 0.7865395084380103, 0.7904764777445982, 0.7952704402515725,
0.8006290442133942, 0.8057079911876627, 0.8096551586787888, 0.8182630627767958, 0.8232291759399388,
0.8281914841104518, 0.8342934267020058, 0.84214021996054, 0.849311072432201, 0.8547895942693078,
0.8614322057671288, 0.867332189866831, 0.8703270014745424, 0.8759298516091732, 0.8827571624907494],
'Artefakt': [0.5267054047600095, 0.6047960465877532, 0.6243213664942812, 0.6318329568618809, 0.6637899709302325,
0.6970531439606019, 0.7296933003358671, 0.8053531362309633, 0.8780763519662786, 0.9214560305241059,
0.9466757868572915, 0.9600910002313566, 0.9714412605236734, 0.9781185639280223, 0.9825253991291727,
0.9863738051657515, 0.9878619380212925, 0.989535955001697, 0.9906389748464889, 0.9915430123169431,
0.9915214776298942, 0.9926726773357659, 0.9931859214536701, 0.993601506898527, 0.9936022523178486,
0.9937948513774654, 0.9939412769923878, 0.9943694786913891, 0.9944835087991919, 0.9947865596147684,
0.9946090858758049, 0.9951622304254905, 0.9956762113895394, 0.9954718594527363, 0.9952800870173257],
'avg': [0.3818553004085008, 0.5075075239964383, 0.5303485076823864, 0.6091219733771364, 0.7058590571762372,
0.7518200312524692, 0.7786671998597178, 0.8121592618524692, 0.8427088137436345, 0.8637640259759255,
0.8779324536976756, 0.886827231393079, 0.8949162598567154, 0.9000918722877067, 0.904591039620205,
0.9072098624865157, 0.9098819181223259, 0.9128419914198871, 0.9151733220179891, 0.9170504949893118,
0.9189137721561629, 0.9213574529452592, 0.9227981993601139, 0.925964791899187, 0.9271854806827641,
0.9291613972786374, 0.9308018117078681, 0.9338502347295232, 0.9363494341461877, 0.9379725446542786,
0.9403467278930379, 0.942406066899616, 0.9436809828429163, 0.9458118174633616, 0.9478586191309658],
}
f1_scores_003e_train = {
'Wake': [0.37558449872610644, 0.4451441684126509, 0.5637551801083839, 0.6495528703902673, 0.8124668546656004,
0.86078777800873, 0.8853923665468657, 0.9058019838206619, 0.9211747490703408, 0.92997397787895,
0.9349235788647163, 0.9412216707798842, 0.9477923641185069, 0.9519023104820634, 0.955170742534119,
0.9575336501832166, 0.9595641602554799, 0.9609826458501537, 0.9631867060333529, 0.9629206349206348,
0.9645036176824151, 0.9661691497134247, 0.9660202326436322, 0.9670435453843709, 0.9675378029570515,
0.9678602556653108, 0.9684258334090291, 0.9685488888787963, 0.969058405890524, 0.969614401257022,
0.9693823325021462, 0.9704055502079513, 0.9708861276688473, 0.9713172450749766],
'REM': [0.1961737173256944, 0.15041506628670548, 0.49051808721107915, 0.5829218513397854, 0.749687590118235,
0.7862571446517179, 0.8086693579333527, 0.8255767943020638, 0.8430115683671533, 0.851206546455651,
0.8602496304311382, 0.8673794098120464, 0.8795522938033532, 0.8848393589723892, 0.8927059040137474,
0.8973435320446986, 0.9002835900973404, 0.9046655631169149, 0.9064025089879905, 0.9087666388555071,
0.9118953527555679, 0.9157561883178035, 0.9148384233362156, 0.9179896204895823, 0.9194131340357755,
0.9214663695330867, 0.9219112345877437, 0.924543458469448, 0.9263030655415382, 0.9285714285714286,
0.9293286219081272, 0.9312282743518675, 0.9325719709437168, 0.9328426722159316],
'Non REM': [0.300507264697497, 0.4421090572061171, 0.6597646827155024, 0.7055236236678812, 0.7401019528200313,
0.7586434348457018, 0.7674361442821735, 0.7815747453712075, 0.7942405509038265, 0.8198546433378198,
0.8317356164607529, 0.8443212079615648, 0.8559567282611681, 0.8620839259922345, 0.866051279787686,
0.8686454231604955, 0.873909018778101, 0.8767851028815674, 0.8798214256115012, 0.8792239503452247,
0.8826288483024879, 0.8846155977589236, 0.8858539183109686, 0.8869923027439497, 0.8888161144753859,
0.8885134571887451, 0.8919704863524401, 0.8922167356050527, 0.8927944152954886, 0.8944701770814173,
0.8946446892983003, 0.8976302311683525, 0.8979201610197919, 0.8998735268111968],
'Pre REM': [0.17708598684152735, 0.18346998397888983, 0.261995743445874, 0.36977587268291573, 0.527307218690718,
0.5952723666954547, 0.6142764817478683, 0.6376558552266706, 0.6514704072843607, 0.6657877389584707,
0.6727223652520555, 0.683999666138052, 0.7024064115607417, 0.7146690982188189, 0.7267327750089915,
0.7312403267632196, 0.7388780637883294, 0.7495224962974313, 0.7515355920077673, 0.755950808008944,
0.7605616618031336, 0.768707414119529, 0.7714620450046459, 0.7748226055534808, 0.7777195809830781,
0.7808005788770187, 0.7863585740515917, 0.7914337800749244, 0.7931761625408501, 0.7985442474779287,
0.8010663045757246, 0.8087862237741368, 0.8090135581090214, 0.8130139364181918],
'Artefakt': [0.4551118829423982, 0.576196422111491, 0.6030167334433184, 0.6420437922035366, 0.654982332155477,
0.6802976183412642, 0.6909193391185899, 0.7157926184676197, 0.740816533051486, 0.7908454786353096,
0.8346000436568571, 0.8829686197740004, 0.9202791002486459, 0.9446408445955708, 0.9600331531114772,
0.9689011614996186, 0.9749236891928443, 0.9786567986164117, 0.981128790443488, 0.9833688286544047,
0.9852824415654834, 0.9877966101694915, 0.9887047827730971, 0.9894059377150556, 0.9901280062063615,
0.9904680636496747, 0.9914342532861231, 0.991744516554621, 0.9929053234337847, 0.992190455863949,
0.9933030514791521, 0.9930306148201354, 0.9931690277508248, 0.9933702837285602],
'avg': [0.30089267010664467, 0.35946693959917086, 0.5158100853848315, 0.5899636020568773, 0.6969091896900124,
0.7362516685085738, 0.7533387379257702, 0.7732803994376447, 0.7901427617354335, 0.8115336770532402,
0.8268462469331039, 0.8439781148931095, 0.8611973795984833, 0.8716271076522155, 0.8801387708912042,
0.8847328187302498, 0.889511704422419, 0.8941225213524959, 0.89641500461682, 0.898046172156943,
0.9009743844218174, 0.9046089920158344, 0.9053758804137118, 0.9072508023772878, 0.9087229277315305,
0.9098217449827672, 0.9120200763373856, 0.9136974759165686, 0.9148474745404371, 0.9166781420503491,
0.9175449999526901, 0.9202161788644887, 0.9207121690984404, 0.9220835328497714],
}
f1_scores_003c_valid = {
'Wake': [0.7659384013526506, 0.7626023018819246, 0.8090274078921338, 0.7815923818439799, 0.8991182529872271,
0.9366738182573188, 0.9471757697552573, 0.9474741069541323, 0.9574051668920361, 0.9609795049241416,
0.9659506479673353, 0.962255457896229, 0.9678618003822999, 0.969906631131193, 0.9712296327713569,
0.9701819737287682, 0.9736543104672631, 0.9714255307827383, 0.9735028770334587, 0.9738889480976234,
0.9752792334974326, 0.9749991134437392, 0.9721538706650852, 0.9749787955894826, 0.974475245770968,
0.9748384240814519, 0.9745653060139315, 0.976328210952195, 0.976317095653407, 0.976317935264296,
0.9760839976667314, 0.9754706622035669, 0.9759406239457377, 0.9768716624818757, 0.9759673411430599,
0.9763893805309733, 0.9777336899721892, 0.9776074594709144, 0.9780765546844513, 0.9776889894632628,
0.9770368929979317, 0.9773206844578421, 0.9773502837845005],
'REM': [0.5709274281955712, 0.5350080171031535, 0.6886145404663924, 0.5441772493920561, 0.8166269755358303,
0.8460570469798658, 0.8608326908249808, 0.8776026464292664, 0.8877972096679112, 0.8811959087332809,
0.8930491933877714, 0.8827474090631985, 0.8912209889001009, 0.9019607843137255, 0.8975687524910322,
0.8962703962703963, 0.8921493902439024, 0.8981321009050645, 0.8977403293757182, 0.9015664281570296,
0.9015325670498084, 0.8960490985807441, 0.8972762645914396, 0.8968177434908391, 0.8962446767324816,
0.9023111283744417, 0.9023969319271333, 0.9049002517915941, 0.9080325960419091, 0.9011201235998455,
0.8994197292069632, 0.8960092095165004, 0.9027993779160187, 0.9053658536585366, 0.9050867277333852,
0.9003875968992248, 0.9058209243859989, 0.9021802045147599, 0.905112316034082, 0.9050583657587549,
0.9063962558502339, 0.9047619047619047, 0.9067747539085119],
'Non REM': [0.5393776676304558, 0.4804003336113428, 0.6571839753673148, 0.5529007771552502, 0.8249040809208232,
0.9071181718327216, 0.9195858003599467, 0.9159701769747142, 0.932116845079184, 0.9343255620316403,
0.9416895410584644, 0.9387776145180832, 0.94497772119669, 0.9386167371178133, 0.9447569150165652,
0.9432627748449592, 0.9437362412327855, 0.9467919023366519, 0.9439656274775581, 0.9436803688052248,
0.9469371030526532, 0.9511996746644978, 0.9488165906601105, 0.9484293461577816, 0.9494099956673548,
0.9506512006512007, 0.9461212399775292, 0.9501812742438456, 0.9496457682638836, 0.9504518225200528,
0.950821342162231, 0.9508572009971002, 0.9522365428354813, 0.9528108121814539, 0.9509972663764301,
0.9532018455610201, 0.952183267940767, 0.952376114398923, 0.9535771145535872, 0.9524123585815027,
0.9533773489080752, 0.9530530682450549, 0.9532743452577137],
'Pre REM': [0.1061139896373057, 0.005859374999999999, 0.27722772277227725, 0.2956785443517817, 0.4224872231686541,
0.5048247841543931, 0.4513163393230255, 0.45925258892390813, 0.4702627939142462, 0.4717861688587188,
0.4915640674874601, 0.49109653233364575, 0.4888076747373229, 0.4519874944171506, 0.49025341130604294,
0.47314814814814815, 0.4515539305301645, 0.4828953891918691, 0.45471349353049906, 0.4505494505494506,
0.4640826873385013, 0.4848484848484848, 0.5010706638115632, 0.4732189287571503, 0.4782157676348548,
0.4928305894848646, 0.45012285012285014, 0.4696189495365603, 0.4726134585289515, 0.4711437565582371,
0.48311688311688317, 0.47132429614181437, 0.48202959830866804, 0.48583877995642705, 0.46892950391644905,
0.4829106945975744, 0.48995111352525794, 0.4854368932038835, 0.48484848484848486, 0.4769647696476965,
0.49418282548476455, 0.4835164835164835, 0.4856661045531198],
'Artefakt': [0.18129079042784624, 0.29403029403029407, 0.3095163806552262, 0.3069306930693069, 0.4288272157564906,
0.40743801652892564, 0.36986301369863017, 0.39365595770638473, 0.44076888690210103,
0.46783625730994155, 0.539031339031339, 0.488, 0.5180467091295117, 0.5583284968078933,
0.5726141078838174, 0.5317417254476398, 0.64, 0.588380716934487, 0.6356902356902357,
0.6030341340075853, 0.6695156695156695, 0.6444906444906445, 0.6214099216710184, 0.6344086021505377,
0.6318607764390897, 0.6420260095824777, 0.6445824706694272, 0.6734397677793904, 0.6553672316384181,
0.670995670995671, 0.6874536005939124, 0.6613255644573925, 0.6715867158671587, 0.6897590361445783,
0.6522366522366522, 0.6764705882352942, 0.6977099236641222, 0.7174959871589085, 0.6944655041698256,
0.7028265851795263, 0.6723891273247495, 0.6878306878306878, 0.693939393939394],
'avg': [0.4327296554487659, 0.415580064325343, 0.5483140054306689, 0.4962559291624749, 0.678392749673805,
0.7204223675506449, 0.7097547227923682, 0.7187910953976812, 0.7376701804910957, 0.7432246803715447,
0.7662569577864741, 0.7525754027622312, 0.7621829788691851, 0.7641600287575552, 0.7752845638937629,
0.7629210036879822, 0.7802187744948232, 0.777525128030162, 0.7811225126214939, 0.7745438659233826,
0.791469452090813, 0.7903174032056222, 0.7881454622798435, 0.7855706832291582, 0.7860412924489497,
0.7925314704348873, 0.7835577597421743, 0.794893690860717, 0.7923952300253139, 0.7940058617876204,
0.7993791105493442, 0.7909973866632749, 0.7969185717746129, 0.8021292288845743, 0.7906434982811953,
0.7978720211648174, 0.8046797838976671, 0.8070193317494778, 0.8032159948580861, 0.8029902137261485,
0.8006764901131509, 0.8012965657623946, 0.8034009762886478]
}
f1_scores_003d_valid = {
'Wake': [0.7986130603483859, 0.7132484651251829, 0.7200546287122085, 0.8459017393027546, 0.8695469798657718,
0.9239532019704433, 0.946169477023992, 0.9518422639100677, 0.9591239834498501, 0.9652665732877076,
0.9669026957000124, 0.9611357839727469, 0.9695176298620272, 0.9709512529609774, 0.9699856058855936,
0.9748308811840967, 0.9709214968800268, 0.9726432991152952, 0.9721896226750596, 0.9755291357893053,
0.9772228126106979, 0.9768060431960847, 0.9760521218524388, 0.9773669110615236, 0.9772831980720842,
0.9772494073523689, 0.9783474979722819, 0.9768146582100071, 0.9784320317061519, 0.9783038869257951,
0.9777439671643904, 0.9777337951509153, 0.9789546347593677, 0.9789578093449999, 0.9780818043624281],
'REM': [0.5452914798206278, 0.6506587335316617, 0.6895439889451866, 0.8186979560938682, 0.8385690938805156,
0.8535791757049891, 0.850438763830599, 0.8682521706304266, 0.8850710900473934, 0.881992337164751,
0.8837390457643622, 0.8749281746791803, 0.8537839823659074, 0.8967691095350669, 0.8978145304193739,
0.8916953693073096, 0.895878101191639, 0.8904716073147257, 0.8836944127708095, 0.8668672433245581,
0.8942962818765817, 0.8856757277809909, 0.8947574334898277, 0.8933951332560836, 0.897951219512195,
0.8996062992125985, 0.8988326848249026, 0.8998644199109045, 0.898820844427539, 0.8989838613269576,
0.8975238095238095, 0.8984674329501916, 0.8969766994030426, 0.9016583108368685, 0.8951157812804047],
'Non REM': [0.4891523067354479, 0.0540278853601859, 0.1305182341650672, 0.587199552822806, 0.6907428571428572,
0.8305537799988378, 0.9045191069128381, 0.9229552703023275, 0.9369888620609081, 0.9368451158316217,
0.9332322096398775, 0.9308284860870931, 0.9410338423442014, 0.937810945273632, 0.9321790826836327,
0.9381083754099214, 0.9404299404299404, 0.9405663312934344, 0.9436379604277523, 0.9418409718102804,
0.9440597245462736, 0.945471325659497, 0.9428060073146058, 0.9490803683656979, 0.9451783185271019,
0.9505087172145815, 0.9421833790143249, 0.9413780570123059, 0.9386677708193158, 0.9536666751572886,
0.9376943810906075, 0.9425127491886881, 0.932213526092722, 0.9518109113137385, 0.9472441147023336],
'Pre REM': [0.11554762435868839, 0.04310833806012478, 0.019536019536019536, 0.19884057971014493, 0.2901049475262369,
0.3119266055045872, 0.4058823529411765, 0.46015180265654654, 0.5074626865671641, 0.4852801519468186,
0.4529240978846952, 0.452560873215785, 0.4439764111204718, 0.4619144602851324, 0.44743481917577793,
0.4395509499136442, 0.4887690925426775, 0.47164179104477616, 0.4610081861266696, 0.45450802799505974,
0.4606007836308228, 0.46689895470383275, 0.47687471935339015, 0.48605947955390333, 0.4630669546436285,
0.4860666971219735, 0.443796835970025, 0.44855789926818773, 0.4096586178184846, 0.5220440881763527,
0.40032349373230897, 0.4475770925110132, 0.380952380952381, 0.481203007518797, 0.45883441258094354],
'Artefakt': [0.19274332885390671, 0.24763799104922923, 0.3209635416666667, 0.49205147615442835, 0.2723112128146453,
0.33595620937393084, 0.34078590785907864, 0.39495467087110764, 0.39450980392156865, 0.4655831739961759,
0.468342644320298, 0.40998363338788874, 0.6127819548872181, 0.49552238805970156, 0.457480673033197,
0.5756327251324308, 0.5678449258836944, 0.5549915397631133, 0.5604584527220631, 0.654130288784419,
0.6385463984425697, 0.684813753581662, 0.6145181476846058, 0.6369087275149901, 0.6212603437301083,
0.6788588149231894, 0.7007407407407407, 0.6398416886543534, 0.6525017135023989, 0.6728307254623044,
0.6680469289164941, 0.6918604651162791, 0.6942028985507246, 0.6874546773023931, 0.662534435261708],
'avg': [0.4282695600234113, 0.3417362826252769, 0.3761232826050297, 0.5885382608168005, 0.5922550182460053,
0.6511937945105577, 0.6895591217135368, 0.7196312356740953, 0.7366312852093768, 0.746993470445415,
0.741028138661849, 0.7258873902685388, 0.7642187641159651, 0.752593631222902, 0.740978942239515,
0.7639636601894806, 0.7727687113855957, 0.766062913706269, 0.7641977269444709, 0.7785751335407245,
0.7829452002213891, 0.7919331609844135, 0.7810016859389737, 0.7885621239504397, 0.7809480068970236,
0.7984579871649424, 0.7927802277044551, 0.7812913446111518, 0.7756161956547781, 0.8051658474097397,
0.7762665160855221, 0.7916303069834175, 0.7766600279516476, 0.8002169432633593, 0.7883621096375636],
}
f1_scores_003e_valid = {
'Wake': [0.6438713917570349, 0.7011950165268243, 0.19955691888207225, 0.7256888524494158, 0.8306592124600396,
0.8722392442231585, 0.9141733342298124, 0.9472026580372749, 0.9499813826486284, 0.9506403128026688,
0.9569846373704894, 0.9574932170027132, 0.9600573682323412, 0.9625938737834495, 0.9616155169051291,
0.9606813342796311, 0.9616207329361642, 0.9662877786589126, 0.9637677300243206, 0.9588251826869028,
0.9668159212785162, 0.9670955457085402, 0.9668864729994654, 0.9658557481214414, 0.9703093590450608,
0.9734150606772536, 0.9712507778469198, 0.9678038038749089, 0.9710814783332447, 0.9720483641536273,
0.9723443483193873, 0.971516633010947, 0.9691018132080105, 0.9728321548195012],
'REM': [0.022836843440751077, 0.028254288597376383, 0.16538663861125724, 0.558894061221611, 0.8439688715953307,
0.8655903520715814, 0.861779722830051, 0.8948797517455392, 0.8688035780842341, 0.8110447146095199,
0.8725190839694656, 0.8718544328300426, 0.8674471299093656, 0.8869769260852562, 0.8778403573509419,
0.8507795100222717, 0.8808349146110057, 0.8886726352666406, 0.8436599423631124, 0.8704722169542956,
0.8691999236203933, 0.8851047171657859, 0.8550670640834575, 0.8568249258160238, 0.8698912635920508,
0.8942493245851023, 0.8824640967498112, 0.8915848257269401, 0.8895752895752896, 0.8884652049571019,
0.8881239242685026, 0.8823079862437905, 0.8930072602216279, 0.8841234010534237],
'Non REM': [0.11220247612956279, 0.05950991831971996, 0.4092446000238673, 0.38363812914711126, 0.6303374243615603,
0.7472225689676695, 0.8032319391634981, 0.904359106018431, 0.8908256631641824, 0.9330246913580246,
0.9306777030522504, 0.9225924954080293, 0.9366189937236342, 0.9388825251368207, 0.9339049103663289,
0.9291829201246171, 0.9200295016331262, 0.9339135873247512, 0.9240140734128027, 0.9245681686123289,
0.933669360076905, 0.9401291584120205, 0.943256958326926, 0.9417662938681064, 0.9378061987519983,
0.9411097359735973, 0.936295227296155, 0.939005849460149, 0.9419070101611413, 0.9433807929245164,
0.9409226343367924, 0.9417220590508579, 0.9346804511278196, 0.9382665048669024],
'Pre REM': [0.03155680224403927, 0.0022271714922048997, 0.007692307692307692, 0.06753812636165578,
0.3008849557522124, 0.34635793535938253, 0.2597325408618128, 0.45390693590869186, 0.35899306822327615,
0.5172964342735498, 0.47064137308039755, 0.47084048027444253, 0.49114631873252557, 0.5261627906976745,
0.49297094657919405, 0.45897542690545606, 0.4284559417946645, 0.4837126282909416, 0.399845619451949,
0.47818499127399644, 0.4614100959532749, 0.4844020797227037, 0.49953746530989834, 0.47193990278391523,
0.4603514787826832, 0.46797153024911037, 0.43229604709840197, 0.4713715046604527, 0.49859418931583893,
0.48171846435100546, 0.4802513464991023, 0.4687083888149135, 0.4553571428571429, 0.4368932038834951],
'Artefakt': [0.2830349531116795, 0.43014394580863674, 0.42789820923656924, 0.40393667094565683, 0.4562078922040424,
0.4189991518235794, 0.4281318681318682, 0.47859922178988334, 0.34046890927624873, 0.3431708991077557,
0.4528819762122598, 0.4366505918456817, 0.45462878093492204, 0.4901185770750988, 0.47053231939163487,
0.5118924508790073, 0.4957605985037407, 0.5510662177328844, 0.5651162790697674, 0.5101298701298701,
0.5876662636033858, 0.5446478092068774, 0.595561035758323, 0.5742806811509102, 0.5995055624227441,
0.654295532646048, 0.6175528507367072, 0.5687645687645688, 0.6360655737704919, 0.6419919246298789,
0.6392447741065409, 0.6308196721311475, 0.6531165311653115, 0.6285714285714286],
'avg': [0.2187004933366135, 0.24426606814895244, 0.24195573488921474, 0.42793916802509, 0.6124116712746371,
0.6500818504890743, 0.6534098810434085, 0.7357895346999641, 0.681814520279314, 0.7110354104303037,
0.7367409547369727, 0.7318862434721818, 0.7419797183065577, 0.7609469385556599, 0.7473728101186459,
0.7423023284421966, 0.7373403378957402, 0.764730569454826, 0.7392807288643903, 0.7484360859314787,
0.7637523129064951, 0.7642758620431855, 0.772061799295614, 0.7621335103480793, 0.7675727725189074,
0.7862082368262222, 0.767971799945599, 0.7677061104974039, 0.7874447082312013, 0.7855209502032261,
0.7841774055060651, 0.7790149478503313, 0.7810526397159825, 0.7721373386389502],
}
f1_scores_005b_train = {
'Wake': [0.707201114799787, 0.844833893612814, 0.8836289499511725, 0.9136675394090006, 0.9331268346799926,
0.9440160977644719, 0.9503148608423141, 0.9578379703395024, 0.9631408961466038, 0.9671228181840438,
0.9698286833088595, 0.9716694830078034, 0.9734237218523942, 0.9752119084604376, 0.9767090390644487,
0.9774589612074769, 0.9791858970435208, 0.980704874738477, 0.9816784841015891, 0.982599684966843,
0.9833402350842544, 0.9840535307237923, 0.984698430130512, 0.9856748419622672, 0.9862769183995215,
0.9870804961834868, 0.9877587259852987, 0.9886263315873108, 0.9892306447142847, 0.989663011729968,
0.9902686366524306, 0.9907959356892991, 0.9913237584781623, 0.9914727427054663, 0.9920273572038347,
0.9922955600742727, 0.9926898432977147, 0.9929614609936386, 0.9932511499540018, 0.9934780635809086,
0.9939334469943211, 0.9940459105193821, 0.9940008097066654, 0.9944160942100098, 0.9944404916705514,
0.9946316233696132, 0.9947269109120309, 0.9949824200683568, 0.9950880085579552, 0.995274964672633],
'REM': [0.07988582374039924, 0.42404723564143854, 0.5958738516090903, 0.6597943888780543, 0.7328192140235052,
0.7749508533006639, 0.8084947195764152, 0.8325194894200292, 0.8468050168455027, 0.8596969611784218,
0.8676976425515256, 0.8762131883977594, 0.8828155072862249, 0.8902285994871515, 0.8945229969120755,
0.8987926424114739, 0.9071303410163095, 0.9135317086306719, 0.9159120310478654, 0.9211638360293919,
0.9230727777328698, 0.9255633840692734, 0.9315754069689224, 0.9331973482916879, 0.9363863581391599,
0.9405327110324293, 0.9413279678068411, 0.9461649938274919, 0.9475408075601374, 0.9498537737114646,
0.9538593527976621, 0.9556917782438028, 0.9589659527584447, 0.9598302991246442, 0.9619075781607034,
0.9631461519851616, 0.9649202978414558, 0.9673866322802493, 0.9689177582134422, 0.9687978714827059,
0.9711308644627655, 0.9710588487972508, 0.9718873345326638, 0.9729163308076736, 0.9751919669226226,
0.9758534554537884, 0.9746770858508553, 0.9769694360740422, 0.9777968926401807, 0.977835093092609],
'Non REM': [0.5618943612905138, 0.8291478985965827, 0.8351290403407666, 0.8656160591835054, 0.8910454883023418,
0.9084527744516703, 0.9137885522269863, 0.9227873691743448, 0.9296582107275982, 0.9353472756421778,
0.9391260510253687, 0.9424340145242077, 0.9450760110390526, 0.9476324026996218, 0.9498594818051601,
0.950987352042073, 0.9535891291027812, 0.95531360243065, 0.9570849086040621, 0.9589790337283501,
0.9603610931565149, 0.9617046011879893, 0.9631225409880732, 0.9649080111149452, 0.9660943628742908,
0.968060969224504, 0.969351291419016, 0.971259162256052, 0.9724208673131626, 0.9735048488928513,
0.9749951780833882, 0.9760603259405912, 0.9773407407946758, 0.9780711975995572, 0.9788402366863905,
0.9795692343563288, 0.9802957100904328, 0.981163011003425, 0.9817435792787802, 0.9825664058797366,
0.9836305834657956, 0.9837942703775017, 0.9841998964644807, 0.9844630244777555, 0.9850174698927007,
0.9854790244471673, 0.9856067348516904, 0.9861282850941987, 0.9864709058801208, 0.987015735847955],
'Pre REM': [0.04629976534616371, 0.10604466992513766, 0.13119008145318245, 0.1380129787039576, 0.222433279513724,
0.29180610000956114, 0.33508158508158503, 0.3600116132778477, 0.3670751712824471, 0.38125948406676785,
0.3949400055808762, 0.4129458146144677, 0.42276273519963287, 0.43649211813734373, 0.44708192039978584,
0.45008460236886627, 0.4781886528542705, 0.48728153659802736, 0.508757014113246, 0.5353322664869873,
0.5456518110499081, 0.5656615587411437, 0.5855737704918033, 0.5941553111147594, 0.6130466413386144,
0.6294169968464463, 0.6407204889031842, 0.6621966794380587, 0.6730249562867588, 0.6831393046646076,
0.7025027546041239, 0.7183890103028411, 0.7284037011118887, 0.7424982554082344, 0.7461484864906711,
0.7543832666871733, 0.7642114914425426, 0.7739070515274481, 0.7840856924254017, 0.7887045212361089,
0.8016704631738801, 0.8012970364225925, 0.8110230275575688, 0.8112098839837276, 0.8253681995792005,
0.8258025712352455, 0.8275295172619939, 0.8327991054789415, 0.8417693335312453, 0.8425360916803095],
'Artefakt': [0.003648939356806361, 0.020145044319097503, 0.04468802698145025, 0.06972690296339337,
0.0707635009310987, 0.09065550906555091, 0.02011173184357542, 0.0030165912518853697, 0.0,
0.006259780907668232, 0.0, 0.0031695721077654522, 0.0030627871362940277, 0.0, 0.0031397174254317118,
0.0124804992199688, 0.04833836858006043, 0.184, 0.250620347394541, 0.338785046728972,
0.3552941176470588, 0.37657864523536166, 0.42045454545454547, 0.43863636363636366, 0.4760869565217391,
0.5283422459893049, 0.5254054054054053, 0.5744016649323622, 0.5806451612903225, 0.6134969325153374,
0.6459378134403209, 0.6804733727810651, 0.7057673509286414, 0.7117031398667935, 0.7431279620853081,
0.7377358490566037, 0.7531219980787703, 0.767097966728281, 0.8, 0.8025594149908593, 0.8120437956204379,
0.8033088235294117, 0.8091324200913242, 0.813466787989081, 0.8324324324324325, 0.8255395683453237,
0.8520499108734403, 0.852863436123348, 0.845601436265709, 0.8571428571428572],
'avg': [0.279786000906734, 0.44484374841901414, 0.4981019900671324, 0.5293635738275823, 0.5700376634901325,
0.6019762669183837, 0.6055582899141753, 0.6152346066927219, 0.6213358590004303, 0.629937263995816,
0.6343184764933261, 0.6412864145304007, 0.6454281525027197, 0.6499130057569109, 0.6542626311213804,
0.6579608114499718, 0.6732864777193884, 0.7041663444795653, 0.7228105570522608, 0.7473719735881089,
0.7535440069341213, 0.762712343991512, 0.7770849388067712, 0.7833143752240047, 0.7955782474546652,
0.8106866838552342, 0.812912775903949, 0.8285297664082553, 0.8325724874329332, 0.8419315743028457,
0.8535127471155851, 0.8642820845915198, 0.8723603008143626, 0.8767151269409391, 0.8844103241253816,
0.885426012431908, 0.8910478681501832, 0.8965032245066084, 0.9055996359743252, 0.907221255434064,
0.9124818307434401, 0.9107009779292277, 0.9140486976705405, 0.9152944242936496, 0.9224901120995016,
0.9214612485702276, 0.9269180319500021, 0.9287485365677774, 0.9293453153750422, 0.9319609484872728]
}
f1_scores_005b_valid = {
'Wake': [0.8323089070894425, 0.8284153329088998, 0.76086896816896, 0.8543558694920955, 0.8970359320275004,
0.9254204031050448, 0.9249679537832095, 0.9430707099333994, 0.9459074225848983, 0.953157261611936,
0.9541666666666667, 0.9567336559177763, 0.9672777414393552, 0.9625220836692339, 0.9696717473859439,
0.9707054707489862, 0.9776465626318009, 0.9808552827837927, 0.9806192058772083, 0.9807722699257231,
0.9796699438202248, 0.9808293725815856, 0.9814246373506869, 0.9815708798759646, 0.9803556694696558,
0.9803756214972155, 0.9765371450866335, 0.980597539543058, 0.9810310513059866, 0.9800680773414747,
0.9805787736180376, 0.9813605561911466, 0.9807949820283318, 0.9807884977062205, 0.9817143058665867,
0.9815140845070423, 0.981657848324515, 0.9815078736693938, 0.981851499453783, 0.981689371376205,
0.9809351443481927, 0.9817649548532732, 0.9810397338168759, 0.9811619161424102, 0.9809051587720223,
0.9812949133436664, 0.9812804061200028, 0.9810630703497265, 0.9809619414945141, 0.9809004572634541],
'REM': [0.24989411266412537, 0.6955486788859796, 0.6004250797024442, 0.6847744829304759, 0.8363947031183256,
0.8227215980024969, 0.8434114634626748, 0.8608051271780492, 0.8796296296296297, 0.8476639183352964,
0.8884348181446671, 0.8852459016393442, 0.8904705417160934, 0.8691514670896114, 0.8955759266640095,
0.893625419380304, 0.9085534095388254, 0.9128662914806908, 0.918822832312858, 0.908984145625367,
0.9136328427575523, 0.9112541447240103, 0.9135707410972088, 0.9106549364613881, 0.9122137404580153,
0.9129026110158185, 0.9081039162466071, 0.9120062573328119, 0.9144178874325367, 0.9068627450980392,
0.9121371517631015, 0.9119411650861233, 0.9107497024990083, 0.9107763615295481, 0.9124709527498064,
0.9141092453194364, 0.9120750293083236, 0.9082371355899043, 0.9107176851323053, 0.9115859635365615,
0.9109483423284502, 0.910136041387239, 0.9141092453194364, 0.9133980582524273, 0.9162313793770555,
0.9117703349282298, 0.9121660580434364, 0.9125358851674641, 0.9099029126213591, 0.9120245870149828],
'Non REM': [0.7628060321142928, 0.6757905583821731, 0.41258687258687254, 0.7493693693693695, 0.8330781863222646,
0.8782678913899263, 0.8675785508970166, 0.9017147026632616, 0.9038968578408844, 0.9183336918333692,
0.9129357505581042, 0.9244289945898309, 0.9409454616857297, 0.9511503792037997, 0.9555733841448127,
0.9578517162700899, 0.9614854536798056, 0.9601379551645715, 0.9597963614584114, 0.9597162908019281,
0.9608316971253084, 0.9630257971159124, 0.9623348848911811, 0.9630223871242698, 0.9613496160141004,
0.9616458338572974, 0.9631002780630779, 0.9624965367856334, 0.9622617822080498, 0.9590334534747956,
0.9614989089267351, 0.9607779416543759, 0.9626966292134832, 0.9612726495941293, 0.9627369579352772,
0.9619326867654061, 0.9632373182512075, 0.9624624624624625, 0.9626595637752539, 0.9628058971736474,
0.9618562137458253, 0.9627680897975547, 0.9608857200241012, 0.9618163572503763, 0.9618382020212178,
0.9625043861847711, 0.9621903520208606, 0.9610363476292292, 0.9621534914030778, 0.9624237556163558],
'Pre REM': [0.0784313725490196, 0.15800415800415799, 0.05771643663739021, 0.2256297918948521, 0.3815668202764977,
0.4081272084805654, 0.47406340057636887, 0.46102819237147596, 0.5048689138576778, 0.42882249560632685,
0.5349626612355738, 0.5187406296851574, 0.49786019971469336, 0.4683544303797469, 0.47275775356244765,
0.4988085782366958, 0.5358166189111748, 0.49961089494163424, 0.5101543460601138, 0.538896746817539,
0.5066469719350074, 0.5412907702984039, 0.5286343612334802, 0.5469613259668509, 0.5063861758076634,
0.48318999218139164, 0.5189028910303929, 0.5305832147937412, 0.512035010940919, 0.49547668754349333,
0.5292439372325249, 0.5255579553635709, 0.5334302325581395, 0.5236111111111111, 0.522839072382291,
0.5176960444136016, 0.5266067726330339, 0.5258019525801952, 0.5101611772950245, 0.5239114917915775,
0.5205861828332171, 0.5138888888888888, 0.5165745856353591, 0.5188343994314143, 0.5226781857451405,
0.5144092219020173, 0.5231416549789621, 0.5049645390070923, 0.5160370634354954, 0.5105762217359592],
'Artefakt': [0.07913669064748202, 0.02298850574712644, 0.35105315947843535, 0.16975308641975306,
0.33698030634573306, 0.022764227642276424, 0.0, 0.0, 0.0, 0.0, 0.0, 0.007547169811320755,
0.003913894324853229, 0.0, 0.0038910505836575876, 0.15161290322580645, 0.6086086086086087,
0.6532066508313539, 0.5879194630872484, 0.6101694915254237, 0.7304832713754648, 0.7086156824782187,
0.7693898655635988, 0.7570093457943925, 0.7216294859359845, 0.7411545623836125, 0.621676891615542,
0.7433016421780467, 0.7394807520143242, 0.7462946817785526, 0.7047413793103449, 0.6997792494481235,
0.7386363636363635, 0.754601226993865, 0.7590361445783134, 0.7287958115183245, 0.7708333333333333,
0.7382978723404255, 0.7561904761904761, 0.7278481012658228, 0.7329729729729729, 0.7582089552238805,
0.7381889763779529, 0.729362591431557, 0.7551401869158879, 0.7391742195367573, 0.7632850241545894,
0.7512291052114061, 0.7404580152671757, 0.7330677290836654],
'avg': [0.4005154230128725, 0.4761494467856674, 0.43653010331482045, 0.5367765200213092, 0.6570111896180644,
0.611460265724062, 0.622004273743854, 0.6333237464292372, 0.646860564782618, 0.6295954734773856,
0.6580999793210024, 0.658539270328686, 0.6600935677761449, 0.6502356720684783, 0.6594939724681742,
0.6945208175723765, 0.798422130674043, 0.8013354150404087, 0.791462441759168, 0.7997077889391961,
0.8182529454027115, 0.8210031534396262, 0.8310708980272311, 0.8318437750445732, 0.816386937537084,
0.8158537241870671, 0.7976642244084505, 0.8257970381266583, 0.8218452967803632, 0.8175471290472711,
0.8176400301701487, 0.8158833735486681, 0.8252615819870653, 0.8262099693869749, 0.827759486702455,
0.8208095745047622, 0.8308820603700827, 0.8232614593284764, 0.8243160803693685, 0.8215681650287628,
0.8214597712457318, 0.8253533860301673, 0.8221596522347451, 0.820914664501637, 0.8273586225662648,
0.8218306151790884, 0.8284126990635702, 0.8221657894729837, 0.8219026848443244, 0.8197985501428835],
}
f1_scores_006_train = {
'Wake': [0.579378427988575, 0.7998082197225646, 0.8666271691018058, 0.9010434172466837, 0.9312967778958037,
0.9446175265058951, 0.9496370246998778, 0.9527800585224185, 0.9545874951498009, 0.9608831960963707,
0.9644870046389308, 0.9670754221021359, 0.9699339500602787, 0.9713167486118246, 0.973124943465325,
0.9741151843727609, 0.976176954410152, 0.9773267060062192, 0.9782488379952294, 0.9795819416011206,
0.9802448995588476, 0.9813253853676709, 0.9823297129957129, 0.9825869549231561, 0.9833294534226938,
0.9843653079987742, 0.9847601027430835, 0.9853587259247637, 0.9861863010474285, 0.9869103530772927,
0.9872187086336226, 0.9876281683510599, 0.9882884230191205, 0.9886558702070682, 0.9891948892758172,
0.9894921706369452, 0.9900826000505064, 0.9903368846508526, 0.9908246080040027, 0.9909178980930774,
0.9915995653848135, 0.9917565370097396, 0.9920150673912617, 0.992126602273229, 0.9923758125843247,
0.992511889490892, 0.9928760431508243, 0.9927932259267254, 0.9932616571858894, 0.9933674445529158],
'REM': [0.07884999787351678, 0.34322755030533586, 0.570007837202389, 0.6258582182149062, 0.7288473244424769,
0.7847412956027189, 0.8094058042843769, 0.8198774826250583, 0.8240618101545254, 0.8438867652761619,
0.8546061157526126, 0.8623525205577404, 0.8709041095890412, 0.8754745841413782, 0.8848604161539935,
0.8875409569714858, 0.8957725159476702, 0.9029786315562272, 0.9079731442284359, 0.9115199181188892,
0.9153608385969628, 0.9176073142612006, 0.9213242192735559, 0.9246177329084434, 0.9283261802575107,
0.9297262514411346, 0.9316883465200483, 0.9358836785062774, 0.9379435948255082, 0.9394767878203066,
0.9423463507464687, 0.9445575316048854, 0.9458605547820499, 0.9488127780457737, 0.9502318226891432,
0.9509330759330759, 0.9543432827822733, 0.955135077186964, 0.956694285790899, 0.9580376509653751,
0.9588410143802052, 0.9608935554722237, 0.9622919625867661, 0.9622217465753425, 0.9627465694682676,
0.9652232202708138, 0.965778040015019, 0.9665228229113618, 0.9689191361663362, 0.9680257510729614],
'Non REM': [0.4183178586245868, 0.7847612372640613, 0.8285060496615665, 0.8552045251996144, 0.8928599885551202,
0.9088973969646994, 0.915244280539147, 0.9191784998693265, 0.9210851024565694, 0.9288232270953826,
0.9335841182395477, 0.9368311598284302, 0.9403632763523497, 0.9421480434711896, 0.9443630350856245,
0.9461308607544505, 0.9483412064940001, 0.950286128214415, 0.9515167547861759, 0.9536994051936747,
0.954804595700235, 0.956706534274296, 0.958330914789877, 0.9588642287224388, 0.960516807500826,
0.9621978404989943, 0.9632587801377205, 0.9645451407183998, 0.9659488633266097, 0.9677435779933298,
0.9684458604285777, 0.9693860845839019, 0.970597973403191, 0.9718481539564313, 0.9724691200814976,
0.9732156500352904, 0.9747685539263888, 0.9752155760767884, 0.976328474275146, 0.9768161755065771,
0.9779935958850465, 0.9783946232446316, 0.9792355142298121, 0.9796163812425516, 0.9802652674537239,
0.9805709869792806, 0.9811923427529626, 0.9813748359819215, 0.9821363470652571, 0.9821134298756035],
'Pre REM': [0.03170637970791699, 0.07956396441548678, 0.16642120765832105, 0.13239369704648035, 0.17011762418586565,
0.2485068050523842, 0.2977490097575114, 0.31119359249853484, 0.33168460867035204, 0.3677283997711234,
0.36354879106059146, 0.38775316154796996, 0.4025228278264144, 0.4112760197890414, 0.42948185092823493,
0.4323329037009758, 0.4432530667878237, 0.4621449690887913, 0.47179487179487173, 0.4888036943452122,
0.4974265026607346, 0.5138530373429702, 0.5237728090465177, 0.5374195733152727, 0.5565950273914876,
0.5652646542353039, 0.5792818819645068, 0.5974260185261088, 0.6056188057990008, 0.6219046845822848,
0.6288684915928844, 0.647314248954648, 0.6520653836862871, 0.6672507167887862, 0.6704382470119522,
0.6803044719314938, 0.6981950027587294, 0.7043031977891827, 0.7111913357400723, 0.7162848878117426,
0.7340020216157376, 0.7385285425416083, 0.7474606497635109, 0.7511991335293207, 0.7620220050780949,
0.7677449026521539, 0.774405626481156, 0.7774116925906062, 0.7839633447880872, 0.7841852670069323],
'Artefakt': [0.003233826520854704, 0.005933837709538644, 0.014263074484944533, 0.017681728880157174,
0.015827338129496403, 0.027027027027027025, 0.052230685527747546, 0.030162412993039442,
0.0026631158455392816, 0.0, 0.009244992295839754, 0.0032, 0.0, 0.0, 0.003236245954692557,
0.03189792663476874, 0.08333333333333333, 0.13049645390070921, 0.19302949061662197, 0.2154255319148936,
0.24396442185514614, 0.27411167512690354, 0.3376932223543401, 0.3321385902031063, 0.35308343409915355,
0.41600000000000004, 0.3918757467144564, 0.4149659863945579, 0.4636058230683091, 0.48785871964679917,
0.5151515151515151, 0.5413533834586466, 0.5589798087141339, 0.5699263932702417, 0.5840336134453781,
0.624229979466119, 0.6321138211382114, 0.6573146292585169, 0.6825396825396826, 0.6787512588116819,
0.6944444444444445, 0.704724409448819, 0.703888334995015, 0.7378455672068637, 0.7358309317963497,
0.7381404174573054, 0.7586206896551725, 0.7614503816793893, 0.7556818181818182, 0.7638758231420507],
'avg': [0.22229729814309004, 0.40265896188339745, 0.48916506762180534, 0.5064363173175683, 0.5477898106417525,
0.582758010230545, 0.6048533609617321, 0.6066384093016756, 0.6068164264553574, 0.6202643176478077,
0.6250942043975045, 0.6314424528072553, 0.6367448327656168, 0.6400430792026868, 0.647013298317574,
0.6544035664868885, 0.6693754153945959, 0.6846465777532724, 0.700512619884267, 0.709806098234758,
0.7183602516743852, 0.7287207892746083, 0.7446901756920006, 0.7471254160144835, 0.7563701805343342,
0.7715108108348414, 0.7701729716159631, 0.7796359100140215, 0.7918606776133712, 0.8007788246240025,
0.8084061853106137, 0.8180478833906282, 0.8231584287209565, 0.8292987824536603, 0.8332735385007576,
0.843635069600585, 0.8499006521312218, 0.856461072992461, 0.8635156772699606, 0.8641615742376908,
0.8713761283420494, 0.8748595335434043, 0.8769783057932731, 0.8846018861654615, 0.8866481172761521,
0.8888382833700892, 0.8945745484110269, 0.8959105918180008, 0.8967924606774776, 0.8983135431300928],
}
f1_scores_006b_train = {
'Wake': [0.671187161228611, 0.7736797720349422, 0.8092740042350551, 0.868999069900551, 0.9200443620776722,
0.9455887860467603, 0.9536779285218938, 0.9562648302962027, 0.9604987472711023, 0.9633808324982279,
0.9675940744288097, 0.9688429186228481, 0.9704172663276801, 0.9725349910078974, 0.9744282317019465,
0.9762750362862466, 0.9777015269473535, 0.9785752583528583, 0.979005221753059, 0.9804129013298067,
0.9810565608864766, 0.9815682767576043, 0.9821977364853273, 0.9827205512955298, 0.983597556790886,
0.9840264045811066, 0.9847281462960239, 0.9854598497199104, 0.9858928444486933, 0.9867881593659885,
0.9871719130347385, 0.9877186015384841, 0.9882765383672469, 0.9884020871339179, 0.9891881420230362,
0.9896447636539297, 0.9900251577878801, 0.9902873578719971, 0.9905258949877741, 0.9909232225257076,
0.9913509747937087, 0.9916058707407089, 0.9915487431023912, 0.9919215601640212, 0.9921956627309786,
0.9922458948855275, 0.9928685288275253, 0.9929457588705366, 0.9931080491118949, 0.9931387387740984],
'REM': [0.05032760421612382, 0.07704877170631734, 0.0903577731429488, 0.36155828633324616, 0.6518008061370434,
0.7656607158357688, 0.8046364121130477, 0.8208365780398265, 0.8368989854433173, 0.848013674082651,
0.863901118433646, 0.8654856178735679, 0.869850568166409, 0.8758471130387638, 0.8823258709834603,
0.8903659849300324, 0.8946689595872742, 0.8996020649602066, 0.9047670231633257, 0.9093351964314507,
0.9126969217143931, 0.9172402667240266, 0.9164406005747897, 0.9209104834591921, 0.9255731352922183,
0.9267256446798786, 0.9312410994975414, 0.9317930904488785, 0.9359847159809488, 0.9399262866212907,
0.9411069635040417, 0.9426943339425867, 0.9447225361967814, 0.9486386970193781, 0.9499771523801844,
0.9528672005159349, 0.9533589612623996, 0.9555519724819951, 0.9560356874126625, 0.9584666254469206,
0.9590291574934221, 0.9611728693410666, 0.9611653094681394, 0.9632793402637871, 0.9648392382282629,
0.9648840206185567, 0.9664122957867584, 0.9675078610013705, 0.9665942203976495, 0.968518319544429],
'Non REM': [0.5729630527097724, 0.7307145601945986, 0.774158535620202, 0.8322798613113325, 0.8903481636655053,
0.9134181251585317, 0.9218239157480542, 0.9243447912075207, 0.9288958315253552, 0.9318766438336369,
0.9373447739039137, 0.9388167544955723, 0.9408916624990035, 0.9437014425395075, 0.9463134616289465,
0.9489962922194543, 0.9510892409374865, 0.9520855676976144, 0.9531531335702668, 0.9550752370183526,
0.9562100150424996, 0.9570464493061072, 0.9586125373480695, 0.9595648797904226, 0.9610934330881792,
0.9620074859592883, 0.9633846176186569, 0.9649490974047664, 0.9660350765028117, 0.9676250108957783,
0.9687798743052805, 0.9699420073808789, 0.9712174760388033, 0.9717756601440315, 0.9733906141438979,
0.9741361744243588, 0.9747844121820761, 0.9759817697336808, 0.9764914017793439, 0.9772628772676119,
0.9780565861188883, 0.9787294487867773, 0.979036517621346, 0.9798336843793046, 0.9803180016322723,
0.9805418252336585, 0.9815790337104048, 0.9819173050151965, 0.9825377498122536, 0.9825594745608888],
'Pre REM': [0.03571961222967935, 0.05476621028158098, 0.07108706592853548, 0.08893860998461753, 0.16928508384819063,
0.2849344978165939, 0.339523507564091, 0.3411545623836127, 0.33487743678826487, 0.34678111587982835,
0.37904439428141457, 0.3863364331092901, 0.38340891912320485, 0.3927904370564064, 0.40410256410256407,
0.4173169825343738, 0.4345583494519664, 0.4506531204644412, 0.46435001800504144, 0.4697132616487455,
0.48778748440007136, 0.5120932660518531, 0.5234678883222406, 0.5346163671974794, 0.5568958245466049,
0.5688011473888467, 0.5870671672924489, 0.6014702238374494, 0.6181788297172912, 0.6321032005225343,
0.6410695361539088, 0.6595624444982644, 0.6744223363286265, 0.6877741446686338, 0.7046985183424451,
0.7104118902680053, 0.7104930467762326, 0.7329202290375716, 0.7360124853687084, 0.7469015511731234,
0.7524245480642409, 0.7634558709477276, 0.7664301141622956, 0.7783651267907761, 0.7842896594047254,
0.7875679399831584, 0.7971687343024584, 0.7937137625877326, 0.8029263831732968, 0.8092818685068629],
'Artefakt': [0.004815682932026423, 0.013839853128089252, 0.010084033613445379, 0.017453391511305035,
0.016574585635359115, 0.01958041958041958, 0.04582210242587601, 0.10146862483311081,
0.09625668449197862, 0.11052631578947368, 0.1276595744680851, 0.14602346805736635, 0.17974683544303796,
0.17345597897503284, 0.19123505976095617, 0.20689655172413793, 0.24438902743142146,
0.22849807445442877, 0.28535669586983736, 0.2871287128712871, 0.29702970297029707, 0.35167464114832536,
0.3154034229828851, 0.36275695284159615, 0.3543689320388349, 0.3866348448687351, 0.3952380952380952,
0.41019698725376597, 0.4337899543378996, 0.46260069044879176, 0.48430493273542596, 0.47500000000000003,
0.496629213483146, 0.5488069414316703, 0.5478260869565218, 0.5382978723404255, 0.5834230355220666,
0.5861344537815125, 0.6153846153846153, 0.6253807106598984, 0.634297520661157, 0.6201873048907388,
0.6512096774193548, 0.6888888888888889, 0.6774519716885743, 0.6890424481737415, 0.6785714285714285,
0.720314033366045, 0.7071498530852106, 0.7166831194471867],
'avg': [0.26700262266324265, 0.3300098334691056, 0.3509922825080373, 0.4338458438082104, 0.5296106002727542,
0.585836508887615, 0.6130967732745926, 0.6288138773520545, 0.6314855371040036, 0.6401157164167637,
0.6551087871031738, 0.661101038431729, 0.6688630503118671, 0.6716659925235215, 0.6796810376355747,
0.6879701695388489, 0.7004814208711004, 0.7018828171859098, 0.7173264184723062, 0.7203330618599285,
0.7269561370027476, 0.7439245799975833, 0.7392244371426624, 0.752113846916844, 0.7563057763513445,
0.765639105495571, 0.7723318251885533, 0.7787738497329542, 0.7879762841975289, 0.7978086695708767,
0.8044866439466791, 0.8069834774720427, 0.8150536200829208, 0.8290795060795263, 0.8330161027692171,
0.8330715802405309, 0.8424169227061311, 0.8481751565813515, 0.8548900169866208, 0.8597869974146525,
0.8630317574262835, 0.8630302729414039, 0.8698780723547055, 0.8804577200973556, 0.8798189067369627,
0.8828564257789285, 0.883320004239715, 0.8912797441681762, 0.8904632511160612, 0.8940363041666931],
}
f1_scores_006c_train = {
'Wake': [0.6507555591023354, 0.7936605639335731, 0.8419288261293165, 0.8811481885740262, 0.9210232673471918,
0.943476795145522, 0.9549185435334538, 0.9610506936746444, 0.9648705770948548, 0.9672493882156411,
0.9694329758385655, 0.9709316102554081, 0.9720779459075953, 0.9743380417327627, 0.9754751055926157,
0.9766764704443021, 0.9772357285717431, 0.9782845611482954, 0.9791580907576204, 0.9797137529434538,
0.9803159638170467, 0.9808816070916669, 0.9814779407078388, 0.981923457831207, 0.9821323952983858,
0.9826793036428119, 0.983259885980951, 0.9835295502130518, 0.9838343071653275, 0.9840324351884536,
0.9846565063328389, 0.9848596315696546, 0.985120010985885, 0.9857266510226251, 0.9856838183021597,
0.9860212892185946, 0.9860041935918973, 0.9864521238901163, 0.9866037601673366, 0.9867703135153693,
0.9869160528458076, 0.9871646819121314, 0.9874540808569284, 0.9875052419127403, 0.9876331284040776,
0.9879071318738182, 0.9880035599491016, 0.987927639403518, 0.9881457431103569, 0.9884149242457685],
'REM': [0.07965138728004854, 0.23929279073311996, 0.4976305899014108, 0.6222483814008241, 0.7142396434958516,
0.7747083760494305, 0.8125799863852962, 0.8359924468405353, 0.8483461391749769, 0.8563580985532471,
0.8679584172426931, 0.8682065217391305, 0.8785585977899951, 0.8835469795929429, 0.8885770569662952,
0.8918853321107845, 0.8959681968358, 0.8995099359146966, 0.9064420058490514, 0.9085293801697282,
0.9090860402217283, 0.913545132553397, 0.9142029296560605, 0.9184505606523955, 0.9189884958837252,
0.920080375083724, 0.9214031138623148, 0.9246781115879829, 0.9258128448229684, 0.9277383027215444,
0.9282652951891139, 0.9293048443741455, 0.9310557507173312, 0.9329297691112659, 0.9337089201877934,
0.9358231380124491, 0.9360049288794836, 0.9371210901872418, 0.9389419465607898, 0.9387426978937777,
0.9399919452275473, 0.9415050760058011, 0.9416119082741048, 0.9427093107423393, 0.9433820369574558,
0.9432354202401371, 0.9435440592465386, 0.9448721731899027, 0.9446710314478909, 0.9467550949171657],
'Non REM': [0.5895284463938955, 0.7737187929820464, 0.8089803306916268, 0.8377097102649912, 0.8834704454028195,
0.9098155876788887, 0.9228877492712635, 0.9299900120145332, 0.933989110707804, 0.937420021388048,
0.9392407263876917, 0.9418276323277283, 0.9428608654110631, 0.9461746514005612, 0.9475888554762508,
0.9488279721090703, 0.9495729809444785, 0.9511715282583413, 0.9523678463950865, 0.9535072463768116,
0.9543635546404906, 0.955294885508639, 0.9564152099137729, 0.9572825602181378, 0.9579245994892036,
0.9589522440504712, 0.9598268907502006, 0.9602320583195375, 0.961152677492077, 0.9611588770109807,
0.9625763997080196, 0.9627867965564443, 0.9632779645998417, 0.9642774112929006, 0.964537151123275,
0.9647949004030397, 0.9651175887138087, 0.9658578421574792, 0.9662007457641901, 0.966794362019961,
0.9669163477508714, 0.9673666453376766, 0.9677356042350427, 0.9682847755291929, 0.9685535962893898,
0.9689372781753651, 0.9690701404117434, 0.9691600477146431, 0.9695069613163217, 0.9702872355127543],
'Pre REM': [0.034978527416443646, 0.06859344894026975, 0.11192483073096587, 0.15092239185750633,
0.24089983172438226,
0.2611067809820733, 0.2969011313330054, 0.3240550835042485, 0.3623419203747073, 0.3710561118458341,
0.3709215798511734, 0.37772123268306473, 0.409935602575897, 0.4118786313750807, 0.4231788684763733,
0.41891148982957666, 0.42985512561892536, 0.44974874371859297, 0.46027594913878617, 0.46928069707477554,
0.46924788607031603, 0.4897101322357474, 0.4957712093469352, 0.5083721733126187, 0.5165540251518522,
0.5275979557069846, 0.5327237321141308, 0.5414290506541428, 0.5518284993694831, 0.5565565565565566,
0.5704085021587513, 0.5676573136310809, 0.575591985428051, 0.5813395148605017, 0.5900912003943801,
0.5902874457456391, 0.59307394916509, 0.6000815993472052, 0.6083842083842083, 0.6137402088772846,
0.6125935567849007, 0.6175922172679367, 0.6193957115009746, 0.6264353774737356, 0.6323791039948246,
0.6313245246535611, 0.6297314784859268, 0.6365315134484143, 0.6417180863851271, 0.6507161718812515],
'Artefakt': [0.004290965309438546, 0.005445881552076243, 0.009418096199125462, 0.011889035667107004, 0.0,
0.002691790040376851, 0.034696406443618336, 0.08571428571428572, 0.13641900121802678,
0.15864759427828348, 0.1675257731958763, 0.1806775407779172, 0.1858064516129032, 0.19389110225763614,
0.2213740458015267, 0.24183796856106407, 0.28399518652226236, 0.3131067961165049, 0.3037667071688943,
0.3537735849056604, 0.3293556085918854, 0.34340991535671106, 0.34507042253521125, 0.36491228070175435,
0.40599769319492507, 0.43310657596371877, 0.43329532497149376, 0.47240618101545256, 0.4795580110497238,
0.4712389380530974, 0.4933920704845815, 0.4955357142857143, 0.5104510451045103, 0.5283842794759825,
0.5413533834586466, 0.5067264573991032, 0.5632911392405063, 0.5450597176981542, 0.5822510822510822,
0.5784418356456776, 0.5627705627705627, 0.5732217573221757, 0.5926724137931035, 0.602308499475341,
0.6150627615062761, 0.6147455867082035, 0.6270833333333333, 0.6069546891464701, 0.629822732012513,
0.6177685950413224],
'avg': [0.2718409771004323, 0.3761422956282171, 0.45397653473048905, 0.500783541552891, 0.551926637594049,
0.5783598659792583, 0.6043967633933274, 0.6273605043496494, 0.6491933497140739, 0.6581462428562108,
0.6630158945031999, 0.6678729075566497, 0.6778478926594907, 0.6819658812717967, 0.6912387864626124,
0.6956278466109594, 0.7073254436986419, 0.7183643130312862, 0.7204021198618877, 0.7329609322940859,
0.7284738106682934, 0.7365683345492322, 0.7385875424319638, 0.7461882065432227, 0.7563194418036183,
0.7644832908895423, 0.7661017895358182, 0.7764549903580334, 0.7804372679799159, 0.7801450219061266,
0.7878597547746609, 0.788028860083408, 0.7930993513671238, 0.7985315251526552, 0.8030748946932509,
0.796730646155765, 0.8086983599181572, 0.8069144746560394, 0.8164763486255214, 0.8168978835904139,
0.813837693075938, 0.8173700755691442, 0.8217739437320308, 0.8254486410266699, 0.8294021254304047,
0.8292299883302171, 0.8314865142853287, 0.8290892125805897, 0.8347729108544419, 0.8347884043196526],
}
f1_scores_006d_train = {
'Wake': [0.701472570723166, 0.8265532992538623, 0.8763389990047896, 0.9025408928791048, 0.927755033039081,
0.9436042222696046, 0.9517862094179943, 0.9596701847612417, 0.9631162698422417, 0.9658001129968374,
0.9683455137800475, 0.9702968844732158, 0.9716229500980627, 0.9729445513706252, 0.9748334132427908,
0.9757316237643144, 0.9767718559502534, 0.9782941864849116, 0.9790387921955138, 0.979511028564988,
0.9801050968287216, 0.9806299197161146, 0.9808377099360115, 0.9813001196008078, 0.9818001745457399,
0.9819514586908556, 0.9822495942414152, 0.9825299462120433, 0.9826580524941462, 0.9827860552582093,
0.9833717100826632, 0.9831662707663795, 0.9833660258925069, 0.9834984955159755, 0.9838422132906317,
0.9838205795949996, 0.9840791041921102, 0.9842233694252676, 0.9843405825185564, 0.9842760894038354,
0.9843761497142577, 0.9846476061546914, 0.9848702639854393, 0.9847402008152293, 0.9851279409239224,
0.9851299018225251, 0.9852824643224267, 0.9854026594583457, 0.9856630208959324, 0.98563940811306],
'REM': [0.08449167058252868, 0.329505010475301, 0.5961679178297515, 0.6497856160504814, 0.7293220710838085,
0.7859395389299696, 0.8192552225249773, 0.839224438554889, 0.851347209451364, 0.8596965056383127,
0.8636965882742629, 0.8707692307692307, 0.8756907588772774, 0.8842586296004135, 0.8904413755754129,
0.895469912102772, 0.8979944861884426, 0.9022949758636498, 0.905191205360747, 0.9072901009233413,
0.9088083179248065, 0.9126442320563274, 0.9131624114996781, 0.9156600691003564, 0.9160844776359109,
0.9167246454375166, 0.917466102149097, 0.9188899028396585, 0.9192666452235446, 0.9203397550976663,
0.9225785725758956, 0.9206706304569072, 0.9218687180036989, 0.922725930697587, 0.9243643558003368,
0.9244012979699108, 0.9249865951742628, 0.9245954259729838, 0.9260508701472557, 0.9260290103302468,
0.9269233861242865, 0.9272162075249223, 0.9277615460905461, 0.9279875646557499, 0.9290820014456669,
0.9270735691903909, 0.927867623433651, 0.9287874327615275, 0.930205121329937, 0.930859762472856],
'Non REM': [0.6133698412984345, 0.8189015393831374, 0.833371274150554, 0.8556328819666414, 0.8854447586104265,
0.9059080011878291, 0.9157538138427567, 0.9262066587156754, 0.9309721902349148, 0.9354267304979635,
0.9386217977649798, 0.9411024442105949, 0.9433159106374969, 0.9447395963480837, 0.9472158508259867,
0.9489584390357044, 0.9503241775964107, 0.9522731477954222, 0.9533300923675254, 0.9539995500823639,
0.9550793944741591, 0.9561658659520152, 0.9561744888475836, 0.9569063502035392, 0.9580145603747209,
0.9580619631590029, 0.9583850886559596, 0.9589718635155353, 0.9594169638253216, 0.9595463907040606,
0.9605410352893318, 0.9603709275368638, 0.9605888422245797, 0.9608738914753456, 0.9616551323270303,
0.961872720138354, 0.9621702520287992, 0.9623418192915975, 0.9625719734810644, 0.9625086297736274,
0.9630732903460176, 0.9632415735441083, 0.9637521074356142, 0.9638343181504335, 0.9641024895722818,
0.964213280994439, 0.9647932617013623, 0.964816740222631, 0.9652129349291793, 0.965280554929434],
'Pre REM': [0.03749094596552224, 0.09437386569872958, 0.1620845596152466, 0.19019002761084944, 0.2530832030571478,
0.2961449635814532, 0.3251139852982228, 0.3509501749078189, 0.38400596514120605, 0.40025835024912343,
0.3996660172557751, 0.40970300682530897, 0.42396313364055294, 0.43357531760435564, 0.43378049878455033,
0.454286223489574, 0.4730596818141865, 0.4799027693376161, 0.49581355200690547, 0.49854177388917476,
0.5037593984962405, 0.5230613279270147, 0.5183742591024555, 0.523684877142616, 0.5359422237151494,
0.5292136723354101, 0.5382953979066291, 0.5418637457472408, 0.5468594217347956, 0.5511081706913662,
0.5510102683007618, 0.5538919679047067, 0.5541396037161884, 0.5596511436564094, 0.564678671733025,
0.5696026218762802, 0.5717332458370928, 0.5722030556924593, 0.5762103028818679, 0.5758195046186544,
0.5817468747446687, 0.5776837307723609, 0.5842806105878531, 0.5888952117714008, 0.5866709907572564,
0.5932230869001297, 0.5927843391037049, 0.5951132973147327, 0.5921625544267053, 0.5991005460970125],
'Artefakt': [0.005403579871664979, 0.022094140249759843, 0.05039096437880104, 0.05685465382851903,
0.04666666666666667, 0.08084074373484235, 0.0, 0.012121212121212123, 0.0, 0.009419152276295133,
0.0031948881789137383, 0.0032310177705977385, 0.006359300476947536, 0.0, 0.015772870662460567,
0.0063391442155309044, 0.07807807807807808, 0.17670682730923695, 0.24358974358974358,
0.26566416040100255, 0.3192261185006046, 0.3154034229828851, 0.33609467455621306, 0.3492433061699651,
0.3591549295774648, 0.3484486873508353, 0.4013761467889908, 0.397212543554007, 0.4046783625730994,
0.427071178529755, 0.45095828635851176, 0.4363636363636364, 0.44292237442922366, 0.435374149659864,
0.42057142857142854, 0.486784140969163, 0.48829431438127086, 0.48252536640360766, 0.4729729729729731,
0.486784140969163, 0.47830923248053403, 0.513215859030837, 0.5091693635382957, 0.49890109890109896,
0.5158469945355192, 0.5154867256637168, 0.514161220043573, 0.5385450597176982, 0.5210810810810811,
0.5263157894736842],
'avg': [0.2884457216882633, 0.418285571012158, 0.5036707429958286, 0.5310008144671191, 0.5684543464914261,
0.6024874939407397, 0.6023818462167903, 0.6176345338121675, 0.6258883269339452, 0.6341201703317064,
0.6347049610507958, 0.6390205168097898, 0.6441904107460674, 0.6471036189846956, 0.6524088018182402,
0.6561570685215792, 0.6752456559254743, 0.6978943813581673, 0.7153926771040872, 0.721001322772174,
0.7333956652449064, 0.7375809537268714, 0.7409287087883885, 0.7453589444434569, 0.7501992731697972,
0.7468800853947241, 0.7595544659484184, 0.759893600373697, 0.7625758891701816, 0.7681703100562115,
0.7736919745214328, 0.7708926866056988, 0.7725771128532395, 0.7724247222010364, 0.7710223603444903,
0.7852962721097415, 0.7862527023227073, 0.7851778073571832, 0.7844293404003435, 0.7870834750191054,
0.7868857866819529, 0.7932009954053839, 0.7939667783275496, 0.7928716788587825, 0.7961660834469293,
0.7970253129142403, 0.7969777817209437, 0.8025330378949871, 0.798864942532567, 0.8014392122172094],
}
f1_scores_006e_train = {
'Wake': [0.5366547611840911, 0.7729150045176895, 0.8195031505616219, 0.8714609231955286, 0.9151834547938413,
0.9346944844615727, 0.9402570336922542, 0.9448999897073455, 0.9523893342329854, 0.9560855593001473,
0.9587755241579043, 0.9604192484716936, 0.9639707858032682, 0.9659723714804901, 0.9668302237940206,
0.9679319243777982, 0.9687551936180822, 0.9699845573430811, 0.97137618715852, 0.9725571674753425,
0.9731102428665446, 0.9738117667209043, 0.9745058428186404, 0.9753581521672641, 0.9755340604256819,
0.9760513489629106, 0.976234773412714, 0.9766599439995299, 0.9767649031095971, 0.977252029495001,
0.9775636944234931, 0.9778696170579494, 0.9781021897810219, 0.9781432272408945, 0.9782358444815643,
0.9785221221162372, 0.9789427543631524, 0.979008610658599, 0.9790228293944991, 0.9792066789479873,
0.9794816652746107, 0.9794257435445146, 0.9792880496675361, 0.9796936161040158, 0.9797454767348679,
0.9800194071983063, 0.9797511145950714, 0.9800299844198602, 0.9801839501756691, 0.9804513415049453],
'REM': [0.08761124019113586, 0.26290739532748664, 0.40727551635347614, 0.567530440212301, 0.6815129879993924,
0.7454278390599348, 0.7634561300921672, 0.7877436405682194, 0.8180207121891787, 0.830207305034551,
0.8407681755829903, 0.8453914767096135, 0.8537469118858083, 0.8591022103221223, 0.8651264524948735,
0.8674528173425202, 0.8736572332188233, 0.8747369284171974, 0.8787705387067767, 0.8815541408235198,
0.8853183479731573, 0.8898094900656838, 0.8907485396005977, 0.8955102262541762, 0.8950116955883153,
0.8961787247920857, 0.8972337370289091, 0.8993989929070334, 0.9012001191991982, 0.902249932230957,
0.9034503223717931, 0.9034738580673111, 0.9051710163721836, 0.9061673771110991, 0.90736239399341,
0.9070138007400005, 0.9071897543973413, 0.9078614149469261, 0.908516668916183, 0.9089732876896952,
0.9096549677628206, 0.9096362751986166, 0.9104372736608832, 0.9113219276196654, 0.9131770412287793,
0.9128887930569781, 0.9121973602526385, 0.9128384750101037, 0.9119274474344787, 0.9140869377629167],
'Non REM': [0.4393990914877107, 0.749769715474753, 0.7917805685538313, 0.8361974849379321, 0.8813885723353,
0.9018405572587721, 0.9082177238226607, 0.9127618388467736, 0.9201059137590354, 0.9239806246385193,
0.9271013001318973, 0.9287196179455521, 0.9332738955997957, 0.9354883131001992, 0.9370240559045158,
0.9388599309597894, 0.939764446826696, 0.9414859503233871, 0.9431584892953738, 0.944494784379961,
0.9456940501709055, 0.946151422186324, 0.9474703584550489, 0.948887591854787, 0.9489484482271148,
0.9494216145521996, 0.9497622912801484, 0.9503246788561733, 0.9505616265953859, 0.951109371489044,
0.9511991763818803, 0.9519741541540816, 0.9523181208540253, 0.9520674101898449, 0.9522407968566499,
0.9530064627440747, 0.9534551415494643, 0.9536487721384953, 0.9533373438960926, 0.9535193044385893,
0.9541956494933597, 0.9540870132458732, 0.953792148074008, 0.9547692776283061, 0.9546136615705805,
0.9547657453556865, 0.9546156579243135, 0.9547266587106111, 0.9553783127288548, 0.9556884230067767],
'Pre REM': [0.03249129174838275, 0.05078362288907788, 0.06745182012847965, 0.1047795599258483, 0.16416925831684104,
0.2608365740301622, 0.32069811835287704, 0.33428597768968377, 0.35842895792517954, 0.3624311455513024,
0.3777860326894502, 0.3949275362318841, 0.3960269728449062, 0.3794584500466854, 0.3989273164416497,
0.4052494415487714, 0.4083604273107292, 0.41812488487750965, 0.41624082504877824, 0.43508137432188065,
0.44546601766720745, 0.45021025319853275, 0.45903099394371216, 0.46789641716920893, 0.4756331877729258,
0.46745457752690067, 0.4597333333333333, 0.4759964570416297, 0.4749428521188676, 0.4770982261053746,
0.4679311865902074, 0.4827104435906392, 0.4760391845379931, 0.4764762997616736, 0.4786729857819906,
0.48663755458515284, 0.49109083007388094, 0.4896150169462067, 0.4820118756549075, 0.4813642756680731,
0.49047411918225325, 0.4888579387186629, 0.4947359262159575, 0.500996447448228, 0.49839367890943825,
0.4913710866360247, 0.4970826439083863, 0.4961990324809951, 0.49740124740124736, 0.5011282763409131],
'Artefakt': [0.00356351130171753, 0.0031190434933287122, 0.004226840436773512, 0.003188097768331562,
0.0064516129032258064, 0.003968253968253969, 0.01818181818181818, 0.02506265664160401,
0.07113543091655267, 0.09523809523809523, 0.0951086956521739, 0.12176165803108809, 0.11279229711141678,
0.14993306559571618, 0.09537166900420757, 0.1204481792717087, 0.14068965517241377, 0.1724137931034483,
0.1270718232044199, 0.21963824289405687, 0.20806241872561765, 0.22842639593908626, 0.2860635696821516,
0.30407911001236093, 0.2673521850899743, 0.27877237851662406, 0.28886168910648713, 0.33853541416566624,
0.3325301204819277, 0.29232643118148594, 0.3131067961165049, 0.3159173754556501, 0.33574879227053134,
0.3415204678362573, 0.33176470588235296, 0.35238095238095235, 0.33615477629987905, 0.35885167464114837,
0.36835891381345925, 0.35885167464114837, 0.36823935558112775, 0.35138387484957884,
0.39497716894977175, 0.3824884792626728, 0.3752913752913753, 0.35167464114832536, 0.37875288683602765,
0.38084112149532706, 0.41483198146002315, 0.40867579908675805],
'avg': [0.2199439791826076, 0.36789895634046715, 0.4180475792068365, 0.47663130120798824, 0.52974117726972,
0.5693535417557392, 0.5901621648283555, 0.6009508206907253, 0.6240160698045863, 0.633588545952523,
0.6399079456428832, 0.6502439074779663, 0.651962172649039, 0.6579908821090427, 0.6526559435278535,
0.6599884587001175, 0.6662453912293488, 0.6753492228129248, 0.6673235726827738, 0.690665141978952,
0.6915302154806866, 0.6976818656221062, 0.7115638609000301, 0.7183462994915594, 0.7124959154208024,
0.7135757288701441, 0.7143651648323184, 0.7281830973940066, 0.7271999243009952, 0.7200071981003724,
0.7226502351767758, 0.7263890896651263, 0.7294758607631511, 0.7308749564279539, 0.7296553453991935,
0.7355121785132835, 0.7333666513367436, 0.7377970978662751, 0.7382495263350284, 0.7363830442770987,
0.7404091514588343, 0.7366781691114491, 0.7466461133136314, 0.7458539496125777, 0.7442442467470081,
0.7381439346790641, 0.7444799327032875, 0.7449270544233794, 0.7519445878400546, 0.752006155540462],
}
f1_scores_006_valid = {
'Wake': [0.8167866560009481, 0.8136802715168392, 0.8140994258756509, 0.9105244888176273, 0.9378243580238592,
0.9364142520356468, 0.9305886243386243, 0.936632061480383, 0.9309808173186215, 0.9560611323376172,
0.9475517775958473, 0.9633948033076151, 0.9724115094372505, 0.9747209168253524, 0.9686261501126107,
0.9734451796661978, 0.9729663948818692, 0.9757008029299901, 0.9722549767635431, 0.9774291604066945,
0.9794556628621598, 0.9780980840217964, 0.9787748663570239, 0.979918689170876, 0.9771176234443998,
0.9791236120354478, 0.9799169949352842, 0.9775249431122004, 0.9800953872687915, 0.9790094422408648,
0.9795731169518435, 0.9786187389096788, 0.9791505520005624, 0.9779627385906687, 0.9793888703414102,
0.9797903268434499, 0.9787316182922121, 0.97926100822864, 0.9787899006215542, 0.9781587435142336,
0.9787084533764316, 0.9787622104137073, 0.9782459836713194, 0.978663672094329, 0.9784162554222793,
0.9782120552943654, 0.9790894885615465, 0.9790546476893339, 0.9790015639002618, 0.9788280769568655],
'REM': [0.011122697254084114, 0.7159015302727877, 0.5646123260437376, 0.6725027356573394, 0.7585432376062892,
0.8527187612531508, 0.853019369540448, 0.8592923952826351, 0.8131370328425821, 0.8704165866769054,
0.8861003861003861, 0.8836750788643533, 0.8981852913085006, 0.9140306617504367, 0.900236593059937,
0.9005040134403584, 0.8816778789077958, 0.8874222138412219, 0.9003167505123906, 0.9093379926227916,
0.9105283455457, 0.9026083693000563, 0.9100136638688268, 0.9112176414189836, 0.908310573546625,
0.9048332708879729, 0.91244418559503, 0.9095074455899198, 0.9068841266831026, 0.9086323957322988,
0.9121531100478468, 0.9072985781990521, 0.9121436938695822, 0.9130602782071099, 0.90905565251115,
0.9086353122590594, 0.8969964989865487, 0.906108597285068, 0.9069148936170213, 0.9056963231091637,
0.912085807316606, 0.9096899224806201, 0.9064609450337513, 0.9088080886642038, 0.9077306733167082,
0.9101681957186545, 0.9072847682119205, 0.9070390206579955, 0.911504424778761, 0.9101773323053199],
'Non REM': [0.7165672383793188, 0.619786681252564, 0.642835524767125, 0.8594011842252262, 0.8968874225912004,
0.8747055159901431, 0.8928038220364287, 0.9001650381159458, 0.8839958918864756, 0.9194789518684303,
0.9029514757378689, 0.9303437515728019, 0.9485185648206026, 0.9528997276429874, 0.9358204866386073,
0.9451228781352926, 0.9510808305989028, 0.9500137256369944, 0.9458158196408102, 0.9508707561631442,
0.9578301227667433, 0.9554248957234033, 0.9587440122388584, 0.9583385462279496, 0.9558459908159661,
0.9560298665057696, 0.9604686678516886, 0.9553216138618847, 0.9579653832567997, 0.9566546402084587,
0.9605180906658666, 0.9579307568438002, 0.9588292780715162, 0.9569868059234593, 0.9587083510918345,
0.9585311016737447, 0.9558184207865738, 0.9579515501443454, 0.9562569213732004, 0.9555729548152452,
0.9566963725367139, 0.9566683442375441, 0.9565610632364393, 0.9571518114579416, 0.9561524738045581,
0.9557268056814746, 0.9571174064687729, 0.9557233524822517, 0.957209980150255, 0.9562797693657558],
'Pre REM': [0.028291621327529923, 0.11320754716981131, 0.07332722273143906, 0.20954162768942938,
0.24297520661157024,
0.374830852503383, 0.40643522438611346, 0.4825018615040953, 0.4912023460410557, 0.44938271604938274,
0.4729392173189009, 0.4696707105719237, 0.44961240310077516, 0.5328413284132841, 0.49404289118347894,
0.5051546391752577, 0.4991816693944353, 0.534850640113798, 0.48787446504992865, 0.5309352517985612,
0.5291479820627802, 0.4963609898107715, 0.5091743119266056, 0.5235378031383737, 0.5072353389185073,
0.4977843426883308, 0.5368344274252371, 0.4996293550778354, 0.5, 0.5147492625368731, 0.5166051660516605,
0.5101156069364161, 0.5263157894736843, 0.5255972696245734, 0.5254237288135594, 0.5198606271777004,
0.4652827487473157, 0.5003503854239664, 0.49184975194897235, 0.5169606512890095, 0.5152590489709015,
0.5218579234972678, 0.521067415730337, 0.5240112994350282, 0.5025197984161267, 0.5095271700776287,
0.5177948360083741, 0.5056022408963585, 0.517193947730399, 0.5139664804469274],
'Artefakt': [0.0, 0.0, 0.0078125, 0.0077972709551656924, 0.0, 0.0, 0.007782101167315175, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.015414258188824664, 0.011627906976744186, 0.16071428571428573, 0.2485875706214689,
0.25850340136054417, 0.36079545454545453, 0.536986301369863, 0.5984251968503937, 0.716612377850163,
0.6029579067121729, 0.6805251641137856, 0.5105189340813464, 0.694006309148265, 0.6697782963827305,
0.7664092664092664, 0.6575654152445962, 0.7413962635201573, 0.6910229645093946, 0.7388137356919875,
0.736441484300666, 0.6842684268426843, 0.676605504587156, 0.7064017660044151, 0.7221644120707598,
0.6920565832426552, 0.6965065502183406, 0.6891133557800225, 0.6882681564245811, 0.7119386637458925,
0.6682464454976303, 0.6936170212765957, 0.7138193688792166, 0.7131782945736432, 0.6627497062279673,
0.7043478260869566, 0.6643274853801169],
'avg': [0.31455364259237617, 0.4525152060424005, 0.4205373998835905, 0.5319534614689576, 0.5672460449665838,
0.6077338763564647, 0.6181258282937859, 0.6357182712766118, 0.623863217617747, 0.6390678773864672,
0.6419085713506006, 0.6494168688633388, 0.6537455537334258, 0.6748985269264121, 0.6628280758366917,
0.6671709234787702, 0.6931242118994577, 0.7193149906286946, 0.7129530826654433, 0.7458737231073292,
0.7827896829214493, 0.7861835071412842, 0.8146638464482955, 0.7951941173336712, 0.8058069381678568,
0.7696580052397735, 0.816734116991101, 0.8023523308049143, 0.8222708327235921, 0.8033222311926183,
0.822049149447475, 0.8089973290796684, 0.8230506098214665, 0.8220097153292956, 0.8113690059201277,
0.8086845745082222, 0.800646210563413, 0.813167190630556, 0.8051736101606807, 0.8105790445891985,
0.810372607596135, 0.811049311410744, 0.814854814283548, 0.8073762634298266, 0.8076872444472535,
0.813490719130268, 0.8148929587648513, 0.8020337935907813, 0.8138515485293267, 0.8047158288909971],
}
f1_scores_006b_valid = {
'Wake': [0.8483756717147045, 0.843067694391589, 0.8097431763215478, 0.7395030552030041, 0.7245968773995393,
0.7863708311349309, 0.8782614091148823, 0.9330533473326333, 0.9523664277362615, 0.9626032557978779,
0.9676380447768946, 0.9692278452580471, 0.9735694302048761, 0.9730005812007961, 0.9760686755430974,
0.9776256909713084, 0.9785753012574986, 0.9752264808362369, 0.9787316797199583, 0.979583934668591,
0.9807347512743892, 0.9812934447866256, 0.9804905633703258, 0.9812645958806693, 0.9807465757037611,
0.9805472086035111, 0.98113539267568, 0.9802157641353622, 0.9789817186567951, 0.9814954749143308,
0.9815831758868504, 0.9808247132502991, 0.98065447376296, 0.9814003413750022, 0.9812050565254848,
0.9805601085672994, 0.9800973176172992, 0.9807394366197183, 0.9811373873873873, 0.9804377300019369,
0.9803148913712727, 0.9805915785398813, 0.9802742616033755, 0.9803115001933692, 0.9800235844905574,
0.979253988940157, 0.980331390537233, 0.9805643738977073, 0.98014456305728, 0.9797592227541538],
'REM': [0.028506640751538713, 0.1037451571244081, 0.017167381974248927, 0.38324796625489604, 0.18653576437587657,
0.640321817321344, 0.8297663459650501, 0.8010752688172044, 0.8768492602958816, 0.9026025236593059,
0.8878957169459962, 0.8954650269023827, 0.9002716336825766, 0.898006580220631, 0.9050814956855225,
0.9037807561512302, 0.9027144838517932, 0.9089154766499422, 0.9086372360844531, 0.9102095750817152,
0.9123345482447727, 0.9123878602786792, 0.9075533346146454, 0.9063965484899643, 0.9086660175267771,
0.911601150527325, 0.9140445126630851, 0.9112887502437121, 0.9110512129380054, 0.9146153846153847,
0.9144838212634822, 0.9148484263371307, 0.9165856503986, 0.9159566227730441, 0.9157140089130015, 0.9140625,
0.9118436182445382, 0.9090560245587107, 0.9124513618677043, 0.9124854142357058, 0.9123890389810884,
0.912842267643656, 0.9131619937694703, 0.9136328427575523, 0.9084249084249085, 0.9108415174273059,
0.9095083221733309, 0.9129676293855399, 0.9098646034816248, 0.9101426918627074],
'Non REM': [0.7583792195355519, 0.8374450075179595, 0.6541232196309332, 0.2657541322314049, 0.171405213915887,
0.4843257837108144, 0.775517595219412, 0.8976739223218096, 0.924012634106868, 0.9401087067993027,
0.9413036205964849, 0.9448023946019989, 0.9533683972116666, 0.9523430108062346, 0.9538407681536307,
0.9596242254647211, 0.9586363749968759, 0.9560154581511239, 0.9635477826358525, 0.9622688906752411,
0.9631638418079095, 0.9631568451490677, 0.9623928633898898, 0.9605325964074866, 0.9626111864917836,
0.9617034083214205, 0.9627658238971604, 0.9615374978075121, 0.9582544132131222, 0.9630484988452656,
0.9622382509296927, 0.9615973110592722, 0.9617409617409618, 0.9623388997542751, 0.9610095779179969,
0.9616635804013813, 0.9603905581559212, 0.9601383874849578, 0.9613718863437225, 0.9611334002006017,
0.9599578767896096, 0.9601423844379825, 0.9600824493489517, 0.9598132483245061, 0.9604494269305043,
0.9596399024316644, 0.960419910593199, 0.9612756264236901, 0.9597708369977637, 0.9593720912681442],
'Pre REM': [0.05490848585690516, 0.08643042350907518, 0.026540284360189573, 0.005141388174807198,
0.005263157894736842, 0.12895662368112545, 0.24899598393574296, 0.3482224247948951, 0.4742729306487696,
0.4868624420401855, 0.44011976047904194, 0.4094488188976378, 0.4018433179723502, 0.46473029045643155,
0.473063973063973, 0.5347593582887701, 0.5408618127786033, 0.5156017830609212, 0.5221971407072987,
0.51818856718634, 0.4977168949771689, 0.4924012158054712, 0.5208333333333334, 0.49101796407185627,
0.5182584269662921, 0.4984709480122324, 0.4962292609351432, 0.5085501858736059, 0.5003436426116838,
0.5277777777777778, 0.5113960113960114, 0.5104844540853217, 0.5136298421807747, 0.5230094959824689,
0.507256392536282, 0.5222929936305734, 0.49333333333333335, 0.5132743362831859, 0.51,
0.5088841506751954,
0.503925767309065, 0.510846745976207, 0.5097493036211699, 0.5025053686471009, 0.4985549132947977,
0.5103734439834026, 0.5007072135785007, 0.5120567375886524, 0.5045422781271838, 0.5058259081562715],
'Artefakt': [0.014939309056956115, 0.007285974499089253, 0.04964539007092198, 0.045801526717557245, 0.0, 0.0,
0.24027072758037224, 0.2546728971962617, 0.2048780487804878, 0.5632183908045977, 0.5625,
0.33753943217665616, 0.5759577278731836, 0.44467425025853147, 0.44720496894409945, 0.6375908618899273,
0.4835479256080114, 0.6745098039215687, 0.6695576756287944, 0.7052441229656419, 0.7475915221579962,
0.6096938775510204, 0.7009708737864078, 0.6697782963827305, 0.7485714285714287, 0.7369498464687819,
0.771760154738878, 0.7202441505595116, 0.7335907335907336, 0.7074527252502781, 0.7601626016260163,
0.7666335650446872, 0.7690839694656489, 0.7683397683397684, 0.7500000000000001, 0.7648183556405354,
0.7449856733524356, 0.6893523600439079, 0.7538940809968847, 0.7542533081285444, 0.7203302373581012,
0.7176220806794057, 0.7533460803059272, 0.738430583501006, 0.7399411187438666, 0.7252747252747253,
0.7475728155339806, 0.7438794726930319, 0.7502448579823702, 0.7397003745318352],
'avg': [0.3410218653831313, 0.3755948514084242, 0.3114438904715683, 0.2878896137163339, 0.21756020271720794,
0.40799501116964293, 0.5945624123630919, 0.6469395720925608, 0.6864758603136537, 0.7710790638202539,
0.7598914285596836, 0.7112967035673445, 0.7610021013889305, 0.746550942588525, 0.7510519762780646,
0.8026761785531914, 0.7728671796985565, 0.8060538005239586, 0.8085343029552714, 0.8150990181155058,
0.8203083116924473, 0.7917866487141729, 0.8144481936989205, 0.8017980002465415, 0.8237707270520085,
0.8178545123866542, 0.8251870289819893, 0.8163672697239408, 0.816444344202068, 0.8188779722806074,
0.8259727722204108, 0.8268776939553423, 0.8283389795097891, 0.8302090256449117, 0.8230370071785531,
0.828679507647958, 0.8181301001407055, 0.810512108998096, 0.8237709433191398, 0.823438800648397,
0.8153835623618273, 0.8164090114554264, 0.8233228177297789, 0.818938708684707, 0.8174787903769267,
0.8170767156114509, 0.8197079304832489, 0.8221487679977244, 0.8209134279292446, 0.8189600577146223],
}
f1_scores_006c_valid = {
'Wake': [0.8618463925523662, 0.8696090635488395, 0.8205569324974487, 0.7489534205924434, 0.8367503692762186,
0.9225929081732976, 0.927912685774947, 0.9501896161760454, 0.9676521254937444, 0.9754575267110971,
0.9746921050758169, 0.9757899343544856, 0.9758854822903542, 0.9773763591722202, 0.9760144337920543,
0.9773163896575428, 0.9786192321239873, 0.9799391452023776, 0.9806678383128296, 0.9806902362812906,
0.9801705682097358, 0.9809206701548544, 0.9802884025721444, 0.980900888249131, 0.9823445204390011,
0.9819735847065652, 0.9809778779766098, 0.9812053981488024, 0.9817900311416857, 0.9820713970912296,
0.9822017604205253, 0.9820073095305032, 0.9812505511949907, 0.981505874914379, 0.9814889975118671,
0.9823347745521926, 0.9822433037682284, 0.9821919740461245, 0.9817028027498679, 0.9827312775330396,
0.9821951133519021, 0.9815147353966409, 0.9823157078124725, 0.9819018836097836, 0.9820801186419731,
0.981888722334891, 0.9814655399588904, 0.9819666074350358, 0.9818438464931628, 0.981900691256398],
'REM': [0.047337278106508875, 0.5710729400049789, 0.7495454545454545, 0.7742782152230971, 0.6981091067159313,
0.7364034173786207, 0.8390453974520007, 0.8677819751753914, 0.8985343855693347, 0.8998659774076201,
0.8906852838508176, 0.897367417016406, 0.9052552269730646, 0.909090909090909, 0.9077904504156197,
0.9144634525660965, 0.899513776337115, 0.9162944261021557, 0.910704172172928, 0.9089184060721063,
0.9154404551697076, 0.9196567862714509, 0.9119411650861233, 0.9156954156954157, 0.9196166634070018,
0.9155092592592592, 0.9107891727030119, 0.9147617202634638, 0.9168932038834952, 0.9155521589606419,
0.9171185127807902, 0.9143414634146341, 0.9155780853967634, 0.9151950320201825, 0.9160246533127889,
0.9138894240030824, 0.9156954156954157, 0.9159599074787972, 0.9132770529547198, 0.9150813885075505,
0.9151162790697674, 0.9150301380517207, 0.9174776177500974, 0.9163408913213448, 0.9160662122687441,
0.9141513132105058, 0.9157523510971787, 0.915471112834432, 0.9165692007797271, 0.9166666666666666],
'Non REM': [0.7850800327141021, 0.8042562876977353, 0.6236624268120331, 0.2452418369128689, 0.6779871744536055,
0.8819601537161702, 0.8731400859693595, 0.9140811455847254, 0.94530111238972, 0.9550155763239875,
0.9574766700317632, 0.9571108368801471, 0.9540794478450338, 0.9575301129703981, 0.9587856805703922,
0.9599779603285914, 0.9616332627909872, 0.9621452669180393, 0.9601102480581307, 0.9615664616543241,
0.9618354952388094, 0.9625034121646774, 0.962448054401209, 0.9626805778491172, 0.9639834189688982,
0.9641937982559157, 0.963780475569379, 0.9647146959670372, 0.9646050950627489, 0.9640006025003767,
0.9640176158542687, 0.9639598997493734, 0.9644025879943044, 0.9634204514071953, 0.9634835676054225,
0.9639170091209782, 0.9639108267519744, 0.9650444138621294, 0.9641136318008432, 0.9650440380249008,
0.9640133043239053, 0.9632409979230788, 0.9633990530350478, 0.9626974178992229, 0.964389171910898,
0.9630295763389289, 0.9625706037404292, 0.9622779020381493, 0.9633272586564146, 0.9631614535073],
'Pre REM': [0.04081632653061224, 0.09162995594713656, 0.10396975425330814, 0.052173913043478265,
0.13922651933701657,
0.34345047923322686, 0.3482889733840304, 0.3218197135636057, 0.4571877454831107, 0.466966966966967,
0.44818871103622576, 0.42482517482517484, 0.47457627118644063, 0.4706827309236948, 0.47385620915032683,
0.5179526355996944, 0.5249813571961224, 0.5063694267515924, 0.5194424064563462, 0.5011286681715575,
0.5239520958083832, 0.505050505050505, 0.5104477611940299, 0.5465838509316769, 0.5408895265423243,
0.5367965367965368, 0.4893292682926829, 0.5277777777777779, 0.5262379896526238, 0.5157593123209169,
0.5290780141843973, 0.5240875912408759, 0.5252225519287834, 0.5260869565217391, 0.5219298245614036,
0.5183098591549294, 0.5313601127554616, 0.5178571428571429, 0.5296995108315863, 0.5375886524822695,
0.5214899713467048, 0.509719222462203, 0.5251550654720882, 0.5288326300984529, 0.5240174672489083,
0.5272601794340924, 0.5249643366619116, 0.5235816814764184, 0.5175627240143369, 0.5237084217975938],
'Artefakt': [0.025590551181102365, 0.0, 0.007782101167315175, 0.0, 0.0, 0.0, 0.35960591133004927,
0.5014691478942214, 0.6120612061206121, 0.6326530612244898, 0.6690223792697291, 0.7137476459510358,
0.6186726659167604, 0.31360000000000005, 0.5985401459854015, 0.6540447504302926, 0.7069943289224953,
0.6589371980676328, 0.5975308641975308, 0.6590909090909091, 0.6564705882352941, 0.613664596273292,
0.7095477386934673, 0.6840236686390533, 0.7198228128460686, 0.6570048309178743, 0.7439703153988868,
0.7392497712717292, 0.7340529931305201, 0.7607699358386802, 0.7497621313035204, 0.7687564234326825,
0.7316620241411328, 0.7395301327885597, 0.7315247895229186, 0.7536496350364964, 0.7575757575757576,
0.7685098406747891, 0.7610953729933899, 0.7452229299363058, 0.7695351137487636, 0.7609359104781281,
0.7587511825922422, 0.7212765957446807, 0.7661141804788214, 0.747983870967742, 0.756385068762279,
0.7696793002915452, 0.7565982404692081, 0.7758793969849246],
'avg': [0.35213411621693835, 0.46731364943973813, 0.4611033338551119, 0.36412947715437755, 0.47041463395655436,
0.5768813917002631, 0.6695986107820774, 0.7110683196787979, 0.7761473150113044, 0.7859918217268324,
0.7880130298528705, 0.7937682018054499, 0.7856938188423308, 0.7256560224314444, 0.7829973839827589,
0.8047510377164435, 0.8143483914741413, 0.8047370926083595, 0.793691105839553, 0.8022789362540376,
0.8075738405323859, 0.796359193982956, 0.8149346243893948, 0.8179768802728787, 0.8253313884406588,
0.8110956019872303, 0.817769421988114, 0.825541872685762, 0.8247158625742147, 0.8276306813423691,
0.8284356069087003, 0.8306305374736137, 0.823623160131195, 0.8251476895304111, 0.8228903665028803,
0.8264201403735358, 0.8301570833093675, 0.8299126557837966, 0.8299776742660814, 0.8291336572968133,
0.8304699563682085, 0.8260882008623543, 0.8294197253323896, 0.822209883734697, 0.8305334301098689,
0.8268627324572322, 0.8282275800441378, 0.8305953208151162, 0.8271802540825698, 0.8322633260425766],
}
f1_scores_006d_valid = {
'Wake': [0.8395779402637117, 0.7756621251892282, 0.7311085033161483, 0.7514762000401687, 0.8343441370861628,
0.8669003695890107, 0.9370517645388056, 0.9352746891697936, 0.9443139422412602, 0.9512332628611699,
0.9596058084061706, 0.9563431276980923, 0.9683043341818055, 0.9646421392991349, 0.9703792498393009,
0.9698324803046448, 0.9778089395267309, 0.9784590475520045, 0.9804859045190537, 0.9803976624607339,
0.9811685006756875, 0.9813919980320149, 0.982907644719399, 0.9818252331341336, 0.9826977401129944,
0.9831315107609329, 0.982827321132621, 0.9833944436609786, 0.983229583649285, 0.983715426189551,
0.9835550138660731, 0.9827537660143602, 0.9844045285151628, 0.9837409868514068, 0.9840230855855855,
0.9843551349060602, 0.9839935270526982, 0.9837593560231607, 0.9821501373748116, 0.9837948284365532,
0.9832056777457663, 0.9835048639503736, 0.9832451499118166, 0.9834230735281136, 0.9829177233023386,
0.9831793497425769, 0.9828767123287672, 0.9840552328147899, 0.9835851454391414, 0.9834640959786088],
'REM': [0.05846325167037862, 0.5817993259009592, 0.48363009764503156, 0.30774091627172195, 0.7217715413286561,
0.70368782161235, 0.8215127490893508, 0.8451413085559426, 0.8528565556925605, 0.8709363441697489,
0.8673334591432346, 0.844158539115999, 0.8891891891891892, 0.8882011605415862, 0.8990059642147117,
0.8820690986296081, 0.9067420266451353, 0.9128824790489183, 0.9055056618508396, 0.910737875070768,
0.9139660493827161, 0.9095400988217408, 0.9157057654075547, 0.9173666731783552, 0.917772934416485,
0.9194460698264092, 0.9202312138728324, 0.9184195006880282, 0.9155038759689922, 0.9191176470588236,
0.9186434032542639, 0.9200940070505288, 0.9220524872698785, 0.9224505622334238, 0.9167938931297709,
0.9229867083659109, 0.920591669910471, 0.9210168833689113, 0.9165526675786594, 0.9188869153345174,
0.9183317167798254, 0.9198905822586948, 0.9211698624830525, 0.9191820837390458, 0.9181467181467182,
0.9183673469387755, 0.9206903238316851, 0.922650840751731, 0.9204434934837581, 0.921011673151751],
'Non REM': [0.7532730338801165, 0.4679057867409135, 0.22788448974258457, 0.3711820188641381, 0.6800566661419801,
0.7624413682645006, 0.8951810117477823, 0.8842360795023517, 0.9113554588229374, 0.9140596200634047,
0.9349014077413181, 0.9349888254283586, 0.9491533927003637, 0.9495510367424528, 0.958806000050084,
0.952454793287147, 0.9621138816524004, 0.9606460646064606, 0.9627125385303769, 0.9588965655351958,
0.9654828162827264, 0.9634648198333835, 0.9650294306771529, 0.9651647008951949, 0.966512184182987,
0.9662123296236088, 0.9661306532663317, 0.9658680096736393, 0.9663726571113561, 0.9672421978461307,
0.9676165803108808, 0.9651376146788991, 0.9675303704071746, 0.967563389762896, 0.966498531958142,
0.9675264797507789, 0.9665546808403951, 0.9670263788968825, 0.9656749434543782, 0.9673074997496746,
0.9660842237586423, 0.9665496489468406, 0.9665248936702527, 0.9660503865302343, 0.9650391802290536,
0.9647943831494484, 0.9663247435576683, 0.9672993938789254, 0.9657798486898143, 0.9652676551897461],
'Pre REM': [0.021505376344086023, 0.06759443339960239, 0.0935672514619883, 0.04539722572509458, 0.22198952879581152,
0.2914757103574703, 0.37134778510838834, 0.3889340927583401, 0.4758893280632411, 0.43087362171331633,
0.4683734939759036, 0.4592833876221498, 0.5193855157278712, 0.52356780275562, 0.5024077046548957,
0.47396226415094345, 0.5079617834394905, 0.5380029806259314, 0.570281124497992, 0.47719869706840395,
0.5128205128205128, 0.4984615384615384, 0.5342362678705793, 0.5227447956823439, 0.5481798715203426,
0.5540443808160345, 0.5436893203883496, 0.5397520058351568, 0.5475017593244195, 0.5541310541310541,
0.5331302361005331, 0.5482014388489208, 0.5248447204968943, 0.5354449472096531, 0.5382963493199714,
0.544649446494465, 0.5455871626549964, 0.5345080763582967, 0.5260837619397503, 0.5413313825896123,
0.5384615384615384, 0.5449358059914409, 0.5340236686390533, 0.5347670250896057, 0.5372076541459958,
0.5219818562456385, 0.537117903930131, 0.5443873807776962, 0.5374570446735396, 0.5404644616467277],
'Artefakt': [0.0028011204481792713, 0.2966507177033493, 0.4111986001749781, 0.2077562326869806, 0.22045454545454543,
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.007476635514018692, 0.0, 0.03308823529411765,
0.44755244755244755, 0.5278058645096056, 0.6141078838174274, 0.5644768856447689, 0.5688073394495413,
0.7036649214659686, 0.7565789473684211, 0.7504835589941973, 0.7032136105860112, 0.7957610789980732,
0.7575221238938054, 0.7695431472081218, 0.7767527675276754, 0.8007483629560337, 0.7862939585211903,
0.7540425531914894, 0.7909270216962524, 0.7669990933816864, 0.7837837837837839, 0.7870722433460077,
0.7763794772507261, 0.7760368663594469, 0.7521663778162913, 0.7868561278863233, 0.7847358121330725,
0.7728873239436619, 0.7853881278538813, 0.781305114638448, 0.7768595041322315, 0.7890255439924314,
0.7586206896551724, 0.7627416520210896, 0.7765765765765766, 0.76269621421976],
'avg': [0.33512414452129435, 0.4379224777868105, 0.3894777884681461, 0.3367105187176208, 0.5357232837614311,
0.5249010539646664, 0.6050186620968654, 0.6107172339972856, 0.6368830569639998, 0.633420569761528,
0.6460428338533253, 0.6389547759729199, 0.6652064863598459, 0.6666877549705625, 0.6661197837517985,
0.6622813743332923, 0.7604358157632409, 0.7835592872685841, 0.806618622643138, 0.7783415371559741,
0.7884490437222368, 0.8113046753229292, 0.8308916112086214, 0.8275169923768451, 0.823675268163764,
0.8437190740050118, 0.8340801265107881, 0.835395421413185, 0.8378721287163456, 0.8449909376363187,
0.8378478384105883, 0.8340458759568398, 0.8379518256770726, 0.8352397958878133, 0.8378791287554508,
0.8413180025726446, 0.8386213035418575, 0.8364695122013396, 0.8285255776327782, 0.8396353507993363,
0.838163793775769, 0.8375536450182024, 0.8380703405116113, 0.8369455367050895, 0.8360341559912676,
0.8354696960137742, 0.8331260746606848, 0.8362269000488464, 0.836768421772566, 0.8345808200373186],
}
f1_scores_006e_valid = {
'Wake': [0.7950675943209458, 0.7228878089347435, 0.7181377846146023, 0.7200213114130228, 0.8048306299402557,
0.8773713577185368, 0.9502296695167478, 0.9441228588304783, 0.9434503229723575, 0.9593663203374139,
0.9699237650990358, 0.9524197380031222, 0.9677967571317091, 0.9701539983046059, 0.9682602761027697,
0.9724455247851376, 0.972644908524854, 0.9749150632844543, 0.9744882667183836, 0.9766314087922129,
0.9734472571600417, 0.9744921230834006, 0.9737936336000559, 0.9763796096585828, 0.9728787561876873,
0.9777497016915843, 0.9798643530344402, 0.9783493578496737, 0.9797237937941455, 0.9801903144787577,
0.9807573592959064, 0.9773029772329247, 0.9790066924973582, 0.9804728007733544, 0.9795918367346937,
0.9806835590146326, 0.9808418353908019, 0.9817554847903728, 0.9810962421087801, 0.9809015859604653,
0.9813243982012169, 0.9816901408450704, 0.9817682185699942, 0.9816615384615384, 0.9814622467123215,
0.9817629715940186, 0.9817425630903708, 0.9813843825878875, 0.9818861009303637, 0.9806569279062836],
'REM': [0.05606995884773663, 0.6490175801447777, 0.7113935969868174, 0.5767313019390582, 0.7593488781346239,
0.7459177008491183, 0.8603218756209021, 0.8182996851268752, 0.8550444530344028, 0.8856457417033188,
0.9012908124525437, 0.884949215143121, 0.9008104978772673, 0.906949806949807, 0.9082851637764933,
0.9129852744310576, 0.8936248392430646, 0.9097613040947021, 0.9074180563542266, 0.9115958668197475,
0.899768696993061, 0.9106728538283063, 0.911851705777953, 0.9085979860573199, 0.9117238643126363,
0.9137254901960784, 0.9117131163515884, 0.9108758421559191, 0.9157140089130015, 0.9157957010451587,
0.9147738303242089, 0.9135993800852382, 0.9092652982927297, 0.9173489278752437, 0.9105752800455668,
0.9171356491364254, 0.9186752890456594, 0.9190457567461869, 0.9126289161315432, 0.9139123750960799,
0.9137269938650306, 0.9190785587714118, 0.9177387914230019, 0.9157281553398059, 0.9121725731895223,
0.9176516179035071, 0.9174995100921027, 0.9152086137281293, 0.9129586260733801, 0.9174738473459899],
'Non REM': [0.5282551704048937, 0.1159926383842197, 0.015117609030782237, 0.060458786936236394, 0.5554838709677419,
0.7867411191635976, 0.9144646402932641, 0.9120705124821872, 0.9078402209709975, 0.9348232821590589,
0.941084212390276, 0.916157366986798, 0.9364381067961165, 0.9494027580359593, 0.9390051423043633,
0.9457971307334815, 0.9458135541864459, 0.950569203115638, 0.9529523523823809, 0.952114645228941,
0.9552485358161886, 0.9560919018435853, 0.9524695704657479, 0.956071832224036, 0.9521950724931563,
0.9577161729383508, 0.9597605089185481, 0.9591564536829654, 0.9590810120879947, 0.962066823997019,
0.9621338651377291, 0.9559345947444006, 0.9608795832498497, 0.9614988572720196, 0.9583490625393231,
0.9598801647734365, 0.9619664424495511, 0.9627984730157937, 0.9617579337270998, 0.9611109723505756,
0.961355425439143, 0.962885468041648, 0.9621325361235675, 0.9625507595127086, 0.9634167687729738,
0.9627284286106056, 0.9628874692386089, 0.9622509262040653, 0.9630719361675601, 0.9611126452941029],
'Pre REM': [0.05244122965641953, 0.0, 0.002652519893899204, 0.0, 0.16336056009334887, 0.24898785425101216,
0.44827586206896547, 0.35051546391752575, 0.4183333333333333, 0.4750593824228028, 0.5056497175141244,
0.4078125, 0.45998445998445997, 0.5292397660818714, 0.5052950075642966, 0.5098335854765508,
0.4543429844097995, 0.5454545454545455, 0.5255474452554745, 0.5480427046263345, 0.5752380952380952,
0.557142857142857, 0.5260770975056689, 0.5341246290801186, 0.5372918175235337, 0.5440956651718983,
0.5373563218390804, 0.5383502170767004, 0.546236559139785, 0.5667351129363449, 0.5495300072306579,
0.5476190476190478, 0.5447976878612717, 0.5511049723756907, 0.5395284327323162, 0.5597826086956521,
0.5598320503848845, 0.5364775239498895, 0.5487465181058496, 0.5389657683903859, 0.5310899780541332,
0.5402214022140222, 0.5549964054636951, 0.5497564370215727, 0.5373352855051244, 0.5520110957004161,
0.5369422092172641, 0.5345821325648416, 0.5463552724699221, 0.5384052670080468],
'Artefakt': [0.0018083182640144665, 0.0, 0.0, 0.0, 0.0, 0.0, 0.03202846975088968, 0.15140845070422537,
0.46618106139438087, 0.40476190476190477, 0.29787234042553196, 0.5163551401869159, 0.15488215488215487,
0.5104270109235353, 0.27257799671592775, 0.11070110701107011, 0.3735955056179775, 0.48189762796504376,
0.5658436213991769, 0.34948604992657856, 0.5725338491295939, 0.6388625592417062, 0.669683257918552,
0.6457883369330453, 0.7117988394584138, 0.6343115124153499, 0.6703417861080485, 0.7257731958762886,
0.6541617819460727, 0.7350785340314135, 0.6916488222698073, 0.6384872080088987, 0.7076923076923077,
0.7535353535353535, 0.657243816254417, 0.6526576019777504, 0.671604938271605, 0.7429854096520763,
0.7188208616780046, 0.6947368421052632, 0.6721120186697782, 0.7288888888888889, 0.68,
0.7748917748917747, 0.75, 0.741061755146262, 0.7168458781362008, 0.7436743674367436, 0.744920993227991,
0.7553072625698324],
'avg': [0.286728454298802, 0.2975796054927482, 0.2894603021052202, 0.27144228005766347, 0.45660478782719405,
0.531803606396453, 0.6410641034501539, 0.6352833942122584, 0.7181698783410945, 0.7319313262768998,
0.7231641695763024, 0.7355387920639913, 0.6839823953343416, 0.7732346680591557, 0.7186847172927701,
0.6903525244874594, 0.7280043583964283, 0.7725195487828767, 0.7852499484219285, 0.7475741350787628,
0.7952472868673961, 0.807452459027971, 0.8067750530535955, 0.8041924787906204, 0.8171776699950856,
0.8055197084826522, 0.8118072172503412, 0.8225010133283094, 0.8109834311761999, 0.8319732972977387,
0.8197687768516619, 0.8065886415381021, 0.8203283139187034, 0.8327921823663325, 0.8090576856612633,
0.8140279167195793, 0.8185841111085004, 0.8286125296308636, 0.8246100943502557, 0.817925508780554,
0.8119217628458604, 0.8265528917522083, 0.8193271903160518, 0.83691773304548, 0.8288773748359883,
0.8310431737909619, 0.8231835259549095, 0.8274200845043336, 0.8298385857738435, 0.8305911900248513],
}
| f1_scores_001_train = {'Wake': [0.45828943664803573, 0.47566984186570316, 0.5875755194928342, 0.7704458983749956, 0.8776419969393865, 0.9099441500276573, 0.922647481237028, 0.9350972410673902, 0.9465349405012661, 0.9534392971969388, 0.9572805948925108, 0.9627780979304024, 0.9671772627452403, 0.9684523701540192, 0.9716055990492866, 0.9731932563363663, 0.9741702106414556, 0.9750272331154685, 0.9763683737482866, 0.9776438172104023, 0.9779034872265177, 0.9782498184458969, 0.9790514587703288, 0.9804106722113014, 0.9802716115527991, 0.9813018761692003, 0.9814845932014806], 'REM': [0.21260117157805308, 0.35374807384355084, 0.5103512283642359, 0.7049339859692951, 0.7804678062886637, 0.8131475844498263, 0.8394483436487339, 0.8634476562257954, 0.8858121874421188, 0.898998362634237, 0.9160738813815542, 0.9319316568182859, 0.9472641818444968, 0.9574975686846584, 0.9649491736446937, 0.9709271015844844, 0.9756795855455999, 0.9788204281364097, 0.9807636963996305, 0.9833653715167936, 0.9848436671966083, 0.9857726653549266, 0.987027730685396, 0.9874375662176479, 0.9885864793678666, 0.9896364035519353, 0.99061473486626], 'Non REM': [0.3401838631048861, 0.475220709175341, 0.5374332841107604, 0.6340473156622304, 0.7303350082917914, 0.7759327787793486, 0.8091571662779938, 0.8371759030861152, 0.8542371387331004, 0.8664349470288908, 0.8812739412416539, 0.8957909719398129, 0.9114945790997332, 0.9205330841504897, 0.930866013351348, 0.9387957691035018, 0.9419240026921892, 0.945397904922747, 0.9504453644461172, 0.9537926314588798, 0.9551680485384851, 0.9571398417488634, 0.9595577339564574, 0.962153041039352, 0.9628565892798121, 0.9644391272147212, 0.965803250485636], 'Pre REM': [0.19860624317691192, 0.1884477836851209, 0.161593542507486, 0.32138035252003516, 0.5003342912439154, 0.597080323173599, 0.6383882339403956, 0.6777091347889314, 0.7154756685664183, 0.7457149471099168, 0.7927714646464645, 0.8286919003726221, 0.8679852222991217, 0.8928338793882888, 0.9127351158091093, 0.9285575691722613, 0.9372181620276784, 0.943335761107065, 0.9516857973155537, 0.9570796675253974, 0.9598336604418881, 0.9629075069761112, 0.9667892371446916, 0.9683581857266528, 0.9716692115423892, 0.9725854152074092, 0.9749576790613507], 'Artefakt': [0.5229366001967272, 0.6338351044007543, 0.6570850735373311, 0.6454606333110112, 0.6661511061117361, 0.7106723973046948, 0.8216750921171551, 0.925570332136013, 0.9651614399165265, 0.977290979284187, 0.9842082303329941, 0.9882866708719491, 0.990505776138239, 0.9923858361012373, 0.9937809736663104, 0.9947903504850028, 0.9952559640697606, 0.9958682908334388, 0.9962760940796701, 0.9965954632115481, 0.9968580072178286, 0.9967910694490364, 0.9972373540856032, 0.9972666167329747, 0.9978593391196046, 0.9977720484506494, 0.9978014280989163], 'avg': [0.34652346294092284, 0.425384302594094, 0.49080772960252955, 0.6152536371675134, 0.7109860417750986, 0.7613554467470252, 0.8062632634442612, 0.8478000534608491, 0.8734442750318859, 0.888375706650834, 0.9063216224990356, 0.9214958595866143, 0.9368854044253663, 0.9463405476957387, 0.9547873751041497, 0.9612528093363233, 0.9648495849953367, 0.9676899236230257, 0.9711078651978516, 0.9736953901846043, 0.9749213741242656, 0.9761721803949669, 0.9779327029284953, 0.9791252163855857, 0.9802486461724943, 0.981146974118783, 0.9821323371427286]}
f1_scores_001_valid = {'Wake': [0.657405684754522, 0.4611178937310898, 0.843902349955265, 0.855320411392405, 0.885871037659171, 0.9139117987867221, 0.932055717572047, 0.9463877720904695, 0.9570114044125484, 0.9595433464145559, 0.9673044150459424, 0.9634778302470773, 0.9712198478939845, 0.9694530626717489, 0.9703757610181224, 0.9729483335963112, 0.9736898243618004, 0.9754512380346861, 0.9746917814242247, 0.9747490755414686, 0.9774797034945287, 0.9771752369856486, 0.9760045134787286, 0.9766318905963626, 0.9769876682008221, 0.9782155845072908, 0.978478283917023], 'REM': [0.12518034456420268, 0.11241206629307261, 0.2589039585400816, 0.429526563064691, 0.7098027495517035, 0.82624801552302, 0.815959741193386, 0.8383912248628885, 0.8554066130473637, 0.8804795803671787, 0.8694686169227921, 0.8914441629312025, 0.8816533437317216, 0.8909512761020881, 0.8801363378148078, 0.8948485433146827, 0.8946564885496183, 0.895306859205776, 0.9020965570301981, 0.9019078820581999, 0.9002114977888866, 0.9014194050165274, 0.8947568389057751, 0.9020897832817337, 0.9026852028185107, 0.9030291484092209, 0.9097933165926211], 'Non REM': [0.19235930929587544, 0.05094734791291218, 0.5261806039702052, 0.5527151935297515, 0.7126930223617607, 0.7644436245118839, 0.8765320885540361, 0.8957227937195452, 0.9114534991646556, 0.9150781723747001, 0.9210171195724076, 0.9341014545644126, 0.9412280475539623, 0.9429993330254989, 0.9435981463939169, 0.9463633087970351, 0.9507063572149343, 0.9456240555285198, 0.950480413895048, 0.9514810381274992, 0.9523567655424625, 0.9540212443095599, 0.9520783017668742, 0.9555623038769105, 0.9508740589511293, 0.9542678310029782, 0.955841139192567], 'Pre REM': [0.025122883670125617, 0.0, 0.005687203791469194, 0.05966438781852082, 0.24408602150537637, 0.23279847701930925, 0.29683698296836986, 0.36845637583892615, 0.350185873605948, 0.35790219702338766, 0.3778217821782178, 0.4421052631578948, 0.45901639344262296, 0.4576107899807322, 0.4524975514201763, 0.4938271604938272, 0.47925764192139736, 0.45363908275174475, 0.49278707443739184, 0.492874109263658, 0.4843835616438356, 0.4977011494252873, 0.49826989619377154, 0.5121495327102803, 0.47285464098073554, 0.483423749246534, 0.4955116696588868], 'Artefakt': [0.12214863870493008, 0.30966531122927743, 0.31692207368764264, 0.3072642967542504, 0.1799193843898864, 0.2667024416420714, 0.278149386845039, 0.39522437216961714, 0.4789156626506024, 0.4533083059596434, 0.587088915956151, 0.5015259409969481, 0.6417704011065007, 0.5848024316109421, 0.6144964720974985, 0.674123788217748, 0.6778115501519757, 0.6790490341753345, 0.7044728434504792, 0.6750369276218611, 0.7093596059113301, 0.7350993377483444, 0.718241042345277, 0.7056936647955093, 0.7402489626556018, 0.7391304347826086, 0.7164906580016247], 'avg': [0.22444337219793115, 0.18682852383327042, 0.39031923798893275, 0.44089817051192376, 0.5464744430935796, 0.6008208714966013, 0.6399067834265756, 0.6888365077362893, 0.7105946105762235, 0.7132623204278932, 0.7445401699351022, 0.746530930379507, 0.7789776067457584, 0.7691633786782021, 0.7722208537489044, 0.7964222268839208, 0.7952243724399453, 0.7898140539392123, 0.8049057340474682, 0.7992098065225374, 0.8047582268762087, 0.8130832746970735, 0.8078701185380854, 0.8104254350521594, 0.80873010672136, 0.8116133495897264, 0.8112230134725446]}
f1_scores_001b_train = {'Wake': [0.8216369980220904, 0.9148960769839647, 0.9262593869783211, 0.9307407224833854, 0.93437170366048, 0.9361000399908336, 0.9392671051507645, 0.9400201522212426, 0.9418583182098613, 0.9437846254933641, 0.946338341153827, 0.947366047470224, 0.9506416673430553, 0.9536365852117317, 0.9544220667476659, 0.9560755262444666, 0.9574754370755671, 0.9591688245954166, 0.9595061192761719, 0.9607198571137889, 0.9619010158824886, 0.9623254215210941, 0.9632624998869199, 0.9635522731181044, 0.9637292094850923, 0.963798692479038, 0.9644366802740792, 0.9649516840398845, 0.9653783125548886, 0.965020268587087, 0.9660741378139082, 0.96624938857588, 0.966527802934251, 0.9665532905493233], 'REM': [0.7614879649890591, 0.8373268950437317, 0.8495166577088742, 0.8565099642697295, 0.8618982536066817, 0.865077676101298, 0.8698590432023432, 0.8729105417891642, 0.8782313756646092, 0.8798407167745147, 0.8843661432401378, 0.8877133079673254, 0.8935266470899431, 0.8974062650676178, 0.9003429061294471, 0.9037400836909708, 0.9074412662469304, 0.9088489483747609, 0.9136049639320211, 0.9160532893077434, 0.9204903945308025, 0.9220649242499485, 0.9274855497949864, 0.9310610510576945, 0.9335377153446659, 0.9375915750915751, 0.9407341310697751, 0.944534277084541, 0.9468975293023822, 0.9514857443194369, 0.952917498894598, 0.9550017517936845, 0.9570201009232268, 0.9595492786173817], 'Non REM': [0.7410094927626485, 0.8106415762384027, 0.8246266402289318, 0.8329492641898353, 0.8406863964188013, 0.8453382895503342, 0.8493045680767863, 0.8539930806625655, 0.8544867556108755, 0.8582889188076507, 0.8609136153572697, 0.8629103075708903, 0.8675721373111749, 0.8700001112631709, 0.8742503643868843, 0.8751135103816733, 0.8809324071899154, 0.8834159853460215, 0.8883650351921429, 0.8933036689998375, 0.896576115330852, 0.8993790358447759, 0.9047234899556027, 0.9094462393529292, 0.9138251845148885, 0.9165407448909715, 0.9195960237486319, 0.9229478077437794, 0.9254691201617989, 0.9279472757229703, 0.9305727633358719, 0.9340084772281172, 0.9347551324823792, 0.9361311893736152], 'Pre REM': [0.5753381066030231, 0.6531545137840069, 0.6639423854992718, 0.6747356480168537, 0.6849267591563796, 0.6943487989537461, 0.7008447600391772, 0.71123301129851, 0.7161349171372642, 0.723404255319149, 0.7289075286415712, 0.7317744996021301, 0.741140639483361, 0.7437676794399561, 0.7549063426922921, 0.7580707265173776, 0.7715358822285547, 0.7753496767947722, 0.7895598710053345, 0.7998757863525263, 0.810965801804322, 0.8188597928521067, 0.8327870151219561, 0.8454052345054489, 0.8554315380902187, 0.8669575986318335, 0.8757138651751545, 0.8838630687105149, 0.8923666810125592, 0.9006305293513857, 0.9053856214253645, 0.9136587506705027, 0.9164822091991458, 0.9226994820670588], 'Artefakt': [0.6938652766639936, 0.7614956514378822, 0.802243083310097, 0.832086492615126, 0.853656827713219, 0.8807399282601607, 0.8989053065632517, 0.9172664322792392, 0.9311935963318795, 0.9459323086477255, 0.9580706087461863, 0.9676724973819959, 0.9757160285830477, 0.98237283536674, 0.9851055788667836, 0.987261516984644, 0.9880737681075107, 0.9903669102397612, 0.9909089146911163, 0.9917719004099512, 0.9928428729367497, 0.9934152467585364, 0.9935917943945166, 0.9937937588487423, 0.9944614190794897, 0.9944220788669544, 0.994568590937306, 0.9947501722448108, 0.9949642451704297, 0.995624290523824, 0.995487583576745, 0.9954585152838427, 0.9960005436154309, 0.9960103672209442], 'avg': [0.718667567808163, 0.7955029426975976, 0.8133176307450991, 0.825404418314986, 0.8351079881111122, 0.8443209465712744, 0.8516361566064645, 0.8590846436501444, 0.8643809925908978, 0.8702501650084807, 0.8757192474277984, 0.8794873319985133, 0.8857194239621166, 0.8894366952698434, 0.8938054517646146, 0.8960522727638264, 0.9010917521696957, 0.9034300690701464, 0.9083889808193574, 0.9123449004367694, 0.916555240097043, 0.9192088842452923, 0.9243700698307963, 0.928651711376584, 0.932197013302871, 0.9358621379920745, 0.9390098582409893, 0.942209401964706, 0.9450151776404117, 0.9481416217009407, 0.9500875210092975, 0.9528753767104053, 0.9541571578308868, 0.9561887215656647]}
f1_scores_003_train = {'Wake': [0.34114242511145293, 0.47037630601418756, 0.6231108635424149, 0.7475570095554086, 0.8430910969227903, 0.885049862822802, 0.9044004997858691, 0.9253318162882266, 0.9369672478644814, 0.9452637857181587, 0.9518877048365375, 0.9519492785387302, 0.9599945681694732, 0.9649082267440543, 0.9660711210217642, 0.9688784923862239, 0.9698137676789205, 0.9716789831108208, 0.9731037362477761, 0.9737947680274393, 0.9744066459283712, 0.9748579152435513, 0.9758808743863597, 0.976034107402032, 0.9767549533601143, 0.9779290625638234, 0.9781986046743861, 0.9787328673867658, 0.9787371221786845, 0.9795699657153236], 'REM': [0.33085111174501175, 0.5190163242660332, 0.6481260289892502, 0.7238209275028948, 0.7667388585547388, 0.8039935174143046, 0.8260626269594878, 0.8558023967343915, 0.8703875107984697, 0.8857655272212258, 0.8967234984307647, 0.90612615524313, 0.9239083706933612, 0.9406622293884351, 0.9519391889833348, 0.9603378095636627, 0.9671704328948467, 0.9715075483733787, 0.974906154021158, 0.9778475254730713, 0.9794804545075535, 0.9824130693399407, 0.9832002787329768, 0.9848179517871484, 0.9866099153274057, 0.9870328571644978, 0.9881570777362148, 0.988027534399067, 0.9889871845366134, 0.9895973713299313], 'Non REM': [0.351980942709495, 0.45674395145063235, 0.6163104861034215, 0.6953867850728838, 0.7299422327657482, 0.7585851814110643, 0.7753320906085256, 0.8150885716625269, 0.8421267105371844, 0.8549725358138507, 0.8629687326137754, 0.8676629264992817, 0.8853304856115107, 0.9006314502987507, 0.9104625137754349, 0.9217028741982889, 0.9277105683633874, 0.9353619105730465, 0.9396988364134153, 0.9436405048550341, 0.9474020819890248, 0.948741792126146, 0.9520946470131885, 0.9544484148276688, 0.955918828151282, 0.9582128867830935, 0.9594037442760933, 0.9609816454649645, 0.9616822429906542, 0.9635761778061385], 'Pre REM': [0.1834041799504074, 0.19172531950361177, 0.2620691563697749, 0.4357441721458459, 0.5412528169601871, 0.5956108512258562, 0.6214464441831721, 0.6589435516086408, 0.6936645551961806, 0.7195463930233275, 0.7393872091262431, 0.7650942263833873, 0.8046556204365137, 0.8448039484507814, 0.8718334048948047, 0.8962313657654856, 0.9123335016115879, 0.925423827499539, 0.9335649743286132, 0.9421271146981219, 0.9483699345643773, 0.9526558218179698, 0.9564608925517026, 0.9615418241162585, 0.9643054975170309, 0.9660984001710631, 0.9684122541015474, 0.9698065519587828, 0.9725783718104497, 0.9744826513147659], 'Artefakt': [0.48589423031561074, 0.543264541160224, 0.6045723154061959, 0.6406778841504691, 0.6607212006712118, 0.6792695774318156, 0.719872537659328, 0.8504288920955587, 0.9366815174834616, 0.9621537185779441, 0.9730542964606038, 0.9768481342092279, 0.98624, 0.9903513880799845, 0.9923686356751719, 0.9933174038891155, 0.994170455870351, 0.9945097124644103, 0.9953544424359049, 0.9960429731174956, 0.9959170976396936, 0.9962939545741939, 0.9971403003657302, 0.996839535946632, 0.9972863881729319, 0.9975876425041827, 0.9974713582696311, 0.9976458685966653, 0.9976656875522789, 0.9979570792069576], 'avg': [0.33865457796639553, 0.43622528847893777, 0.5508377700822115, 0.6486373556855003, 0.7083492411749353, 0.7445017980611686, 0.7694228398392765, 0.8211190456778688, 0.8559655083759555, 0.8735403920709015, 0.8848042882935848, 0.8935361441747514, 0.9120258089821718, 0.9282714485924013, 0.9385349728701021, 0.9480935891605553, 0.9542397452838186, 0.9596963964042391, 0.9633256286893734, 0.9666905772342325, 0.9691152429258041, 0.9709925106203603, 0.9729553986099916, 0.974736366815948, 0.9761751165057528, 0.977372169837332, 0.9783286078115745, 0.9790388935612491, 0.9799301218137361, 0.9810366490746233]}
f1_scores_003b_train = {'Wake': [0.4313997632363146, 0.5472644332254802, 0.6574325037840122, 0.7680884313500437, 0.8588134397026899, 0.8919537341959567, 0.9053421143972485, 0.9239945636223252, 0.9369187624389362, 0.9463731838711433, 0.9526025930664054, 0.9581055804746945, 0.9621588230217527, 0.9652561530290787, 0.9667060212514758, 0.9690848011621572, 0.9707154757203104, 0.9719770370538449, 0.9728229517281478, 0.9745429120148194, 0.9755435029480436, 0.9757504200535854, 0.9767391156230837, 0.9770848849248879, 0.97815974998183], 'REM': [0.31206495709787546, 0.49244859379372, 0.599596254676487, 0.6896992243708981, 0.756718591412559, 0.7945578835884788, 0.8159464658637544, 0.8423975051342513, 0.8704807892564853, 0.8882604071944886, 0.9014192617382694, 0.9152789166736915, 0.9324890002444389, 0.9443083381034153, 0.9544382748916103, 0.9604561003420753, 0.9671201900093336, 0.9706295405029948, 0.9743208941087327, 0.9764104118516274, 0.9788884428048752, 0.9799045960475505, 0.9818839756837986, 0.9830390404942909, 0.9843418741292628], 'Non REM': [0.37274978333539677, 0.5500774066299743, 0.6232983906688321, 0.6736729998291955, 0.7230304243189293, 0.758483732224806, 0.776876982728234, 0.8099952598465915, 0.8446422480662801, 0.8602145790101109, 0.8692816257709545, 0.8812693740103923, 0.894218425021163, 0.9050085771036476, 0.914490898587497, 0.923859481799396, 0.931428311416481, 0.9361149702780877, 0.9406685538209179, 0.9458101131662622, 0.9468460872339457, 0.9497151321786691, 0.9519047320731936, 0.9541438069356851, 0.9571166531849202], 'Pre REM': [0.19497741293049012, 0.16800126435570542, 0.16935250967481083, 0.3163466554694558, 0.507647510905686, 0.5804237385380916, 0.6210424217673184, 0.6590068080060515, 0.7019758788811907, 0.732017097496438, 0.7558063113618669, 0.7864649474536783, 0.8243962909703971, 0.8548676910992195, 0.8804948954122334, 0.8994615054434776, 0.915765265353057, 0.9270872832988168, 0.9351260438844655, 0.9434567493220058, 0.9468353938262967, 0.9513858486803062, 0.9546299269291768, 0.9582474026226702, 0.9622247070834752], 'Artefakt': [0.5076240511500205, 0.630002083630342, 0.6360896314274426, 0.6419354838709677, 0.6458651841556636, 0.6723094958968346, 0.7098380785164273, 0.8135635145581036, 0.9210007727975271, 0.9601728095045227, 0.9740944653723559, 0.9813190855063206, 0.986806774009054, 0.9890350877192983, 0.9916036536240185, 0.9925792101326806, 0.9937048262998368, 0.9944496826307143, 0.9950039851480337, 0.9952844405985358, 0.995848928206873, 0.996140047252822, 0.996479489623247, 0.996859351451213, 0.9966255968414808], 'avg': [0.3637631935500195, 0.4775587563270444, 0.5371538580463169, 0.6179485589781122, 0.6984150300991057, 0.7395457168888335, 0.7658092126545964, 0.8097915302334646, 0.8550036902880841, 0.8774076154153407, 0.8906408514619704, 0.9044875808237555, 0.9200138626533612, 0.9316951694109317, 0.941546748753367, 0.9490882197759574, 0.9557468137598037, 0.9600517027528916, 0.9635884857380596, 0.9671009253906501, 0.9687924710040068, 0.9705792088425866, 0.9723274479865, 0.9738748972857494, 0.9756937162441938]}
f1_scores_003c_train = {'Wake': [0.4466379651005595, 0.5967105208480507, 0.6905195116112043, 0.7632186210321186, 0.8525029797377831, 0.901673584147811, 0.9227019404484612, 0.9377986972508561, 0.9468803155875647, 0.954563166622867, 0.9583437198319427, 0.9611485337143636, 0.965801999156053, 0.967048925153274, 0.9687681580476466, 0.9709119461174325, 0.9717056516054046, 0.9723846181778568, 0.9732127855705962, 0.974165451911593, 0.9744053351747197, 0.97508356950803, 0.9752216247638426, 0.9761454888993859, 0.9760474419576165, 0.9763797410856234, 0.9767382714928017, 0.9773362225220437, 0.9774966372196168, 0.977710334299552, 0.9785559816090283, 0.9788511951005646, 0.9787566555816024, 0.9783548996801396, 0.9794128738828384, 0.9792664636640458, 0.9795714363606624, 0.9793149819863615, 0.9799288398533174, 0.979722392603194, 0.9800211642134043, 0.980373984626288, 0.9801077760511799], 'REM': [0.35829084060139516, 0.5479005299633103, 0.6614117411371289, 0.7207113538845913, 0.770582596655661, 0.8095270500170126, 0.8406305533427293, 0.8636709123154525, 0.8778625954198472, 0.892504855556745, 0.9035875126374805, 0.9088628890418291, 0.9174012855831037, 0.9259944637313228, 0.9334434579117626, 0.9423097489801843, 0.9471379752242631, 0.9507661812914538, 0.9543784772502096, 0.9590064758657951, 0.961684133672026, 0.9648317578041886, 0.9666780652760363, 0.969215929028779, 0.9718473338036824, 0.9722312820940693, 0.9745605183493548, 0.9754018158511517, 0.9770775812372947, 0.9776996194836499, 0.978449452516, 0.9797592334283461, 0.9797842746367309, 0.9806918196083784, 0.9818920496320047, 0.9822859265210833, 0.9826222653172536, 0.9834172947994394, 0.9838167106100555, 0.9841808337435158, 0.9844496792225597, 0.984512100868353, 0.9855340291137131], 'Non REM': [0.3607511530858774, 0.5504250429505342, 0.6417193020019271, 0.6940028995598697, 0.7374172576528648, 0.7770953870620115, 0.816505983500538, 0.8474931822949444, 0.8590294959290193, 0.8674369142831824, 0.8756081306231257, 0.8802045126153162, 0.8874192110541564, 0.8932093137721001, 0.8997403063599703, 0.904781217610743, 0.9109682952564195, 0.9150364566514269, 0.9193118240521125, 0.9232360311624551, 0.9274815664799645, 0.9299842335035204, 0.9315848188875987, 0.9340780087334255, 0.9364647656842452, 0.9386191445331875, 0.9400613294118988, 0.9417801190394746, 0.9433850432562434, 0.9458233101136662, 0.9474758649004659, 0.9477573642615211, 0.9486645716534445, 0.9486910277771438, 0.950510524214249, 0.9517537858055101, 0.9518582960152886, 0.9524135570010271, 0.9537115712517892, 0.954701288625979, 0.9555437568865216, 0.95588680257817, 0.9555457922275032], 'Pre REM': [0.18374680909068378, 0.2051593398423948, 0.28768268886145515, 0.45042921678046977, 0.5319476438678995, 0.6027951866354502, 0.655866640790186, 0.6855784632873456, 0.7096435843119511, 0.7294245429953273, 0.7528146870879399, 0.7634907634907634, 0.7806610873622734, 0.8001155746851586, 0.8206985974601854, 0.8373058830476114, 0.8518580367579885, 0.8636913826090352, 0.874564663307197, 0.885958001420054, 0.8948064578875705, 0.9018009625834498, 0.9068227710469089, 0.9110515792130143, 0.9183075639707451, 0.9218330408818141, 0.92624533152253, 0.9293027224075079, 0.9327364688099529, 0.9367572444435821, 0.9384448406853245, 0.9406133423768228, 0.9428640659074388, 0.9444008790527916, 0.9453199918633823, 0.9483625374131869, 0.9490819243253719, 0.9508971824981591, 0.9521982228165549, 0.9546939685679106, 0.9550856733274572, 0.9555110375596396, 0.9564939405388125], 'Artefakt': [0.5071941697032795, 0.5788057559692271, 0.6224417939351261, 0.6494646182495345, 0.6565630376882645, 0.7059877929798288, 0.8085879905475551, 0.895822906641001, 0.9350009111573617, 0.9585436332113273, 0.9711257204089316, 0.975370983032484, 0.982999622213827, 0.9860012408872344, 0.9885615049528005, 0.9903067115591737, 0.9908207029051602, 0.9917769385357708, 0.9927270961790553, 0.992681459049172, 0.9936681816416114, 0.9942772752446003, 0.9941429584373452, 0.9944239362735574, 0.9950932286555446, 0.9953055293671698, 0.9953165688522678, 0.9950836555838403, 0.9955285975348964, 0.9961421477644864, 0.9957919084132677, 0.996305011571148, 0.9962773970938426, 0.9959955679101141, 0.9965102602237711, 0.996538648517258, 0.9967135967641568, 0.9967137245751176, 0.9969172720288628, 0.9968301505192331, 0.9971409677921269, 0.9969278033794163, 0.9972188186786473], 'avg': [0.37132418751635904, 0.4958002379147034, 0.5807550075093684, 0.6555653419013167, 0.7098027031204946, 0.7594158001684228, 0.808858621725894, 0.8460728323579201, 0.8656833804811488, 0.8804946225338897, 0.8922959541178841, 0.8978155363789513, 0.9068566410738826, 0.914473903645818, 0.9222424049464731, 0.929123101463029, 0.9344981323498471, 0.9387311154531087, 0.9428389692718341, 0.9470094838818138, 0.9504091349711784, 0.9531955597287578, 0.9548900476823464, 0.9569829884296324, 0.9595520668143669, 0.9608737475923729, 0.9625844039257707, 0.9637809070808036, 0.9652448656116007, 0.9668265312209874, 0.9677436096248172, 0.9686572293476805, 0.9692693929746119, 0.9696268388057134, 0.970729139963249, 0.9716414723842168, 0.9719695037565466, 0.9725513481720209, 0.973314523312116, 0.9740257268119665, 0.9744482482884139, 0.9746423458023734, 0.9749800713219713]}
f1_scores_003d_train = {'Wake': [0.4590079841931025, 0.6067054566706488, 0.6515180926498967, 0.7531546507066651, 0.8600782527546853, 0.892678799973969, 0.9163818154517432, 0.9321424730219051, 0.9453948677143426, 0.9507330316742083, 0.9569370193156459, 0.9609148287869994, 0.9643283480471143, 0.9672967160603614, 0.9684425392937335, 0.9702420134648647, 0.9711349471858957, 0.9714817167226205, 0.9729300086296951, 0.9731129311402136, 0.9737347679367054, 0.9748944658769215, 0.975002499750025, 0.9756219538808467, 0.975020108426453, 0.975939644593919, 0.9753603693672405, 0.9764022120938095, 0.9768413974219754, 0.9762576879542881, 0.9769249298930557, 0.9770600293624352, 0.977179328654035, 0.9781562115006069, 0.9776499245605424], 'REM': [0.33481608598460044, 0.5535281453713322, 0.6063505380854806, 0.6978732361298888, 0.7795728474001595, 0.8117988189036146, 0.8310854593951084, 0.8479374371169852, 0.8629822507087391, 0.8793104770376279, 0.8891479050365008, 0.8967768132819504, 0.9037667127356582, 0.9092033344529603, 0.9120807778380319, 0.9157758094074526, 0.9185655812816911, 0.9209410540172352, 0.9230169170057205, 0.9261353218018458, 0.9276267450404115, 0.9305781463578536, 0.9318291183232636, 0.935286207634241, 0.9362023808614778, 0.9386513849092646, 0.9402388000336553, 0.9426502490146355, 0.9448859815369567, 0.9458553239591528, 0.9477523117770928, 0.9491336539195482, 0.9510748589724043, 0.9532723101663784, 0.9553321698307332], 'Non REM': [0.37019219058290503, 0.4890113110238528, 0.5435859726526254, 0.6270989302622741, 0.718425307122777, 0.7639560813867466, 0.7899300908925455, 0.8259601254578554, 0.8487402335176895, 0.8608135630538888, 0.8701669644235647, 0.8756279393641303, 0.8827100145266146, 0.8859539433642813, 0.8900190788889876, 0.8913405702834811, 0.8932089452899676, 0.8957117229198717, 0.8988042318634425, 0.8991907694359841, 0.9010568259604094, 0.9029339839680922, 0.9043182985948216, 0.9070512283055253, 0.9078734858681022, 0.9092296214020857, 0.9101751854440512, 0.9136890138872417, 0.9162252105406139, 0.9181735574738754, 0.9210151061521069, 0.9233422309237749, 0.924147513724061, 0.9262288545879136, 0.9282737517554777], 'Pre REM': [0.2185548365218866, 0.2834966603286042, 0.22596656852964792, 0.3356500929249726, 0.5074289076733317, 0.5936133120374141, 0.6262453332233247, 0.6494031374346368, 0.6783503648111229, 0.7065070275897971, 0.726734592855375, 0.7407255753009582, 0.7523349634505172, 0.7598868036329087, 0.7698874029510995, 0.7723171141110287, 0.7786381788327826, 0.7865395084380103, 0.7904764777445982, 0.7952704402515725, 0.8006290442133942, 0.8057079911876627, 0.8096551586787888, 0.8182630627767958, 0.8232291759399388, 0.8281914841104518, 0.8342934267020058, 0.84214021996054, 0.849311072432201, 0.8547895942693078, 0.8614322057671288, 0.867332189866831, 0.8703270014745424, 0.8759298516091732, 0.8827571624907494], 'Artefakt': [0.5267054047600095, 0.6047960465877532, 0.6243213664942812, 0.6318329568618809, 0.6637899709302325, 0.6970531439606019, 0.7296933003358671, 0.8053531362309633, 0.8780763519662786, 0.9214560305241059, 0.9466757868572915, 0.9600910002313566, 0.9714412605236734, 0.9781185639280223, 0.9825253991291727, 0.9863738051657515, 0.9878619380212925, 0.989535955001697, 0.9906389748464889, 0.9915430123169431, 0.9915214776298942, 0.9926726773357659, 0.9931859214536701, 0.993601506898527, 0.9936022523178486, 0.9937948513774654, 0.9939412769923878, 0.9943694786913891, 0.9944835087991919, 0.9947865596147684, 0.9946090858758049, 0.9951622304254905, 0.9956762113895394, 0.9954718594527363, 0.9952800870173257], 'avg': [0.3818553004085008, 0.5075075239964383, 0.5303485076823864, 0.6091219733771364, 0.7058590571762372, 0.7518200312524692, 0.7786671998597178, 0.8121592618524692, 0.8427088137436345, 0.8637640259759255, 0.8779324536976756, 0.886827231393079, 0.8949162598567154, 0.9000918722877067, 0.904591039620205, 0.9072098624865157, 0.9098819181223259, 0.9128419914198871, 0.9151733220179891, 0.9170504949893118, 0.9189137721561629, 0.9213574529452592, 0.9227981993601139, 0.925964791899187, 0.9271854806827641, 0.9291613972786374, 0.9308018117078681, 0.9338502347295232, 0.9363494341461877, 0.9379725446542786, 0.9403467278930379, 0.942406066899616, 0.9436809828429163, 0.9458118174633616, 0.9478586191309658]}
f1_scores_003e_train = {'Wake': [0.37558449872610644, 0.4451441684126509, 0.5637551801083839, 0.6495528703902673, 0.8124668546656004, 0.86078777800873, 0.8853923665468657, 0.9058019838206619, 0.9211747490703408, 0.92997397787895, 0.9349235788647163, 0.9412216707798842, 0.9477923641185069, 0.9519023104820634, 0.955170742534119, 0.9575336501832166, 0.9595641602554799, 0.9609826458501537, 0.9631867060333529, 0.9629206349206348, 0.9645036176824151, 0.9661691497134247, 0.9660202326436322, 0.9670435453843709, 0.9675378029570515, 0.9678602556653108, 0.9684258334090291, 0.9685488888787963, 0.969058405890524, 0.969614401257022, 0.9693823325021462, 0.9704055502079513, 0.9708861276688473, 0.9713172450749766], 'REM': [0.1961737173256944, 0.15041506628670548, 0.49051808721107915, 0.5829218513397854, 0.749687590118235, 0.7862571446517179, 0.8086693579333527, 0.8255767943020638, 0.8430115683671533, 0.851206546455651, 0.8602496304311382, 0.8673794098120464, 0.8795522938033532, 0.8848393589723892, 0.8927059040137474, 0.8973435320446986, 0.9002835900973404, 0.9046655631169149, 0.9064025089879905, 0.9087666388555071, 0.9118953527555679, 0.9157561883178035, 0.9148384233362156, 0.9179896204895823, 0.9194131340357755, 0.9214663695330867, 0.9219112345877437, 0.924543458469448, 0.9263030655415382, 0.9285714285714286, 0.9293286219081272, 0.9312282743518675, 0.9325719709437168, 0.9328426722159316], 'Non REM': [0.300507264697497, 0.4421090572061171, 0.6597646827155024, 0.7055236236678812, 0.7401019528200313, 0.7586434348457018, 0.7674361442821735, 0.7815747453712075, 0.7942405509038265, 0.8198546433378198, 0.8317356164607529, 0.8443212079615648, 0.8559567282611681, 0.8620839259922345, 0.866051279787686, 0.8686454231604955, 0.873909018778101, 0.8767851028815674, 0.8798214256115012, 0.8792239503452247, 0.8826288483024879, 0.8846155977589236, 0.8858539183109686, 0.8869923027439497, 0.8888161144753859, 0.8885134571887451, 0.8919704863524401, 0.8922167356050527, 0.8927944152954886, 0.8944701770814173, 0.8946446892983003, 0.8976302311683525, 0.8979201610197919, 0.8998735268111968], 'Pre REM': [0.17708598684152735, 0.18346998397888983, 0.261995743445874, 0.36977587268291573, 0.527307218690718, 0.5952723666954547, 0.6142764817478683, 0.6376558552266706, 0.6514704072843607, 0.6657877389584707, 0.6727223652520555, 0.683999666138052, 0.7024064115607417, 0.7146690982188189, 0.7267327750089915, 0.7312403267632196, 0.7388780637883294, 0.7495224962974313, 0.7515355920077673, 0.755950808008944, 0.7605616618031336, 0.768707414119529, 0.7714620450046459, 0.7748226055534808, 0.7777195809830781, 0.7808005788770187, 0.7863585740515917, 0.7914337800749244, 0.7931761625408501, 0.7985442474779287, 0.8010663045757246, 0.8087862237741368, 0.8090135581090214, 0.8130139364181918], 'Artefakt': [0.4551118829423982, 0.576196422111491, 0.6030167334433184, 0.6420437922035366, 0.654982332155477, 0.6802976183412642, 0.6909193391185899, 0.7157926184676197, 0.740816533051486, 0.7908454786353096, 0.8346000436568571, 0.8829686197740004, 0.9202791002486459, 0.9446408445955708, 0.9600331531114772, 0.9689011614996186, 0.9749236891928443, 0.9786567986164117, 0.981128790443488, 0.9833688286544047, 0.9852824415654834, 0.9877966101694915, 0.9887047827730971, 0.9894059377150556, 0.9901280062063615, 0.9904680636496747, 0.9914342532861231, 0.991744516554621, 0.9929053234337847, 0.992190455863949, 0.9933030514791521, 0.9930306148201354, 0.9931690277508248, 0.9933702837285602], 'avg': [0.30089267010664467, 0.35946693959917086, 0.5158100853848315, 0.5899636020568773, 0.6969091896900124, 0.7362516685085738, 0.7533387379257702, 0.7732803994376447, 0.7901427617354335, 0.8115336770532402, 0.8268462469331039, 0.8439781148931095, 0.8611973795984833, 0.8716271076522155, 0.8801387708912042, 0.8847328187302498, 0.889511704422419, 0.8941225213524959, 0.89641500461682, 0.898046172156943, 0.9009743844218174, 0.9046089920158344, 0.9053758804137118, 0.9072508023772878, 0.9087229277315305, 0.9098217449827672, 0.9120200763373856, 0.9136974759165686, 0.9148474745404371, 0.9166781420503491, 0.9175449999526901, 0.9202161788644887, 0.9207121690984404, 0.9220835328497714]}
f1_scores_003c_valid = {'Wake': [0.7659384013526506, 0.7626023018819246, 0.8090274078921338, 0.7815923818439799, 0.8991182529872271, 0.9366738182573188, 0.9471757697552573, 0.9474741069541323, 0.9574051668920361, 0.9609795049241416, 0.9659506479673353, 0.962255457896229, 0.9678618003822999, 0.969906631131193, 0.9712296327713569, 0.9701819737287682, 0.9736543104672631, 0.9714255307827383, 0.9735028770334587, 0.9738889480976234, 0.9752792334974326, 0.9749991134437392, 0.9721538706650852, 0.9749787955894826, 0.974475245770968, 0.9748384240814519, 0.9745653060139315, 0.976328210952195, 0.976317095653407, 0.976317935264296, 0.9760839976667314, 0.9754706622035669, 0.9759406239457377, 0.9768716624818757, 0.9759673411430599, 0.9763893805309733, 0.9777336899721892, 0.9776074594709144, 0.9780765546844513, 0.9776889894632628, 0.9770368929979317, 0.9773206844578421, 0.9773502837845005], 'REM': [0.5709274281955712, 0.5350080171031535, 0.6886145404663924, 0.5441772493920561, 0.8166269755358303, 0.8460570469798658, 0.8608326908249808, 0.8776026464292664, 0.8877972096679112, 0.8811959087332809, 0.8930491933877714, 0.8827474090631985, 0.8912209889001009, 0.9019607843137255, 0.8975687524910322, 0.8962703962703963, 0.8921493902439024, 0.8981321009050645, 0.8977403293757182, 0.9015664281570296, 0.9015325670498084, 0.8960490985807441, 0.8972762645914396, 0.8968177434908391, 0.8962446767324816, 0.9023111283744417, 0.9023969319271333, 0.9049002517915941, 0.9080325960419091, 0.9011201235998455, 0.8994197292069632, 0.8960092095165004, 0.9027993779160187, 0.9053658536585366, 0.9050867277333852, 0.9003875968992248, 0.9058209243859989, 0.9021802045147599, 0.905112316034082, 0.9050583657587549, 0.9063962558502339, 0.9047619047619047, 0.9067747539085119], 'Non REM': [0.5393776676304558, 0.4804003336113428, 0.6571839753673148, 0.5529007771552502, 0.8249040809208232, 0.9071181718327216, 0.9195858003599467, 0.9159701769747142, 0.932116845079184, 0.9343255620316403, 0.9416895410584644, 0.9387776145180832, 0.94497772119669, 0.9386167371178133, 0.9447569150165652, 0.9432627748449592, 0.9437362412327855, 0.9467919023366519, 0.9439656274775581, 0.9436803688052248, 0.9469371030526532, 0.9511996746644978, 0.9488165906601105, 0.9484293461577816, 0.9494099956673548, 0.9506512006512007, 0.9461212399775292, 0.9501812742438456, 0.9496457682638836, 0.9504518225200528, 0.950821342162231, 0.9508572009971002, 0.9522365428354813, 0.9528108121814539, 0.9509972663764301, 0.9532018455610201, 0.952183267940767, 0.952376114398923, 0.9535771145535872, 0.9524123585815027, 0.9533773489080752, 0.9530530682450549, 0.9532743452577137], 'Pre REM': [0.1061139896373057, 0.005859374999999999, 0.27722772277227725, 0.2956785443517817, 0.4224872231686541, 0.5048247841543931, 0.4513163393230255, 0.45925258892390813, 0.4702627939142462, 0.4717861688587188, 0.4915640674874601, 0.49109653233364575, 0.4888076747373229, 0.4519874944171506, 0.49025341130604294, 0.47314814814814815, 0.4515539305301645, 0.4828953891918691, 0.45471349353049906, 0.4505494505494506, 0.4640826873385013, 0.4848484848484848, 0.5010706638115632, 0.4732189287571503, 0.4782157676348548, 0.4928305894848646, 0.45012285012285014, 0.4696189495365603, 0.4726134585289515, 0.4711437565582371, 0.48311688311688317, 0.47132429614181437, 0.48202959830866804, 0.48583877995642705, 0.46892950391644905, 0.4829106945975744, 0.48995111352525794, 0.4854368932038835, 0.48484848484848486, 0.4769647696476965, 0.49418282548476455, 0.4835164835164835, 0.4856661045531198], 'Artefakt': [0.18129079042784624, 0.29403029403029407, 0.3095163806552262, 0.3069306930693069, 0.4288272157564906, 0.40743801652892564, 0.36986301369863017, 0.39365595770638473, 0.44076888690210103, 0.46783625730994155, 0.539031339031339, 0.488, 0.5180467091295117, 0.5583284968078933, 0.5726141078838174, 0.5317417254476398, 0.64, 0.588380716934487, 0.6356902356902357, 0.6030341340075853, 0.6695156695156695, 0.6444906444906445, 0.6214099216710184, 0.6344086021505377, 0.6318607764390897, 0.6420260095824777, 0.6445824706694272, 0.6734397677793904, 0.6553672316384181, 0.670995670995671, 0.6874536005939124, 0.6613255644573925, 0.6715867158671587, 0.6897590361445783, 0.6522366522366522, 0.6764705882352942, 0.6977099236641222, 0.7174959871589085, 0.6944655041698256, 0.7028265851795263, 0.6723891273247495, 0.6878306878306878, 0.693939393939394], 'avg': [0.4327296554487659, 0.415580064325343, 0.5483140054306689, 0.4962559291624749, 0.678392749673805, 0.7204223675506449, 0.7097547227923682, 0.7187910953976812, 0.7376701804910957, 0.7432246803715447, 0.7662569577864741, 0.7525754027622312, 0.7621829788691851, 0.7641600287575552, 0.7752845638937629, 0.7629210036879822, 0.7802187744948232, 0.777525128030162, 0.7811225126214939, 0.7745438659233826, 0.791469452090813, 0.7903174032056222, 0.7881454622798435, 0.7855706832291582, 0.7860412924489497, 0.7925314704348873, 0.7835577597421743, 0.794893690860717, 0.7923952300253139, 0.7940058617876204, 0.7993791105493442, 0.7909973866632749, 0.7969185717746129, 0.8021292288845743, 0.7906434982811953, 0.7978720211648174, 0.8046797838976671, 0.8070193317494778, 0.8032159948580861, 0.8029902137261485, 0.8006764901131509, 0.8012965657623946, 0.8034009762886478]}
f1_scores_003d_valid = {'Wake': [0.7986130603483859, 0.7132484651251829, 0.7200546287122085, 0.8459017393027546, 0.8695469798657718, 0.9239532019704433, 0.946169477023992, 0.9518422639100677, 0.9591239834498501, 0.9652665732877076, 0.9669026957000124, 0.9611357839727469, 0.9695176298620272, 0.9709512529609774, 0.9699856058855936, 0.9748308811840967, 0.9709214968800268, 0.9726432991152952, 0.9721896226750596, 0.9755291357893053, 0.9772228126106979, 0.9768060431960847, 0.9760521218524388, 0.9773669110615236, 0.9772831980720842, 0.9772494073523689, 0.9783474979722819, 0.9768146582100071, 0.9784320317061519, 0.9783038869257951, 0.9777439671643904, 0.9777337951509153, 0.9789546347593677, 0.9789578093449999, 0.9780818043624281], 'REM': [0.5452914798206278, 0.6506587335316617, 0.6895439889451866, 0.8186979560938682, 0.8385690938805156, 0.8535791757049891, 0.850438763830599, 0.8682521706304266, 0.8850710900473934, 0.881992337164751, 0.8837390457643622, 0.8749281746791803, 0.8537839823659074, 0.8967691095350669, 0.8978145304193739, 0.8916953693073096, 0.895878101191639, 0.8904716073147257, 0.8836944127708095, 0.8668672433245581, 0.8942962818765817, 0.8856757277809909, 0.8947574334898277, 0.8933951332560836, 0.897951219512195, 0.8996062992125985, 0.8988326848249026, 0.8998644199109045, 0.898820844427539, 0.8989838613269576, 0.8975238095238095, 0.8984674329501916, 0.8969766994030426, 0.9016583108368685, 0.8951157812804047], 'Non REM': [0.4891523067354479, 0.0540278853601859, 0.1305182341650672, 0.587199552822806, 0.6907428571428572, 0.8305537799988378, 0.9045191069128381, 0.9229552703023275, 0.9369888620609081, 0.9368451158316217, 0.9332322096398775, 0.9308284860870931, 0.9410338423442014, 0.937810945273632, 0.9321790826836327, 0.9381083754099214, 0.9404299404299404, 0.9405663312934344, 0.9436379604277523, 0.9418409718102804, 0.9440597245462736, 0.945471325659497, 0.9428060073146058, 0.9490803683656979, 0.9451783185271019, 0.9505087172145815, 0.9421833790143249, 0.9413780570123059, 0.9386677708193158, 0.9536666751572886, 0.9376943810906075, 0.9425127491886881, 0.932213526092722, 0.9518109113137385, 0.9472441147023336], 'Pre REM': [0.11554762435868839, 0.04310833806012478, 0.019536019536019536, 0.19884057971014493, 0.2901049475262369, 0.3119266055045872, 0.4058823529411765, 0.46015180265654654, 0.5074626865671641, 0.4852801519468186, 0.4529240978846952, 0.452560873215785, 0.4439764111204718, 0.4619144602851324, 0.44743481917577793, 0.4395509499136442, 0.4887690925426775, 0.47164179104477616, 0.4610081861266696, 0.45450802799505974, 0.4606007836308228, 0.46689895470383275, 0.47687471935339015, 0.48605947955390333, 0.4630669546436285, 0.4860666971219735, 0.443796835970025, 0.44855789926818773, 0.4096586178184846, 0.5220440881763527, 0.40032349373230897, 0.4475770925110132, 0.380952380952381, 0.481203007518797, 0.45883441258094354], 'Artefakt': [0.19274332885390671, 0.24763799104922923, 0.3209635416666667, 0.49205147615442835, 0.2723112128146453, 0.33595620937393084, 0.34078590785907864, 0.39495467087110764, 0.39450980392156865, 0.4655831739961759, 0.468342644320298, 0.40998363338788874, 0.6127819548872181, 0.49552238805970156, 0.457480673033197, 0.5756327251324308, 0.5678449258836944, 0.5549915397631133, 0.5604584527220631, 0.654130288784419, 0.6385463984425697, 0.684813753581662, 0.6145181476846058, 0.6369087275149901, 0.6212603437301083, 0.6788588149231894, 0.7007407407407407, 0.6398416886543534, 0.6525017135023989, 0.6728307254623044, 0.6680469289164941, 0.6918604651162791, 0.6942028985507246, 0.6874546773023931, 0.662534435261708], 'avg': [0.4282695600234113, 0.3417362826252769, 0.3761232826050297, 0.5885382608168005, 0.5922550182460053, 0.6511937945105577, 0.6895591217135368, 0.7196312356740953, 0.7366312852093768, 0.746993470445415, 0.741028138661849, 0.7258873902685388, 0.7642187641159651, 0.752593631222902, 0.740978942239515, 0.7639636601894806, 0.7727687113855957, 0.766062913706269, 0.7641977269444709, 0.7785751335407245, 0.7829452002213891, 0.7919331609844135, 0.7810016859389737, 0.7885621239504397, 0.7809480068970236, 0.7984579871649424, 0.7927802277044551, 0.7812913446111518, 0.7756161956547781, 0.8051658474097397, 0.7762665160855221, 0.7916303069834175, 0.7766600279516476, 0.8002169432633593, 0.7883621096375636]}
f1_scores_003e_valid = {'Wake': [0.6438713917570349, 0.7011950165268243, 0.19955691888207225, 0.7256888524494158, 0.8306592124600396, 0.8722392442231585, 0.9141733342298124, 0.9472026580372749, 0.9499813826486284, 0.9506403128026688, 0.9569846373704894, 0.9574932170027132, 0.9600573682323412, 0.9625938737834495, 0.9616155169051291, 0.9606813342796311, 0.9616207329361642, 0.9662877786589126, 0.9637677300243206, 0.9588251826869028, 0.9668159212785162, 0.9670955457085402, 0.9668864729994654, 0.9658557481214414, 0.9703093590450608, 0.9734150606772536, 0.9712507778469198, 0.9678038038749089, 0.9710814783332447, 0.9720483641536273, 0.9723443483193873, 0.971516633010947, 0.9691018132080105, 0.9728321548195012], 'REM': [0.022836843440751077, 0.028254288597376383, 0.16538663861125724, 0.558894061221611, 0.8439688715953307, 0.8655903520715814, 0.861779722830051, 0.8948797517455392, 0.8688035780842341, 0.8110447146095199, 0.8725190839694656, 0.8718544328300426, 0.8674471299093656, 0.8869769260852562, 0.8778403573509419, 0.8507795100222717, 0.8808349146110057, 0.8886726352666406, 0.8436599423631124, 0.8704722169542956, 0.8691999236203933, 0.8851047171657859, 0.8550670640834575, 0.8568249258160238, 0.8698912635920508, 0.8942493245851023, 0.8824640967498112, 0.8915848257269401, 0.8895752895752896, 0.8884652049571019, 0.8881239242685026, 0.8823079862437905, 0.8930072602216279, 0.8841234010534237], 'Non REM': [0.11220247612956279, 0.05950991831971996, 0.4092446000238673, 0.38363812914711126, 0.6303374243615603, 0.7472225689676695, 0.8032319391634981, 0.904359106018431, 0.8908256631641824, 0.9330246913580246, 0.9306777030522504, 0.9225924954080293, 0.9366189937236342, 0.9388825251368207, 0.9339049103663289, 0.9291829201246171, 0.9200295016331262, 0.9339135873247512, 0.9240140734128027, 0.9245681686123289, 0.933669360076905, 0.9401291584120205, 0.943256958326926, 0.9417662938681064, 0.9378061987519983, 0.9411097359735973, 0.936295227296155, 0.939005849460149, 0.9419070101611413, 0.9433807929245164, 0.9409226343367924, 0.9417220590508579, 0.9346804511278196, 0.9382665048669024], 'Pre REM': [0.03155680224403927, 0.0022271714922048997, 0.007692307692307692, 0.06753812636165578, 0.3008849557522124, 0.34635793535938253, 0.2597325408618128, 0.45390693590869186, 0.35899306822327615, 0.5172964342735498, 0.47064137308039755, 0.47084048027444253, 0.49114631873252557, 0.5261627906976745, 0.49297094657919405, 0.45897542690545606, 0.4284559417946645, 0.4837126282909416, 0.399845619451949, 0.47818499127399644, 0.4614100959532749, 0.4844020797227037, 0.49953746530989834, 0.47193990278391523, 0.4603514787826832, 0.46797153024911037, 0.43229604709840197, 0.4713715046604527, 0.49859418931583893, 0.48171846435100546, 0.4802513464991023, 0.4687083888149135, 0.4553571428571429, 0.4368932038834951], 'Artefakt': [0.2830349531116795, 0.43014394580863674, 0.42789820923656924, 0.40393667094565683, 0.4562078922040424, 0.4189991518235794, 0.4281318681318682, 0.47859922178988334, 0.34046890927624873, 0.3431708991077557, 0.4528819762122598, 0.4366505918456817, 0.45462878093492204, 0.4901185770750988, 0.47053231939163487, 0.5118924508790073, 0.4957605985037407, 0.5510662177328844, 0.5651162790697674, 0.5101298701298701, 0.5876662636033858, 0.5446478092068774, 0.595561035758323, 0.5742806811509102, 0.5995055624227441, 0.654295532646048, 0.6175528507367072, 0.5687645687645688, 0.6360655737704919, 0.6419919246298789, 0.6392447741065409, 0.6308196721311475, 0.6531165311653115, 0.6285714285714286], 'avg': [0.2187004933366135, 0.24426606814895244, 0.24195573488921474, 0.42793916802509, 0.6124116712746371, 0.6500818504890743, 0.6534098810434085, 0.7357895346999641, 0.681814520279314, 0.7110354104303037, 0.7367409547369727, 0.7318862434721818, 0.7419797183065577, 0.7609469385556599, 0.7473728101186459, 0.7423023284421966, 0.7373403378957402, 0.764730569454826, 0.7392807288643903, 0.7484360859314787, 0.7637523129064951, 0.7642758620431855, 0.772061799295614, 0.7621335103480793, 0.7675727725189074, 0.7862082368262222, 0.767971799945599, 0.7677061104974039, 0.7874447082312013, 0.7855209502032261, 0.7841774055060651, 0.7790149478503313, 0.7810526397159825, 0.7721373386389502]}
f1_scores_005b_train = {'Wake': [0.707201114799787, 0.844833893612814, 0.8836289499511725, 0.9136675394090006, 0.9331268346799926, 0.9440160977644719, 0.9503148608423141, 0.9578379703395024, 0.9631408961466038, 0.9671228181840438, 0.9698286833088595, 0.9716694830078034, 0.9734237218523942, 0.9752119084604376, 0.9767090390644487, 0.9774589612074769, 0.9791858970435208, 0.980704874738477, 0.9816784841015891, 0.982599684966843, 0.9833402350842544, 0.9840535307237923, 0.984698430130512, 0.9856748419622672, 0.9862769183995215, 0.9870804961834868, 0.9877587259852987, 0.9886263315873108, 0.9892306447142847, 0.989663011729968, 0.9902686366524306, 0.9907959356892991, 0.9913237584781623, 0.9914727427054663, 0.9920273572038347, 0.9922955600742727, 0.9926898432977147, 0.9929614609936386, 0.9932511499540018, 0.9934780635809086, 0.9939334469943211, 0.9940459105193821, 0.9940008097066654, 0.9944160942100098, 0.9944404916705514, 0.9946316233696132, 0.9947269109120309, 0.9949824200683568, 0.9950880085579552, 0.995274964672633], 'REM': [0.07988582374039924, 0.42404723564143854, 0.5958738516090903, 0.6597943888780543, 0.7328192140235052, 0.7749508533006639, 0.8084947195764152, 0.8325194894200292, 0.8468050168455027, 0.8596969611784218, 0.8676976425515256, 0.8762131883977594, 0.8828155072862249, 0.8902285994871515, 0.8945229969120755, 0.8987926424114739, 0.9071303410163095, 0.9135317086306719, 0.9159120310478654, 0.9211638360293919, 0.9230727777328698, 0.9255633840692734, 0.9315754069689224, 0.9331973482916879, 0.9363863581391599, 0.9405327110324293, 0.9413279678068411, 0.9461649938274919, 0.9475408075601374, 0.9498537737114646, 0.9538593527976621, 0.9556917782438028, 0.9589659527584447, 0.9598302991246442, 0.9619075781607034, 0.9631461519851616, 0.9649202978414558, 0.9673866322802493, 0.9689177582134422, 0.9687978714827059, 0.9711308644627655, 0.9710588487972508, 0.9718873345326638, 0.9729163308076736, 0.9751919669226226, 0.9758534554537884, 0.9746770858508553, 0.9769694360740422, 0.9777968926401807, 0.977835093092609], 'Non REM': [0.5618943612905138, 0.8291478985965827, 0.8351290403407666, 0.8656160591835054, 0.8910454883023418, 0.9084527744516703, 0.9137885522269863, 0.9227873691743448, 0.9296582107275982, 0.9353472756421778, 0.9391260510253687, 0.9424340145242077, 0.9450760110390526, 0.9476324026996218, 0.9498594818051601, 0.950987352042073, 0.9535891291027812, 0.95531360243065, 0.9570849086040621, 0.9589790337283501, 0.9603610931565149, 0.9617046011879893, 0.9631225409880732, 0.9649080111149452, 0.9660943628742908, 0.968060969224504, 0.969351291419016, 0.971259162256052, 0.9724208673131626, 0.9735048488928513, 0.9749951780833882, 0.9760603259405912, 0.9773407407946758, 0.9780711975995572, 0.9788402366863905, 0.9795692343563288, 0.9802957100904328, 0.981163011003425, 0.9817435792787802, 0.9825664058797366, 0.9836305834657956, 0.9837942703775017, 0.9841998964644807, 0.9844630244777555, 0.9850174698927007, 0.9854790244471673, 0.9856067348516904, 0.9861282850941987, 0.9864709058801208, 0.987015735847955], 'Pre REM': [0.04629976534616371, 0.10604466992513766, 0.13119008145318245, 0.1380129787039576, 0.222433279513724, 0.29180610000956114, 0.33508158508158503, 0.3600116132778477, 0.3670751712824471, 0.38125948406676785, 0.3949400055808762, 0.4129458146144677, 0.42276273519963287, 0.43649211813734373, 0.44708192039978584, 0.45008460236886627, 0.4781886528542705, 0.48728153659802736, 0.508757014113246, 0.5353322664869873, 0.5456518110499081, 0.5656615587411437, 0.5855737704918033, 0.5941553111147594, 0.6130466413386144, 0.6294169968464463, 0.6407204889031842, 0.6621966794380587, 0.6730249562867588, 0.6831393046646076, 0.7025027546041239, 0.7183890103028411, 0.7284037011118887, 0.7424982554082344, 0.7461484864906711, 0.7543832666871733, 0.7642114914425426, 0.7739070515274481, 0.7840856924254017, 0.7887045212361089, 0.8016704631738801, 0.8012970364225925, 0.8110230275575688, 0.8112098839837276, 0.8253681995792005, 0.8258025712352455, 0.8275295172619939, 0.8327991054789415, 0.8417693335312453, 0.8425360916803095], 'Artefakt': [0.003648939356806361, 0.020145044319097503, 0.04468802698145025, 0.06972690296339337, 0.0707635009310987, 0.09065550906555091, 0.02011173184357542, 0.0030165912518853697, 0.0, 0.006259780907668232, 0.0, 0.0031695721077654522, 0.0030627871362940277, 0.0, 0.0031397174254317118, 0.0124804992199688, 0.04833836858006043, 0.184, 0.250620347394541, 0.338785046728972, 0.3552941176470588, 0.37657864523536166, 0.42045454545454547, 0.43863636363636366, 0.4760869565217391, 0.5283422459893049, 0.5254054054054053, 0.5744016649323622, 0.5806451612903225, 0.6134969325153374, 0.6459378134403209, 0.6804733727810651, 0.7057673509286414, 0.7117031398667935, 0.7431279620853081, 0.7377358490566037, 0.7531219980787703, 0.767097966728281, 0.8, 0.8025594149908593, 0.8120437956204379, 0.8033088235294117, 0.8091324200913242, 0.813466787989081, 0.8324324324324325, 0.8255395683453237, 0.8520499108734403, 0.852863436123348, 0.845601436265709, 0.8571428571428572], 'avg': [0.279786000906734, 0.44484374841901414, 0.4981019900671324, 0.5293635738275823, 0.5700376634901325, 0.6019762669183837, 0.6055582899141753, 0.6152346066927219, 0.6213358590004303, 0.629937263995816, 0.6343184764933261, 0.6412864145304007, 0.6454281525027197, 0.6499130057569109, 0.6542626311213804, 0.6579608114499718, 0.6732864777193884, 0.7041663444795653, 0.7228105570522608, 0.7473719735881089, 0.7535440069341213, 0.762712343991512, 0.7770849388067712, 0.7833143752240047, 0.7955782474546652, 0.8106866838552342, 0.812912775903949, 0.8285297664082553, 0.8325724874329332, 0.8419315743028457, 0.8535127471155851, 0.8642820845915198, 0.8723603008143626, 0.8767151269409391, 0.8844103241253816, 0.885426012431908, 0.8910478681501832, 0.8965032245066084, 0.9055996359743252, 0.907221255434064, 0.9124818307434401, 0.9107009779292277, 0.9140486976705405, 0.9152944242936496, 0.9224901120995016, 0.9214612485702276, 0.9269180319500021, 0.9287485365677774, 0.9293453153750422, 0.9319609484872728]}
f1_scores_005b_valid = {'Wake': [0.8323089070894425, 0.8284153329088998, 0.76086896816896, 0.8543558694920955, 0.8970359320275004, 0.9254204031050448, 0.9249679537832095, 0.9430707099333994, 0.9459074225848983, 0.953157261611936, 0.9541666666666667, 0.9567336559177763, 0.9672777414393552, 0.9625220836692339, 0.9696717473859439, 0.9707054707489862, 0.9776465626318009, 0.9808552827837927, 0.9806192058772083, 0.9807722699257231, 0.9796699438202248, 0.9808293725815856, 0.9814246373506869, 0.9815708798759646, 0.9803556694696558, 0.9803756214972155, 0.9765371450866335, 0.980597539543058, 0.9810310513059866, 0.9800680773414747, 0.9805787736180376, 0.9813605561911466, 0.9807949820283318, 0.9807884977062205, 0.9817143058665867, 0.9815140845070423, 0.981657848324515, 0.9815078736693938, 0.981851499453783, 0.981689371376205, 0.9809351443481927, 0.9817649548532732, 0.9810397338168759, 0.9811619161424102, 0.9809051587720223, 0.9812949133436664, 0.9812804061200028, 0.9810630703497265, 0.9809619414945141, 0.9809004572634541], 'REM': [0.24989411266412537, 0.6955486788859796, 0.6004250797024442, 0.6847744829304759, 0.8363947031183256, 0.8227215980024969, 0.8434114634626748, 0.8608051271780492, 0.8796296296296297, 0.8476639183352964, 0.8884348181446671, 0.8852459016393442, 0.8904705417160934, 0.8691514670896114, 0.8955759266640095, 0.893625419380304, 0.9085534095388254, 0.9128662914806908, 0.918822832312858, 0.908984145625367, 0.9136328427575523, 0.9112541447240103, 0.9135707410972088, 0.9106549364613881, 0.9122137404580153, 0.9129026110158185, 0.9081039162466071, 0.9120062573328119, 0.9144178874325367, 0.9068627450980392, 0.9121371517631015, 0.9119411650861233, 0.9107497024990083, 0.9107763615295481, 0.9124709527498064, 0.9141092453194364, 0.9120750293083236, 0.9082371355899043, 0.9107176851323053, 0.9115859635365615, 0.9109483423284502, 0.910136041387239, 0.9141092453194364, 0.9133980582524273, 0.9162313793770555, 0.9117703349282298, 0.9121660580434364, 0.9125358851674641, 0.9099029126213591, 0.9120245870149828], 'Non REM': [0.7628060321142928, 0.6757905583821731, 0.41258687258687254, 0.7493693693693695, 0.8330781863222646, 0.8782678913899263, 0.8675785508970166, 0.9017147026632616, 0.9038968578408844, 0.9183336918333692, 0.9129357505581042, 0.9244289945898309, 0.9409454616857297, 0.9511503792037997, 0.9555733841448127, 0.9578517162700899, 0.9614854536798056, 0.9601379551645715, 0.9597963614584114, 0.9597162908019281, 0.9608316971253084, 0.9630257971159124, 0.9623348848911811, 0.9630223871242698, 0.9613496160141004, 0.9616458338572974, 0.9631002780630779, 0.9624965367856334, 0.9622617822080498, 0.9590334534747956, 0.9614989089267351, 0.9607779416543759, 0.9626966292134832, 0.9612726495941293, 0.9627369579352772, 0.9619326867654061, 0.9632373182512075, 0.9624624624624625, 0.9626595637752539, 0.9628058971736474, 0.9618562137458253, 0.9627680897975547, 0.9608857200241012, 0.9618163572503763, 0.9618382020212178, 0.9625043861847711, 0.9621903520208606, 0.9610363476292292, 0.9621534914030778, 0.9624237556163558], 'Pre REM': [0.0784313725490196, 0.15800415800415799, 0.05771643663739021, 0.2256297918948521, 0.3815668202764977, 0.4081272084805654, 0.47406340057636887, 0.46102819237147596, 0.5048689138576778, 0.42882249560632685, 0.5349626612355738, 0.5187406296851574, 0.49786019971469336, 0.4683544303797469, 0.47275775356244765, 0.4988085782366958, 0.5358166189111748, 0.49961089494163424, 0.5101543460601138, 0.538896746817539, 0.5066469719350074, 0.5412907702984039, 0.5286343612334802, 0.5469613259668509, 0.5063861758076634, 0.48318999218139164, 0.5189028910303929, 0.5305832147937412, 0.512035010940919, 0.49547668754349333, 0.5292439372325249, 0.5255579553635709, 0.5334302325581395, 0.5236111111111111, 0.522839072382291, 0.5176960444136016, 0.5266067726330339, 0.5258019525801952, 0.5101611772950245, 0.5239114917915775, 0.5205861828332171, 0.5138888888888888, 0.5165745856353591, 0.5188343994314143, 0.5226781857451405, 0.5144092219020173, 0.5231416549789621, 0.5049645390070923, 0.5160370634354954, 0.5105762217359592], 'Artefakt': [0.07913669064748202, 0.02298850574712644, 0.35105315947843535, 0.16975308641975306, 0.33698030634573306, 0.022764227642276424, 0.0, 0.0, 0.0, 0.0, 0.0, 0.007547169811320755, 0.003913894324853229, 0.0, 0.0038910505836575876, 0.15161290322580645, 0.6086086086086087, 0.6532066508313539, 0.5879194630872484, 0.6101694915254237, 0.7304832713754648, 0.7086156824782187, 0.7693898655635988, 0.7570093457943925, 0.7216294859359845, 0.7411545623836125, 0.621676891615542, 0.7433016421780467, 0.7394807520143242, 0.7462946817785526, 0.7047413793103449, 0.6997792494481235, 0.7386363636363635, 0.754601226993865, 0.7590361445783134, 0.7287958115183245, 0.7708333333333333, 0.7382978723404255, 0.7561904761904761, 0.7278481012658228, 0.7329729729729729, 0.7582089552238805, 0.7381889763779529, 0.729362591431557, 0.7551401869158879, 0.7391742195367573, 0.7632850241545894, 0.7512291052114061, 0.7404580152671757, 0.7330677290836654], 'avg': [0.4005154230128725, 0.4761494467856674, 0.43653010331482045, 0.5367765200213092, 0.6570111896180644, 0.611460265724062, 0.622004273743854, 0.6333237464292372, 0.646860564782618, 0.6295954734773856, 0.6580999793210024, 0.658539270328686, 0.6600935677761449, 0.6502356720684783, 0.6594939724681742, 0.6945208175723765, 0.798422130674043, 0.8013354150404087, 0.791462441759168, 0.7997077889391961, 0.8182529454027115, 0.8210031534396262, 0.8310708980272311, 0.8318437750445732, 0.816386937537084, 0.8158537241870671, 0.7976642244084505, 0.8257970381266583, 0.8218452967803632, 0.8175471290472711, 0.8176400301701487, 0.8158833735486681, 0.8252615819870653, 0.8262099693869749, 0.827759486702455, 0.8208095745047622, 0.8308820603700827, 0.8232614593284764, 0.8243160803693685, 0.8215681650287628, 0.8214597712457318, 0.8253533860301673, 0.8221596522347451, 0.820914664501637, 0.8273586225662648, 0.8218306151790884, 0.8284126990635702, 0.8221657894729837, 0.8219026848443244, 0.8197985501428835]}
f1_scores_006_train = {'Wake': [0.579378427988575, 0.7998082197225646, 0.8666271691018058, 0.9010434172466837, 0.9312967778958037, 0.9446175265058951, 0.9496370246998778, 0.9527800585224185, 0.9545874951498009, 0.9608831960963707, 0.9644870046389308, 0.9670754221021359, 0.9699339500602787, 0.9713167486118246, 0.973124943465325, 0.9741151843727609, 0.976176954410152, 0.9773267060062192, 0.9782488379952294, 0.9795819416011206, 0.9802448995588476, 0.9813253853676709, 0.9823297129957129, 0.9825869549231561, 0.9833294534226938, 0.9843653079987742, 0.9847601027430835, 0.9853587259247637, 0.9861863010474285, 0.9869103530772927, 0.9872187086336226, 0.9876281683510599, 0.9882884230191205, 0.9886558702070682, 0.9891948892758172, 0.9894921706369452, 0.9900826000505064, 0.9903368846508526, 0.9908246080040027, 0.9909178980930774, 0.9915995653848135, 0.9917565370097396, 0.9920150673912617, 0.992126602273229, 0.9923758125843247, 0.992511889490892, 0.9928760431508243, 0.9927932259267254, 0.9932616571858894, 0.9933674445529158], 'REM': [0.07884999787351678, 0.34322755030533586, 0.570007837202389, 0.6258582182149062, 0.7288473244424769, 0.7847412956027189, 0.8094058042843769, 0.8198774826250583, 0.8240618101545254, 0.8438867652761619, 0.8546061157526126, 0.8623525205577404, 0.8709041095890412, 0.8754745841413782, 0.8848604161539935, 0.8875409569714858, 0.8957725159476702, 0.9029786315562272, 0.9079731442284359, 0.9115199181188892, 0.9153608385969628, 0.9176073142612006, 0.9213242192735559, 0.9246177329084434, 0.9283261802575107, 0.9297262514411346, 0.9316883465200483, 0.9358836785062774, 0.9379435948255082, 0.9394767878203066, 0.9423463507464687, 0.9445575316048854, 0.9458605547820499, 0.9488127780457737, 0.9502318226891432, 0.9509330759330759, 0.9543432827822733, 0.955135077186964, 0.956694285790899, 0.9580376509653751, 0.9588410143802052, 0.9608935554722237, 0.9622919625867661, 0.9622217465753425, 0.9627465694682676, 0.9652232202708138, 0.965778040015019, 0.9665228229113618, 0.9689191361663362, 0.9680257510729614], 'Non REM': [0.4183178586245868, 0.7847612372640613, 0.8285060496615665, 0.8552045251996144, 0.8928599885551202, 0.9088973969646994, 0.915244280539147, 0.9191784998693265, 0.9210851024565694, 0.9288232270953826, 0.9335841182395477, 0.9368311598284302, 0.9403632763523497, 0.9421480434711896, 0.9443630350856245, 0.9461308607544505, 0.9483412064940001, 0.950286128214415, 0.9515167547861759, 0.9536994051936747, 0.954804595700235, 0.956706534274296, 0.958330914789877, 0.9588642287224388, 0.960516807500826, 0.9621978404989943, 0.9632587801377205, 0.9645451407183998, 0.9659488633266097, 0.9677435779933298, 0.9684458604285777, 0.9693860845839019, 0.970597973403191, 0.9718481539564313, 0.9724691200814976, 0.9732156500352904, 0.9747685539263888, 0.9752155760767884, 0.976328474275146, 0.9768161755065771, 0.9779935958850465, 0.9783946232446316, 0.9792355142298121, 0.9796163812425516, 0.9802652674537239, 0.9805709869792806, 0.9811923427529626, 0.9813748359819215, 0.9821363470652571, 0.9821134298756035], 'Pre REM': [0.03170637970791699, 0.07956396441548678, 0.16642120765832105, 0.13239369704648035, 0.17011762418586565, 0.2485068050523842, 0.2977490097575114, 0.31119359249853484, 0.33168460867035204, 0.3677283997711234, 0.36354879106059146, 0.38775316154796996, 0.4025228278264144, 0.4112760197890414, 0.42948185092823493, 0.4323329037009758, 0.4432530667878237, 0.4621449690887913, 0.47179487179487173, 0.4888036943452122, 0.4974265026607346, 0.5138530373429702, 0.5237728090465177, 0.5374195733152727, 0.5565950273914876, 0.5652646542353039, 0.5792818819645068, 0.5974260185261088, 0.6056188057990008, 0.6219046845822848, 0.6288684915928844, 0.647314248954648, 0.6520653836862871, 0.6672507167887862, 0.6704382470119522, 0.6803044719314938, 0.6981950027587294, 0.7043031977891827, 0.7111913357400723, 0.7162848878117426, 0.7340020216157376, 0.7385285425416083, 0.7474606497635109, 0.7511991335293207, 0.7620220050780949, 0.7677449026521539, 0.774405626481156, 0.7774116925906062, 0.7839633447880872, 0.7841852670069323], 'Artefakt': [0.003233826520854704, 0.005933837709538644, 0.014263074484944533, 0.017681728880157174, 0.015827338129496403, 0.027027027027027025, 0.052230685527747546, 0.030162412993039442, 0.0026631158455392816, 0.0, 0.009244992295839754, 0.0032, 0.0, 0.0, 0.003236245954692557, 0.03189792663476874, 0.08333333333333333, 0.13049645390070921, 0.19302949061662197, 0.2154255319148936, 0.24396442185514614, 0.27411167512690354, 0.3376932223543401, 0.3321385902031063, 0.35308343409915355, 0.41600000000000004, 0.3918757467144564, 0.4149659863945579, 0.4636058230683091, 0.48785871964679917, 0.5151515151515151, 0.5413533834586466, 0.5589798087141339, 0.5699263932702417, 0.5840336134453781, 0.624229979466119, 0.6321138211382114, 0.6573146292585169, 0.6825396825396826, 0.6787512588116819, 0.6944444444444445, 0.704724409448819, 0.703888334995015, 0.7378455672068637, 0.7358309317963497, 0.7381404174573054, 0.7586206896551725, 0.7614503816793893, 0.7556818181818182, 0.7638758231420507], 'avg': [0.22229729814309004, 0.40265896188339745, 0.48916506762180534, 0.5064363173175683, 0.5477898106417525, 0.582758010230545, 0.6048533609617321, 0.6066384093016756, 0.6068164264553574, 0.6202643176478077, 0.6250942043975045, 0.6314424528072553, 0.6367448327656168, 0.6400430792026868, 0.647013298317574, 0.6544035664868885, 0.6693754153945959, 0.6846465777532724, 0.700512619884267, 0.709806098234758, 0.7183602516743852, 0.7287207892746083, 0.7446901756920006, 0.7471254160144835, 0.7563701805343342, 0.7715108108348414, 0.7701729716159631, 0.7796359100140215, 0.7918606776133712, 0.8007788246240025, 0.8084061853106137, 0.8180478833906282, 0.8231584287209565, 0.8292987824536603, 0.8332735385007576, 0.843635069600585, 0.8499006521312218, 0.856461072992461, 0.8635156772699606, 0.8641615742376908, 0.8713761283420494, 0.8748595335434043, 0.8769783057932731, 0.8846018861654615, 0.8866481172761521, 0.8888382833700892, 0.8945745484110269, 0.8959105918180008, 0.8967924606774776, 0.8983135431300928]}
f1_scores_006b_train = {'Wake': [0.671187161228611, 0.7736797720349422, 0.8092740042350551, 0.868999069900551, 0.9200443620776722, 0.9455887860467603, 0.9536779285218938, 0.9562648302962027, 0.9604987472711023, 0.9633808324982279, 0.9675940744288097, 0.9688429186228481, 0.9704172663276801, 0.9725349910078974, 0.9744282317019465, 0.9762750362862466, 0.9777015269473535, 0.9785752583528583, 0.979005221753059, 0.9804129013298067, 0.9810565608864766, 0.9815682767576043, 0.9821977364853273, 0.9827205512955298, 0.983597556790886, 0.9840264045811066, 0.9847281462960239, 0.9854598497199104, 0.9858928444486933, 0.9867881593659885, 0.9871719130347385, 0.9877186015384841, 0.9882765383672469, 0.9884020871339179, 0.9891881420230362, 0.9896447636539297, 0.9900251577878801, 0.9902873578719971, 0.9905258949877741, 0.9909232225257076, 0.9913509747937087, 0.9916058707407089, 0.9915487431023912, 0.9919215601640212, 0.9921956627309786, 0.9922458948855275, 0.9928685288275253, 0.9929457588705366, 0.9931080491118949, 0.9931387387740984], 'REM': [0.05032760421612382, 0.07704877170631734, 0.0903577731429488, 0.36155828633324616, 0.6518008061370434, 0.7656607158357688, 0.8046364121130477, 0.8208365780398265, 0.8368989854433173, 0.848013674082651, 0.863901118433646, 0.8654856178735679, 0.869850568166409, 0.8758471130387638, 0.8823258709834603, 0.8903659849300324, 0.8946689595872742, 0.8996020649602066, 0.9047670231633257, 0.9093351964314507, 0.9126969217143931, 0.9172402667240266, 0.9164406005747897, 0.9209104834591921, 0.9255731352922183, 0.9267256446798786, 0.9312410994975414, 0.9317930904488785, 0.9359847159809488, 0.9399262866212907, 0.9411069635040417, 0.9426943339425867, 0.9447225361967814, 0.9486386970193781, 0.9499771523801844, 0.9528672005159349, 0.9533589612623996, 0.9555519724819951, 0.9560356874126625, 0.9584666254469206, 0.9590291574934221, 0.9611728693410666, 0.9611653094681394, 0.9632793402637871, 0.9648392382282629, 0.9648840206185567, 0.9664122957867584, 0.9675078610013705, 0.9665942203976495, 0.968518319544429], 'Non REM': [0.5729630527097724, 0.7307145601945986, 0.774158535620202, 0.8322798613113325, 0.8903481636655053, 0.9134181251585317, 0.9218239157480542, 0.9243447912075207, 0.9288958315253552, 0.9318766438336369, 0.9373447739039137, 0.9388167544955723, 0.9408916624990035, 0.9437014425395075, 0.9463134616289465, 0.9489962922194543, 0.9510892409374865, 0.9520855676976144, 0.9531531335702668, 0.9550752370183526, 0.9562100150424996, 0.9570464493061072, 0.9586125373480695, 0.9595648797904226, 0.9610934330881792, 0.9620074859592883, 0.9633846176186569, 0.9649490974047664, 0.9660350765028117, 0.9676250108957783, 0.9687798743052805, 0.9699420073808789, 0.9712174760388033, 0.9717756601440315, 0.9733906141438979, 0.9741361744243588, 0.9747844121820761, 0.9759817697336808, 0.9764914017793439, 0.9772628772676119, 0.9780565861188883, 0.9787294487867773, 0.979036517621346, 0.9798336843793046, 0.9803180016322723, 0.9805418252336585, 0.9815790337104048, 0.9819173050151965, 0.9825377498122536, 0.9825594745608888], 'Pre REM': [0.03571961222967935, 0.05476621028158098, 0.07108706592853548, 0.08893860998461753, 0.16928508384819063, 0.2849344978165939, 0.339523507564091, 0.3411545623836127, 0.33487743678826487, 0.34678111587982835, 0.37904439428141457, 0.3863364331092901, 0.38340891912320485, 0.3927904370564064, 0.40410256410256407, 0.4173169825343738, 0.4345583494519664, 0.4506531204644412, 0.46435001800504144, 0.4697132616487455, 0.48778748440007136, 0.5120932660518531, 0.5234678883222406, 0.5346163671974794, 0.5568958245466049, 0.5688011473888467, 0.5870671672924489, 0.6014702238374494, 0.6181788297172912, 0.6321032005225343, 0.6410695361539088, 0.6595624444982644, 0.6744223363286265, 0.6877741446686338, 0.7046985183424451, 0.7104118902680053, 0.7104930467762326, 0.7329202290375716, 0.7360124853687084, 0.7469015511731234, 0.7524245480642409, 0.7634558709477276, 0.7664301141622956, 0.7783651267907761, 0.7842896594047254, 0.7875679399831584, 0.7971687343024584, 0.7937137625877326, 0.8029263831732968, 0.8092818685068629], 'Artefakt': [0.004815682932026423, 0.013839853128089252, 0.010084033613445379, 0.017453391511305035, 0.016574585635359115, 0.01958041958041958, 0.04582210242587601, 0.10146862483311081, 0.09625668449197862, 0.11052631578947368, 0.1276595744680851, 0.14602346805736635, 0.17974683544303796, 0.17345597897503284, 0.19123505976095617, 0.20689655172413793, 0.24438902743142146, 0.22849807445442877, 0.28535669586983736, 0.2871287128712871, 0.29702970297029707, 0.35167464114832536, 0.3154034229828851, 0.36275695284159615, 0.3543689320388349, 0.3866348448687351, 0.3952380952380952, 0.41019698725376597, 0.4337899543378996, 0.46260069044879176, 0.48430493273542596, 0.47500000000000003, 0.496629213483146, 0.5488069414316703, 0.5478260869565218, 0.5382978723404255, 0.5834230355220666, 0.5861344537815125, 0.6153846153846153, 0.6253807106598984, 0.634297520661157, 0.6201873048907388, 0.6512096774193548, 0.6888888888888889, 0.6774519716885743, 0.6890424481737415, 0.6785714285714285, 0.720314033366045, 0.7071498530852106, 0.7166831194471867], 'avg': [0.26700262266324265, 0.3300098334691056, 0.3509922825080373, 0.4338458438082104, 0.5296106002727542, 0.585836508887615, 0.6130967732745926, 0.6288138773520545, 0.6314855371040036, 0.6401157164167637, 0.6551087871031738, 0.661101038431729, 0.6688630503118671, 0.6716659925235215, 0.6796810376355747, 0.6879701695388489, 0.7004814208711004, 0.7018828171859098, 0.7173264184723062, 0.7203330618599285, 0.7269561370027476, 0.7439245799975833, 0.7392244371426624, 0.752113846916844, 0.7563057763513445, 0.765639105495571, 0.7723318251885533, 0.7787738497329542, 0.7879762841975289, 0.7978086695708767, 0.8044866439466791, 0.8069834774720427, 0.8150536200829208, 0.8290795060795263, 0.8330161027692171, 0.8330715802405309, 0.8424169227061311, 0.8481751565813515, 0.8548900169866208, 0.8597869974146525, 0.8630317574262835, 0.8630302729414039, 0.8698780723547055, 0.8804577200973556, 0.8798189067369627, 0.8828564257789285, 0.883320004239715, 0.8912797441681762, 0.8904632511160612, 0.8940363041666931]}
f1_scores_006c_train = {'Wake': [0.6507555591023354, 0.7936605639335731, 0.8419288261293165, 0.8811481885740262, 0.9210232673471918, 0.943476795145522, 0.9549185435334538, 0.9610506936746444, 0.9648705770948548, 0.9672493882156411, 0.9694329758385655, 0.9709316102554081, 0.9720779459075953, 0.9743380417327627, 0.9754751055926157, 0.9766764704443021, 0.9772357285717431, 0.9782845611482954, 0.9791580907576204, 0.9797137529434538, 0.9803159638170467, 0.9808816070916669, 0.9814779407078388, 0.981923457831207, 0.9821323952983858, 0.9826793036428119, 0.983259885980951, 0.9835295502130518, 0.9838343071653275, 0.9840324351884536, 0.9846565063328389, 0.9848596315696546, 0.985120010985885, 0.9857266510226251, 0.9856838183021597, 0.9860212892185946, 0.9860041935918973, 0.9864521238901163, 0.9866037601673366, 0.9867703135153693, 0.9869160528458076, 0.9871646819121314, 0.9874540808569284, 0.9875052419127403, 0.9876331284040776, 0.9879071318738182, 0.9880035599491016, 0.987927639403518, 0.9881457431103569, 0.9884149242457685], 'REM': [0.07965138728004854, 0.23929279073311996, 0.4976305899014108, 0.6222483814008241, 0.7142396434958516, 0.7747083760494305, 0.8125799863852962, 0.8359924468405353, 0.8483461391749769, 0.8563580985532471, 0.8679584172426931, 0.8682065217391305, 0.8785585977899951, 0.8835469795929429, 0.8885770569662952, 0.8918853321107845, 0.8959681968358, 0.8995099359146966, 0.9064420058490514, 0.9085293801697282, 0.9090860402217283, 0.913545132553397, 0.9142029296560605, 0.9184505606523955, 0.9189884958837252, 0.920080375083724, 0.9214031138623148, 0.9246781115879829, 0.9258128448229684, 0.9277383027215444, 0.9282652951891139, 0.9293048443741455, 0.9310557507173312, 0.9329297691112659, 0.9337089201877934, 0.9358231380124491, 0.9360049288794836, 0.9371210901872418, 0.9389419465607898, 0.9387426978937777, 0.9399919452275473, 0.9415050760058011, 0.9416119082741048, 0.9427093107423393, 0.9433820369574558, 0.9432354202401371, 0.9435440592465386, 0.9448721731899027, 0.9446710314478909, 0.9467550949171657], 'Non REM': [0.5895284463938955, 0.7737187929820464, 0.8089803306916268, 0.8377097102649912, 0.8834704454028195, 0.9098155876788887, 0.9228877492712635, 0.9299900120145332, 0.933989110707804, 0.937420021388048, 0.9392407263876917, 0.9418276323277283, 0.9428608654110631, 0.9461746514005612, 0.9475888554762508, 0.9488279721090703, 0.9495729809444785, 0.9511715282583413, 0.9523678463950865, 0.9535072463768116, 0.9543635546404906, 0.955294885508639, 0.9564152099137729, 0.9572825602181378, 0.9579245994892036, 0.9589522440504712, 0.9598268907502006, 0.9602320583195375, 0.961152677492077, 0.9611588770109807, 0.9625763997080196, 0.9627867965564443, 0.9632779645998417, 0.9642774112929006, 0.964537151123275, 0.9647949004030397, 0.9651175887138087, 0.9658578421574792, 0.9662007457641901, 0.966794362019961, 0.9669163477508714, 0.9673666453376766, 0.9677356042350427, 0.9682847755291929, 0.9685535962893898, 0.9689372781753651, 0.9690701404117434, 0.9691600477146431, 0.9695069613163217, 0.9702872355127543], 'Pre REM': [0.034978527416443646, 0.06859344894026975, 0.11192483073096587, 0.15092239185750633, 0.24089983172438226, 0.2611067809820733, 0.2969011313330054, 0.3240550835042485, 0.3623419203747073, 0.3710561118458341, 0.3709215798511734, 0.37772123268306473, 0.409935602575897, 0.4118786313750807, 0.4231788684763733, 0.41891148982957666, 0.42985512561892536, 0.44974874371859297, 0.46027594913878617, 0.46928069707477554, 0.46924788607031603, 0.4897101322357474, 0.4957712093469352, 0.5083721733126187, 0.5165540251518522, 0.5275979557069846, 0.5327237321141308, 0.5414290506541428, 0.5518284993694831, 0.5565565565565566, 0.5704085021587513, 0.5676573136310809, 0.575591985428051, 0.5813395148605017, 0.5900912003943801, 0.5902874457456391, 0.59307394916509, 0.6000815993472052, 0.6083842083842083, 0.6137402088772846, 0.6125935567849007, 0.6175922172679367, 0.6193957115009746, 0.6264353774737356, 0.6323791039948246, 0.6313245246535611, 0.6297314784859268, 0.6365315134484143, 0.6417180863851271, 0.6507161718812515], 'Artefakt': [0.004290965309438546, 0.005445881552076243, 0.009418096199125462, 0.011889035667107004, 0.0, 0.002691790040376851, 0.034696406443618336, 0.08571428571428572, 0.13641900121802678, 0.15864759427828348, 0.1675257731958763, 0.1806775407779172, 0.1858064516129032, 0.19389110225763614, 0.2213740458015267, 0.24183796856106407, 0.28399518652226236, 0.3131067961165049, 0.3037667071688943, 0.3537735849056604, 0.3293556085918854, 0.34340991535671106, 0.34507042253521125, 0.36491228070175435, 0.40599769319492507, 0.43310657596371877, 0.43329532497149376, 0.47240618101545256, 0.4795580110497238, 0.4712389380530974, 0.4933920704845815, 0.4955357142857143, 0.5104510451045103, 0.5283842794759825, 0.5413533834586466, 0.5067264573991032, 0.5632911392405063, 0.5450597176981542, 0.5822510822510822, 0.5784418356456776, 0.5627705627705627, 0.5732217573221757, 0.5926724137931035, 0.602308499475341, 0.6150627615062761, 0.6147455867082035, 0.6270833333333333, 0.6069546891464701, 0.629822732012513, 0.6177685950413224], 'avg': [0.2718409771004323, 0.3761422956282171, 0.45397653473048905, 0.500783541552891, 0.551926637594049, 0.5783598659792583, 0.6043967633933274, 0.6273605043496494, 0.6491933497140739, 0.6581462428562108, 0.6630158945031999, 0.6678729075566497, 0.6778478926594907, 0.6819658812717967, 0.6912387864626124, 0.6956278466109594, 0.7073254436986419, 0.7183643130312862, 0.7204021198618877, 0.7329609322940859, 0.7284738106682934, 0.7365683345492322, 0.7385875424319638, 0.7461882065432227, 0.7563194418036183, 0.7644832908895423, 0.7661017895358182, 0.7764549903580334, 0.7804372679799159, 0.7801450219061266, 0.7878597547746609, 0.788028860083408, 0.7930993513671238, 0.7985315251526552, 0.8030748946932509, 0.796730646155765, 0.8086983599181572, 0.8069144746560394, 0.8164763486255214, 0.8168978835904139, 0.813837693075938, 0.8173700755691442, 0.8217739437320308, 0.8254486410266699, 0.8294021254304047, 0.8292299883302171, 0.8314865142853287, 0.8290892125805897, 0.8347729108544419, 0.8347884043196526]}
f1_scores_006d_train = {'Wake': [0.701472570723166, 0.8265532992538623, 0.8763389990047896, 0.9025408928791048, 0.927755033039081, 0.9436042222696046, 0.9517862094179943, 0.9596701847612417, 0.9631162698422417, 0.9658001129968374, 0.9683455137800475, 0.9702968844732158, 0.9716229500980627, 0.9729445513706252, 0.9748334132427908, 0.9757316237643144, 0.9767718559502534, 0.9782941864849116, 0.9790387921955138, 0.979511028564988, 0.9801050968287216, 0.9806299197161146, 0.9808377099360115, 0.9813001196008078, 0.9818001745457399, 0.9819514586908556, 0.9822495942414152, 0.9825299462120433, 0.9826580524941462, 0.9827860552582093, 0.9833717100826632, 0.9831662707663795, 0.9833660258925069, 0.9834984955159755, 0.9838422132906317, 0.9838205795949996, 0.9840791041921102, 0.9842233694252676, 0.9843405825185564, 0.9842760894038354, 0.9843761497142577, 0.9846476061546914, 0.9848702639854393, 0.9847402008152293, 0.9851279409239224, 0.9851299018225251, 0.9852824643224267, 0.9854026594583457, 0.9856630208959324, 0.98563940811306], 'REM': [0.08449167058252868, 0.329505010475301, 0.5961679178297515, 0.6497856160504814, 0.7293220710838085, 0.7859395389299696, 0.8192552225249773, 0.839224438554889, 0.851347209451364, 0.8596965056383127, 0.8636965882742629, 0.8707692307692307, 0.8756907588772774, 0.8842586296004135, 0.8904413755754129, 0.895469912102772, 0.8979944861884426, 0.9022949758636498, 0.905191205360747, 0.9072901009233413, 0.9088083179248065, 0.9126442320563274, 0.9131624114996781, 0.9156600691003564, 0.9160844776359109, 0.9167246454375166, 0.917466102149097, 0.9188899028396585, 0.9192666452235446, 0.9203397550976663, 0.9225785725758956, 0.9206706304569072, 0.9218687180036989, 0.922725930697587, 0.9243643558003368, 0.9244012979699108, 0.9249865951742628, 0.9245954259729838, 0.9260508701472557, 0.9260290103302468, 0.9269233861242865, 0.9272162075249223, 0.9277615460905461, 0.9279875646557499, 0.9290820014456669, 0.9270735691903909, 0.927867623433651, 0.9287874327615275, 0.930205121329937, 0.930859762472856], 'Non REM': [0.6133698412984345, 0.8189015393831374, 0.833371274150554, 0.8556328819666414, 0.8854447586104265, 0.9059080011878291, 0.9157538138427567, 0.9262066587156754, 0.9309721902349148, 0.9354267304979635, 0.9386217977649798, 0.9411024442105949, 0.9433159106374969, 0.9447395963480837, 0.9472158508259867, 0.9489584390357044, 0.9503241775964107, 0.9522731477954222, 0.9533300923675254, 0.9539995500823639, 0.9550793944741591, 0.9561658659520152, 0.9561744888475836, 0.9569063502035392, 0.9580145603747209, 0.9580619631590029, 0.9583850886559596, 0.9589718635155353, 0.9594169638253216, 0.9595463907040606, 0.9605410352893318, 0.9603709275368638, 0.9605888422245797, 0.9608738914753456, 0.9616551323270303, 0.961872720138354, 0.9621702520287992, 0.9623418192915975, 0.9625719734810644, 0.9625086297736274, 0.9630732903460176, 0.9632415735441083, 0.9637521074356142, 0.9638343181504335, 0.9641024895722818, 0.964213280994439, 0.9647932617013623, 0.964816740222631, 0.9652129349291793, 0.965280554929434], 'Pre REM': [0.03749094596552224, 0.09437386569872958, 0.1620845596152466, 0.19019002761084944, 0.2530832030571478, 0.2961449635814532, 0.3251139852982228, 0.3509501749078189, 0.38400596514120605, 0.40025835024912343, 0.3996660172557751, 0.40970300682530897, 0.42396313364055294, 0.43357531760435564, 0.43378049878455033, 0.454286223489574, 0.4730596818141865, 0.4799027693376161, 0.49581355200690547, 0.49854177388917476, 0.5037593984962405, 0.5230613279270147, 0.5183742591024555, 0.523684877142616, 0.5359422237151494, 0.5292136723354101, 0.5382953979066291, 0.5418637457472408, 0.5468594217347956, 0.5511081706913662, 0.5510102683007618, 0.5538919679047067, 0.5541396037161884, 0.5596511436564094, 0.564678671733025, 0.5696026218762802, 0.5717332458370928, 0.5722030556924593, 0.5762103028818679, 0.5758195046186544, 0.5817468747446687, 0.5776837307723609, 0.5842806105878531, 0.5888952117714008, 0.5866709907572564, 0.5932230869001297, 0.5927843391037049, 0.5951132973147327, 0.5921625544267053, 0.5991005460970125], 'Artefakt': [0.005403579871664979, 0.022094140249759843, 0.05039096437880104, 0.05685465382851903, 0.04666666666666667, 0.08084074373484235, 0.0, 0.012121212121212123, 0.0, 0.009419152276295133, 0.0031948881789137383, 0.0032310177705977385, 0.006359300476947536, 0.0, 0.015772870662460567, 0.0063391442155309044, 0.07807807807807808, 0.17670682730923695, 0.24358974358974358, 0.26566416040100255, 0.3192261185006046, 0.3154034229828851, 0.33609467455621306, 0.3492433061699651, 0.3591549295774648, 0.3484486873508353, 0.4013761467889908, 0.397212543554007, 0.4046783625730994, 0.427071178529755, 0.45095828635851176, 0.4363636363636364, 0.44292237442922366, 0.435374149659864, 0.42057142857142854, 0.486784140969163, 0.48829431438127086, 0.48252536640360766, 0.4729729729729731, 0.486784140969163, 0.47830923248053403, 0.513215859030837, 0.5091693635382957, 0.49890109890109896, 0.5158469945355192, 0.5154867256637168, 0.514161220043573, 0.5385450597176982, 0.5210810810810811, 0.5263157894736842], 'avg': [0.2884457216882633, 0.418285571012158, 0.5036707429958286, 0.5310008144671191, 0.5684543464914261, 0.6024874939407397, 0.6023818462167903, 0.6176345338121675, 0.6258883269339452, 0.6341201703317064, 0.6347049610507958, 0.6390205168097898, 0.6441904107460674, 0.6471036189846956, 0.6524088018182402, 0.6561570685215792, 0.6752456559254743, 0.6978943813581673, 0.7153926771040872, 0.721001322772174, 0.7333956652449064, 0.7375809537268714, 0.7409287087883885, 0.7453589444434569, 0.7501992731697972, 0.7468800853947241, 0.7595544659484184, 0.759893600373697, 0.7625758891701816, 0.7681703100562115, 0.7736919745214328, 0.7708926866056988, 0.7725771128532395, 0.7724247222010364, 0.7710223603444903, 0.7852962721097415, 0.7862527023227073, 0.7851778073571832, 0.7844293404003435, 0.7870834750191054, 0.7868857866819529, 0.7932009954053839, 0.7939667783275496, 0.7928716788587825, 0.7961660834469293, 0.7970253129142403, 0.7969777817209437, 0.8025330378949871, 0.798864942532567, 0.8014392122172094]}
f1_scores_006e_train = {'Wake': [0.5366547611840911, 0.7729150045176895, 0.8195031505616219, 0.8714609231955286, 0.9151834547938413, 0.9346944844615727, 0.9402570336922542, 0.9448999897073455, 0.9523893342329854, 0.9560855593001473, 0.9587755241579043, 0.9604192484716936, 0.9639707858032682, 0.9659723714804901, 0.9668302237940206, 0.9679319243777982, 0.9687551936180822, 0.9699845573430811, 0.97137618715852, 0.9725571674753425, 0.9731102428665446, 0.9738117667209043, 0.9745058428186404, 0.9753581521672641, 0.9755340604256819, 0.9760513489629106, 0.976234773412714, 0.9766599439995299, 0.9767649031095971, 0.977252029495001, 0.9775636944234931, 0.9778696170579494, 0.9781021897810219, 0.9781432272408945, 0.9782358444815643, 0.9785221221162372, 0.9789427543631524, 0.979008610658599, 0.9790228293944991, 0.9792066789479873, 0.9794816652746107, 0.9794257435445146, 0.9792880496675361, 0.9796936161040158, 0.9797454767348679, 0.9800194071983063, 0.9797511145950714, 0.9800299844198602, 0.9801839501756691, 0.9804513415049453], 'REM': [0.08761124019113586, 0.26290739532748664, 0.40727551635347614, 0.567530440212301, 0.6815129879993924, 0.7454278390599348, 0.7634561300921672, 0.7877436405682194, 0.8180207121891787, 0.830207305034551, 0.8407681755829903, 0.8453914767096135, 0.8537469118858083, 0.8591022103221223, 0.8651264524948735, 0.8674528173425202, 0.8736572332188233, 0.8747369284171974, 0.8787705387067767, 0.8815541408235198, 0.8853183479731573, 0.8898094900656838, 0.8907485396005977, 0.8955102262541762, 0.8950116955883153, 0.8961787247920857, 0.8972337370289091, 0.8993989929070334, 0.9012001191991982, 0.902249932230957, 0.9034503223717931, 0.9034738580673111, 0.9051710163721836, 0.9061673771110991, 0.90736239399341, 0.9070138007400005, 0.9071897543973413, 0.9078614149469261, 0.908516668916183, 0.9089732876896952, 0.9096549677628206, 0.9096362751986166, 0.9104372736608832, 0.9113219276196654, 0.9131770412287793, 0.9128887930569781, 0.9121973602526385, 0.9128384750101037, 0.9119274474344787, 0.9140869377629167], 'Non REM': [0.4393990914877107, 0.749769715474753, 0.7917805685538313, 0.8361974849379321, 0.8813885723353, 0.9018405572587721, 0.9082177238226607, 0.9127618388467736, 0.9201059137590354, 0.9239806246385193, 0.9271013001318973, 0.9287196179455521, 0.9332738955997957, 0.9354883131001992, 0.9370240559045158, 0.9388599309597894, 0.939764446826696, 0.9414859503233871, 0.9431584892953738, 0.944494784379961, 0.9456940501709055, 0.946151422186324, 0.9474703584550489, 0.948887591854787, 0.9489484482271148, 0.9494216145521996, 0.9497622912801484, 0.9503246788561733, 0.9505616265953859, 0.951109371489044, 0.9511991763818803, 0.9519741541540816, 0.9523181208540253, 0.9520674101898449, 0.9522407968566499, 0.9530064627440747, 0.9534551415494643, 0.9536487721384953, 0.9533373438960926, 0.9535193044385893, 0.9541956494933597, 0.9540870132458732, 0.953792148074008, 0.9547692776283061, 0.9546136615705805, 0.9547657453556865, 0.9546156579243135, 0.9547266587106111, 0.9553783127288548, 0.9556884230067767], 'Pre REM': [0.03249129174838275, 0.05078362288907788, 0.06745182012847965, 0.1047795599258483, 0.16416925831684104, 0.2608365740301622, 0.32069811835287704, 0.33428597768968377, 0.35842895792517954, 0.3624311455513024, 0.3777860326894502, 0.3949275362318841, 0.3960269728449062, 0.3794584500466854, 0.3989273164416497, 0.4052494415487714, 0.4083604273107292, 0.41812488487750965, 0.41624082504877824, 0.43508137432188065, 0.44546601766720745, 0.45021025319853275, 0.45903099394371216, 0.46789641716920893, 0.4756331877729258, 0.46745457752690067, 0.4597333333333333, 0.4759964570416297, 0.4749428521188676, 0.4770982261053746, 0.4679311865902074, 0.4827104435906392, 0.4760391845379931, 0.4764762997616736, 0.4786729857819906, 0.48663755458515284, 0.49109083007388094, 0.4896150169462067, 0.4820118756549075, 0.4813642756680731, 0.49047411918225325, 0.4888579387186629, 0.4947359262159575, 0.500996447448228, 0.49839367890943825, 0.4913710866360247, 0.4970826439083863, 0.4961990324809951, 0.49740124740124736, 0.5011282763409131], 'Artefakt': [0.00356351130171753, 0.0031190434933287122, 0.004226840436773512, 0.003188097768331562, 0.0064516129032258064, 0.003968253968253969, 0.01818181818181818, 0.02506265664160401, 0.07113543091655267, 0.09523809523809523, 0.0951086956521739, 0.12176165803108809, 0.11279229711141678, 0.14993306559571618, 0.09537166900420757, 0.1204481792717087, 0.14068965517241377, 0.1724137931034483, 0.1270718232044199, 0.21963824289405687, 0.20806241872561765, 0.22842639593908626, 0.2860635696821516, 0.30407911001236093, 0.2673521850899743, 0.27877237851662406, 0.28886168910648713, 0.33853541416566624, 0.3325301204819277, 0.29232643118148594, 0.3131067961165049, 0.3159173754556501, 0.33574879227053134, 0.3415204678362573, 0.33176470588235296, 0.35238095238095235, 0.33615477629987905, 0.35885167464114837, 0.36835891381345925, 0.35885167464114837, 0.36823935558112775, 0.35138387484957884, 0.39497716894977175, 0.3824884792626728, 0.3752913752913753, 0.35167464114832536, 0.37875288683602765, 0.38084112149532706, 0.41483198146002315, 0.40867579908675805], 'avg': [0.2199439791826076, 0.36789895634046715, 0.4180475792068365, 0.47663130120798824, 0.52974117726972, 0.5693535417557392, 0.5901621648283555, 0.6009508206907253, 0.6240160698045863, 0.633588545952523, 0.6399079456428832, 0.6502439074779663, 0.651962172649039, 0.6579908821090427, 0.6526559435278535, 0.6599884587001175, 0.6662453912293488, 0.6753492228129248, 0.6673235726827738, 0.690665141978952, 0.6915302154806866, 0.6976818656221062, 0.7115638609000301, 0.7183462994915594, 0.7124959154208024, 0.7135757288701441, 0.7143651648323184, 0.7281830973940066, 0.7271999243009952, 0.7200071981003724, 0.7226502351767758, 0.7263890896651263, 0.7294758607631511, 0.7308749564279539, 0.7296553453991935, 0.7355121785132835, 0.7333666513367436, 0.7377970978662751, 0.7382495263350284, 0.7363830442770987, 0.7404091514588343, 0.7366781691114491, 0.7466461133136314, 0.7458539496125777, 0.7442442467470081, 0.7381439346790641, 0.7444799327032875, 0.7449270544233794, 0.7519445878400546, 0.752006155540462]}
f1_scores_006_valid = {'Wake': [0.8167866560009481, 0.8136802715168392, 0.8140994258756509, 0.9105244888176273, 0.9378243580238592, 0.9364142520356468, 0.9305886243386243, 0.936632061480383, 0.9309808173186215, 0.9560611323376172, 0.9475517775958473, 0.9633948033076151, 0.9724115094372505, 0.9747209168253524, 0.9686261501126107, 0.9734451796661978, 0.9729663948818692, 0.9757008029299901, 0.9722549767635431, 0.9774291604066945, 0.9794556628621598, 0.9780980840217964, 0.9787748663570239, 0.979918689170876, 0.9771176234443998, 0.9791236120354478, 0.9799169949352842, 0.9775249431122004, 0.9800953872687915, 0.9790094422408648, 0.9795731169518435, 0.9786187389096788, 0.9791505520005624, 0.9779627385906687, 0.9793888703414102, 0.9797903268434499, 0.9787316182922121, 0.97926100822864, 0.9787899006215542, 0.9781587435142336, 0.9787084533764316, 0.9787622104137073, 0.9782459836713194, 0.978663672094329, 0.9784162554222793, 0.9782120552943654, 0.9790894885615465, 0.9790546476893339, 0.9790015639002618, 0.9788280769568655], 'REM': [0.011122697254084114, 0.7159015302727877, 0.5646123260437376, 0.6725027356573394, 0.7585432376062892, 0.8527187612531508, 0.853019369540448, 0.8592923952826351, 0.8131370328425821, 0.8704165866769054, 0.8861003861003861, 0.8836750788643533, 0.8981852913085006, 0.9140306617504367, 0.900236593059937, 0.9005040134403584, 0.8816778789077958, 0.8874222138412219, 0.9003167505123906, 0.9093379926227916, 0.9105283455457, 0.9026083693000563, 0.9100136638688268, 0.9112176414189836, 0.908310573546625, 0.9048332708879729, 0.91244418559503, 0.9095074455899198, 0.9068841266831026, 0.9086323957322988, 0.9121531100478468, 0.9072985781990521, 0.9121436938695822, 0.9130602782071099, 0.90905565251115, 0.9086353122590594, 0.8969964989865487, 0.906108597285068, 0.9069148936170213, 0.9056963231091637, 0.912085807316606, 0.9096899224806201, 0.9064609450337513, 0.9088080886642038, 0.9077306733167082, 0.9101681957186545, 0.9072847682119205, 0.9070390206579955, 0.911504424778761, 0.9101773323053199], 'Non REM': [0.7165672383793188, 0.619786681252564, 0.642835524767125, 0.8594011842252262, 0.8968874225912004, 0.8747055159901431, 0.8928038220364287, 0.9001650381159458, 0.8839958918864756, 0.9194789518684303, 0.9029514757378689, 0.9303437515728019, 0.9485185648206026, 0.9528997276429874, 0.9358204866386073, 0.9451228781352926, 0.9510808305989028, 0.9500137256369944, 0.9458158196408102, 0.9508707561631442, 0.9578301227667433, 0.9554248957234033, 0.9587440122388584, 0.9583385462279496, 0.9558459908159661, 0.9560298665057696, 0.9604686678516886, 0.9553216138618847, 0.9579653832567997, 0.9566546402084587, 0.9605180906658666, 0.9579307568438002, 0.9588292780715162, 0.9569868059234593, 0.9587083510918345, 0.9585311016737447, 0.9558184207865738, 0.9579515501443454, 0.9562569213732004, 0.9555729548152452, 0.9566963725367139, 0.9566683442375441, 0.9565610632364393, 0.9571518114579416, 0.9561524738045581, 0.9557268056814746, 0.9571174064687729, 0.9557233524822517, 0.957209980150255, 0.9562797693657558], 'Pre REM': [0.028291621327529923, 0.11320754716981131, 0.07332722273143906, 0.20954162768942938, 0.24297520661157024, 0.374830852503383, 0.40643522438611346, 0.4825018615040953, 0.4912023460410557, 0.44938271604938274, 0.4729392173189009, 0.4696707105719237, 0.44961240310077516, 0.5328413284132841, 0.49404289118347894, 0.5051546391752577, 0.4991816693944353, 0.534850640113798, 0.48787446504992865, 0.5309352517985612, 0.5291479820627802, 0.4963609898107715, 0.5091743119266056, 0.5235378031383737, 0.5072353389185073, 0.4977843426883308, 0.5368344274252371, 0.4996293550778354, 0.5, 0.5147492625368731, 0.5166051660516605, 0.5101156069364161, 0.5263157894736843, 0.5255972696245734, 0.5254237288135594, 0.5198606271777004, 0.4652827487473157, 0.5003503854239664, 0.49184975194897235, 0.5169606512890095, 0.5152590489709015, 0.5218579234972678, 0.521067415730337, 0.5240112994350282, 0.5025197984161267, 0.5095271700776287, 0.5177948360083741, 0.5056022408963585, 0.517193947730399, 0.5139664804469274], 'Artefakt': [0.0, 0.0, 0.0078125, 0.0077972709551656924, 0.0, 0.0, 0.007782101167315175, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.015414258188824664, 0.011627906976744186, 0.16071428571428573, 0.2485875706214689, 0.25850340136054417, 0.36079545454545453, 0.536986301369863, 0.5984251968503937, 0.716612377850163, 0.6029579067121729, 0.6805251641137856, 0.5105189340813464, 0.694006309148265, 0.6697782963827305, 0.7664092664092664, 0.6575654152445962, 0.7413962635201573, 0.6910229645093946, 0.7388137356919875, 0.736441484300666, 0.6842684268426843, 0.676605504587156, 0.7064017660044151, 0.7221644120707598, 0.6920565832426552, 0.6965065502183406, 0.6891133557800225, 0.6882681564245811, 0.7119386637458925, 0.6682464454976303, 0.6936170212765957, 0.7138193688792166, 0.7131782945736432, 0.6627497062279673, 0.7043478260869566, 0.6643274853801169], 'avg': [0.31455364259237617, 0.4525152060424005, 0.4205373998835905, 0.5319534614689576, 0.5672460449665838, 0.6077338763564647, 0.6181258282937859, 0.6357182712766118, 0.623863217617747, 0.6390678773864672, 0.6419085713506006, 0.6494168688633388, 0.6537455537334258, 0.6748985269264121, 0.6628280758366917, 0.6671709234787702, 0.6931242118994577, 0.7193149906286946, 0.7129530826654433, 0.7458737231073292, 0.7827896829214493, 0.7861835071412842, 0.8146638464482955, 0.7951941173336712, 0.8058069381678568, 0.7696580052397735, 0.816734116991101, 0.8023523308049143, 0.8222708327235921, 0.8033222311926183, 0.822049149447475, 0.8089973290796684, 0.8230506098214665, 0.8220097153292956, 0.8113690059201277, 0.8086845745082222, 0.800646210563413, 0.813167190630556, 0.8051736101606807, 0.8105790445891985, 0.810372607596135, 0.811049311410744, 0.814854814283548, 0.8073762634298266, 0.8076872444472535, 0.813490719130268, 0.8148929587648513, 0.8020337935907813, 0.8138515485293267, 0.8047158288909971]}
f1_scores_006b_valid = {'Wake': [0.8483756717147045, 0.843067694391589, 0.8097431763215478, 0.7395030552030041, 0.7245968773995393, 0.7863708311349309, 0.8782614091148823, 0.9330533473326333, 0.9523664277362615, 0.9626032557978779, 0.9676380447768946, 0.9692278452580471, 0.9735694302048761, 0.9730005812007961, 0.9760686755430974, 0.9776256909713084, 0.9785753012574986, 0.9752264808362369, 0.9787316797199583, 0.979583934668591, 0.9807347512743892, 0.9812934447866256, 0.9804905633703258, 0.9812645958806693, 0.9807465757037611, 0.9805472086035111, 0.98113539267568, 0.9802157641353622, 0.9789817186567951, 0.9814954749143308, 0.9815831758868504, 0.9808247132502991, 0.98065447376296, 0.9814003413750022, 0.9812050565254848, 0.9805601085672994, 0.9800973176172992, 0.9807394366197183, 0.9811373873873873, 0.9804377300019369, 0.9803148913712727, 0.9805915785398813, 0.9802742616033755, 0.9803115001933692, 0.9800235844905574, 0.979253988940157, 0.980331390537233, 0.9805643738977073, 0.98014456305728, 0.9797592227541538], 'REM': [0.028506640751538713, 0.1037451571244081, 0.017167381974248927, 0.38324796625489604, 0.18653576437587657, 0.640321817321344, 0.8297663459650501, 0.8010752688172044, 0.8768492602958816, 0.9026025236593059, 0.8878957169459962, 0.8954650269023827, 0.9002716336825766, 0.898006580220631, 0.9050814956855225, 0.9037807561512302, 0.9027144838517932, 0.9089154766499422, 0.9086372360844531, 0.9102095750817152, 0.9123345482447727, 0.9123878602786792, 0.9075533346146454, 0.9063965484899643, 0.9086660175267771, 0.911601150527325, 0.9140445126630851, 0.9112887502437121, 0.9110512129380054, 0.9146153846153847, 0.9144838212634822, 0.9148484263371307, 0.9165856503986, 0.9159566227730441, 0.9157140089130015, 0.9140625, 0.9118436182445382, 0.9090560245587107, 0.9124513618677043, 0.9124854142357058, 0.9123890389810884, 0.912842267643656, 0.9131619937694703, 0.9136328427575523, 0.9084249084249085, 0.9108415174273059, 0.9095083221733309, 0.9129676293855399, 0.9098646034816248, 0.9101426918627074], 'Non REM': [0.7583792195355519, 0.8374450075179595, 0.6541232196309332, 0.2657541322314049, 0.171405213915887, 0.4843257837108144, 0.775517595219412, 0.8976739223218096, 0.924012634106868, 0.9401087067993027, 0.9413036205964849, 0.9448023946019989, 0.9533683972116666, 0.9523430108062346, 0.9538407681536307, 0.9596242254647211, 0.9586363749968759, 0.9560154581511239, 0.9635477826358525, 0.9622688906752411, 0.9631638418079095, 0.9631568451490677, 0.9623928633898898, 0.9605325964074866, 0.9626111864917836, 0.9617034083214205, 0.9627658238971604, 0.9615374978075121, 0.9582544132131222, 0.9630484988452656, 0.9622382509296927, 0.9615973110592722, 0.9617409617409618, 0.9623388997542751, 0.9610095779179969, 0.9616635804013813, 0.9603905581559212, 0.9601383874849578, 0.9613718863437225, 0.9611334002006017, 0.9599578767896096, 0.9601423844379825, 0.9600824493489517, 0.9598132483245061, 0.9604494269305043, 0.9596399024316644, 0.960419910593199, 0.9612756264236901, 0.9597708369977637, 0.9593720912681442], 'Pre REM': [0.05490848585690516, 0.08643042350907518, 0.026540284360189573, 0.005141388174807198, 0.005263157894736842, 0.12895662368112545, 0.24899598393574296, 0.3482224247948951, 0.4742729306487696, 0.4868624420401855, 0.44011976047904194, 0.4094488188976378, 0.4018433179723502, 0.46473029045643155, 0.473063973063973, 0.5347593582887701, 0.5408618127786033, 0.5156017830609212, 0.5221971407072987, 0.51818856718634, 0.4977168949771689, 0.4924012158054712, 0.5208333333333334, 0.49101796407185627, 0.5182584269662921, 0.4984709480122324, 0.4962292609351432, 0.5085501858736059, 0.5003436426116838, 0.5277777777777778, 0.5113960113960114, 0.5104844540853217, 0.5136298421807747, 0.5230094959824689, 0.507256392536282, 0.5222929936305734, 0.49333333333333335, 0.5132743362831859, 0.51, 0.5088841506751954, 0.503925767309065, 0.510846745976207, 0.5097493036211699, 0.5025053686471009, 0.4985549132947977, 0.5103734439834026, 0.5007072135785007, 0.5120567375886524, 0.5045422781271838, 0.5058259081562715], 'Artefakt': [0.014939309056956115, 0.007285974499089253, 0.04964539007092198, 0.045801526717557245, 0.0, 0.0, 0.24027072758037224, 0.2546728971962617, 0.2048780487804878, 0.5632183908045977, 0.5625, 0.33753943217665616, 0.5759577278731836, 0.44467425025853147, 0.44720496894409945, 0.6375908618899273, 0.4835479256080114, 0.6745098039215687, 0.6695576756287944, 0.7052441229656419, 0.7475915221579962, 0.6096938775510204, 0.7009708737864078, 0.6697782963827305, 0.7485714285714287, 0.7369498464687819, 0.771760154738878, 0.7202441505595116, 0.7335907335907336, 0.7074527252502781, 0.7601626016260163, 0.7666335650446872, 0.7690839694656489, 0.7683397683397684, 0.7500000000000001, 0.7648183556405354, 0.7449856733524356, 0.6893523600439079, 0.7538940809968847, 0.7542533081285444, 0.7203302373581012, 0.7176220806794057, 0.7533460803059272, 0.738430583501006, 0.7399411187438666, 0.7252747252747253, 0.7475728155339806, 0.7438794726930319, 0.7502448579823702, 0.7397003745318352], 'avg': [0.3410218653831313, 0.3755948514084242, 0.3114438904715683, 0.2878896137163339, 0.21756020271720794, 0.40799501116964293, 0.5945624123630919, 0.6469395720925608, 0.6864758603136537, 0.7710790638202539, 0.7598914285596836, 0.7112967035673445, 0.7610021013889305, 0.746550942588525, 0.7510519762780646, 0.8026761785531914, 0.7728671796985565, 0.8060538005239586, 0.8085343029552714, 0.8150990181155058, 0.8203083116924473, 0.7917866487141729, 0.8144481936989205, 0.8017980002465415, 0.8237707270520085, 0.8178545123866542, 0.8251870289819893, 0.8163672697239408, 0.816444344202068, 0.8188779722806074, 0.8259727722204108, 0.8268776939553423, 0.8283389795097891, 0.8302090256449117, 0.8230370071785531, 0.828679507647958, 0.8181301001407055, 0.810512108998096, 0.8237709433191398, 0.823438800648397, 0.8153835623618273, 0.8164090114554264, 0.8233228177297789, 0.818938708684707, 0.8174787903769267, 0.8170767156114509, 0.8197079304832489, 0.8221487679977244, 0.8209134279292446, 0.8189600577146223]}
f1_scores_006c_valid = {'Wake': [0.8618463925523662, 0.8696090635488395, 0.8205569324974487, 0.7489534205924434, 0.8367503692762186, 0.9225929081732976, 0.927912685774947, 0.9501896161760454, 0.9676521254937444, 0.9754575267110971, 0.9746921050758169, 0.9757899343544856, 0.9758854822903542, 0.9773763591722202, 0.9760144337920543, 0.9773163896575428, 0.9786192321239873, 0.9799391452023776, 0.9806678383128296, 0.9806902362812906, 0.9801705682097358, 0.9809206701548544, 0.9802884025721444, 0.980900888249131, 0.9823445204390011, 0.9819735847065652, 0.9809778779766098, 0.9812053981488024, 0.9817900311416857, 0.9820713970912296, 0.9822017604205253, 0.9820073095305032, 0.9812505511949907, 0.981505874914379, 0.9814889975118671, 0.9823347745521926, 0.9822433037682284, 0.9821919740461245, 0.9817028027498679, 0.9827312775330396, 0.9821951133519021, 0.9815147353966409, 0.9823157078124725, 0.9819018836097836, 0.9820801186419731, 0.981888722334891, 0.9814655399588904, 0.9819666074350358, 0.9818438464931628, 0.981900691256398], 'REM': [0.047337278106508875, 0.5710729400049789, 0.7495454545454545, 0.7742782152230971, 0.6981091067159313, 0.7364034173786207, 0.8390453974520007, 0.8677819751753914, 0.8985343855693347, 0.8998659774076201, 0.8906852838508176, 0.897367417016406, 0.9052552269730646, 0.909090909090909, 0.9077904504156197, 0.9144634525660965, 0.899513776337115, 0.9162944261021557, 0.910704172172928, 0.9089184060721063, 0.9154404551697076, 0.9196567862714509, 0.9119411650861233, 0.9156954156954157, 0.9196166634070018, 0.9155092592592592, 0.9107891727030119, 0.9147617202634638, 0.9168932038834952, 0.9155521589606419, 0.9171185127807902, 0.9143414634146341, 0.9155780853967634, 0.9151950320201825, 0.9160246533127889, 0.9138894240030824, 0.9156954156954157, 0.9159599074787972, 0.9132770529547198, 0.9150813885075505, 0.9151162790697674, 0.9150301380517207, 0.9174776177500974, 0.9163408913213448, 0.9160662122687441, 0.9141513132105058, 0.9157523510971787, 0.915471112834432, 0.9165692007797271, 0.9166666666666666], 'Non REM': [0.7850800327141021, 0.8042562876977353, 0.6236624268120331, 0.2452418369128689, 0.6779871744536055, 0.8819601537161702, 0.8731400859693595, 0.9140811455847254, 0.94530111238972, 0.9550155763239875, 0.9574766700317632, 0.9571108368801471, 0.9540794478450338, 0.9575301129703981, 0.9587856805703922, 0.9599779603285914, 0.9616332627909872, 0.9621452669180393, 0.9601102480581307, 0.9615664616543241, 0.9618354952388094, 0.9625034121646774, 0.962448054401209, 0.9626805778491172, 0.9639834189688982, 0.9641937982559157, 0.963780475569379, 0.9647146959670372, 0.9646050950627489, 0.9640006025003767, 0.9640176158542687, 0.9639598997493734, 0.9644025879943044, 0.9634204514071953, 0.9634835676054225, 0.9639170091209782, 0.9639108267519744, 0.9650444138621294, 0.9641136318008432, 0.9650440380249008, 0.9640133043239053, 0.9632409979230788, 0.9633990530350478, 0.9626974178992229, 0.964389171910898, 0.9630295763389289, 0.9625706037404292, 0.9622779020381493, 0.9633272586564146, 0.9631614535073], 'Pre REM': [0.04081632653061224, 0.09162995594713656, 0.10396975425330814, 0.052173913043478265, 0.13922651933701657, 0.34345047923322686, 0.3482889733840304, 0.3218197135636057, 0.4571877454831107, 0.466966966966967, 0.44818871103622576, 0.42482517482517484, 0.47457627118644063, 0.4706827309236948, 0.47385620915032683, 0.5179526355996944, 0.5249813571961224, 0.5063694267515924, 0.5194424064563462, 0.5011286681715575, 0.5239520958083832, 0.505050505050505, 0.5104477611940299, 0.5465838509316769, 0.5408895265423243, 0.5367965367965368, 0.4893292682926829, 0.5277777777777779, 0.5262379896526238, 0.5157593123209169, 0.5290780141843973, 0.5240875912408759, 0.5252225519287834, 0.5260869565217391, 0.5219298245614036, 0.5183098591549294, 0.5313601127554616, 0.5178571428571429, 0.5296995108315863, 0.5375886524822695, 0.5214899713467048, 0.509719222462203, 0.5251550654720882, 0.5288326300984529, 0.5240174672489083, 0.5272601794340924, 0.5249643366619116, 0.5235816814764184, 0.5175627240143369, 0.5237084217975938], 'Artefakt': [0.025590551181102365, 0.0, 0.007782101167315175, 0.0, 0.0, 0.0, 0.35960591133004927, 0.5014691478942214, 0.6120612061206121, 0.6326530612244898, 0.6690223792697291, 0.7137476459510358, 0.6186726659167604, 0.31360000000000005, 0.5985401459854015, 0.6540447504302926, 0.7069943289224953, 0.6589371980676328, 0.5975308641975308, 0.6590909090909091, 0.6564705882352941, 0.613664596273292, 0.7095477386934673, 0.6840236686390533, 0.7198228128460686, 0.6570048309178743, 0.7439703153988868, 0.7392497712717292, 0.7340529931305201, 0.7607699358386802, 0.7497621313035204, 0.7687564234326825, 0.7316620241411328, 0.7395301327885597, 0.7315247895229186, 0.7536496350364964, 0.7575757575757576, 0.7685098406747891, 0.7610953729933899, 0.7452229299363058, 0.7695351137487636, 0.7609359104781281, 0.7587511825922422, 0.7212765957446807, 0.7661141804788214, 0.747983870967742, 0.756385068762279, 0.7696793002915452, 0.7565982404692081, 0.7758793969849246], 'avg': [0.35213411621693835, 0.46731364943973813, 0.4611033338551119, 0.36412947715437755, 0.47041463395655436, 0.5768813917002631, 0.6695986107820774, 0.7110683196787979, 0.7761473150113044, 0.7859918217268324, 0.7880130298528705, 0.7937682018054499, 0.7856938188423308, 0.7256560224314444, 0.7829973839827589, 0.8047510377164435, 0.8143483914741413, 0.8047370926083595, 0.793691105839553, 0.8022789362540376, 0.8075738405323859, 0.796359193982956, 0.8149346243893948, 0.8179768802728787, 0.8253313884406588, 0.8110956019872303, 0.817769421988114, 0.825541872685762, 0.8247158625742147, 0.8276306813423691, 0.8284356069087003, 0.8306305374736137, 0.823623160131195, 0.8251476895304111, 0.8228903665028803, 0.8264201403735358, 0.8301570833093675, 0.8299126557837966, 0.8299776742660814, 0.8291336572968133, 0.8304699563682085, 0.8260882008623543, 0.8294197253323896, 0.822209883734697, 0.8305334301098689, 0.8268627324572322, 0.8282275800441378, 0.8305953208151162, 0.8271802540825698, 0.8322633260425766]}
f1_scores_006d_valid = {'Wake': [0.8395779402637117, 0.7756621251892282, 0.7311085033161483, 0.7514762000401687, 0.8343441370861628, 0.8669003695890107, 0.9370517645388056, 0.9352746891697936, 0.9443139422412602, 0.9512332628611699, 0.9596058084061706, 0.9563431276980923, 0.9683043341818055, 0.9646421392991349, 0.9703792498393009, 0.9698324803046448, 0.9778089395267309, 0.9784590475520045, 0.9804859045190537, 0.9803976624607339, 0.9811685006756875, 0.9813919980320149, 0.982907644719399, 0.9818252331341336, 0.9826977401129944, 0.9831315107609329, 0.982827321132621, 0.9833944436609786, 0.983229583649285, 0.983715426189551, 0.9835550138660731, 0.9827537660143602, 0.9844045285151628, 0.9837409868514068, 0.9840230855855855, 0.9843551349060602, 0.9839935270526982, 0.9837593560231607, 0.9821501373748116, 0.9837948284365532, 0.9832056777457663, 0.9835048639503736, 0.9832451499118166, 0.9834230735281136, 0.9829177233023386, 0.9831793497425769, 0.9828767123287672, 0.9840552328147899, 0.9835851454391414, 0.9834640959786088], 'REM': [0.05846325167037862, 0.5817993259009592, 0.48363009764503156, 0.30774091627172195, 0.7217715413286561, 0.70368782161235, 0.8215127490893508, 0.8451413085559426, 0.8528565556925605, 0.8709363441697489, 0.8673334591432346, 0.844158539115999, 0.8891891891891892, 0.8882011605415862, 0.8990059642147117, 0.8820690986296081, 0.9067420266451353, 0.9128824790489183, 0.9055056618508396, 0.910737875070768, 0.9139660493827161, 0.9095400988217408, 0.9157057654075547, 0.9173666731783552, 0.917772934416485, 0.9194460698264092, 0.9202312138728324, 0.9184195006880282, 0.9155038759689922, 0.9191176470588236, 0.9186434032542639, 0.9200940070505288, 0.9220524872698785, 0.9224505622334238, 0.9167938931297709, 0.9229867083659109, 0.920591669910471, 0.9210168833689113, 0.9165526675786594, 0.9188869153345174, 0.9183317167798254, 0.9198905822586948, 0.9211698624830525, 0.9191820837390458, 0.9181467181467182, 0.9183673469387755, 0.9206903238316851, 0.922650840751731, 0.9204434934837581, 0.921011673151751], 'Non REM': [0.7532730338801165, 0.4679057867409135, 0.22788448974258457, 0.3711820188641381, 0.6800566661419801, 0.7624413682645006, 0.8951810117477823, 0.8842360795023517, 0.9113554588229374, 0.9140596200634047, 0.9349014077413181, 0.9349888254283586, 0.9491533927003637, 0.9495510367424528, 0.958806000050084, 0.952454793287147, 0.9621138816524004, 0.9606460646064606, 0.9627125385303769, 0.9588965655351958, 0.9654828162827264, 0.9634648198333835, 0.9650294306771529, 0.9651647008951949, 0.966512184182987, 0.9662123296236088, 0.9661306532663317, 0.9658680096736393, 0.9663726571113561, 0.9672421978461307, 0.9676165803108808, 0.9651376146788991, 0.9675303704071746, 0.967563389762896, 0.966498531958142, 0.9675264797507789, 0.9665546808403951, 0.9670263788968825, 0.9656749434543782, 0.9673074997496746, 0.9660842237586423, 0.9665496489468406, 0.9665248936702527, 0.9660503865302343, 0.9650391802290536, 0.9647943831494484, 0.9663247435576683, 0.9672993938789254, 0.9657798486898143, 0.9652676551897461], 'Pre REM': [0.021505376344086023, 0.06759443339960239, 0.0935672514619883, 0.04539722572509458, 0.22198952879581152, 0.2914757103574703, 0.37134778510838834, 0.3889340927583401, 0.4758893280632411, 0.43087362171331633, 0.4683734939759036, 0.4592833876221498, 0.5193855157278712, 0.52356780275562, 0.5024077046548957, 0.47396226415094345, 0.5079617834394905, 0.5380029806259314, 0.570281124497992, 0.47719869706840395, 0.5128205128205128, 0.4984615384615384, 0.5342362678705793, 0.5227447956823439, 0.5481798715203426, 0.5540443808160345, 0.5436893203883496, 0.5397520058351568, 0.5475017593244195, 0.5541310541310541, 0.5331302361005331, 0.5482014388489208, 0.5248447204968943, 0.5354449472096531, 0.5382963493199714, 0.544649446494465, 0.5455871626549964, 0.5345080763582967, 0.5260837619397503, 0.5413313825896123, 0.5384615384615384, 0.5449358059914409, 0.5340236686390533, 0.5347670250896057, 0.5372076541459958, 0.5219818562456385, 0.537117903930131, 0.5443873807776962, 0.5374570446735396, 0.5404644616467277], 'Artefakt': [0.0028011204481792713, 0.2966507177033493, 0.4111986001749781, 0.2077562326869806, 0.22045454545454543, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.007476635514018692, 0.0, 0.03308823529411765, 0.44755244755244755, 0.5278058645096056, 0.6141078838174274, 0.5644768856447689, 0.5688073394495413, 0.7036649214659686, 0.7565789473684211, 0.7504835589941973, 0.7032136105860112, 0.7957610789980732, 0.7575221238938054, 0.7695431472081218, 0.7767527675276754, 0.8007483629560337, 0.7862939585211903, 0.7540425531914894, 0.7909270216962524, 0.7669990933816864, 0.7837837837837839, 0.7870722433460077, 0.7763794772507261, 0.7760368663594469, 0.7521663778162913, 0.7868561278863233, 0.7847358121330725, 0.7728873239436619, 0.7853881278538813, 0.781305114638448, 0.7768595041322315, 0.7890255439924314, 0.7586206896551724, 0.7627416520210896, 0.7765765765765766, 0.76269621421976], 'avg': [0.33512414452129435, 0.4379224777868105, 0.3894777884681461, 0.3367105187176208, 0.5357232837614311, 0.5249010539646664, 0.6050186620968654, 0.6107172339972856, 0.6368830569639998, 0.633420569761528, 0.6460428338533253, 0.6389547759729199, 0.6652064863598459, 0.6666877549705625, 0.6661197837517985, 0.6622813743332923, 0.7604358157632409, 0.7835592872685841, 0.806618622643138, 0.7783415371559741, 0.7884490437222368, 0.8113046753229292, 0.8308916112086214, 0.8275169923768451, 0.823675268163764, 0.8437190740050118, 0.8340801265107881, 0.835395421413185, 0.8378721287163456, 0.8449909376363187, 0.8378478384105883, 0.8340458759568398, 0.8379518256770726, 0.8352397958878133, 0.8378791287554508, 0.8413180025726446, 0.8386213035418575, 0.8364695122013396, 0.8285255776327782, 0.8396353507993363, 0.838163793775769, 0.8375536450182024, 0.8380703405116113, 0.8369455367050895, 0.8360341559912676, 0.8354696960137742, 0.8331260746606848, 0.8362269000488464, 0.836768421772566, 0.8345808200373186]}
f1_scores_006e_valid = {'Wake': [0.7950675943209458, 0.7228878089347435, 0.7181377846146023, 0.7200213114130228, 0.8048306299402557, 0.8773713577185368, 0.9502296695167478, 0.9441228588304783, 0.9434503229723575, 0.9593663203374139, 0.9699237650990358, 0.9524197380031222, 0.9677967571317091, 0.9701539983046059, 0.9682602761027697, 0.9724455247851376, 0.972644908524854, 0.9749150632844543, 0.9744882667183836, 0.9766314087922129, 0.9734472571600417, 0.9744921230834006, 0.9737936336000559, 0.9763796096585828, 0.9728787561876873, 0.9777497016915843, 0.9798643530344402, 0.9783493578496737, 0.9797237937941455, 0.9801903144787577, 0.9807573592959064, 0.9773029772329247, 0.9790066924973582, 0.9804728007733544, 0.9795918367346937, 0.9806835590146326, 0.9808418353908019, 0.9817554847903728, 0.9810962421087801, 0.9809015859604653, 0.9813243982012169, 0.9816901408450704, 0.9817682185699942, 0.9816615384615384, 0.9814622467123215, 0.9817629715940186, 0.9817425630903708, 0.9813843825878875, 0.9818861009303637, 0.9806569279062836], 'REM': [0.05606995884773663, 0.6490175801447777, 0.7113935969868174, 0.5767313019390582, 0.7593488781346239, 0.7459177008491183, 0.8603218756209021, 0.8182996851268752, 0.8550444530344028, 0.8856457417033188, 0.9012908124525437, 0.884949215143121, 0.9008104978772673, 0.906949806949807, 0.9082851637764933, 0.9129852744310576, 0.8936248392430646, 0.9097613040947021, 0.9074180563542266, 0.9115958668197475, 0.899768696993061, 0.9106728538283063, 0.911851705777953, 0.9085979860573199, 0.9117238643126363, 0.9137254901960784, 0.9117131163515884, 0.9108758421559191, 0.9157140089130015, 0.9157957010451587, 0.9147738303242089, 0.9135993800852382, 0.9092652982927297, 0.9173489278752437, 0.9105752800455668, 0.9171356491364254, 0.9186752890456594, 0.9190457567461869, 0.9126289161315432, 0.9139123750960799, 0.9137269938650306, 0.9190785587714118, 0.9177387914230019, 0.9157281553398059, 0.9121725731895223, 0.9176516179035071, 0.9174995100921027, 0.9152086137281293, 0.9129586260733801, 0.9174738473459899], 'Non REM': [0.5282551704048937, 0.1159926383842197, 0.015117609030782237, 0.060458786936236394, 0.5554838709677419, 0.7867411191635976, 0.9144646402932641, 0.9120705124821872, 0.9078402209709975, 0.9348232821590589, 0.941084212390276, 0.916157366986798, 0.9364381067961165, 0.9494027580359593, 0.9390051423043633, 0.9457971307334815, 0.9458135541864459, 0.950569203115638, 0.9529523523823809, 0.952114645228941, 0.9552485358161886, 0.9560919018435853, 0.9524695704657479, 0.956071832224036, 0.9521950724931563, 0.9577161729383508, 0.9597605089185481, 0.9591564536829654, 0.9590810120879947, 0.962066823997019, 0.9621338651377291, 0.9559345947444006, 0.9608795832498497, 0.9614988572720196, 0.9583490625393231, 0.9598801647734365, 0.9619664424495511, 0.9627984730157937, 0.9617579337270998, 0.9611109723505756, 0.961355425439143, 0.962885468041648, 0.9621325361235675, 0.9625507595127086, 0.9634167687729738, 0.9627284286106056, 0.9628874692386089, 0.9622509262040653, 0.9630719361675601, 0.9611126452941029], 'Pre REM': [0.05244122965641953, 0.0, 0.002652519893899204, 0.0, 0.16336056009334887, 0.24898785425101216, 0.44827586206896547, 0.35051546391752575, 0.4183333333333333, 0.4750593824228028, 0.5056497175141244, 0.4078125, 0.45998445998445997, 0.5292397660818714, 0.5052950075642966, 0.5098335854765508, 0.4543429844097995, 0.5454545454545455, 0.5255474452554745, 0.5480427046263345, 0.5752380952380952, 0.557142857142857, 0.5260770975056689, 0.5341246290801186, 0.5372918175235337, 0.5440956651718983, 0.5373563218390804, 0.5383502170767004, 0.546236559139785, 0.5667351129363449, 0.5495300072306579, 0.5476190476190478, 0.5447976878612717, 0.5511049723756907, 0.5395284327323162, 0.5597826086956521, 0.5598320503848845, 0.5364775239498895, 0.5487465181058496, 0.5389657683903859, 0.5310899780541332, 0.5402214022140222, 0.5549964054636951, 0.5497564370215727, 0.5373352855051244, 0.5520110957004161, 0.5369422092172641, 0.5345821325648416, 0.5463552724699221, 0.5384052670080468], 'Artefakt': [0.0018083182640144665, 0.0, 0.0, 0.0, 0.0, 0.0, 0.03202846975088968, 0.15140845070422537, 0.46618106139438087, 0.40476190476190477, 0.29787234042553196, 0.5163551401869159, 0.15488215488215487, 0.5104270109235353, 0.27257799671592775, 0.11070110701107011, 0.3735955056179775, 0.48189762796504376, 0.5658436213991769, 0.34948604992657856, 0.5725338491295939, 0.6388625592417062, 0.669683257918552, 0.6457883369330453, 0.7117988394584138, 0.6343115124153499, 0.6703417861080485, 0.7257731958762886, 0.6541617819460727, 0.7350785340314135, 0.6916488222698073, 0.6384872080088987, 0.7076923076923077, 0.7535353535353535, 0.657243816254417, 0.6526576019777504, 0.671604938271605, 0.7429854096520763, 0.7188208616780046, 0.6947368421052632, 0.6721120186697782, 0.7288888888888889, 0.68, 0.7748917748917747, 0.75, 0.741061755146262, 0.7168458781362008, 0.7436743674367436, 0.744920993227991, 0.7553072625698324], 'avg': [0.286728454298802, 0.2975796054927482, 0.2894603021052202, 0.27144228005766347, 0.45660478782719405, 0.531803606396453, 0.6410641034501539, 0.6352833942122584, 0.7181698783410945, 0.7319313262768998, 0.7231641695763024, 0.7355387920639913, 0.6839823953343416, 0.7732346680591557, 0.7186847172927701, 0.6903525244874594, 0.7280043583964283, 0.7725195487828767, 0.7852499484219285, 0.7475741350787628, 0.7952472868673961, 0.807452459027971, 0.8067750530535955, 0.8041924787906204, 0.8171776699950856, 0.8055197084826522, 0.8118072172503412, 0.8225010133283094, 0.8109834311761999, 0.8319732972977387, 0.8197687768516619, 0.8065886415381021, 0.8203283139187034, 0.8327921823663325, 0.8090576856612633, 0.8140279167195793, 0.8185841111085004, 0.8286125296308636, 0.8246100943502557, 0.817925508780554, 0.8119217628458604, 0.8265528917522083, 0.8193271903160518, 0.83691773304548, 0.8288773748359883, 0.8310431737909619, 0.8231835259549095, 0.8274200845043336, 0.8298385857738435, 0.8305911900248513]} |
# Dynamic programming method
'''
# mainRun(weight,value,capacity,type)
n: number of items
value: value of each item
weight: weight of each item
capacity: capacity of bag
m: memery matrix
type: 'right2left' or 'left2right'
'''
# right to left
def Knapsack(value,weight,capacity,n,m):
jMax = min(weight[n-1]-1,capacity)
for j in range(0,jMax+1):
m[n-1][j] = 0
for j in range(weight[n-1],capacity+1):
m[n-1][j] = value[n-1]
for i in range(n-2,-1,-1):
jMax = min(weight[i]-1,capacity+1)
for j in range(0,jMax+1):
m[i][j] = m[i+1][j]
for j in range(weight[i],capacity+1):
m[i][j] = max(m[i+1][j],m[i+1][j-weight[i]]+value[i])
return m
def Trackback(m,weight,capacity,n,select):
for i in range(0,n-1):
if m[i][capacity] == m[i+1][capacity]:
select[i] = 0
else:
select[i] = 1
capacity = capacity - weight[i]
if m[n-1][capacity] != 0:
select[n-1] = 1
return select
# left to right
def KnapsackL(value,weight,capacity,n,m):
jMax = min(weight[0]-1,capacity)
for j in range(0,jMax+1):
m[0][j] = 0
for j in range(weight[0],capacity+1):
m[0][j] = value[0]
for i in range(1,n,1):
jMax = min(weight[i]-1,capacity+1)
for j in range(0,jMax+1):
m[i][j] = m[i-1][j]
for j in range(weight[i],capacity+1):
m[i][j] = max(m[i-1][j],m[i-1][j-weight[i]]+value[i])
return m
def TrackbackL(m,weight,capacity,n,select):
for i in range(n-1,0,-1):
if m[i][capacity] == m[i-1][capacity]:
select[i] = 0
else:
select[i] = 1
capacity = capacity - weight[i]
if m[0][capacity] != 0:
select[0] = 1
return select
# switch between left2right and right2left
def switchFunc(value,weight,capacity,n,m,Select,type):
if type == 'right2left':
# print('Type: right to left.')
m = Knapsack(value,weight,capacity,n,m)
select = Trackback(m,weight,capacity,n,Select)
else:
# print('Type: left to right.')
m = KnapsackL(value,weight,capacity,n,m)
select = TrackbackL(m,weight,capacity,n,Select)
return m, select
def mainRun(weight = [6,5,4,1,2,3,9,8,7],value = [1,2,3,7,8,9,6,5,4],capacity = 20,type = 'left2right'):
'''
weight = [6,5,4,1,2,3,9,8,7]
value = [1,2,3,7,8,9,6,5,4]
capacity = 20
'''
'''
weight = [3, 5, 1, 4, 2, 6]
value = [2, 3, 4, 2, 5, 1]
capacity = 11
'''
n = len(weight)
try:
n == len(value)
except ValueError:
print("Please check the number of weights and values.")
m = [[-1]*(capacity+1) for _ in range(n)]
select = [0 for _ in range(n)]
(m,select) = switchFunc(value,weight,capacity,n,m,select,type)
maxValue = 0;
for i in range(0,n):
if select[i] == 1:
maxValue = maxValue + value[i]
'''
print("Dymamic programming method is done.")
print("m matrix: ", m)
print("Select: ",select)
print("Maximum value: ",maxValue,"\n")
'''
if __name__ == '__main__':
mainRun(type = 'right2left')
mainRun(type = 'left2rightt')
| """
# mainRun(weight,value,capacity,type)
n: number of items
value: value of each item
weight: weight of each item
capacity: capacity of bag
m: memery matrix
type: 'right2left' or 'left2right'
"""
def knapsack(value, weight, capacity, n, m):
j_max = min(weight[n - 1] - 1, capacity)
for j in range(0, jMax + 1):
m[n - 1][j] = 0
for j in range(weight[n - 1], capacity + 1):
m[n - 1][j] = value[n - 1]
for i in range(n - 2, -1, -1):
j_max = min(weight[i] - 1, capacity + 1)
for j in range(0, jMax + 1):
m[i][j] = m[i + 1][j]
for j in range(weight[i], capacity + 1):
m[i][j] = max(m[i + 1][j], m[i + 1][j - weight[i]] + value[i])
return m
def trackback(m, weight, capacity, n, select):
for i in range(0, n - 1):
if m[i][capacity] == m[i + 1][capacity]:
select[i] = 0
else:
select[i] = 1
capacity = capacity - weight[i]
if m[n - 1][capacity] != 0:
select[n - 1] = 1
return select
def knapsack_l(value, weight, capacity, n, m):
j_max = min(weight[0] - 1, capacity)
for j in range(0, jMax + 1):
m[0][j] = 0
for j in range(weight[0], capacity + 1):
m[0][j] = value[0]
for i in range(1, n, 1):
j_max = min(weight[i] - 1, capacity + 1)
for j in range(0, jMax + 1):
m[i][j] = m[i - 1][j]
for j in range(weight[i], capacity + 1):
m[i][j] = max(m[i - 1][j], m[i - 1][j - weight[i]] + value[i])
return m
def trackback_l(m, weight, capacity, n, select):
for i in range(n - 1, 0, -1):
if m[i][capacity] == m[i - 1][capacity]:
select[i] = 0
else:
select[i] = 1
capacity = capacity - weight[i]
if m[0][capacity] != 0:
select[0] = 1
return select
def switch_func(value, weight, capacity, n, m, Select, type):
if type == 'right2left':
m = knapsack(value, weight, capacity, n, m)
select = trackback(m, weight, capacity, n, Select)
else:
m = knapsack_l(value, weight, capacity, n, m)
select = trackback_l(m, weight, capacity, n, Select)
return (m, select)
def main_run(weight=[6, 5, 4, 1, 2, 3, 9, 8, 7], value=[1, 2, 3, 7, 8, 9, 6, 5, 4], capacity=20, type='left2right'):
"""
weight = [6,5,4,1,2,3,9,8,7]
value = [1,2,3,7,8,9,6,5,4]
capacity = 20
"""
'\n weight = [3, 5, 1, 4, 2, 6]\n value = [2, 3, 4, 2, 5, 1]\n capacity = 11\n '
n = len(weight)
try:
n == len(value)
except ValueError:
print('Please check the number of weights and values.')
m = [[-1] * (capacity + 1) for _ in range(n)]
select = [0 for _ in range(n)]
(m, select) = switch_func(value, weight, capacity, n, m, select, type)
max_value = 0
for i in range(0, n):
if select[i] == 1:
max_value = maxValue + value[i]
'\n print("Dymamic programming method is done.")\n print("m matrix: ", m)\n print("Select: ",select)\n print("Maximum value: ",maxValue,"\n")\n '
if __name__ == '__main__':
main_run(type='right2left')
main_run(type='left2rightt') |
#!/usr/bin/env python2
# Author: Jayden Navarro
# CAPTURE_GROUP: default_project
rgx_default_project = [ 'export CURR_WS=\"(.*)\"' ]
fmt_default_project = 'export CURR_WS=\"%s\"\n'
# CAPTURE_GROUP: projects
rgx_projects = [ r'\"\$CURR_WS\" == \"(.*)\"', 'export CURR_PK=\"(.*)\"',
'export CURR_TYPE=\"(.*)\"' ]
fmt_projects = '''\
if [ "$CURR_WS" == "%s" ]
then
export CURR_PK="%s"
export CURR_TYPE="%s"
fi
'''
| rgx_default_project = ['export CURR_WS="(.*)"']
fmt_default_project = 'export CURR_WS="%s"\n'
rgx_projects = ['\\"\\$CURR_WS\\" == \\"(.*)\\"', 'export CURR_PK="(.*)"', 'export CURR_TYPE="(.*)"']
fmt_projects = 'if [ "$CURR_WS" == "%s" ]\nthen\n export CURR_PK="%s"\n export CURR_TYPE="%s"\nfi\n' |
def lazy_attr(compute_value_func):
"""
Use as a decorator for a method that computes a value based on unchanging data. It turns the function into a read-only property. It is computed only when requested, and stores the value so it only needs to be computed once.
Notice that since it replaces the function with a property, you need access it without ().
You need to be using new style classes for this to work!
.. NOTE::
The doctests don't work for this, so I put ``tsage`` instead of ``sage`` so it doesn't try to run automated tests on them. This also kills the cool highlighting in html, too.
Examples::
tsage: class c(object):
def __init__(self, x):
self.x = x
@lazy_attr
def x_square(self):
print "computing the square of x"
return self.x**2
The first time we ask for x_square, it calls the x_square method.
::
tsage: t = c(5)
tsage: t.x_square
computing the square of x
25
In future requests, it just retrieves the stored value.
::
tsage: t.x_square
25
"""
stored_value_name = "_" + compute_value_func.__name__ + "_stored_value"
#def get_lazy_attr(self):
# if not self.__dict__.has_key(stored_value_name):
# self.__setattr__(stored_value_name, compute_value_func(self))
# return self.__getattribute__(stored_value_name)
def get_lazy_attr(self):
value = self.__dict__.get(stored_value_name)
if value == None:
value = compute_value_func(self)
self.__setattr__(stored_value_name, value)
return value
lazy_attr_doc = "\n\n\tThis uses the ``lazy_attr`` decorator, which turns the function into a read-only property. It is computed only when requested, and stores the value so it only needs to be computed once."
if compute_value_func.__doc__ != None:
doc = compute_value_func.__doc__ + lazy_attr_doc
else:
doc = lazy_attr_doc
return property(get_lazy_attr, doc = doc) | def lazy_attr(compute_value_func):
"""
Use as a decorator for a method that computes a value based on unchanging data. It turns the function into a read-only property. It is computed only when requested, and stores the value so it only needs to be computed once.
Notice that since it replaces the function with a property, you need access it without ().
You need to be using new style classes for this to work!
.. NOTE::
The doctests don't work for this, so I put ``tsage`` instead of ``sage`` so it doesn't try to run automated tests on them. This also kills the cool highlighting in html, too.
Examples::
tsage: class c(object):
def __init__(self, x):
self.x = x
@lazy_attr
def x_square(self):
print "computing the square of x"
return self.x**2
The first time we ask for x_square, it calls the x_square method.
::
tsage: t = c(5)
tsage: t.x_square
computing the square of x
25
In future requests, it just retrieves the stored value.
::
tsage: t.x_square
25
"""
stored_value_name = '_' + compute_value_func.__name__ + '_stored_value'
def get_lazy_attr(self):
value = self.__dict__.get(stored_value_name)
if value == None:
value = compute_value_func(self)
self.__setattr__(stored_value_name, value)
return value
lazy_attr_doc = '\n\n\tThis uses the ``lazy_attr`` decorator, which turns the function into a read-only property. It is computed only when requested, and stores the value so it only needs to be computed once.'
if compute_value_func.__doc__ != None:
doc = compute_value_func.__doc__ + lazy_attr_doc
else:
doc = lazy_attr_doc
return property(get_lazy_attr, doc=doc) |
class Car:
PURCHASE_TYPES = ("LEASE", "CASH")
__sales_list = None
@classmethod
def get_purchase_types(cls):
return cls.PURCHASE_TYPES
@staticmethod
def get_sales_list():
if Car.__sales_list == None:
Car.__sales_list = []
return Car.__sales_list
def __init__(self, maker, model, colour, price, purchase_type):
self.maker = maker
self.model = model
self.colour = colour
self.price = price
self.__secret_cog = "Tshhh"
if (not purchase_type in Car.PURCHASE_TYPES):
raise ValueError(f"{purchase_type} is not a valid purchase type")
else:
self.purchase_type = purchase_type
def get_price(self):
if hasattr(self, "_discount"):
return self.price - (self.price * self._discount)
else:
return self.price
def set_discount(self, amount):
self._discount = amount
class Boat:
def __init__(self, name):
self.name = name
car1 = Car("BMW", "i8", "white", 50000, "CASH")
car2 = Car("Mercedes", "C-class", "black", 28500, "LEASE")
print("Purchase types: ", Car.get_purchase_types())
print(car1.purchase_type)
print(car2.purchase_type)
sales_this_month = Car.get_sales_list()
sales_this_month.append(car1)
sales_this_month.append(car2)
print(sales_this_month)
| class Car:
purchase_types = ('LEASE', 'CASH')
__sales_list = None
@classmethod
def get_purchase_types(cls):
return cls.PURCHASE_TYPES
@staticmethod
def get_sales_list():
if Car.__sales_list == None:
Car.__sales_list = []
return Car.__sales_list
def __init__(self, maker, model, colour, price, purchase_type):
self.maker = maker
self.model = model
self.colour = colour
self.price = price
self.__secret_cog = 'Tshhh'
if not purchase_type in Car.PURCHASE_TYPES:
raise value_error(f'{purchase_type} is not a valid purchase type')
else:
self.purchase_type = purchase_type
def get_price(self):
if hasattr(self, '_discount'):
return self.price - self.price * self._discount
else:
return self.price
def set_discount(self, amount):
self._discount = amount
class Boat:
def __init__(self, name):
self.name = name
car1 = car('BMW', 'i8', 'white', 50000, 'CASH')
car2 = car('Mercedes', 'C-class', 'black', 28500, 'LEASE')
print('Purchase types: ', Car.get_purchase_types())
print(car1.purchase_type)
print(car2.purchase_type)
sales_this_month = Car.get_sales_list()
sales_this_month.append(car1)
sales_this_month.append(car2)
print(sales_this_month) |
def nextGreaterElement(n: int) -> int:
digits = list(reversed([int(d) for d in str(n)]))
result = None
for i in range(len(digits) - 1):
if digits[i] > digits[i+1]:
toSwap = 0
while digits[toSwap] <= digits[i+1]:
toSwap += 1
digits[toSwap], digits[i+1] = digits[i+1], digits[toSwap]
result = digits[0:i+1][::-1] + digits[i+1:len(digits)]
break
if result is None:
return -1
total = int(''.join([str(x) for x in result[::-1]]))
if total >= 2**31:
return -1
else:
return total | def next_greater_element(n: int) -> int:
digits = list(reversed([int(d) for d in str(n)]))
result = None
for i in range(len(digits) - 1):
if digits[i] > digits[i + 1]:
to_swap = 0
while digits[toSwap] <= digits[i + 1]:
to_swap += 1
(digits[toSwap], digits[i + 1]) = (digits[i + 1], digits[toSwap])
result = digits[0:i + 1][::-1] + digits[i + 1:len(digits)]
break
if result is None:
return -1
total = int(''.join([str(x) for x in result[::-1]]))
if total >= 2 ** 31:
return -1
else:
return total |
class SudokuSolver:
def __init__(self, board):
self.board = board
def print_board(self):
""" Prints the current board to solve"""
for i in range(len(self.board)):
if i % 3 == 0 and i != 0:
print("------------------------")
for j in range(len(self.board[0])):
if j % 3 == 0 and j != 0:
print(" | ", end="")
if j == 8:
print(self.board[i][j])
else:
print(str(self.board[i][j]) + " ", end="")
def find_empty_space(self):
""" Looks through board and finds a place that holds no number or '0' """
for i in range(len(self.board)):
for j in range(len(self.board[0])):
if self.board[i][j] == 0:
return i, j
def potential_num(self, num, position):
""" Checks if the number we are putting in the board is potentially correct"""
# Checking if number appears in row
for i in range(len(self.board[0])):
if self.board[position[0]][i] == num and position[1] != i:
return False
# Checking if number appears in column
for i in range(len(self.board)):
if self.board[i][position[1]] == num and position[0] != i:
return False
# Checking if number appears in 3 x 3 box
x = position[1] // 3 # column given by 'find_empty_space' integer divided by 3 since boxes are 3x3
y = position[0] // 3 # row given by 'find_empty_space' integer divided by 3 since boxes are 3x3
for i in range(y * 3, y * 3 + 3):
for j in range(x * 3, x * 3 + 3):
if self.board[i][j] == num and (i, j) != position:
return False
return True
def solve_sudoku(self):
""" Puts in Number after checking if it is potentially correct, if next number does not have valid number,
it makes previous number check again until it gets to the last number in the board"""
empty = self.find_empty_space()
if not empty:
return True
else:
row, column = empty
for i in range(1, 10):
if self.potential_num( i, (row, column)):
self.board[row][column] = i
if self.solve_sudoku():
return True
self.board[row][column] = 0
return False
def print_solved_sudoku(self):
""" Prints out whole Process"""
print("Sudoku Board to Solve:\n")
self.print_board()
print()
self.solve_sudoku()
print("Solved Board:\n")
self.print_board()
| class Sudokusolver:
def __init__(self, board):
self.board = board
def print_board(self):
""" Prints the current board to solve"""
for i in range(len(self.board)):
if i % 3 == 0 and i != 0:
print('------------------------')
for j in range(len(self.board[0])):
if j % 3 == 0 and j != 0:
print(' | ', end='')
if j == 8:
print(self.board[i][j])
else:
print(str(self.board[i][j]) + ' ', end='')
def find_empty_space(self):
""" Looks through board and finds a place that holds no number or '0' """
for i in range(len(self.board)):
for j in range(len(self.board[0])):
if self.board[i][j] == 0:
return (i, j)
def potential_num(self, num, position):
""" Checks if the number we are putting in the board is potentially correct"""
for i in range(len(self.board[0])):
if self.board[position[0]][i] == num and position[1] != i:
return False
for i in range(len(self.board)):
if self.board[i][position[1]] == num and position[0] != i:
return False
x = position[1] // 3
y = position[0] // 3
for i in range(y * 3, y * 3 + 3):
for j in range(x * 3, x * 3 + 3):
if self.board[i][j] == num and (i, j) != position:
return False
return True
def solve_sudoku(self):
""" Puts in Number after checking if it is potentially correct, if next number does not have valid number,
it makes previous number check again until it gets to the last number in the board"""
empty = self.find_empty_space()
if not empty:
return True
else:
(row, column) = empty
for i in range(1, 10):
if self.potential_num(i, (row, column)):
self.board[row][column] = i
if self.solve_sudoku():
return True
self.board[row][column] = 0
return False
def print_solved_sudoku(self):
""" Prints out whole Process"""
print('Sudoku Board to Solve:\n')
self.print_board()
print()
self.solve_sudoku()
print('Solved Board:\n')
self.print_board() |
# sum(of_list) is built in
def mysumli(li):
if li == []:
return 0
else:
return li[0] + mysumli(li[1:])
# print(li[0:-4])
lis = [1, 1, 1]
print(mysumli(lis)) | def mysumli(li):
if li == []:
return 0
else:
return li[0] + mysumli(li[1:])
lis = [1, 1, 1]
print(mysumli(lis)) |
# Determining the Grade using the user's
score = float(input('Enter score between 0.0 and 1.0: '))
if score > 0.0 and score < 1.0:
if score >= 0.9:
print('A')
elif score >= 0.8:
print('B')
elif score >= 0.7:
print('C')
elif score >= 0.6:
print('D')
else:
print('F')
else:
print('Bad score') | score = float(input('Enter score between 0.0 and 1.0: '))
if score > 0.0 and score < 1.0:
if score >= 0.9:
print('A')
elif score >= 0.8:
print('B')
elif score >= 0.7:
print('C')
elif score >= 0.6:
print('D')
else:
print('F')
else:
print('Bad score') |
class ParamSet:
"""A class for holding and validating the GET params
It validates the most of params with their restrictions. And also validate the required values for each mode
"""
AVAILABLE_MODES = (
'thumbnail', 'resize', 'flip', 'rotate',
)
AVAILABLE_FORMATS = (
'jpg', 'jpeg', 'png',
)
VALID_HORIZONTAL_DIRECTIONS = (
'h', 'horizontal',
)
VALID_VERTICAL_DIRECTIONS = (
'v', 'vertical',
)
VALID_TRUE_BOOL_STRINGS = (
'true', 't', '1', 'yes',
)
VALID_FALSE_BOOL_STRINGS = (
'false', 'f', '0', 'no',
)
def __init__(self, mode=None, path=None, img_format='png', width=None, height=None,
upscale='true', quality='100', direction=None, degree=None):
"""Initialize the parameters for fitter server
TODO: Supports external URL of an image as 'url' field
:param mode: The operation mode. One of followings
- thumbnail
- resize
- flip
- rotate
:param path: The path of image which is on source storage
:param img_format: The desired format of image
- png
- jpg
- jpeg
:param width: The desired width of image. If this value is 0, the aspect ratio of output image is preserved
:param height: The desired height of image. If this value is 0, the aspect ratio of output image is preserved
:param upscale: Whether if upscale the image has size smaller than desired size
:param quality: The desired quality of image
:param direction: The desired direction to flip the image
:param degree: The desired degree to rotate the image
:return: None. But will set all params to itself
"""
# For operation. One of followings
self.mode = mode
# For image url or path on source storage
self.path = path
# For operation conditions
self.width = width
self.height = height
self.direction = direction
self.degree = degree
self.img_format = img_format
self.upscale = upscale
self.quality = quality
self.options = {
'format': self.img_format,
'upscale': self.upscale,
'quality': self.quality,
}
self.errors = []
def _validate_mode(self):
if self.mode is None:
self.errors.append('You must specify the \'mode\'')
return False
if self.mode not in self.AVAILABLE_MODES:
self.errors.append('The \'mode\' must be one of {}'.format(self.AVAILABLE_MODES))
return False
return True
def _validate_path(self):
if self.path is None:
self.errors.append('You must specify the \'path\' of an image')
return False
return True
def _validate_foramt(self):
if self.options['format'] not in self.AVAILABLE_FORMATS:
self.errors.append('The \'format\' must be one of {}'.format(self.AVAILABLE_FORMATS))
return False
return True
def _validate_width(self):
if self.width is not None:
if not self.width.isnumeric():
self.errors.append('Only numeric value is allowed for \'width\'')
return False
self.width = int(self.width)
if self.width < 0:
self.errors.append('The \'width\' can not be negative')
return False
return True
def _validate_height(self):
if self.height is not None:
if not self.height.isnumeric():
self.errors.append('Only numeric value is allowed for \'height\'')
return False
self.height = int(self.height)
if self.height < 0:
self.errors.append('The \'height\' can not be negative')
return False
return True
def _validate_upscale(self):
if self.options['upscale'] in self.VALID_TRUE_BOOL_STRINGS:
self.options['upscale'] = True
return True
if self.options['upscale'] in self.VALID_FALSE_BOOL_STRINGS:
self.options['upscale'] = False
return True
self.errors.append('Only bool string is allowed for \'upscale\': {}'.format(
self.VALID_TRUE_BOOL_STRINGS + self.VALID_FALSE_BOOL_STRINGS))
return False
def _validate_quality(self):
if not self.options['quality'].isnumeric():
self.errors.append('Only numeric value is allowed for \'quality\'')
return False
self.options['quality'] = int(self.options['quality'])
if self.options['quality'] <= 0 or self.options['quality'] > 100:
self.errors.append('The quality must be in between 1 and 100')
return False
return True
def _validate_direction(self):
if self.direction is not None:
if self.direction in self.VALID_HORIZONTAL_DIRECTIONS:
self.direction = 'h'
return True
if self.direction in self.VALID_VERTICAL_DIRECTIONS:
self.direction = 'v'
return True
self.errors.append(
'The \'direction\' must be one of {}'.format(
self.VALID_HORIZONTAL_DIRECTIONS + self.VALID_VERTICAL_DIRECTIONS))
return False
return True
def _validate_degree(self):
if self.degree is not None:
if not self.degree.isnumeric():
self.errors.append('Only numeric value is allowed for \'degree\'')
return False
self.degree = float(self.degree)
return True
return True
def _validate_required_for_resizing(self):
if self.width is None and self.height is None:
self.errors.append('At least one of \'width\' or \'height\' have to be set')
return False
if self.width == 0 and self.height == 0:
self.errors.append('At least one of \'width\' or \'height\' have to be positive')
return False
return True
def _validate_required_for_flipping(self):
if self.direction is None:
self.errors.append('The \'direction\' have to be set to flip the image')
return False
return True
def _validate_required_for_rotating(self):
if self.degree is None:
self.errors.append('The \'degree\' have to be set to rotate the image')
return False
return True
def validate(self):
"""Validate the restrictions of params and conditions of mode
:return: True if all validation is passed, False otherwise
"""
# TODO: Validate the only required parameters for each mode
basic_validated = all([self._validate_mode(),
self._validate_path(),
self._validate_foramt(),
self._validate_width(),
self._validate_height(),
self._validate_upscale(),
self._validate_quality(),
self._validate_direction(),
self._validate_degree()])
if not basic_validated:
return basic_validated
# Validate the required conditions for each mode
if self.mode == 'thumbnail' or self.mode == 'resize':
return self._validate_required_for_resizing()
if self.mode == 'flip':
return self._validate_required_for_flipping()
if self.mode == 'rotate':
return self._validate_required_for_rotating()
| class Paramset:
"""A class for holding and validating the GET params
It validates the most of params with their restrictions. And also validate the required values for each mode
"""
available_modes = ('thumbnail', 'resize', 'flip', 'rotate')
available_formats = ('jpg', 'jpeg', 'png')
valid_horizontal_directions = ('h', 'horizontal')
valid_vertical_directions = ('v', 'vertical')
valid_true_bool_strings = ('true', 't', '1', 'yes')
valid_false_bool_strings = ('false', 'f', '0', 'no')
def __init__(self, mode=None, path=None, img_format='png', width=None, height=None, upscale='true', quality='100', direction=None, degree=None):
"""Initialize the parameters for fitter server
TODO: Supports external URL of an image as 'url' field
:param mode: The operation mode. One of followings
- thumbnail
- resize
- flip
- rotate
:param path: The path of image which is on source storage
:param img_format: The desired format of image
- png
- jpg
- jpeg
:param width: The desired width of image. If this value is 0, the aspect ratio of output image is preserved
:param height: The desired height of image. If this value is 0, the aspect ratio of output image is preserved
:param upscale: Whether if upscale the image has size smaller than desired size
:param quality: The desired quality of image
:param direction: The desired direction to flip the image
:param degree: The desired degree to rotate the image
:return: None. But will set all params to itself
"""
self.mode = mode
self.path = path
self.width = width
self.height = height
self.direction = direction
self.degree = degree
self.img_format = img_format
self.upscale = upscale
self.quality = quality
self.options = {'format': self.img_format, 'upscale': self.upscale, 'quality': self.quality}
self.errors = []
def _validate_mode(self):
if self.mode is None:
self.errors.append("You must specify the 'mode'")
return False
if self.mode not in self.AVAILABLE_MODES:
self.errors.append("The 'mode' must be one of {}".format(self.AVAILABLE_MODES))
return False
return True
def _validate_path(self):
if self.path is None:
self.errors.append("You must specify the 'path' of an image")
return False
return True
def _validate_foramt(self):
if self.options['format'] not in self.AVAILABLE_FORMATS:
self.errors.append("The 'format' must be one of {}".format(self.AVAILABLE_FORMATS))
return False
return True
def _validate_width(self):
if self.width is not None:
if not self.width.isnumeric():
self.errors.append("Only numeric value is allowed for 'width'")
return False
self.width = int(self.width)
if self.width < 0:
self.errors.append("The 'width' can not be negative")
return False
return True
def _validate_height(self):
if self.height is not None:
if not self.height.isnumeric():
self.errors.append("Only numeric value is allowed for 'height'")
return False
self.height = int(self.height)
if self.height < 0:
self.errors.append("The 'height' can not be negative")
return False
return True
def _validate_upscale(self):
if self.options['upscale'] in self.VALID_TRUE_BOOL_STRINGS:
self.options['upscale'] = True
return True
if self.options['upscale'] in self.VALID_FALSE_BOOL_STRINGS:
self.options['upscale'] = False
return True
self.errors.append("Only bool string is allowed for 'upscale': {}".format(self.VALID_TRUE_BOOL_STRINGS + self.VALID_FALSE_BOOL_STRINGS))
return False
def _validate_quality(self):
if not self.options['quality'].isnumeric():
self.errors.append("Only numeric value is allowed for 'quality'")
return False
self.options['quality'] = int(self.options['quality'])
if self.options['quality'] <= 0 or self.options['quality'] > 100:
self.errors.append('The quality must be in between 1 and 100')
return False
return True
def _validate_direction(self):
if self.direction is not None:
if self.direction in self.VALID_HORIZONTAL_DIRECTIONS:
self.direction = 'h'
return True
if self.direction in self.VALID_VERTICAL_DIRECTIONS:
self.direction = 'v'
return True
self.errors.append("The 'direction' must be one of {}".format(self.VALID_HORIZONTAL_DIRECTIONS + self.VALID_VERTICAL_DIRECTIONS))
return False
return True
def _validate_degree(self):
if self.degree is not None:
if not self.degree.isnumeric():
self.errors.append("Only numeric value is allowed for 'degree'")
return False
self.degree = float(self.degree)
return True
return True
def _validate_required_for_resizing(self):
if self.width is None and self.height is None:
self.errors.append("At least one of 'width' or 'height' have to be set")
return False
if self.width == 0 and self.height == 0:
self.errors.append("At least one of 'width' or 'height' have to be positive")
return False
return True
def _validate_required_for_flipping(self):
if self.direction is None:
self.errors.append("The 'direction' have to be set to flip the image")
return False
return True
def _validate_required_for_rotating(self):
if self.degree is None:
self.errors.append("The 'degree' have to be set to rotate the image")
return False
return True
def validate(self):
"""Validate the restrictions of params and conditions of mode
:return: True if all validation is passed, False otherwise
"""
basic_validated = all([self._validate_mode(), self._validate_path(), self._validate_foramt(), self._validate_width(), self._validate_height(), self._validate_upscale(), self._validate_quality(), self._validate_direction(), self._validate_degree()])
if not basic_validated:
return basic_validated
if self.mode == 'thumbnail' or self.mode == 'resize':
return self._validate_required_for_resizing()
if self.mode == 'flip':
return self._validate_required_for_flipping()
if self.mode == 'rotate':
return self._validate_required_for_rotating() |
#
# PySNMP MIB module RIVERSTONE-SYSTEM-RESOURCES-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/RIVERSTONE-SYSTEM-RESOURCES-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 20:49:28 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsIntersection, ValueSizeConstraint, ValueRangeConstraint, SingleValueConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ValueSizeConstraint", "ValueRangeConstraint", "SingleValueConstraint", "ConstraintsUnion")
entPhysicalIndex, = mibBuilder.importSymbols("ENTITY-MIB", "entPhysicalIndex")
riverstoneMibs, = mibBuilder.importSymbols("RIVERSTONE-SMI-MIB", "riverstoneMibs")
ModuleCompliance, NotificationGroup, ObjectGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup", "ObjectGroup")
Counter64, ObjectIdentity, Bits, Counter32, iso, TimeTicks, MibIdentifier, Unsigned32, Gauge32, ModuleIdentity, NotificationType, MibScalar, MibTable, MibTableRow, MibTableColumn, IpAddress, Integer32 = mibBuilder.importSymbols("SNMPv2-SMI", "Counter64", "ObjectIdentity", "Bits", "Counter32", "iso", "TimeTicks", "MibIdentifier", "Unsigned32", "Gauge32", "ModuleIdentity", "NotificationType", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "IpAddress", "Integer32")
TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
rsSystemResourcesMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 5567, 2, 281))
rsSystemResourcesMIB.setRevisions(('2004-09-14 13:00',))
if mibBuilder.loadTexts: rsSystemResourcesMIB.setLastUpdated('200409141300Z')
if mibBuilder.loadTexts: rsSystemResourcesMIB.setOrganization('Riverstone Networks, Inc')
rsSystemUtilization = ObjectIdentity((1, 3, 6, 1, 4, 1, 5567, 2, 281, 5))
if mibBuilder.loadTexts: rsSystemUtilization.setStatus('current')
rsCpuUtl = ObjectIdentity((1, 3, 6, 1, 4, 1, 5567, 2, 281, 5, 5))
if mibBuilder.loadTexts: rsCpuUtl.setStatus('current')
rsMemory = ObjectIdentity((1, 3, 6, 1, 4, 1, 5567, 2, 281, 5, 10))
if mibBuilder.loadTexts: rsMemory.setStatus('current')
rsUtlSamplingRate = MibScalar((1, 3, 6, 1, 4, 1, 5567, 2, 281, 5, 25), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(100, 60000))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rsUtlSamplingRate.setStatus('current')
rsUtlConformance = ObjectIdentity((1, 3, 6, 1, 4, 1, 5567, 2, 281, 5, 35))
if mibBuilder.loadTexts: rsUtlConformance.setStatus('current')
rsUtlCPUTable = MibTable((1, 3, 6, 1, 4, 1, 5567, 2, 281, 5, 5, 1), )
if mibBuilder.loadTexts: rsUtlCPUTable.setStatus('current')
rsUtlCPUEntry = MibTableRow((1, 3, 6, 1, 4, 1, 5567, 2, 281, 5, 5, 1, 1), ).setIndexNames((0, "ENTITY-MIB", "entPhysicalIndex"))
if mibBuilder.loadTexts: rsUtlCPUEntry.setStatus('current')
rsUtlCPUSystemUtilization5Sec = MibTableColumn((1, 3, 6, 1, 4, 1, 5567, 2, 281, 5, 5, 1, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rsUtlCPUSystemUtilization5Sec.setStatus('current')
rsUtlCPUUserUtilization5Sec = MibTableColumn((1, 3, 6, 1, 4, 1, 5567, 2, 281, 5, 5, 1, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rsUtlCPUUserUtilization5Sec.setStatus('current')
rsUtlCPUSystemUtilization60Sec = MibTableColumn((1, 3, 6, 1, 4, 1, 5567, 2, 281, 5, 5, 1, 1, 3), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rsUtlCPUSystemUtilization60Sec.setStatus('current')
rsUtlCPUUserUtilization60Sec = MibTableColumn((1, 3, 6, 1, 4, 1, 5567, 2, 281, 5, 5, 1, 1, 4), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rsUtlCPUUserUtilization60Sec.setStatus('current')
rsUtlCPUSystemUtilization5Min = MibTableColumn((1, 3, 6, 1, 4, 1, 5567, 2, 281, 5, 5, 1, 1, 5), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rsUtlCPUSystemUtilization5Min.setStatus('current')
rsUtlCPUUserUtilization5Min = MibTableColumn((1, 3, 6, 1, 4, 1, 5567, 2, 281, 5, 5, 1, 1, 6), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rsUtlCPUUserUtilization5Min.setStatus('current')
rsUtlMemoryTable = MibTable((1, 3, 6, 1, 4, 1, 5567, 2, 281, 5, 10, 1), )
if mibBuilder.loadTexts: rsUtlMemoryTable.setStatus('current')
rsUtlMemoryEntry = MibTableRow((1, 3, 6, 1, 4, 1, 5567, 2, 281, 5, 10, 1, 1), ).setIndexNames((0, "ENTITY-MIB", "entPhysicalIndex"))
if mibBuilder.loadTexts: rsUtlMemoryEntry.setStatus('current')
rsUtlMemoryActivePages5Sec = MibTableColumn((1, 3, 6, 1, 4, 1, 5567, 2, 281, 5, 10, 1, 1, 1), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rsUtlMemoryActivePages5Sec.setStatus('current')
rsUtlMemoryFreePages5Sec = MibTableColumn((1, 3, 6, 1, 4, 1, 5567, 2, 281, 5, 10, 1, 1, 2), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rsUtlMemoryFreePages5Sec.setStatus('current')
rsUtlMemoryActivePages60Sec = MibTableColumn((1, 3, 6, 1, 4, 1, 5567, 2, 281, 5, 10, 1, 1, 3), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rsUtlMemoryActivePages60Sec.setStatus('current')
rsUtlMemoryFreePages60Sec = MibTableColumn((1, 3, 6, 1, 4, 1, 5567, 2, 281, 5, 10, 1, 1, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rsUtlMemoryFreePages60Sec.setStatus('current')
rsUtlMemoryActivePages5Min = MibTableColumn((1, 3, 6, 1, 4, 1, 5567, 2, 281, 5, 10, 1, 1, 5), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rsUtlMemoryActivePages5Min.setStatus('current')
rsUtlMemoryFreePages5Min = MibTableColumn((1, 3, 6, 1, 4, 1, 5567, 2, 281, 5, 10, 1, 1, 6), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rsUtlMemoryFreePages5Min.setStatus('current')
rsUtlCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 5567, 2, 281, 5, 35, 1))
rsUtlGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 5567, 2, 281, 5, 35, 2))
rsUtlComplianceV1 = ModuleCompliance((1, 3, 6, 1, 4, 1, 5567, 2, 281, 5, 35, 1, 1)).setObjects(("RIVERSTONE-SYSTEM-RESOURCES-MIB", "rsUtlConfGroupV1"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
rsUtlComplianceV1 = rsUtlComplianceV1.setStatus('current')
rsUtlConfGroupV1 = ObjectGroup((1, 3, 6, 1, 4, 1, 5567, 2, 281, 5, 35, 2, 1)).setObjects(("RIVERSTONE-SYSTEM-RESOURCES-MIB", "rsUtlMemoryActivePages5Sec"), ("RIVERSTONE-SYSTEM-RESOURCES-MIB", "rsUtlMemoryFreePages5Sec"), ("RIVERSTONE-SYSTEM-RESOURCES-MIB", "rsUtlCPUSystemUtilization5Sec"), ("RIVERSTONE-SYSTEM-RESOURCES-MIB", "rsUtlCPUUserUtilization5Sec"), ("RIVERSTONE-SYSTEM-RESOURCES-MIB", "rsUtlCPUSystemUtilization60Sec"), ("RIVERSTONE-SYSTEM-RESOURCES-MIB", "rsUtlCPUUserUtilization60Sec"), ("RIVERSTONE-SYSTEM-RESOURCES-MIB", "rsUtlCPUSystemUtilization5Min"), ("RIVERSTONE-SYSTEM-RESOURCES-MIB", "rsUtlCPUUserUtilization5Min"), ("RIVERSTONE-SYSTEM-RESOURCES-MIB", "rsUtlMemoryActivePages60Sec"), ("RIVERSTONE-SYSTEM-RESOURCES-MIB", "rsUtlMemoryFreePages60Sec"), ("RIVERSTONE-SYSTEM-RESOURCES-MIB", "rsUtlMemoryActivePages5Min"), ("RIVERSTONE-SYSTEM-RESOURCES-MIB", "rsUtlMemoryFreePages5Min"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
rsUtlConfGroupV1 = rsUtlConfGroupV1.setStatus('current')
mibBuilder.exportSymbols("RIVERSTONE-SYSTEM-RESOURCES-MIB", rsUtlConfGroupV1=rsUtlConfGroupV1, rsUtlMemoryActivePages5Sec=rsUtlMemoryActivePages5Sec, rsUtlMemoryEntry=rsUtlMemoryEntry, rsMemory=rsMemory, rsUtlCPUSystemUtilization60Sec=rsUtlCPUSystemUtilization60Sec, rsUtlGroups=rsUtlGroups, rsUtlMemoryFreePages5Min=rsUtlMemoryFreePages5Min, rsUtlMemoryActivePages5Min=rsUtlMemoryActivePages5Min, rsUtlConformance=rsUtlConformance, rsUtlMemoryActivePages60Sec=rsUtlMemoryActivePages60Sec, rsUtlComplianceV1=rsUtlComplianceV1, rsUtlCPUEntry=rsUtlCPUEntry, rsUtlMemoryTable=rsUtlMemoryTable, rsCpuUtl=rsCpuUtl, rsUtlCPUUserUtilization60Sec=rsUtlCPUUserUtilization60Sec, rsSystemResourcesMIB=rsSystemResourcesMIB, rsSystemUtilization=rsSystemUtilization, rsUtlSamplingRate=rsUtlSamplingRate, rsUtlCPUUserUtilization5Sec=rsUtlCPUUserUtilization5Sec, rsUtlMemoryFreePages5Sec=rsUtlMemoryFreePages5Sec, rsUtlCPUSystemUtilization5Sec=rsUtlCPUSystemUtilization5Sec, rsUtlCPUUserUtilization5Min=rsUtlCPUUserUtilization5Min, rsUtlCPUTable=rsUtlCPUTable, rsUtlMemoryFreePages60Sec=rsUtlMemoryFreePages60Sec, rsUtlCPUSystemUtilization5Min=rsUtlCPUSystemUtilization5Min, PYSNMP_MODULE_ID=rsSystemResourcesMIB, rsUtlCompliances=rsUtlCompliances)
| (object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_intersection, value_size_constraint, value_range_constraint, single_value_constraint, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'ValueSizeConstraint', 'ValueRangeConstraint', 'SingleValueConstraint', 'ConstraintsUnion')
(ent_physical_index,) = mibBuilder.importSymbols('ENTITY-MIB', 'entPhysicalIndex')
(riverstone_mibs,) = mibBuilder.importSymbols('RIVERSTONE-SMI-MIB', 'riverstoneMibs')
(module_compliance, notification_group, object_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup', 'ObjectGroup')
(counter64, object_identity, bits, counter32, iso, time_ticks, mib_identifier, unsigned32, gauge32, module_identity, notification_type, mib_scalar, mib_table, mib_table_row, mib_table_column, ip_address, integer32) = mibBuilder.importSymbols('SNMPv2-SMI', 'Counter64', 'ObjectIdentity', 'Bits', 'Counter32', 'iso', 'TimeTicks', 'MibIdentifier', 'Unsigned32', 'Gauge32', 'ModuleIdentity', 'NotificationType', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'IpAddress', 'Integer32')
(textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString')
rs_system_resources_mib = module_identity((1, 3, 6, 1, 4, 1, 5567, 2, 281))
rsSystemResourcesMIB.setRevisions(('2004-09-14 13:00',))
if mibBuilder.loadTexts:
rsSystemResourcesMIB.setLastUpdated('200409141300Z')
if mibBuilder.loadTexts:
rsSystemResourcesMIB.setOrganization('Riverstone Networks, Inc')
rs_system_utilization = object_identity((1, 3, 6, 1, 4, 1, 5567, 2, 281, 5))
if mibBuilder.loadTexts:
rsSystemUtilization.setStatus('current')
rs_cpu_utl = object_identity((1, 3, 6, 1, 4, 1, 5567, 2, 281, 5, 5))
if mibBuilder.loadTexts:
rsCpuUtl.setStatus('current')
rs_memory = object_identity((1, 3, 6, 1, 4, 1, 5567, 2, 281, 5, 10))
if mibBuilder.loadTexts:
rsMemory.setStatus('current')
rs_utl_sampling_rate = mib_scalar((1, 3, 6, 1, 4, 1, 5567, 2, 281, 5, 25), unsigned32().subtype(subtypeSpec=value_range_constraint(100, 60000))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rsUtlSamplingRate.setStatus('current')
rs_utl_conformance = object_identity((1, 3, 6, 1, 4, 1, 5567, 2, 281, 5, 35))
if mibBuilder.loadTexts:
rsUtlConformance.setStatus('current')
rs_utl_cpu_table = mib_table((1, 3, 6, 1, 4, 1, 5567, 2, 281, 5, 5, 1))
if mibBuilder.loadTexts:
rsUtlCPUTable.setStatus('current')
rs_utl_cpu_entry = mib_table_row((1, 3, 6, 1, 4, 1, 5567, 2, 281, 5, 5, 1, 1)).setIndexNames((0, 'ENTITY-MIB', 'entPhysicalIndex'))
if mibBuilder.loadTexts:
rsUtlCPUEntry.setStatus('current')
rs_utl_cpu_system_utilization5_sec = mib_table_column((1, 3, 6, 1, 4, 1, 5567, 2, 281, 5, 5, 1, 1, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rsUtlCPUSystemUtilization5Sec.setStatus('current')
rs_utl_cpu_user_utilization5_sec = mib_table_column((1, 3, 6, 1, 4, 1, 5567, 2, 281, 5, 5, 1, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rsUtlCPUUserUtilization5Sec.setStatus('current')
rs_utl_cpu_system_utilization60_sec = mib_table_column((1, 3, 6, 1, 4, 1, 5567, 2, 281, 5, 5, 1, 1, 3), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rsUtlCPUSystemUtilization60Sec.setStatus('current')
rs_utl_cpu_user_utilization60_sec = mib_table_column((1, 3, 6, 1, 4, 1, 5567, 2, 281, 5, 5, 1, 1, 4), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rsUtlCPUUserUtilization60Sec.setStatus('current')
rs_utl_cpu_system_utilization5_min = mib_table_column((1, 3, 6, 1, 4, 1, 5567, 2, 281, 5, 5, 1, 1, 5), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rsUtlCPUSystemUtilization5Min.setStatus('current')
rs_utl_cpu_user_utilization5_min = mib_table_column((1, 3, 6, 1, 4, 1, 5567, 2, 281, 5, 5, 1, 1, 6), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rsUtlCPUUserUtilization5Min.setStatus('current')
rs_utl_memory_table = mib_table((1, 3, 6, 1, 4, 1, 5567, 2, 281, 5, 10, 1))
if mibBuilder.loadTexts:
rsUtlMemoryTable.setStatus('current')
rs_utl_memory_entry = mib_table_row((1, 3, 6, 1, 4, 1, 5567, 2, 281, 5, 10, 1, 1)).setIndexNames((0, 'ENTITY-MIB', 'entPhysicalIndex'))
if mibBuilder.loadTexts:
rsUtlMemoryEntry.setStatus('current')
rs_utl_memory_active_pages5_sec = mib_table_column((1, 3, 6, 1, 4, 1, 5567, 2, 281, 5, 10, 1, 1, 1), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rsUtlMemoryActivePages5Sec.setStatus('current')
rs_utl_memory_free_pages5_sec = mib_table_column((1, 3, 6, 1, 4, 1, 5567, 2, 281, 5, 10, 1, 1, 2), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rsUtlMemoryFreePages5Sec.setStatus('current')
rs_utl_memory_active_pages60_sec = mib_table_column((1, 3, 6, 1, 4, 1, 5567, 2, 281, 5, 10, 1, 1, 3), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rsUtlMemoryActivePages60Sec.setStatus('current')
rs_utl_memory_free_pages60_sec = mib_table_column((1, 3, 6, 1, 4, 1, 5567, 2, 281, 5, 10, 1, 1, 4), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rsUtlMemoryFreePages60Sec.setStatus('current')
rs_utl_memory_active_pages5_min = mib_table_column((1, 3, 6, 1, 4, 1, 5567, 2, 281, 5, 10, 1, 1, 5), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rsUtlMemoryActivePages5Min.setStatus('current')
rs_utl_memory_free_pages5_min = mib_table_column((1, 3, 6, 1, 4, 1, 5567, 2, 281, 5, 10, 1, 1, 6), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rsUtlMemoryFreePages5Min.setStatus('current')
rs_utl_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 5567, 2, 281, 5, 35, 1))
rs_utl_groups = mib_identifier((1, 3, 6, 1, 4, 1, 5567, 2, 281, 5, 35, 2))
rs_utl_compliance_v1 = module_compliance((1, 3, 6, 1, 4, 1, 5567, 2, 281, 5, 35, 1, 1)).setObjects(('RIVERSTONE-SYSTEM-RESOURCES-MIB', 'rsUtlConfGroupV1'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
rs_utl_compliance_v1 = rsUtlComplianceV1.setStatus('current')
rs_utl_conf_group_v1 = object_group((1, 3, 6, 1, 4, 1, 5567, 2, 281, 5, 35, 2, 1)).setObjects(('RIVERSTONE-SYSTEM-RESOURCES-MIB', 'rsUtlMemoryActivePages5Sec'), ('RIVERSTONE-SYSTEM-RESOURCES-MIB', 'rsUtlMemoryFreePages5Sec'), ('RIVERSTONE-SYSTEM-RESOURCES-MIB', 'rsUtlCPUSystemUtilization5Sec'), ('RIVERSTONE-SYSTEM-RESOURCES-MIB', 'rsUtlCPUUserUtilization5Sec'), ('RIVERSTONE-SYSTEM-RESOURCES-MIB', 'rsUtlCPUSystemUtilization60Sec'), ('RIVERSTONE-SYSTEM-RESOURCES-MIB', 'rsUtlCPUUserUtilization60Sec'), ('RIVERSTONE-SYSTEM-RESOURCES-MIB', 'rsUtlCPUSystemUtilization5Min'), ('RIVERSTONE-SYSTEM-RESOURCES-MIB', 'rsUtlCPUUserUtilization5Min'), ('RIVERSTONE-SYSTEM-RESOURCES-MIB', 'rsUtlMemoryActivePages60Sec'), ('RIVERSTONE-SYSTEM-RESOURCES-MIB', 'rsUtlMemoryFreePages60Sec'), ('RIVERSTONE-SYSTEM-RESOURCES-MIB', 'rsUtlMemoryActivePages5Min'), ('RIVERSTONE-SYSTEM-RESOURCES-MIB', 'rsUtlMemoryFreePages5Min'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
rs_utl_conf_group_v1 = rsUtlConfGroupV1.setStatus('current')
mibBuilder.exportSymbols('RIVERSTONE-SYSTEM-RESOURCES-MIB', rsUtlConfGroupV1=rsUtlConfGroupV1, rsUtlMemoryActivePages5Sec=rsUtlMemoryActivePages5Sec, rsUtlMemoryEntry=rsUtlMemoryEntry, rsMemory=rsMemory, rsUtlCPUSystemUtilization60Sec=rsUtlCPUSystemUtilization60Sec, rsUtlGroups=rsUtlGroups, rsUtlMemoryFreePages5Min=rsUtlMemoryFreePages5Min, rsUtlMemoryActivePages5Min=rsUtlMemoryActivePages5Min, rsUtlConformance=rsUtlConformance, rsUtlMemoryActivePages60Sec=rsUtlMemoryActivePages60Sec, rsUtlComplianceV1=rsUtlComplianceV1, rsUtlCPUEntry=rsUtlCPUEntry, rsUtlMemoryTable=rsUtlMemoryTable, rsCpuUtl=rsCpuUtl, rsUtlCPUUserUtilization60Sec=rsUtlCPUUserUtilization60Sec, rsSystemResourcesMIB=rsSystemResourcesMIB, rsSystemUtilization=rsSystemUtilization, rsUtlSamplingRate=rsUtlSamplingRate, rsUtlCPUUserUtilization5Sec=rsUtlCPUUserUtilization5Sec, rsUtlMemoryFreePages5Sec=rsUtlMemoryFreePages5Sec, rsUtlCPUSystemUtilization5Sec=rsUtlCPUSystemUtilization5Sec, rsUtlCPUUserUtilization5Min=rsUtlCPUUserUtilization5Min, rsUtlCPUTable=rsUtlCPUTable, rsUtlMemoryFreePages60Sec=rsUtlMemoryFreePages60Sec, rsUtlCPUSystemUtilization5Min=rsUtlCPUSystemUtilization5Min, PYSNMP_MODULE_ID=rsSystemResourcesMIB, rsUtlCompliances=rsUtlCompliances) |
# Write a method that takes an array of consecutive (increasing) letters
# as input and that returns the missing letter in the array.
def find_missing_letter(chars):
"""
chars: string of characters
return: missing letter between chars or after
"""
letters = [char for char in chars][0]
chars = [char.lower() for char in chars]
alphabet = [char for char in "abcdefghijklmnopqrstuvwxyz"]
starting_index = alphabet.index(chars[0])
for letter in alphabet[starting_index:]:
if letter not in chars and chars[0].lower() == letters[0]:
return letter
if letter not in chars and chars[0].upper() == letters[0]:
return letter.upper()
assert find_missing_letter(['a','b','c','d','f']) == 'e', "find_missing_letter(['a','b','c','d','f']), 'e'"
assert find_missing_letter(['O','Q','R','S']) == 'P', "find_missing_letter(['O','Q','R','S']), 'P'" | def find_missing_letter(chars):
"""
chars: string of characters
return: missing letter between chars or after
"""
letters = [char for char in chars][0]
chars = [char.lower() for char in chars]
alphabet = [char for char in 'abcdefghijklmnopqrstuvwxyz']
starting_index = alphabet.index(chars[0])
for letter in alphabet[starting_index:]:
if letter not in chars and chars[0].lower() == letters[0]:
return letter
if letter not in chars and chars[0].upper() == letters[0]:
return letter.upper()
assert find_missing_letter(['a', 'b', 'c', 'd', 'f']) == 'e', "find_missing_letter(['a','b','c','d','f']), 'e'"
assert find_missing_letter(['O', 'Q', 'R', 'S']) == 'P', "find_missing_letter(['O','Q','R','S']), 'P'" |
string = 'INDIA123DELHI'
#list = list(filter(lambda x: x!= '1' and x!='2' and x!='3',string))
list = list(filter(lambda x: x not in [str(n) for n in range(10)] ,string))
print((''.join(list)))
| string = 'INDIA123DELHI'
list = list(filter(lambda x: x not in [str(n) for n in range(10)], string))
print(''.join(list)) |
def transform(df, index):
df['Latitude'].fillna('0', inplace=True)
df['Longitude'].fillna('0', inplace=True)
return df
| def transform(df, index):
df['Latitude'].fillna('0', inplace=True)
df['Longitude'].fillna('0', inplace=True)
return df |
class Node(object):
def __init__(self, value):
self.__value = value
self.attr = {}
def __str__(self):
return "Node value --> " + self.__value
def __hash__(self):
return hash(self.__value)
"""def __cmp__(self, other):
return cmp(self.attr['h'], other.attr['h'])"""
def __eq__(self, other):
return self.__value == other.__value
class Graph(object):
def __init__(self):
self.__g = {} # Internal structure
def add_node(self, node):
if node not in self.__g:
self.__g[node] = []
def add_edge(self, n1, n2):
if n1 not in self.__g:
self.add_node(n1)
if n2 not in self.__g:
self.add_node(n2)
self.__g[n1].append(n2)
self.__g[n2].append(n1)
def __getitem__(self, item):
return self.__g[item]
def __str__(self):
return str(self.__g) | class Node(object):
def __init__(self, value):
self.__value = value
self.attr = {}
def __str__(self):
return 'Node value --> ' + self.__value
def __hash__(self):
return hash(self.__value)
"def __cmp__(self, other):\n return cmp(self.attr['h'], other.attr['h'])"
def __eq__(self, other):
return self.__value == other.__value
class Graph(object):
def __init__(self):
self.__g = {}
def add_node(self, node):
if node not in self.__g:
self.__g[node] = []
def add_edge(self, n1, n2):
if n1 not in self.__g:
self.add_node(n1)
if n2 not in self.__g:
self.add_node(n2)
self.__g[n1].append(n2)
self.__g[n2].append(n1)
def __getitem__(self, item):
return self.__g[item]
def __str__(self):
return str(self.__g) |
# GENERATED VERSION FILE
# TIME: Thu Mar 7 20:30:16 2019
__version__ = '0.5.4+a6ee053'
short_version = '0.5.4'
| __version__ = '0.5.4+a6ee053'
short_version = '0.5.4' |
timezone_info = {
"A": "UTC +1",
"ACDT": "UTC +10:30",
"ACST": "UTC +9:30",
"ACT": "UTC -5",
"ACWST": "UTC +8:45",
"ADT": "UTC +4",
"AEDT": "UTC +11",
"AEST": "UTC +10",
"AET": "UTC +10:00 / +11:00",
"AFT": "UTC +4:30",
"AKDT": "UTC -8",
"AKST": "UTC -9",
"ALMT": "UTC +6",
"AMST": "UTC -3",
"AMT": "UTC -4",
"ANAST": "UTC +12",
"ANAT": "UTC +12",
"AQTT": "UTC +5",
"ART": "UTC -3",
"AST": "UTC +3",
"AT": "UTC -4:00 / -3:00",
"AWDT": "UTC +9",
"AWST": "UTC +8",
"AZOST": "UTC +0",
"AZOT": "UTC -1",
"AZST": "UTC +5",
"AZT": "UTC +4",
"AoE": "UTC -12",
"B": "UTC +2",
"BNT": "UTC +8",
"BOT": "UTC -4",
"BRST": "UTC -2",
"BRT": "UTC -3",
"BST": "UTC +6",
"BTT": "UTC +6",
"C": "UTC +3",
"CAST": "UTC +8",
"CAT": "UTC +2",
"CCT": "UTC +6:30",
"CDT": "UTC -5",
"CEST": "UTC +2",
"CET": "UTC +1",
"CHADT": "UTC +13:45",
"CHAST": "UTC +12:45",
"CHOST": "UTC +9",
"CHOT": "UTC +8",
"CHUT": "UTC +10",
"CIDST": "UTC -4",
"CIST": "UTC -5",
"CKT": "UTC -10",
"CLST": "UTC -3",
"CLT": "UTC -4",
"COT": "UTC -5",
"CST": "UTC -6",
"CT": "UTC -6:00 / -5:00",
"CVT": "UTC -1",
"CXT": "UTC +7",
"ChST": "UTC +10",
"D": "UTC +4",
"DAVT": "UTC +7",
"DDUT": "UTC +10",
"E": "UTC +5",
"EASST": "UTC -5",
"EAST": "UTC -6",
"EAT": "UTC +3",
"ECT": "UTC -5",
"EDT": "UTC -4",
"EEST": "UTC +3",
"EET": "UTC +2",
"EGST": "UTC +0",
"EGT": "UTC -1",
"EST": "UTC -5",
"ET": "UTC -5:00 / -4:00",
"F": "UTC +6",
"FET": "UTC +3",
"FJST": "UTC +13",
"FJT": "UTC +12",
"FKST": "UTC -3",
"FKT": "UTC -4",
"FNT": "UTC -2",
"G": "UTC +7",
"GALT": "UTC -6",
"GAMT": "UTC -9",
"GET": "UTC +4",
"GFT": "UTC -3",
"GILT": "UTC +12",
"GMT": "UTC +0",
"GST": "UTC +4",
"GYT": "UTC -4",
"H": "UTC +8",
"HDT": "UTC -9",
"HKT": "UTC +8",
"HOVST": "UTC +8",
"HOVT": "UTC +7",
"HST": "UTC -10",
"I": "UTC +9",
"ICT": "UTC +7",
"IDT": "UTC +3",
"IOT": "UTC +6",
"IRDT": "UTC +4:30",
"IRKST": "UTC +9",
"IRKT": "UTC +8",
"IRST": "UTC +3:30",
"IST": "UTC +5:30",
"JST": "UTC +9",
"K": "UTC +10",
"KGT": "UTC +6",
"KOST": "UTC +11",
"KRAST": "UTC +8",
"KRAT": "UTC +7",
"KST": "UTC +9",
"KUYT": "UTC +4",
"L": "UTC +11",
"LHDT": "UTC +11",
"LHST": "UTC +10:30",
"LINT": "UTC +14",
"M": "UTC +12",
"MAGST": "UTC +12",
"MAGT": "UTC +11",
"MART": "UTC -9:30",
"MAWT": "UTC +5",
"MDT": "UTC -6",
"MHT": "UTC +12",
"MMT": "UTC +6:30",
"MSD": "UTC +4",
"MSK": "UTC +3",
"MST": "UTC -7",
"MT": "UTC -7:00 / -6:00",
"MUT": "UTC +4",
"MVT": "UTC +5",
"MYT": "UTC +8",
"N": "UTC -1",
"NCT": "UTC +11",
"NDT": "UTC -2:30",
"NFT": "UTC +11",
"NOVST": "UTC +7",
"NOVT": "UTC +7",
"NPT": "UTC +5:45",
"NRT": "UTC +12",
"NST": "UTC -3:30",
"NUT": "UTC -11",
"NZDT": "UTC +13",
"NZST": "UTC +12",
"O": "UTC -2",
"OMSST": "UTC +7",
"OMST": "UTC +6",
"ORAT": "UTC +5",
"P": "UTC -3",
"PDT": "UTC -7",
"PET": "UTC -5",
"PETST": "UTC +12",
"PETT": "UTC +12",
"PGT": "UTC +10",
"PHOT": "UTC +13",
"PHT": "UTC +8",
"PKT": "UTC +5",
"PMDT": "UTC -2",
"PMST": "UTC -3",
"PONT": "UTC +11",
"PST": "UTC -8",
"PT": "UTC -8:00 / -7:00",
"PWT": "UTC +9",
"PYST": "UTC -3",
"PYT": "UTC -4",
"Q": "UTC -4",
"QYZT": "UTC +6",
"R": "UTC -5",
"RET": "UTC +4",
"ROTT": "UTC -3",
"S": "UTC -6",
"SAKT": "UTC +11",
"SAMT": "UTC +4",
"SAST": "UTC +2",
"SBT": "UTC +11",
"SCT": "UTC +4",
"SGT": "UTC +8",
"SRET": "UTC +11",
"SRT": "UTC -3",
"SST": "UTC -11",
"SYOT": "UTC +3",
"T": "UTC -7",
"TAHT": "UTC -10",
"TFT": "UTC +5",
"TJT": "UTC +5",
"TKT": "UTC +13",
"TLT": "UTC +9",
"TMT": "UTC +5",
"TOST": "UTC +14",
"TOT": "UTC +13",
"TRT": "UTC +3",
"TVT": "UTC +12",
"U": "UTC -8",
"ULAST": "UTC +9",
"ULAT": "UTC +8",
"UTC": "UTC",
"UYST": "UTC -2",
"UYT": "UTC -3",
"UZT": "UTC +5",
"V": "UTC -9",
"VET": "UTC -4",
"VLAST": "UTC +11",
"VLAT": "UTC +10",
"VOST": "UTC +6",
"VUT": "UTC +11",
"W": "UTC -10",
"WAKT": "UTC +12",
"WARST": "UTC -3",
"WAST": "UTC +2",
"WAT": "UTC +1",
"WEST": "UTC +1",
"WET": "UTC +0",
"WFT": "UTC +12",
"WGST": "UTC -2",
"WGT": "UTC -3",
"WIB": "UTC +7",
"WIT": "UTC +9",
"WITA": "UTC +8",
"WST": "UTC +14",
"WT": "UTC +0",
"X": "UTC -11",
"Y": "UTC -12",
"YAKST": "UTC +10",
"YAKT": "UTC +9",
"YAPT": "UTC +10",
"YEKST": "UTC +6",
"YEKT": "UTC +5",
"Z": "UTC +0"
} | timezone_info = {'A': 'UTC +1', 'ACDT': 'UTC +10:30', 'ACST': 'UTC +9:30', 'ACT': 'UTC -5', 'ACWST': 'UTC +8:45', 'ADT': 'UTC +4', 'AEDT': 'UTC +11', 'AEST': 'UTC +10', 'AET': 'UTC +10:00 / +11:00', 'AFT': 'UTC +4:30', 'AKDT': 'UTC -8', 'AKST': 'UTC -9', 'ALMT': 'UTC +6', 'AMST': 'UTC -3', 'AMT': 'UTC -4', 'ANAST': 'UTC +12', 'ANAT': 'UTC +12', 'AQTT': 'UTC +5', 'ART': 'UTC -3', 'AST': 'UTC +3', 'AT': 'UTC -4:00 / -3:00', 'AWDT': 'UTC +9', 'AWST': 'UTC +8', 'AZOST': 'UTC +0', 'AZOT': 'UTC -1', 'AZST': 'UTC +5', 'AZT': 'UTC +4', 'AoE': 'UTC -12', 'B': 'UTC +2', 'BNT': 'UTC +8', 'BOT': 'UTC -4', 'BRST': 'UTC -2', 'BRT': 'UTC -3', 'BST': 'UTC +6', 'BTT': 'UTC +6', 'C': 'UTC +3', 'CAST': 'UTC +8', 'CAT': 'UTC +2', 'CCT': 'UTC +6:30', 'CDT': 'UTC -5', 'CEST': 'UTC +2', 'CET': 'UTC +1', 'CHADT': 'UTC +13:45', 'CHAST': 'UTC +12:45', 'CHOST': 'UTC +9', 'CHOT': 'UTC +8', 'CHUT': 'UTC +10', 'CIDST': 'UTC -4', 'CIST': 'UTC -5', 'CKT': 'UTC -10', 'CLST': 'UTC -3', 'CLT': 'UTC -4', 'COT': 'UTC -5', 'CST': 'UTC -6', 'CT': 'UTC -6:00 / -5:00', 'CVT': 'UTC -1', 'CXT': 'UTC +7', 'ChST': 'UTC +10', 'D': 'UTC +4', 'DAVT': 'UTC +7', 'DDUT': 'UTC +10', 'E': 'UTC +5', 'EASST': 'UTC -5', 'EAST': 'UTC -6', 'EAT': 'UTC +3', 'ECT': 'UTC -5', 'EDT': 'UTC -4', 'EEST': 'UTC +3', 'EET': 'UTC +2', 'EGST': 'UTC +0', 'EGT': 'UTC -1', 'EST': 'UTC -5', 'ET': 'UTC -5:00 / -4:00', 'F': 'UTC +6', 'FET': 'UTC +3', 'FJST': 'UTC +13', 'FJT': 'UTC +12', 'FKST': 'UTC -3', 'FKT': 'UTC -4', 'FNT': 'UTC -2', 'G': 'UTC +7', 'GALT': 'UTC -6', 'GAMT': 'UTC -9', 'GET': 'UTC +4', 'GFT': 'UTC -3', 'GILT': 'UTC +12', 'GMT': 'UTC +0', 'GST': 'UTC +4', 'GYT': 'UTC -4', 'H': 'UTC +8', 'HDT': 'UTC -9', 'HKT': 'UTC +8', 'HOVST': 'UTC +8', 'HOVT': 'UTC +7', 'HST': 'UTC -10', 'I': 'UTC +9', 'ICT': 'UTC +7', 'IDT': 'UTC +3', 'IOT': 'UTC +6', 'IRDT': 'UTC +4:30', 'IRKST': 'UTC +9', 'IRKT': 'UTC +8', 'IRST': 'UTC +3:30', 'IST': 'UTC +5:30', 'JST': 'UTC +9', 'K': 'UTC +10', 'KGT': 'UTC +6', 'KOST': 'UTC +11', 'KRAST': 'UTC +8', 'KRAT': 'UTC +7', 'KST': 'UTC +9', 'KUYT': 'UTC +4', 'L': 'UTC +11', 'LHDT': 'UTC +11', 'LHST': 'UTC +10:30', 'LINT': 'UTC +14', 'M': 'UTC +12', 'MAGST': 'UTC +12', 'MAGT': 'UTC +11', 'MART': 'UTC -9:30', 'MAWT': 'UTC +5', 'MDT': 'UTC -6', 'MHT': 'UTC +12', 'MMT': 'UTC +6:30', 'MSD': 'UTC +4', 'MSK': 'UTC +3', 'MST': 'UTC -7', 'MT': 'UTC -7:00 / -6:00', 'MUT': 'UTC +4', 'MVT': 'UTC +5', 'MYT': 'UTC +8', 'N': 'UTC -1', 'NCT': 'UTC +11', 'NDT': 'UTC -2:30', 'NFT': 'UTC +11', 'NOVST': 'UTC +7', 'NOVT': 'UTC +7', 'NPT': 'UTC +5:45', 'NRT': 'UTC +12', 'NST': 'UTC -3:30', 'NUT': 'UTC -11', 'NZDT': 'UTC +13', 'NZST': 'UTC +12', 'O': 'UTC -2', 'OMSST': 'UTC +7', 'OMST': 'UTC +6', 'ORAT': 'UTC +5', 'P': 'UTC -3', 'PDT': 'UTC -7', 'PET': 'UTC -5', 'PETST': 'UTC +12', 'PETT': 'UTC +12', 'PGT': 'UTC +10', 'PHOT': 'UTC +13', 'PHT': 'UTC +8', 'PKT': 'UTC +5', 'PMDT': 'UTC -2', 'PMST': 'UTC -3', 'PONT': 'UTC +11', 'PST': 'UTC -8', 'PT': 'UTC -8:00 / -7:00', 'PWT': 'UTC +9', 'PYST': 'UTC -3', 'PYT': 'UTC -4', 'Q': 'UTC -4', 'QYZT': 'UTC +6', 'R': 'UTC -5', 'RET': 'UTC +4', 'ROTT': 'UTC -3', 'S': 'UTC -6', 'SAKT': 'UTC +11', 'SAMT': 'UTC +4', 'SAST': 'UTC +2', 'SBT': 'UTC +11', 'SCT': 'UTC +4', 'SGT': 'UTC +8', 'SRET': 'UTC +11', 'SRT': 'UTC -3', 'SST': 'UTC -11', 'SYOT': 'UTC +3', 'T': 'UTC -7', 'TAHT': 'UTC -10', 'TFT': 'UTC +5', 'TJT': 'UTC +5', 'TKT': 'UTC +13', 'TLT': 'UTC +9', 'TMT': 'UTC +5', 'TOST': 'UTC +14', 'TOT': 'UTC +13', 'TRT': 'UTC +3', 'TVT': 'UTC +12', 'U': 'UTC -8', 'ULAST': 'UTC +9', 'ULAT': 'UTC +8', 'UTC': 'UTC', 'UYST': 'UTC -2', 'UYT': 'UTC -3', 'UZT': 'UTC +5', 'V': 'UTC -9', 'VET': 'UTC -4', 'VLAST': 'UTC +11', 'VLAT': 'UTC +10', 'VOST': 'UTC +6', 'VUT': 'UTC +11', 'W': 'UTC -10', 'WAKT': 'UTC +12', 'WARST': 'UTC -3', 'WAST': 'UTC +2', 'WAT': 'UTC +1', 'WEST': 'UTC +1', 'WET': 'UTC +0', 'WFT': 'UTC +12', 'WGST': 'UTC -2', 'WGT': 'UTC -3', 'WIB': 'UTC +7', 'WIT': 'UTC +9', 'WITA': 'UTC +8', 'WST': 'UTC +14', 'WT': 'UTC +0', 'X': 'UTC -11', 'Y': 'UTC -12', 'YAKST': 'UTC +10', 'YAKT': 'UTC +9', 'YAPT': 'UTC +10', 'YEKST': 'UTC +6', 'YEKT': 'UTC +5', 'Z': 'UTC +0'} |
# open file
func=open("func.txt","r")
# split it with \n
func_list=func.read().split("\n")
new_list=[]
# remove len 0 to 31 and store it in new list
for a in range(len(func_list)):
b=func_list[a][36:]
if len(b)>0:
new_list.append(b)
# short it with sorting algorithm
new_list=sorted(new_list)
# sorting the number behind ')' and print new_list[a]
for a in range(len(new_list)):
b=new_list[a].split(")")
new_list[a]=b[0]
# make new_list[a] to int
for a in range(len(new_list)):
new_list[a]=int(new_list[a])
new_list=sorted(new_list)
#for i in range(len(new_list)):
# print(str(new_list[i])+"\n")
file=open("func.txt","r")
file=file.read()
var_decode=[]
for i in new_list:
# if there exist text i shomewhere in file_list
if file.find(str(i))!=-1:
# find the text and store it in var_decode
print(file[file.find(str(i))+29:file.find(str(i))+30],end="")
#file_run=open("run.txt","r")
#file_run=file_run.read().replace("();","")
#file_run=file_run.split("\n")
#true_decode=[]
#for i in file_run:
# # if there exist text i shomewhere in file_list
# if file.find(str(i))!=-1:
# # find the text and store it in var_decode
# print(file[file.find(str(i)):file.find(str(i))+60])
#var_num=0
#for i in true_decode:
# print(true_decode[var_num][true_decode[var_num].find("'")+1:true_decode[var_num].find(str("'"))+2],end="")
# var_num+=1 | func = open('func.txt', 'r')
func_list = func.read().split('\n')
new_list = []
for a in range(len(func_list)):
b = func_list[a][36:]
if len(b) > 0:
new_list.append(b)
new_list = sorted(new_list)
for a in range(len(new_list)):
b = new_list[a].split(')')
new_list[a] = b[0]
for a in range(len(new_list)):
new_list[a] = int(new_list[a])
new_list = sorted(new_list)
file = open('func.txt', 'r')
file = file.read()
var_decode = []
for i in new_list:
if file.find(str(i)) != -1:
print(file[file.find(str(i)) + 29:file.find(str(i)) + 30], end='') |
"""
0356. Line Reflection
Medium
Given n points on a 2D plane, find if there is such a line parallel to y-axis that reflect the given points symmetrically, in other words, answer whether or not if there exists a line that after reflecting all points over the given line the set of the original points is the same that the reflected ones.
Note that there can be repeated points.
Follow up:
Could you do better than O(n2) ?
Example 1:
Input: points = [[1,1],[-1,1]]
Output: true
Explanation: We can choose the line x = 0.
Example 2:
Input: points = [[1,1],[-1,-1]]
Output: false
Explanation: We can't choose a line.
Constraints:
n == points.length
1 <= n <= 10^4
-10^8 <= points[i][j] <= 10^8
"""
class Solution:
def isReflected(self, points: List[List[int]]) -> bool:
if not points: return True
X = min(points)[0] + max(points)[0]
return set(map(tuple, points)) == {(X - x, y) for x, y in points}
class Solution:
def isReflected(self, points: List[List[int]]) -> bool:
if not points: return True
X = min(points)[0] + max(points)[0]
return {(x, y) for x, y in points} == {(X - x, y) for x, y in points}
| """
0356. Line Reflection
Medium
Given n points on a 2D plane, find if there is such a line parallel to y-axis that reflect the given points symmetrically, in other words, answer whether or not if there exists a line that after reflecting all points over the given line the set of the original points is the same that the reflected ones.
Note that there can be repeated points.
Follow up:
Could you do better than O(n2) ?
Example 1:
Input: points = [[1,1],[-1,1]]
Output: true
Explanation: We can choose the line x = 0.
Example 2:
Input: points = [[1,1],[-1,-1]]
Output: false
Explanation: We can't choose a line.
Constraints:
n == points.length
1 <= n <= 10^4
-10^8 <= points[i][j] <= 10^8
"""
class Solution:
def is_reflected(self, points: List[List[int]]) -> bool:
if not points:
return True
x = min(points)[0] + max(points)[0]
return set(map(tuple, points)) == {(X - x, y) for (x, y) in points}
class Solution:
def is_reflected(self, points: List[List[int]]) -> bool:
if not points:
return True
x = min(points)[0] + max(points)[0]
return {(x, y) for (x, y) in points} == {(X - x, y) for (x, y) in points} |
#
# PySNMP MIB module CPM-NORTEL-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CPM-NORTEL-MIB
# Produced by pysmi-0.3.4 at Wed May 1 12:27:09 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
Integer, ObjectIdentifier, OctetString = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsUnion, ValueRangeConstraint, ValueSizeConstraint, SingleValueConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ValueRangeConstraint", "ValueSizeConstraint", "SingleValueConstraint", "ConstraintsIntersection")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
MibIdentifier, Integer32, Bits, IpAddress, enterprises, Counter64, NotificationType, ModuleIdentity, TimeTicks, Unsigned32, ObjectIdentity, Gauge32, Counter32, MibScalar, MibTable, MibTableRow, MibTableColumn, iso = mibBuilder.importSymbols("SNMPv2-SMI", "MibIdentifier", "Integer32", "Bits", "IpAddress", "enterprises", "Counter64", "NotificationType", "ModuleIdentity", "TimeTicks", "Unsigned32", "ObjectIdentity", "Gauge32", "Counter32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "iso")
DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention")
nortel = ModuleIdentity((1, 3, 6, 1, 4, 1, 562))
if mibBuilder.loadTexts: nortel.setLastUpdated('9906231337Z')
if mibBuilder.loadTexts: nortel.setOrganization('Nortel Networks')
if mibBuilder.loadTexts: nortel.setContactInfo('Nortel Customer Support Nortel Networks E-Mail: joedev@nortel.ca')
if mibBuilder.loadTexts: nortel.setDescription('')
dialaccess = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 14))
mibBuilder.exportSymbols("CPM-NORTEL-MIB", dialaccess=dialaccess, nortel=nortel, PYSNMP_MODULE_ID=nortel)
| (integer, object_identifier, octet_string) = mibBuilder.importSymbols('ASN1', 'Integer', 'ObjectIdentifier', 'OctetString')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_union, value_range_constraint, value_size_constraint, single_value_constraint, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsUnion', 'ValueRangeConstraint', 'ValueSizeConstraint', 'SingleValueConstraint', 'ConstraintsIntersection')
(module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup')
(mib_identifier, integer32, bits, ip_address, enterprises, counter64, notification_type, module_identity, time_ticks, unsigned32, object_identity, gauge32, counter32, mib_scalar, mib_table, mib_table_row, mib_table_column, iso) = mibBuilder.importSymbols('SNMPv2-SMI', 'MibIdentifier', 'Integer32', 'Bits', 'IpAddress', 'enterprises', 'Counter64', 'NotificationType', 'ModuleIdentity', 'TimeTicks', 'Unsigned32', 'ObjectIdentity', 'Gauge32', 'Counter32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'iso')
(display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention')
nortel = module_identity((1, 3, 6, 1, 4, 1, 562))
if mibBuilder.loadTexts:
nortel.setLastUpdated('9906231337Z')
if mibBuilder.loadTexts:
nortel.setOrganization('Nortel Networks')
if mibBuilder.loadTexts:
nortel.setContactInfo('Nortel Customer Support Nortel Networks E-Mail: joedev@nortel.ca')
if mibBuilder.loadTexts:
nortel.setDescription('')
dialaccess = mib_identifier((1, 3, 6, 1, 4, 1, 562, 14))
mibBuilder.exportSymbols('CPM-NORTEL-MIB', dialaccess=dialaccess, nortel=nortel, PYSNMP_MODULE_ID=nortel) |
#! /usr/bin/python3
input = open("input/01.txt").read()
floor = input.count("(") - input.count(")")
print(floor)
floor = 0
for i, a in enumerate(input):
floor = floor + (1 if a == '(' else - 1)
if floor == -1:
print(i + 1)
break
| input = open('input/01.txt').read()
floor = input.count('(') - input.count(')')
print(floor)
floor = 0
for (i, a) in enumerate(input):
floor = floor + (1 if a == '(' else -1)
if floor == -1:
print(i + 1)
break |
def generateClassId(classIds, firstName, lastName, subjectId):
initials = (firstName[0] + lastName[0: 2]).upper()
classId = f"{subjectId}-{initials}-A"
suffix = ord("B")
while classId in classIds:
classId = classId[0: -1] + chr(suffix)
suffix += 1
return classId
| def generate_class_id(classIds, firstName, lastName, subjectId):
initials = (firstName[0] + lastName[0:2]).upper()
class_id = f'{subjectId}-{initials}-A'
suffix = ord('B')
while classId in classIds:
class_id = classId[0:-1] + chr(suffix)
suffix += 1
return classId |
# These dictionaries are applied to the generated enums dictionary at build time
# Any changes to the API should be made here. attributes.py is code generated
# We are not code genning enums that have been marked as obsolete prior to the initial
# Python API bindings release
# We also do not codegen enums associated with P2P or External Calibration since neither
# are supported in Python
enums_codegen_method = {
'CalADCInput': { 'codegen_method': 'no', }, # Calibration Enum - not supported in Python
}
enums_additional_enums = {
'RelativeTo': {
'values': [
{
'name': 'NIFGEN_VAL_WAVEFORM_POSITION_START',
'value': 0,
},
{
'name': 'NIFGEN_VAL_WAVEFORM_POSITION_CURRENT',
'value': 1,
},
],
},
'TriggerWhen': {
'values': [
{
'name': 'NIFGEN_VAL_ACTIVE_HIGH',
'value': 101,
},
{
'name': 'NIFGEN_VAL_ACTIVE_LOW',
'value': 102,
},
],
},
'ByteOrder': {
'values': [
{
'name': 'NIFGEN_VAL_LITTLE_ENDIAN',
'value': 0,
},
{
'name': 'NIFGEN_VAL_BIG_ENDIAN',
'value': 1,
},
],
},
'Signal': {
'values': [
{
'name': 'NIFGEN_VAL_ONBOARD_REFERENCE_CLOCK',
'value': 1019,
},
{
'name': 'NIFGEN_VAL_SYNC_OUT',
'value': 1002,
},
{
'name': 'NIFGEN_VAL_START_TRIGGER',
'value': 1004,
},
{
'name': 'NIFGEN_VAL_MARKER_EVENT',
'value': 1001,
},
{
'name': 'NIFGEN_VAL_SAMPLE_CLOCK_TIMEBASE',
'value': 1006,
},
{
'name': 'NIFGEN_VAL_SYNCHRONIZATION',
'value': 1007,
},
{
'name': 'NIFGEN_VAL_SAMPLE_CLOCK',
'value': 101,
},
{
'name': 'NIFGEN_VAL_REFERENCE_CLOCK',
'value': 102,
},
{
'name': 'NIFGEN_VAL_SCRIPT_TRIGGER',
'value': 103,
},
{
'name': 'NIFGEN_VAL_READY_FOR_START_EVENT',
'value': 105,
},
{
'name': 'NIFGEN_VAL_STARTED_EVENT',
'value': 106,
},
{
'name': 'NIFGEN_VAL_DONE_EVENT',
'value': 107,
},
{
'name': 'NIFGEN_VAL_DATA_MARKER_EVENT',
'value': 108,
},
],
},
'HardwareState': {
'values': [
{
'name': 'NIFGEN_VAL_IDLE',
'value': 0,
},
{
'name': 'NIFGEN_VAL_WAITING_FOR_START_TRIGGER',
'value': 1,
},
{
'name': 'NIFGEN_VAL_RUNNING',
'value': 2,
},
{
'name': 'NIFGEN_VAL_DONE',
'value': 3,
},
{
'name': 'NIFGEN_VAL_HARDWARE_ERROR',
'value': 4,
},
],
},
}
# TODO(bhaswath): Move this enum together with other enums once Issue #624 is fixed.
replacement_enums = {
'Trigger': {
'values': [
{
'name': 'NIFGEN_VAL_START_TRIGGER',
'value': 1004,
},
{
'name': 'NIFGEN_VAL_SCRIPT_TRIGGER',
'value': 103,
},
],
},
}
| enums_codegen_method = {'CalADCInput': {'codegen_method': 'no'}}
enums_additional_enums = {'RelativeTo': {'values': [{'name': 'NIFGEN_VAL_WAVEFORM_POSITION_START', 'value': 0}, {'name': 'NIFGEN_VAL_WAVEFORM_POSITION_CURRENT', 'value': 1}]}, 'TriggerWhen': {'values': [{'name': 'NIFGEN_VAL_ACTIVE_HIGH', 'value': 101}, {'name': 'NIFGEN_VAL_ACTIVE_LOW', 'value': 102}]}, 'ByteOrder': {'values': [{'name': 'NIFGEN_VAL_LITTLE_ENDIAN', 'value': 0}, {'name': 'NIFGEN_VAL_BIG_ENDIAN', 'value': 1}]}, 'Signal': {'values': [{'name': 'NIFGEN_VAL_ONBOARD_REFERENCE_CLOCK', 'value': 1019}, {'name': 'NIFGEN_VAL_SYNC_OUT', 'value': 1002}, {'name': 'NIFGEN_VAL_START_TRIGGER', 'value': 1004}, {'name': 'NIFGEN_VAL_MARKER_EVENT', 'value': 1001}, {'name': 'NIFGEN_VAL_SAMPLE_CLOCK_TIMEBASE', 'value': 1006}, {'name': 'NIFGEN_VAL_SYNCHRONIZATION', 'value': 1007}, {'name': 'NIFGEN_VAL_SAMPLE_CLOCK', 'value': 101}, {'name': 'NIFGEN_VAL_REFERENCE_CLOCK', 'value': 102}, {'name': 'NIFGEN_VAL_SCRIPT_TRIGGER', 'value': 103}, {'name': 'NIFGEN_VAL_READY_FOR_START_EVENT', 'value': 105}, {'name': 'NIFGEN_VAL_STARTED_EVENT', 'value': 106}, {'name': 'NIFGEN_VAL_DONE_EVENT', 'value': 107}, {'name': 'NIFGEN_VAL_DATA_MARKER_EVENT', 'value': 108}]}, 'HardwareState': {'values': [{'name': 'NIFGEN_VAL_IDLE', 'value': 0}, {'name': 'NIFGEN_VAL_WAITING_FOR_START_TRIGGER', 'value': 1}, {'name': 'NIFGEN_VAL_RUNNING', 'value': 2}, {'name': 'NIFGEN_VAL_DONE', 'value': 3}, {'name': 'NIFGEN_VAL_HARDWARE_ERROR', 'value': 4}]}}
replacement_enums = {'Trigger': {'values': [{'name': 'NIFGEN_VAL_START_TRIGGER', 'value': 1004}, {'name': 'NIFGEN_VAL_SCRIPT_TRIGGER', 'value': 103}]}} |
def product(factor1, factor2):
resultaat = factor1 * factor2
return resultaat
print("Unittest van 'product'")
assert product(9, 3) == 27, "Berekening van 'product' bevat een fout"
assert product(0, 0) == 0, "Fout bij berekenen 0 waarde"
assert product(1000, 1000) == 100000, "Fout bij berekenen grote waarde"
| def product(factor1, factor2):
resultaat = factor1 * factor2
return resultaat
print("Unittest van 'product'")
assert product(9, 3) == 27, "Berekening van 'product' bevat een fout"
assert product(0, 0) == 0, 'Fout bij berekenen 0 waarde'
assert product(1000, 1000) == 100000, 'Fout bij berekenen grote waarde' |
def pallindrome(z):
mid = (len(z)-1)//2
start = 0
last = len(z) - 1
flag = 0
while(start < mid):
if(z[start]== z[last]):
start += 1
last -= 1
else:
flag = 1
break;
if flag == 0:
print("The entered string is pallindrome")
else:
print("The entered string is not pallindrome")
def symmetry(z):
n = len(z)
flag = 0
if n % 2:
mid = n//2 + 1
else:
mid = n//2
start1 = 0
start2 = mid
while(start1 < mid and start2 < n):
if(z[start1] == z[start2]):
start1 = start1 + 1
start2 = start2 + 1
else:
flag = 1
break
if flag == 0:
print("The entered string is symmetrical")
else:
print("The entered string is not symmetrical")
string = 'soumyo amamama'
pallindrome(string)
symmetry(string) | def pallindrome(z):
mid = (len(z) - 1) // 2
start = 0
last = len(z) - 1
flag = 0
while start < mid:
if z[start] == z[last]:
start += 1
last -= 1
else:
flag = 1
break
if flag == 0:
print('The entered string is pallindrome')
else:
print('The entered string is not pallindrome')
def symmetry(z):
n = len(z)
flag = 0
if n % 2:
mid = n // 2 + 1
else:
mid = n // 2
start1 = 0
start2 = mid
while start1 < mid and start2 < n:
if z[start1] == z[start2]:
start1 = start1 + 1
start2 = start2 + 1
else:
flag = 1
break
if flag == 0:
print('The entered string is symmetrical')
else:
print('The entered string is not symmetrical')
string = 'soumyo amamama'
pallindrome(string)
symmetry(string) |
class Student1:
def __init__(self,a=10,b=20):
self.add=a+b
self.sub=a-b
def result(self):
print("Sum is: ",self.add)
print("Sub is: ",self.sub)
| class Student1:
def __init__(self, a=10, b=20):
self.add = a + b
self.sub = a - b
def result(self):
print('Sum is: ', self.add)
print('Sub is: ', self.sub) |
FACTOR_RULES = "rules_factor"
TOPIC_RULES = "rules_topic"
TOPIC_RULE = "topic_rule"
FACTOR_RULE = "factor_rule"
MONITOR_RULES = "monitor_rules"
| factor_rules = 'rules_factor'
topic_rules = 'rules_topic'
topic_rule = 'topic_rule'
factor_rule = 'factor_rule'
monitor_rules = 'monitor_rules' |
var = 0
def foo():
var = 2
print(var)
def fua():
var = 1
def fup():
global var
var = 42
print(foo())
print()
fua()
print(var)
fup()
print(var)
| var = 0
def foo():
var = 2
print(var)
def fua():
var = 1
def fup():
global var
var = 42
print(foo())
print()
fua()
print(var)
fup()
print(var) |
class PaginationKeys(object):
PAGE = 'page'
COUNT = 'count'
TOTAL = 'total'
SHOW = 'show'
DATA = 'data'
ITEMS_PER_PAGE = 25
| class Paginationkeys(object):
page = 'page'
count = 'count'
total = 'total'
show = 'show'
data = 'data'
items_per_page = 25 |
"""
@author nghiatc
@since 06/01/2021
"""
| """
@author nghiatc
@since 06/01/2021
""" |
s = float(0)
for i in range(1, 101):
s = float(s + float(1) / float(i))
print(f"{s:.2f}")
| s = float(0)
for i in range(1, 101):
s = float(s + float(1) / float(i))
print(f'{s:.2f}') |
class MyList(list):
pass
def main():
my_list = MyList()
my_list.append('a')
my_list.append('b')
print(my_list[0])
print(my_list[1])
if __name__ == "__main__":
main() | class Mylist(list):
pass
def main():
my_list = my_list()
my_list.append('a')
my_list.append('b')
print(my_list[0])
print(my_list[1])
if __name__ == '__main__':
main() |
def for_D():
"""printing capital 'D' using for loop"""
for row in range(4):
for col in range(4):
if col==0 or row==0 and col!=3 or row==3 and col!=3 or col==3 and row in(1,2):
print("*",end=" ")
else:
print(" ",end=" ")
print()
def while_D():
"""printing capital 'D' using while loop"""
i=0
while i<4:
j=0
while j<4:
if j==0 or i==0 and j!=3 or i==3 and j!=3 or j==3 and i%3!=0:
print("*",end=" ")
else:
print(" ",end=" ")
j+=1
i+=1
print()
| def for_d():
"""printing capital 'D' using for loop"""
for row in range(4):
for col in range(4):
if col == 0 or (row == 0 and col != 3) or (row == 3 and col != 3) or (col == 3 and row in (1, 2)):
print('*', end=' ')
else:
print(' ', end=' ')
print()
def while_d():
"""printing capital 'D' using while loop"""
i = 0
while i < 4:
j = 0
while j < 4:
if j == 0 or (i == 0 and j != 3) or (i == 3 and j != 3) or (j == 3 and i % 3 != 0):
print('*', end=' ')
else:
print(' ', end=' ')
j += 1
i += 1
print() |
class AbstractRegulator:
"""Models the genetic regulation of cells. This class exists only
to document the required interface. (There is no need to inherit
from it.)
"""
def __init__(self, simulator):
"""Reference to Simulator required.
simulator -- The Simulator object containing CellStates.
Should be used to access current cell states and other
simulation parameters
"""
raise NotImplementedError()
def update(self, dt):
"""Step the simulation forward.
dt -- Time to step forward.
"""
raise NotImplementedError()
def setBiophysics(self, biophysics):
"""Set the biophysical model to be used by this regulator.
biophysics -- A biophysical model.
"""
raise NotImplementedError()
def setSignalling(self, signalling):
"""Set the signalling model to be used by this regulator.
signalling -- A signalling model.
"""
raise NotImplementedError()
def addCell(self, cellState):
"""Add a cell to the model.
cellState -- The state of the new cell. Id should be unique.
"""
raise NotImplementedError()
def parameters(self, cellState):
"""Return the parameters for the biophysical model of a cell.
cellState -- The state of the cell to return the parameters of.
"""
raise NotImplementedError()
def speciesRates(self, cellState, speciesLevels, signalLevels):
"""Return rates of species production (dydt) by a cell,
given species and signal levels (y) supplied. I.e. dydt(y)
Must return rates in a numpy array
cellState -- The state of the cell to return rates of.
speciesLevels -- Levels of species in the cell.
signalLevels -- Levels of signals in the vicinity of the cell.
"""
raise NotImplementedError()
def signalRates(self, cellState, speciesLevels, signalLevels):
"""Return rates of signal production (dydt) by a cell,
given species and signal levels (y) supplied. I.e. dydt(y)
Must return rates in a numpy array
cellState -- The state of the cell to return rates of.
speciesLevels -- Levels of species in the cell.
signalLevels -- Levels of signals in the vicinity of the cell.
"""
raise NotImplementedError()
def initSpeciesLevels(levels):
"""Set the initial species levels for time step to current levels.
Write directly into levels array.
levels -- the array stored by integrator
"""
raise NotImplementedError()
def isDividing(self, cellState):
"""Return True if this cell is dividing.
cellState -- The state of the cell to return the division status of.
"""
raise NotImplementedError()
def divide(self, parent_id, daughter_id1, daughter_id2):
"""Divide a cell.
parent_id -- The id of the cell to divide.
daughter_id1 -- The id of the first daughter cell. Should be unique.
daughter_id2 -- The id of the second daughter cell. Should be unique.
"""
raise NotImplementedError()
| class Abstractregulator:
"""Models the genetic regulation of cells. This class exists only
to document the required interface. (There is no need to inherit
from it.)
"""
def __init__(self, simulator):
"""Reference to Simulator required.
simulator -- The Simulator object containing CellStates.
Should be used to access current cell states and other
simulation parameters
"""
raise not_implemented_error()
def update(self, dt):
"""Step the simulation forward.
dt -- Time to step forward.
"""
raise not_implemented_error()
def set_biophysics(self, biophysics):
"""Set the biophysical model to be used by this regulator.
biophysics -- A biophysical model.
"""
raise not_implemented_error()
def set_signalling(self, signalling):
"""Set the signalling model to be used by this regulator.
signalling -- A signalling model.
"""
raise not_implemented_error()
def add_cell(self, cellState):
"""Add a cell to the model.
cellState -- The state of the new cell. Id should be unique.
"""
raise not_implemented_error()
def parameters(self, cellState):
"""Return the parameters for the biophysical model of a cell.
cellState -- The state of the cell to return the parameters of.
"""
raise not_implemented_error()
def species_rates(self, cellState, speciesLevels, signalLevels):
"""Return rates of species production (dydt) by a cell,
given species and signal levels (y) supplied. I.e. dydt(y)
Must return rates in a numpy array
cellState -- The state of the cell to return rates of.
speciesLevels -- Levels of species in the cell.
signalLevels -- Levels of signals in the vicinity of the cell.
"""
raise not_implemented_error()
def signal_rates(self, cellState, speciesLevels, signalLevels):
"""Return rates of signal production (dydt) by a cell,
given species and signal levels (y) supplied. I.e. dydt(y)
Must return rates in a numpy array
cellState -- The state of the cell to return rates of.
speciesLevels -- Levels of species in the cell.
signalLevels -- Levels of signals in the vicinity of the cell.
"""
raise not_implemented_error()
def init_species_levels(levels):
"""Set the initial species levels for time step to current levels.
Write directly into levels array.
levels -- the array stored by integrator
"""
raise not_implemented_error()
def is_dividing(self, cellState):
"""Return True if this cell is dividing.
cellState -- The state of the cell to return the division status of.
"""
raise not_implemented_error()
def divide(self, parent_id, daughter_id1, daughter_id2):
"""Divide a cell.
parent_id -- The id of the cell to divide.
daughter_id1 -- The id of the first daughter cell. Should be unique.
daughter_id2 -- The id of the second daughter cell. Should be unique.
"""
raise not_implemented_error() |
#!python2.7
# -*- coding: utf-8 -*-
"""
Created by kun on 2016/7/29.
"""
__author__ = 'kun'
class RecommenderEvaluator(object):
"""
Basic Interface which is responsible to evaluate the quality of Recommender
recommendations. The range of values that may be returned depends on the
implementation. but lower values must mean better recommendations, with 0
being the lowest / best possible evaluation, meaning a perfect match.
"""
def evaluate(self, recommender, metrics=None, **kwargs):
raise NotImplementedError("cannot instantiate Abstract Base Class")
def evaluate_online(self, metrics=None, **kwargs):
raise NotImplementedError("cannot instantiate Abstract Base Class")
def evaluate_on_split(self, metrics=None, **kwargs):
raise NotImplementedError("cannot instantiate Abstract Base Class")
| """
Created by kun on 2016/7/29.
"""
__author__ = 'kun'
class Recommenderevaluator(object):
"""
Basic Interface which is responsible to evaluate the quality of Recommender
recommendations. The range of values that may be returned depends on the
implementation. but lower values must mean better recommendations, with 0
being the lowest / best possible evaluation, meaning a perfect match.
"""
def evaluate(self, recommender, metrics=None, **kwargs):
raise not_implemented_error('cannot instantiate Abstract Base Class')
def evaluate_online(self, metrics=None, **kwargs):
raise not_implemented_error('cannot instantiate Abstract Base Class')
def evaluate_on_split(self, metrics=None, **kwargs):
raise not_implemented_error('cannot instantiate Abstract Base Class') |
class Solution:
def reachingPoints(self, sx, sy, tx, ty):
"""
:type sx: int
:type sy: int
:type tx: int
:type ty: int
:rtype: bool
"""
if sx == tx and sy == ty:
return True
elif tx == ty or sx > tx or sy > ty:
return False
elif tx > ty:
subtract = max(1, (tx - sx) // ty)
return self.reachingPoints(sx, sy, tx-ty*subtract, ty)
else:
subtract = max(1, (ty - sy) // tx)
return self.reachingPoints(sx, sy, tx, ty-tx*subtract)
| class Solution:
def reaching_points(self, sx, sy, tx, ty):
"""
:type sx: int
:type sy: int
:type tx: int
:type ty: int
:rtype: bool
"""
if sx == tx and sy == ty:
return True
elif tx == ty or sx > tx or sy > ty:
return False
elif tx > ty:
subtract = max(1, (tx - sx) // ty)
return self.reachingPoints(sx, sy, tx - ty * subtract, ty)
else:
subtract = max(1, (ty - sy) // tx)
return self.reachingPoints(sx, sy, tx, ty - tx * subtract) |
n = int(input())
for i in range(n + 1, 2 * n):
j = 2
while j * j <= i:
if i % j == 0:
break
j += 1
else:
print('YES')
print(i)
exit()
print('NO')
| n = int(input())
for i in range(n + 1, 2 * n):
j = 2
while j * j <= i:
if i % j == 0:
break
j += 1
else:
print('YES')
print(i)
exit()
print('NO') |
def is_prime(a):
for j in range(2, a):
if a % j == 0:
return False
return True
answer = []
for i in range(2, 101):
if is_prime(i):
answer.append(str(i))
print(" ".join(answer))
# is_first = True
# for i in range(2, 101):
# if is_prime(i):
# if is_first:
# is_first = False
# else:
# print(" ", end="")
# print(f"{i}", end="")
| def is_prime(a):
for j in range(2, a):
if a % j == 0:
return False
return True
answer = []
for i in range(2, 101):
if is_prime(i):
answer.append(str(i))
print(' '.join(answer)) |
"""
Class for computing heat duty
This class performs simple thermodynamic calculations
to allow for heat duty and temperature change calculations.
Perfect heaters:
* You can specify a heat duty, and see what the final temperature is
* You can specify a final temperatue, and see what the heat duty required is
Heat loss heaters:
* You can specify a heat tansfer coefficient, and do same as above
* You can specify a heat loss percentage, and do same as above
"""
| """
Class for computing heat duty
This class performs simple thermodynamic calculations
to allow for heat duty and temperature change calculations.
Perfect heaters:
* You can specify a heat duty, and see what the final temperature is
* You can specify a final temperatue, and see what the heat duty required is
Heat loss heaters:
* You can specify a heat tansfer coefficient, and do same as above
* You can specify a heat loss percentage, and do same as above
""" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.