Skip to content

Instantly share code, notes, and snippets.

View apahl's full-sized avatar

Axel Pahl apahl

  • MPI of Molecular Physiology (Dortmund)
  • Germany, Dortmund (work) / Hannover (home)
  • 00:35 (UTC +02:00)
  • Mastodon @apahl@fosstodon.org
View GitHub Profile
import ggplotnim, math
import arraymancer
const ε = 3
proc φ(r: float): float =
result = exp(-pow((ε.float * r), 2.0))
proc toMatrix(n: int, start, stop: float): Tensor[float] =
result = zeros[float]([n, n])
let xs = linspace(start, stop, n)
@sts10
sts10 / rust-command-line-utilities.markdown
Last active May 4, 2024 23:11
A curated list of command-line utilities written in Rust

A curated list of command-line utilities written in Rust

Note: I have moved this list to a proper repository. I'll leave this gist up, but it won't be updated. To submit an idea, open a PR on the repo.

Note that I have not tried all of these personally, and cannot and do not vouch for all of the tools listed here. In most cases, the descriptions here are copied directly from their code repos. Some may have been abandoned. Investigate before installing/using.

The ones I use regularly include: bat, dust, fd, fend, hyperfine, miniserve, ripgrep, just, cargo-audit and cargo-wipe.

  • atuin: "Magical shell history"
  • bandwhich: Terminal bandwidth utilization tool
@cipharius
cipharius / yes-in-nim.md
Last active January 22, 2018 17:41
Blazing fast yes in Nim

Recently I stumbled upon a post which takes a closer look at the yes command line tool. The main purpose of it is to write endless stream of a single letter y at a ridiculous speed.

On the first glance this seems like a really simple problem, just two lines of Nim and you're done, right?

while true:
  echo "y"

And indeed, this gives us plenty of y's. But when we take a look at the write speed..