=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
BrainFuck Programming Tutorial by: Katie
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#!/usr/bin/env python | |
import array | |
import blowfish | |
import os | |
import sys | |
import struct | |
from io import BytesIO | |
from itertools import chain | |
from django.core.cache import cache as core_cache | |
''' | |
refer: | |
http://stackoverflow.com/questions/20146741/django-per-user-view-caching | |
https://djangosnippets.org/snippets/2524/ | |
''' | |
def cache_key(request): |
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key | |
# Don't add passphrase | |
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
cat jwtRS256.key | |
cat jwtRS256.key.pub |
import jwt | |
from django.conf import settings | |
from django.contrib.auth.models import User | |
from rest_framework import exceptions | |
from rest_framework.authentication import TokenAuthentication | |
class JSONWebTokenAuthentication(TokenAuthentication): |
// create an IAM Lambda role with access to dynamodb | |
// Launch Lambda in the same region as your dynamodb region | |
// (here: us-east-1) | |
// dynamodb table with hash key = user and range key = datetime | |
console.log('Loading event'); | |
var AWS = require('aws-sdk'); | |
var dynamodb = new AWS.DynamoDB({apiVersion: '2012-08-10'}); | |
exports.handler = function(event, context) { |
//Set up scene, camera, and renderer | |
var scene = new THREE.Scene; | |
var camera = new THREE.PerspectiveCamera( 45, window.innerWidth / window.innerHeight, 1, 10000 ); | |
var renderer = new THREE.CanvasRenderer(); | |
renderer.setClearColor( 0xf0f0f0 ); | |
renderer.setSize( window.innerWidth, window.innerHeight ); | |
document.body.appendChild( renderer.domElement ); | |
var video = document.createElement('video'); |
import requests | |
url="http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL" | |
#headers = {'content-type': 'application/soap+xml'} | |
headers = {'content-type': 'text/xml'} | |
body = """<?xml version="1.0" encoding="UTF-8"?> | |
<SOAP-ENV:Envelope xmlns:ns0="http://ws.cdyne.com/WeatherWS/" xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> | |
<SOAP-ENV:Header/> | |
<ns1:Body><ns0:GetWeatherInformation/></ns1:Body> | |
</SOAP-ENV:Envelope>""" |
'use strict'; | |
var gulp = require('gulp'); | |
var gutil = require('gulp-util'); | |
var del = require('del'); | |
var uglify = require('gulp-uglify'); | |
var gulpif = require('gulp-if'); | |
var exec = require('child_process').exec; | |
var notify = require('gulp-notify'); |
Basic Requirements: | |
Computer with wired and wireless connection | |
FFmpeg installation: http://www.ffmpeg.org/ | |
GoPro Hero 3+: http://gopro.com/ | |
RTMP server e.g. FMS (http://www.adobe.com/products/adobe-media-server-family.html) or CDN ingest point | |
Overview: | |
GoPro Hero3 cameras produce HLS streams which are consumed by control apps and their removeable monitor. |