Skip to content

Instantly share code, notes, and snippets.

View zhexuany's full-sized avatar
🎯
Focusing

Zhexuan Yang zhexuany

🎯
Focusing
  • Shanghai
View GitHub Profile
@zhexuany
zhexuany / config_aloha_unified.yaml
Last active July 20, 2025 14:35
A Config can help you convert HDF5 to MCAP files
# config_aloha_unified.yaml
# Along this config, you also need a urdf
# Unified configuration for bidirectional ALOHA HDF5 ↔ MCAP conversion
# This single configuration file works for both conversion directions
# Global sampling rate (Hz) - default for all datasets
sampling_rate: 20.0
joint_states:
hdf5_paths:
@zhexuany
zhexuany / update_nested_mcap_to_coscene.bash
Created July 8, 2025 13:05
When you have nested directories having mcap fiels, Using this script to upload all data to coScene
#!/bin/bash
set -e # 遇到错误自动退出
# 递归处理所有 .mcap 文件
find . -type f -name "*.mcap" | while read -r original_file; do
echo "▶ Processing: $original_file"
# 1. 压缩文件(生成临时压缩文件)
compressed_file="${original_file%.mcap}_compressed.mcap"
if [[ ! -f "$compressed_file" ]]; then
@zhexuany
zhexuany / tags.py
Created December 1, 2017 23:59
It is a simple python script which help you grab all leetcode problem by tags.
import requests
import bs4
root_url = 'http://leetcode.com'
index_url = root_url + '/tag/dynamic-programming/'
def get_problem_number_by_tags():
response = requests.get(index_url)
soup = bs4.BeautifulSoup(response.text, "html5lib")
table = soup.find('table')
table_body = table.find('tbody')
rows = table_body.find_all('tr')

Keybase proof

I hereby claim:

  • I am zhexuany on github.
  • I am zhexuany (https://keybase.io/zhexuany) on keybase.
  • I have a public key ASCSaCblfAsAfu3_NCSZS03UdF_3KkijpJUMTct7gONqQwo

To claim this, I am signing this object:

@zhexuany
zhexuany / cipher.go
Last active March 29, 2017 14:01
The Vigenère Cipher: A modified version.
package main
import "fmt"
func main() {
key := "BADboy"
msg := "This is fun!"
cm, cmr := initMap()
fmt.Println(encode(msg, key, cm, cmr))
fmt.Println(decode(encode(msg, key, cm, cmr), key, cm, cmr))
@zhexuany
zhexuany / foo.go
Last active February 10, 2020 20:20
Go, X does not implement Y (… method has a pointer receiver)
package main
import (
"fmt"
)
type Foo interface {
Bar()
}