Skip to content

Instantly share code, notes, and snippets.

View Henistein's full-sized avatar

Henrique Jesus Henistein

  • Portugal
View GitHub Profile
@Henistein
Henistein / README.md
Created January 7, 2022 01:23
Simple implementation of a turing machine

Simple turing machine made in python The sample automata accepts strings from: L = {a^n . b^(2n) : n >= 1}

Example: abb (accepts) aabbbb (accepts) aab (don't accept)

@Henistein
Henistein / HeniNet.py
Last active March 5, 2022 17:50
Neural network from scratch (numpy)
import numpy as np
import matplotlib.pyplot as plt
class HeniNet:
def __init__(self, layers, lr=0.001, epochs=1000):
self.X = None
self.Y = None
self.layers = layers
self.lr = lr
self.epochs = epochs
@Henistein
Henistein / hexdump.py
Created July 4, 2021 16:58
Simple hexdump made in python 3 (similiar to xxd)
#! /usr/bin/python3
import sys
inf = sys.stdin.buffer
data = []
byte = ''
# Read data from file in blocks of 16 bytes
# Python >= 3.8