Skip to content

Instantly share code, notes, and snippets.

View l225li's full-sized avatar

Lin Li l225li

View GitHub Profile
@l225li
l225li / bash-cheatsheet.sh
Created January 28, 2019 10:40 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@l225li
l225li / extract_vgg_features.py
Last active August 7, 2017 08:10
This is helper function to extract convolutional features of images using pre-trained VGG16 model. This makes it possible to do feature extraction of big size of images on a CPU machine.
import numpy as np
import bcolz
import csv
import shutil
def save_array(fname, arr):
"""Helper function to save numpy array arr to fname(.dat)"""
c=bcolz.carray(arr, rootdir=fname, mode='w')
c.flush()