Skip to content

Instantly share code, notes, and snippets.

Avatar
👷‍♂️
Work in progress

Santhosh Thottingal santhoshtr

👷‍♂️
Work in progress
View GitHub Profile
@santhoshtr
santhoshtr / manjari-manjula.md
Created November 25, 2022 07:13
Difference between Manjari and Manjula
View manjari-manjula.md
Manjari Manjula
Maintained by the designer Maintainer unknown
Updates are available Since there is no maintainer, updates are not expected
Source code is available Only ttf binary is available. Script to convert original Manjari-Regular variant to this ttf is also available
OTF, TTF, Webfont version of fonts are provided. OTF is close to the design. TTF is quadratic curve approximation Only TTF version is provided
Regular, Bold, Thin variants are available Only Regular is provided
Public issue tracker is available No issue tracker
Contains large set of glyphs. With Opentype rules, 1971 style or 2022 style can be used A subset of glyphs to support Government Script Reformation 2022 is available. Note that the font has all glyphs, but the code to form them is removed. So font file size is unnecessarily bigger than required
@santhoshtr
santhoshtr / corpus-cleanup-malayalam.sed
Created February 28, 2020 10:38
Malayalam corpus cleanup script
View corpus-cleanup-malayalam.sed
# Misc clean up on corpus
# sed -i -f corpora-cleanup.sed corpus/*.txt
# Chillu normalization
s/ന്‍/ൻ/g
s/ള്‍/ൾ/g
s/ല്‍/ൽ/g
s/ര്‍/ർ/g
s/ന്‍/ൻ/g
s/ണ്‍/ൺ/g
# Remove ZWNJ at end of words
@santhoshtr
santhoshtr / process.js
Created February 21, 2020 05:59
process ligatures and glyphs for Manjari
View process.js
const glyphs = require('./glyphs.json').glyphs
const ligatures = require('./ligatures.json').ligatures
const getGlyphValue = (glyphname) => {
const glyph = glyphs.find(g => g.glyph === glyphname);
return glyph && glyph.value;
}
const process = () => {
const ligaturesLength = ligatures.length;
@santhoshtr
santhoshtr / KeralaPRDHeadlinesCrawler.py
Created October 26, 2019 07:27
Crawl Kerala PRD website and download all content to json
View KeralaPRDHeadlinesCrawler.py
import scrapy
from scrapy.http import Request
class HeadlineCatcher(scrapy.Spider):
name = "headlinecatcher"
start_urls = ["http://www.prd.kerala.gov.in/pressrelease"]
custom_settings = {
'FEED_EXPORT_ENCODING': 'utf-8',
}
View keybase.md

Keybase proof

I hereby claim:

  • I am santhoshtr on github.
  • I am sthottingal (https://keybase.io/sthottingal) on keybase.
  • I have a public key ASAP_nrhFC103eL1sF9vFA9M4mrxkfvudZ2I-Bd9kiukOgo

To claim this, I am signing this object:

@santhoshtr
santhoshtr / hd-playlist-audio-downloader.sh
Created July 9, 2018 11:23
HD Audio download from a youtube playlist
View hd-playlist-audio-downloader.sh
youtube-dl -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 -o "%(title)s.%(ext)s" https://www.youtube.com/playlist?list=abdlshfjskdhfuwhrklk
@santhoshtr
santhoshtr / ICUStingComparison.py
Created April 6, 2018 17:21
ICU based string comparison using various collation strengths
View ICUStingComparison.py
from icu import Locale, Collator as ICUCollator
import locale
collator = ICUCollator.createInstance(Locale("ml_IN"))
word1="അവൻ"
word2="അവ‍ന്\u200d" # "അവന്"
collator.setStrength(ICUCollator.PRIMARY);
print("[ICU] Are they primary equal? ", collator.compare(word1, word2))
collator.setStrength(ICUCollator.SECONDARY);
print("[ICU] Are they secondary equal? ", collator.compare(word1, word2))
@santhoshtr
santhoshtr / index.html
Created December 10, 2017 11:39
Malayalam number parser
View index.html
<div class="container">
<input id="num" type="number" placeholder="Enter a number" />
<div id="result"></div>
<div id="analysis"></div>
</div>
@santhoshtr
santhoshtr / Collator.py
Last active September 18, 2017 04:40
Malayalam Collator
View Collator.py
#!/usr/bin/python3
import sys
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk, Gio, GLib, Pango
import locale
from pyuca import Collator
from icu import UnicodeString, Locale, Collator as ICUCollator
@santhoshtr
santhoshtr / Malayalam-Syllable.peg
Last active May 27, 2017 11:26
Malayalam Syllable Model using PEG
View Malayalam-Syllable.peg
Word = Syllable+
Syllable = s:( Vowel
/ Chillu
/ ( Conjunct / Consonant ) Signs
/ ZWNJ
) {
if ( Array.isArray( s ) ) {
return s.join( '' )
}
return s