Skip to content

Instantly share code, notes, and snippets.

View WesleyCh3n's full-sized avatar
😺

WesleyCh3n WesleyCh3n

😺
View GitHub Profile
@tkrotoff
tkrotoff / FrontendFrameworksPopularity.md
Last active May 14, 2025 15:15
Front-end frameworks popularity (React, Vue, Angular and Svelte)
import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt
import functools
from PIL import Image
"""
TensorFlow Data Augmentation Example
Reference : https://github.com/tensorflow/models/blob/master/research/object_detection/core/preprocessor.py
@yhatt
yhatt / marp.md
Last active May 7, 2025 17:23
Marp Next example
marp

Marp

h:250

Markdown presentation ecosystem
@YashasSamaga
YashasSamaga / yolov4.py
Last active July 13, 2024 06:42
YOLOv4 on OpenCV DNN
import cv2
import time
CONFIDENCE_THRESHOLD = 0.2
NMS_THRESHOLD = 0.4
COLORS = [(0, 255, 255), (255, 255, 0), (0, 255, 0), (255, 0, 0)]
class_names = []
with open("classes.txt", "r") as f:
class_names = [cname.strip() for cname in f.readlines()]
@pburtchaell
pburtchaell / TapEventOverrides.tsx
Last active June 29, 2024 17:22
Double tap & long press event overrides for Framer X
import { Data, Override } from "framer"
const state = Data({
doubleTapIndex: 0,
doubleTapTimer: setTimeout(null, null),
longPress: false,
longPressTimer: setTimeout(null, null),
})
export function doubleTap(): Override {
@maboloshi
maboloshi / README.md
Last active May 15, 2025 03:29
[Mac下配置Aria2] #macOS #aria2

Mac下配置Aria2

安装和设置 Aria2

# 使用 Homebrew 安装 aria2
brew install aria2

# 创建配置文件aria2.conf和空对话文件aria2.session
mkdir ~/.aria2 && cd ~/.aria2
touch aria2.conf
@PurpleBooth
PurpleBooth / README.md
Last active September 8, 2023 20:52
A github workflow pipeline for rust that does test, build and deploy windows, linux and mac, creates releases, and does SemVer Versioning, and releases to a homebrew tap

Features

  • Automatically bump SemVer
  • Update a personal homebrew tap
  • Keep that pesky version in the Cargo.toml up to date
  • (From dependabot) Get new versions out as soon as possible

Assumptions

  • You don't want a changelog
@softwarebygabe
softwarebygabe / options_functional_async.ts
Last active January 12, 2023 02:45
How to write an async class constructor using functional options pattern
type Material = 'wood' | 'brick' | 'steel'
type HouseOption = (h: House) => void
class House {
private rooms: number
private floors: number
private material: Material
private externalData: any

Electron is tricky to get set up on Windows Subsystem for Linux, but it can work!

Four things needed overall:

  1. you need WSL2, not WSL1
  2. you need node, of course, and that part isn't so bad
  3. you need to apt install several dependencies
  4. you need an X Server so it can display the electron GUI over in Windows-land

Setup instructions, in order:

@WesleyCh3n
WesleyCh3n / arm64-cross.Dockerfile
Last active September 12, 2021 15:07
Dockerfile of arm64/armv7 for rpi cross-compile base on `dockross`. Toolchain: https://sourceforge.net/projects/raspberry-pi-cross-compilers/files/
FROM dockcross/base:latest
ENV DEFAULT_DOCKCROSS_IMAGE arm64-cross
ENV CROSS_TRIPLE aarch64-linux-gnu
ENV XCC_PREFIX /usr/local
ENV CROSS_ROOT ${XCC_PREFIX}/${CROSS_TRIPLE}
ENV AS=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-as \
AR=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-gcc-ar \
CC=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-gcc \