Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Santhosh Thottingal santhoshtr

🎯
Focusing
Block or report user

Report or block santhoshtr

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@santhoshtr
santhoshtr / hd-playlist-audio-downloader.sh
Created Jul 9, 2018
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 Apr 6, 2018
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 Dec 10, 2017
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 Sep 18, 2017
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
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
@santhoshtr
santhoshtr / Malayalam-Conjunct.peg
Last active May 21, 2017
Malayalam Conjuct defined in Parser expression grammar
View Malayalam-Conjunct.peg
Conjunct = Consonant Virama (Conjunct / Consonant )
Consonant = [കഖഗഘങചഛജഝഞടഠഡഢണതഥദധനപഫബഭമയരലവശഷസഹളഴറ]
Virama = [്]
@santhoshtr
santhoshtr / limited-language.html
Created Oct 24, 2016
jquery.ime custom language set
View limited-language.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>jQuery IME example</title>
<meta name="author" content="Santhosh Thottingal" />
<link href="../css/jquery.ime.css" rel="stylesheet" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script src="../src/jquery.ime.js"></script>
@santhoshtr
santhoshtr / ManjariVariants.tex
Created Jul 30, 2016
Manjari Font variants Xelatex
View ManjariVariants.tex
\documentclass[11pt]{article}
\usepackage{polyglossia}
\newfontfamily{\manjari}[Script=Malayalam]{Manjari}
\newfontfamily{\manjaril}[Script=Malayalam, UprightFont={* Thin}]{Manjari}
\newfontfamily{\manjarib}[Script=Malayalam, UprightFont={* Bold}]{Manjari}
\begin{document}
\manjaril മലയാളത്തിനായി പുതിയൊരു യുണിക്കോഡ് അക്ഷരരൂപം കൂടി സ്വതന്ത്ര മലയാളം കമ്പ്യൂട്ടിങ്ങ് സമ്മാനിയ്ക്കുന്നു.
\manjari മലയാളത്തിനായി പുതിയൊരു യുണിക്കോഡ് അക്ഷരരൂപം കൂടി സ്വതന്ത്ര മലയാളം കമ്പ്യൂട്ടിങ്ങ് സമ്മാനിയ്ക്കുന്നു.
@santhoshtr
santhoshtr / cx.ipynb
Last active May 3, 2016
CX Stats Notebook
View cx.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@santhoshtr
santhoshtr / uls-woff2.sh
Created May 3, 2016
ULS webfonts to woff2
View uls-woff2.sh
fontInfos=$(find ../data -name 'font.ini')
#for f in $fontInfos; do sed -i -n 'p; s/woff/woff2/gp' $f; done
# Change to point to your fonts directory as needed
ttfs=$(find ../data -name '*.ttf')
# Create .woff2 versions of your ttf files
#for f in $ttfs; do woff2_compress $f || { echo "Fail on $f"; exit 1; }; done
woff2s=$(find ../data -name '*.woff2')
for f in $woff2s; do git add $f || { echo "Fail on $f"; exit 1; }; done
You can’t perform that action at this time.