Skip to content

Instantly share code, notes, and snippets.

View difranco's full-sized avatar

Anthony Di Franco difranco

View GitHub Profile
@Mononofu
Mononofu / stochastic_muzero.py
Last active March 17, 2026 08:42
Pseudocode for Stochastic MuZero
# Copyright 2022 DeepMind Technologies Limited.
# Licensed under the Apache License, Version 2.0 and CC BY 4.0.
# You may not use this file except in compliance with these licenses.
# Copies of the licenses can be found at https://www.apache.org/licenses/LICENSE-2.0
# and https://creativecommons.org/licenses/by/4.0/legalcode.
"""Pseudocode description of the Stochastic MuZero algorithm.
This pseudocode was adapted from the original MuZero pseudocode.
"""
@Mononofu
Mononofu / muzero_unplugged.py
Last active July 14, 2024 11:02
Pseudocode for MuZero Unplugged
# Copyright 2022 DeepMind Technologies Limited.
# Licensed under the Apache License, Version 2.0 and CC BY 4.0.
# You may not use this file except in compliance with these licenses.
# Copies of the licenses can be found at https://www.apache.org/licenses/LICENSE-2.0
# and https://creativecommons.org/licenses/by/4.0/legalcode.
"""Pseudocode description of the MuZero Unplugged algorithm."""
# pylint: disable=unused-argument
# pylint: disable=missing-docstring
# pylint: disable=g-explicit-length-test
@Mononofu
Mononofu / muzero.py
Last active September 4, 2025 00:24
MuZero pseudocode
# Copyright 2022 DeepMind Technologies Limited.
# Licensed under the Apache License, Version 2.0 and CC BY 4.0.
# You may not use this file except in compliance with these licenses.
# Copies of the licenses can be found at https://www.apache.org/licenses/LICENSE-2.0
# and https://creativecommons.org/licenses/by/4.0/legalcode.
"""Pseudocode description of the MuZero algorithm."""
# pylint: disable=unused-argument
# pylint: disable=missing-docstring
# pylint: disable=g-explicit-length-test
@jart
jart / blc.S
Last active June 10, 2023 06:58
Binary Lambda Calculus Virtual Machine for x64 Linux in 400 bytes
/*-*- mode:unix-assembly; indent-tabs-mode:t; tab-width:8; coding:utf-8 -*-│
│vi: set et ft=asm ts=8 tw=8 fenc=utf-8 :vi│
╞══════════════════════════════════════════════════════════════════════════════╡
│ Copyright 2022 Justine Alexandra Roberts Tunney │
│ │
│ Permission to use, copy, modify, and/or distribute this software for │
│ any purpose with or without fee is hereby granted, provided that the │
│ above copyright notice and this permission notice appear in all copies. │
│ │
│ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL │
@martymcmodding
martymcmodding / MMPX.fx
Last active July 10, 2025 00:35
McGuire & Mara, MMPX Style-Preserving Pixel Art Magnification, port to ReShade
/*
Copyright 2020 Morgan McGuire & Mara Gagiu.
Provided under the Open Source MIT license https://opensource.org/licenses/MIT
by Morgan McGuire and Mara Gagiu.
*/
/*=============================================================================
ReShade 4 effect file
github.com/martymcmodding
@Mononofu
Mononofu / mandelbrot.jl
Created October 10, 2020 21:39
Rendering a mandelbrot zoom sequence with Julia
using ColorSchemes
using Dates
using Images
using Printf
using SIMD
const palette = RGB{Float32}.(colorschemes[:inferno].colors)
const n_colors = length(palette)
const black = RGB{Float32}(0, 0, 0)
@Mononofu
Mononofu / mandelbrot.jl
Last active July 22, 2022 21:20
Rendering a mandelbrot zoom sequence with Julia
using ColorSchemes
using Dates
using Images
using Printf
colors = RGB{Float32}.(colorschemes[:inferno].colors)
n_colors = length(colors)
black = RGB{Float32}(0, 0, 0)
function interpolate_color(n)
@graninas
graninas / cpp_stm_free_tutorial.md
Last active January 9, 2026 01:08
Software Transactional Memory in C++: Pure Functional Approach (tutorial)

Software Transactional Memory in C++: pure functional approach (Tutorial)

In this article I’ll tell you about my pure functional library for Software Transactional Memory (STM) that I’ve built in C++. I adopted some advanced functional programming concepts that make it composable and convenient to use. Its implementation is rather small and robust, which differentiates the library from competitors. Let’s discuss what STM is and how to use it.

@igv
igv / SSimDownscaler.glsl
Last active April 1, 2026 11:39
Tuned for linear-downscaling=no.
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 3.0 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
@weidagang
weidagang / distributed_mvcc_cross_row_transaction.py
Last active December 29, 2020 11:44
Distributed MVCC based cross-row transaction
#!/usr/bin/python3.5
# Author: Dagang Wei (github.com/weidagang)
# Created: 2016-11-19
# Last modified: 2016-11-27
# License: MIT
# Self link: https://gist.github.com/weidagang/1b001d0e55c4eff15ad34cc469fafb84
#
# This code demonstrates the core algorithm for distributed MVCC based cross-row
# transactions. The algorithm is built on top of a distributed key-value database