This file contains 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
from IPython.display import display | |
import pandas as pd | |
def pdshow(df): | |
""" | |
This shows a pandas dataframe in full/ | |
Also consider .to_html() and https://pbpython.com/dataframe-gui-overview.html |
This file contains 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
""" | |
Transformer in ~80 lines of code. | |
From Thomas Wolf's tweet https://twitter.com/Thom_Wolf/status/1129658539142766592. | |
""" | |
import torch | |
from torch import nn | |
class Transformer(nn.Module): |
This file contains 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
# Generate PDFs from the Markdown source files | |
# | |
# In order to use this makefile, you need some tools: | |
# - GNU make | |
# - Pandoc | |
# - LuaLaTeX | |
# - DejaVu Sans fonts | |
# Directory containing source (Markdown) files | |
source := src |
This file contains 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
# Makefile | |
# | |
# Converts Markdown to other formats (HTML, PDF, DOCX, RTF, ODT, EPUB) using Pandoc | |
# <http://johnmacfarlane.net/pandoc/> | |
# | |
# Run "make" (or "make all") to convert to all other formats | |
# | |
# Run "make clean" to delete converted files | |
# Convert all files in this directory that have a .md suffix |
To support my open-source work, consider adding me on Patreon.
An easy to refer to document for regularly setting up macOS 10.15 Catalina.
The topic of recipe-based frequent fresh reinstalls of macOS is a controversial issue. Some people are against reinstalling macOS, citing that they have never had an issue with Apple provided upgrade installs.
This file contains 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
#!/usr/bin/env python3 | |
""" | |
Download all ClassDojo photos and videos in your timeline. | |
by kecebongsoft | |
How it works: | |
1. Fetch list of items in the timeline, if there are multiple pages, | |
it will fetch for all pages. |
Here are some ideas for additional functions or classes that could enhance this module for creating good-looking reports with data visualizations:
- Color Palette Generator: A function that generates aesthetically pleasing color palettes for charts and graphs. This could include options for different types of palettes (e.g., sequential, diverging, qualitative) and considerations for color blindness.
def generate_color_palette(palette_type: str, num_colors: int, colorblind_safe: bool = True) -> List[str]:
"""Generate a color palette for data visualization."""
...
This file contains 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
def check_lists_equal(list_1: list, list_2: list) -> bool: | |
"""Check if two lists are equal.""" | |
return len(list_1) == len(list_2) and sorted(list_1) == sorted(list_2) |
This file contains 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
# See https://pre-commit.com for more information | |
# See https://pre-commit.com/hooks.html for more hooks | |
# Use: `pre-commit autoupdate` to update the hooks | |
repos: | |
- repo: https://github.com/pre-commit/pre-commit-hooks | |
rev: v4.4.0 | |
hooks: | |
- id: check-added-large-files # prevents giant files from being committed. | |
- id: check-case-conflict # checks for files that would conflict in case-insensitive filesystems. |