Instantly share code, notes, and snippets.

View # littler - 2017-02-01_11-14-52.txt
Homebrew build logs for homebrew/science/littler on macOS 10.12.2
Build date: 2017-02-01 11:14:52

Keybase proof

I hereby claim:

  • I am genos on github.
  • I am genos ( on keybase.
  • I have a public key whose fingerprint is 167F 847B C551 05A2 7EF6 C1B9 D398 CA30 9273 6FC3

To claim this, I am signing this object:

def x(k):
"""Numerically investigate the continued fraction x =
1 + 1
1 + 1
1 + 1
We won't be able to go out to infinity, so we'll use a counter to take only
View craps.lisp
#!/usr/local/bin/sbcl --script
;;;; craps.lisp
;;;; My submission to
;;;; Simulates games of Craps, outputs statistics; REQUIRES SBCL (*posix-argv*)
;;;; GRE, 11/4/11
(defun two-dice ()
"The sum of rolling two dice"
(+ (1+ (random 6)) (1+ (random 6))))
View shamir_threshold_2.c
/* shamir_threshold_scheme.c
* My C implementation of Shamir's (k, n) Theshold scheme.
* Uses a single flag as opposed to an array; idea from Razvan's great implementation.
* GRE, 6/23/11
#include <stdio.h>
#include <stdlib.h>
#define uint unsigned int
View shamir_threshold.c
/* shamir_threshold_scheme.c
* My C implementation of Shamir's (k, n) Theshold scheme.
* GRE, 6/23/11
#include <stdio.h>
#include <stdlib.h>
#define uint unsigned int
#define ulong unsigned long
View shamir_threshold.lisp
;;; shamir_threshold_scheme.lisp
;;; Implements Adi Shamir's (k, n) threshold secret sharing scheme.
;;; GRE, 6/17/11
(defun prod (nums)
"Product of nums"
(reduce #'* nums :initial-value 1))
View shamir_threshold.hs
{- shamir_threshold_scheme.hs
- My Haskell implementation of Shamir's (k, n) Threshold scheme.
- GRE, 6/23/11
import Data.Bits (shiftR, testBit)
import Data.List (foldl', nub)
import Random (mkStdGen, randomRs)
View list_intersection.scm
; Intersection of two sorted lists
; Output is also a sorted list; takes O(min(m, n)) time, where m = length(list1)
; and n = length(list2).
(define (intersection list1 list2)
(let loop ((l1 list1) (l2 list2) (out '()))
(if (or (null? l1) (null? l2))
(reverse out)
(let ((a (car l1)) (b (car l2)))
(cond ((< a b) (loop (cdr l1) l2 out))
View obfuscated_collatz.c
main(int c,char **v){int n=atoi(v[1]);while(n-1){n=n&1?3*n+1:n/2;printf("%d\n",n);}}