Skip to content

Instantly share code, notes, and snippets.

View mobeets's full-sized avatar

Jay H mobeets

View GitHub Profile

Chana Masala

Prep time: 15 mins Cooking time: 40-45 mins Serves: 4

Ingredients:

  • 2 Onions - sliced finely
  • 4 cloves of garlic - chopped finely (or crushed)
@mobeets
mobeets / random_cribbage.py
Created June 17, 2018 03:03
estimating what percentage of cribbage games are winnable by random play
import itertools
import numpy as np
# https://github.com/relsqui/pydeck
from pydeck import standard, cribbage
CARDS_PER_DEAL = 6
CARDS_PER_HAND = 4
POINTS_TO_WIN = 121
VERBOSE = False
0.620713 0.463101 0.869851 0.610158 0.702451 0.767094
0.797397 0.441206 0.753544 0.679309 0.524256 0.752844
0.58715 0.137027 0.938175 0.590607 0.840056 0.652926
0.176337 0.909013 0.356048 0.306722 0.134125 0.669478
0.790946 0.155954 0.173121 0.310723 0.989607 0.294101
0.620713 0.463101 0.869851 0.610158 0.702451 0.767094
0.797397 0.441206 0.753544 0.679309 0.524256 0.752844
0.58715 0.137027 0.938175 0.590607 0.840056 0.652926
0.176337 0.909013 0.356048 0.306722 0.134125 0.669478
0.790946 0.155954 0.173121 0.310723 0.989607 0.294101
@mobeets
mobeets / steps.md
Last active May 1, 2016 22:29
playing music with Overtone on OSX inside Sublime Text 2

This was surprisingly simple given how many things there were to do! (Usually it seems like something breaks when there's this many steps between me and installing something.)

Installations

@mobeets
mobeets / hex.js
Last active January 2, 2016 23:09
All Hive opening geometries (one player, initial placements only)
var infile = 'points.csv'
var dark_color = '#777777'
var margin = {
top: 30,
right: 20,
bottom: 20,
left: 20
};
var width = 90;
var height = 90;
@mobeets
mobeets / figurative.c
Last active December 31, 2015 23:59
figurative language meets programming
// in C you can express metaphors, e.g. "Noon's house is a bear":
#include "stdio.h"
typedef struct {
char *street;
int street_number;
} noons_house_t;
typedef struct {
@mobeets
mobeets / README.md
Last active December 31, 2015 23:28
Chocolate chip cookie tips from @Thefoodlab

THE PROCESS

  1. The dough spreads (things melt).
  2. The edges set (before the center does).
  3. The cookie rises (water from melting reacts with baking soda, which in turn reacts with acids).
  4. Egg proteins and starches set (cookie's shape finalizes).
  5. Sugar caramelizes (producing richer, sweeter flavors).
  6. The Maillard reaction occurs (flour proteins and eggs brown with the sugar, producing nutty, toaster flavors).
  7. The cookie cools (liquefied sugar hardens, producing toffee-like texture).

THE GOAL

@mobeets
mobeets / index.html
Last active December 31, 2015 08:29
Odds of winning one-Handed Solitaire
<br><br><br>
<div style="margin-left: auto; margin-right: auto; width: 70%;">
<b>Results from a simulation of 100,000 rounds of <a href="https://en.wikipedia.org/wiki/One-Handed_Solitaire">One-handed solitaire</a>.</b>
<br>
<i>Median and Mode result is 12 cards. Mean is 13.3.</i>
<br>
<i>Odds of winning a single game are 0.71%.</i>
<br>
<b><i>You must play ~420 games to be guaranteed of winning at least once (with 95% confidence).</i></b>
</div>
@mobeets
mobeets / README.md
Last active December 30, 2015 01:09
Jay's Christmas wish list (2013)
  • Memory upgrade for MacBook Pro
  • Clever Coffee Dripper
  • fingerless gloves, or, gloves that can be fingerless or not
  • some of George W. Davis's old diaries (for loan or keeps)
  • Val's old racket (restrung)
  • Band shirts (size M)
    • The Flaming Lips
    • Dr. Dog
  • The Sea and Cake
@mobeets
mobeets / index.html
Last active December 29, 2015 01:19
Chapter 1 of Jennifer Egan's "Black Box", as serialized by @NYerFiction between May 24, 2012 - June 2, 2012.
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><html><head></head><body><h1>Jennifer Egan's <i>Black Box</i></h1>
<i>A short story serialized on twitter by <a href="https://twitter.com/nyerfiction">@NYerFiction</a> between May 24, 2012 - June 2, 2012.</i><br>
<h2>Chapter 1</h2>
<blockquote class="twitter-tweet"><p>With each number, imagine yourself rising out of your body and moving one step farther away from it.</p>&mdash; New Yorker Fiction (@NYerFiction) <a href="https://twitter.com/NYerFiction/statuses/205827736692981761">May 25, 2012</a></blockquote>
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
<blockquote class="twitter-tweet"><p>Close your eyes and slowly count backward from ten.</p>&mdash; New Yorker Fiction (@NYerFiction) <a href="https://twitter.com/NYerFiction/statuses/205827483344445441">May 25, 2012</a></blockquote>
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
<blockquote class="twitter-tweet"><p>Begin the