This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Refer http://craiget.com/extracting-table-data-from-pdfs-with-ocr/ | |
import Image, ImageOps | |
import subprocess, sys, os, glob | |
# minimum run of adjacent pixels to call something a line | |
H_THRESH = 300 | |
V_THRESH = 300 | |
def get_hlines(pix, w, h): | |
"""Get start/end pixels of lines containing horizontal runs of at least THRESH black pix""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def list_splice(target, start, delete_count=None, *items): | |
"""Remove existing elements and/or add new elements to a list. | |
target the target list (will be changed) | |
start index of starting position | |
delete_count number of items to remove (default: len(target) - start) | |
*items items to insert at start index | |
Returns a new list of removed items (or an empty list) | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ... more above ... | |
# wsfl bash is not a login shell | |
if [ -d "$HOME/bin" ] ; then | |
PATH="$HOME/bin:$PATH" | |
fi | |
# ssh-agent configuration | |
if [ -z "$(pgrep ssh-agent)" ]; then | |
rm -rf /tmp/ssh-* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
state.Intel { | |
control.1 { | |
iface CARD | |
name 'HDMI/DP,pcm=3 Jack' | |
value false | |
comment { | |
access read | |
type BOOLEAN | |
count 1 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
state.Intel { | |
control.1 { | |
iface CARD | |
name 'HDMI/DP,pcm=3 Jack' | |
value false | |
comment { | |
access read | |
type BOOLEAN | |
count 1 | |
} |