I hereby claim:
- I am olbat on github.
- I am olbat (https://keybase.io/olbat) on keybase.
- I have a public key whose fingerprint is D1CC 3AE0 5ADA FF27 BEE6 27B7 0B1A 5390 865E 24D7
To claim this, I am signing this object:
#!/usr/bin/env python3 | |
""" | |
usage: {} < corpus.json > plot.pdf | |
The corpus file must contain one JSON document per line, | |
features must be stored in a field names "{}", | |
classes in a field names "{}". | |
""" | |
import sys |
module Time::Measure | |
refine Time.singleton_class do | |
def measure(&_block) | |
tstart = Process.clock_gettime(Process::CLOCK_MONOTONIC) | |
yield if block_given? | |
(Process.clock_gettime(Process::CLOCK_MONOTONIC) - tstart) | |
end | |
end | |
end |
module Process::KillRecursive | |
refine Process.singleton_class do | |
def children(pid) | |
pids = nil | |
if RbConfig::CONFIG['host_os'] =~ /linux/i | |
if File.exist?("/proc/#{pid}/task/#{pid}/children") | |
pids = File.read("/proc/#{pid}/task/#{pid}/children").split(/\s/) | |
end | |
elsif !Gem.win_platform? | |
pids = `ps --ppid #{pid} -o pid=`.split("\n") |
require "benchmark" | |
require "./src/icu" | |
REPEAT=1_000 | |
# from https://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-demo.txt | |
samples = [] of String | |
samples << <<-EOS | |
Σὲ γνωρίζω ἀπὸ τὴν κόψη | |
τοῦ σπαθιοῦ τὴν τρομερή, |
src = STDIN.read | |
# iterate on "1st level" module definitions | |
src.dup.scan(/^module [^;]+$.+?^end/m) do |mod| | |
# get the nested modules' definitions | |
mdefs = mod.scan(/^ *module [^\n]+$(?=\n +module)/m).map(&:to_s) | |
# stop if there is no nested module definition | |
next if mdefs.empty? | |
ndefs = mdefs.size | |
# get the last definition that's not extracted because of the look ahead |
require "xml" | |
require "c/dlfcn" | |
PKGNAME = "icu-uc" | |
TESTFUNC = "u_init" | |
{% if flag?(:darwin) %} | |
SOFILE = "libicuuc.dylib" | |
{% elsif flag?(:windows) %} | |
SOFILE = "libicuuc.dll" | |
{% else %} |
I hereby claim:
To claim this, I am signing this object:
obj-m += realtimeclock.o | |
all: | |
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules | |
clean: | |
make -c /lib/modules/$(shell uname -r)/build M=$(PWD) clean |
/* | |
* Copyright (C) 2006, 2007 Sarzyniec Luc <mail@olbat.net> | |
* | |
* This program is free software; you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation; either version 3 of the License, or | |
* (at your option) any later version. | |
* | |
* This program is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
/* | |
* Copyright (C) 2006, 2007 Sarzyniec Luc <mail@olbat.net> | |
* | |
* This program is free software; you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation; either version 3 of the License, or | |
* (at your option) any later version. | |
* | |
* This program is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |