Skip to content

Instantly share code, notes, and snippets.

Dave Bennett DaveBben

Block or report user

Report or block DaveBben

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@DaveBben
DaveBben / React Native to Android Studio
Created Aug 18, 2018
The console command to use to detach React Native for building and release in Android studio
View React Native to Android Studio
react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/
View gist:02d79f06a83b7c64587df8ebd7a865a0
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/*" />
</intent-filter>
@DaveBben
DaveBben / Bitcoin_Price.csv
Last active Jan 8, 2018
Bitcoin CSV of open, high,low,close,volume and market cap from April 2013 to January 2018
View Bitcoin_Price.csv
1 Jan 04 2018 15270.7 15739.7 14522.2 15599.2 21783200000 256250000000
2 Jan 03 2018 14978.2 15572.8 14844.5 15201 16871900000 251312000000
3 Jan 02 2018 13625 15444.6 13163.6 14982.1 16846600000 228579000000
4 Jan 01 2018 14112.2 14112.2 13154.7 13657.2 10291200000 236725000000
5 Dec 31 2017 12897.7 14377.4 12755.6 14156.4 12136300000 216326000000
6 Dec 30 2017 14681.9 14681.9 12350.1 12952.2 14452600000 246224000000
7 Dec 29 2017 14695.8 15279 14307 14656.2 13025500000 246428000000
8 Dec 28 2017 15864.1 15888.4 13937.3 14606.5 12336500000 265988000000
9 Dec 27 2017 16163.5 16930.9 15114.3 15838.5 12487600000 270976000000
10 Dec 26 2017 14036.6 16461.2 14028.9 16099.8 13454300000 235294000000
@DaveBben
DaveBben / Bitcoin_Price.js
Last active Jan 8, 2018
A JSON of bitcoin high, low, close and market cap from APril 2013 to January 2018
View Bitcoin_Price.js
const bitcoinPrice = [
{
Date: 'Jan 04, 2018',
Open: 15270.7,
High: 15739.7,
Low: 14522.2,
Close: 15599.2,
Volume: 21783200000,
Cap: 256250000000,
},
View AI-training-data.js
var data = [{ input: { v: 1.0, l: 1.0, c: 1.0 }, output: { h: 1 } },
{ input: { v: 0.8, l: 0.75, c: 0.58 }, output: { h: 1 } }, //80k views, 7500 comments 5500 likes
{ input: { v: 0.85, l: 0.9, c: 0.7 }, output: { h: 1 } },
{ input: { v: 0.92, l: 0.83, c: 0.79 }, output: { h: 1 } },
{ input: { v: 0.0, l: 0.0, c: 0.0 }, output: { b: 1 } },
{ input: { v: 0.2, l: 0.34, c: 0.3 }, output: { b: 1 } },
{ input: { v: 0.5, l: 0.1, c: 0.1 }, output: { b: 1 } },
{ input: { v: 0.3, l: 0.3, c: 0.1 }, output: { b: 1 } },
]
View callback-example-final.js
function doAfterDelay(callBackFuntion) {
return callBackFuntion(console.log("B"))
}
(function start() {
console.log("A");
setTimeout(function () {
doAfterDelay(() => {
console.log("C");
View AI.js
const brain = require('brain.js');
var net = new brain.NeuralNetwork();
let ops = [
{ input: [.7], output: [.5] },
{ input: [.71], output: [.5] },
{ input: [.708], output: [.5] },
{ input: [.704], output: [.53] },
{ input: [.708], output: [.53] },
View AI.js
const brain = require('brain.js');
var net = new brain.NeuralNetwork();
let ops = [
{ input: [.7], output: [.5] },
{ input: [.71], output: [.5] },
{ input: [.708], output: [.5] },
{ input: [.704], output: [.53] },
{ input: [.708], output: [.53] },
View AI.js
net.train(ops, { log: true, errorThresh: 0.0001, iterations: 50});
View AI.js
let ops = [
{ input: [.7], output: [.5] },
{ input: [.71], output: [.5] },
{ input: [.708], output: [.5] },
{ input: [.704], output: [.53] },
{ input: [.708], output: [.53] },
{ input: [.68], output: [.55] },
{ input: [.58], output: [.46] },
{ input: [.7], output: [.5] },
]
You can’t perform that action at this time.