Skip to content

Instantly share code, notes, and snippets.

Asbjørn Nilsen Riseth anriseth

Block or report user

Report or block anriseth

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@anriseth
anriseth / norwegian_dvorak.ahk
Created Oct 10, 2018
Autohotkey (AHK) Norwegian Dvorak setup from UK keyboard
View norwegian_dvorak.ahk
;-- README ---------------------------------------------------------------------
; This AHK file re-maps a Qwerty keyboard into a Dvorak keyboard. This is especially useful when
; the local computer is limited by corporate security policies to disallow installation of custom
; software. AHK can be run as a portable app, and this script then remaps the existing keyboard.
;
; Original script by: ----------------------------------------------------------
; Torben Gundtofte-Bruun, torben@g-b.dk, http://torben.g-b.dk/+
;
; Amended for UK keyboard by by: -----------------------------------------------
; Asbjørn Nilsen Riseth
@anriseth
anriseth / calculus.txt
Created Jan 23, 2018
DiffEqTools Calculus comparison
View calculus.txt
julia> include("test/runtests.jl")
./general/objective_types.jl
2.170476 seconds (641.11 k allocations: 34.523 MiB, 0.86% gc time)
Test Summary: | Pass Total
general | 21 21
./multivariate/fdtime.jl
#####################
Solver: L-BFGS
Problem: Rosenbrock
f-calls: 77
View pdedescription.md

Hi, I'm trying to solve a nonlinear PDE that looks similar to a time-dependent eikonal equation. Can anyone provide me some advise for the best Julia-ecosystem approach to solving it, please?

I'm trying to find $$v:[0,1]\times \mathbb R_{\geq 0}^2$$, such that $$ v_t - \frac{\sigma^2}{2} g^2 v_{gg} - gq_2{\left(\frac{\frac{q_1}{q_2}-v_s}{2}\right)}^2 = 0 $$

With boundary conditions

  • $$ v(t,s,g) = -Cs $$ on $${t=0}$$ or $${s=0}$$ or $${g=0}$$.
  • $$v_g(t,s,\infty) = 0 $$
  • $$v_s(t,\infty,g) = -C $$
@anriseth
anriseth / pricing.tex
Created May 25, 2017
Optim example: HJB equation TeX
View pricing.tex
\documentclass{article}
\usepackage{amssymb,amsmath}
\usepackage{filecontents}
\usepackage{url}
\DeclareMathOperator*{\argmax}{arg\,max}
\author{Asbj{\o}rn Nilsen Riseth}
\date{\today}
\title{Optim example: Solve HJB equation}
@anriseth
anriseth / pricing.jl
Created May 25, 2017
Optim example: HJB equation
View pricing.jl
using Interpolations, Optim
using LaTeXStrings, Plots
function brownsim(T,γ,C,x,amin,amax,Varr,polarr)
# Dynamics
# dS_t = -Q(a) dt + σQ(a) dW_t, stopped at zero
# Solve
# max \int_0^T aQ(a) dt - CS_T
#
@anriseth
anriseth / atomsetup.sh
Last active May 5, 2017
Install Atom from source
View atomsetup.sh
# Ask admin to install the following packages:
# build-essential git libsecret-1-dev fakeroot rpm libx11-dev libxkbfile-dev libgnome-keyring-dev
# When that is done, you can install everything else locally
# Install Node.js
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
source $HOME/.bashrc
nvm install v6.10.3
nvm use v6.10.3
View gist:c30c9decb3c2bd969441e3d77ba20c77
mkdir /scratch/brosa
cd /scratch/brosa
git clone git://github.com/JuliaLang/julia.git
cd julia
git checkout release-0.5
make -j 2
mkdir $HOME/bin
ln -s julia $HOME/bin
# Run julia
$HOME/bin/julia
@anriseth
anriseth / opmerror
Created Mar 14, 2017
opm-material cmake error
View opmerror
Script started on Tue 14 Mar 2017 16:49:45 GMT
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
View test.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
You can’t perform that action at this time.