Photo by Waldemar Brandt on Unsplash
import cv2cap = cv2.VideoCapture(0)
fourcc = cv2.VideoWriter_fourcc(*'XVID')
w = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH))
h = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT))
out = cv2.VideoWriter('output.mp4', fourcc, 20.0, (w,h))

ret, frame =
if ret:
out.write(cv2.cvtColor(frame, cv2.COLOR_BGR2RGB))
if cv2.waitKey(1) & 0xFF == ord('q'):

Photo by Lili Popper on Unsplash

Step 1 of 2: Add an <input> element to index.html

// index.html...
<input type="file" id="file-input">

Step 2 of 2: Add a change handler for the <input> element in index.js

// index.js...
document.getElementById('file-input').addEventListener('change', function() {

Photo by Ferenc Almasi on Unsplash

Photo by Hybrid on Unsplash

Step 1 of 5: Create A New React Project Using Create-React-App

npx create-react-app my-sentiment-app
cd my-sentiment-app

Step 2 of 5: Import ml5.js

Photo by Ferenc Almasi on Unsplash

STEP 1 OF 5: Create your app

Photo by Bagus Hernawan on Unsplash
npx create-react-app my-awesome-app
cd my-awesome-app
npm i --save-dev gh-pages

Image by Free-Photos from Pixabay
  • f: to fit the model to the screen. If you find your view far away from your model, f (fit to screen) is your friend.
  • Ctrl+7: Isometric view
  • Ctrl+8: Normal to surface
  • Mouse Wheel Click+Drag (or middle mouse click+drag): Rotate
  • Mouse Wheel Scroll Up: Zoom out. The location of the cursor determines the focal point of the zoom
  • Mouse Wheel Scroll Down: Zoom in
  • Ctrl+Mouse Wheel Click: Pan
  • Right Mouse Click+Drag (on component in assembly): Rotate component, obeying existing constraints

npm i --save-dev eslint eslint-plugin-react
eslint --init
{  "extends": [    "eslint:recommended",    "plugin:react/recommended"  ],  "rules": {    "react/react-in-jsx-scope": "off"  },
"globals": {
"React": "writable" }}

<html>  <head>
<body> <button id="my-button">Click to Add</button>

<div id="content-container">
<!-- Content will appear here -->
var addedElements = [];
var elementNum = 0;
$('#my-button').on('click', function()…

<div id="my-div">
$('#my-div').append('<button id="my-button">My Button</button>');
$('#my-div').on('click', '#my-button', function () {

alert('Hello World!');

Joel Masters

Creator of Help others achieve their goals. Get paid.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store