The popular open-source contract for web professionals by Stuff & Nonsense
- Originally published: 23rd December 2008
- Revised date: March 15th 2016
- Original post
| # | |
| # Original solution via StackOverflow: | |
| # http://stackoverflow.com/questions/35802939/install-only-available-packages-using-conda-install-yes-file-requirements-t | |
| # | |
| # | |
| # Install via `conda` directly. | |
| # This will fail to install all | |
| # dependencies. If one fails, | |
| # all dependencies will fail to install. |
| # TODO: Verify to link statically some dependencies usually not available in a default instllation of RHEL/CentOS (ex.: libxcb) | |
| ################### | |
| ## Configuration ## | |
| ################### | |
| export FFMPEG_CPU_COUNT=$(nproc) | |
| export FFMPEG_ENABLE="--enable-gpl --enable-version3 --enable-nonfree --enable-runtime-cpudetect --enable-gray --enable-openssl --enable-libfreetype" | |
| export FFMPEG_HOME=/usr/local/src/ffmpeg |
| 1324/1324 [==============================] - 1s - loss: 0.0045 - acc: 1.0000 - categorical_accuracy: 1.0000 - top_k_cate | |
| gorical_accuracy: 1.0000 - mean_absolute_error: 9.8899e-04 - mean_squared_error: 1.9106e-05 - val_loss: 0.0102 - val_acc | |
| : 1.0000 - val_categorical_accuracy: 1.0000 - val_top_k_categorical_accuracy: 1.0000 - val_mean_absolute_error: 0.0020 - | |
| val_mean_squared_error: 3.0197e-04 | |
| Epoch 20/50 | |
| 128/1324 [=>............................] - ETA: 0s - loss: 0.0035 - acc: 1.0000 - categorical_accuracy: 1.0000 - top_k | |
| 384/1324 [=======>......................] - ETA: 0s - loss: 0.0037 - acc: 1.0000 - categorical_accuracy: 1.0000 - top_k | |
| 640/1324 [=============>................] - ETA: 0s - loss: 0.0042 - acc: 1.0000 - categorical_accuracy: 1.0000 - top_k | |
| 896/1324 [===================>..........] - ETA: 0s - loss: 0.0041 - acc: 1.0000 - categorical_accuracy: 1.0000 - top_k | |
| 1152/1324 [=========================>....] - ETA: 0s - loss: 0.0040 - acc: 1.0000 - categorical_accuracy: 1.0000 - top_k |
| import tensorflow as tf | |
| import tflearn | |
| import os | |
| import numpy as np | |
| import time | |
| from collections import deque | |
| from sklearn.model_selection import train_test_split | |
| from tflearn.data_utils import to_categorical |
| import imageio | |
| import os | |
| import numpy as np | |
| import tensorflow as tf | |
| import tflearn | |
| import pickle | |
| from collections import deque | |
| from sklearn.model_selection import train_test_split | |
| from tflearn.data_utils import to_categorical |
GitLab is open source software to collaborate on code (a GitHub clone to run on your own server). Clicking a blob (a file in a repository) in GitLab shows a nice rendering if GitLab supports the file type (e.g., images, Markdown documents), or its content as plain text otherwise. The patch described here adds support to GitLab for rendering IPython notebooks (.ipynb files).
| import csv | |
| import glob | |
| file_list = glob.glob("*/*.csv") | |
| print(file_list) | |
| for file_name in file_list: | |
| with open(file_name, "r") as source: | |
| rdr = csv.reader(source) | |
| with open(file_name+"-lstm", "w") as result: |
| def load_data(data_dir, labels): | |
| X_signals_train = np.zeros((1,9)) | |
| X_signals_test = np.zeros((1,9)) | |
| y_train = np.zeros([1,1]) | |
| y_test = np.zeros([1,1]) | |
| for label in labels: | |
| for root, dirs, files in os.walk(data_dir + "/" + label): | |
| for filename in files: | |
| signal = genfromtxt(data_dir + "/" + label + "/" + filename, delimiter=',') | |
| #print (signal) |