One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
# taken from here: http://web.archive.org/web/20110527163743/https://svn.enthought.com/enthought/browser/sandbox/docs/coding_standard.py | |
""" This module is an example of the Enthought Python coding standards. | |
It was adapted from the Python Enhancement Proposal 8 (aka PEP 8) titled | |
'Style Guide for Python Code' (http://www.python.org/peps/pep-0008.html). | |
The first item in a module must be a documentation string (docstring). The | |
first line of the docstring should be a one line summary. If a more | |
detailed description is required, put an empty line before it. |
from bs4 import BeautifulSoup | |
import requests | |
def getPlaylistLinks(url): | |
sourceCode = requests.get(url).text | |
soup = BeautifulSoup(sourceCode, 'html.parser') | |
domain = 'https://www.youtube.com' | |
for link in soup.find_all("a", {"dir": "ltr"}): | |
href = link.get('href') | |
if href.startswith('/watch?'): |
import imaplib2, time | |
from threading import * | |
# This is the threading object that does all the waiting on | |
# the event | |
class Idler(object): | |
def __init__(self, conn): | |
self.thread = Thread(target=self.idle) | |
self.M = conn | |
self.event = Event() |
This book is all about patterns for doing ML. It's broken up into several key parts, building and serving. Both of these are intertwined so it makes sense to read through the whole thing, there are very many good pieces of advice from seasoned professionals. The parts you can safely ignore relate to anything where they specifically use GCP. The other issue with the book it it's very heavily focused on deep learning cases. Not all modeling problems require these. Regardless, let's dive in. I've included the stuff that was relevant to me in the notes.
import json | |
from fasthtml.common import * | |
import requests | |
import logging | |
import sys | |
app, rt = fast_app(hdrs=(Script(src="https://cdn.plot.ly/plotly-2.32.0.min.js"),)) | |
# Extract function |