This is mainly somewhere for me to dump interesting tidbits of tech info. Stuff that I may forget but will need again in the future. For a proper blog, visit my electronics blog (http://www.fangletronics.com) or my wife's pre-school crafty blog (http://www.filthwizardry.com).
I work remotely via a VPN and am often plagued by frozen SSH sessions (especially if I step away from my desk for any length of time). I always used to close the shell/terminal - which is a bit annoying. Then I came across the solution below, just type enter (in the frozen shell) then tilde and period/full-stop and you drop out of the ssh session.
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
I wanted to assign each member of a training set to a cross-validation fold. I wanted to do this in a bash script and so ended up using something like the following:
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
This script generates n numbers selected randomly in the series of integers from 1 to m. In this case m represents the number of cross validation folds.
You could generate a random CV fold assignment like so:
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
I'm a research scientist at a small start-up biotech company. I do a lot of programming at work and have been enjoying electronics at home when the kids are in bed.
Contact: paulbo@fangletronics.com