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
| // https://en.wikipedia.org/wiki/Quine_(computing)#Constructive_quines | |
| let q = String.fromCharCode(34); | |
| let code = [ | |
| "// https://en.wikipedia.org/wiki/Quine_(computing)#Constructive_quines", | |
| "let q = String.fromCharCode(34);", | |
| "let code = [", | |
| "];", | |
| "for (let i = 0; i < 3; i++) {", | |
| " console.log(code[i]);", | |
| "}", |
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 express = require('express'); | |
| const http = require('http'); | |
| const axios = require('axios'); | |
| describe('express', () => { | |
| const port = 8888; | |
| let server; | |
| beforeAll(done => { |
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
| #! /usr/local/bin/python | |
| import random | |
| # return the door monty chooses to open. can't be the prize door or player's first pick | |
| def montys_pick(prize_door, first_pick): | |
| doors = [1, 2, 3] | |
| # if the prize is behind the player's first pick, monty randomly chooses one of the other 2 doors to open. | |
| if prize_door == first_pick: | |
| doors.remove(prize_door) | |
| return doors[random.randint(0,1)] |