Skip to content

Instantly share code, notes, and snippets.

@starenka
starenka / gist:34b8213f6592f550024570de3f2fd025
Last active December 16, 2022 00:18
quesada pasiega casera
1 reckej jogurt (cca 125g)
2 vejce
50g masla
180g (trtinovyho) cukru
150g hladky mouky
0.5l plnotucnyho mlika
skorice, citron
rozmicham jogurt s vejcema, povolenym maslem a cukrem. pridam mliko, stavu z pulky
citronu. az to bude absolutne bez hrudek, pres sitko pomalu vmichavam mouku. pridam trochu
@starenka
starenka / meh.py
Last active September 26, 2022 13:21
def run_shell_cmd(cmd, shell=False, log_errors=True):
log.debug('Running cmd %s', cmd)
cmd = shlex.split(cmd) if not shell else cmd
process = subprocess.Popen(
cmd,
shell=shell,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
universal_newlines=True)
@starenka
starenka / sfe.txt
Last active October 26, 2021 18:21
starenkovo fazolovej eintopf
-olivac
-spek
-vetsi cibule
-1.5-2 libovy klobasy (oblibuju vod Dolejsich z Davle)
-fazole typu "red kindey" (kdyz nemas/nemas namoceny, jebnes dve konzervy, ktery dost oplachnes od slizu a nikomu to nereknes)
-safran
-dve vetsi chilli (damian, nebo "od vietnamcu z vecerky")
-4 listky bobkace
-dvojka suchyho cervenyho
-cca litr vyvaru
@starenka
starenka / hpfreq.py
Created February 10, 2021 23:07
word freqs for hp1 in en, es, cs
[EN]
- unique: 4581
- most common:
Harry: 1400
say: 879
Ron: 434
look: 419
Hagrid: 371
know: 310
go: 279
In [42]: for one in hp1:
...: if 'entrecejo' in one['chunk'].text or 'esquina' in one['chunk'].text:
...: print(one)
...:
{'chunk': la esquina, 'root': 'esquina', 'dep': 'obl', 'head': 'llegar', 'root_lemma': 'esquina', 'head_lemma': 'llegar'}
{'chunk': la esquina, 'root': 'esquina', 'dep': 'obl', 'head': 'atigrado', 'root_lemma': 'esquina', 'head_lemma': 'atigrado'}
{'chunk': la esquina, 'root': 'esquina', 'dep': 'obl', 'head': 'daba', 'root_lemma': 'esquina', 'head_lemma': 'dar'}
{'chunk': la esquina, 'root': 'esquina', 'dep': 'obl', 'head': 'inmóvil', 'root_lemma': 'esquina', 'head_lemma': 'inmóvil'}
{'chunk': la esquina, 'root': 'esquina', 'dep': 'obl', 'head': 'apareció', 'root_lemma': 'esquina', 'head_lemma': 'aparecer'}
{'chunk': la esquina, 'root': 'esquina', 'dep': 'obl', 'head': 'detuvo', 'root_lemma': 'esquina', 'head_lemma': 'detener'}
# coding=utf-8
# pip install pandas xlrd
import collections
import pandas as pd
df = pd.read_excel('https://www.mvcr.cz/odk2/soubor/databaze-obci-1-1-2014-xlsx.aspx')
cleaned = []
@starenka
starenka / init.el
Created March 28, 2020 15:03
basic emacs setup
;; packaging
(require 'package)
(setq package-archives '(("gnu" . "https://elpa.gnu.org/packages/")
("melpa" . "https://melpa.org/packages/")
("melpa-stable" . "https://stable.melpa.org/packages/"))
package-archive-priorities
'(("melpa-stable" . 10)
("gnu" . 5)
("melpa" . 0)))
#!/bin/bash
[ -z "$1" ] && echo "Pass a Kodi IP" && exit 1
curl -sS -H 'Content-Type: application/json' --data-binary '{ "id": 1, "jsonrpc": "2.0", "method": "Player.Stop", "params": { "playerid": 2 } }' "http://$1/jsonrpc" -o /dev/null
# pip install requests xmltodict pandas
import datetime
import time
import os
import requests
import xmltodict
import pandas as pd
http://www.nbu.gov.sk/skcsirt-sa-20170909-pypi/
https://www.pytosquatting.org/