Skip to content

Instantly share code, notes, and snippets.

View aleozlx's full-sized avatar

Alex Yang aleozlx

View GitHub Profile
@aleozlx
aleozlx / LICENSE
Last active October 31, 2016 03:43
z-tree
MIT License
Copyright (c) 2016 Alex Yang
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@aleozlx
aleozlx / LICENSE
Last active October 31, 2016 04:14
vector-ranking-logs
MIT License
Copyright (c) 2016 Alex Yang
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@aleozlx
aleozlx / ga.js
Last active October 31, 2016 03:37
google-analytics-tracking
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');ga('create','UA-86553224-1','auto');ga('send','pageview');
@aleozlx
aleozlx / readme.md
Created January 17, 2017 00:43 — forked from baraldilorenzo/readme.md
VGG-16 pre-trained model for Keras

##VGG16 model for Keras

This is the Keras model of the 16-layer network used by the VGG team in the ILSVRC-2014 competition.

It has been obtained by directly converting the Caffe model provived by the authors.

Details about the network architecture can be found in the following arXiv paper:

Very Deep Convolutional Networks for Large-Scale Image Recognition

K. Simonyan, A. Zisserman

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
// All response has following structure
status: string // ["ok" | "pending" | "err"]
// other fields ...
// TrackingID response
status: string // should always be "ok" tho
data: string // the tracking id here
// Status poll response (non error)
status: string // [ok | pending ]
@aleozlx
aleozlx / .vimrc
Created May 10, 2017 04:50
EC2 terminal configs 2015
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Maintainer:
" Amir Salihefendic
" http://amix.dk - amix@amix.dk
"
" Version:
" 5.0 - 29/05/12 15:43:36
"
" Blog_post:
" http://amix.dk/blog/post/19691#The-ultimate-Vim-configuration-on-Github
@aleozlx
aleozlx / func.py
Created May 12, 2017 21:49
32 line intro to FP
#!/usr/bin/env python
import itertools
# Start from the simplest: constant functions
# - they are constants as functions and lazy-evaluations as data structure, depending on perspective of view
zero = lambda: 0
one = lambda: 1
# Higher order functions: operations that take functions and return another function
# - all they do is to return a function (which is a constant!)
#!/bin/bash
#
# This file echoes a bunch of color codes to the terminal to demonstrate
# what's available. Each line is the color code of one forground color,
# out of 17 (default + 16 escapes), followed by a test use of that color
# on all nine background colors (default + 8 escapes).
#
T='gYw' # The test text
echo -e "\n 40m 41m 42m 43m 44m 45m 46m 47m";
for FGs in ' m' ' 1m' ' 30m' '1;30m' ' 31m' '1;31m' ' 32m' '1;32m' ' 33m' '1;33m' ' 34m' '1;34m' ' 35m' '1;35m' ' 36m' '1;36m' ' 37m' '1;37m';
def path_generator(G, a, b):
""" Find all paths from a to b in directed graph G """
assert all([0<=u<len(G) for u in [a,b]])
path = []
stack = [a]
while stack:
u = stack.pop()
if u<0: # this is backtrack
path.pop()
continue