Skip to content

Instantly share code, notes, and snippets.

View CodesOfRa's full-sized avatar
🐳
probably drinking ☕️ or eating 🧀

Ramona CodesOfRa

🐳
probably drinking ☕️ or eating 🧀
View GitHub Profile
@CodesOfRa
CodesOfRa / breaking_API_changes.md
Created March 11, 2019 13:40 — forked from caisq/breaking_API_changes.md
Breaking API Changes and New APIs in TensorFlow.js 1.0 Through Examples

1. Model-loading function name changes

Rationale: Indicate type of model being loaded more explicitly in code.

For models converted from Keras and models saved from TensorFlow.js itself:

// Before: 
await tf.loadModel('http://server/model.json');
@CodesOfRa
CodesOfRa / oneliners.js
Created April 2, 2019 07:11 — forked from mikowl/oneliners.js
👑 Awesome one-liners you might find useful while coding.
// By @coderitual
// https://twitter.com/coderitual/status/1112297299307384833
// Remove any duplicates from an array of primitives.
const unique = [...new Set(arr)]
// Sleep in async functions. Use: await sleep(2000).
const sleep = (ms) => (new Promise(resolve => setTimeout(resolve, ms)));
// Type this in your code to break chrome debugger in that line.