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
test |
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 upload_image(url, base64) { | |
return new Promise((resolve, reject) => { | |
const socket = new WebSocket(url); | |
socket.onopen = () => { | |
const message = JSON.stringify({ data: base64 }); | |
socket.send(message); | |
}; | |
socket.onmessage = (event) => { |
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
import os | |
import requests | |
import rich | |
import rich.console | |
import rich.progress | |
twoHundredMBs=1000*1000*200 | |
console=rich.console.Console() |
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 punctuation_marks=Array.from(".,?!…,。?!") | |
function pmcheck(args){ | |
if(args[0].cmd!="chat"){return args}; | |
if((args[0].text.length == 1) || punctuation_marks.indexOf(args[0].text) != -1){ | |
pushMessage({nick:"!",text:"Single punctuation mark cannot be sent."}) | |
return false; | |
}else{ | |
return args | |
} | |
} |