This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: mit |
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.