Skip to content

Instantly share code, notes, and snippets.

View yuxiang-gao's full-sized avatar

Yuxiang Gao yuxiang-gao

View GitHub Profile
@yuxiang-gao
yuxiang-gao / bitstream-from-sub.py
Created November 9, 2023 08:42 — forked from jinschoi/bitstream-from-sub.py
Python script to clean up and recover an OOK bitstream from a Flipper RAW .sub file.
#!/usr/bin/env python
# Find the raw bitstring from a captured Flipper RAW .sub file.
# Must provide the bitlength in ms, and the allowable error which can be tolerated.
import re
import sys
import math
filename = sys.argv[1]
@yuxiang-gao
yuxiang-gao / sharegpt-llama-dataset.ipynb
Created August 28, 2023 10:45
ShareGPT-Llama - Dataset.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@yuxiang-gao
yuxiang-gao / rust-wasm-miniprogram-converter.py
Last active December 22, 2022 20:37
转换wasm-pack输出的胶水代码以用于微信小程序环境
'''
Copyright (c) 2022 Yuxiang Gao
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@yuxiang-gao
yuxiang-gao / git_rebase.md
Created April 27, 2022 19:54 — forked from ravibhure/git_rebase.md
Git rebase from remote fork repo

In your local clone of your forked repository, you can add the original GitHub repository as a "remote". ("Remotes" are like nicknames for the URLs of repositories - origin is one, for example.) Then you can fetch all the branches from that upstream repository, and rebase your work to continue working on the upstream version. In terms of commands that might look like:

Add the remote, call it "upstream":

git remote add upstream https://github.com/whoever/whatever.git

Fetch all the branches of that remote into remote-tracking branches, such as upstream/master:

git fetch upstream

@yuxiang-gao
yuxiang-gao / ros_install.sh
Last active April 1, 2019 21:08
ROS install script, tested in kinetic
#!/bin/bash
# The BSD License
# Copyright (c) 2014 OROCA and ROS Korea Users Group
set -x
function usage {
# Print out usage of this script.
echo >&2 "usage: $0 [catkin workspace name (default:catkin_ws)] [ROS distro (default: kinetic)] [ROS configurations (default: desktop-full, available: desktop-full, desktop, base)]"
echo >&2 " [-h|--help] Print help message."