Skip to content

Instantly share code, notes, and snippets.


Michel Billard mbillard

View GitHub Profile
mbillard / gist:eeab2268b8e4bfd2ad3b
Created May 4, 2015 13:54
WTF, Ruby (and Rails)?
View gist:eeab2268b8e4bfd2ad3b
- `0` is `true`
- Everything is an object, even `nil`
- `===`
- different behavior depending on classes, only use/define for `case...when` blocks
- private class methods (
- `and` and `or` vs `&&` and `||`
- constants are not constants unless you freeze them
- `5 / 2 # => 2` transform your integers to floats before doing operations
mbillard / the_last_question.txt
Created May 1, 2015 18:59
The Last Question
View the_last_question.txt
The Last Question by Isaac Asimov © 1956
The last question was asked for the first time, half in jest, on May 21, 2061, at a time when humanity first stepped into the light. The question came about as a result of a five dollar bet over highballs, and it happened this way:
Alexander Adell and Bertram Lupov were two of the faithful attendants of Multivac. As well as any human beings could, they knew what lay behind the cold, clicking, flashing face -- miles and miles of face -- of that giant computer. They had at least a vague notion of the general plan of relays and circuits that had long since grown past the point where any single human could possibly have a firm grasp of the whole.
Multivac was self-adjusting and self-correcting. It had to be, for nothing human could adjust and correct it quickly enough or even adequately enough -- so Adell and Lupov attended the monstrous giant only lightly and superficially, yet as well as any men could. They fed it data, adjusted questions to its needs and translated t
View original.txt
Vowel qualities in English words
The following is a list of the most common one-syllable words in English, grouped according to what vowels they contain. You will need to memorize the pronunciation of all these words for the final exam. Luckily, in most cases the spelling will help you. I suggest that you create a guide for yourself noting how particular letter combinations are usually pronounced, and which words are exceptions. The words have been arranged in groups according to spelling. (This list is a slightly modified version of one created by John Myhill.)
I have used the following substitutes for phonetic characters (see your handout from the IPA Handbook): [E] for the vowel in 'bed', [I] 'bid', [U] 'good', [A] 'bad', [^] 'bud', [O] 'bought', [3] RP 'bird', [@] for schwa.
Words pronounced with the near-high near-front vowel [I]:
mbillard / _hot.txt
Created February 16, 2014 17:09
A comparison of Reddit's previous and new algorithm
View _hot.txt
old new
# score > 0
_hot(1, 0, 1262304000) 2850.0 2850.0
_hot(1, 0, 1353107345) 4868.0 4868.0
_hot(1000, 500, 1262304000) 2852.69897 2852.69897
_hot(1000, 500, 1353107345) 4870.69897 4870.69897
# score < 0
_hot(0, 1, 1262304000) -2851.0 2850.0
_hot(0, 1, 1353107345) -4869.0 4868.0
mbillard / US-fr
Created March 27, 2013 14:42
List of words that are spelled the same in French and English (special french characters were replaced by their corresponding ascii character). The source files were found here:
View US-fr
mbillard / delimiters
Last active February 6, 2018 05:18
A collection of characters that can be used as delimiters/separators
View delimiters
~ tilde
• &bull;
· &middot;
— em dash
- en dash
« &laquo;
» &raquo;
‹ &lsaquo;
› &rsaquo;
| pipe