- 方便代码的交流和维护。
- 不影响编码的效率,不与大众习惯冲突。
- 使代码更美观、阅读更方便。
- 使代码的逻辑更清晰、更易于理解。
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 bash | |
NODESAPI=/api/v1/nodes | |
function getNodes() { | |
kubectl get --raw $NODESAPI | jq -r '.items[].metadata.name' | |
} | |
function getPVCs() { | |
jq -s '[flatten | .[].pods[].volume[]? | select(has("pvcRef")) | '\ |
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 | |
from tensorflow.python.ops import math_ops, init_ops | |
from tensorflow.python.ops.rnn_cell_impl import RNNCell, _linear | |
class MinimalRNNCell(RNNCell): | |
"""Minimal RNN where Phi is a multi-layer perceptron. | |
This implementation is based on: | |
Minmin Chen (2017) | |
"MinimalRNN: Toward More Interpretable and Trainable Recurrent Neural Networks" |