This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import zmq, os | |
times = {} | |
reaction = {} | |
done = {} | |
number_of_tasks = 1.0 | |
mean = lambda l: sum(l)/len(l) | |
def actuality(t): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def visualize(node, edges, done = [], depth = ()): | |
# Edge = namedtuple('Edge', 'source, dest') | |
paths = [e for e in edges if getattr(e, 'source') == node] | |
for edge in paths: | |
for d in depth: | |
if not d: | |
print '│', | |
else: | |
print ' ', | |
# is current path last in source's paths |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from collections import namedtuple | |
def f_t(k = None, mu = None): | |
if k: | |
return 'const('+str(k)+')' | |
elif mu: | |
return 'gauss('+str(mu)+')' | |
DEVICES = 'CPU, NBr1, SBr1, ISA1, COM, ISA2, USB, ATA, VGA, SBr2, RAM, GPU, NBr2' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#include <iostream> | |
#include <string> | |
#include <vector> | |
#include "mathskills.h" | |
using namespace std; | |
using namespace mathskills; | |
DWORD WINAPI ThreadOne(LPVOID lpParameter) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
# Лабораторная работа №2 по курсу "Компьютерное моделирование" | |
# тема "Моделирование загрузки компьютерной системы" | |
# выполнил ст.3 к. ФIОТ, гр. IO-03 Веринов Антон | |
# Вариант: 3 задачи, 1 ядро; ГП, ВП, ISA, COM | |
from random import gauss, random | |
from operator import attrgetter, ne |
NewerOlder