all AI news
My go-to Python snippets
April 24, 2024, 1:19 p.m. | Kathryn DiPippo
DEV Community dev.to
This is a blog post just for me, but it's all of the Python snippets I repeatedly look up or reference from other parts of my codebase.
Snippets List
- Read File into Words
- Read JSON File into Dict
Read File Into Words
def read_file_into_words(filename: str) -> list[list[str]]:
"""Parse a text file into a 2D list of words, i.e.
"This is an example file with
multiple lines of text" becomes
[["This", "is", "an", "example", "file", "with"],
"multiple", "lines", "of", "text"].
Args: …
blog codebase file json list look look up python reference text words
More from dev.to / DEV Community
Jobs in AI, ML, Big Data
Software Engineer for AI Training Data (School Specific)
@ G2i Inc | Remote
Software Engineer for AI Training Data (Python)
@ G2i Inc | Remote
Software Engineer for AI Training Data (Tier 2)
@ G2i Inc | Remote
Data Engineer
@ Lemon.io | Remote: Europe, LATAM, Canada, UK, Asia, Oceania
Artificial Intelligence – Bioinformatic Expert
@ University of Texas Medical Branch | Galveston, TX
Lead Developer (AI)
@ Cere Network | San Francisco, US