- Sync vs Async
- JS executes code in a synchronous manner one function at a time one statement at a time
- JS is single threaded
- that means only one statement is executed at a time.
- Asynchronous mean two or more things happening at a time. In JS that means deferring remaining execution of a function
- We need this because some operation can take be very slow:
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
FAIL src/draftlingpage/DraftlingPage.test.js | |
● Console | |
console.log src/draftlingpage/DraftlingPage.js:86 | |
undefined | |
console.log src/draftlingpage/DraftlingPage.js:87 | |
[] draftlings | |
console.log src/draftlingpage/DraftlingPage.js:89 |
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
# https://www.tensorflow.org/tutorials/load_data/images | |
import tensorflow as tf | |
AUTOTUNE = tf.data.experimental.AUTOTUNE | |
from PIL import Image | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import os | |
import pathlib | |
data_dir = tf.keras.utils.get_file(origin='https://storage.googleapis.com/download.tensorflow.org/example_images/flower_photos.tgz', |
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
(() => { | |
if(!navigator.mediaDevices) { | |
navigator.mediaDevices = {} | |
} | |
if (!navigator.mediaDevices.getUserMedia) { | |
navigator.mediaDevices.getUserMedia = ( | |
navigator.mediaDevices.webkitGetUserMedia || | |
navigator.mediaDevices.mozGetUserMedia || | |
navigator.mediaDevices.msGetUserMedia || |
- What is ES6
- Let & Const
- uses block scoping
- const cannot be reassigned
- not hoisted
- Arrow Functions
- uses block scoping
- implied this value assignment
- no prototype
- The real purpose of arrow functions is to handle the THIS keyword withing nested / callback functions
- Humans and Written Languages (10 min)
- Breaking down the following English sentence.
- "Hello, did you know that it is 271 days until my birthday!"
- Our eyes and brains have been trained to interpret
characters
andsymbols
.
- Morse code
- We can teach our brains and eyes to interpret other languages
- Let's
interpret
the followingmessage
- Breaking down the following English sentence.
... --- ...
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
<html> | |
<head> | |
<title>Landing bot with BotEngine.ai</title> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet"> | |
<style type="text/css"> | |
* { | |
font-family: 'Open Sans', sans-serif; | |
box-sizing: border-box; |
-
A New Metal Model
a. The Browser is just a piece of software
b. The Browser is made up of several components responsible for
This is a quick guide to install PostgreSQL 10 - tested on Ubuntu 16.04 but likely can be used for Ubuntu 14.04 and 17.04 as well, with one minor modification detailed below.
To make life simple, remove all other versions of Postgres. Obviously not required, but again, makes life simple. If you have data in your previous version of postgres that you'd like to retain, then this is not recommended. Instead, you'll have to use pg_upgrade or pg_upgradecluster.
NewerOlder