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 / infix2postfix.py
Last active December 28, 2017 05:32
infix to postfix
from pythonds.basic.stack import Stack
def infixToPostfix(infixexpr):
prec = {}
prec["*"] = 3
prec["/"] = 3
prec["+"] = 2
prec["-"] = 2
prec["("] = 1
opStack = Stack()
@diggerdu
diggerdu / binaryTree.py
Created January 18, 2018 07:51
binary tree python implementation
class BinaryTree():
def __init__(self,rootid):
self.left = None
self.right = None
self.rootid = rootid
def getLeftChild(self):
return self.left
@diggerdu
diggerdu / binaryTree.py
Created January 18, 2018 07:51
binary tree python implementation
class BinaryTree():
def __init__(self,rootid):
self.left = None
self.right = None
self.rootid = rootid
def getLeftChild(self):
return self.left
@diggerdu
diggerdu / binaryTree.py
Created January 18, 2018 07:51
binary tree python implementation
class BinaryTree():
def __init__(self,rootid):
self.left = None
self.right = None
self.rootid = rootid
def getLeftChild(self):
return self.left
#! /usr/bin/python3.5
"""
"PYSTONE" Benchmark Program
Version: Python/1.2 (corresponds to C/1.1 plus 3 Pystone fixes)
Author: Reinhold P. Weicker, CACM Vol 27, No 10, 10/84 pg. 1013.
Translated from ADA to C by Rick Richardson.
[
{
"domain": ".grammarly.com",
"expirationDate": 1587434763,
"hostOnly": false,
"httpOnly": false,
"name": "_ga",
"path": "/",
"sameSite": "no_restriction",
"secure": false,
@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

评价指标

Survey

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', .........]
### 唇语
#### 经过标注人员挑选过正面清晰 唇部完整的小图
/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