This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import timeit | |
| import requests | |
| import html_text | |
| import justext | |
| from selectolax.parser import HTMLParser | |
| # There's a difference between these two | |
| html_long = requests.get("http://planet.python.org/").content.decode("utf-8") | |
| html_short = "<p><b>This</b> is just a small example.</p>" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import spacy | |
| from spacy import displacy | |
| def show_results(text, patterns): | |
| nlp = spacy.blank("en") | |
| ruler = nlp.add_pipe("entity_ruler") | |
| ruler.add_patterns(patterns) | |
| doc = nlp(text) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| This script combines two datasets to generate a file with all found patterns. | |
| """ | |
| import srsly | |
| from prodigy.components.db import connect | |
| import spacy | |
| nlp = spacy.blank("en") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import time | |
| from typing import List | |
| from rich import box | |
| from rich.table import Table | |
| from rich.console import Console | |
| import prodigy | |
| from prodigy.components.loaders import CSV |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import base64 | |
| import pathlib | |
| from jinja2 import Environment, FileSystemLoader, select_autoescape | |
| env = Environment( | |
| loader=FileSystemLoader("images"), | |
| autoescape=select_autoescape() | |
| ) | |
| template = env.get_template("instructions.template") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pyphen | |
| import prodigy | |
| from prodigy.components.loaders import JSONL | |
| from prodigy.components.db import connect | |
| hyphenator = pyphen.Pyphen(lang="en_US") | |
| def construct_html(text): | |
| hyphend = hyphenator.inserted(text) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json", | |
| "basics": { | |
| "name": "Vincent D. Warmerdam", | |
| "label": "Senior Data Professional & Research Advocate", | |
| "image": "", | |
| "email": "[email protected]", | |
| "url": "https://koaning.io", | |
| "summary": "", | |
| "location": { |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.