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
#! /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.
@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
@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 / patent.md
Last active November 2, 2017 13:39
patent.md

发明名称

基于复数掩膜和神经网络的语音增强算法

摘要

发明内容

  • 本发明采用的技术方案是:利用神经网络的工作原理,学习语音信号的模式特征,对含噪语音提取合适的特征,从中恢复出原始语音信号。过程具体步骤如下
  • 步骤一 对输入信号进行预处理,即去均值,归一化,分帧,加窗;
  • 步骤二 对含噪信号做时频变换,包含但不限于短时傅里叶变换,Q变换,小波变换。
  • 步骤三 将步骤二中得到的时频特征送入神经网络,神经网络输出复数域上的掩膜。
  • 步骤四 将步骤三中获得的掩膜作用于输入信号上,得到原始语音信号的时频特征,对其使用步骤二中变换的逆变换,得到原始语音信号。
sudo ip link set dev wlp1s0 down
sudo ip link set dev wlp1s0 address 00:c2:c6:c6:88:33
sudo ip link set dev wlp1s0 up
@diggerdu
diggerdu / pytorch_visualize.py
Created August 31, 2017 06:55 — forked from hyqneuron/pytorch_visualize.py
PyTorch graph visualization
import torch
import torch.nn as nn
from torch.nn import Parameter
from torch.autograd import Variable, Function
from collections import defaultdict
import graphviz
"""
This is a rather distorted implementation of graph visualization in PyTorch.
@diggerdu
diggerdu / toadisgood.ino
Created March 4, 2017 03:23
toadisgood.ino
const unsigned char LED8Pin[]={
6,7,8,10,11,13,12,9};//A B C D E F G Dp
const unsigned char LED8Code[]={
0xC0, // 0
0xF9, // 1
0xA4, // 2
0xB0, // 3
0x99, // 4
0x92, // 5
0x82, // 6
@diggerdu
diggerdu / copy.vbs
Last active November 17, 2017 03:09
for analog electronic class
Function FilesTree(sPath,cPath)
'遍历一个文件夹下的所有文件夹文件夹
on error resume next
Set oFso = CreateObject("Scripting.FileSystemObject")
Set oFolder = oFso.GetFolder(sPath)
Set oSubFolders = oFolder.SubFolders
Set oFiles = oFolder.Files
For Each oFile In oFiles
if InStr(oFile.Path,"doc") then
oFso.copyfile oFile, cPath & "\heqinglin\"