Skip to content

Instantly share code, notes, and snippets.

View schneiderfelipe's full-sized avatar
🎯
Focusing

Felipe S. S. Schneider schneiderfelipe

🎯
Focusing
View GitHub Profile
/* Generated by Nim Compiler v1.4.8 */
/* (c) 2021 Andreas Rumpf */
/* The generated code is subject to the original license. */
/* Compiled for: Linux, amd64, gcc */
/* Command for C compiler:
gcc -c -w -fmax-errors=3 -O3 -fno-strict-aliasing -fno-ident -I/home/schneider/.choosenim/toolchains/nim-1.4.8/lib -I/home/schneider/Dropbox/unrolled/src -o /home/schneider/.cache/nim/unrolled_r/@munrolled.nim.c.o /home/schneider/.cache/nim/unrolled_r/@munrolled.nim.c */
#define NIM_INTBITS 64
/* section: NIM_merge_HEADERS */
@schneiderfelipe
schneiderfelipe / nes.py
Created October 14, 2022 13:15 — forked from karpathy/nes.py
Natural Evolution Strategies (NES) toy example that optimizes a quadratic function
"""
A bare bones examples of optimizing a black-box function (f) using
Natural Evolution Strategies (NES), where the parameter distribution is a
gaussian of fixed standard deviation.
"""
import numpy as np
np.random.seed(0)
# the function we want to optimize