Skip to content

Instantly share code, notes, and snippets.

@JHibbard
JHibbard / make_table_uris.py
Last active May 10, 2024 04:10
Example function for generating normalized table URIs reflecting the medallion architecture
from pathlib import Path
def make_table_uris(name: str, basepath: str='.'):
"""Example function for generating normalized table URIs
Args:
name: name of table to generate table URIs for
basepath: directory to nest table URIs under

Techniques to improve as a programmer

Do not be the person who has practiced 10,000 things once, but be the person who has practiced one thing 10,000 times.
— Intentionally misquoting Bruce Lee

  1. Write a lot of code. Physically type code and run it (if either part is missing, it is not quality code practice).
  2. Think of coding practice as a portfolio. It should be a mix:
    • 40-60% Easy-for-you fundamentals. Practicing Pythonic idioms to solve common atomic problems. This develops fluency to solve novel challenges and build up to more advanced coding.
  • 20-30% Difficult-but-possible problems. LeetCode and similar is good for this level.
@divamgupta
divamgupta / vat_example.ipynb
Created May 31, 2019 16:23
Simple keras implementation of Virtual Adversarial Training .
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nhymxu
nhymxu / README-python-framework-benchmark.md
Last active March 27, 2024 00:45
Flask vs Falcon vs FastAPI benchmark
gunicorn run:app --workers=9
gunicorn run:app --workers=9 --worker-class=meinheld.gmeinheld.MeinheldWorker

Macbook Pro 2015 Python 3.7

Framework Server Req/s Max latency +/- Stdev
@TylerFisher
TylerFisher / hosting-on-github.md
Last active June 21, 2024 09:19
Basic steps for hosting on Github

Hey there, apparently people are still using this Gist from 2013! It's out of date! Consult the Github docs.

Steps for Hosting a Website on GitHub

  1. Create a GitHub account on github.com.
  2. Download either [GitHub for Mac][1] or [GitHub for Windows][2], depending on your operating system. Open the app and log in using the account you just created.
  3. (On Mac): After you login, click advanced and make sure that your name and email are correct. Then, click "Install Command Line Tools", just in case you want to start using the command line later in life.
  4. Create a new repository in your GitHub application. Name it your-username.github.io. The name is very important. Note the folder that GitHub is saving the repository to. Make sure the "Push to GitHub?" box is checked.
  5. Move your website's files into the folder that GitHub just created when you made the repository. IMPORTANT: Your homepage HTML file must be called "index.html", and it must exist in the top-level