Skip to content

Instantly share code, notes, and snippets.

View taineleau-zz's full-sized avatar

Danlu Chen taineleau-zz

View GitHub Profile
@linmx0130
linmx0130 / lop.py
Last active January 5, 2017 08:01
import theano
import theano.tensor as T
def sigmoid(x):
return 1.0/(1+T.exp(-x))
x = T.vector('x')
W = T.matrix('W')
#y = T.dot(x,W)
y = T.dot(x,W)
sf = T.nnet.softmax(y)
true_dist = T.ivector('true_dist')
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@application2000
application2000 / how-to-install-latest-gcc-on-ubuntu-lts.txt
Last active May 23, 2024 07:53
How to install latest gcc on Ubuntu LTS (12.04, 14.04, 16.04)
These commands are based on a askubuntu answer http://askubuntu.com/a/581497
To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below.
USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING.
ABSOLUTELY NO WARRANTY.
If you are still reading let's carry on with the code.
sudo apt-get update && \
sudo apt-get install build-essential software-properties-common -y && \
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
@yrevar
yrevar / imagenet1000_clsidx_to_labels.txt
Last active June 19, 2024 11:32
text: imagenet 1000 class idx to human readable labels (Fox, E., & Guestrin, C. (n.d.). Coursera Machine Learning Specialization.)
{0: 'tench, Tinca tinca',
1: 'goldfish, Carassius auratus',
2: 'great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias',
3: 'tiger shark, Galeocerdo cuvieri',
4: 'hammerhead, hammerhead shark',
5: 'electric ray, crampfish, numbfish, torpedo',
6: 'stingray',
7: 'cock',
8: 'hen',
9: 'ostrich, Struthio camelus',
sudo curl -o /usr/local/bin/imgcat -O https://raw.githubusercontent.com/gnachman/iTerm2/master/tests/imgcat && sudo chmod +x /usr/local/bin/imgcat
# If you have a better way to fix the permissions, comment below!
@bartvm
bartvm / dl-frameworks.rst
Last active December 7, 2020 18:18
A comparison of deep learning frameworks

A comparison of Theano with other deep learning frameworks, highlighting a series of low-level design choices in no particular order.

Overview

Symbolic: Theano, CGT; Automatic: Torch, MXNet

Symbolic and automatic differentiation are often confused or used interchangeably, although their implementations are significantly different.

@jcoreyes
jcoreyes / readme.md
Last active January 21, 2018 10:41
Image Captioning LSTM
@jamiees2
jamiees2 / sheet.tex
Last active July 8, 2021 16:59
A template for LaTeX cheat sheets
% \documentclass[9pt,a4paper,twocolumn,landscape,oneside]{amsart}
\documentclass[9pt,a4paper,landscape,oneside]{amsart}
\usepackage{amsmath, amsthm, amssymb, amsfonts}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{booktabs}
\usepackage{fancyhdr}
\usepackage{float}
\usepackage{fullpage}
%\usepackage{geometry}
@pluskid
pluskid / sample-resume.tex
Last active January 7, 2022 01:08
Sample resume template
% Some people asked the LaTeX template for http://pluskid.org/assets/chiyuan-resume.pdf
% So I put a sample here. Feel free to use / modify it. Note you need to use xelatex to
% compile it and change the fonts to the ones you prefer and have on your system.
\documentclass[11pt]{article}
\usepackage{color}
\definecolor{ColorURL}{rgb}{0.1,0.12,0.45}
\usepackage[colorlinks=true,urlcolor=ColorURL]{hyperref}
\usepackage{fontspec,xunicode,xltxtra}
\usepackage[left=.8in,right=.8in,top=.9in,bottom=.7in]{geometry}
\usepackage{setspace}
@wen-long
wen-long / ss-redir 透明代理.md
Last active March 18, 2024 12:13
ss-redir 透明代理.md

##ss-redir 的 iptables 配置(透明代理)

透明代理指对客户端透明,客户端不需要进行任何设置就使用了网管设置的代理规则

创建 /etc/ss-redir.json 本地监听 7777 运行ss-redir -v -c /etc/ss-redir.json

iptables -t nat -N SHADOWSOCKS
# 在 nat 表中创建新链
iptables -t nat -A SHADOWSOCKS -p tcp --dport 23596 -j RETURN
# 23596 是 ss 代理服务器的端口,即远程 shadowsocks 服务器提供服务的端口,如果你有多个 ip 可用,但端口一致,就设置这个