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
""" Output: | |
T Efficiency | |
100 1.6 | |
200 5.4 | |
300 7.8 | |
400 9.6 | |
500 11.0 | |
600 12.2 | |
700 13.1 | |
""" |
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
# download https://github.com/Basistiy/duma/blob/master/data/edata.csv | |
from collections import Counter | |
import matplotlib.pyplot as plt | |
lines = open('edata.csv').readlines()[1:] | |
lines = [i.strip() for i in lines] | |
totals = [int(i.split(',')[-4]) for i in lines] | |
ers = [int(i.split(',')[-5]) for i in lines] | |
rats = [b/a*100 for a, b in zip(totals, ers) if a>0] | |
from matplotlib import pyplot |
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
ssm = 100 | |
S = ssm / (100**2) | |
sr = 0.03+math.sqrt(ssm)/2/100 | |
r = 0.03 | |
m = 0.3 | |
reff=r/2*3 | |
import math |
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 os | |
import functools | |
import operator | |
from datetime import datetime | |
from collections import defaultdict | |
import random | |
import numpy as np | |
DATE_FILTER_PATTERN = ' 12:00"' # take noon data | |
CSVS_FOLDER = 'csvs' |
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 random | |
import math | |
random.seed(1) # to make reproducible results | |
def rand(): # +/- 10 | |
return (random.random() - 0.5) * 20 | |
def avg(lst): | |
return sum(lst) / len(lst) |