Skip to content

Instantly share code, notes, and snippets.

View fangq's full-sized avatar
💭
https://neurojson.org

Qianqian Fang fangq

💭
https://neurojson.org
View GitHub Profile
@svpino
svpino / neural-network-from-scratch.py
Last active December 13, 2024 20:19
An implementation of a neural network from scratch
import numpy as np
def sigmoid(x):
return 1 / (1 + np.exp(-x))
def neural_network(X, y):
learning_rate = 0.1
W1 = np.random.rand(2, 4)
W2 = np.random.rand(4, 1)
@arq5x
arq5x / test.sh
Last active November 30, 2023 12:50
Compress and then Decompress a string with zlib.
# compile
$ g++ zlib-example.cpp -lz -o zlib-example
# run
$ ./zlib-example
Uncompressed size is: 36
Uncompressed string is: Hello Hello Hello Hello Hello Hello!
----------