Run with Python:
pip-2.7 install cffi PYTHON=python2.7 sh go.sh
Run with PyPy:
pip-pypy install cffi PYTHON=pypy sh go.sh
Run with Python:
pip-2.7 install cffi PYTHON=python2.7 sh go.sh
Run with PyPy:
pip-pypy install cffi PYTHON=pypy sh go.sh
| /** | |
| Copyright (C) 2012-2015 by Autodesk, Inc. | |
| All rights reserved. | |
| LinuxCNC (EMC2) Sherline post processor configuration. | |
| $Revision: 00001 04fc0f7ff12e03d457d27cfcf3265dfc183241e5 $ | |
| $Date: 2016-10-08 13:46:56 $ | |
| FORKID {240C366F-30B2-4629-945B-8647E01614FC} |
| # Stream a video | |
| ffmpeg -re -i video.avi -vf "scale=40:ih*40/iw, crop=40:16" -f rawvideo -vcodec rawvideo -sws_flags bilinear -pix_fmt rgb24 - > /dev/udp/matelight.cbrp3.c-base.org/1337 | |
| # Loop a gif | |
| ffmpeg -re -ignore_loop 0 -i image.gif -vf "scale=40:ih*40/iw, crop=40:16" -f rawvideo -vcodec rawvideo -sws_flags bilinear -pix_fmt rgb24 - > /dev/udp/matelight.cbrp3.c-base.org/1337 | |
| # Stream webcam | |
| # Mac | |
| ffmpeg -re -f avfoundation -r 30 -s 1280x720 -i "0" -vf "scale=40:ih*40/iw, crop=40:16, pp=autolevels:f, eq=1.5" -f rawvideo -vcodec rawvideo -sws_flags bilinear -pix_fmt rgb24 - > /dev/udp/matelight.cbrp3.c-base.org/1337 |
| #!/usr/bin/env python2 | |
| # -*- coding: utf-8 -*- | |
| #https://developer.gnome.org/pygobject/2.28/ | |
| #http://www.pygtk.org/articles/subclassing-gobject/sub-classing-gobject-in-python.htm#d0e570 | |
| from gi.repository import GObject | |
| from gi.repository import GLib | |
| class GAsyncSpawn(GObject.GObject): |
| import threading | |
| from gi.repository import GObject | |
| # calls f on another thread | |
| def async_call(f, on_done): | |
| """ | |
| Starts a new thread that calls f and schedules on_done to be run (on the main | |
| thread) when GTK is not busy. | |
| Args: |
cd /usr/src
curl -L --insecure https://www.rtai.org/userfiles/downloads/RTAI/rtai-5.0-test2.tar.bz2 | tar xj
curl -L https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.18.20.tar.xz | tar xJ
curl -L http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.18.20-vivid/linux-image-3.18.20-031820-generic_3.18.20-031820.201508081633_amd64.deb -o linux-image-3.18.20-generic-amd64.deb
| #! /usr/bin/env python | |
| import sys | |
| from websocket import create_connection | |
| uri = 'ws://' + sys.argv[1] + ':8181/core' | |
| ws = create_connection(uri) | |
| print "Sending " + sys.argv[2] + " to " + uri + "..." | |
| if len(sys.argv) >= 4: | |
| data = sys.argv[3] | |
| else: |
| import cv2 | |
| import sys | |
| class Camera(object): | |
| def __init__(self, index=0): | |
| self.cap = cv2.VideoCapture(index) | |
| self.openni = index in (cv2.CAP_OPENNI, cv2.CAP_OPENNI2) | |
| self.fps = 0 |
| cmake_minimum_required(VERSION 2.8) | |
| project(OCVSamples) | |
| set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") | |
| find_package(OpenCV 3.0 QUIET) | |
| if(OpenCV_FOUND) | |
| add_definitions(-DUSE_OPENCV3) | |
| else() | |
| message(FATAL_ERROR "OpenCV > 3.0 not found.") |
| cmake_minimum_required(VERSION 2.8.11) | |
| project(VtkFboInQtQuick) | |
| set(CMAKE_INCLUDE_CURRENT_DIR ON) | |
| set(CMAKE_AUTOMOC ON) | |
| find_package(VTK REQUIRED) | |
| include(${VTK_USE_FILE}) |