A tentative in replicating http://bl.ocks.org/mbostock/963c4d246e96963856bf
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
https://stackoverflow.com/a/34301262 | |
find . -name '*.TXT' -exec grep -H 'foo' {} ';' |
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
See http://superuser.com/a/561007/71255 | |
sudo apt-get --only-upgrade install google-chrome-stable | |
sudo pkill -15 google-chrome | |
sudo pkill -15 chrome |
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
# https://stackoverflow.com/questions/33423107/how-to-find-2-lines-given-only-points | |
clear; | |
pkg load image | |
img = rgb2gray(imread("VGUM6.png")); | |
img = img < 128; | |
rp = regionprops(bwlabel(img)); | |
X = zeros(1,size(rp)(1)); | |
Y = zeros(1,size(rp)(1)); |
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
% http://dsp.stackexchange.com/questions/1637/what-does-frequency-domain-denote-in-case-of-images | |
%b=zeros(10,200); | |
%w=ones(10,200); | |
%bw=[b;w]; | |
%img=repmat(bw,10,1); | |
%imshow(img); | |
%F = fft2(img); | |
%figure | |
%imshow(log(abs(fftshift(F)) + 1), []) |
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
# Per i dettagli vedi http://www.sumsar.net/blog/2015/11/a-bayesian-model-to-calculate-whether-my-wife-is-pregnant/ | |
# A Bayesian model that calculates a probability that a couple is fertile | |
# and pregnant. Please use this for fun only, not for any serious purpose | |
# like *actually* trying to figure out whether you are pregnant. | |
# Enter your own period onsets here: | |
period_onset <- as.Date(c("2014-07-02", "2014-08-02", "2014-08-29", "2014-09-25", | |
"2014-10-24", "2014-11-20", "2014-12-22", "2015-01-19")) | |
# If you have no dates you can just set days_between_periods to c() instead like: |
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
Show hidden characters
{ | |
"cmd": ["Rscript", "$file"], | |
"selector": "source.r" | |
} |
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
# Download Sublime Text 2 from http://www.sublimetext.com/2 | |
# If you aren't root, sudo su | |
tar -xvjf Sublime\ Text\ 2*.tar.bz2 | |
mv Sublime\ Text\ 2/ /opt/sublime-text-2/ | |
ln -s /opt/sublime-text-2 /usr/local/sublime-text-2 | |
ln -s /usr/local/sublime-text-2/sublime_text /usr/local/bin/sublime_text | |
rm Sublime\ Text\ 2*.tar.bz2 | |
# Sublime Text 2 can now be run as normal user with command "sublime_text" |