Skip to content

Instantly share code, notes, and snippets.

View cyhhao's full-sized avatar
🏠
Working from home

Call White cyhhao

🏠
Working from home
View GitHub Profile
@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:
@wavezhang
wavezhang / java_download.sh
Last active May 13, 2024 13:37
download java from oracle without login
wget -c --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/12.0.2+10/e482c34c86bd4bf8b56c0b35558996b9/jdk-12.0.2_linux-x64_bin.tar.gz
@leonjza
leonjza / crypt.php
Last active May 18, 2022 15:34
Laravel ~5.1 encryptor / decryptor.
<?php
/*
* Quick 'n Dirty Laravel 5.1 decrypter.
*
* Based directly off the source code at:
* https://github.com/laravel/framework/blob/5.1/src/Illuminate/Encryption/Encrypter.php
*
* Have access to an application key from a .env?
* Have some encrypted data you want to decrypt?
* Well: (new Crypt($key))->decrypt($payload); should have you sorted
@wong2
wong2 / cmds.txt
Last active May 2, 2021 12:13
在任意聊天中输入。 [ ]表示后面要跟一个空格(可能还需要别的参数才能生效)
//wearversion
//wearlog
//wearvoiceinputenable
//wearvoiceinputdisable
//weargoogleapi
//assert
//pushassert
//uplog
//upcrash
//switchnotificationstatus
Full Line Selection 选择文本是否根据文本内容进行描边
Highlight Active Line 是否高亮所选行
Show Invisibles 显示空格、Tab、回车等不可见符号
Show Indent Guides 显示缩进对齐线
Persistent HScroll 是否保持水平滚动条的显示
Animate scrolling 滚动动画,比如查找时的跳跃
Show Gutter 显示左栏行标
Show Print Margin 显示打印边界线,超过就溢出打印范围
Use Soft Tab 软Tab,即用4个空格体态\t
Highlight selected word 提醒显示和所选单词类似的词