GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — ossocr/reducer.py at master · QiangLi682/ossocr

Expand file tree

/

reducer.py

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
executable file
·
25 lines (20 loc) · 577 Bytes
/

reducer.py

Copy path

File metadata and controls

executable file
·
25 lines (20 loc) · 577 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/python
"""
reducer.py - take hadoop output and simplify results
- art rhyno <http://projectconifer.ca/>
(c) Copyright GNU General Public License (GPL)
"""
import sys
# input comes from STDIN for hadoop processing
for line in sys.stdin:
line = line.strip()
if len(line) > 0:
try:
char_cnt, filename, word, x0, y0, x1, y1 = line.split('\t', 7)
x0 = int(x0)
y0 = int(y0)
x1 = int(x1)
y1 = int(y1)
print "%s %s %d %d %d %d" % (filename,word,x0,y0,x1,y1)
except:
line = ''
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.