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
function printCombos(array) { | |
var results = [[]]; | |
for (var i = 0; i < array.length; i++) { | |
var currentSubArray = array[i]; | |
var temp = []; | |
for (var j = 0; j < results.length; j++) { | |
for (var k = 0; k < currentSubArray.length; k++) { | |
temp.push(results[j].concat(currentSubArray[k])); | |
} |
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
function printCombos(array) { | |
var results = [[]]; | |
for (var i = 0; i < array.length; i++) { | |
var currentSubArray = array[i]; | |
var temp = []; | |
for (var j = 0; j < results.length; j++) { | |
for (var k = 0; k < currentSubArray.length; k++) { | |
temp.push(results[j].concat(currentSubArray[k])); | |
} |
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
function stringReduce(str) { | |
const set = new Set(str); | |
return [...set].join(''); | |
} |
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
function findDups(arr) { | |
const set = new Set(); | |
const result = []; | |
arr.forEach(el => { | |
if (set.has(el)) { | |
result.push(el); | |
} else { | |
set.add(el); | |
} |
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
function validIP(str) { | |
const arr = str.split('.'); | |
if (arr.length !== 4) return false; | |
arr.forEach(el => { | |
if (el > 255 || el < 1) return false; | |
}) | |
return true; | |
} |
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
function genPassword(n, filter) { | |
const variables = { | |
uppercase:'ABCDEFGHIJKLMNOPQRSTUV', | |
lowercase: 'abcdefghijklmnopqrstuvwxyz', | |
nums: '0123456789', | |
symbols: '!@#$%^&*?<>' | |
} |
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
CREATE TABLE patients ( | |
mrn VARCHAR NOT NULL UNIQUE PRIMARY KEY, | |
first_name VARCHAR NOT NULL, | |
first_name VARCHAR NOT NULL, | |
maiden_name VARCHAR, | |
last_name VARCHAR, | |
birth_date VARCHAR NOT NULL UNIQUE, | |
birth_date VARCHAR NOT NULL UNIQUE, | |
created_at TIMESTAMP NOT NULL DEFAULT NOW(), | |
updated_at TIMESTAMP NOT NULL DEFAULT NOW(), |
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 requests | |
import json | |
import smtplib | |
old_price = 500 | |
def get_price(): | |
try: | |
url = "https://www.bhphotovideo.com/api/item/p/product-details?from=cli&aperture=1&cliReqId=5ac45968-b1a2-43ad-9118-ef8884f1189f-cli-19" |
This file has been truncated, but you can view the full file.
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
{"prompt":"Compose a twitter thread in the style of @thesamparr based on this topic: Barstool.\n\n###\n\n","completion":" More info on the barstool deal. - Nearly $100m in profitable revenue in 2019. 53% growth in 2018, 65% in 19. So if assume $90m in 2019 then assume $61m in 18 and $32m in 2017 (my math right?) - Was valued at $15m in 2016. - 63% of readers are gamblers. - Goal is to get Barstool's personalities to drive to penn. - Penn's stock is up like 25% since the deal. Market cap is up nearly $1b!!!. - Penn paid $125m in cash for a stake valuing the business at $400m More here:###"} | |
{"prompt":"Compose a twitter thread in the style of @thesamparr based on this topic: Hair styles.\n\n###\n\n","completion":" Razor shaved my head bald. Holy hell. Feels so good. Have a hawk. But game. To itch all the intchy parts.###"} | |
{"prompt":"Compose a twitter thread in the style of @thesamparr based on this topic: Thiel Fellowship.\n\n###\n\n","completion":" The Thiel Fellowship gives $100k to 25 kids a year to drop ou |
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
function convertHtml(text) { | |
const newHtml = text.replace(/>/g, ">").replace(/</g, "<"); | |
return newHtml; | |
} | |
async function renderPageToHtml(page) { | |
const iframes = await page.$$("iframe"); | |
for (const iframe of iframes) { | |
const frame = await iframe.contentFrame(); | |
if (!frame) continue; |
OlderNewer