Skip to content

Instantly share code, notes, and snippets.

@gyglim
gyglim / tensorboard_logging.py
Last active August 23, 2023 21:29
Logging to tensorboard without tensorflow operations. Uses manually generated summaries instead of summary ops
"""Simple example on how to log scalars and images to tensorboard without tensor ops.
License: BSD License 2.0
"""
__author__ = "Michael Gygli"
import tensorflow as tf
from StringIO import StringIO
import matplotlib.pyplot as plt
import numpy as np
@englercj
englercj / firewall.sh
Last active July 7, 2018 16:05
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}')