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 OrdinaryDiffEq | |
using ModelingToolkit | |
using DataDrivenDiffEq | |
using LinearAlgebra | |
using DiffEqSensitivity | |
using Optim | |
using Flux | |
using DiffEqFlux | |
using Plots |
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
# ASL | |
pkgname=coinasl | |
pkgver=1.4.1 | |
pkgrel=1 | |
pkgdesc="COIN-OR autotools harness to build AMPL Solver Library" | |
arch=('i686' 'x86_64') | |
url="https://github.com/coin-or-tools/ThirdParty-ASL/" | |
#license=('') | |
groups=('coin-or') |
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 JuMP | |
using Ipopt | |
const N = 60; #Number of years to calculate (from 2010 onwards) | |
const tstep = 5; #Years per Period | |
const ρ = 0.015; #Initial rate of social time preference per year | |
const θ₂ = 2.8; #Exponent of control cost function | |
#vvv Currently twitchy when changing out this scale value vvv | |
const scale = 5/3.666; |
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 JuMP | |
using Ipopt | |
N = 100 #Number of years to calculate (from 2015 onwards) | |
tstep = 5 #Years per Period | |
α = 1.45 #Elasticity of marginal utility of consumption | |
ρ = 0.015 #Initial rate of social time preference per year ρ | |
γₑ = 0.3 #Capital elasticity in production function | |
pop₀ = 7403 #Initial world population 2015 (millions) | |
popadj = 0.134 #Growth rate to calibrate to 2050 pop projection |
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 JuMP | |
using Ipopt | |
N = 100 #Number of years to calculate (from 2015 onwards) | |
tstep = 5 #Years per Period | |
α = 1.45 #Elasticity of marginal utility of consumption | |
ρ = 0.015 #Initial rate of social time preference per year ρ | |
γₑ = 0.3 #Capital elasticity in production function | |
pop₀ = 7403 #Initial world population 2015 (millions) | |
popadj = 0.134 #Growth rate to calibrate to 2050 pop projection |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <X11/XKBlib.h> | |
#include <X11/extensions/XKBrules.h> | |
int main(int argc, char **argv) { | |
Display *dpy = XOpenDisplay(NULL); |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <X11/XKBlib.h> | |
#include <X11/extensions/XKBrules.h> | |
int main(int argc, char **argv) { | |
Display *dpy = XOpenDisplay(NULL); |
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
pkgname=rustup-dummy | |
pkgver=0.0.1 | |
pkgrel=1 | |
pkgdesc='Makes pacman think that rustup, rust, and cargo are installed. (For users who installed via rustup.rs)' | |
arch=('any') | |
license=('custom:CC0') | |
provides=('cargo' 'rust' 'rustup') | |
source=('https://creativecommons.org/publicdomain/zero/1.0/legalcode.txt') | |
md5sums=('65d3616852dbf7b1a6d4b53b00626032') |
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
/// Calculate the number of combinations when choosing k values from n elements. | |
fn nchoosek(n: u64, k: u64, scale: f64) -> f64 { | |
if k > n { | |
0.0 | |
} else if k == 0 || k == 1 { | |
1.0 | |
} else { | |
let mut comb = 1.0; | |
for j in 0..cmp::min(k, n - k) { | |
comb /= (j + 1) as f64; |
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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
body { | |
background: #fcfcfa; | |
} | |
.fill { | |
fill: #fff; | |
} |
NewerOlder