-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
72 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"image": "mcr.microsoft.com/devcontainers/base:ubuntu", | ||
"features": { | ||
"ghcr.io/devcontainers/features/github-cli:1": {}, | ||
"ghcr.io/devcontainers/features/common-utils:2": { | ||
"configureZshAsDefaultShell": true, | ||
"nonFreePackages": true | ||
} | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"github.vscode-github-actions", | ||
"ms-toolsai.jupyter", | ||
"tamasfe.even-better-toml", | ||
"julialang.language-julia" | ||
], | ||
"settings": { | ||
"julia.executablePath": "~/.juliaup/bin/julia" | ||
} | ||
} | ||
}, | ||
"onCreateCommand": "bash .devcontainer/onCreate.sh" | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ENV["JULIA_PKG_USE_CLI_GIT"] = true | ||
ENV["JULIA_PKG_SERVER_REGISTRY_PREFERENCE"] = "eager" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import Pkg | ||
|
||
Pkg.Registry.add(Pkg.RegistrySpec(url="https://github.com/cossio/CossioJuliaRegistry.git")) | ||
Pkg.Registry.add("General") | ||
|
||
Pkg.add([ | ||
"CairoMakie", | ||
"Makie", | ||
"MyRegistrator", | ||
"Revise", | ||
]) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# install Julia and make sure it's in the PATH of the current shell | ||
curl -fsSL https://install.julialang.org | sh -s -- --yes | ||
|
||
# Julia startup file | ||
mkdir -p ~/.julia/config | ||
cp .devcontainer/julia_startup.jl ~/.julia/config/startup.jl | ||
|
||
# Github CLI autocomplete (https://www.ajfriesen.com/github-cli-auto-completion-with-oh-my-zsh/) | ||
mkdir -p ~/.oh-my-zsh/completions | ||
/usr/bin/gh completion -s zsh > ~/.oh-my-zsh/completions/_gh | ||
echo "autoload -U compinit" >> ~/.zshrc | ||
echo "compinit -i" >> ~/.zshrc | ||
|
||
# Directory to store Rfam data (set in LocalPreferences.toml) | ||
mkdir -p ~/data/Rfam | ||
|
||
# Install Julia packages, registries, ... | ||
/home/vscode/.juliaup/bin/julia .devcontainer/onCreate.jl |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
name = "RestrictedBoltzmannMachines" | ||
uuid = "12e6b396-7db5-4506-8cb6-664a4fe1e50e" | ||
authors = ["Jorge Fernandez-de-Cossio-Diaz <[email protected]>"] | ||
version = "3.3.1-DEV" | ||
version = "3.4.0" | ||
|
||
[deps] | ||
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
function SpinRBM(a::AbstractArray, b::AbstractArray, w::AbstractArray) | ||
@assert size(w) == (size(a)..., size(b)...) | ||
visible = Spin(; θ = a) | ||
hidden = Spin(; θ = b) | ||
return RBM(visible, hidden, w) | ||
end | ||
|
||
function SpinRBM(::Type{T}, N::Union{Int,Dims}, M::Union{Int,Dims}) where {T} | ||
a = zeros(T, N...) | ||
b = zeros(T, M...) | ||
w = zeros(T, N..., M...) | ||
return SpinRBM(a, b, w) | ||
end | ||
|
||
SpinRBM(N::Union{Int,Dims}, M::Union{Int,Dims}) = SpinRBM(Float64, N, M) |