Skip to content

Instantly share code, notes, and snippets.

View andrewevans0102's full-sized avatar

Andrew Evans andrewevans0102

View GitHub Profile
<TextField
autoFocus
margin="dense"
id="email"
label="Email Address"
type="email"
fullWidth
disabled={currentUserReserved}
value={email ? email : ""}
onChange={(event) =>
// basic fields
const [email, setEmail] = useState("");
const [phone, setPhone] = useState("");
const [time, setTime] = useState("");
// premium fields
const [foodService, setFoodService] = useState("");
const [cocktailService, setCocktailService] = useState("");
const [accommodations, setaccommodations] = useState([]);
@andrewevans0102
andrewevans0102 / ml-recs.md
Created November 2, 2019 18:14 — forked from bsletten/ml-recs.md
Machine Learning Path Recommendations

This is an incomplete, ever-changing curated list of content to assist people into the worlds of Data Science and Machine Learning. If you have a recommendation for something to add, please let me know. If something isn't here, it doesn't mean I don't recommend it, I just may not have had a chance to review it yet or not.

I will generally list things in order of easier to more formal/challenging content.

It may feel like there is an overwhelming amount of stuff for you to learn (because there is). But, there is a guided path that will get you there in time. You need to focus on Linear Algebra, Calculus, Statistics and probably Python (or R). Your best bet is to get a Safari Books Online account (https://www.safaribooksonline.com) which you may already have access to through school or work. If not, it is a reasonable way to get access to a tremendous number of books and videos.

I'm not saying you will get what you need out of everything here, but I have read/watched at least some of all of the following an

import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-morse-light',
templateUrl: './morse-light.component.html',
styleUrls: ['./morse-light.component.css']
})
export class MorseLightComponent implements OnInit {
System: any;
flashlight(color: String, time: any): Promise<any> {
return new Promise(resolve => {
setTimeout(function() {
// this.drawLight(color);
const c: any = document.getElementById('flashlight');
const ctx = c.getContext('2d');
ctx.beginPath();
ctx.arc(c.width / 2, c.height - 50, 50, 0, 2 * Math.PI);
ctx.fillStyle = color;
ctx.fill();
async transmit() {
// time = 1200 / words per minute
// 20 words per minute
// follows a 3 to 1 ratio
// 60 milliseconds for one dot
// 180 milliseconds for a dash
// multiplied by factor of 4 to slow it down here
const dot = 60 * 4;
const dash = 180 * 4;
import { Component } from '@angular/core';
import { MorseOutput } from '../models/morse-output';
@Component({
selector: 'app-morse-sound',
templateUrl: './morse-sound.component.html',
styleUrls: ['./morse-sound.component.css']
})
export class MorseSoundComponent {
createSound(time: any, char: string) {
for (const c of char) {
switch (c) {
case '.':
this.gain.gain.setValueAtTime(1.0, time);
time += this.dot;
this.gain.gain.setValueAtTime(0.0, time);
break;
case '-':
this.gain.gain.setValueAtTime(1.0, time);
generateMorse(time: any, phrase: string) {
phrase = phrase.toUpperCase();
this.morseDisplay = [];
for (const p of phrase) {
if (p === ' ') {
time += 3 * this.dot;
} else if (this.MORSE[p] !== undefined) {
time = this.createSound(time, this.MORSE[p]);
time += 2 * this.dot;
}
this.dot = 1.2 / this.rate;
this.oscillator.start(0);