Skip to content

Instantly share code, notes, and snippets.

Avatar

Ranjan Anantharaman ranjanan

View GitHub Profile
View roberode-bug.jl
using OrdinaryDiffEq
using DiffEqFlux
using Flux
using Plots
#=function f(du, u, p, t)
du[1] = -p[1]*u[1] + p[2]*u[2]*u[3]
du[2] = p[1]*u[1] - p[2]*u[2]*u[3] - p[3]*u[2]*u[2]
du[3] = p[3]*u[2]*u[2]
end=#
View heatingsystem.jl
using OrdinaryDiffEq
using Sundials
using Plots
using BenchmarkTools
const N = 40 # Number of heated units
const Cu = N == 1 ? [2e7] : (ones(N) .+ range(0,1.348,length=N))*1e7 # "Heat capacity of heated units";
const Cd = 2e6*N # "Heat capacity of distribution circuit";
const Gh = 200 # "Thermal conductance of heating elements";
View koopman.jl
# Add this first: https://github.com/ranjanan/MonteCarloIntegration.jl
using Cubature
# using Cuba
using MonteCarloIntegration
# include("vegas.jl")
function koopman(g,prob,u0,p,args...;kwargs...)
g(solve(remake(prob,u0=u0,p=p),args...;kwargs...))
end
@ranjanan
ranjanan / flights.jl
Created May 16, 2018
Flights Dataset Comparison
View flights.jl
import DecisionTree
using ScikitLearn
@sk_import tree: DecisionTreeClassifier
import PyCall: PyObject
using JuliaDB
function load_data()
isfile("balance.data") ||
download("https://archive.ics.uci.edu/ml/machine-learning-databases/balance-scale/balance-scale.data",
@ranjanan
ranjanan / bench.png
Last active May 16, 2017
Intel Parallel Universe Article
@ranjanan
ranjanan / Distributions
Created Sep 20, 2016
Distributions failure
View Distributions
Running tests:
From worker 3: testing Distributions.CategoricalDirectSampler
From worker 3: testing Distributions.AliasTable
From worker 3: testing Distributions.BinomialGeomSampler
From worker 3: testing Distributions.BinomialTPESampler
From worker 3: testing Distributions.BinomialPolySampler
From worker 2: [Discrete]
From worker 5: testing Distributions.Categorical(K=2, p=[0.5,0.5])
From worker 2: ------------
From worker 2: testing Bernoulli()
@ranjanan
ranjanan / ALS.jl
Created Nov 11, 2015
How to reproduce seg faults for multi-threaded Julia
View ALS.jl
First,
git clone https://github.com/ranjanan/MT-Workloads.git
Then cd into ALS/
On the julia REPL,
include("ALS.jl")
main()
You can’t perform that action at this time.