Lecture 1: Introduction to Research — [📝Lecture Notebooks] [
Lecture 2: Introduction to Python — [📝Lecture Notebooks] [
Lecture 3: Introduction to NumPy — [📝Lecture Notebooks] [
Lecture 4: Introduction to pandas — [📝Lecture Notebooks] [
Lecture 5: Plotting Data — [📝Lecture Notebooks] [[
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
// data binding in native javascript: | |
// https://stackblitz.com/edit/databinding-native-js | |
// Example html: | |
// <span id="labelEl">default</span>: <span id="nameEl">default</span> | |
const setupBindings = bindings => | |
bindings.reduce((acc, cur) => | |
Object.defineProperty(acc, cur.bindingName, { | |
set: val => (cur.element[cur.attribute] = val) |
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 http = require('http'); | |
const url = require('url'); | |
const fs = require('fs'); | |
const path = require('path'); | |
const port = process.argv[2] || 9000; | |
http.createServer(function (req, res) { | |
console.log(`${req.method} ${req.url}`); | |
// parse URL |
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 deepCopy = aObject => { | |
if (!aObject) { return aObject; } | |
const bObject = Array.isArray(aObject) ? [] : {}; | |
// tslint:disable-next-line: forin | |
for (const k in aObject) { | |
bObject[k] = aObject[k] === null ? null : (typeof aObject[k] === 'object') ? deepCopy(aObject[k]) : aObject[k]; | |
} | |
return bObject; | |
}; |
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
/* | |
Incredibly simple Node.js and Express application server for serving static assets. | |
Given as an example from the React Router documentation (along with examples | |
using nginx and Apache): | |
- https://github.com/ReactTraining/react-router/blob/master/docs/guides/Histories.md#browserhistory | |
*/ | |
const express = require('express'); | |
const path = require('path'); |
Tired of opening terminal to launch Jupyterlab, and having to leave it opened all the time? Try to run Jupyterlab as a desktop app:
One of a benefits is avoiding the annoying accident: "closed Jupyterlab when quitting the browser".
Run in Terminal