Skip to content

Instantly share code, notes, and snippets.

# Copyright 2022 by Jan Philip Wahle, https://jpwahle.com/
# All rights reserved.
import colorcet as cc
import dask_ml.feature_extraction.text
import datashader as ds
import pandas as pd
from datasets import load_dataset
from datashader.utils import export_image
from openTSNE import TSNE
@sts10
sts10 / rust-command-line-utilities.markdown
Last active May 12, 2024 01:28
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
@taskylizard
taskylizard / fmhy.md
Last active May 13, 2024 09:25
/r/freemediaheckyeah, in one single file (view raw)
@fwarren
fwarren / withsqlite.py
Last active April 25, 2024 19:47
Simple sqlite3 context manager for Python 3 will type annotations
#!/usr/bin/env python
"""Open Sqlite3 databae with context manager"""
from pathlib import Path
from types import TracebackType
from typing import overload, Any, Optional, Union
class dbopen(): # pylint: disable=invalid-name
"""Simple context manager for sqlite3 databases"""
@the-spyke
the-spyke / pipewire.md
Last active May 10, 2024 12:16
Enable PipeWire on Ubuntu 22.04

Enable PipeWire on Ubuntu 22.04

This guide is only for original Ubuntu out-of-the-box packages. If you have added a custom PPA like pipewire-debian, you might get into conflicts.

Ubuntu 22.04 has PipeWire partially installed and enabled as it's used by browsers (WebRTC) for recoding the screeen under Wayland. We can enable remaining parts and use PipeWire for audio and Bluetooth instead of PulseAudio.

Starting from WirePlumber version 0.4.8 automatic Bluetooth profile switching (e.g. switching from A2DP to HSP/HFP when an application needs microphone access) is supported. Jammy (22.04) repos provide exactly version 0.4.8. So, we're good.

Based on Debian Wiki, but simplified for Ubuntu 22.04.

@miku
miku / .gitignore
Last active January 17, 2022 23:30
Lightning talk, Notes on Storage
golangleipzig.cdx
golangleipzig.warc.gz
@bfgits
bfgits / get_china_ip.sh
Last active April 5, 2024 00:01
get china ip
#!/bin/sh
#获取中国IP段
wget -c http://ftp.apnic.net/stats/apnic/delegated-apnic-latest
cat delegated-apnic-latest | awk -F '|' '/CN/&&/ipv4/ {print $4 "/" 32-log($5)/log(2)}' | cat > ./cn_ip_list.conf
# install ipset
apt-get install ipset -y
@klingtnet
klingtnet / rl.go
Last active December 1, 2020 19:22
Read random lines from a file
// inspired by https://github.com/miku/randlines
package main
import (
"errors"
"io"
"log"
"math/rand"
"os"
"strconv"
@graninas
graninas / What_killed_Haskell_could_kill_Rust.md
Last active March 18, 2024 14:57
What killed Haskell, could kill Rust, too

At the beginning of 2030, I found this essay in my archives. From what I know today, I think it was very insightful at the moment of writing. And I feel it should be published because it can teach us, Rust developers, how to prevent that sad story from happening again.


What killed Haskell, could kill Rust, too

What killed Haskell, could kill Rust, too. Why would I even mention Haskell in this context? Well, Haskell and Rust are deeply related. Not because Rust is Haskell without HKTs. (Some of you know what that means, and the rest of you will wonder for a very long time). Much of the style of Rust is similar in many ways to the style of Haskell. In some sense Rust is a reincarnation of Haskell, with a little bit of C-ish like syntax, a very small amount.

Is Haskell dead?

@panzerdev
panzerdev / main.go
Last active March 16, 2019 18:06
Topic based Worker with Redis example
package main
import (
"fmt"
"github.com/go-redis/redis"
"log"
"math/rand"
"os"
"os/signal"
"syscall"