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 React, { useState } from 'react'; | |
// ... | |
function App() { | |
if(1 !== 0) { | |
const [count, setCount] = useState(0); | |
} | |
return ( | |
/* ... */ |
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
const Pusher = require('pusher'); | |
const pusher = new Pusher({ | |
appId: 'YOUR_PUSHER_APP_', | |
key: 'YOUR_PUSHER_APP_KEY', | |
secret: 'YOUR_PUSHER_APP_SECRET', | |
cluster: 'YOUR_PUSHER_APP_CLUSTER', | |
encrypted: 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
import pandas as pd | |
from sklearn.ensemble import RandomForestClassifier | |
from sklearn.model_selection import cross_val_score | |
from sklearn.model_selection import cross_val_predict | |
from sklearn import metrics | |
import coremltools | |
dataset_url = 'http://archive.ics.uci.edu/ml/machine-learning-databases/wine/wine.data' | |
names = ['cultivar', 'alcohol', 'malic_acid', 'ash', 'alkalinity_ash', 'magnesium', 'total_phenols', 'flavonoids', 'nonflavonoid_phenols', 'proanthocyanins', 'color intensity', 'hue', 'od280_od315', 'proline'] |
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 (user, context, callback) { | |
var Pusher = require('pusher@1.2.1'); | |
var pusher = new Pusher({ | |
appId: '<INSERT_YOUR_PUSHER_APP_ID>', | |
key: '<INSERT_YOUR_PUSHER_APP_KEY>', | |
secret: '<INSERT_YOUR_PUSHER_APP_SECRET>', | |
cluster: '<INSERT_YOUR_PUSHER_APP_CLUSTER>', | |
encrypted: true | |
}); | |
user.app_metadata = user.app_metadata || {}; |
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
/* | |
SAMPLE PAYLOAD | |
{ | |
"url": "https://google.com" | |
} | |
*/ | |
// https://gist.github.com/jonleighton/958841 | |
const base64ArrayBuffer = function(arrayBuffer) { | |
var base64 = ''; | |
var encodings = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; |