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
# Recursively copy all the avi videos in some file structure to a flat folder | |
# Source: https://stackoverflow.com/a/1936214 | |
find . -iname '*.avi' -exec cp \{\} ../videos/ \; | |
# ffmpeg convert avi to mp4 | |
ffmpeg -i infile.avi youroutput.mp4 | |
# Convert all avi's in a folder to mp4 with ffmpeg | |
# Source: https://stackoverflow.com/a/33766147 | |
for i in *.avi; do ffmpeg -i "$i" -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" "${i%.*}.mp4"; done |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
#!/user/bin/env python | |
''' | |
This is a template file to get your project on the road quickly! | |
Last updated: July 27th, 2017 | |
''' | |
__author__ = 'Brian Pugh' | |
__email__ = '[email protected]' |
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 optimistic_restore(session, save_file, variable_scope=''): | |
''' | |
A Caffe-style restore that loads in variables | |
if they exist in both the checkpoint file and the current graph. | |
Call this after running the global init op. | |
By DanielGordon10 on December 27, 2016 | |
https://github.com/tensorflow/tensorflow/issues/312 | |
With RalphMao tweak. | |
bpugh, July 21, 2017: Added a variable_scope so that a network can be |
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 get_checkpoints(checkpoint_dir): | |
''' | |
Finds all checkpoints in a directory and returns them in order | |
from least iterations to most iterations | |
''' | |
meta_list=[] | |
for file in os.listdir(checkpoint_dir): | |
if file.endswith('.meta'): | |
meta_list.append(os.path.join(checkpoint_dir, file[:-5])) | |
meta_list = sort_nicely(meta_list) |
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
Create a tmux conf file | |
#> touch ~/.tmux.conf | |
Install TMP | |
#> git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm | |
[Copy and paste tmux.conf below into local file.] | |
Load tmux configurations | |
#> tmux source-file ~/.tmux.conf |
NewerOlder