Skip to content

Instantly share code, notes, and snippets.

View siers's full-sized avatar
:octocat:

Raitis Veinbahs siers

:octocat:
  • Basel, Switzerland
View GitHub Profile
@siers
siers / backgammon-distribution.rb
Created August 28, 2012 13:13
Dice sum distribution
#!/usr/bin/env ruby
T = 50000
def n
rand(6) + 1
end
def title(x)
puts x
puts "*" * x.length
@siers
siers / Gamma.rb
Last active April 24, 2021 20:20
Plays from sol to sol.
#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
# Primitive NoteFactory.
# http://en.wikipedia.org/wiki/Piano_key_frequencies
T = 44000
class NoteFactory
attr_accessor :notes, :notes_in_octave