Skip to content

Instantly share code, notes, and snippets.

View lotka's full-sized avatar

Luka M lotka

  • 01:51 (UTC +01:00)
View GitHub Profile
@lotka
lotka / prices.py
Created June 26, 2020 10:01
prices
from bs4 import BeautifulSoup
import requests
from time import sleep
import pandas as pd
from datetime import date
from datetime import timedelta
import pickle
from google.cloud import storage
@lotka
lotka / waste.py
Last active July 6, 2017 10:44
timewaste
from time import time, sleep, ctime
from os import system
import sys
total = 0.0
working = True
def t():
@lotka
lotka / bah.sh
Created July 3, 2017 14:16
notebook theme
sudo jt -t onedork -cellw 90% -NT -ofs 12 -fs 13
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lotka
lotka / pairgen.py
Last active February 6, 2017 16:56
python functions
# Iterate through the pairs of a list
def pair_generator(iterable):
for i in xrange(0,len(iterable)-1,1):
yield iterable[i],iterable[i+1]
# print the structure of a dictionary
def dstruct(d,n=''):
if type(d) == dict:
for k in d:
print n + str(k)
<div class="container">
<div class="row">
<div class='col-lg-6 col-md-6 col-sm-6 col-xs-12'>
<div class='panel panel-category panel2' style='border-top-color: #03a6e9'>
<div class='panel-heading' style='height:75px; color:#03a6e9'>
TITLE
</div>
<div class='panel-body' style='height:200px'>
@lotka
lotka / links.py
Last active November 18, 2016 14:26
Two functions for collapsing links which are defined as python lists
@lotka
lotka / links.py
Created November 18, 2016 14:25
Two functions for collapsing links which are defined as python lists
@lotka
lotka / autocompile.sh
Created August 21, 2016 13:20
watcher
#!/bin/bash
while python sleeptill.py *.tex; do ./tex.sh; done
from itertools import bounds
def getExperiments(bounds):
ranges=[]
for key,val in bounds.items():
min,max,n = val
values = np.linspace(min,max,n)
ranges.append(values)
# List of store all the combinations