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
//serpApiKey from serpapi.com | |
var GLOBAL_VARIABLES = { | |
serpApiKey : "add your api key" | |
} | |
/* | |
/*************************** | |
/BEGIN PRESENTATION SCRIPTS |
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
// Parse the IDs from the first four rows of the sheet | |
function getIds() { | |
const sheet = SpreadsheetApp.getActiveSheet(); | |
const ids = { | |
accountId: sheet.getRange('B1').getValue().toString(), | |
containerId: sheet.getRange('B2').getValue().toString(), | |
workspaceId: sheet.getRange('B3').getValue().toString(), | |
variableId: sheet.getRange('B4').getValue().toString() | |
}; | |
if (ids.workspaceId.toLowerCase() === 'default') ids.workspaceId = getDefaultWorkspaceId(ids.accountId, ids.containerId); |
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
library(igraph) | |
map <- function(x, range = c(0,1), from.range=NA) { | |
if(any(is.na(from.range))) from.range <- range(x, na.rm=TRUE) | |
## check if all values are the same | |
if(!diff(from.range)) return( | |
matrix(mean(range), ncol=ncol(x), nrow=nrow(x), | |
dimnames = dimnames(x))) | |
## map to [0,1] |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 csv | |
import os | |
from sumy.parsers.html import HtmlParser | |
from sumy.parsers.plaintext import PlaintextParser | |
from sumy.nlp.tokenizers import Tokenizer | |
from sumy.summarizers.lsa import LsaSummarizer as Lsa | |
from sumy.summarizers.luhn import LuhnSummarizer as Luhn | |
from sumy.summarizers.text_rank import TextRankSummarizer as TxtRank | |
from sumy.summarizers.lex_rank import LexRankSummarizer as LexRank | |
from sumy.summarizers.sum_basic import SumBasicSummarizer as SumBasic |
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
var Walker = require('puppeteer-walker') | |
var fs = require('fs') | |
var walker = Walker() | |
fs.writeFile('output.csv', 'URL, Title, H2\r\n', 'utf8', function (err) { | |
console.log(`Header written`) | |
}) | |
walker.on('end', () => console.log('finished walking')) |
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 praw | |
import csv | |
import datetime | |
# Create an app: https://www.reddit.com/prefs/apps | |
# Use http://localhost:8080 as redirect uri | |
username = "" | |
password = "" | |
clientid = "" | |
clientsecret = "" |