http://www.randalolson.com/2012/08/06/statistical-analysis-made-easy-in-python/
Tuesday, December 31, 2013
Sunday, December 29, 2013
Friday, December 20, 2013
Thursday, December 19, 2013
healthvis | Interactive visualization in health: Package version 1.2
R with D3 graphics, check out their survival plot.
Monday, December 16, 2013
Join command combines two data file on similar field
http://blog.comsysto.com/2013/04/25/data-analysis-with-the-unix-shell/
It is also possible to make joins in the Unix shell with the command called join. The join command assumes that input data is sorted based on the key on which the join is going to take place. You can find another dataset on github which contains countries. This dataset is a comma separated list as well. The 14th column in the country dataset represents the capital id which is similar to the id in the city data set. This makes it possible to create a list of countries with their capitals.
| 1 2 3 4 5 6 7 8 9 | bz@cs ~/data/ $ cat city | head -n 2 1,Kabul,AFG,Kabol,1780000 2,Qandahar,AFG,Qandahar,237500bz@cs ~/data/ $ cat country | head -n 2 AFG,Afghanistan,Asia,Southern and Central Asia,652090,1919,22720000,45.9,5976.00,,Afganistan/Afqanestan,Islamic Emirate,Mohammad Omar,1,AF NLD,Netherlands,Europe,Western Europe,41526,1581,15864000,78.3,371362.00,360478.00,Nederland,Constitutional Monarchy,Beatrix,5,NLbz@cs ~/data/ $ join -t "," -1 1 -2 14 -o '1.2,2.2' city country | head -n 2 Kabul,Afghanistan Amsterdam,Netherlands |
Fwd: unix tips
Get some sampled data of a very big file
awk 'BEGIN { srand(systime()); } {if (rand() < 0.3) { print $0; } }' data.csv
Sunday, December 15, 2013
Tuesday, December 3, 2013
# Print a multiplication table.
printf "%3d %3d %3d %3d %3d %3d %3d %3d %3d %3d\n" $( echo {1..10}*{1..10}\; | bc )
Friday, November 29, 2013
Wednesday, November 27, 2013
Tuesday, November 26, 2013
Sunday, November 24, 2013
Saturday, November 23, 2013
Friday, November 22, 2013
Linux tips | cut complement
cut -d: -f2-4,7 --complement </etc/passwd # Cut the complement of columns 2-4,7. So in other words, gives you 1,5-6,8-
Monday, November 18, 2013
Thursday, November 14, 2013
Wednesday, October 23, 2013
Sunday, October 20, 2013
Turn everything that is not a sequence of numbers, into a comma.
echo abc1defg23hi456 | sed -r 's/[^0-9]+/,/g' #
Thursday, October 17, 2013
Tuesday, October 15, 2013
Gnu parallel with bedtools jaccard
Pairwise Jaccard statistic on many files using GNU parallel:
parallel "bedtools jaccard -a {1} -b {2} ::: `ls f*bed` ::: `ls f*bed`
Thursday, October 10, 2013
Wednesday, October 9, 2013
Monday, October 7, 2013
Saturday, October 5, 2013
Monday, September 23, 2013
Tuesday, September 17, 2013
Thursday, September 12, 2013
# Order lines of a file by the length of the line descending.
awk '{print length($0),$0}' names.txt | sort -nr | cut -d' ' -f2-
Wednesday, September 4, 2013
Sunday, September 1, 2013
Friday, August 30, 2013
Wednesday, August 28, 2013
Sort the output of df while keeping the header at the top.
df -hP | awk 'NR==1;NR>1{print|"sort -k5rn"}' #
Saturday, August 24, 2013
Tweet from Unix tool tip (@UnixToolTip)
Unix tool tip (@UnixToolTip) tweeted at 6:33 PM on Sat, Aug 24, 2013:
Form complementary DNA: sed s/ATCG/TAGC/g
(https://twitter.com/UnixToolTip/status/371256361197514752)
Get the official Twitter app at https://twitter.com/download