Skip to content

Instantly share code, notes, and snippets.

View klkuhlm's full-sized avatar

Kris Kuhlman klkuhlm

View GitHub Profile
@endolith
endolith / DFT_ANN.py
Last active July 21, 2024 13:05
Training neural network to implement discrete Fourier transform (DFT/FFT)
"""
Train a neural network to implement the discrete Fourier transform
"""
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense
import numpy as np
import matplotlib.pyplot as plt
N = 32
batch = 10000
@guyer
guyer / newton.ipynb
Created May 13, 2016 18:07
Jupyter notebook demonstrating Newton iterations in FIPy
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fredrik-johansson
fredrik-johansson / numerical integration
Created October 3, 2013 13:27
example code for numerical integration
#include "fmpcb_calc.h"
#include "profiler.h"
int
sinx(fmpcb_ptr out, const fmpcb_t inp, void * params, long order, long prec)
{
int xlen = FLINT_MIN(2, order);
fmpcb_set(out, inp);
if (xlen > 1)
fmpcb_one(out + 1);