Example inputs:
Variable | Value |
---|---|
key | the shared secret key here |
message | the message to hash here |
Reference outputs for example inputs above:
| Type | Hash |
const str1 = 'This is an example to test cosine similarity between two strings'; | |
const str2 = 'This example is testing cosine similatiry for given two strings'; | |
// | |
// Preprocess strings and combine words to a unique collection | |
// | |
const str1Words = str1.trim().split(' ').map(omitPunctuations).map(toLowercase); | |
const str2Words = str2.trim().split(' ').map(omitPunctuations).map(toLowercase); | |
const allWordsUnique = Array.from(new Set(str1Words.concat(str2Words))); |
Example inputs:
Variable | Value |
---|---|
key | the shared secret key here |
message | the message to hash here |
Reference outputs for example inputs above:
| Type | Hash |
# coding=utf-8 | |
""" | |
LICENSE http://www.apache.org/licenses/LICENSE-2.0 | |
""" | |
import datetime | |
import sys | |
import time | |
import threading | |
import traceback | |
import SocketServer |