🌲 Invert a binary tree! 🌲
Except with 3 catches:
- It must invert the keys ("bit-reversal permutation")
- It must be a dependency-free, pure recursive function
- It must have type
Bit -> Tree -> Tree
(i.e., a direct recursion with max 1 bit state)
import re | |
import sys | |
import json | |
from datetime import timedelta | |
# --- Helper functions for time conversion --- # | |
def srt_time_to_seconds(srt_time: str) -> float: | |
""" | |
Convert SRT time (HH:MM:SS,ms) to seconds. |
import os | |
import argparse | |
import logging | |
import json | |
from more_itertools import chunked | |
from collections.abc import Iterator | |
import spacy | |
from spacy.language import Language | |
from spacy.tokens import Doc, Span, Token |
/* Numerically solve for the time-dependent Schrodinger equation in 2D, | |
using the split operator method. To build and run, type: | |
rustc qm2d_split_op.rs | |
./qm2d_split_op | |
This will output a series of bmp images which show each frame of the | |
simulation. | |
References: |
I want Microsoft to do better, want Windows to be a decent development platform-and yet, I constantly see Microsoft playing the open source game: advertising how open-source and developer friendly they are - only to crush developers under the heel of the corporate behemoth's boot.
The people who work at Microsoft are amazing, kind, talented individuals. This is aimed at the company's leadership, who I feel has on many occassions crushed myself and other developers under. It's a plea for help.
You probably haven't heard of it before, but if you've ever used win32 API bindings in C#, C++, Rust, or other languages, odds are they were generated from a repository called microsoft/win32metadata.
# inspired by https://gist.github.com/rjnienaber/af47fccb8410926ba7ea35f96c3b87fd | |
# remove bundled ImageMagick | |
sudo apt remove imagemagick -y | |
# install base dependencies | |
sudo apt-get install -y \ | |
build-essential \ | |
git \ | |
libde265-dev \ |
// Made with Amplify Shader Editor | |
// Available at the Unity Asset Store - http://u3d.as/y3X | |
Shader "Unlit/Directional Tint" | |
{ | |
Properties | |
{ | |
_MainTex("MainTex", 2D) = "white" {} | |
_Color("Color", Color) = (1,1,1,1) | |
_ColorA("ColorA", Color) = (1,1,1,1) | |
_ColorB("ColorB", Color) = (1,1,1,1) |
WSL2 uses Hyper-V for networking. The WSL2 network settings are ephemeral and configured on demand when any WSL2 instance is first started in a Windows session. The configuration is reset on each Windows restart and the IP addresses change each time. The Windows host creates a hidden switch named "WSL" and a network adapter named "WSL" (appears as "vEthernet (WSL)" in the "Network Connections" panel). The Ubuntu instance creates a corresponding network interface named "eth0".
Assigning static IP addresses to the network interfaces on the Windows host or the WSL2 Ubuntu instance enables support for the following scenarios:
section | |
parameters {α : Type} | |
variable [ a_dec : decidable_eq α] | |
include a_dec | |
open nat | |
definition replicate (a : α) : ℕ → list α | |
| 0 := [] | |
| (succ n) := a :: replicate n |