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).
This file contains hidden or 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 | |
| # Extract jpgs from videos inside categorized folders for Inception training | |
| for d in */ ; | |
| do | |
| for i in $d/*.mp4; | |
| do | |
| mkdir $d/$d; | |
| ffmpeg -i "$i" -r 10 "${d}/${d}/`basename "${i}"-%04d`.jpg"; | |
| done; | |
| done |
This file contains hidden or 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
| python ~/tensorflow/tensorflow/examples/image_retraining/retrain.py \ | |
| --bottleneck_dir=bottlenecks_sg \ | |
| --model_dir=inception \ | |
| --output_graph=bottlenecks_sg/retrained_graph.pb \ | |
| --output_labels=bottlenecks_sg/retrained_labels.txt \ | |
| --image_dir multimodal_jpg \ | |
| --summaries_dir summaries_sg |
This file contains hidden or 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
| for i in *.h264; | |
| do | |
| MP4Box -add $i `basename "${i}"`.mp4; | |
| done; |
This file contains hidden or 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
| 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) |
This file contains hidden or 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 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: |
This file contains hidden or 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 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 |
This file contains hidden or 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 | |
| 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 |
The popular open-source contract for web professionals by Stuff & Nonsense
- Originally published: 23rd December 2008
- Revised date: March 15th 2016
- Original post
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer