Skip to content

Instantly share code, notes, and snippets.

View matheushent's full-sized avatar
💭
Building things and repeating

Matheus Tosta matheushent

💭
Building things and repeating
View GitHub Profile
@matheushent
matheushent / kubectl-apply-stdin.md
Created February 3, 2023 12:06 — forked from zulhfreelancer/kubectl-apply-stdin.md
How to run "kubectl apply -f" with inline YAML as stdin?
$ kubectl apply -f - <<EOF
<-- insert YAML content here -->
EOF

OR

$ cat file.yaml | kubectl apply -f -
@matheushent
matheushent / pytz-time-zones.py
Created September 7, 2020 16:58 — forked from heyalexej/pytz-time-zones.py
list of pytz time zones
>>> import pytz
>>>
>>> for tz in pytz.all_timezones:
... print tz
...
...
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
@matheushent
matheushent / guided_relu.py
Created February 26, 2020 17:51 — forked from falcondai/guided_relu.py
Tensorflow implementation of guided backpropagation through ReLU
import tensorflow as tf
from tensorflow.python.framework import ops
from tensorflow.python.ops import gen_nn_ops
@ops.RegisterGradient("GuidedRelu")
def _GuidedReluGrad(op, grad):
return tf.select(0. < grad, gen_nn_ops._relu_grad(grad, op.outputs[0]), tf.zeros(grad.get_shape()))
if __name__ == '__main__':
with tf.Session() as sess: