- SentiStrength: http://sentistrength.wlv.ac.uk/ - Used for multiple social web sentiment analysis. Can also do topic specific sentiment analysis. Multi linguial.
This file contains 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
#Enable mp3 in sox | |
yum install sox-plugins-freeworld | |
#Trim file in sox from 0 for 10 seconds | |
sox file1.mp3 output.mp3 trim 0 10 | |
#Mix multiple files in sox. |
This file contains 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
ls -name | where {$_ -cmatch "^[A-Z][a-z0-9]+[A-Z][A-Za-z0-9]+$" } | ren -new { ($_ -creplace "([A-Z0-9])", " $&").Trim() } |
This file contains 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
alias grep_p4o='p4 opened | (folder="${PWD##*/}"; sed -e "s/.*${folder}\/\(.*\)#.*/\1/g") | xargs -o grep --color=auto -H' |
This file contains 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
set scriptdir=%~dp0 | |
echo java -mx3g -cp \"%scriptdir%/*\" edu.stanford.nlp.pipeline.StanfordCoreNLP %* | |
java -mx3g -cp "%scriptdir%/*" edu.stanford.nlp.pipeline.StanfordCoreNLP %* |
This file contains 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
mysql --user=root --password=root --tee=./SQLSession.out | |
# To start the logging to the given file from the session use | |
# mysql> \T | |
# Logging to file ./SQLSession.out | |
# To stop logging use | |
# mysql> \t |
This file contains 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
SELECT ROUND(numeric_value, -2) AS bucket, | |
COUNT(*) AS COUNT, | |
RPAD('', LOG(COUNT(*)), '*') AS bar | |
FROM my_table | |
GROUP BY bucket; | |
/* | |
numeric_value = column name | |
-2 to round in steps of 100. Use -1 for steps of 10 and any positive vale for rounding to nearest decimal | |
LOG(COUNT(*)) is to make the count on log scale |
This file contains 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
void setup() { | |
// put your setup code here, to run once: | |
system("telnetd -l /bin/sh"); | |
system("ifconfig eth0 169.254.0.2 netmask 255.255.0.0 up"); | |
system("sudo service ssh start"); | |
} | |
void loop() { | |
// put your main code here, to run repeatedly: | |
This file contains 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
""" | |
Using Monte Carlo to find the value of pi. | |
Intiution: Ratio of area of circle to area of uniq length squre it is inscribed it can be used to approximate pi. | |
Area of circle = pi/4 | |
Area of square = 1 | |
Ratio = pi/4 | |
Let us generate random points x,y inside the square. The probabilty of the point being inside circle is equal to the above ratio. | |
Circle centered on origin. | |
Given: -0.5 <= x,y <= 0.5 | |
A point is inside circle if x**2 + y**2 <= 1/4 |
This file contains 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
/** | |
* progress.c - Progress bar and progress percentage in C. | |
* This program uses ANSI escape codes to show an always updating progress line in the terminal. | |
* Author: Shubhanshu Mishra | |
**/ | |
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> |