Skip to content

Instantly share code, notes, and snippets.

View pojda's full-sized avatar

Thiago Pojda pojda

View GitHub Profile
@Gabriellpweb
Gabriellpweb / B64Cypher.py
Created November 23, 2017 19:16
B64Cypher
#!/usr/bin/python
__author__ = "Gabriel Luiz Pereira <[email protected]>"
from base64 import b64encode, b64decode
class B64Cypher:
def __init__(self, salt, iterations):
self.salt = salt
self.iterations = range(0, iterations)
def encode(self, text):
@pshapiro
pshapiro / internal-pagerank.r
Last active March 29, 2023 16:36
Calculate Internal PageRank from Screaming Frog Crawl
library("igraph")
# Swap out path to your Screaming Frog All Outlink CSV. For Windows, remember to change backslashes to forward slashes.
links <- read.csv("C:/Documents/screaming-frog-all-outlinks.csv", skip = 1) # CSV Path
# This line of code is optional. It filters out JavaScript, CSS, and Images. Technically you should keep them in there.
links <- subset(links, Type=="AHREF") # Optional line. Filter.
links <- subset(links, Follow=="true")
links <- subset(links, select=c(Source,Destination))
g <- graph.data.frame(links)
pr <- page.rank(g, algo = "prpack", vids = V(g), directed = TRUE, damping = 0.85)
values <- data.frame(pr$vector)
@jmvrbanac
jmvrbanac / app.py
Created February 18, 2016 01:05
Using Jinja2 with Falcon
import os
import falcon
import jinja2
def load_template(name):
path = os.path.join('templates', name)
with open(os.path.abspath(path), 'r') as fp:
return jinja2.Template(fp.read())