This file contains hidden or 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
| rom collections import namedtuple | |
| product = namedtuple("Product", [ | |
| 'catalog_id', | |
| 'price', | |
| 'basic_discount', | |
| 'user_specific_discount', | |
| 'category']) |
This file contains hidden or 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
| package main | |
| import ( | |
| "os" | |
| "encoding/xml" | |
| "strings" | |
| "log" | |
| "runtime/debug" | |
| ) |
This file contains hidden or 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
| package main | |
| import ( | |
| "log" | |
| "strings" | |
| ) | |
| func isVowel(chr_ rune) bool { | |
| chr := string(chr_) | |
| if (strings.EqualFold(chr, "a") || strings.EqualFold(chr, "e") || |
This file contains hidden or 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 logging | |
| from urllib2 import urlopen, Request | |
| import re | |
| from bs4 import BeautifulSoup as Soup | |
| from optparse import OptionParser | |
| from collections import namedtuple, Mapping | |
| import sys | |
| __author__ = "Supreet Sethi <supreet.sethi@gmail.com>" | |
| __copyright__ = "Copyright (C) 2014 Supreet Sethi" |
NewerOlder