Skip to content

Instantly share code, notes, and snippets.

View prices.py
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 Jul 6, 2017
timewaste
View waste.py
from time import time, sleep, ctime
from os import system
import sys
total = 0.0
working = True
def t():
@lotka
lotka / bah.sh
Created Jul 3, 2017
notebook theme
View bah.sh
sudo jt -t onedork -cellw 90% -NT -ofs 12 -fs 13
View fib.ipynb
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 Feb 6, 2017
python functions
View pairgen.py
# 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)
View useful.html
<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 Nov 18, 2016
Two functions for collapsing links which are defined as python lists
View links.py
@lotka
lotka / links.py
Created Nov 18, 2016
Two functions for collapsing links which are defined as python lists
View links.py
View autocompile.sh
#!/bin/bash
while python sleeptill.py *.tex; do ./tex.sh; done
View bounds.py
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
You can’t perform that action at this time.