This file contains hidden or 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 tablelength(T) | |
| local count = 0 | |
| for _ in pairs(T) do | |
| count = count + 1 | |
| end | |
| return count | |
| end | |
This file contains hidden or 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 request = require('request'); | |
| var sqlite3 = require('sqlite3').verbose(); | |
| var db = new sqlite3.Database('fx.db'); | |
| var heartbeat = 10000; | |
| function parse_quote (str) { | |
| var quote = []; | |
| var lines = str.split('\n'); | |
| for (var line_idx = 0; line_idx < lines.length; line_idx++) { | |
| var line = lines[line_idx]; |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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]); | |
| } |