Skip to content

Instantly share code, notes, and snippets.

@redmcg
redmcg / kubedf
Last active June 14, 2024 19:51
Bash script to show k8s PVC usage
#!/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")) | '\
@simonnanty
simonnanty / minimalRNN.py
Last active May 5, 2018 09:08
Implementation of Minimal RNN [M. Chen, 2017]
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"

C#编码规范

概述

规范制定原则

  • 方便代码的交流和维护。
  • 不影响编码的效率,不与大众习惯冲突。
  • 使代码更美观、阅读更方便。
  • 使代码的逻辑更清晰、更易于理解。