🐟
- echo c2h5b3NoeW9bYXRdcXFbZG90XWNvbQo= | base64 -d
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
~/p/ncurses-6.1 ➜ ./configure --prefix=$HOME/.local --enable-shared --with-shared --without-debug |
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
#!/bin/sh | |
sudo fdisk -l | |
sudo grub-install --root-directory=/mnt /dev/sda | |
sudo mount /dev/sda2 /mnt |
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
#!/usr/bin/env python3 | |
""" | |
整数拆分问题:n 个相同的球,分成若干堆,有几种分法? | |
如果要和上界比较,那么绘制下列图像: | |
* 分拆数及其上界随 n 变化的图像 | |
* 分拆数与其上界之比随 n 变化的图像 | |
""" | |
import argparse |
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
def spectral_normed_weight(W, u=None, num_iters=1, update_collection=tf.GraphKeys.UPDATE_OPS, name='spectral_norm', eps=1e-12, reuse=False): | |
with tf.variable_scope(name, reuse=reuse): | |
W_shape = W.shape.as_list() | |
n_in = W.shape[:-1].num_elements() | |
n_out = W.shape[-1].value | |
W_reshaped = tf.reshape(W, [n_in, n_out]) | |
if u is None: u = tf.get_variable("u", shape=[1, n_out], initializer=tf.truncated_normal_initializer(), trainable=False) | |
# if u is None: u = tf.Variable(tf.truncated_normal(shape=[1, n_out]), name='u', trainable=False) |
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
CXX = /usr/bin/g++ | |
NVCC = /usr/local/cuda-9.1/bin/nvcc | |
CUDA_LIB = /usr/local/cuda-9.1/lib64 | |
CUDA_INC = /usr/local/cuda-9.1/include | |
CUDA_CFLAGS = -I $(CUDA_INC) | |
CUDA_LFLAGS = -lcudart -L $(CUDA_LIB) | |
TF_LIB = $(shell python -c 'import tensorflow as tf; print(tf.sysconfig.get_lib())') | |
TF_INC = $(shell python -c 'import tensorflow as tf; print(tf.sysconfig.get_include())') |
NewerOlder