Folder structure:
__init__.py is a blank file.
├── RandInit_HMM_Py
│ ├── __init__.py
│ ├── demoRunPkg.py
│ ├── demoRunIn.py
|.. ├── helper.py
| # Using regerssion as example to test my xavier initilizer | |
| # Data | |
| data(BostonHousing, package="mlbench") | |
| train.ind = seq(1, 506, 3) | |
| train.x = data.matrix(BostonHousing[train.ind, -14]) | |
| train.y = BostonHousing[train.ind, 14] | |
| test.x = data.matrix(BostonHousing[-train.ind, -14]) | |
| test.y = BostonHousing[-train.ind, 14] |
| # create rootless, set up sudo user | |
| # https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-14-04 | |
| sudo apt-get update | |
| sudo apt-get install git | |
| sudo apt-get install ruby | |
| # install linux homebrew | |
| ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/linuxbrew/go/install)" | |
| # vim ~/.bashrc | |
| export PATH="$HOME/.linuxbrew/bin:$PATH" |
| ;; -*- mode: emacs-lisp -*- | |
| ;; This file is loaded by Spacemacs at startup. | |
| ;; It must be stored in your home directory. | |
| (defun dotspacemacs/layers () | |
| "Configuration Layers declaration. | |
| You should not put any user code in this function besides modifying the variable | |
| values." | |
| (setq-default | |
| ;; Base distribution to use. This is a layer contained in the directory |
| { | |
| "bold_folder_labels": true, | |
| "color_scheme": "Packages/User/SublimeLinter/Solarized (Light) (SL).tmTheme", | |
| "fade_fold_buttons": false, | |
| "font_size": 16, | |
| "highlight_line": true, | |
| "ignored_packages": | |
| [ | |
| "Markdown", | |
| "Vintage" |
| # Created by http://www.gitignore.io | |
| *.xcodeproj/* | |
| ### Xcode ### | |
| DerivedData/* | |
| build/ | |
| *.pbxuser | |
| !default.pbxuser | |
| *.mode1v3 | |
| !default.mode1v3 | |
| *.mode2v3 |
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| """ | |
| - multiprossing 101 | |
| - whether multiprocessing could contain subprocess work | |
| @contact: Yun Yan ([email protected]) | |
| """ | |
| import subprocess | |
| from multiprocessing import Pool | |
| import os |
Folder structure:
__init__.py is a blank file.
├── RandInit_HMM_Py
│ ├── __init__.py
│ ├── demoRunPkg.py
│ ├── demoRunIn.py
|.. ├── helper.py
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| """ | |
| @contact: Yun Yan ([email protected]) | |
| """ | |
| from ruffus import * | |
| from helper import * |
| set.seed(1234) | |
| g <- sample_gnp(n=10, 0.15) #make_ring(10) | |
| V(g)$name <- letters[1:10] | |
| plot(g) | |
| rm_e <- combinations(n=3, r=2, v=c('b', 'i', 'c')) | |
| rm_e_do <- apply(rm_e, 1, function(r) are.connected(g, r[1], r[2])) | |
| rm_e <- rm_e[rm_e_do, ] %>% apply(., 1, paste, collapse='|') | |
| par(mfrow=c(1, 2)) | |
| plot(g) | |
| plot(g - edge(rm_e)) |