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
| #My very first Python program using Pygame library displaying real-time clock | |
| import time,pygame | |
| #initialize pygame library | |
| pygame.init() | |
| theFont=pygame.font.Font(None,72) | |
| clock = pygame.time.Clock() | |
| screen = pygame.display.set_mode([320, 200]) | |
| pygame.display.set_caption('Pi Time') |
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
| # 0 is too far from ` ;) | |
| set -g base-index 1 | |
| # Automatically set window title | |
| set-window-option -g automatic-rename on | |
| set-option -g set-titles on | |
| #set -g default-terminal screen-256color | |
| set -g status-keys vi | |
| set -g history-limit 10000 |
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
| # Example for my blog post at: | |
| # http://danijar.com/introduction-to-recurrent-networks-in-tensorflow/ | |
| import functools | |
| import sets | |
| import tensorflow as tf | |
| def lazy_property(function): | |
| attribute = '_' + function.__name__ |
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
| # Working example for my blog post at: | |
| # http://danijar.com/variable-sequence-lengths-in-tensorflow/ | |
| import functools | |
| import sets | |
| import tensorflow as tf | |
| from tensorflow.models.rnn import rnn_cell | |
| from tensorflow.models.rnn import rnn | |
| def lazy_property(function): |
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
| # the code is explained here: https://youtu.be/Eex4zBc9r7Y | |
| import os | |
| def main(): | |
| files = os.listdir("./") | |
| for f in files: | |
| if f.lower()[-3:] == "mp4": | |
| print "processing", f | |
| process(f) |