Skip to content

Instantly share code, notes, and snippets.

View FreakTheMighty's full-sized avatar

Jesse Vander Does FreakTheMighty

  • Los Angeles, CA
View GitHub Profile
import numpy as np
path = {'vertices': np.array([[-0.52944955, 0.51464708],
[-0.49406779, 0.47878949],
[-0.45868602, 0.44293189],
[-0.42331859, 0.40709022],
[-0.38793683, 0.37123263],
[-0.35256125, 0.33538164],
[-0.31718763, 0.29953336],
[-0.28180587, 0.26367577],
{
"asset": {
"version": "1.0"
},
"geometricError": 500,
"root": {
"transform": [
1.0, 0.0, 0.0, 0.0,
0.0, 1.0, 0.0, 0.0,
0.0, 0.0, 1.0, 0.0,
@FreakTheMighty
FreakTheMighty / GenericCameraPhong.gltf
Created December 8, 2017 19:00
Duplicate image textures
{
"asset": {
"version": "2.0",
"generator": "Open Asset Import Library (assimp v4.0.137045660)"
},
"accessors": [
{
"bufferView": 0,
"byteOffset": 0,
"componentType": 5126,
{
"asset": {
"generator": "FBX2glTF",
"version": "2.0"
},
"scene": 0,
"buffers": [
{
"byteLength": 395644,
"uri": "buffer.bin"
@FreakTheMighty
FreakTheMighty / LogToSpeech.cs
Last active February 23, 2017 19:22
HoloLens Text to Speech Logger
using HoloToolkit.Unity;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class LogToSpeech : MonoBehaviour {
private TextToSpeechManager textToSpeech;
private Queue<string> logs = new Queue<string>();
@FreakTheMighty
FreakTheMighty / index.js
Last active January 20, 2017 17:42
Congress API
var request = require('request');
var moment = require('moment');
var parseString = require('xml2js').parseString;
var CONGRESS_XML = 'http://www.senate.gov/general/contact_information/senators_cfm.xml';
var CACHE_KEY = 'contacts';
module['exports'] = function helloWorld(hook) {
store = hook.datastore;
@FreakTheMighty
FreakTheMighty / response.json
Last active December 31, 2015 18:54
TensorFlow Rest Service
{
"bull mastiff": 0.7160945534706116,
"boxer": 0.013083322905004025,
"American Staffordshire terrier, Staffordshire terrier, American pit bull terrier, pit bull terrier": 0.04801647365093231,
"Rhodesian ridgeback": 0.08079103380441666,
"Staffordshire bullterrier, Staffordshire bull terrier": 0.04890848696231842
}
@FreakTheMighty
FreakTheMighty / compare.py
Last active August 29, 2015 14:23
Image comparison
import numpy as np
# Adapted from http://nbviewer.ipython.org/github/BVLC/caffe/blob/master/examples/classification.ipynb
# Make sure that caffe is on the python path:
caffe_root = '../' # this file is expected to be in {caffe_root}/examples
import sys
sys.path.insert(0, caffe_root + 'python')
import caffe
<link rel="import" href="../google-map/google-map.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
@FreakTheMighty
FreakTheMighty / get-watchers.js
Last active August 29, 2015 14:12 — forked from kentcdodds/get-watchers.js
Added option to outline elements with watchers.
function getWatchers(root, visualize) {
root = angular.element(root || document.documentElement);
var watcherCount = 0;
function getElemWatchers(element) {
var isolateWatchers = getWatchersFromScope(element.data().$isolateScope);
var scopeWatchers = getWatchersFromScope(element.data().$scope);
var watchers = scopeWatchers.concat(isolateWatchers);
angular.forEach(element.children(), function (childElement) {
watchers = watchers.concat(getElemWatchers(angular.element(childElement)));