Skip to content

Instantly share code, notes, and snippets.

Honza Strnad hanny24

Block or report user

Report or block hanny24

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 monix-oom.scala
import cats.effect._
import monix.eval.Task
import monix.execution.Scheduler
import org.http4s.HttpApp
import org.http4s.server.Server
import org.http4s.server.blaze.BlazeServerBuilder
import scala.concurrent.ExecutionContext
View String distances
function leven_damerau(a::AbstractVector, b::AbstractVector, width::Int, fill_fun)
a_n = length(a)
b_n = length(b)
n = max(a_n,b_n)
tmp = Array(Int,n+1,width)
idx = [i for i in 1:width]
for i in 1:n+1
tmp[i, idx[width] - 1] = i-1
for j in 1:width - 2
hanny24 /
Created Sep 9, 2013
Quick & dirty recoll support for Kupfer. Just place it to ~/.local/share/kupfer/plugins.
# Heavily based on Locate plugin by Ulrik Sverdrup <>
__kupfer_name__ = _("Recoll")
__kupfer_actions__ = (
__description__ = _("Search using Recoll")
__version__ = ""
__author__ = "Honza Strnad <>"
hanny24 /
Created Jun 10, 2013
Simple Scala-like for comprehension for rust
// Simple Scala-like for comprehension for rust
macro_rules! comp(
// base case, using "map"
(val $id:ident <- $expr:expr $(,if $cond:expr)* $(,let $assign_id:pat = $assign_val:expr)* ,yield $comp:expr) =>
($expr)$(.filtered(|&$id| $cond))*.map(|&$id| {
$(let $assign_id = $assign_val;)* $comp
You can’t perform that action at this time.