I hereby claim:
- I am jmg-duarte on github.
- I am jmgduarte (https://keybase.io/jmgduarte) on keybase.
- I have a public key ASCzSL2zUTqYGDlKA8Pe2l-tQn58IYUaOE6ni1WJZVUIhQo
To claim this, I am signing this object:
import json | |
from typing import Any, Tuple | |
type RGB = Tuple[int, int, int] | |
type RGBA = Tuple[int, int, int, int] | |
def rgba_to_rgb(foreground: RGBA, background: RGB) -> RGB: | |
(fg_r, fg_g, fg_b, fg_a) = foreground | |
(bg_r, bg_g, bg_b) = background |
# Huge kudos to everyone working on yt-dlp, that's the heavylifting part | |
# | |
# The link points to Japanology+ but it should work with other series, | |
# maybe you'll need some adjustments to the jq query though | |
curl https://nwapi.nhk.jp/nhkworld/vodesdlist/v7b/program/japanologyplus/en/all/all.json | | |
jq -r ".data.episodes[].url" | | |
sed "s|^|https://www3.nhk.or.jp|" | | |
xargs -n 1 -P 2 yt-dlp |
-- vim-plug | |
local Plug = vim.fn['plug#'] | |
vim.call('plug#begin', '~/.config/nvim/plugged') | |
-- plenary provides utility functions for other plugins | |
-- think of it as a neovim plugin standard library | |
Plug('nvim-lua/plenary.nvim') | |
-- fuzzy finder file browser | |
Plug('nvim-telescope/telescope.nvim') |
// Credits: Yandros#4299 | |
macro_rules! parse_quote {( | |
$($code:tt)* | |
) => ({ | |
eprintln!("[{}:{}:{}] parse_quote! {{ {} }}", file!(), line!(), column!(), quote!( $($code)* )); | |
::syn::parse_quote!( $($code)* ) | |
})} | |
macro_rules! parse_quote {( |
I hereby claim:
To claim this, I am signing this object:
# add_newline = false | |
format="""\ | |
$directory\ | |
$package\ | |
$git_branch\ | |
$line_break\ | |
$hostname\ | |
$character\ | |
""" |
font_family Jetbrains Mono | |
bold_font Jetbrains Mono Bold | |
italic_font Jetbrains Mono Italic | |
bold_italic_font Jetbrains Mono Medium Italic | |
font_size 9.0 | |
window_padding_width 10 | |
initial_window_height 1280 |
#!/bin/bash | |
function install_dependencies { | |
echo "installing dependencies" | |
sudo apt update | |
sudo apt install -y \ | |
build-essential \ | |
cmake \ | |
git \ | |
libgtk2.0-dev \ |
# Colors (Monokai Pro) | |
colors: | |
# Default colors | |
primary: | |
background: '#2D2A2E' | |
foreground: '#FCFCFA' | |
# Normal colors | |
normal: | |
black: '#403E41' |
def hash(v, size): | |
return abs(v) % size | |
def simple_zero_sum(arr): | |
_hash = lambda v: abs(v) % len(arr) | |
changes = 1 | |
while changes > 0: | |
changes = 0 | |
for idx, value in enumerate(arr): |