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
<!DOCTYPE html> | |
<html> | |
<body> | |
<script src="https://unpkg.com/@lottiefiles/lottie-player@latest/dist/lottie-player.js"></script> | |
<lottie-player src="https://assets3.lottiefiles.com/packages/lf20_hdReMa.json" background="transparent" speed="1" style="width: 300px; height: 300px;" loop controls autoplay></lottie-player> | |
</body> | |
</html> |
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
def offset_cumsum(sf, group_by, ordering, summed_column, starting_element=0, prefix='', suffix='_cumsum'): | |
import graphlab as gl | |
from copy import copy | |
from itertools import islice | |
def _cumsum(l, initial, element=lambda (_, i): i, op=lambda acc, el: acc + el): | |
prev = copy(initial) | |
yield list(l[0] + (copy(initial),)) | |
if isinstance(initial, collections.Iterable): | |
for i in islice(l, 1, None): |
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
local _aa,aaa,baa,caa=next,type,unpack,select;local daa,_ba=setmetatable,getmetatable | |
local aba,bba=table.insert,table.sort;local cba,dba=table.remove,table.concat | |
local _ca,aca,bca=math.randomseed,math.random,math.huge;local cca,dca,_da=math.floor,math.max,math.min;local ada=rawget;local bda=baa | |
local cda,dda=pairs,ipairs;local __b={}local function a_b(dab,_bb)return dab>_bb end | |
local function b_b(dab,_bb)return dab<_bb end;local function c_b(dab,_bb,abb) | |
return(dab<_bb)and _bb or(dab>abb and abb or dab)end | |
local function d_b(dab,_bb)return _bb and true end;local function _ab(dab)return not dab end;local function aab(dab)local _bb | |
for abb,bbb in cda(dab)do _bb=(_bb or 0)+1 end;return _bb end | |
local function bab(dab,_bb,abb,...)local bbb | |
local cbb=abb or __b.identity;for dbb,_cb in cda(dab)do |
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
#task is a task that is not interested in any results from other tasks | |
#callback is a task you want to call after each group is finished (ex. log time) | |
# and has to take a list of results as first arguement | |
@app.task(base=Task) | |
def task(i): | |
#do stuff | |
pass | |
@app.task(base=Task) |