Skip to content

Instantly share code, notes, and snippets.

View a-doering's full-sized avatar

Andreas Doering a-doering

View GitHub Profile
@a-doering
a-doering / tanh_lecun.py
Created January 29, 2022 21:51
Visualization of the modified tanh_lecun proposed by LeCun in "Generalization and Network Design Strategies"
import matplotlib.pyplot as plt
import numpy as np
a = 1.7159
b = 2/3
x = np.linspace(-8, 8, 100)
tanh = np.tanh(x)
tanh_lecun = a * np.tanh(b*x)
tanh_lecun_d = a*b / (np.cosh(b*x)**2)
@a-doering
a-doering / git_status.sh
Created May 25, 2022 21:06
Git status of all directories in the current directory. Get overview of directories that are not_git_repos, uncommited_repos or commited_repos
!/bin/bash
declare -a commited_repos
declare -a uncommited_repos
declare -a not_git_repos
for d in ./*/ ; do
cd "$d"
if "$(git rev-parse --is-inside-work-tree 2>/dev/null)"; then
if [[ -z $(git status -s) ]]; then
commited_repos+=("$d");