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
class TennisGame1 | |
SCORES = ["Love", "Fifteen", "Thirty", "Forty"] | |
def initialize(player1Name, player2Name) | |
@player1Name = player1Name | |
@player2Name = player2Name | |
@playerScores = [0,0] | |
@lastPointWinner = "" | |
end |
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
//download file and run with node hangman.js | |
function wrongGuessCount(word, guesses) { | |
return guesses.filter(letter => word.indexOf(letter) == -1).length; | |
} | |
function showGuess(word, guesses) { | |
let show = []; | |
let letters = word.split(""); | |
letters.filter(letter => guesses.indexOf(letter) > -1 ? show.push(letter) : show.push("_")); | |
show = show.join(" "); |
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 training = [ | |
[0,3], [1,6], [2,8], [3,7], [9, 100] | |
] | |
// alpha | |
const learningRate = 0.05 | |
const hypothesis = (x,params) => params[1] * x + params[0] | |
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 training = [ | |
[0,3], [1,6], [2,8], [3,7], [9, 100] | |
] | |
// alpha | |
const learningRate = 0.05 | |
const hypothesis = (x,params) => params[1] * x + params[0] | |
const cost = (training,params) => { |
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
def params | |
[0,0] | |
end | |
def examples | |
[ | |
{ | |
:x => 1, | |
:y => 3 | |
}, |
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": [ | |
{ | |
"name": "A", | |
"description": "This is a description of A", | |
"parent": "" | |
}, | |
{ | |
"name": "B", | |
"description": "This is a description of B", |
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 data = [ | |
{ | |
name: 'A', | |
description: 'This is a description of A', | |
parentId: '', | |
}, | |
{ | |
name: 'B', | |
description: 'This is a description of B', | |
parent: 'A', |
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
{ | |
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json", | |
"basics": { | |
"name": "Lee Freeman", | |
"label": "Full Stack NodeJS/TypeScript/React Developer", | |
"image": "", | |
"email": "lee.freeman1@gmail.com", | |
"phone": "", | |
"url": "", | |
"summary": "I'm a Irish/British Software Engineer living in Amsterdam. I am currently developing applications using Typescript, NodeJS, React and GraphQL and Neo4J (and writing lots of tests with Jest/Testing Library/Cypress). \n\nBuilding side projects with the above, Docker, K8s, MongoDB, Redis and Postgres. ", |