Skip to content

Instantly share code, notes, and snippets.

View admariner's full-sized avatar

Periklis Papanikolaou admariner

  • admariner
  • Thessaloniki
View GitHub Profile
@admariner
admariner / gist:3e9e2d27512320bda563f6827486447f
Created August 15, 2020 03:20 — forked from dsottimano/gist:e3e6294f80cb1cbb526d1defed322850
Tech seo boost 2019 - Dave Sottimano - Apps script demo
//serpApiKey from serpapi.com
var GLOBAL_VARIABLES = {
serpApiKey : "add your api key"
}
/*
/***************************
/BEGIN PRESENTATION SCRIPTS
// 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);
@admariner
admariner / internal-pagerank.r
Created August 16, 2020 16:03 — forked from pshapiro/internal-pagerank.r
Modification to assign PR a value between 1 and 10
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]
@admariner
admariner / CausalImpact.ipynb
Created August 16, 2020 16:04 — forked from pshapiro/CausalImpact.ipynb
CausalImpact implementation in Python to demonstrate SEO A/B Testing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@admariner
admariner / GoogleEntities.ipynb
Created August 16, 2020 16:04 — forked from pshapiro/GoogleEntities.ipynb
Extract Entities from Search Results using Google NLP for Keyword Research Opportunities
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@admariner
admariner / Auto301Redirects.ipynb
Created August 16, 2020 16:04 — forked from pshapiro/Auto301Redirects.ipynb
Automatic 301 Redirects with SpaCy
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@admariner
admariner / expired_domain_finder.ipynb
Created August 16, 2020 16:04 — forked from pshapiro/expired_domain_finder.ipynb
Jupyter Notebook that input outlink from Screaming Frog crawl, grabs PA & DA from Moz API, and uses WHOIS API to determine domain availability.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@admariner
admariner / metadesc.py
Created August 16, 2020 16:04 — forked from pshapiro/metadesc.py
Use Text Summarization Algorithms to Help Aid the Writing of Meta Descriptions
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
@admariner
admariner / index.js
Created August 16, 2020 16:04 — forked from pshapiro/index.js
Puppeteer Crawler Example
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'))
@admariner
admariner / reddit-keyword-insights.py
Created August 16, 2020 16:04 — forked from pshapiro/reddit-keyword-insights.py
Get stats from reddit keywords
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 = ""