Skip to content

Instantly share code, notes, and snippets.

View evtimovi's full-sized avatar

Ivan Evtimov evtimovi

View GitHub Profile
@eerwitt
eerwitt / load_jpeg_with_tensorflow.py
Created January 31, 2016 05:52
Example loading multiple JPEG files with TensorFlow and make them available as Tensors with the shape [[R, G, B], ... ].
# Typical setup to include TensorFlow.
import tensorflow as tf
# Make a queue of file names including all the JPEG images files in the relative
# image directory.
filename_queue = tf.train.string_input_producer(
tf.train.match_filenames_once("./images/*.jpg"))
# Read an entire image file which is required since they're JPEGs, if the images
# are too large they could be split in advance to smaller files or use the Fixed
@SamvitJ
SamvitJ / Paxos.txt
Created October 23, 2016 17:36
Paxos Pseudocode
--- Paxos Proposer ---
proposer(v):
choose n > n_p
send prepare(n) to all servers including self
if prepare_ok(n, n_a, v_a) from majority:
v’ = v_a with highest n_a; choose own v otherwise
send accept(n, v’) to all
if accept_ok(n) from majority:
send decided(v’) to all