Skip to content

Instantly share code, notes, and snippets.

Deepak Gulati deepakg

Block or report user

Report or block deepakg

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@deepakg
deepakg / tiles.py
Created Apr 21, 2018
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
View tiles.py
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)
View ttml-extract.py
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");
View swift-function-cheatsheet.swift
//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
View gist:c047865c94d9c1438f5f
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;
View eventkit_from_swift
//
// 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
You can’t perform that action at this time.