Skip to content

Instantly share code, notes, and snippets.

View sunu's full-sized avatar
🏠
Working from home

Tarashish Mishra sunu

🏠
Working from home
View GitHub Profile
@sunu
sunu / foo_names.md
Created July 26, 2016 13:04 — forked from mihaitodor/foo_names.md
Map slugs to course names

https://archive.org/download/archiveteam_coursera_20160627114043/coursera_20160627114043.megawarc.warc.gz

  • bigdata = Web Intelligence and Big Data
  • clinical skills = Teaching and Assessing Clinical Skills
  • comp finance = Introduction to Computational Finance and Financial Econometrics
  • data sci = Introduction to Data Science
  • dmathgen = 离散数学概论 Discrete Mathematics Generality
  • global introuslaw = The Global Student's Introduction to U.S. Law
  • global theatre = Theatre and Globalization
  • global theatre = Theatre and Globalization
  • inforiskman = Information Security and Risk Management in Context

Keybase proof

I hereby claim:

  • I am sunu on github.
  • I am sunu (https://keybase.io/sunu) on keybase.
  • I have a public key ASCbcymGENThKDjkxmSd6fHtLxUPZXmdcr4vQhqn3qviAwo

To claim this, I am signing this object:

@sunu
sunu / README.md
Created March 25, 2016 05:55 — forked from dannguyen/README.md
Using Google Cloud Vision API to OCR scanned documents to extract structured data

Using Google Cloud Vision API's OCR to extract text from photos and scanned documents

Just a quickie test in Python 3 (using Requests) to see if Google Cloud Vision can be used to effectively OCR a scanned data table and preserve its structure, in the way that products such as ABBYY FineReader can OCR an image and provide Excel-ready output.

The short answer: No. While Cloud Vision provides bounding polygon coordinates in its output, it doesn't provide it at the word or region level, which would be needed to then calculate the data delimiters.

On the other hand, the OCR quality is pretty good, if you just need to identify text anywhere in an image, without regards to its physical coordinates. I've included two examples:

####### 1. A low-resolution photo of road signs

@sunu
sunu / issues.md
Last active October 2, 2015 01:52
Oppia Sprint - PyCon India

Dev infrastructure (Travis CI, bash, python):

  • #1001
  • #995
  • #972
  • #823
  • Address this TODO: ./scripts/start.sh:# TODO(sll): do this in a new shell.
  • Address this TODO: ./core/templates/dev/head/app.js:// TODO(sll): Remove the check for window.GLOBALS. This check is currently
# to execute this gist, run the line bellow in terminal
\curl -L https://gist.githubusercontent.com/sunu/a3107443677231e815fa/raw/9f25268168fa8b37cd3b230956fd8f8d19dca069/install_source_code_pro.sh | sh
BUILD FAILED
/home/sunu/.buildozer/android/platform/android-sdk-21/tools/ant/build.xml:720: The following error occurred while executing this line:
/home/sunu/.buildozer/android/platform/android-sdk-21/tools/ant/build.xml:734: Class not found: javac1.8
Total time: 1 second
pensource/kivy-notification-demo/notification_demo/.buildozer/android/app/main.pyo
assets/private.mp3: /home/sunu/opensource/kivy-notification-demo/notification_demo/.buildozer/android/app/eg.spec
assets/private.mp3: /home/sunu/opensource/kivy-notification-demo/notification_demo/.buildozer/android/app/buildozer.spec
assets/private.mp3: /home/sunu/opensource/kivy-notification-demo/notification_demo/.buildozer/android/app/sitecustomize.pyo
assets/private.mp3: /home/sunu/opensource/kivy-notification-demo/notification_demo/.buildozer/android/app/notificationdemo.kv
// Copyright 2014 The Oppia Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS-IS" BASIS,
@sunu
sunu / gist:9599655
Last active August 29, 2015 13:57 — forked from ygjb/gist:4543418

Description

Kitherder is a web application that is designed to facilitate participation in the Security Mentorships program. Note that while this program is currently limited to security projects, the goal of KitHerder is to provide the matchmaking and relationship management features required to open the program to the Mozilla community.

The requirements here are driven by the documentation from the mentorship program and it is expected that the system will leverage Mozillians.org accounts to reduce the amount of personal data stored in Kitherder, and issue badges using the Mozilla Foundation badge system based on participation criteria.

Terms

  • Mozillian - a user with an account on Mozillians.org
  • Vouched Mozillian - a user who has been "vouched" on Mozillians.org
from geventwebsocket.handler import WebSocketHandler
from gevent.pywsgi import WSGIServer
from flask import Flask, request, render_template
app = Flask(__name__)
@app.route('/')
def index():
return render_template('index.html')
@sunu
sunu / scraper.js
Created December 7, 2013 17:29
Web scraping using phantomjs
var page = new WebPage();
// Open our page.
page.open('http://www.thehindu.com/archive/web/2013/12/01/', function(status) {
// Wait 5 seconds for contents to load.
setTimeout(function() {
// Run some Jquery selection queries to get our links
var bangalore = page.evaluate(function() {
var links = []
$("li[data-section='Bangalore']").each(function() {