Skip to content

Instantly share code, notes, and snippets.

View kilakila-heart's full-sized avatar

飞鸟 kilakila-heart

  • xiamen fujian
View GitHub Profile
@kilakila-heart
kilakila-heart / document_to_text.py
Created August 2, 2017 12:47 — forked from bufke/document_to_text.py
Convert odt, doc, docx, pdf to text with python and some linux programs. Doesn't require Libreoffice.
from subprocess import Popen, PIPE
from docx import opendocx, getdocumenttext
#http://stackoverflow.com/questions/5725278/python-help-using-pdfminer-as-a-library
from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter
from pdfminer.converter import TextConverter
from pdfminer.layout import LAParams
from pdfminer.pdfpage import PDFPage
from cStringIO import StringIO
@kilakila-heart
kilakila-heart / DTW_python.py
Created August 2, 2017 06:15 — forked from bistaumanga/DTW_python.py
Dynamic Time warping implemented in python
'''Implementation and Demostration of Dynamic Time Warping
Requires : python 2.7.x, Numpy 1.7.1, Matplotlib, 1.2.1'''
from math import *
import numpy as np
import sys
def DTW(A, B, window = sys.maxint, d = lambda x,y: abs(x-y)):
# create the cost matrix
A, B = np.array(A), np.array(B)
@kilakila-heart
kilakila-heart / async_grad_verify.py
Created June 21, 2017 08:41
Verify the mechanism of gradients update operation during asynchronous training in between-graph approach.
#!/opt/anaconda3/bin/python
# -*- coding:utf-8 -*-
# Created by Enigma on 2016/9/26
"""
Verify the mechanism of gradients update operation during asynchronous training in between-graph approach.
Run:
# ps
/opt/anaconda3/bin/python async_grad_test.py --ps_hosts=localhost:1024 --worker_hosts=localhost:1025,localhost:1026 --job_name=ps --task_index=0
# workers
/opt/anaconda3/bin/python async_grad_test.py --ps_hosts=localhost:1024 --worker_hosts=localhost:1025,localhost:1026 --job_name=worker --task_index=0
@kilakila-heart
kilakila-heart / async_grad_verify.py
Created June 21, 2017 08:41
Verify the mechanism of gradients update operation during asynchronous training in between-graph approach.
#!/opt/anaconda3/bin/python
# -*- coding:utf-8 -*-
# Created by Enigma on 2016/9/26
"""
Verify the mechanism of gradients update operation during asynchronous training in between-graph approach.
Run:
# ps
/opt/anaconda3/bin/python async_grad_test.py --ps_hosts=localhost:1024 --worker_hosts=localhost:1025,localhost:1026 --job_name=ps --task_index=0
# workers
/opt/anaconda3/bin/python async_grad_test.py --ps_hosts=localhost:1024 --worker_hosts=localhost:1025,localhost:1026 --job_name=worker --task_index=0
@kilakila-heart
kilakila-heart / Caffe + Ubuntu 12.04 64bit + CUDA 6.5 配置说明.md
Created April 16, 2016 05:17 — forked from bearpaw/Caffe + Ubuntu 12.04 64bit + CUDA 6.5 配置说明.md
Caffe + Ubuntu 12.04 / 14.04 64bit + CUDA 6.5 / 7.0 配置说明

Caffe + Ubuntu 12.04 64bit + CUDA 6.5 配置说明

本步骤能实现用Intel核芯显卡来进行显示, 用NVIDIA GPU进行计算。

1. 安装开发所需的依赖包

安装开发所需要的一些基本包

sudo apt-get install build-essential
sudo apt-get install vim cmake git
sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libboost-all-dev libhdf5-serial-dev
@kilakila-heart
kilakila-heart / python_tutorials.rst
Created April 16, 2016 03:56 — forked from reorx/python_tutorials.rst
Python 中英文教程及其他进阶资源