julia> Pkg.update()
INFO: Updating METADATA...
ERROR: METADATA cannot be updated. Resolve problems manually in /home/morten/Julia/pkg/v0.5/METADATA.
GitError(Code:ERROR, Class:Net, Failed to resolve address for https: Name or service not known)
in macro expansion at ./libgit2/error.jl:99 [inlined]
in #fetch#52(::Base.LibGit2.FetchOptions, ::String, ::Function, ::Base.LibGit2.GitRemote, ::Array{AbstractString,1}) at ./libgit2/remote.jl:70
in (::Base.LibGit2.#kw##fetch)(::Array{Any,1}, ::Base.LibGit2.#fetch, ::Base.LibGit2.GitRemote, ::Array{AbstractString,1}) at ./<missing>:0
in #fetch#93(::String, ::String, ::Array{AbstractString,1}, ::Nullable{Base.LibGit2.AbstractCredentials}, ::Function, ::Base.LibGit2.GitRepo) at ./libgit2/libgit2.jl:164
in (::Base.Pkg.Entry.##35#41)(::Base.LibGit2.GitRepo) at ./pkg/entry.jl:371
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
# Gets the Nth bit of m | |
function bit(N, m) | |
m & (1<<(N-1)) >> (N-1) | |
end | |
@show [bit(n,0) for n=1:5] | |
@show [bit(n,1) for n=1:5] | |
@show [bit(n,2) for n=1:5] | |
@show [bit(n,3) for n=1:5] | |
@show [bit(n,5) for n=1:5] |
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
import Base: gc_bytes, gc_time_ns, time_print | |
function lm_1_10(x1, x10) | |
A = (x10-x1)/9 | |
B = (10*x1-x10)/9 | |
A,B | |
end | |
macro time_N(N, ex) | |
quote |
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
@define-color light-aubergine #BBBBBB; | |
@define-color super-light-aubergine #EDEDED; | |
/* | |
do not use text-shadow until bugzilla.gnome.org bug #686209 is | |
fixed - its leaking memory | |
*/ | |
#featured-star { |
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
#!/bin/bash | |
echo "Working directory:" `pwd` | |
date | |
echo | |
echo "SLURM variables" | |
# For a full list, see http://slurm.schedmd.com/sbatch.html | |
echo SLURM_JOB_ID=${SLURM_JOB_ID} | |
echo SLURM_JOB_NAME=${SLURM_JOB_NAME} | |
echo SLURM_JOB_NODELIST=${SLURM_JOB_NODELIST} |
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
if length(ARGS) != 1 | |
error("Output file name not provided!") | |
end | |
ofile = ARGS[1] | |
println("Writing the plot to: $ofile") | |
using Gadfly | |
M,N = 22,30 | |
matrix = zeros(Float64, (M,N)) | |
for i=1:M, j=1:N |
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
# A wrapper function to capture STDOUT and STDERR into strings. | |
# | |
# Heavily inspired by | |
# https://github.com/JuliaStats/RCall.jl/blob/c1ff136864964cf2ac04b679f0c1b3b243df7e37/src/iface.jl#L35-L46 | |
# referred to by the issue comment | |
# https://github.com/JuliaLang/julia/issues/12711#issuecomment-133045787 | |
# | |
# The Base.start_reading(stream, cb) requires fixes in Base. | |
# |
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
/* | |
Credits to: | |
- https://linux.die.net/man/2/setcontext | |
- https://stackoverflow.com/questions/8456085/why-cant-i-ignore-sigsegv-signal | |
*/ | |
#include <stdio.h> | |
#include <stdint.h> | |
#include <stdbool.h> | |
#include <signal.h> |
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
diff --git a/src/Expanders.jl b/src/Expanders.jl | |
index 484622f..f7025f4 100644 | |
--- a/src/Expanders.jl | |
+++ b/src/Expanders.jl | |
@@ -471,11 +471,7 @@ function Selectors.runner(::Type{ExampleBlocks}, x, page, doc) | |
# Splice the input and output into the document. | |
content = [] | |
input = droplines(x.code) | |
- | |
- # Special-case support for displaying SVG graphics. TODO: make this more general. |
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
24c24 | |
< "https://fonts.googleapis.com/css?family=Lato|Ubuntu+Mono" rel= | |
--- | |
> "https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel= | |
30c30 | |
< documenterBaseURL="." | |
--- | |
> documenterBaseURL=".." | |
34,39c34,39 | |
< data-main="assets/documenter.js"></script> |