Skip to content

Instantly share code, notes, and snippets.

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
from tensorflow.contrib.framework import add_arg_scope
from tensorflow.contrib.layers.python.layers import utils
slim = tf.contrib.slim
def squeeze(inputs, num_outputs, fire_id):
@llj098
llj098 / build-emacs.sh
Created February 26, 2016 15:40 — forked from favadi/build-emacs.sh
Compile latest emacs version (24.5) in Ubuntu 14.04
#!/bin/bash
# Build latest version of Emacs, version management with stow
# OS: Ubuntu 14.04 LTS
# version: 24.5
# Toolkit: lucid
# Warning, use updated version of this script in: https://github.com/favadi/build-emacs
set -e
server {
server_name phabricator.example.com;
root /path/to/phabricator/webroot;
location / {
index index.php;
rewrite ^/(.*)$ /index.php?__path__=/$1 last;
}
location = /favicon.ico {
@llj098
llj098 / ze2.xml
Last active December 14, 2015 11:50
<?xml version='1.0' encoding='UTF-8'?>
<rss version='2.0'>
<channel>
<generator>
clj-rss
</generator>
<link>
http://www.zhihu.com/read
</link>
<title>
@llj098
llj098 / ze.xml
Last active December 14, 2015 11:49
<?xml version='1.0' encoding='UTF-8'?>
<rss version='2.0'>
<channel>
<generator>
clj-rss
</generator>
<link>
http://www.zhihu.com/read
</link>
<title>
<?xml version='1.0' encoding='UTF-8'?>
<rss version='2.0'>
<channel>
<generator>
clj-rss
</generator>
<link>
http://www.zhihu.com/read
</link>
<title>
@llj098
llj098 / pptp
Last active December 10, 2015 01:48
#!/bin/bash
if [ $(id -u) != "0" ]; then
printf "Error: You must be root to run this tool!\n"
exit 1
fi
clear
printf "
####################################################
# #
@llj098
llj098 / crc32.c
Created June 3, 2012 13:02
crc alg from freebsd source code
/*-
* COPYRIGHT (C) 1986 Gary S. Brown. You may use this program, or
* code or tables extracted from it, as desired without restriction.
*/
/*
* First, the polynomial itself and its table of feedback terms. The
* polynomial is
* X^32+X^26+X^23+X^22+X^16+X^12+X^11+X^10+X^8+X^7+X^5+X^4+X^2+X^1+X^0
*
@llj098
llj098 / AsyncEnumerator.cs
Created May 16, 2012 12:22
A Simple AsyncEnumerator Implementation
using System;
using System.Net;
using System.Collections;
using System.Collections.Generic;
class Test
{
public static void Main(string[] args) {
@llj098
llj098 / MonoSortedSet.cs
Created March 30, 2012 03:07
SortedSet<T> comparison between Mono and Microsoft
//
// SortedSet.cs
//
// Authors:
// Jb Evain <jbevain@novell.com>
//
// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the