Skip to content

Instantly share code, notes, and snippets.

View kadster's full-sized avatar
🏠
Working from home

ST kadster

🏠
Working from home
View GitHub Profile
@kadster
kadster / PY0101EN-1-2-Strings.ipynb
Created May 12, 2020 17:38
Created on Skills Network Labs
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kadster
kadster / PY0101EN-1-1-Types.ipynb
Created May 12, 2020 16:59
Created on Skills Network Labs
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import os
from bs4 import BeautifulSoup
folder = '/Users/nt/Desktop/Darwin'
files = os.listdir(folder)
tagnames = ['persName', 'date', 'keywords', 'abstract', 'text']
files = [f for f in files[:] if 'xml' in f]
output_strs = []
import os
from bs4 import BeautifulSoup
folder = '/Users/nt/Desktop/letters'
files = os.listdir(folder)
tagnames = ['persName', 'abstract', 'date', 'transcription']
files = [f for f in files if 'xml' in f]
output_strs = []