Skip to content

Instantly share code, notes, and snippets.

Avatar

Akash Jobanputra akashjobanputra

View GitHub Profile
@akashjobanputra
akashjobanputra / tesseract-3.04.sh
Last active Jul 3, 2018 — forked from IaroslavR/gist:834066ba4c0e25a27078
Install Tesseract 3.04 on Amazon AWS AMI
View tesseract-3.04.sh
sudo yum install autoconf aclocal automake
sudo yum install libtool
sudo yum install libjpeg-devel libpng-devel libtiff-devel zlib-devel
cd ~/downloads
wget http://www.leptonica.com/source/leptonica-1.72.tar.gz
tar -zxvf leptonica-1.72.tar.gz
cd leptonica-1.72
./configure
make
sudo make install
View keybase.md

Keybase proof

I hereby claim:

  • I am akashjobanputra on github.
  • I am akashj (https://keybase.io/akashj) on keybase.
  • I have a public key ASCyYXn50JrN1sf4dLdvsw_l_Ra-btbHSaReyDK3kLgQxAo

To claim this, I am signing this object:

@akashjobanputra
akashjobanputra / README.md
Last active Jun 22, 2018
Noisli black background
View README.md

Noisli Black Background

Install this extensions on chrome: Custom JS And open noisli.com and enter the code from this js to the Custom JS editor.

@akashjobanputra
akashjobanputra / piVideoRecorder.py
Created Jun 6, 2018
Create 2 minute video clips from PiCam Raspberry Pi 3
View piVideoRecorder.py
import subprocess
import time
import os
import sys
if len(sys.argv) > 1:
directory = sys.argv[1]
else:
directory = './videos'
directory = os.path.abspath(directory)
View normalizeSpaces.py
import re
LINEBREAK_REGEX = re.compile(r'((\r\n)|[\n\v])+')
NONBREAKING_SPACE_REGEX = re.compile(r'(?!\n)\s+')
def normalize_whitespace(text):
"""
Given ``text`` str, replace one or more spacings with a single space, and one
or more linebreaks with a single newline. Also strip leading/trailing whitespace.
@akashjobanputra
akashjobanputra / stayAlive.py
Created May 24, 2018
Sophos Network Access Login script to avoid logging in from Browser every hour
View stayAlive.py
import requests
import time
localtime = int(time.time())
r = requests.post('http://COPERNICUS_HOST:PORT/login.xml', data={
'username': 'PLAINTEXT_USERNAME',
'password': 'PLAINTEXT_PASSWORD',
'mode': 191,
'producttype': 0,
@akashjobanputra
akashjobanputra / gimpToCvHSV.py
Created May 16, 2018
HSV Values from GIMP to OpenCV.
View gimpToCvHSV.py
gimpH = 230
gimpS = 36
gimpV = 70
opencvH = gimpH / 2
opencvS = (gimpS / 100) * 255
opencvV = (gimpV / 100) * 255
print('H: {}\nS: {}\nV: {}\n'.format(opencvH, opencvS, opencvV))
@akashjobanputra
akashjobanputra / rasterizeDxf.py
Last active Apr 6, 2020
Python Script to rasterize / convert CAD DXF figures to PNG / JPG
View rasterizeDxf.py
import dxfgrabber
import cv2
import numpy as np
import sys
"""
def absdiff(num1, num2):
if num1 <= num2:
return num2 - num1
else:
@akashjobanputra
akashjobanputra / README-OpenCV-Source.md
Last active Feb 5, 2020
OpenCV from source for Conda env
View README-OpenCV-Source.md

Required things to build opencv3 from source for anaconda env

You can’t perform that action at this time.