Skip to content

Instantly share code, notes, and snippets.

View izikeros's full-sized avatar

Krystian Safjan izikeros

View GitHub Profile
@izikeros
izikeros / pdshow.py
Created September 22, 2021 18:48 — forked from wassname/pdshow.py
show a pandas data frame in full
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
@izikeros
izikeros / exercise.md
Created September 22, 2021 18:49 — forked from wassname/exercise.md
exercise.md

Exercise

Description:

  1. first
  2. second
@izikeros
izikeros / simple_transformer.py
Created September 22, 2021 18:52 — forked from wassname/simple_transformer.py
Transformer in ~80 lines of code from Thomas Wolf's tweet https://twitter.com/Thom_Wolf/status/1129658539142766592
"""
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):
@izikeros
izikeros / pandoc.Makefile
Created September 24, 2021 08:36 — forked from bertvv/pandoc.Makefile
Makefile for Markdown -> PDF using pandoc
# 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
@izikeros
izikeros / Makefile
Last active July 18, 2024 07:09 — forked from kristopherjohnson/Makefile
[Makefile - HTML, PDF, DOCX from Markdown] Makefile that uses Pandoc to generate HTML, PDF, DOCX, etc. from Markdown source files
# 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
@izikeros
izikeros / 1-macOS-10.15-catalina-setup.md
Created November 5, 2021 19:59 — forked from kevinelliott/1-macOS-10.15-catalina-setup.md
macOS 10.15 Catalina Mostly-Automated Setup

To support my open-source work, consider adding me on Patreon.

macOS 10.15 Catalina Mostly-Automated Setup

An easy to refer to document for regularly setting up macOS 10.15 Catalina.

Controversy

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.

@izikeros
izikeros / download_class_dojo_archive.py
Last active March 14, 2024 10:00 — forked from pohutukawa/download_class_dojo_archive.py
[ClassDojo download] Download all photos and videos from your Class Dojo account #classdojo
#!/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.
@izikeros
izikeros / future_work.md
Last active December 19, 2024 19:10
[plot enchancements] Tools for improving plots look and readability: add_value_labels_barh() and others #matplotlib

Here are some ideas for additional functions or classes that could enhance this module for creating good-looking reports with data visualizations:

  1. 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."""
    ...
@izikeros
izikeros / check_lists_equal.py
Last active January 13, 2022 08:07
Check if two lists are equal. Used in assertions in tests
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)
@izikeros
izikeros / .pre-commit-config.yaml
Last active March 14, 2024 10:09
[pre-commit config] Set of pre-commit hooks for python code quality validation and for code formatting #qa #project #configuration
# 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.