I hereby claim:
- I am alex-shpilkin on github.
- I am alexshpilkin (https://keybase.io/alexshpilkin) on keybase.
- I have a public key ASAbZo8Qp8U-zCBRPlyofF38flV9f0EAAp_LQXFMwtwrgwo
To claim this, I am signing this object:
#!/bin/sh -eu | |
set -o pipefail # FIXME bashism | |
pdftotext -q -layout "$1" - \ | |
| iconv -t iso8859-1//translit | iconv -f georgian-ps \ | |
| "$0.post" |
#!/bin/sh -eu | |
set -o pipefail | |
# mkdir sub; for file in *.mp4; do n=${file#*#}; n=${n%% *}; mv "$file" "sub/$(printf '%02d - Episode %d.mp4' $n $n)"; done | |
myvi() { | |
youtube-dl -c -R inf --socket-timeout 1 -o "$2" $( | |
curl -sS 'http://animeonline.su/zend/anime/myvi/index/id/'"$1" \ | |
| sed -Ene 's/.*"url": +"([^"]*)".*/\1/p' | head -1 \ | |
| sed 's|player/embed/html|watch|' |
#!/bin/sh -eu | |
set -o pipefail | |
temp=$(mktemp) | |
trap "rm -f '$temp'" EXIT | |
curl -sS "$1" \ | |
| pup 'script[src*="main-base.bundle"] + script text{}' \ | |
| sed -Ee '1d;$d' -e 's/window\[[^]]*\]\((.*)\)/\1/' -e 's/\\x3[Cc]/</g' -e 's/\\x3[Ee]/>/g' \ | |
| jq .value >"$temp" |
#!/bin/sh -eu | |
DOMAIN=lointa.in | |
JOURNAL=/srv/dns/$DOMAIN | |
fail() { echo "Status: $1"; echo "Content-Type: text/plain"; echo; echo "$REQUEST_METHOD"; exit; } | |
if [ -z "$PATH_INFO" ]; then | |
echo "Status: 308 Permanent Redirect" | |
echo "Content-Length: 0"; |
Download the RKN list from https://github.com/zapret-info/z-i, massage it into | |
a Mikrotik script that manages a firewall address list, and put it up on a web | |
server. Note well that the list is gigantic---more than 80,000 entries as of | |
2018-04-28---so be sure to check if your router can handle it in advance (for | |
example, hAP Lite, with its measly 32M of memory, can’t). | |
On the router side, do something like | |
/tool fetch url="https://sheaf.site/rkn.rsc" dst-path=rkn.rsc | |
:import rkn.src |
#!/bin/sh -eu | |
set -o pipefail # FIXME bashism | |
BASE=http://dir.alumni57.ru | |
ROOT=$BASE/ | |
LMAP='{ "А": "a", "Б": "b", "В": "v", "Г": "g", "Д": "d", "Е": "e", "К": "k", "М": "m" }' | |
curl -sS "$ROOT" | pup 'article h2 a:first-child json{}' \ | |
| jq -r '.[] | "\(.text)\t\(.href)"' | sort -nk1 \ | |
| while read year url; do |
#!/usr/bin/env python | |
import matplotlib.pyplot as plt | |
import random | |
import matplotlib.gridspec as gridspec | |
random.seed(20) | |
data1 = [random.random() for i in range(10)] | |
data2 = [random.random()*1000 for i in range(10)] |
oct | |
( register / memory ) | |
: reg/mem? ( m -- ? ) 70 and 0 = ; | |
: ?reg/mem ( m -- m ) | |
dup 70 and 0 <> ?abort" reg/mem? " ; | |
: ?memory ( m -- m ) | |
dup 70 and 0 <> over 300 and 300 = ?abort" memory? " ; |
.TH BETA 1 2018 "Alexander Shpilkin" | |
.SH NAME | |
beta \- sample binomial distributions | |
.SH SYNOPSIS | |
\fBbeta \fIcount | |
.SH DESCRIPTION | |
Given a population size \fIN\fR and a sample \fIn\fR from a binomial | |
distribution with parameters (\fIN\fR, \fIp\fR), \fIbeta\fR computes | |
\fIcount\fR more samples from it, assuming a uniform Bayesian prior for the | |
unknown parameter \fIp\fR. |
I hereby claim:
To claim this, I am signing this object: