Skip to content

Instantly share code, notes, and snippets.

View fonsp's full-sized avatar
🌳
climbing

Fons van der Plas fonsp

🌳
climbing
View GitHub Profile

Methods that I wish existed in Julia Base

🐿 push!(x::Set), push!(x::Vector), etc. with no second argument. This means that you can do push!(x, y...) even when y is empty.

🐿 round(x::AbstractRange, y)

Fons van der Plas:pluto: 27 minutes ago
Why does julia not start with the maximum number of threads by default?
Mosè Giordano 23 minutes ago

Fons van der Plas:pluto:1 day ago

Plots.jl - Is there a way to go from an image coordinate (e.g. (300,200) for the centre of a 600x400 rendered plot) to the corresponding space coordinate?The reason I'm asking is that Pluto can do some cool tricks, including self-updating interactive plots. Here's a demo of a phase plot where you can click to set the initial value: fonsp/Pluto.jl#582 (comment) wrote that plot using d3.js, but if Plots.jl would support this coordinate conversion it could open the door to some very cool stuff (edited)

img

Simon Christ[1 day ago](https://julialang.slack.com/archives/C6E4SU1D3/p1603396837226500?thread_t

### A Pluto.jl notebook ###
# v0.12.4
using Markdown
using InteractiveUtils
# ╔═╡ c86e0d52-154b-11eb-3cab-056d5919b2a3
begin
import Pkg
Pkg.add("Hyperscript")
### A Pluto.jl notebook ###
# v0.12.4
using Markdown
using InteractiveUtils
# ╔═╡ b7737d96-1488-11eb-0be7-2d3d96b5993d
begin
import Pkg
Pkg.activate(mktempdir())
### A Pluto.jl notebook ###
# v0.11.14
using Markdown
using InteractiveUtils
# ╔═╡ 823571c6-065e-11eb-3ef7-317b596d0dd2
html"""
<script src="https://cdn.jsdelivr.net/npm/lodash@4/lodash.min.js"></script>
<script>
### A Pluto.jl notebook ###
# v0.11.14
using Markdown
using InteractiveUtils
# ╔═╡ a2f60fe4-0495-11eb-27f6-ff7a5231c073
begin
import Pkg
Pkg.activate(mktempdir())
### A Pluto.jl notebook ###
# v0.11.14
using Markdown
using InteractiveUtils
# ╔═╡ a2f60fe4-0495-11eb-27f6-ff7a5231c073
begin
import Pkg
Pkg.activate(mktempdir())
@fonsp
fonsp / Manifest.toml
Created September 16, 2020 14:09
Pluto binder on gist?
# This file is machine-generated - editing it directly is not advised
[[Base64]]
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
[[Dates]]
deps = ["Printf"]
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"
[[Distributed]]