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
class Node: | |
def __init__(self, name, parent): | |
self.name = name | |
self.parent = parent | |
self.children = {} | |
def addChild(self, childname, weight): | |
child = Node(childname, self) | |
self.children[childname] = { | |
"node": child, |
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
setInterval(() => {document.getElementsByClassName("recsGamepad__button--like")[0].click()}, 500); |
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
const getList = () => { | |
let elems = document.getElementsByClassName("_2nunc"); | |
elems = [...elems]; | |
elems = elems.map(elem => elem.querySelector("a").innerHTML); | |
elems = new Set(elems); | |
return elems; | |
} | |
// Open followers tab | |
const followers = getList(); |
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
# cap = augmentation de capacité | |
# (si cap = 1, on a augmenté la capacité de 1000 par heure) | |
def profit_setup(setup, profit, cost, cap, rounds): | |
# Quantité produite maximum par jour | |
dailyQ = (24000.0+cap*1000) | |
# Quantité vraiment produite avec set up time | |
Q = dailyQ-setup*dailyQ/24 - 16000 | |
# On estime la dépréciation à 417 par jour par augmentation de capacité | |
total_depreciation = rounds*417*cap |
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
from financials import valuation | |
import financials | |
requested_investment = 5e6 | |
projected_sales_y7 = 20e6 | |
projected_PE = 15 | |
MARR = .5 | |
shares = 5e5 |
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
const play = () => { | |
document.querySelector('video').play(); | |
}; | |
const launch = () => { | |
const now = new Date(), | |
delay = 60000 - now % 60000; | |
setTimeout(play, delay); | |
} |
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
const B1 = account.GBP * EURGBP * USDEUR; | |
const B2 = account.GBP * GBPUSD; | |
if (B1 - B2 > 100) { | |
buy('USDGBP', account.GBP - 1000); | |
buy('EURUSD', account.USD - 1000); | |
buy('GPBEUR', account.EUR - 1000); | |
} | |
if (B2 - B1 < -100) { |
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
bounds1 = ('9:00', '20:00') | |
c1 = [('9:00', '10:30'), ('12:00', '13:00'), ('16:00', '18:00')] | |
c2 = [('10:00', '11:30'), ('12:30', '14:30'), ('14:30', '15:00'), ('16:00', '17:00')] | |
bounds2 = ('10:00', '18:30') | |
def parse_date(date: str): | |
h, m = map(int,date.split(":")) | |
return 100*h + m | |
def parse_period(period): |
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
function forEach(arr, func) { | |
const len = arr.length; | |
for(let i = 0; i < len; ++i) func(arr[i]) | |
} | |
const l = [1,2,3,4,5]; | |
function logTimes2(x) { | |
console.log(x*2); | |
} |
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 numpy as np | |
from numpy.random import uniform, randint | |
from typing import Tuple, List, Set | |
class Agent: | |
def __init__(self, x: float, y: float, contamined: bool): | |
self.__x: float = x | |
self.__y: float = y | |
self.__contamined: bool = False | |
self.__days_contamined: int = 0 |
OlderNewer