This file contains 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 version: | |
# brings WiFi in from the Huawei adapter on eth1 | |
# pushes WiFi out from the built in adapter on wlan0 | |
# sets up an ip address on 192.168.5.2 to ssh into from another computer | |
################################################## | |
# Update | |
# | |
#sudo apt-get update | |
#sudo apt-get -qq upgrade |
This file contains 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 version: | |
# brings WiFi in from the Huawei adapter on eth1 | |
# pushes WiFi out from the built in adapter on wlan0 | |
# sets up an ip address on 192.168.5.2 to ssh into from another computer | |
# Update network interfaces | |
# | |
cat << EOF > /etc/network/interfaces | |
auto lo |
This file contains 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
# bring WiFi in from the panda adapter on wlan1 | |
# push WiFi out from the built in adapter on wlan0 | |
################################################## | |
# Install dnsmasq to provide IP addresses (via dhcp) | |
# Install hostapd to be an access point | |
# | |
sudo apt-get -qq install dnsmasq hostapd isc-dhcp-server ufw dnsutils netstat-nat | |
################################################## | |
# Update network interfaces | |
# |
This file contains 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
# First get wifi using the GUI then run this shit | |
sudo apt-get -qq install dnsmasq hostapd isc-dhcp-server ufw dnsutils netstat-nat | |
################################################## | |
# Update network interfaces | |
# | |
cat << EOF > /etc/network/interfaces | |
source-directory /etc/network/interfaces.d | |
auto lo |
This file contains 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
# Captive portal setup | |
######################################################## | |
sudo apt-get update -qq | |
sudo apt-get install -qq dnsmasq vim hostapd ufw dnsutils netstat-nat conntrack nginx php5 php5-common php5-fpm | |
sudo mkdir /usr/share/nginx/html/portal | |
sudo useradd nginx | |
sudo chown nginx:www-data /usr/share/nginx/html/portal | |
sudo chmod 755 /usr/share/nginx/html/portal | |
######################################################## |
This file contains 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
/* | |
* Device Application | |
* ------------------ | |
* This is the brains of the device. | |
* It serves 2 functions: | |
* 1) Updating the backend with all the relevant data. | |
* 2) Changing settings when certain things happen | |
* (ULPM, turning access to data on/off) | |
*/ |
This file contains 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
TARGET = prog | |
LIBS = -lm -lcurl -ljson-c | |
CC = gcc | |
CFLAGS = -g -Wall | |
.PHONY: default all clean | |
default: $(TARGET) | |
all: default |
This file contains 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
Total time: 425.367 s | |
File: ntu_rgb.py | |
Function: get_voxel_flow_full at line 699 | |
Line # Hits Time Per Hit % Time Line Contents | |
============================================================== | |
699 @profile | |
700 def get_voxel_flow_full(self, vid_id): | |
701 ''' Create a voxel grid with displacement vectors ''' | |
702 |
This file contains 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 cv2 | |
import numpy as np | |
def put_optical_flow_arrows_on_image(image, optical_flow_image, threshold=2.0, skip_amount=30): | |
# Don't affect original image | |
image = image.copy() | |
# Turn grayscale to rgb if needed | |
if len(image.shape) == 2: |