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
using System; | |
public class BitmapBytes | |
{ | |
/// <summary> | |
/// Converts RGBA bytes into an RGBA Bitmap. | |
/// Pixels go left to right, bottom to top. | |
/// Can write to file with, e.g: | |
/// File.WriteAllBytes("example.bmp", BitmapBytes.FromRGBABytes(imageData, width)); | |
/// </summary> |
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 | |
from keras.layers import Dense, Input | |
from keras.models import Model | |
x = Input((1,)) | |
y = Dense(1, activation ='linear')(x) | |
m = Model(x,y) | |
m.compile(loss = 'mse', optimizer='sgd') | |
_x = np.linspace(1,2, num = 1e3) |
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
using UnityEngine; | |
using System.Collections.Generic; | |
using System; | |
public enum SwipeGesture { SwipeUp, SwipeDown, SwipeLeft, SwipeRight, None }; | |
/// <summary> | |
/// Simplest usage: | |
/// | |
/// public SwipeGestures Gestures; // Reference to MonoBehaviour |
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
// SIMPLE VISUAL STUDIO WEBPACK CONFIG | |
// Auto reloading, Sourcemaps, es6 modules loading, uses visual studio to compile the typescript | |
// required DevDependencies: | |
// webpack | |
// source-map-loader | |
// browser-sync | |
// browser-sync-webpack-plugin | |
// babel-loader | |
// | |
// in tsconfig enable sourcemaps and set es6 to true |
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
@echo off | |
SETLOCAL ENABLEDELAYEDEXPANSION | |
:: set the working dir (default to current dir) | |
set wdir=%cd% | |
if not (%1)==() set wdir=%1 | |
:: set the file extension (default to vb) | |
set extension=d.ts | |
if not (%2)==() set extension=%2 |
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 XHR { | |
export class Header { | |
header: string; | |
data: string; | |
constructor(header: string, data: string) { | |
this.header = header; | |
this.data = data; | |
} | |
} |