Skip to content

Instantly share code, notes, and snippets.


  • Tel Aviv; Den Haag
Block or report user

Report or block marchdown

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:37cd1c3cd0814e7ba0251b2f33aa1f92
python3 -m prodigy terms.teach seedterms_march11 ./radioner_with_bodypart_batch_trained -se seedterms.text
Initialising with 24 seed terms from seedterms.text
✨ Starting the web server at http://localhost:8080 ...
Open the app in your browser and start annotating!
15:15:54 - Task queue depth is 1
15:15:54 - Task queue depth is 2
Saved 112 annotations to database SQLite
View practice online.html
<!doctype html>
<html lang="en, ru">
<meta charset="utf-8">
<link rel="stylesheet" href="" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous">
marchdown /
Created Aug 5, 2017 setup script modified to use AMI available in eu-west-1 region.
export vpcId=`aws ec2 create-vpc --cidr-block --query 'Vpc.VpcId' --output text`
aws ec2 modify-vpc-attribute --vpc-id $vpcId --enable-dns-support "{\"Value\":true}"
aws ec2 modify-vpc-attribute --vpc-id $vpcId --enable-dns-hostnames "{\"Value\":true}"
export internetGatewayId=`aws ec2 create-internet-gateway --query 'InternetGateway.InternetGatewayId' --output text`
aws ec2 attach-internet-gateway --internet-gateway-id $internetGatewayId --vpc-id $vpcId
export subnetId=`aws ec2 create-subnet --vpc-id $vpcId --cidr-block --query 'Subnet.SubnetId' --output text`
export routeTableId=`aws ec2 create-route-table --vpc-id $vpcId --query 'RouteTable.RouteTableId' --output text`
aws ec2 associate-route-table --route-table-id $routeTableId --subnet-id $subnetId
aws ec2 create-route --route-table-id $routeTableId --destination-cidr-block --gateway-id $internetGatewayId
export securityGroupId=`aws ec2 create-security-group --group-name my-security-group --description "Generated by setu
marchdown / reflexivity.idr
Created Aug 1, 2017
reflexivity in Idris
View reflexivity.idr
infixl 5
data (⇔) : a -> b -> Type where
Refl_ : x ⇔ x -- there is an identity, a function/path/morphism from a value of x of Type a to itself. /or to a value of an isomorphic type!/
fiveIsFive : 5 ⇔ 5
-- this is a function of type "equality" parametrized by "5" and "5" and since it has a constructor and is thus populated (by Refl), the Type with this parameters is populated and it is a proof that five does, indeed, equal itself.
fiveIsFive = Refl_
View gist:41420631fcfddbf2ed87cddb40e3fd9e
import rtmidi_python as rtmidi
from time import sleep
midi_out = rtmidi.MidiOut()
for port_name in midi_out.ports:
print port_name
# now launch a DAW and connect to MIDI input "foo"
View foldr-all-the-things.hs
import Prelude hiding (takeWhile)
sum :: Num a => [a] -> a
sum = foldr (+) 0
product :: Num a => [a] -> a
product = foldr (*) 1
and :: [Bool] -> Bool
and = foldr (&&) True
-- NB pointful function definitions compile just fine without type annotations
and' xs = foldr (&&) True xs
View gist:4034659

Порождение парадигм германских сильных глаголов


Есть много (порядка сорока, считая значимые диалекты и мертвые языки) германских языков. В них во всех есть похожим образом устроенная глагольная система. Глаголы делятся на два больших надкласса: сильные и слабые. Сильные глаголы образуют формы прошедшего времени и причастия, меняя гласную в корне. Выбор конкретной гласной определяется "абляутным рядом": набором из четырех гласных (или дифтонгов, или нулей), разных абляутных радов много, и конкретный их набор разнится от языка к языку.

Для построения всех форм глагола нужно знать:

  1. язык (и набор абляутных рядов этого языка)
  2. заглавную форму глагола
import javax.vecmath.Point3d;
public class Dijkstra {
final int MAX;
final int EDGES;
final double INFINITE = 998.0;
import javax.vecmath.Point3d;
public class Dijkstra {
final int MAX;
final int EDGES;
final double INFINITE = 998.0;
You can’t perform that action at this time.