Skip to content

Instantly share code, notes, and snippets.

@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:
/*
* Legacy Particle System Updater
* A tool that can be used to convert Legacy Particle Systems into new Particle System Components.
* https://forum.unity.com/threads/release-legacy-particle-system-updater.510879/
*
* v1.0
* Initial release
*
* v1.1
* Fixed incorrect billboard mode
# No Power Wasted 2500 V0.322 ONLY FOR TESTING !!!!
# ESPHome Software für alle gängigen Versionen des Balkonspeichers xy2500.
# Diese Version ist speziell für Verwendung mit dem Home Assistant ausgelegt und
# inkludiert die Kommunikation mit diesem, Regelung für Nulleinspeisung
# und in Zukunft einiges mehr.
# Die Kommunikation mit dem Balkonspeichers xy2500 basiert auf der Arbeit von noone2K.
# Die Hauptseite für neue Entwicklungen, Integration MQTT, openhab usw. findet ihr unter:
# https://gist.github.com/noone2k/2ddea4c9bf116aaaefb8626b064d9a41
#
# Mögen euch die Bits gnädig sein,

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

@sundowndev
sundowndev / GoogleDorking.md
Last active May 21, 2024 04:18
Google dork cheatsheet

Google dork cheatsheet

Search filters

Filter Description Example
allintext Searches for occurrences of all the keywords given. allintext:"keyword"
intext Searches for the occurrences of keywords all at once or one at a time. intext:"keyword"
inurl Searches for a URL matching one of the keywords. inurl:"keyword"
allinurl Searches for a URL matching all the keywords in the query. allinurl:"keyword"
intitle Searches for occurrences of keywords in title all or one. intitle:"keyword"
@nntrn
nntrn / espn-api-list.md
Last active May 21, 2024 04:14
List of nfl api endpoints from espn

List of NFL API Endpoints

This page has been updated a lot in the past 3 years. Older revisions you might like more than this one:

  • June 2021 - list of endpoints for other sports/leagues (i.e. basketball, baseball, lacrosse, rugby)
  • August 2021 - get historical fantasy league data
  • September 2021 - list of endpoints in plain text
  • May 2023 - collapsed endpoint response examples

Additional Resources

@adujardin
adujardin / crowdhuman_to_yolo.py
Last active May 21, 2024 04:14
Convert CrowdHuman dataset to Yolo (v5) annotations
"""
Based on https://raw.githubusercontent.com/jkjung-avt/yolov4_crowdhuman/master/data/gen_txts.py
Inputs:
* nothing
* or folder with CrowdHuman_train01.zip, CrowdHuman_train02.zip, CrowdHuman_train03.zip, CrowdHuman_val.zip, annotation_train.odgt, annotation_val.odgt
python crowdhuman_to_yolo.py --dataset_path foo/bar/
Outputs:
@terrancesnyder
terrancesnyder / regex-japanese.txt
Created November 7, 2011 14:05
Regex for Japanese
Regex for matching ALL Japanese common & uncommon Kanji (4e00 – 9fcf) ~ The Big Kahuna!
([一-龯])
Regex for matching Hirgana or Katakana
([ぁ-んァ-ン])
Regex for matching Non-Hirgana or Non-Katakana
([^ぁ-んァ-ン])
Regex for matching Hirgana or Katakana or basic punctuation (、。’)
@hgrimm
hgrimm / 0-README.txt
Created May 21, 2024 04:10 — forked from yan-foto/0-README.txt
DeDRM Adobe Digital Edition Books
Convenient DeDRM Scripts
-------------------------
**NOTE**: read https://blog.quaintous.com/2021/02/16/remove-drm-from-ebooks/ to find out what this gist is good for.
* ./init.sh: extracts Adobe Digital Editions private key and required files to DeDRM.
* ./dedrm: removes DRM from given ebook (pdf/epub)
If you are using this for the first time, make sure that you have authenticated your Adobe Digital Editions (ADE) and run './init.sh'. Import any DRM-protected file into ADE and run 'dedrm.sh':
@LukeZGD
LukeZGD / ios-downgrade-dualboot.md
Last active May 21, 2024 04:10
Downgrade and dualboot status of almost all iOS devices

Downgrade and dualboot status of almost all iOS devices

UPDATED: 2024-05-19