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
==245== Memcheck, a memory error detector | |
==244== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al. | |
==244== Using Valgrind-3.12.0 and LibVEX; rerun with -h for copyright info | |
==244== Command: ./subtype.c | |
==244== Parent PID: 243 | |
==244== | |
--244-- | |
--244-- Valgrind options: | |
--244-- --leak-check=full | |
--244-- --show-leak-kinds=all |
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
julia> Pkg.test("PyDSTool") | |
INFO: Computing test dependencies for PyDSTool... | |
INFO: No packages to install, update or remove | |
INFO: Testing PyDSTool | |
Warning: matplotlib failed to import properly and so is not | |
providing a graphing interface | |
2.026891 seconds (1.63 M allocations: 72.990 MB, 5.09% gc time) | |
LP Point found | |
LP Point found | |
PyCont curve EQ1 (type EP-C) |
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
```julia | |
Pkg.add("DifferentialEquations") | |
``` | |
[1m[34mINFO: Cloning cache of AlgebraicDiffEq from https://github.com/JuliaDiffEq/AlgebraicDiffEq.jl.git | |
[0m[1m[34mINFO: Cloning cache of ChunkedArrays from https://github.com/ChrisRackauckas/ChunkedArrays.jl.git | |
[0m[1m[34mINFO: Cloning cache of DelayDiffEq from https://github.com/JuliaDiffEq/DelayDiffEq.jl.git | |
[0m[1m[34mINFO: Cloning cache of DiffEqBase from https://github.com/JuliaDiffEq/DiffEqBase.jl.git |
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
User case walkthrough | |
A user comes into chat and asks: | |
"I know SSRK methods are already available, so I would like to reuse them. | |
I have been researching the diffEqs developer guide, however I am relatively new on Julia. | |
I have developed similar methods on Matlab, but I am interested on using Julia for my work, so it seem a good point to start. | |
I would appreciate any help. | |
Maybe someone can share some links of related code that I can review or give me general advice and tips. | |
Thanks in advance." |
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
At the request of @jiahao, I am trying to compile use cases for physics, chemistry and mathematics. | |
Chemistry | |
1. \Delta_vap*E_{m,b} is the molar energy of vaporization. [1, p. 55] | |
2. \eta_{inh} is the inherent viscosity - SI Unit m^3 kg ^-1 | |
3. Polymerization reactions require the need for the notation `P_x + P_y -> P_{x+y}` [1, p. 72] | |
4. Units for degree of crystallinity are `w_{c,h}` | |
5. Modulated smectic mesophases SmÃ, and SmC with a tilde, which can't be currently drawn. [1, p 112] | |
6. Anisotropy in general requires the squiggle tilde on top of the quantity being referred to, see [1,p. 114] | |
7. Stochiometric equations sometimes need to describe a molecule/atom as aqueous, with the "aq" subscript. |
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
julia> println("Hola mundo!") | |
Hola mundo! | |
julia> Pkg.add("DifferentialEquations") | |
INFO: Initializing package repository /Users/isabel/.julia/v0.6 | |
INFO: Cloning METADATA from https://github.com/JuliaLang/METADATA.jl | |
INFO: Cloning cache of AlgebraicDiffEq from https://github.com/JuliaDiffEq/AlgebraicDiffEq.jl.git | |
INFO: Cloning cache of BinDeps from https://github.com/JuliaLang/BinDeps.jl.git | |
INFO: Cloning cache of Calculus from https://github.com/johnmyleswhite/Calculus.jl.git | |
INFO: Cloning cache of ChunkedArrays from https://github.com/ChrisRackauckas/ChunkedArrays.jl.git |
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
pkgs = [ | |
"BenchmarkTools", "ProfileView", "CpuId", | |
"MacroTools", "RecursiveArrayTools", "ASTInterpreter2", | |
"Turing", | |
"DynamicalSystems", | |
"Convex", "JuMP", "Optim", | |
"ForwardDiff", "DiffRules", "DiffResults", "ReverseDiff", | |
"LightGraphs", | |
"Tensors", | |
"DifferentialEquations", |
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
@oxinabox this is for my saturday session: gonna try to explain a compiler to non-technical people in 5 minutes... | |
"To understand why Julia is so special and different, we need to understand how it works from the bottom up. | |
Computer code goes through many stages of processing from when you write `x = 3` to when it actually assigns that value inside of it to a memory register. | |
The last part of this process is what we will conveniently call compiler - it is in essence a glorified warehouse manager - it takes orders about boxes of stuff (bits!) and moves them around in the computer (memory!). Let's assume the picture is this simple our purposes. | |
Now that we have a mental picture of what a compiler is, we can separate Julia from other languages and see why it is special. |
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
# Credit to Kristoffer Carlsson | |
cd("/Users/kristoffer/julia/stdlib") | |
import TOML | |
using LightGraphs | |
import TikzGraphs | |
const STDLIB_DIR = "." | |
const STDLIBS = readdir(STDLIB_DIR) | |
deps = Dict{String, Int}() | |
for (i, stdlib) in enumerate(STDLIBS) |
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
# Create a 4 bit DNA/RNA sequence from a 2 bit DNA/RNA sequence, and vice-versa. | |
function BioSequence{DNAAlphabet{N}}(seq::BioSequence{DNAAlphabet{M}}) where {N<:Int,M<:Int} | |
@assert N == 4 && M == 2 | |
newseq = BioSequence{DNAAlphabet{4}}(length(seq)) | |
for (i, x) in enumerate(seq) | |
unsafe_setindex!(newseq, x, i) | |
end | |
return newseq | |
end | |
function BioSequence{DNAAlphabet{M}}(seq::BioSequence{DNAAlphabet{N}}) where {N<:Int, M<:Int} |
OlderNewer