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
from socket import * | |
serverName = '192.168.43.6' | |
serverPort = 12000 | |
clientSocket = socket(AF_INET, SOCK_STREAM) | |
clientSocket.connect((serverName, serverPort)) | |
sentence = input('Input lowercase sentence: ') | |
clientSocket.send(sentence.encode()) | |
modifiedSentence = clientSocket.recv(1024) |
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 fs = require('fs'); | |
const TEST_DIR_PATH = './test/1.0/'; | |
(async function () { | |
const files = fs.readdirSync(TEST_DIR_PATH); | |
const items = await Promise.all( | |
files.map(function (file) { | |
if (file === 'all.0.aml') { | |
return 'no file'; |
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 existedScripts = []; | |
function onDemand(src) { | |
return function loadScript() { | |
return new Promise(function (resolve, reject) { | |
const hasScriptExisted = existedScripts.includes(src); | |
if (hasScriptExisted) { | |
return resolve(src); | |
} |