Skip to content

Instantly share code, notes, and snippets.

mode = 2
# Convert integer to words.
if mode == 0:
units = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven',
'eight', 'nine', 'ten', 'eleven', 'twelve', 'thirteen', 'fourteen',
'fifteen', 'sixteen', 'seventeen', 'eighteen', 'nineteen']
tens = ['zero', 'ten', 'twenty', 'thirty', 'forty', 'fifty', 'sixty',
'seventy', 'eighty', 'ninety']
powers = ['zero', 'thousand', 'million', 'billion', 'trillion',
#include "blackjack_pdf.h"
#include <iostream>
int main()
{
int num_decks = 6;
bool h17 = false;
bool das = true;
bool ls = false;
@possibly-wrong
possibly-wrong / clock.txt
Created August 27, 2017 19:55
Times when hour and minute hands may be swapped yielding another valid time
00:00:00.000 == 00:00:00.000
00:05:02.097 == 01:00:25.174
00:10:04.195 == 02:00:50.349
00:15:06.293 == 03:01:15.524
00:20:08.391 == 04:01:40.699
00:25:10.489 == 05:02:05.874
00:30:12.587 == 06:02:31.048
00:35:14.685 == 07:02:56.223
00:40:16.783 == 08:03:21.398
00:45:18.881 == 09:03:46.573
@possibly-wrong
possibly-wrong / sim_output.txt
Created January 31, 2017 02:45
Hi-Opt II sub-optimal index plays
(13, 7, 7, 9, 10, 7, 8, 12, 9, 29), 6-5 vs. 9 (100): hit, not double
(16, 17, 13, 14, 15, 12, 12, 12, 13, 60), 10-2 vs. 2 (100): stand, not hit
(14, 16, 18, 20, 13, 18, 16, 14, 18, 56), 6-1 vs. 3 (100): double, not hit
(11, 13, 14, 17, 9, 12, 12, 10, 11, 46), 9-3 vs. 5 (100): stand, not hit
(7, 12, 13, 15, 8, 9, 9, 10, 6, 41), 3-6 vs. 3 (100): hit, not double
(6, 10, 9, 14, 8, 8, 9, 10, 5, 40), 2-10 vs. 2 (100): stand, not hit
(3, 5, 9, 11, 6, 7, 8, 7, 4, 29), 6-3 vs. 2 (100): double, not hit
(24, 24, 24, 24, 24, 24, 24, 24, 24, 96), 2-10 vs. 4 (100): hit, not stand
(17, 21, 18, 17, 17, 20, 17, 20, 18, 67), 4-8 vs. 5 (100): hit, not stand
(9, 12, 13, 9, 11, 12, 13, 10, 9, 57), 7-3 vs. 10 (100): hit, not double