Skip to content

Instantly share code, notes, and snippets.


Dillon Erb dte

Block or report user

Report or block dte

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
dte /
Created Nov 16, 2017 — forked from jovianlin/
Get List of Devices in TensorFlow
from tensorflow.python.client import device_lib
def get_available_gpus():
local_device_protos = device_lib.list_local_devices()
return [ for x in local_device_protos if x.device_type == 'GPU']
dte /
Created Jul 25, 2017 — forked from CapCap/
Paperspace tensorflow+opencv setup for both python2 and python3 on ubuntu 16
# Don't require you to constantly enter password for sudo:
sudo visudo
# In the bottom of the file, paste the following (without the `#`):
# paperspace ALL=(ALL) NOPASSWD: ALL
# Then press `ctl+o` then `enter` to save your changes, and `ctr+x` to exit nano
# Allow connection from your IP to any port- default seems to be just 22 (ssh)
View html5-video-streamer.js
* Inspired by:
var http = require('http'),
fs = require('fs'),
util = require('util');
http.createServer(function (req, res) {
var path = 'video.mp4';
View livestream
// Live video stream management for HTML5 video. Uses FFMPEG to connect to H.264 camera stream,
// Camera stream is remuxed to a MP4 stream for HTML5 video compatibility and segments are recorded for later playback
var liveStream = function (req, resp) { // handle each client request by instantiating a new FFMPEG instance
// For live streaming, create a fragmented MP4 file with empty moov (no seeking possible).
var reqUrl = url.parse(req.url, true)
var cameraName = typeof reqUrl.pathname === "string" ? reqUrl.pathname.substring(1) : undefined;
if (cameraName) {
try {
cameraName = decodeURIComponent(cameraName);
View command.txt
ffprobe -v quiet -print_format json -show_format -show_streams "lolwut.mp4" > "lolwut.mp4.json"
You can’t perform that action at this time.