Skip to content

Instantly share code, notes, and snippets.

View Casper-Smet's full-sized avatar

Casper Smet Casper-Smet

View GitHub Profile
@Casper-Smet
Casper-Smet / linked_list.py
Last active June 18, 2021 15:53
Linked list in Python based on MutableSequence
from collections.abc import MutableSequence
from dataclasses import dataclass
from typing import Any, Generator
@dataclass
class LinkedNode():
value: Any
next_node: "LinkedNode" = None
@Denbergvanthijs
Denbergvanthijs / game_of_life_keras.py
Last active April 13, 2024 12:44
Conway's Game of Life using a neural network with Keras and Tensorflow in Python
import matplotlib.pyplot as plt
import numpy as np
import tensorflow as tf
from matplotlib.animation import FuncAnimation
from tensorflow.keras.layers import Conv2D, InputLayer, Layer
from tensorflow.keras.models import Sequential
size = 128
n_frames = 240
full_size = (1, size, size, 1)