Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am kensaggy on github.
  • I am kenio (https://keybase.io/kenio) on keybase.
  • I have a public key ASA71Qhijb6j3ZmOHcp9o5jtRpW4ioS69jXa0O3ShICINwo

To claim this, I am signing this object:

def miniglider():
p = [".%s%s%s%s."%(p+p[::-1]) for p in [(" ","@"*3),(" "*2,"@"*2),(" "*4,""),("."*4,"")]]
c = [(3,3,3,1),(2,1,2,1),(2,0,2,3),(2,1,2,1),(3,3,3,1),(2,2,1,1),(2,2,0,3),(2,2,1,1),(3,3,3,1),(1,1,1,1),(0,0,0,3),(1,1,1,1), (3,3,3,1)]
for i in c: print (p[i[0]]+p[i[1]]+p[i[2]]+'\n')*i[3],
#!/usr/bin/env python
def get_x_y(i,j, size):
"""
Returns the x,y coordinates in the "big" grid
"""
return (i/size, j/size)
def corner(i,j,size):
"""
@kensaggy
kensaggy / Makefile
Created November 5, 2013 19:41
Generic all purpose Makefile for SPL course (@bgu)
###################################################################################################################
#
# Dynamic makefile, by Ken Saggy and Lidan Hifi
# Will automatically search for files ending with SRCEXT (source extension) in SRCDIR (source directory)
#
# MAKE FILE DOCUMENTATION:
# ========================
# CC = C Compiler [g++]
# CFLAGS = Flags used during compilation
# SRCDIR = Source Directory [src]
@kensaggy
kensaggy / trashByLabel.appscript
Last active December 20, 2015 10:39
A Google App Script to delete a large quantity or threads by a label name
function Rubi() {
//Set the below parameters to your needs
var labelName = "test_label"; //edit this to your liking
var batchSize = 1; //should probably set to something high, but not too high. (300? 1000? or whatever)
// get the label for given name
var label = GmailApp.getUserLabelByName(labelName);
var from = 0;