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 mechanize | |
import cookielib | |
# http://stockrt.github.com/p/emulating-a-browser-in-python-with-mechanize/ | |
# Browser | |
br = mechanize.Browser() | |
# Cookie Jar | |
cj = cookielib.LWPCookieJar() |
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
<style type="text/css"> | |
body { | |
background: white; | |
font-size: 12pt; | |
} | |
strong,h3,h4{ | |
font-weight: 900; | |
color:midnightblue; | |
} |
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
# Source http://stackoverflow.com/a/15741856/1301753 | |
import copy | |
import sys | |
import math | |
import pyPdf | |
def split_pages(src, dst): | |
src_f = file(src, 'r+b') | |
dst_f = file(dst, 'w+b') |
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 lxml.html.clean as clean | |
from BeautifulSoup import BeautifulSoup | |
input_file = 'input.html' | |
output_file = 'output.html' | |
orig_content = open(input_file, 'rw').read() |
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
from tamilstemmer import TamilStemmer | |
wordlist = [u'மலைகள்',u'பாடுதல்',u'ஓடினான்'] | |
#expected = [u'மலை',u'பாடு', u'ஓடி'] | |
ta_stemmer = TamilStemer() | |
for word in wordlist: | |
ta_stemmer.stemWord(word) |
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
#This program helps to remove the given words in a file to all the files inside a directory, recursively. | |
# Got the sed idea from http://www.linuxask.com/questions/replace-multiple-strings-using-sed | |
import sys | |
import glob | |
import os | |
import argparse | |
parser = argparse.ArgumentParser() |
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
//var langCode ='ta'; -- TODO Make it language independent. | |
function doGet() { | |
return HtmlService.createTemplateFromFile('Index.html') | |
.evaluate(); | |
} | |
function doSomething() { | |
Logger.log('I was called!'); | |
} |
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 sys | |
in_file = sys.argv[1] | |
content = open(in_file).read() | |
out = open("result.csv","a") | |
con = content.split("வாக்காளர் பெயர்") |
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
# program name : fix_records.py | |
# author : [email protected] | |
# version : 0.1 | |
import sys | |
import os | |
import argparse | |
parser = argparse.ArgumentParser(description='A program to find and replace bibliographical data') |
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 os | |
import sys | |
import glob | |
#import telegram_send | |
all_pdf = glob.glob("*.pdf") | |
all_pdf_count = len(all_pdf) |
OlderNewer