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
# Define dhvani speech function | |
dhvani_say = dhvani.dhvani_say | |
dhvani_say.restype = c_int | |
dhvani_say.argtypes = [c_char_p,POINTER(dhvani_options)] | |
# dhvani_speak_file function | |
dhvani_speak_file = dhvani.dhvani_speak_file | |
dhvani_speak_file.restype = c_int | |
dhvani_speak_file.argtypes = [c_void_p,POINTER(dhvani_options)] |
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
class dhvani_options(Structure): | |
_fields_ = [("voice",POINTER(dhvani_VOICE)), | |
("pitch",c_float), | |
("tempo",c_float), | |
("rate",c_int), | |
("language",c_int), | |
("output_file_format",c_int), | |
("isPhonetic",c_int), | |
("speech_to_file",c_int), | |
("output_file_name",c_char_p), |
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
# dhvani_ERROR enum | |
(DHVANI_OK,DHVANI_INTERNAL_ERROR) = (0,-1) | |
# dhvani_output_file_format enum | |
(DHVANI_OGG_FORMAT,DHVANI_WAV_FORMAT) = (0,1) | |
# dhvani_Languages enum | |
(HINDI,MALAYALAM,TAMIL,KANNADA, | |
ORIYA,PANJABI,GUJARATI,TELUGU, | |
BENGALAI,MARATHI,PASHTO) = (1,2,3,4,5,6,7,8,9,10,11) |
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
#!/usr/bin/make -f | |
# This file was automatically generated by stdeb 0.6.0 at | |
# Sun, 19 Dec 2010 13:13:23 +0530 | |
# Unset the environment variables set by dpkg-buildpackage. (This is | |
# necessary because distutils is brittle with compiler/linker flags | |
# set. Specifically, packages using f2py will break without this.) | |
unexport CPPFLAGS | |
unexport CFLAGS |
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
/**************************************************************************************************************************/ | |
/* count_char.c */ | |
/* */ | |
/* Copyright 2011 Vasudev Kamath <[email protected]> */ | |
/* */ | |
/* This program is free software; you can redistribute it and/or modify */ | |
/* it under the terms of the GNU General Public License as published by */ | |
/* the Free Software Foundation; either version 3 of the License, or */ | |
/* (at |
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
#!/usr/bin/python3 | |
# -*- coding: utf-8 -*- | |
#naruto-link-fetcher.py | |
# | |
#Copyright 2010 Vasudev Kamath <[email protected]> | |
# | |
#This program is free software; you can redistribute it and/or modify | |
#it under the terms of the GNU General Public License as published by | |
#the Free Software Foundation; either version 3 of the License, or | |
#(at your option) any later version. |
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
#!/usr/local/bin/python3 | |
import sys | |
from urllib.request import Request,urlopen | |
from urllib.error import URLError,HTTPError | |
from html.parser import HTMLParser,HTMLParseError | |
from pyquery import PyQuery as pq | |
class MyHTMLParser(HTMLParser): | |
""" |
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
# -*- mode: snippet -*- | |
# name: gplc | |
# contributor: Vasudev Kamath <[email protected]> | |
# -- | |
${1:`(buffer-name)`} | |
Copyright ${2:`(nth 5 (decode-time))`} ${3:`(user-full-name)`} ${4:<`(replace-regexp-in-string "@" "@" user-mail-address)`>} | |
This program is free software; you can redistribute it and/or modify | |
it under the terms of the GNU ${5:$$(yas/choose-value '("Lesser" "Affero" ""))} General Public License as published by |
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
#!/usr/local/bin/python3 | |
from crawler import Crawler | |
def crawling_done(url): | |
print(("Crawling {} done".format(url))) | |
if __name__ == "__main__": | |
c = Crawler(crawling_done,"http://kn.wikipedia.com/wiki/Karnataka","kn_IN") | |
c.crawl() |
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
#!/usr/local/bin/python3 | |
import re | |
import sqlite3 | |
from urllib.request import urlopen,Request | |
from urllib.error import HTTPError | |
from multiprocessing import Process | |
# TODO Fill this table with other language regexps | |
lang_regexps = { |