I hereby claim:
- I am mathieujobin on github.
- I am mathieujobin (https://keybase.io/mathieujobin) on keybase.
- I have a public key whose fingerprint is E456 38FD 0C05 FB5B AEED 610B 72D0 BEA7 41A1 70E8
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
module Enumerable | |
# weighted random sampling. | |
# | |
# Pavlos S. Efraimidis, Paul G. Spirakis | |
# Weighted random sampling with a reservoir | |
# Information Processing Letters | |
# Volume 97, Issue 5 (16 March 2006) | |
def wsample(n) | |
self.max_by(n) {|v| rand ** (1.0/yield(v)) } | |
end |
$!/bin/bash | |
if [ $# -eq 1 -a -d $1 ] | |
then | |
# argument is a folder, lets find the first file | |
first_file=`find $1 -type f | grep -v "$1/\.git/" | head -n 1` | |
if [ "$first_file" = "" ] | |
then | |
echo "directory contains no files, good bye" | |
exit 1 |
#!/usr/bin/env ruby | |
require 'yaml' | |
require 'byebug' | |
$debug_mode = false #$ true | |
def remove_cassettes(mode, pattern) | |
case mode | |
when 'status_code' | |
grep_match = "code:.#{pattern}" | |
when 'uri_match' |
Story of the Economy of Japan - Prince of the Yen https://www.youtube.com/watch?v=p5Ac7ap_MAY You can see Prof. Richard Werner, commenting all along as he spent his life in Japan.
Banking industry exposed with solutions by Prof. Richard Werner https://www.youtube.com/watch?v=MechH0ebs_c This apply to the whole world
97% Owned, the situation in UK, but applies to all of us https://www.youtube.com/watch?v=XcGh1Dex4Yo (Full 130 minutes)
/etc/restartd.conf | |
[10:21] <acidfoo-_> netvirt-agent "netvirt-agent" "sleep 20 && su root -c netvirt-agent &" "" | |
# A module for instrumenting ActiveJob workers for Scout APM. | |
# | |
# These can appear under "Background Jobs" (default) or "Web Endpoints" in the UI, depending on the value of | |
# +SCOUT_TRANSACTION_TYPE+. | |
# | |
# Example usage: | |
# | |
# class BaseJob < ActiveJob::Base | |
# | |
# def perform(attributes) |
#!/usr/bin/env ruby | |
require 'sidekiq' | |
require 'sidekiq/cli' | |
# Default to running one process per core | |
def process_count | |
return ENV['SK_PROCESS_COUNT'].to_i unless ENV['SK_PROCESS_COUNT'].to_i == 0 | |
case RbConfig::CONFIG['host_os'] |