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
Imagine there is an "#introductions" channel in a Discord server for music lovers. A user with the name "Joey" and a crop of an acoustic guitar for a profile picture joins the server and posts a paragraph long introduction in that channel. They use a bit of internet slang, start sentences with lower case, and do not capitalize the word "I". Write an example introduction that Joey might write. Write seven followup comments Joey might write in response to posted music they like, and one response to a posted song they especially didn't like from an artist they love. |
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
// Caution: combinatorial explosion will eat your harddrive | |
const MAX_SYLLABLE_COUNT = 4; | |
const OUTPUT_FILE = `${MAX_SYLLABLE_COUNT}-syllables.txt`; | |
// deno-fmt-ignore | |
const syllables = [ | |
"a", "e", "i", "o", "u", | |
"ja", "je", "jo", "ju", "ka", | |
"ke", "ki", "ko", "ku", "la", | |
"le", "li", "lo", "lu", "ma", |
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
/^(?:(?:[k-nps]?[aeiou]|[jt][aeou]|w[aei])(?:(?:n?[klps]|[mn])[aeiou]|n?[jt][aeou]|n?w[aei])*n?)|n$/ |
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
TweetNFT Bot | |
Idle* | |
mention invokation -> Investigate Reply Status | |
scheduled minting -- 72 hours -> Fetch OEmbed | |
Investigate Reply Status | |
invoking tweet is not a reply -> Must Be Reply Error | |
invoking tweet is a reply -> Investigate Context | |
Must Be Reply Error | |
error message sent -> Store Message ID | |
error message failed -> Log Critical Failure |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 Ω = new Proxy(new WeakMap, { | |
set (weakmap, reference, input) { | |
const invocable = eval(reference); | |
if (typeof invocable != 'function') return; | |
weakmap.set(invocable, | |
Array.isArray(input) | |
? invocable(...input) | |
: invocable(input) | |
); | |
}, |
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
/** | |
* Integer n-th root | |
* @param value Radicand value | |
* @param degree Root degree | |
*/ | |
function nroot (value: bigint, degree: bigint) { | |
if (value < 1n) throw new RangeError('🗞️'); | |
let [ u, s ] = [ value, value + 1n ]; | |
while (u < s) [ u, s ] = [ ((degree - 1n) * u + value / (u ** (degree - 1n))) / degree, u ]; | |
return s; |
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 fibonacci = lucas(0, 1); | |
const dataset = Array(79) | |
.fill() | |
.map(_ => fibonacci.next().value); | |
let generation = 0; | |
let population = Array(10000) | |
.fill() | |
.map(_ => Array(4).fill().map(_ => Math.random() * 10 - 5)) | |
.map(evalFitness); |
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
function doPost(e) { | |
if(e.postData == null) return output({ error: 'no_data' }); | |
try { | |
const entries = JSON.parse(e.postData.contents); | |
if(!Array.isArray(entries)) return output({ error: 'not_array' }); | |
if(!entries.length) return output({ error: 'empty_array' }); | |
entries.forEach(append); | |
return output({ success: entries.length }); | |
} catch(exception) { | |
return output({ |
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
/** | |
@OnlyCurrentDoc | |
**/ | |
function doGet(e) { | |
var template = HtmlService.createTemplateFromFile('Index'); | |
const catalog = SpreadsheetApp.getActiveSheet().getRange('<set range>').getDisplayValues(); | |
template.catalog = JSON.stringify(catalog); | |
const output = template.evaluate(); | |
output.setTitle('<enter title here>'); |
NewerOlder