Skip to content

Instantly share code, notes, and snippets.

View deepakg's full-sized avatar

Deepak Gulati deepakg

View GitHub Profile
//
// main.swift
// eventkitter
//
// Created by Deepak Gulati on 15/06/2014.
// Prints all the unfinished reminders from the default reminder list
import Foundation
import EventKit
use warnings;
use strict;
use Data::Dumper;
use 5.10.1;
my @x = qw(mary had a little lamb);
my @y = qw(nothing common with the girl above);
my @z = qw(claire had a silent white lamb that will not bleat);
my %first;
//This is a cheat-sheet of sorts for declaring functions in swift
//you can paste the contents of this gist inside a playground to tinker...
//1. Simple
func HelloWorld() {
print("Hello World")
}
HelloWorld() //Hello World
from __future__ import print_function
import xml.etree.ElementTree as ET
import string
import codecs
ns = { 'ttml' : 'http://www.w3.org/ns/ttml' }
f = codecs.open('abstract.tsv', 'w', "utf-8")
f.write("episode\tscript\n");
@deepakg
deepakg / tiles.py
Created April 21, 2018 09:22
A Python program to create a tiled collage from a single image. For more details see: https://www.deepakg.com/the-tiled-fa%C3%A7ades-of-porto
import argparse
from pprint import pprint as pp
from PIL import Image
def make_row_tile(tile, bgcolor, padding, flip_vertical):
(tile_width, tile_height) = tile.size
row_tile = Image.new('RGB',
(tile_width * 2 + padding, tile_height),
color=bgcolor)