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
public float[] Downsample(float[] array, int Length) | |
{ | |
int insert = 0; | |
float[] window = new float[Length]; | |
float[] window_x = new float[Length]; | |
int bucket_size_less_start_and_end = Length - 2; | |
float bucket_size = (float)(array.Length - 2) / bucket_size_less_start_and_end; | |
int a = 0; | |
int next_a = 0; |
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; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.IO; | |
namespace Kaggle_OCR_KNN | |
{ | |
class Program |
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
List<KeyValuePair<float, string>> train_documents = | |
csv.read_train_documents( | |
new Dictionary<string, float>() { | |
{"A", 0f}, | |
{"T", 0f}, | |
{"Y", 1f}, | |
{"N", -1f}, | |
{"U", 0f}, | |
{"L", 0f}, | |
}, @"C:\Users\Admin\Desktop\stash\document_train.csv", |
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; | |
public class EaseManagerScript : MonoBehaviour { | |
public float LINEAR (float current_step, float total_steps, float start_value, float value_change) { | |
return value_change * (current_step / total_steps) + start_value; | |
} | |
public float SIN_IN (float current_step, float total_steps, float start_value, float value_change) { | |
return -value_change * Mathf.Cos(current_step / total_steps * (Mathf.PI / 2)) + value_change + start_value; | |
} |
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 msago (ms) { | |
function suffix (number) { return ((number > 1) ? 's' : '') + ' ago'; } | |
ms = new Date().getTime() - ms.getTime(); | |
var temp = ms / 1000; | |
var years = Math.floor(temp / 31536000); | |
if (years) return years + ' year' + suffix(years); | |
var days = Math.floor((temp %= 31536000) / 86400); | |
if (days) return days + ' day' + suffix(days); | |
var hours = Math.floor((temp %= 86400) / 3600); | |
if (hours) return hours + ' hour' + suffix(hours); |
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
[Intro] | |
E | |
E C#m (8x) | |
[Chorus] | |
E C#m | |
It's a shoreline | |
E C#m | |
And it's high speed | |
E C#m |
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; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Data; | |
using System.Drawing; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Threading; | |
using System.Windows.Forms; |
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
var fs = require('fs'); | |
function raw_to_json () { | |
var raw_txt = fs.readFileSync('raw.txt', 'utf8'); | |
raw_txt = raw_txt.split('\r\n'); | |
for (var line = 0; line < raw_txt.length; line++) { | |
raw_txt[line] = raw_txt[line].split(' '); | |
for (var component = 0; component < raw_txt[line].length; component++) | |
raw_txt[line][component] = parseFloat(raw_txt[line][component]); | |
} |
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
<!DOCTYPE html> | |
<html> | |
<pre id="page" style="font-family: monospace; white-space: pre-wrap;"> | |
<h3>A Sinus Activated Multi-Stochastic-Descending/Ascending (MSD/A) Feed Forward Artificial Neural Network (ANN) Computed by GPU via JavaScript and WebGL GLSL (GATO 2014)</h3>This web page attempts to outline an implementation for solving non-linearly-separable (NLS) classification and function approximation problems using a sinus activated feed forward neural network, trained via multi-stochastic-descension/ascension (MSD/A), and evaluated using the GPU via JavaScript and WebGL GLSL source code. | |
In order to overcome NLS using MSD/A, a sinus activation function: <b>sin(x)</b>, has been used in place of sigmoid: <b>1 / (1 + exp(-x))</b>, hyper-tangent: <b>htan(x)</b>, and/or averaging: <b>sum / count</b>, activation functions. | |
Although ANNs capable of overcoming NLS problems are said to be capable of entering any computationally complete state, actually finding and entering a specific state required to solve a real |
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
window.onerror = function (msg, url, lineno) { | |
alert(url + '(' + lineno + '): ' + msg); | |
} | |
function createShader (str, type) { | |
var shader = gl.createShader(type); | |
gl.shaderSource(shader, str); | |
gl.compileShader(shader); | |
if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) | |
throw gl.getShaderInfoLog(shader); |