Skip to content

Instantly share code, notes, and snippets.

@doodzik
doodzik / btc_usd.csv
Created December 28, 2021 07:04
secretary problem for bitcoin and spy
Unix Timestamp Date Symbol Open High Low Close Volume
1640491200000 2021-12-26 04:00:00 BTCUSD 49705.21 51294.26 49460.66 50914.65 417.34578421
1640404800000 2021-12-25 04:00:00 BTCUSD 50872.31 51156.95 49656.65 49705.21 400.67022775
1640318400000 2021-12-24 04:00:00 BTCUSD 51067.84 51866.86 50461.08 50872.31 558.11781094
1640232000000 2021-12-23 04:00:00 BTCUSD 48545.38 51533.71 48072.35 51067.84 1001.25508859
1640145600000 2021-12-22 04:00:00 BTCUSD 49263.44 49548.86 48063.36 48545.38 726.80067593
1640059200000 2021-12-21 04:00:00 BTCUSD 47954.56 49598.11 47948.07 49263.44 1235.89135068
1639972800000 2021-12-20 04:00:00 BTCUSD 46709.08 48082.61 45579.18 47954.56 954.70290588
1639886400000 2021-12-19 04:00:00 BTCUSD 47745.99 48306.22 46255.0 46709.08 670.5182395
1639800000000 2021-12-18 04:00:00 BTCUSD 46312.19 47980.93 46100.0 47745.99 500.98151469
@doodzik
doodzik / secretary_bromskloss.py
Created November 3, 2017 17:44 — forked from anonymous/secretary_bromskloss.py
Secretary (Bromskloss)
#!/usr/bin/env python3
# coding: utf-8
from math import e
from random import shuffle
from itertools import islice
def secretary_search(candidates):
"""Rejects first n / e candidates and then selects the first
query {
search(query: "stars:>1", type: REPOSITORY, first: 100) {
edges {
cursor,
node {
... on Repository {
isPrivate,
url,
id,
hasIssuesEnabled,