Skip to content

Instantly share code, notes, and snippets.

@ZipFile
ZipFile / NPJH50045.ini
Last active March 11, 2026 08:57
Disable camera shake/wobble in MGS Peace Walker (CwCheat)
_S NPJH-50045
_G Metal Gear Solid - Peace Walker [JPN]
_C0 No Camera Wobble
_L 0x20147f78 0x00000000
@ZipFile
ZipFile / python-repr-print.c
Created March 4, 2026 13:26
Python's `print(repr(obj))`, but in C
#include <stdio.h>
#include <Python.h>
static void reprint(PyObject *obj) {
PyObject* repr = PyObject_Repr(obj);
PyObject* str = PyUnicode_AsEncodedString(repr, "utf-8", "~E~");
const char *bytes = PyBytes_AsString(str);
printf("REPR: %s\n", bytes);
@ZipFile
ZipFile / conftest.py
Created February 5, 2025 11:12
python-dependency-injection + pytest + sqlalchemy
# pip install dependency-injector pytest pytest-asyncio pytest-postgresql SQLAlchemy pydantic-settings asyncpg psycopg[binary]
import os
from contextlib import ExitStack
from typing import Any, AsyncIterator, Iterator, NoReturn
import pytest_asyncio
from dependency_injector.providers import Provider
from pytest import fixture
from pytest_postgresql.janitor import DatabaseJanitor
@ZipFile
ZipFile / WeightPaintSelectArmature.py
Last active May 1, 2024 13:25
[Blender Add-on] Switch to Weight Paint and select Armature
# This is free and unencumbered software released into the public domain.
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
# means.
# In jurisdictions that recognize copyright laws, the author or authors
# of this software dedicate any and all copyright interest in the
# software to the public domain. We make this dedication for the benefit
@ZipFile
ZipFile / symlink-models.ps1
Created July 29, 2023 10:57
Link AUTOMATIC1111/stable-diffusion-webui models to ComfyUI
@ZipFile
ZipFile / README.md
Last active May 16, 2022 21:23
DIY stream testing
@ZipFile
ZipFile / history.yml
Created August 5, 2021 11:39
GitHub Actions
name: Git history
on: pull_request
jobs:
git-history:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 25
- name: "No fixup! commits"
@ZipFile
ZipFile / iqdb.py
Created April 4, 2021 15:50
IQDB-like image similarity calculation in Python
#!/usr/bin/env python
# Install deps:
# pip install scikit-image PyWavelets
# Run:
# python iqdb.py a.jpg b.jpg
# References:
# https://iqdb.org/code/
# https://github.com/ricardocabral/iskdaemon
# https://grail.cs.washington.edu/projects/query/
@ZipFile
ZipFile / README.md
Last active March 6, 2026 05:45
Pixiv OAuth Flow

Retrieving Auth Token

  1. Run the command:

    python pixiv_auth.py login

    This will open the browser with Pixiv login page.

@ZipFile
ZipFile / README.md
Created November 1, 2020 09:11
Calculate image signature in Python

Install dependencies

apt-get install libmagickwand-dev
pip install Wand

Usage