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
| package main | |
| import ( | |
| "bufio" | |
| "context" | |
| "fmt" | |
| "io" | |
| "os/exec" | |
| ) |
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
| alias pastesafsata='curl -s https://api.openai.com/v1/engines/text-davinci-002/completions \ | |
| -H "Content-Type: application/json" \ | |
| -H "Authorization: Bearer !!!!!!!! ENTER YOUR TOKENNN" \ | |
| -d "{ | |
| \"prompt\": \"Tweet: $(pbpaste)\n\n/\/\What kinda logical fallcy this tweet includes? Why?\n\", | |
| \"temperature\": 0.5, | |
| \"max_tokens\": 60, | |
| \"top_p\": 1, | |
| \"frequency_penalty\": 0, | |
| \"presence_penalty\": 0 |
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
| all=*/ | |
| for i in $all | |
| do | |
| if [ -d $i ]; then | |
| cd $i | |
| git pull | |
| cd .. | |
| fi | |
| 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
| let override = (name, func, callback) => { | |
| return (...args) => { | |
| let ret = func(...args); | |
| callback(name, func, args, ret) | |
| return ret; | |
| }; | |
| }; | |
| console.error = override("console.error", console.error, (name, func, args, ret)=>{ |
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
| let storage = {}; | |
| let get = function (key) { | |
| return storage[key]; | |
| } | |
| let put = function (key, value) { | |
| storage[key] = value; | |
| } |
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 { serve } from "https://deno.land/[email protected]/http/server.ts"; | |
| interface ERequest extends Request { | |
| params: any; | |
| } | |
| function routes(req: ERequest): Response { | |
| const handlers = [ | |
| { | |
| pattern: new URLPattern({ pathname: "/books" }), |
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 logFromTraversal(object, match_string) { | |
| function* traverse(o, path = []) { | |
| for (var i in o) { | |
| const itemPath = path.concat(i); | |
| yield [i, o[i], itemPath, o]; | |
| if (o[i] !== null && typeof (o[i]) == "object") { | |
| yield* traverse(o[i], itemPath); | |
| } | |
| } | |
| } |
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 _with = (v) => eval(`({${Object.getOwnPropertyNames(eval(v)).join(',')}} = ${v});`) | |
| _with("Math"), ( | |
| console.log(cos(PI)) | |
| ) |
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 words = require('./words.json'); | |
| const countVowels = ([...word]) => word.filter(l => l.match(/[aeiou]/i)).length; | |
| const all = words.filter(([...word]) => { | |
| return word.length == [...new Set([...word])].length; | |
| }).sort((a, b) => countVowels(b) - countVowels(a)); | |
| console.log("most vowels: ", | |
| all[0] |
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 axios = require('axios'); | |
| const api = axios.create({ | |
| baseURL: 'https://api.themoviedb.org/3/', | |
| params: { | |
| api_key: `${process.argv.slice(2)[0]}`, | |
| } | |
| }); | |
| const main = async () => { |