Skip to content

Instantly share code, notes, and snippets.

View piotr-kowenzowski-asi's full-sized avatar

Peter Kowenzowski piotr-kowenzowski-asi

  • Airspace Intelligence
  • Gdansk
View GitHub Profile
import datetime
import gzip
import logging
from boto3 import Session
from src.settings import AWS_BUCKET_NAME, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY
class S3reader:
@piotr-kowenzowski-asi
piotr-kowenzowski-asi / pagerank.py
Created February 21, 2017 10:52 — forked from diogojc/pagerank.py
python implementation of pagerank
import numpy as np
from scipy.sparse import csc_matrix
def pageRank(G, s = .85, maxerr = .001):
"""
Computes the pagerank for each of the n states.
Used in webpage ranking and text summarization using unweighted
or weighted transitions respectively.
@piotr-kowenzowski-asi
piotr-kowenzowski-asi / pagerank.py
Created February 21, 2017 10:51 — forked from diogojc/pagerank.py
python implementation of pagerank
import numpy as np
from scipy.sparse import csc_matrix
def pageRank(G, s = .85, maxerr = .001):
"""
Computes the pagerank for each of the n states.
Used in webpage ranking and text summarization using unweighted
or weighted transitions respectively.