This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<canvas id="canvas" width="640" height="360"></canvas> | |
<div class="test"> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
def nonlin(x, deriv=False): | |
if(deriv==True): | |
return x * (1-x) | |
return 1/(1+np.exp(-x)) | |
#input data | |
X = np.array([ [0,0,1], | |
[0,1,1], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Kata | |
( | |
lastDigitOnExp | |
,lastDigitListReduce | |
) where | |
lookupTable = [ [0,0,0,0], | |
[1,1,1,1], | |
[2,4,8,6], | |
[3,9,7,1], | |
[4,6,4,6], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MPU-6050 Accelerometer + Gyro | |
// ----------------------------- | |
// | |
// By arduino.cc user "Krodal". | |
// June 2012 | |
// Open Source / Public Domain | |
// | |
// Using Arduino 1.0.1 | |
// It will not work with an older version, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
prezto.sh(){ | |
clear | |
sudo apt-get install -y git | |
sudo apt-get update && sudo apt-get install -y zsh | |
# Get prezto | |
git clone --recursive https://github.com/sorin-ionescu/prezto.git ~/.zprezto | |
# Backup zsh config if it exists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible | |
filetype off | |
syntax on | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
Plugin 'VundleVim/Vundle.vim' | |
Plugin 'tpope/vim-fugitive' | |
Plugin 'nvie/vim-flake8' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Hello!! | |
-- Making Music in Haskell (feat. TidalCycles) | |
-- By Arvind Iyer | |
d1 $ sound "<alphabet:12 alphabet:19 alphabet:18>" | |
hush | |
-- Make a drum beat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Function decorator to save system CPU and memory consumption | |
# as well as execution duration of the function supplied | |
import time | |
import psutil | |
def timeit(report): | |
""" | |
Use as decorator for a function, provide a dictionary object as parameter | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Websocket video stream client example</title> | |
</head> | |
<body> | |
<canvas id="canvas" width="640" height="480"></canvas> | |
<script> | |
var websocketAddress = "ws://localhost:8765/media/zurich"; | |
var c = document.getElementById("canvas"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AFRAME.registerShader('caustic', { | |
schema: { | |
time: {type: 'time', is: 'uniform'}, | |
color: {type: 'color', is: 'uniform', default: '#2647fc'}, | |
base: {type: 'map', is: 'uniform'}, | |
obj: {type: 'map', is: 'uniform'}, | |
uvScale: {type: 'vec2', is:'uniform', default: {x: 0.3, y: 0.3}}, | |
brightness: {type: 'number', is: 'uniform', default: 22.0}, | |
speed: {type: 'number', is: 'uniform', default: 0.02} | |
}, |
OlderNewer