Skip to content

Instantly share code, notes, and snippets.

View otomad's full-sized avatar
🏢
Working

Rantetsu Inori otomad

🏢
Working
View GitHub Profile
@1216892614
1216892614 / menu.tsx
Created August 18, 2024 07:13
Apple Watch Menu like
import React, { useMemo, useRef, useState } from "react";
import { animated, SpringValue, useSpringValue, to } from "@react-spring/web";
const GOODS = [
{ title: "0", color: "rgb(29, 69, 76)" },
{ title: "1", color: "rgb(29, 69, 76)" },
{ title: "2", color: "rgb(28, 66, 72)" },
{ title: "3", color: "rgb(28, 66, 72)" },
{ title: "4", color: "rgb(27, 63, 68)" },
{ title: "5", color: "rgb(27, 63, 68)" },
@ctlllll
ctlllll / longest_chinese_tokens_gpt4o.py
Created May 13, 2024 19:53
Longest Chinese tokens in gpt4o
import tiktoken
import langdetect
T = tiktoken.get_encoding("o200k_base")
length_dict = {}
for i in range(T.n_vocab):
try:
length_dict[i] = len(T.decode([i]))
except:
@cscottyb
cscottyb / fontstack-serif.css
Last active June 6, 2024 17:37
Font Stacks for UI and system fallbacks.
/* For MLA and APA */
.serif-paper {
font-family: Times New Roman, Times, "Tinos";
}
.serif-old-style {
font-family: Athelas, Georgia, serif;
font-family: Georgia, serif;
}
@lukas-h
lukas-h / license-badges.md
Last active March 9, 2025 05:10
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.

Translations: (No guarantee that the translations are up-to-date)

@davidfowl
davidfowl / dotnetlayout.md
Last active March 4, 2025 21:45
.NET project structure
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
 tests/