Wednesday, June 4, 2014

Clean Old Linux Kernels (Ubuntu)

dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge

Credit: http://ubuntugenius.wordpress.com/2011/01/08/ubuntu-cleanup-how-to-remove-all-unused-linux-kernel-headers-images-and-modules/

Friday, December 20, 2013

Dependency Walker 2.2

Dependency Walker is a free utility that scans any 32-bit or 64-bit Windows module (exe, dll, ocx, sys, etc.) and builds a hierarchical tree diagram of all dependent modules.

http://www.dependencywalker.com/

Wednesday, June 26, 2013

Flash Troubleshooting

http://kb.mozillazine.org/Flash#Troubleshooting

C:\Windows\System32\Macromed\Flash
mms.cfg
ProtectedMode=0

about:config
dom.ipc.plugins.timeoutSecs -> -1
dom.ipc.plugins.enabled.* -> false

Turn off hardware acceleration:
http://kb.mozillazine.org/Flash#Performance_or_display_issues_with_certain_Flash_videos

Thursday, June 20, 2013

a mcparallel/mccollect example

An example of mcparallel/mccollect to perform parallel tasks by creating external tasks.

library(parallel)

loop_function <- function (name, duration) {
start_time <- date()
i <- 0
while (i < duration) {
i <- i + 1
}
return (paste("Done: Job: ", name, "from", start_time, " to ", date()))
}
jobs_parallel <- lapply(1:9, function(x) mcparallel(loop_function(x, 3000000), name = x))
mccollect(jobs_parallel)
jobs_serial <- lapply(1:9, function(x) loop_function(x, 3000000))
jobs_serial

credits:

http://www.slideshare.net/bytemining/taking-r-to-the-limit-high-performance-computing-in-r-part-1-parallelization-la-r-users-group-727


http://stat.ethz.ch/R-manual/R-devel/library/parallel/doc/parallel.pdf

Thursday, June 13, 2013

Building R packages in Windows

http://www.biostat.wisc.edu/~kbroman/Rintro/Rwinpack.html

After installing Rtools and fixing the PATH, you can use RStudio to build the packages. The built packages can be used in R too:

install.packages("path/to/the/package", type="source")

Thursday, April 25, 2013