Scraping the Teknoids Mailman PiperMail Archive

Putting this here in case anyone finds themselves in need of something to scrape a Pipermail web archive of a Mailman mailing list. This bit of Python 3 is based on a a bit of Python 2 I found at Scraping GNU Mailman Pipermail Email List Archives. The only changes I made from the original are to update somethings to work in Python 3. It works well for my purposes, generating a single text file of the teknoids list archive from 2005 to today.

#!/usr/bin/env python

import requests
from lxml import html
import gzip
from io import BytesIO

listname = 'teknoids'
url = 'https://lists.teknoids.net/pipermail/' + listname + '/'

response = requests.get(url)
tree = html.fromstring(response.text)

filenames = tree.xpath('//table/tr/td[3]/a/@href')

def emails_from_filename(filename):
print (filename)
response = requests.get(url + filename)
if filename[-3:] == '.gz':
contents = gzip.GzipFile(fileobj=BytesIO(response.content)).read()
else:
contents = response.content
return contents

contents = [emails_from_filename(filename) for filename in filenames]
contents.reverse()

contents = b"\n\n\n\n".join(contents)

with open(listname + '.txt', 'wb') as filehandle:
filehandle.write(contents)

KNN (K-Nearest Neighbors) is Dead! | by Marie Stephen Leo | Towards AI | Dec, 2020 | Medium

KNN (K-Nearest Neighbors) is Dead! | by Marie Stephen Leo | Towards AI | Dec, 2020 | Medium https://medium.com/towards-artificial-intelligence/knn-k-nearest-neighbors-is-dead-fc16507eb3e

Learning how to apply some of the algorithms mentioned in this article would likely improve students’ and teachers’ ability to locate CALI resources and allow us to build a useful recommender system.

Installation of Lemur Certificate Manager on Ubuntu :: HowtoForge

Installation of Lemur Certificate Manager on Ubuntu :: HowtoForge https://www.howtoforge.com/tutorial/installation-and-usage-of-lemur-certificate-manager-on-ubuntu/

Online Training Courses powered by Jupyter Notebooks — Safari Learning Platform

Online Training Courses powered by Jupyter Notebooks — Safari Learning Platform https://www.safaribooksonline.com/public/online-training-jupyter/?utm_medium=social&utm_source=twitter.com&utm_campaign=promo&utm_content=jupyter+notebook+announcement

Get started with machine learning using Python | Opensource.com


From self-driving cars to stock market predictions to online learning, machine learning is used in almost every field that utilizes prediction as a way to improve itself. Due to its practical usage, it is one of the most in-demand skills right now in the job market. Also, getting started with Python and machine learning is easy as there are plenty of online resources and lots of Python machine learning libraries available.

Source: Get started with machine learning using Python | Opensource.com

Gareth’s Tech Blog: Reclaiming the web in < 100 lines of code

Gareth’s Tech Blog: Reclaiming the web in < 100 lines of code http://blog.dwyer.co.za/2016/09/reclaiming-web-in-100-lines-of-code.html

Make A Visual Novel With Python | Linux User & Developer – The Linux And FOSS Mag For A GNU Generation

Make A Visual Novel With Python | Linux User & Developer – The Linux And FOSS Mag For A GNU Generation http://www.linuxuser.co.uk/tutorials/make-a-visual-novel-with-python