Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am bboston7 on github.
* I am brettboston (https://keybase.io/brettboston) on keybase.
* I have a public key ASCX3M0Tgbw-o1I1eIMSZFFsoX5dYzHXvLSYQoiqYHkuEAo
To claim this, I am signing this object:
@bboston7
bboston7 / ShuffStr.java
Last active August 29, 2015 14:16
Shuffle String
import java.util.Arrays;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import sun.misc.Unsafe;
import java.lang.reflect.Field;
public class ShuffStr {
public static void main(String[] args) {
System.setSecurityManager(null);
@bboston7
bboston7 / gist:8488454
Created January 18, 2014 10:04
seq.rkt
#lang racket
(define (get-evens file)
(let ([fn (lambda (x) (even? (string->number x)))])
(sequence->list
(sequence-filter
fn
(in-lines (open-input-file (string->path file)))))))
(get-evens "nums.txt")
public class fisr {
public static void main(String[] args) {
System.out.println(invSqrt(Float.parseFloat(args[0])));
}
public static float invSqrt(float number) {
int i;
float x2, y;
float threehalfs = 1.5F;