This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
import numpy as np | |
FC_SIZE = 1024 | |
DTYPE = tf.float32 | |
def _weight_variable(name, shape): | |
return tf.get_variable(name, shape, DTYPE, tf.truncated_normal_initializer(stddev=0.1)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <linux/kernel.h> | |
#include <linux/module.h> | |
#include <linux/kprobes.h> | |
#include <linux/netdevice.h> | |
#include <linux/fs.h> | |
#include <linux/fs_struct.h> | |
/* For each probe you need to allocate a kprobe structure */ | |
static struct kprobe kp = { | |
.symbol_name = "dev_change_flags", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* linux 2.6.37-3.x.x x86_64, ~100 LOC | |
* gcc-4.6 -O2 semtex.c && ./a.out | |
* 2010 [email protected], salut! | |
* | |
* update may 2013: | |
* seems like centos 2.6.32 backported the perf bug, lol. | |
* jewgold to 115T6jzGrVMgQ2Nt1Wnua7Ch1EuL9WXT2g if you insist. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pushd /usr/src/linux | |
CF="-march=native -mtune=native -O3" | |
MF='V=2 ARCH=x86_64 --jobs=10 --load-average=6.0' | |
mount /boot; | |
make ${MF} CFLAGS="${CF}" modules_prepare || exit 255; | |
make ${MF} CFLAGS="${CF}" vmlinux || exit 255; | |
make ${MF} CFLAGS="${CF}" modules || exit 255; | |
make ${MF} CFLAGS="${CF}" bzImage || exit 255; | |
make ${MF} CFLAGS="${CF}" modules_install || exit 255; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -------------------------------------------------------------------- | |
# An implementation of the "Growing Tree" algorithm. This one is | |
# notable for it's ability to become nearly identical to Prim's | |
# algorithm, or the Recursive Backtracking algorithm, depending on | |
# how the cells are removed from the list that aggregates as the | |
# algorithm runs. | |
# | |
# This script allows you to play with those settings by specifying | |
# the mode after the width and height parameters, as "random" (pull | |
# the cell from list at random), "newest" (pull the newest cell), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -------------------------------------------------------------------- | |
# An implementation of Wilson's algorithm for generating mazes. | |
# Slightly smarter than Aldous-Broder, it is novel in its use of a | |
# "scout" to build each path before actually recording it. Like | |
# Aldous-Broder, though, it is not guaranteed to ever finish, if | |
# the RNG makes poor choices. | |
# | |
# As with Aldous-Broder, watching the animation of its progress can | |
# be an exercise in frustration as you find yourself urging the cursor | |
# to JUST GO OVER THERE! Try it and see for yourself. :) |