Skip to content

Instantly share code, notes, and snippets.

View se7oluti0n's full-sized avatar

Manh Truong Tuan se7oluti0n

View GitHub Profile
@se7oluti0n
se7oluti0n / 0_reuse_code.js
Created November 28, 2016 12:52
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@se7oluti0n
se7oluti0n / classifier_from_little_data_script_3.py
Created May 6, 2017 09:01 — forked from fchollet/classifier_from_little_data_script_3.py
Fine-tuning a Keras model. Updated to the Keras 2.0 API.
'''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/
- created cats/ and dogs/ subfolders inside train/ and validation/
- put the cat pictures index 0-999 in data/train/cats
import sys
sys.path.append('../../facenet/src')
import facenet
import argparse
import os
import importlib
import tensorflow as tf
from tqdm import tqdm
import tensorflow.contrib.slim as slim
@se7oluti0n
se7oluti0n / plotting_result.ipynb
Created May 18, 2017 10:40
Plotting megaface
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import numpy as np
from random import shuffle
from past.builtins import xrange
def svm_loss_naive(W, X, y, reg):
"""
Structured SVM loss function, naive implementation (with loops).
Inputs have dimension D, there are C classes, and we operate on minibatches
of N examples.
import numpy as np
from random import shuffle
from past.builtins import xrange
def softmax_loss_naive(W, X, y, reg):
"""
Softmax loss function, naive implementation (with loops)
Inputs have dimension D, there are C classes, and we operate on minibatches
of N examples.
[a,b,c,d for a,b in AB for c,d in CD if a if b if c]
@se7oluti0n
se7oluti0n / git-proxy.sh
Last active November 8, 2017 08:43 — forked from icantrap/git-proxy.sh
How to Github and Gitorious over HTTP proxy

You could always use Smart HTTP.

For read-only (git:) urls, install corkscrew.

  1. Download git-proxy.sh. Put it somewhere and make it executable.

  2. Run git config --global core.gitproxy '/usr/local/bin/git-proxy.sh'

To clone, push, pull over ssh, add the contents of ssh_config to your ~/.ssh/config file.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.