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
#include <opencv2/opencv.hpp> | |
#include <iostream> | |
int main(int, char**) { | |
// open the first webcam plugged in the computer | |
cv::VideoCapture camera(0); // in linux check $ ls /dev/video0 | |
if (!camera.isOpened()) { | |
std::cerr << "ERROR: Could not open camera" << std::endl; | |
return 1; | |
} |
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/env python3 | |
# -*- coding: utf-8 -*- | |
# | |
# Copyright © 2019 James Seo <[email protected]> (github.com/kangtastic). | |
# | |
# This file is released under the WTFPL, version 2 (wtfpl.net). | |
# | |
# md4.py: An implementation of the MD4 hash algorithm in pure Python 3. | |
# | |
# Description: Zounds! Yet another rendition of pseudocode from RFC1320! |
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
location / { | |
add_header 'Cache-Control' 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0'; | |
expires off; | |
} |
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 | |
################################################################################ | |
### OpenCV2 Installation Script ### | |
################################################################################ | |
# Source code at https://github.com/arthurbeggs/scripts # | |
################################################################################ | |
# # | |
# Feel free to copy and modify this file. Giving me credit for it is your # | |
# choice, but please keep references to other people's work, which I don't # |
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
#include <iostream> | |
#include "boost/filesystem.hpp" | |
using namespace std; | |
using namespace boost::filesystem; | |
int main(int argc, char *argv[]) | |
{ | |
// list all files in current directory. | |
//You could put any file path in here, e.g. "/home/me/mwah" to list that directory |
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/sh | |
### BEGIN INIT INFO | |
# Provides: autosshd | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: autosshd initscript | |
# Description: This file should be used to construct scripts to be | |
# placed in /etc/init.d. |
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
import web | |
import json | |
from restful_controller import RESTfulController | |
urls = ( | |
r'/resources(?:/(?P<resource_id>[0-9]+))?', | |
'ResourceController', | |
) | |
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
/* | |
* V4L2 video capture example | |
* | |
* This program can be used and distributed without restrictions. | |
* | |
* This program is provided with the V4L2 API | |
* see http://linuxtv.org/docs.php for more information | |
*/ | |
#include <stdio.h> |
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
import pyproj | |
# Define two projections, one for the British National Grid and one for WGS84 (Lat/Lon) | |
# You can use the full PROJ4 definition or the EPSG identifier (PROJ4 uses a file that matches the two) | |
#bng = Proj("+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +datum=OSGB36 +units=m +no_defs towgs84='446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894'") | |
#wgs84 = Proj('+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs') | |
bng = pyproj.Proj(init='epsg:27700') | |
wgs84 = pyproj.Proj(init='epsg:4326') |