I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
This file contains hidden or 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
#!/usr/bin/python | |
# GoogleMapDownloader.py | |
# Created by Hayden Eskriett [http://eskriett.com] | |
# | |
# A script which when given a longitude, latitude and zoom level downloads a | |
# high resolution google map | |
# Find the associated blog post at: http://blog.eskriett.com/2013/07/19/downloading-google-maps/ | |
import urllib | |
import Image |
This file contains hidden or 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
// Based on the 'roboface' example sketch for Adafruit I2C 8x8 LED | |
// backpacks: | |
// | |
// www.adafruit.com/products/870 www.adafruit.com/products/1049 | |
// www.adafruit.com/products/871 www.adafruit.com/products/1050 | |
// www.adafruit.com/products/872 www.adafruit.com/products/1051 | |
// www.adafruit.com/products/959 www.adafruit.com/products/1052 | |
// | |
// Requires Adafruit_LEDBackpack and Adafruit_GFX libraries. | |
// For a simpler introduction, see the 'matrix8x8' example. |
- install WD Drive Utilities on Mac OS
- convert to JBOD/EXFAT and turn off Drive Sleep
- plug into linux
sudo parted /dev/sd<num>
print
rm 1 (and others)
mklabel gpt
unit TB
This file contains hidden or 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
This is a note on how to cross compile opencv for pretty much any ARM device(HardFP supported in this case) and deploy. Native | |
compiling in ARM devices can be painfully slow and they seem to hang often during build(mine got stuck at 43%). So if you happen | |
to have a desktop/laptop/server running ubuntu or similar linux distro, u can build opencv in fractionth of the time taken for | |
native compiling without any issues. | |
Building opencv3 with TBB and NEON and VFP support can boost opencv performance. Thanks to Adrian at pyimagesearch for pointing | |
that out. | |
Both my PC and target machine aka orange pi zero are running ubuntu 16.04 with python2.7 and python 3.5. | |
Let us use the term "build machine" for your PC where you are building opencv and "target machine" for the ARM single board computer. | |
1.Run the following commands in both machines(I think installing these in target machine only would do) to install the necessary libraries etc.(mine worked with them,so they should be enough |
This file contains hidden or 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
#!/bin/bash | |
# ######################################################### | |
# | |
# WW WW AAA RRRRRR NN NN IIIII NN NN GGGG | |
# WW WW AAAAA RR RR NNN NN III NNN NN GG GG | |
# WW W WW AA AA RRRRRR NN N NN III NN N NN GG | |
# WW WWW WW AAAAAAA RR RR NN NNN III NN NNN GG GG | |
# WW WW AA AA RR RR NN NN IIIII NN NN GGGGGG | |
# |
This file contains hidden or 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
""" | |
read() and grab() in OpenCV VideoCapture takes different time as there is no | |
decoding for grab() operation. Let's try to find out how much these two methods | |
differs. | |
""" | |
import cv2 | |
def main(): | |
tm = cv2.TickMeter() |
This file contains hidden or 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
# in a terminal | |
# python -m pip install --user opencv-contrib-python numpy scipy matplotlib ipython jupyter pandas sympy nose | |
import cv2 | |
import pandas as pd | |
import numpy as np | |
import imutils | |
from scipy.spatial import distance as dist | |
from imutils import perspective |
This file contains hidden or 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
# Installation of a decent editor, emacs | |
$ sudo apt install emacs | |
# Prerequisites to build Python | |
$ sudo apt install make build-essential libssl-dev zlib1g-dev libbz2-dev \ | |
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \ | |
xz-utils tk-dev libffi-dev liblzma-dev python-openssl | |
# Installation of pyenv | |
$ curl https://pyenv.run | bash |
OlderNewer