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
'''Thermo | |
A python module used to retrieve information about various other properties of steam , when either temperature , pressure and one of enthalpy , entropy , specific volume and quality are given . | |
Author = S.Manoj Kumar | |
''' | |
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
class Model(object): |
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
from hpolib.benchmarks.ml import svm_benchmark | |
from ConfigSpace.hyperparameters import FloatHyperparameter, IntegerHyperparameter | |
from skopt import gp_minimize | |
svm_bench = svm_benchmark.SvmOnMnist() | |
bounds = svm_bench.get_meta_information()["bounds"] | |
hyperparams = svm_bench.configuration_space.get_hyperparameters() | |
new_bounds = [] | |
for i, (l_b, u_b) in enumerate(bounds): |
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
from sklearn.datasets import load_boston | |
from sklearn.model_selection import train_test_split | |
from sklearn.tree import DecisionTreeRegressor | |
from sklearn.ensemble import RandomForestRegressor | |
boston = load_boston() | |
X, y = boston.data, boston.target | |
X_train, X_test, y_train, y_test = train_test_split( | |
X, y, train_size=0.6, test_size=0.4, random_state=0) | |
X_train = np.array(X_train, dtype=np.float32) |
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
[array([ 1.93743793, 2.30290486, 14.52240377, 2.30262299, | |
1.95685067, 2.30586127, 1.14091716, 1.91978845, | |
2.30250415, 1.53107564, 2.30258038, 2.30215575, | |
2.3025886 , 2.26822514, 2.1281669 , 2.32953785, | |
2.18480186, 2.31662579, 2.30259784, 2.11116244, | |
2.30262142, 2.30337757, 2.06764852, 2.31965076, | |
2.3030167 , 2.0474523 , 2.12057801, 2.06735832, | |
2.30270004, 2.31166795, 2.30260678, 2.16387814, | |
2.10967536, 2.30661086, 2.11461189, 2.3029234 , | |
2.07641528, 2.08500446, 2.0747728 , 2.30185462, |
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
1. ssh mks542@hpc.nyu.edu | |
2. ssh -X mercer | |
To create an interactive job on the GPU: | |
# You should increase the mem and walltime argument depending on the requirement. | |
3. qsub -I -l nodes=1:ppn=1:gpus=1,mem=32GB,walltime=03:00:00 | |
4. module load librosa/0.4.1 | |
5. module avail tensorflow | |
# Choose the version you would like. | |
6. module load tensorflow/python2.7/20161207 |
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
#!/bin/bash | |
#PBS -l nodes=1:ppn=1:gpus=1 | |
#PBS -l walltime=8:00:00 | |
#PBS -l mem=50GB | |
#PBS -N name_of_script | |
#PBS -M emailid | |
#PBS -m b -m e -m a -m abe | |
#PBS -j oe | |
module purge |
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
[array([-0.2792, -0.2379, -0.2677, -0.1 , -0.1 , -0.1 , -0.0927, | |
-0.2448, -0.3269, -0.1142, -0.1002, -0.6134, -0.1902, -0.1 , | |
-0.0988, -0.1 , -0.1 , -0.1 , -0.1058, -0.1 , -0.1073, | |
-0.4381, -0.1824, -0.1832, -0.1785, -0.106 , -0.2397, -0.1648, | |
-0.1088, -0.1 , -0.163 , -0.1 , -0.1531, -0.1 , -0.1 , | |
-0.1 , -0.1 , -0.1049, -0.1 , -0.1 , -0.1509, -0.144 , | |
-0.1056, -0.1207, -0.1779, -0.1 , -0.1213, -0.1 , -0.496 , | |
-0.1816])] | |
Mean optimum: -0.6134 |
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
import tensorflow as tf | |
class test(object): | |
def test_func(self, pass=1): | |
to_hidden_W = tf.get_variable( | |
"to_hidden_W", | |
shape=[2, 2]) | |
with tf.variable_scope("Model", reuse=True): | |
a = test() |
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
import os | |
import numpy as np | |
import scipy.io.wavfile as wav | |
def convert_mp3_to_wav(folder, sampling_freq=44.1): | |
""" | |
Converts a directory with mp3 files to wav files. |
NewerOlder