Skip to content

Instantly share code, notes, and snippets.

View diggerdu's full-sized avatar
🍃
May you find your worth in the waking world

Xingjian Du diggerdu

🍃
May you find your worth in the waking world
View GitHub Profile
@diggerdu
diggerdu / ArchTermuxChrootInstall.md
Last active July 24, 2023 08:30
Install ArchArm in rooted Android device with Termux and chroot

Pre

  • rooted device
  • magisk and busybox module

Installation

pkg install tsu pulseaudio su mkdir /data/local/tmp/chrootarch cd /data/local/tmp/chrootarch tar xzvf ArchLinuxARM-aarch64-latest.tar.gz --numeric-owner mkdir sdcard

@diggerdu
diggerdu / bug_reproduce.tar.gz
Created June 7, 2020 12:23
bug_reproduce.tar.gz
This file has been truncated, but you can view the full file.
@diggerdu
diggerdu / # open-mpi - 2020-05-05_17-06-03.txt
Created May 5, 2020 09:10
open-mpi on Debian GNU/Linux 8.9 (jessie) - Homebrew build logs
Homebrew build logs for open-mpi on Debian GNU/Linux 8.9 (jessie)
Build date: 2020-05-05 17:06:03
@diggerdu
diggerdu / pseudo_cqt_pytorch.py
Created August 9, 2019 07:33 — forked from keunwoochoi/pseudo_cqt_pytorch.py
To compute pseudo CQT (Constant-Q-transform using STFT) on Pytorch.
cqt_filter_fft = librosa.constantq.__cqt_filter_fft
class PseudoCqt():
"""A class to compute pseudo-CQT with Pytorch.
Written by Keunwoo Choi
API (+implementations) follows librosa (https://librosa.github.io/librosa/generated/librosa.core.pseudo_cqt.html)
Usage:
src, _ = librosa.load(filename)
src_tensor = torch.tensor(src)
### 唇语
#### 经过标注人员挑选过正面清晰 唇部完整的小图
/raid/data1/corpus/annotated/wellDone
#### 原始视频文件
/raid/data1/corpus/video
/raid/data1/LipReadProject/oriVideo
### 音频
#### 原始音频文件 420560条
/raid/data1/corpus/audio/corpus_audio.tar
/raid/data1/LipReadProject/oriAudio
from trueskill import Rating, rate_1vs1
import sounddevice as sd
## Microsoft TrueSkill System
# [Ref](https://en.wikipedia.org/wiki/TrueSkill)
# [Package](http://trueskill.org/)
model_list = ['basic_rnn_emb_rate_0.5', 'lookback_rnn_emb_rate_0.5', 'attention_rnn_emb_rate_0.5', .........]

评价指标

Survey

@diggerdu
diggerdu / client.py
Last active August 7, 2018 08:58 — forked from yoavram/client.py
Example of uploading binary files programmatically in python, including both client and server code.Client implemented with the requests library and the server is implemented with the flask library.
import requests
#http://docs.python-requests.org/en/latest/user/quickstart/#post-a-multipart-encoded-file
url = "http://localhost:5000/"
fin = open('simple_table.pdf', 'rb')
files = {'file': fin}
try:
r = requests.post(url, files=files)
print r.text
[
{
"domain": ".grammarly.com",
"expirationDate": 1587434763,
"hostOnly": false,
"httpOnly": false,
"name": "_ga",
"path": "/",
"sameSite": "no_restriction",
"secure": false,