Skip to content

Instantly share code, notes, and snippets.

View djinn's full-sized avatar

Supreet Sethi djinn

View GitHub Profile
@djinn
djinn / reward.py
Created August 27, 2014 05:56
Sample code of reward process written in Python
rom collections import namedtuple
product = namedtuple("Product", [
'catalog_id',
'price',
'basic_discount',
'user_specific_discount',
'category'])
@djinn
djinn / abstract_parse.go
Created June 2, 2014 12:56
XML parsing in golang
package main
import (
"os"
"encoding/xml"
"strings"
"log"
"runtime/debug"
)
@djinn
djinn / syllable.go
Created May 29, 2014 10:00
Syllable calculation done in golang
package main
import (
"log"
"strings"
)
func isVowel(chr_ rune) bool {
chr := string(chr_)
if (strings.EqualFold(chr, "a") || strings.EqualFold(chr, "e") ||
@djinn
djinn / backlink.py
Created January 2, 2014 19:24
This gist is created in response to a request for debugging backlink on a mailing list