Skip to content

Instantly share code, notes, and snippets.

💭
architecting

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
dte / WebGLOpenCloth-r67.js
Created Jul 8, 2014
Updated WebGLOpenCloth.js (https://code.google.com/p/opencloth/) to newest version of Three.js (r.67)
View WebGLOpenCloth-r67.js
<html>
<head>
<script src="http://cdnjs.cloudflare.com/ajax/libs/three.js/r67/three.min.js"></script>
<script src="js/Stats.js"></script>
<title>OpenCloth WebGL Demo by Movania Muhammad Mobeen</title>
</head>
<body style="background-color:#eee">
<div align=right><p><b>OpenCloth WebGL Demo</b><br>
Integrator: Explicit Euler <br>
View command.txt
ffprobe -v quiet -print_format json -show_format -show_streams "lolwut.mp4" > "lolwut.mp4.json"
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 html5-video-streamer.js
/*
* Inspired by: http://stackoverflow.com/questions/4360060/video-streaming-with-html-5-via-node-js
*/
var http = require('http'),
fs = require('fs'),
util = require('util');
http.createServer(function (req, res) {
var path = 'video.mp4';
@dte
dte / Triangle2.pde
Created May 2, 2011
Faceless Void [Processing] ... updated to kinda work...from code here: http://www.creativeapplications.net/processing/faceless-void-processing/
View Triangle2.pde
class Triangle2
{
PVector p1,p2,p3;
color c1,c2,c3;
Triangle2() {
}
Triangle2(PVector _p1, PVector _p2, PVector _p3, color _c1, color _c2, color _c3)
{
@dte
dte / tensorflow_opencv_ubuntu_deps.sh.txt
Created Jul 25, 2017 — forked from CapCap/tensorflow_opencv_ubuntu_deps.sh.txt
Paperspace tensorflow+opencv setup for both python2 and python3 on ubuntu 16
View tensorflow_opencv_ubuntu_deps.sh.txt
#!/bin/bash
# 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)
@dte
dte / get_available_gpus.py
Created Nov 16, 2017 — forked from jovianlin/get_available_gpus.py
Get List of Devices in TensorFlow
View get_available_gpus.py
from tensorflow.python.client import device_lib
def get_available_gpus():
local_device_protos = device_lib.list_local_devices()
return [x.name for x in local_device_protos if x.device_type == 'GPU']
get_available_gpus()
View Adversarial.py
#Encoder
class Q_net(nn.Module):
def __init__(self):
super(Q_net, self).__init__()
self.lin1 = nn.Linear(X_dim, N)
self.lin2 = nn.Linear(N, N)
self.lin3gauss = nn.Linear(N, z_dim)
def forward(self, x):
x = F.droppout(self.lin1(x), p=0.25, training=self.training)
x = F.relu(x)
View Adversarial2.py
torch.manual_seed(10)
Q, P = Q_net() = Q_net(), P_net(0) # Encoder/Decoder
D_gauss = D_net_gauss() # Discriminator adversarial
if torch.cuda.is_available():
Q = Q.cuda()
P = P.cuda()
D_cat = D_gauss.cuda()
D_gauss = D_net_gauss().cuda()
# Set learning rates
gen_lr, reg_lr = 0.0006, 0.0008
View serve.py
import os
from flask import Flask, redirect, url_for, request, render_template, send_from_directory
from werkzeug import secure_filename
import not_hotdog_model
# todo: more pretty interface
# folder to upload pictures
UPLOAD_FOLDER = 'uploads/'
# what files can upload
You can’t perform that action at this time.