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
/* | |
Gale-Shapley Algorithm | |
Stable Matching Problem | |
Given a set of men M and women W and their preferences, find the stable matching pairs for all men and women | |
such that no one is left single and has atmost one partner. | |
While there exists single man m € M who has not proposed to all women in W | |
man m proposes to the woman w € W from the top of his preference list |
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
var request = require("request"); | |
const cheerio = require('cheerio'); | |
const extractor = require('unfluff'); | |
module.exports = WebpageSemanticParse = function (url) { | |
return new Promise((resolve, reject) => { | |
request.get(url, function (error, response, body) { | |
let unfluffedData = extractor(body); | |
const url = unfluffedData.canonicalLink; | |
const { hostname } = new URL(url); |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.