Skip to content

Instantly share code, notes, and snippets.

Will Critchlow willcritchlow

Block or report user

Report or block willcritchlow

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
willcritchlow / generate-site-orphaned-page.ipynb
Created May 22, 2019
Run PageRank on a small example site to show the PR of an orphaned page -- one with no links
View generate-site-orphaned-page.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
willcritchlow /
Last active Nov 28, 2018
Networkx snippet with personalization
import networkx as nx
site = nx.DiGraph()
# load links from crawl into a list of dictionaries called edges with keys 'Source' and 'Destination'
for edge in edges:
site.add_edges_from([(edge['Source'], edge['Destination'])])
# set norm_mr to be an array of normalized raw mozranks for the nodes in site
willcritchlow / wp-commenters.sql
Created Oct 20, 2011
SQL for getting WordPress commenters' email addresses
View wp-commenters.sql
select a.comment_author_email, max(a.comment_date) as date, b.comment_author from wp_comments a, wp_comments b where a.comment_author_email = b.comment_author_email and a.comment_date = b.comment_date and a.comment_approved=1 and a.comment_author_email <> "" and a.user_id = 0 and a.comment_author_email not like '%YOUREMAILDOMAIN%' group by a.comment_author_email;
willcritchlow /
Created May 11, 2011
The most basic Google Analytics access in python
from datetime import date, timedelta
from xml.dom.minidom import parseString
def main():
client =
client.ClientLogin('<your email here>', '<your password here>')
today =
You can’t perform that action at this time.