I was primarily using the JavaCPP presets for OpenCV(JavaCV) and Tesseract
But I also found some references for C++
Here's what works for C++
#include <tesseract/baseapi.h>
#include <leptonica/allheaders.h>
#include
I was primarily using the JavaCPP presets for OpenCV(JavaCV) and Tesseract
But I also found some references for C++
Here's what works for C++
#include <tesseract/baseapi.h>
#include <leptonica/allheaders.h>
#include
import time | |
from threading import Thread | |
def myfunc(i): | |
print "sleeping 5 sec from thread %d" % i | |
time.sleep(5) | |
print "finished sleeping from thread %d" % i | |
for i in range(10): | |
t = Thread(target=myfunc, args=(i,)) |
#!/usr/bin/env python | |
import signal | |
import sys | |
import os | |
import subprocess | |
process = 0 | |
if len(sys.argv[:])<2: | |
print "USAGE: python runner.py \"<your execution statement>\" \nQuotes are only necessary of you want to do redirection or something like that" | |
else: |
# run this command to create the docker container | |
docker run \ | |
--name ubuntuDev \ #containername | |
-e HOST_IP=$(ifconfig en0 | awk '/ *inet /{print $2}') \ #map the system and container Its, helpful for dev | |
-v ~/Code:/Code \ #mount the local directory on the container | |
-t -i \ | |
ubuntu:14.04 /bin/bash | |
# This created a container called ubuntuDev using the 'ubuntu:14.04' image from docker hub and runs bash interactively. | |
# -e ensures your networks are mapped correctly |
#!/bin/bash | |
# usage | |
# > ./git-tag-update.sh <tagname> | |
TAGNAME=$1 | |
git push --delete origin $TAGNAME # Deletes old tag from the server | |
git tag --delete $TAGNAME # Delete the old tag from local branch | |
git tag $TAGNAME # add the tag to the latest commit | |
git push --tags # persist tags to the server |
// Convert all img tags to use base64 src | |
function toDataUrl(url, elem) { | |
var xhr = new XMLHttpRequest(); | |
xhr.onload = function() { | |
var reader = new FileReader(); | |
reader.onloadend = function() { | |
//callback(reader.result); | |
elem.src = reader.result | |
} | |
reader.readAsDataURL(xhr.response); |
## Add this to the first block in your note book | |
import uuid | |
from IPython.core.display import display, HTML | |
import json | |
class RenderJSON(object): | |
def __init__(self, json_data): | |
if isinstance(json_data, dict): | |
self.json_str = json.dumps(json_data) |
## Start/Resume a named screen | |
# -L enables logging | |
# -d detaches the screen if there is an existing screen attached | |
# -r resumes the the screen if it exists | |
screen -d -r -L <sessName> | |
## See all open screens | |
screen -ls | |
## To detach from a screen |
import time | |
from concurrent.futures import ThreadPoolExecutor, as_completed | |
Thread_pool = ThreadPoolExecutor(6) # can change 6 to any number | |
def sample_sum_func(arg1,arg2): | |
print("start",arg1,arg2) | |
time.sleep(2) | |
print("end",arg1,arg2) |
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<title>SANKEY Experiment</title> | |
<style> | |
.node rect { | |
cursor: move; | |
fill-opacity: .9; | |
shape-rendering: crispEdges; | |
} |