Skip to content

Instantly share code, notes, and snippets.

@jaassoon
jaassoon / meraki_strongswan_notes.md
Created December 1, 2018 11:20 — forked from psanford/meraki_strongswan_notes.md
connect to meraki client vpn from strongswan (ubuntu 16.04 edition)

These are my notes for connecting to a meraki client vpn from ubuntu 16.04. This configuration assumes you are using a psk for the ipsec auth.

Install the following packages:

apt-get install -y strongswan xl2tpd

Configure strong swan

# This example shows how to use keras TensorBoard callback
# with model.train_on_batch
import tensorflow.keras as keras
# Setup the model
model = keras.models.Sequential()
model.add(...) # Add your layers
model.compile(...) # Compile as usual
@jaassoon
jaassoon / demo.py
Created November 12, 2018 12:51 — forked from joelthchao/demo.py
Keras uses TensorBoard Callback with train_on_batch
import numpy as np
import tensorflow as tf
from keras.callbacks import TensorBoard
from keras.layers import Input, Dense
from keras.models import Model
def write_log(callback, names, logs, batch_no):
for name, value in zip(names, logs):
summary = tf.Summary()
# cuda.sh
# check if GPU ready
lspci | grep -i nvidia
# If NVIDIA driver was installed via the *.run file:
# sudo nvidia-uninstall
yum install -y gcc gcc-c++ kernel-devel kernel-headers
yum install -y libXmu libXmu-devel mesa-libGLU mesa-libGLU-devel \
libX11-common.noarch libX11-devel libX11 \
libXi libXi-devel
yum -y update
# buildcv2.sh
#!/bin/bash
yum -y install gcc gcc-c++ freetype-devel glib2-devel cairo-devel libtool
basePath=/mnt/Data/jason
python36Path=/mnt/Data/jason/env36
#install colm
cd {basePath}/jp-ocr/3rdparty/{colm}
./autogen.sh
./configure
@jaassoon
jaassoon / squeezeNet-by-deeplearnjs.html
Last active January 16, 2018 12:20
squeezeNet-by-deeplearnjs
<!DOCTYPE html>
<html>
<script src="https://cdn.jsdelivr.net/npm/deeplearn"></script>
<script src='https://unpkg.com/deeplearn-squeezenet'></script>
<div id='target' ondrop='dropit(event);' ondragover='dragoverit(event);'>
Drag another image onto this image to predict (make sure browser window is focused).
<br><br>
If you have cross origin problems, download the image to your computer
first, then drag it here.
<div id='img'><img id='cat' src='https://storage.googleapis.com/learnjs-data/images/cat.jpeg' crossorigin></div>
@jaassoon
jaassoon / docker_ubuntu17.1_tensorflow_build_from_src.Dockerfile
Last active July 20, 2017 14:42
build tensorflow 1.2.1 from source in ubuntu17.1 by bazel
FROM ubuntu:17.10
ENV container docker
WORKDIR /opt
# ##### Configure the build for configuration.
ENV TF_NEED_GCP 0
ENV TF_NEED_HDFS 0
ENV TF_ENABLE_XLA 0
ENV TF_NEED_CUDA 0
ENV TF_NEED_OPENCL 0
@jaassoon
jaassoon / tf_serving.sh
Created July 15, 2017 00:04 — forked from jarutis/tf_serving.sh
Install Tensorflow Serving on Centos 7 (CPU)
sudo su
# Java
yum -y install java-1.8.0-openjdk-devel
# Build Esentials (minimal)
yum -y install gcc gcc-c++ kernel-devel make automake autoconf swig git unzip libtool binutils
# Extra Packages for Enterprise Linux (EPEL) (for pip, zeromq3)
yum -y install epel-release