Skip to content

Instantly share code, notes, and snippets.

View gajeam's full-sized avatar

Gabriel Nicholas gajeam

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gajeam
gajeam / .block
Created April 10, 2017 18:31
ischool-geo-viz-template
license: mit
@gajeam
gajeam / ducks.py
Last active January 28, 2020 19:25
Can you track the delirious ducks?
import random
DIR_UP = 'u'
DIR_RIGHT = 'r'
DIR_DOWN = 'd'
DIR_LEFT = 'l'
START_POS = (1, 1) #(x_coordinate, y_coordinate)
POND = (3, 3) #(pond_width, pond_height)
@gajeam
gajeam / snails.java
Created January 30, 2020 05:48
Snails
// Visualizes the solution for this Riddler problem, using Java and Processing
// https://fivethirtyeight.com/features/how-long-is-the-snails-slimy-trail/?ex_cid=the-riddler
int SHAPE_SIDES = 6;
float SHAPE_RADIUS = 100.0;
float SHAPE_X;
float SHAPE_Y;
float[][] snails = new float[SHAPE_SIDES][2];
@gajeam
gajeam / set.py
Last active March 26, 2020 19:37
Simulating problems about the game Set, from the Riddler
import random
from itertools import combinations
# I'm taking a simulation approach to solving these Riddler problems about the game Set
# https://fivethirtyeight.com/features/how-many-sets-of-cards-can-you-find/
# The answers might not be exactly right, since I'm just doing brute force calculations.
# But hell, it's fun!
###############
## CONSTANTS ##
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gajeam
gajeam / autoarchive.gs
Created July 27, 2021 15:04
Auto archive
/*
Shout out to Gabe Benjiman from Github for the basis of this script
https://gist.github.com/GabeBenjamin/3ef20889fa37ae97e9492e58e90db892
For info on how to get this to run automatically in your email, check out this Medium post:
https://medium.com/@fw3d/auto-archive-emails-in-gmail-after-2-days-1ebf0e076b1c
*/
function gmailAutoArchive() {
// In a world where I am less lazy, this could be written better with a regex