Skip to content

Instantly share code, notes, and snippets.

View caffe-install.md

Caffe Installation

Steps followed on Ubuntu Server 16.04, CPU-only install, with pycaffe.

Install Dependencies

sudo apt install build-essential python-dev python-pip libprotobuf-dev libleveldb-dev\
libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler libhdf5-dev libgflags-dev\
libgoogle-glog-dev liblmdb-dev libatlas-base-dev
View magento-order-csv.py
def products_ordered(self, sku, quantity, price):
"""
Requires populated sku_reference dictionary. Catch Key Error on fail.
accepts
sku str
quantity str (D.DDDD)
ex. "1.0000" _must_ have a decimal followed by four
place values.
@kphretiq
kphretiq / find_cam.py
Created Mar 16, 2016
Identify Camera Device Linux
View find_cam.py
"""
#Installing v4l-utils (debian) gives one the handy v4l2-ctl command:
$ v4l2-ctl --list-devices
HPigh Definition Webcam (usb-0000:00:14.0-11):
/dev/video2
UVC Camera (046d:0821) (usb-0000:00:14.0-13):
/dev/video0
@kphretiq
kphretiq / find_cam.py
Created Mar 16, 2016
Identify Camera Device Linux
View find_cam.py
"""
#Installing v4l-utils (debian) gives one the handy v4l2-ctl command:
$ v4l2-ctl --list-devices
HPigh Definition Webcam (usb-0000:00:14.0-11):
/dev/video2
UVC Camera (046d:0821) (usb-0000:00:14.0-13):
/dev/video0
@kphretiq
kphretiq / Flask-SqlAlchemy-Many-to-Many.py
Last active Aug 9, 2020
A (hopefully) simple demo of how to do many-to-many relationships using Flask-SQLAlchemy
View Flask-SqlAlchemy-Many-to-Many.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from flask import Flask, url_for
from flask_sqlalchemy import SQLAlchemy
"""
Flask-SQLAlchemy many-to-many relationship using helper table
http://flask-sqlalchemy.pocoo.org/2.1/models/
Hippies love their dogs.
View describe_tables.py
#!/usr/bin/env python
import pymysql.cursors
"""
Stupid, yet handy.
Dump a description of all tables in a database.
Edit the variables below the "if __name__" line
writes a markdown report suitable for whatever suits you.
"""
You can’t perform that action at this time.