Skip to content

Instantly share code, notes, and snippets.

@adamist521
adamist521 / troubleshooting.org
Created January 25, 2021 11:55
ob-sync trouble-shooting

Issue Reporting Checklist

This checklist will help you diagnose problems with your ob-async setup.

Instructions

Execute the src blocks one at a time with ctrl-c ctrl-c to ensure that ob-async-org-babel-execute-src-block is used for files

@adamist521
adamist521 / multiGPUexp.py
Created April 13, 2016 08:34
A script to execute cmd on indivisual GPUs. It could be used when you want to run hyper parameter search experiment on multiple-GPU. (time module and itertools are optional)
import multiprocessing
import time
from itertools import product
def worker(q, cmd):
# get the gpu available from queue
rid = q.get()
# cmd execution
print cmd, rid
time.sleep(rid+0.9)
@adamist521
adamist521 / install_handle.r
Last active January 19, 2016 03:16
R: install if no package available
if(require("pkg_name")){
print("pkg_name is loaded correctly")
} else {
print("trying to install pkg_name")
install.packages("pkg_name", repos="http://cran.ism.ac.jp")
if(require(pkg_name)){
print("pkg_name installed and loaded")
} else {
stop("could not install pkg_name")
}