Skip to content

Instantly share code, notes, and snippets.

View mfdela's full-sized avatar

Marco Delaurenti mfdela

View GitHub Profile

Lorem Ipsum

You are given the following text:

lorem ipsum dolor sit amet consectetur lorem ipsum et mihi quoniam et adipiscing elit.sed quoniam et advesperascit et mihi ad villam revertendum est nunc quidem hactenus ex rebus enim timiditas non ex vocabulis nascitur.nummus in croesi divitiis obscuratur pars est tamen divitiarum.nam quibus rebus efficiuntur voluptates eae non sunt in potestate sapientis.hoc mihi cum tuo fratre convenit.qui ita affectus beatum esse numquam probabis duo reges constructio interrete.de hominibus dici non necesse est.eam si varietatem diceres intellegerem ut etiam non dicente te intellego parvi enim primo ortu sic iacent tamquam omnino sine animo sint.ea possunt paria non esse.quamquam tu hanc copiosiorem etiam soles dicere.de quibus cupio scire quid sentias.universa enim illorum ratione cum tota vestra confligendum puto.ut nemo dubitet eorum omnia officia quo spectare quid sequi quid fugere debeant nunc vero a primo quidem mirabiliter occulta natura est nec perspici nec cogno

Verifying my Blockstack ID is secured with the address 18oj6YSgJHEoJX3YhopZQiYq1pdpx8TNEe https://explorer.blockstack.org/address/18oj6YSgJHEoJX3YhopZQiYq1pdpx8TNEe
@mfdela
mfdela / keybase.md
Last active December 28, 2018 17:25

Keybase proof

I hereby claim:

  • I am mfdela on github.
  • I am mfdela (https://keybase.io/mfdela) on keybase.
  • I have a public key whose fingerprint is FBB0 0CBB A01A 97CD BEBB 0569 58B7 8AF9 DF5D FCC4

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am hiraedd on github.
  • I am hiraedd (https://keybase.io/hiraedd) on keybase.
  • I have a public key whose fingerprint is 3CBF B481 D50D 74BA EA93 2FAD 46B4 5458 85FF 0E17

To claim this, I am signing this object:

Verifying myself: My Bitcoin username is +hiraedd. https://onename.io/hiraedd

Keybase proof

I hereby claim:

  • I am hiraedd on github.
  • I am hiraedd (https://keybase.io/hiraedd) on keybase.
  • I have a public key whose fingerprint is 9118 A943 A992 74BB 83E7 9A00 C5B4 D8E1 DD89 FB2B

To claim this, I am signing this object:

@mfdela
mfdela / gist:5656719
Created May 27, 2013 12:03
Launching ssh-agent on a remote host and reusing the same agent for all ssh connections.
ssh-launch-agent() {
echo "Starting ssh-agent for remote connection..."
eval `ssh-agent -s -a "$HOME/.ssh/ssh-auth-remote.sock"`
echo $SSH_AGENT_PID > "$HOME/.ssh/ssh-agent-remote.pid"
ssh-add
}
if [ ! -z "$SSH_TTY" ]; then
[ ! -f "$HOME/.ssh/ssh-agent-remote.pid" ] && ssh-launch-agent
@mfdela
mfdela / nmf.rb
Created February 13, 2011 00:47
Non-negative matrix factorization
#!/usr/bin/ruby
require("gsl")
def nmf(v, col, thresh)
r, c = v.shape
@mfdela
mfdela / fiber.rb
Created February 13, 2011 00:44
Ruby fiber benchmark
#!/usr/bin/ruby1.9
require 'fiber'
require 'benchmark'
class Ring
attr_reader :id
attr_accessor :attach
def initialize(id)
@mfdela
mfdela / tanimoto.rb
Created February 13, 2011 00:41
Tanimoto coefficient (aka extended Jaccard coefficient) of two real vectors.
#!/usr/bin/ruby
class Array
def sum
inject( 0 ) { |sum,x| sum+x }
end
def sum_square
inject( 0 ) { |sum,x| sum+x*x }
end
def *(other) # dot_product