Skip to content

Instantly share code, notes, and snippets.

According to all known laws of aviation, there is no way a bee should be able to fly.
Its wings are too small to get its fat little body off the ground.
The bee, of course, flies anyway because bees don't care what humans think is impossible.
Yellow, black. Yellow, black. Yellow, black. Yellow, black.
Ooh, black and yellow!
Let's shake it up a little.
Barry! Breakfast is ready!
Coming!
Hang on a second.
Hello?
"""
B-004 - Using Sets for Data Analysis
https://pbpython.com/data-analysis-with-sets.html
"""
A More Complex Problem: for loop to generate automatic report
import pandas as pd
df = pd.read_csv("../data/sample-sales.csv")
df.head()
import pandas as pd
import seaborn as sns
# Define the headers since the data does not have any
headers = ["symboling", "normalized_losses", "make", "fuel_type", "aspiration",
"num_doors", "body_style", "drive_wheels", "engine_location",
"wheel_base", "length", "width", "height", "curb_weight",
"engine_type", "num_cylinders", "engine_size", "fuel_system",
"bore", "stroke", "compression_ratio", "horsepower", "peak_rpm",
"city_mpg", "highway_mpg", "price"]
@Jong-Sig
Jong-Sig / EntityNameCleaning.py
Last active October 15, 2026 19:33
Entity Name Cleaning Before Matching
import numpy as np
import pandas as pd
import sys
import os
import ast
import re
"""
# weak name standardization
@Jong-Sig
Jong-Sig / Centrality.py
Created June 16, 2024 21:18
Draw Network and Measure Centrality
import pandas as pd
import numpy as np
import os
import networkx as nx
from itertools import combinations, chain
"""
Process
1. Matrix drawing
1) Import venture-investor pair data

Netflix — PlayCover crash fix

Guide to patch the Netflix iOS binary to stop it from crashing when it detects it's running on a Mac via PlayCover.

Netflix intentionally crashes itself when it detects it's running on macOS (isMacCatalystApp). This script tries to dynamically find that check in the binary and replaces it with a no-op.

Tested on: Netflix 18.x · M4 macOS 26 · PlayCover 3.x


# -*- coding: utf-8 -*-
# ======================================================================================================================================================
"""
Created on Thu Apr 22 09:00:54 2021
@author: Utpal Kumar (IES, Academia Sinica)
"""
# ======================================================================================================================================================
import pandas as pd
@Ruthenus
Ruthenus / Week 9 Homework.py
Last active October 15, 2026 19:31
Week 9 Homework in IT STEP Academy (file tasks)
import pandas
import json
import math
def load_and_display_csv(filepath):
"""
Пробує завантажити файл 28,5 ГБ зі значеннями, розділеними комами (csv),
за вказаним шляхом filepath. Виводить індекси та назви колонок.
Перехоплює перші можливі помилки. Допоміжна функція для визначення
@Aazad-10
Aazad-10 / task3a.py
Created November 4, 2025 15:44
TASK3
# Function to find k'th non repeating character
# in string
from collections import OrderedDict
def kthRepeating(input,k):
# OrderedDict returns a dictionary data structure having characters of input
# string as keys in the same order they were inserted and 0 as their default value
dict=OrderedDict.fromkeys(input,0)
# now traverse input string to calculate frequency of each character
for ch in input:
dict[ch]+=1
@barockpo
barockpo / section-2 of material import utils.py
Created January 12, 2026 18:47
section-2 of 3 of material import utils.py
# =============================================================================
# PARSED ITEM CLASS
# =============================================================================
class ParsedItem:
"""Represents a parsed material item."""
def __init__(self, row_number: int, raw_text: str, quantity: float = None,
unit: str = None, parsed_name: str = None, specifications: str = None):