Skip to content

Instantly share code, notes, and snippets.

View Alerion's full-sized avatar

Dmytro Kostochko Alerion

View GitHub Profile
@Alerion
Alerion / math.txt
Last active February 14, 2017 13:05
S·T/t1 = S(T+t0)/t2
S·T/t1 = S·T/t2 + S·t0/t2
S·T/t1 - S·T/t2 = S·t0/t2
(S·T·t2 - S·T·t1)/t1·t2 = S·t0/t2
S·T(t2 - t1)/t1t2 = S·t0/t2
S·T(t2 - t1) = S·t0·t1·t2/t2
S·T(t2 - t1) = S·t0·t1
T(t2 - t1) = t0·t1
T = t0·t1/(t2 - t1)
@Alerion
Alerion / export.py
Created December 9, 2015 15:09
Export report to excel
# -*- coding: utf-8 -*-
from src.reporting.models import Report
from xlsxwriter.utility import xl_rowcol_to_cell, xl_range
class ReportData(object):
def __init__(self, project, periods):
self.project = project
self.periods = periods