DESCRIPTION_HERE
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 AsyncStorage from "@react-native-async-storage/async-storage"; | |
import { useCallback, useEffect, useRef, useState } from "react"; | |
const safeParse = <T extends unknown>(value: string | null) => { | |
if (value === null) { | |
return null; | |
} | |
try { | |
return JSON.parse(value) as T; | |
} catch (error) { |
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
# Create a model for predicting the next word | |
model = tf.keras.Sequential() | |
# Load the data from local CSV file | |
data = pd.read_csv('data.csv') | |
# Split the data into training and testing | |
train, test = train_test_split(data, test_size=0.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
# Use the model to predict a set of next words | |
# ^ I wrote this | |
predictions = model.predict(x) | |
# ^ Copilot wrote this |
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
// Create a model for predicting the next word | |
// ^ I wrote this | |
const model = tf.sequential() | |
model.add(tf.layers.lstm({ units: 128, inputShape: [null, 1] })) | |
model.add(tf.layers.dense({ units: 1, activation: 'softmax' })) | |
model.compile({ loss: 'categoricalCrossentropy', optimizer: 'adam' }) | |
// ^ Copilot wrote all this code |
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
// You will need to install these via npm or yarn. | |
import * as THREE from "three"; | |
import glsl from "glslify"; | |
import { OrbitControls } from "three/examples/jsm/controls/OrbitControls"; | |
export const config = { | |
loop: true, | |
context: "webgl", | |
}; |
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
// See bottom to see input variables | |
(async function(w, d, v, t, c) { | |
const s = "font-size:18px;"; | |
const h = `color:#F06E1D;${s}`; | |
const getRows = () => { | |
return new Promise(resolve => { | |
const r = []; | |
w.indexedDB.open(d, v).onsuccess = event => { | |
event.target.result | |
.transaction(t) |
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
export let hasWebPSupport = null; | |
export const loadImgSrc(src: string): Promise<void> { | |
return new Promise((resolve, reject) => { | |
const img = new Image(); | |
img.onload = () => resolve(); | |
img.onerror = () => reject(); | |
img.src = src; | |
}); | |
} | |
export const checkWebPSupport = () => { |
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
### Keybase proof | |
I hereby claim: | |
* I am jcblw on github. | |
* I am jcblw (https://keybase.io/jcblw) on keybase. | |
* I have a public key ASA1S8AOaQfXp-RYKa3iMp_LGWjc4sgG2cc7uB3Z4xFZQAo | |
To claim this, I am signing this object: |
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 padEnd = require('string.prototype.padend'); | |
const gaze = require('gaze'); | |
const util = require('util'); | |
const _ = require('lodash'); | |
const chalk = require('chalk'); | |
const { exec, spawn } = require('child_process'); | |
const pexec = util.promisify(exec); | |
const log = (type, color = 'yellow') => (info, infoColor = 'reset') => { |
NewerOlder