Skip to content

Instantly share code, notes, and snippets.

NAMD APOA1 benchmark on i7-6900K CPU @ 3.20GHz +2080Ti + 2x1080Ti
----------------------------------------------------------------
# source: https://www.ks.uiuc.edu/Research/namd/utilities/
---
# delete FFTW_NMAD_*** before start (calculates specific FFT, for number of GPUs)
namd2 +p16 +devices 0,1,2 stmv.namd WallClock: 87.422867 CPUTime: 86.867996 Memory: 3174.035156 MB
namd2 +p8 +devices 0,1,2 stmv.namd WallClock: 72.966972 CPUTime: 72.678879 Memory: 3104.535156 MB
# Update clean 16 to 18 LTS
# VM install OpenBox
# sudo adduser [your-user-name] vboxsf
# shared on media/sf_share
sudo adduser ubuntu16 vboxsf
# remove old mono
sudo apt-get purge libmono* cli-common mono-runtime mono-devel
sudo apt-get autoremove
# requires input file HUMAN.fasta (or others) writes it sorted by sequence length to HUMAN-sort.fasta
# source https://www.biostars.org/p/153999/
awk '/^>/ {printf("%s%s\t",(N>0?"\n":""),$0);N++;next;} {printf("%s",$0);} END {printf("\n");}' HUMAN.fasta |\
awk -F '\t' '{printf("%d\t%s\n",length($2),$0);}' |\
sort -k1,1n | cut -f 2- | tr "\t" "\n" > HUMAN-sort.fasta
@tobigithub
tobigithub / ramdisk-ubuntu.txt
Created March 25, 2019 00:21
Ramdisk under ubuntu increases throughput and latency
**************************************************************
* Using a Ramdisk under Ubuntu
* Increases throughput 1:12 (151 Mbyte/sec to 1900 Mbyte/sec)
* Increases latency 1:300 (0.15 Mbyte/sec to 126 Mbyte/sec)
***************************************************************
# create 10 Gbyte ramdisk ubuntu
sudo mkdir -p /media/ramdisk
sudo mount -t tmpfs -o size=10G tmpfs /media/ramdisk/
@tobigithub
tobigithub / MNIST_Keras2DML.py
Created March 1, 2019 23:58 — forked from NiloyPurkait/MNIST_Keras2DML.py
An example of using Apache SparkML to train a convolutional neural network in parallel using the MNIST dataset, on IBM watson studio. Written for medium article: https://medium.com/@niloypurkait/how-to-train-your-neural-networks-in-parallel-with-keras-and-apache-spark-ea8a3f48cae6
################################### Keras2DML: Parallely training neural network with SystemML#######################################
import tensorflow as tf
import keras
from keras.models import Sequential
from keras.layers import Input, Dense, Conv1D, Conv2D, MaxPooling2D, Dropout,Flatten
from keras import backend as K
from keras.models import Model
import numpy as np
import matplotlib.pyplot as plt
# -*- coding: utf-8 -*-
"""
@author: Tobias Kind // Fiehnlab (2018)
Program to convert MONA MSP files to MGF files
mona.fiehnlab.ucdavis.edu
"""
# parser reads MSP and converts to MGF
# needs to check for adducts including "[M+H]+" "[M-H]-" "[M]+"
import matplotlib
import numpy as np
import matplotlib.pyplot as plt
np.random.seed(19680801)
# example data
mu = 100 # mean of distribution
sigma = 15 # standard deviation of distribution
x = mu + sigma * np.random.randn(437)
"""
Created on Wed Aug 15 18:44:28 2018
Simple regression example for Keras (v2.2.2) with Boston housing data
@author: tobigithub
"""
from tensorflow import set_random_seed
from keras.datasets import boston_housing
from keras.models import Sequential
from keras.layers.normalization import BatchNormalization
from keras.callbacks import EarlyStopping
@tobigithub
tobigithub / keras-MNIST.py
Last active August 13, 2018 07:54
keras-MNIST-99
# -*- coding: utf-8 -*-
"""
Created on Sat Aug 11 22:09:53 2018
@author: Keras doc
https://github.com/keras-team/keras/blob/master/examples/mnist_cnn.py
"""
'''Trains a simple convnet on the MNIST dataset.
Gets to 99.25% test accuracy after 12 epochs
# https://github.com/Microsoft/LightGBM/blob/ca30b8cb16e535ca5482c127986842bd4d5a99b8/docs/Parameters.md
# https://github.com/Microsoft/LightGBM/issues/127#issuecomment-267755141
library(data.table)
library(lightgbm)
data(agaricus.train, package = "lightgbm")
train <- agaricus.train
dtrain <- lgb.Dataset(train$data, label = train$label, free_raw_data = FALSE)