Skip to content

Instantly share code, notes, and snippets.

View skyer9's full-sized avatar
🎯
Focusing

skyer9

🎯
Focusing
View GitHub Profile
@skyer9
skyer9 / klab-10-2-mnist_nn.py
Created April 22, 2017 11:02
neural network with cnn
from __future__ import print_function
import keras
from keras.datasets import mnist
from keras.models import Sequential
from keras.layers import Dense, Dropout
batch_size = 128
num_classes = 10
@skyer9
skyer9 / hello_sequence.py
Last active March 28, 2017 01:13 — forked from pannous/hello_sequence.py
Simple "Hello World" for tensorflow seq2seq model
# -*- coding: utf-8 -*-
"""Sequence-to-sequence model with an attention mechanism."""
# original code
# https://gist.github.com/pannous/b3f8ab944a85b33e694de21c6ded029e
# see https://www.tensorflow.org/versions/r0.10/tutorials/seq2seq/index.html
# compare https://github.com/tflearn/tflearn/blob/master/examples/nlp/seq2seq_example.py
from __future__ import print_function
import numpy as np
'''This script goes along the blog post
"Building powerful image classification models using very little data"
from blog.keras.io.
It uses data that can be downloaded at:
https://www.kaggle.com/c/dogs-vs-cats/data
In our setup, we:
- created a data/ folder
- created train/ and validation/ subfolders inside data/
@skyer9
skyer9 / node_debian_init.sh
Created December 17, 2015 08:45 — forked from peterhost/node_debian_init.sh
Daemon init script for node.js based app/server (DEBIAN/UBUNTU)
#!/bin/sh
# ------------------------------------------------------------------------------
# SOME INFOS : fairly standard (debian) init script.
# Note that node doesn't create a PID file (hence --make-pidfile)
# has to be run in the background (hence --background)
# and NOT as root (hence --chuid)
#
# MORE INFOS : INIT SCRIPT http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit
# INIT-INFO RULES http://wiki.debian.org/LSBInitScripts
# INSTALL/REMOVE http://www.debian-administration.org/articles/28