自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(78)
  • 收藏
  • 关注

原创 Merlin TTS 深度学习的语音合成

githubhttps://github.com/CSTR-Edinburgh/merlin安装与训练参考这个文档即可 在Mac上安装成功http://jrmeyer.github.io/merlin/2017/02/14/Installing-Merlin.html除非GPU内存够大 否则使用CPU训练使用训练好的模型合成语音#1 安装Festivalht

2017-03-04 02:36:22 9070 2

原创 Install GPU Tensorflow

follow the instructionshttp://www.nvidia.com/object/gpu-accelerated-applications-tensorflow-installation.htmlexport LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/cuda/lib:/usr/local/cuda/extras

2017-02-10 02:52:42 539

原创 Linux create patch, apply and revert

cp file file.origmake your edits to filecreate patchdiff -u file file.orig > file.patchapply patchpatch -p0 reverse patchpatch –p0 -R

2017-02-08 09:35:22 1142

原创 可过期的对象

单个对象Suppliershttps://google.github.io/guava/releases/19.0/api/docs/com/google/common/base/Suppliers.html#memoizeWithExpiration(com.google.common.base.Supplier, long, java.util.concurrent.Tim

2017-01-18 07:57:22 425

原创 Python SOAP API, HTTP POST and HTTP GET

#0 print_utils.pydef print_decorator(argument): def real_decorator(function): def wrapper(*args, **kwargs): print '-' * 10 + 'start of ' + argument + '-' * 10 fun

2016-10-28 09:09:04 2971

转载 Java SOAP API example

http://stackoverflow.com/questions/15948927/working-soap-client-exampleimport javax.xml.soap.*;public class SOAPClientSAAJ { public static void main(String args[]) throws Exception {

2016-10-28 01:56:29 959

原创 Python multiprocessing需要避免的陷阱

这段代码可以在Mac上正常运行(windows不行)# build.pyfrom multiprocessing import Poolimport tracebackdef f(x): print 'start pool.f' return x*xdef run(): for line in traceback.format_stack():

2016-10-25 14:02:23 3408

原创 Python print线程安全

import threadingimport loggingimport subprocesslock = threading.Lock()STR = "abc abc abc"# print is not thread safedef printer(): while True: print STR# lock printdef lock_pr

2016-10-06 07:48:04 1466

转载 Python Context Manager

https://jeffknupp.com/blog/2016/03/07/python-with-context-managers/

2016-10-06 07:42:32 269

原创 Python2 Unicode

#1 英文str与unicode 内容相同 但是类型不同 test_type#2 中文str与unicode 内容与类型都不同test_type#3 open只能按照str读test_open_str_filetest_open_unicode_file#4 codecs只能按照unicode读test_codecs_str_filetest_codecs_unicode_fi

2016-08-11 15:29:18 521

原创 Exit Codes

Part 1: Advanced Bash Scripting Guide1: Catchall for general errors2: Misuse of shell builtins (according to Bash documentation)126: Command invoked cannot execute127: "command not found"1

2016-07-26 02:00:33 584

原创 Python

#1 load dictionary from file# .$ .'' .-LRB- .-RRB- ., .. .: .ADD XAFX PRTCC CONJCD NUMDT DETEX DETFW XGW XHYPH .IN ADPJJ ADJJJR ADJJJS ADJLS XMD VERBNFP

2016-07-19 05:46:51 354

原创 Install tensorflow/SyntaxNet on Ubuntu VM

1 install Ubuntu 14.04 by virtualbox1.1 install virtualboxhttps://www.virtualbox.org/wiki/Downloads1.2 downlaod Ubuntu 14.04 Wily vitualbox vdihttp://www.osboxes.org/ubuntu/#ubuntu-1

2016-06-25 02:26:26 1524

原创 Features for OpenNLP POS Tagging

Paper MAXIMUM ENTROPY MODELS FOR NATURAL LANGUAGE AMBIGUITY RESOLUTION Page 39OpenNLP source codeFeatures:ti-1 = X   //previous tagti-2ti-1 = XY //previous and preprevious tagswi = X   

2016-06-21 06:31:36 473

原创 Python NLP相关工具

NLTKNLP POS Tagging与NERNLP Stemming与Lemmatization的区别nltk.tokenize.word_tokenize(s)Numpynp.zeros((D, N))np.random.shuffle(data)pandasdata = pd.read_csv('spambase.data').as_matri

2016-06-15 05:25:20 596

原创 NLP POS Tagging与NER

POS Taggingimport nltks = "Steve Jobs was the CEO of Apple Corp."tags = nltk.pos_tag(s.split())tags[('Steve', 'NNP'), ('Jobs', 'NNP'), ('was', 'VBD'), ('the', 'DT'), ('CEO', 'NNP'), ('of', 'IN'

2016-06-11 15:07:37 4729

原创 NLP Stemming与Lemmatization的区别

Stemming:基于规则from nltk.stem.porter import PorterStemmerporter_stemmer = PorterStemmer()porter_stemmer.stem('wolves')结果里es被去掉了u'wolv'Lemmatization:基于字典from nltk.stem import WordNetLemmatize

2016-06-11 14:45:51 6406

转载 C++泛型类的.h与.cpp

原文http://www.codeproject.com/Articles/48575/How-to-define-a-template-class-in-a-h-file-and-imp(不正确)http://blog.ethanlim.net/2014/07/separate-c-template-headers-h-and.html (正解)Solution

2016-05-24 15:37:48 1363

原创 NLP相关

暂时先列一下 以后总结词相似度gloVeword2vec

2016-05-24 07:14:59 265

转载 Mac上配置C++ Eclipse 尤其是GDB错误

首先要下载安装Eclipse CDThttps://eclipse.org/cdt/下面要安装gdb原文在此 https://www.ics.uci.edu/~pattis/common/handouts/macmingweclipse/allexperimental/mac-gdb-install.html摘出精要部分于此Installing GDBb

2016-05-13 13:52:50 3759

原创 正则表达式匹配连续重复单词Regular Expression For Consecutive Duplicate Unicode Words

Regular Expression For Consecutive Duplicate Unicode Words

2016-05-11 14:44:35 3709

原创 Apache Math Linear Regression

package com;import org.apache.commons.math3.stat.regression.OLSMultipleLinearRegression;import org.apache.commons.math3.stat.regression.SimpleRegression;public class MathLinearRegression { publ

2015-12-17 10:09:30 2596

原创 Java程序的三种输入

第一种 Program arguments命令行中写入 main中的args读出第二种System propertyVM arguments -D写入 或者程序中System.setProperty写入System.getProperty读出第三种 操作系统环境变量shell中set写入System.getEnv()读出参考http://blog.csdn.ne

2015-08-18 14:23:56 627

原创 VI

#1 字符替换为换行:s/ABCD/\r/g

2015-08-12 09:57:47 269

转载 Java动态加载Jar

使用Jamaica VM的时候 无法运行时刻通过-cp加载额外的Jar,这个代码可以完成此功能。原帖在此http://stackoverflow.com/questions/60764/how-should-i-load-jars-dynamically-at-runtimeimport java.io.File;import java.io.IOException;import

2015-08-11 14:02:47 472

原创 HTTP GET POST PUT DELETE

HTTP的GET POST PUT DELETE就是对应查 增 改 删这里有个例子http://www.mkyong.com/java/how-to-send-http-request-getpost-in-java/

2015-03-24 14:08:05 444

原创 总结

模板重点题其他二维问题可以想想四叉树

2015-03-21 14:31:52 352

原创 balance parentheses

题目:Given a string with parentheses, return a string with balanced parentheses  by removing the fewest characters possible. You cannot add anything to the string.Examples:balance("()") -> "()"b

2015-03-21 00:29:42 613

原创 检测有向图中的环

题目http://www.geeksforgeeks.org/detect-cycle-in-a-graph/Java实现import java.util.ArrayList;import java.util.HashSet;import java.util.List;class GraphNode { private List children = new ArrayL

2015-03-17 02:38:40 1587

原创 ivy extends--ivy间的依赖

common-ivy.xml test(*);compile->compile(*);package->package(*)"> ivy.xml依赖common-ivy.xml

2015-02-12 08:29:39 440

原创 双指针

https://oj.leetcode.com/tag/two-pointers/

2015-02-09 05:29:20 392

原创 Stack Queue与组合数据结构

StackQueue

2015-02-08 08:56:34 457

原创 [System Design]Scalability for Dummies学习笔记

ClonesDataBaseCacheAsynchronism

2015-01-27 08:06:19 798

原创 无序数组中找第K个的数

方法1:排序(NlogN)方法2:利用堆(NlogK)首先将前K个元素构建最大堆,堆顶是前K个元素中第K大的元素。(这步复杂度KlogK)遍历剩余元素(这步复杂度(N-K)logK)    如果新元素    否则 新元素不可能是第K大的元素方法3:利用快排Partition O(N)

2015-01-14 01:48:06 652

原创 Java容器

Collection: List: LinkedList, ArrayList, Stack                     Queue: LinkedList, PriorityQueue (Heap)                     Set: TreeSet, HashSet, LinkedHashSetMap: TreeMap, HashMap, LinkedHa

2015-01-11 07:11:56 279

原创 Java逻辑与位操作

逻辑位与a&b 不短路a&&b 短路 a&b或a|b 不短路a||b 短路a|b异或a^ba^b非!a~a

2015-01-08 01:42:15 424

原创 数组与贪心

https://oj.leetcode.com/tag/array/https://oj.leetcode.com/tag/greedy/

2015-01-03 14:23:41 399

原创 实现一个插入,删除,随机都是O(1)复杂度的Set

题目实现一个Set,要求add O(1)remove O(1)random O(1)分析同时使用两种数据结构ArrayList: 保存所有元素HashMap: key为元素,value为元素在ArrayList中的下标add: ArrayList.add O(1) HashMap add O(1)random: ArrayList里随机取一个值r

2015-01-02 09:01:27 2973

原创 Sliding Window Maximum

题目Sliding Window MaximumA long array A[] is given to you. There is a sliding window of size w which is moving from the very left of the array to the very right. You can only see the w numbers in

2015-01-02 08:28:56 438

原创 一个正整数int有多少bit位为一

题目给一个正整数int,输出bit位为1的个数。解法1 public static int bitCount(int x) { int count = 0; while(x > 0) { count += (x % 2); x = x / 2; } return count; }如果是9 计算4次解法2 public static int bit

2015-01-02 08:03:56 3841

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除