https://www.opendatanetwork.com/ https://www.google.com/publicdata https://aws.amazon.com/public-datasets/ https://www.kaggle.com/
This file contains hidden or 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 data = { | |
cat : { | |
dog : { | |
bird : { | |
mouse : "squeek" | |
} | |
} | |
} | |
}; |
This file contains hidden or 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
(let [base 3, | |
exp 3] | |
(do | |
(defn multiply [x, y] | |
(* x y)) | |
(defn exponent | |
([base pow] (exponent base base (dec pow))) | |
([acc base pow] (cond | |
(> pow 0) (exponent (multiply acc base) base (dec pow)) | |
:else acc))) |
This file contains hidden or 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
# subroutine | |
def multiply(x, y) | |
x * y | |
end | |
# variables (input) | |
base = 3 | |
exponent = 3 | |
product = 0 |
This file contains hidden or 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
(let [base 3, | |
exp 2] | |
(do | |
(defn multiply [x, y] | |
(* x y)) | |
(defn exponent [x, y] | |
(reduce multiply (mapv (fn [_] x) (range y)))) | |
(exponent base exp))) |
This file contains hidden or 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
// sampleCombine will emit when source stream emits only | |
// this is correct | |
function intent (sources$: Sources) { | |
return sources$.DOM.select('form') | |
.events('submit', { preventDefault : true }) | |
.compose(sampleCombine(sources$.onion.state$)) | |
.map(([ event, state ]) => ({ | |
url: '/api/endpoint', | |
category: 'Form', | |
method: 'POST', |
This file contains hidden or 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 xs, { Stream } from 'xstream'; | |
import { VNode, DOMSource } from '@cycle/dom'; | |
import { HTTPSource } from '@cycle/http'; | |
import { StateSource } from 'cycle-onionify'; | |
import { Sources, Sinks } from './interfaces'; | |
export type AppSources = Sources & { onion: StateSource<AppState> }; | |
export type AppSinks = Sinks & { onion: Stream<Reducer>, HTTP: Stream<any> }; | |
export type Reducer = (prev: AppState) => AppState; | |
export type AppState = { |
This file contains hidden or 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
#!/bin/sh | |
VBOX_NAME=Xenial1 | |
VBOX_PORT=3892 | |
VBoxManage createvm --name "$VBOX_NAME" --register | |
VBoxManage modifyvm "$VBOX_NAME" --memory 512 --acpi on --boot1 dvd --nic1 bridged --bridgeadapter1 wlo1 | |
VBoxManage createhd --filename ~/vms/$VBOX_NAME.vhd --size 5000 | |
VBoxManage storagectl "$VBOX_NAME" --name "IDE Controller" --add ide | |
VBoxManage storageattach "$VBOX_NAME" --storagectl "IDE Controller" --port 0 --device 0 --type hdd --medium ~/vms/$VBOX_NAME.vhd |
This exercise can be performed in Bash, CMD, or Powershell
If you mess up, or think you may have made a mistake, delete the entire cli-directory
and start at 1. again.
- in your home directory, create a new directory named
cli-exercise
- navigate into your new
cli-exercise
directory ...