This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using MKL | |
using CUDA | |
import Flux | |
import MLDatasets | |
import Images | |
import BSON: @load,@save | |
import NNlib | |
using Dates | |
function logn(args...) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Glob | |
import CUDA: CuArray | |
import Images | |
import Flux: gpu | |
import Flux | |
using Dates | |
function logn(args...) | |
println(now(), " ", args...) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using DifferentialEquations | |
using Plots | |
# Many-body, 2D. | |
const F = Float64 | |
const D = 2 | |
const G = 6.6743e-11 # m³/kg s² |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# (c) 2022 Lewin Bormann | |
# Full and updated code at https://borgac.net/lbo/hg/lattice2d/ | |
using Plots | |
using DifferentialEquations | |
import LinearAlgebra | |
using SparseArrays | |
theme(:juno) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# (c) 2022 Lewin Bormann | |
# Have fun! | |
# Full and update code at https://borgac.net/lbo/hg/lattice2d/ | |
import LinearAlgebra | |
using DifferentialEquations | |
using Plots | |
theme(:juno) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### A Pluto.jl notebook ### | |
# v0.17.2 | |
using Markdown | |
using InteractiveUtils | |
# ╔═╡ 8513f9b6-6973-11ec-35d7-cbf5183ebc84 | |
begin | |
import Plots | |
using Random |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### A Pluto.jl notebook ### | |
# v0.17.2 | |
using Markdown | |
using InteractiveUtils | |
# ╔═╡ 5c207166-67e2-11ec-192d-0debd3bc8e59 | |
begin | |
import Plots | |
import JuMP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import tensorflow as tf | |
def LV(N1, N2, eps1, eps2, gam1, gam2): | |
dt = tf.constant(1.) | |
states = [(N1, N2)] | |
for i in range(1, 13): | |
states.append((states[i-1][0] + (states[i-1][0] * (eps1-gam1*states[i-1][1])) * dt, states[i-1][1] - states[i-1][1] * (eps2-gam2*states[i-1][0])) * dt) | |
return states[-1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
class Expression: | |
def __init__(self, left, right): | |
self.l = left | |
self.r = right | |
self.eval_l = None | |
self.eval_r = None | |