Skip to content

Instantly share code, notes, and snippets.

View vra's full-sized avatar
💻
Exploring the fantastic world

Yunfeng Wang vra

💻
Exploring the fantastic world
View GitHub Profile
@vra
vra / pre-commit
Last active March 15, 2024 06:48
#!/bin/sh
hard_limit=$(git config hooks.filesizehardlimit)
soft_limit=$(git config hooks.filesizesoftlimit)
: ${hard_limit:=10000000}
: ${soft_limit:=1000000}
list_new_or_modified_files()
{
git diff --staged --name-status|sed -e '/^D/ d; /^D/! s/.\s\+//'
}
import tensorflow as tf
import numpy as np
# Define Networks
# Define cross entropy loss
# Run session
# Calculate accuracy
# Output result