Skip to content

Instantly share code, notes, and snippets.

View zhaoweizhong's full-sized avatar
🍭

Zhaowei Zhong zhaoweizhong

🍭
  • Tokyo, Japan
  • 06:23 (UTC +09:00)
View GitHub Profile
@zhaoweizhong
zhaoweizhong / fan_control.py
Created November 11, 2023 22:55
Temperature-based fan speed controller for Dell T630
#!/usr/bin/env python3
import yaml
import getopt
import os
import re
import sensors # https://github.com/bastienleonard/pysensors.git
import subprocess
import sys
import time
@zhaoweizhong
zhaoweizhong / mira_loli_bot.py
Created November 7, 2023 17:55
Auto formatting and sending Twitter/Pixiv messages to Telegram channel
import os
import re
import requests
import json
from telegram import InputMediaVideo, Update, InputMediaPhoto, Message
from telegram.ext import (
Application,
CommandHandler,
ContextTypes,
MessageHandler,
@zhaoweizhong
zhaoweizhong / tmplink_downloader.py
Last active October 15, 2023 08:16
A simple TMP.LINK (钛盘) downloader
@zhaoweizhong
zhaoweizhong / gtsdb2yolo.py
Created May 4, 2021 19:04
Transform GTSDB Dataset Annotations to YOLO Format
import json
import argparse
from rich.progress import track
def load_txt(file_name):
file = open(file_name, 'r')
data = []
for line in file.readlines():
data.append(line.replace('\n', ''))
return data
@zhaoweizhong
zhaoweizhong / gtsdb2coco.py
Created May 4, 2021 18:26
Transform GTSDB Dataset Annotations to COCO Format
import json
import argparse
import copy
from rich.progress import track
def load_txt(file_name):
file = open(file_name, 'r')
data = []
for line in file.readlines():
data.append(line.replace('\n', ''))
@zhaoweizhong
zhaoweizhong / tt100k2021_to_yolo.py
Created May 3, 2021 21:31
Transform Tsinghua-Tencent 100K Dataset (ver 2021) Annotations to YOLO Format
import json
import argparse
import copy
def load_json(file_name):
file = open(file_name, 'r').read()
return json.loads(file)
@zhaoweizhong
zhaoweizhong / tt100k2021_to_coco.py
Last active November 3, 2021 08:51
Transform Tsinghua-Tencent 100K Dataset (ver 2021) Annotations to COCO Format
import json
import argparse
import copy
def load_json(file_name):
file = open(file_name, 'r').read()
return json.loads(file)
@zhaoweizhong
zhaoweizhong / tt100k2coco.py
Created January 4, 2020 22:53
Transform Tsinghua-Tencent 100K Dataset Annotations to COCO Format
import json
import argparse
def load_json(file_name):
file = open(file_name, 'r').read()
return json.loads(file)
def parse(data, data_type, output_name):

Keybase proof

I hereby claim:

  • I am zhaoweizhong on github.
  • I am gotojun (https://keybase.io/gotojun) on keybase.
  • I have a public key whose fingerprint is 8C00 1948 5E64 5594 2EE0 2679 2076 4ECB 5C62 97E9

To claim this, I am signing this object: