Skip to content

Instantly share code, notes, and snippets.

@arjunmenon
arjunmenon / Android.md
Created October 10, 2017 09:20
Filter adb logcat output by app name and pretty colors
adb logcat | grep `adb shell ps | grep com.package | cut -c10-15`
http://www.ling.upenn.edu/courses/Fall_2003/ling001/penn_treebank_pos.html
http://code.google.com/p/nltk/source/browse/trunk/nltk
http://wordnet.princeton.edu/wordnet/download/
http://code.google.com/p/nltk/source/browse/trunk/nltk/nltk/chunk/named_entity.py
http://www.writingcentre.uottawa.ca/hypergrammar/subjpred.html
http://nlp.stanford.edu/software/crf-faq.shtml
http://sourceforge.net/apps/mediawiki/opennlp/index.php?title=Name_Finder
http://en.wikipedia.org/wiki/Sentiment_analysis
http://arxiv.org/pdf/cs.LG/0212032
http://www.scribd.com/doc/7865458/the-learning-chatbot
@arjunmenon
arjunmenon / Raspberry Pi system wide audio DSP
Last active June 16, 2020 12:22
Easy robust Audio DSP guide for Raspberry Pi 3/ Pi Zero
https://github.com/bmc0/dsp/wiki/System-Wide-DSP-Guide
Supports Linkwitz Transform, Reverb, EQ and more.
Mostly you will be installing development packages. Some packages may be already installed. Check with dpkg -l <package name>
Configuration file needs to be created separately after make install.
INSTALL DEPENDENCIES
pi@raspberrypi:~ $ sudo apt-get update
@arjunmenon
arjunmenon / plate-snitch.js
Created August 30, 2017 16:18 — forked from taitems/plate-snitch.js
(Extract) Check the status of a vehicle registration and scrape results.
// Open form and submit enquire for `rego`
function getInfo(rego) {
horseman
.userAgent('Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0')
.open(url)
.type('#registration-number-ctrl input[type=text]', rego)
.click('.btn-holder input')
.waitForSelector('.ctrl-holder.ctrl-readonly')
.html()
.then(function(body) {
@arjunmenon
arjunmenon / convert-gifs.sh
Created August 26, 2017 13:41 — forked from shazow/convert-gifs.sh
Batch convert a directory of gifs into mp4
#!/usr/bin/bash
# Convert *.gif into *.mp4, skip if already exists.
outdir="."
for path in *.gif; do
out="${outdir}/${path/.gif/}.mp4"
[[ -f "$out" ]] && continue
ffmpeg -f gif -i "${path}" "${out}"
done
@arjunmenon
arjunmenon / gist:3b596c927702a0de6645ea86f2ac19b7
Last active January 27, 2018 14:18
Phonegap/Tabris Js mobile app development notes
#UPDATE NOTES WHILE PROGRESS
some points to remember while developing mobile apps with Phonegap and Tabris JS
Init
1. For Tabris JS
versioning should follow the [node-semver](https://github.com/npm/node-semver) format - X.X.X
2. For Phonegap
always create with `phonegap create myApp --id "org.myapp.sample" --name "appSample"`
This O
week, O
musician O
duo O
Danny B-PER
Cudd I-PER
and O
Markus B-PER
Offbeat I-PER
Johansson I-PER
@arjunmenon
arjunmenon / crf_accuracy.py
Created April 14, 2017 13:54 — forked from kindleton/crf_accuracy.py
Calculate accuracy for CRF++ output file
import sys
f1 = open(sys.argv[1])
count = 0
true = 0
false = 0
sentences = 0
for line in f1:
if line == '\n' or line.split()==[]:
sentences+=1
# Unigram
U00:%x[-3,0]
U01:%x[-2,0]
U02:%x[-1,0]
U03:%x[0,0]
U04:%x[1,0]
U05:%x[2,0]
U06:%x[3,0]
U07:%x[-1,0]/%x[0,0]
U08:%x[-2,0]/%x[0,0]
US B-ORG
drops O
biggest O
non-nuclear O
bomb O
in O
Afghanistan B-LOC
against O
Islamic B-ORG
State I-ORG