Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Kyle Hounslow kylehounslow

🎯
Focusing
Block or report user

Report or block kylehounslow

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kylehounslow
kylehounslow / install_opencv41_ubuntu.sh
Last active Jul 31, 2019
Script to Install OpenCV 4.1 + contrib modules on Ubuntu 16.04 (for C++ development)
View install_opencv41_ubuntu.sh
OPENCV_VERSION=4.1.0
apt-get update
apt-get install -y build-essential
apt-get install -y cmake
apt-get install -y wget
apt-get install -y git
apt-get install -y unzip
apt-get install -y yasm
apt-get install -y pkg-config
@kylehounslow
kylehounslow / docker_without_sudo
Last active Jun 19, 2019
Run docker with sudo in Ubuntu
View docker_without_sudo
# Create new group if it does not exist
sudo groupadd docker
# Add current user to the group
sudo gpasswd -a $USER docker
# Reload shell in order to have new group settings applied
newgrp docker
# Test everything worked
docker run hello-world
@kylehounslow
kylehounslow / install_opencv41_py35_linux.sh
Last active Jun 19, 2019
Script to install OpenCV 4.1 + contrib modules with Python3.5 bindings on Ubuntu.
View install_opencv41_py35_linux.sh
# run with `sudo ./install_opencv41_py35_linux.sh`
OPENCV_VERSION=4.1.0
apt-get install -y build-essential
apt-get install -y cmake
apt-get install -y wget
apt-get install -y git
apt-get install -y unzip
apt-get install -y yasm
apt-get install -y pkg-config
@kylehounslow
kylehounslow / osm_geopandas.py
Created Oct 30, 2017
Download OSM data and load into geopandas GeoDataFrame
View osm_geopandas.py
import os
import wget
import zipfile
import geopandas as gpd
dl_link = 'https://s3.amazonaws.com/metro-extracts.mapzen.com/san-francisco_california.imposm-shapefiles.zip'
shapefile_dir = './shapefiles'
shapefile_name ='san-francisco_california_osm_buildings.shp'
shapefile = os.path.join(shapefile_dir, shapefile_name)
@kylehounslow
kylehounslow / client.py
Last active Aug 19, 2019
Send and receive images using Flask, Numpy and OpenCV
View client.py
from __future__ import print_function
import requests
import json
import cv2
addr = 'http://localhost:5000'
test_url = addr + '/api/test'
# prepare headers for http request
content_type = 'image/jpeg'
You can’t perform that action at this time.