Skip to content

Instantly share code, notes, and snippets.

-- Reboot --
Oct 28 08:46:32 gateway systemd[1]: Starting Google Compute Engine Startup Scripts...
Oct 28 08:46:33 gateway startup-script[483]: INFO Starting startup scripts.
Oct 28 08:46:33 gateway startup-script[483]: INFO Found startup-script in metadata.
Oct 28 08:46:38 gateway startup-script[483]: INFO startup-script: Unable to find image 'google/cloud-sdk:latest' locally
Oct 28 08:46:39 gateway startup-script[483]: INFO startup-script: latest: Pulling from google/cloud-sdk
Oct 28 08:46:39 gateway startup-script[483]: INFO startup-script: e4c3d3e4f7b0: Pulling fs layer
Oct 28 08:46:39 gateway startup-script[483]: INFO startup-script: 56c33728d4fb: Pulling fs layer
Oct 28 08:46:39 gateway startup-script[483]: INFO startup-script: bfce832607f8: Pulling fs layer
Oct 28 08:46:39 gateway startup-script[483]: INFO startup-script: f6a95ba73cf4: Pulling fs layer
from keras import Input, Model
from keras.callbacks import Callback
from keras.layers import Dense, BatchNormalization, Lambda, Flatten, Dropout
import numpy as np
from sklearn.metrics import roc_auc_score
import tensorflow as tf
from keras import backend as K
# generate random test data
m = 10000
@Voyz
Voyz / premiere_pro_preload_thumbnails.ahk
Last active June 5, 2019 15:54
Adobe Premiere Pro - thumbnail preloading with AutoHotkey (Windows only)
; Usage:
; 1. Open Premiere
; 2. Select the bin you'd like to preload, even better - fullscreen it using tilde ` key.
; (Make sure you're in Icon View, not List View)
; 3. Run this script
; 4. Manually input the number of items in the bin
; 5. You can grab a coffee or browse internet in the meantime (though be aware keyboard may not work 100% well)
; 6. Repeat for each bin you'd like to preload
#Persistent
@Voyz
Voyz / gist:6d5619c86b326432b49d7d9c08c88240
Last active April 11, 2018 21:29
visualise features for tensorflow
# feature - the tensor you want to visualise in shape [num_examples, dimX, dimY, channels]. If dims are provided, the feature tensor can be flattened. Eg shape: [20, 7, 7, 16]
# grid - the dimensions of a grid on which the features will be displayed. Expects a touple (x,y) where x * y have to equal to channels of the feature. Eg, for 16 channels, grid=[4,4]
# dims (optional) - dimensions of each feature. Eg. for feature [20, 7, 7, 16], dims=[7,7] (although in non-flattened tensor the dims can be ommited)
# max_outputs - number of examples to draw
def visualise_feature(feature, grid, dims=None, max_outputs=10):
with tf.name_scope('Visualize_filters') as scope:
original_shape = feature.get_shape().as_list()
original_len = len(original_shape)