Skip to content

Instantly share code, notes, and snippets.

@mpekalski
mpekalski / tensorboard_logging.py
Created August 30, 2017 21:26 — forked from gyglim/tensorboard_logging.py
Logging to tensorboard with manually generated summaries (not relying on summary ops)
"""Simple example on how to log scalars and images to tensorboard without tensor ops."""
__author__ = "Michael Gygli"
import tensorflow as tf
from StringIO import StringIO
import matplotlib.pyplot as plt
import numpy as np
class Logger(object):
"""Logging in tensorboard without tensorflow ops."""
@mpekalski
mpekalski / firewall.sh
Created January 19, 2016 00:32 — forked from englercj/firewall.sh
iptables setup
#!/bin/bash
IPT="/sbin/iptables"
### Interfaces ###
PUB_IF="eth0" # public interface
PRV_IF="eth1" # private interface
LO_IF="lo" # loopback
SERVER_IP=$(ifconfig eth0 | grep 'inet addr:' | awk -F'inet addr:' '{ print $2}' | awk '{ print $1}')