Skip to content

Instantly share code, notes, and snippets.

@everywhere begin
using NeuralPDE, Flux, ModelingToolkit, GalacticOptim, Optim, DiffEqFlux
import ModelingToolkit: Interval, infimum, supremum
end
@everywhere begin
@parameters x, t
@variables u(..)
Dt = Differential(t)
Dx = Differential(x)
@everywhere begin
using NeuralPDE, Flux, ModelingToolkit, GalacticOptim, Optim, DiffEqFlux
using Plots
import ModelingToolkit: Interval, infimum, supremum
end
@everywhere begin
@parameters t, x
@variables u(..)
Dt = Differential(t)
@everywhere begin
using Plots
end
ts,xs = [infimum(d.domain):0.01:supremum(d.domain) for d in domains]
acum = [0;accumulate(+, length.(initθ))]
sep = [acum[i]+1 : acum[i+1] for i in 1:length(acum)-1]
minimizers_ = [res.minimizer[s] for s in sep]
@deep75
deep75 / Untitled.ipynb
Created March 3, 2022 22:23
Julia Notebook
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@deep75
deep75 / notebook.ipynb
Last active June 22, 2020 00:17
Resources that demonstrate working with Kubernetes using Julia and scaling Julia applications in Kubernetes ...
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@deep75
deep75 / kind-config.yaml
Created April 29, 2020 18:58
Kind cluster with 3 control-plane nodes and 3 workers
# a cluster with 3 control-plane nodes and 3 workers
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
image: kindest/node:v1.18.2@sha256:fdaa4138d1eaeacf5b547abd932ea812ed7272114457f293da0aec558f56b96d
- role: control-plane
image: kindest/node:v1.18.2@sha256:fdaa4138d1eaeacf5b547abd932ea812ed7272114457f293da0aec558f56b96d
- role: control-plane
image: kindest/node:v1.18.2@sha256:fdaa4138d1eaeacf5b547abd932ea812ed7272114457f293da0aec558f56b96d
@deep75
deep75 / stochastic.ipynb
Last active June 7, 2020 21:20
Solving Stochastic Differential Equations with Julia (DifferentialEquations.jl) and Remote Workers (ClusterManagers.jl) ...
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@deep75
deep75 / nodejs.yml
Created April 19, 2020 01:39
GitHub Actions for executing remote ssh commands
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
on:
push:
branches: master
pull_request:
branches: master
@deep75
deep75 / install-consul.sh
Last active July 31, 2019 16:23
Install Consul Client and Server on same node
#!/bin/bash
CONSUL_VERSION="1.5.3"
curl --silent --remote-name https://releases.hashicorp.com/consul/${CONSUL_VERSION}/consul_${CONSUL_VERSION}_linux_amd64.zip
unzip consul_${CONSUL_VERSION}_linux_amd64.zip
sudo chown root:root consul
sudo mv consul /usr/local/bin/
consul --version
complete -C /usr/local/bin/consul consul
sudo useradd --system --home /etc/consul.d --shell /bin/false consul
sudo mkdir --parents /opt/consul
@deep75
deep75 / install-nomad.sh
Last active July 31, 2019 16:32
Install Nomad Client and Server on same node
#!/bin/bash
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh
sudo usermod -aG docker ubuntu
sudo apt install -y unzip
export NOMAD_VERSION="0.9.3"
curl --silent --remote-name https://releases.hashicorp.com/nomad/${NOMAD_VERSION}/nomad_${NOMAD_VERSION}_linux_amd64.zip
unzip nomad_${NOMAD_VERSION}_linux_amd64.zip
sudo chown root:root nomad
sudo mv nomad /usr/local/bin/