Execute in the following order:
docker run -d -p 6379:6379 redis
python celery_app.py
function onOpen() { | |
var ui = DocumentApp.getUi(); | |
// Create custom menu | |
ui.createMenu('Sort and Write') | |
.addItem('Sort and Write Ascending', 'sortAndWriteAscending') | |
.addItem('Sort and Write Descending', 'sortAndWriteDescending') | |
.addToUi(); | |
} | |
function sortAndWriteAscending() { |
Execute in the following order:
docker run -d -p 6379:6379 redis
python celery_app.py
clovek | |
muz | |
zena | |
vetsina | |
otec | |
praha | |
cena | |
jan | |
matka | |
spolecnost |
// ==UserScript== | |
// @name Auto best quality for videos in Google Photos | |
// @namespace mikulas.zelinka.dev | |
// @version 0.1 | |
// @description Tampermonkey script that selects the best quality for all embedded youtube videos when the page/player is loaded (at least those that are served with the same URL as those in Google Photos). | |
// @author Mikuláš Zelinka | |
// @match https://youtube.googleapis.com/embed/* | |
// @grant none | |
// ==/UserScript== |
# python one-liner solution to https://www.youtube.com/watch?v=5GZ5IqxAt30 | |
print(next(x for x in range(1_000_000) if len([y for y in range(1, x + 1) if x % y == 0]) == 64)) |
# https://jakubroztocil.github.io/rrule/ | |
RRULE:FREQ=MONTHLY;BYDAY=TH;BYMONTHDAY=-8,-7,-6,-5,-4,-3,-2 | |
{ | |
freq: RRule.MONTHLY, | |
byweekday: [RRule.TH], | |
bymonthday: [-8, -7, -6, -5, -4, -3, -2] | |
} |
""" | |
sort-of minimal end-to-end example of handling input sequences (sentences) of variable length in pytorch | |
the sequences are considered to be sentences of words, meaning we then want to use embeddings and an RNN | |
using pytorch stuff for basically everything in the pipeline of: | |
dataset -> data_loader -> padding -> embedding -> packing -> lstm -> unpacking (~padding) | |
based mostly on: https://github.com/HarshTrivedi/packing-unpacking-pytorch-minimal-tutorial | |
pytorch version 1.4.0 | |
gist url: https://gist.github.com/MikulasZelinka/9fce4ed47ae74fca454e88a39f8d911a | |
""" |
# Game: n people, each person flips a coin until they get heads | |
# Question: what is the ratio of heads after the game ends? | |
n = 1024 | |
heads = 0 | |
tails = 0 | |
# how many rounds does each game last on average (just for fun): | |
iterations = 0 |