Skip to content

Instantly share code, notes, and snippets.

View rapidcow's full-sized avatar

Yizheng Meng rapidcow

  • Shenzhen
  • 22:49 (UTC +08:00)
View GitHub Profile
@rapidcow
rapidcow / keybase.md
Created November 12, 2023 14:52
eeeeh keybase stuffe

Keybase proof

I hereby claim:

  • I am rapidcow on github.
  • I am rapidcow (https://keybase.io/rapidcow) on keybase.
  • I have a public key ASB6ZCjkNDsFBY7wZ4nCk9Ih_aM-hoX6w1le8KMa83_yPQo

To claim this, I am signing this object:

@rapidcow
rapidcow / bday.py
Created September 27, 2023 15:20
birthday distribution PMF for Python 3 (no dependencies)
from functools import reduce
from operator import mul
def prod(iterable, initial=1):
# Return the product of an iterable.
return reduce(mul, iterable, initial)
def fall(n, k):
# Compute the falling factorial $n^{(k)}$.
return prod(range(n, n - k, -1))
@rapidcow
rapidcow / README.md
Last active January 21, 2023 11:00
my x360ce mapping for playing repentance co-op

tutorial

a tiny explanation for what this thing is for...

so if you and another person both own BOI then you probably won't need this. but if you own BOI and the other person don't (or you have a controller and unlike me you know how to use one O_O) then... well you're probably in the right place, because i am going to teach you how i did it! (which might not be the easiest, but it worked for me :)

in short, there are three steps:

  1. turn on Family Library Sharing for the account without BOI to play
  2. download a controller emulator (i used x360ce) and map keyboard keys to controller keys (the main reason why i am posting this gist)
@rapidcow
rapidcow / two-sides.tex
Created November 30, 2022 14:01
graphs of the famous sinc function and its "other side" (im sorry i can never rember those quirky option names in pgfplots- 💀)
\documentclass{article}
\usepackage[a4paper]{geometry}
\usepackage{amsmath}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
\usetikzlibrary{calc}
\begin{document}
\begin{center}
\begin{tikzpicture}
@rapidcow
rapidcow / boi11.ly
Last active September 27, 2022 00:10
sheet music for DannyB's isaac title theme
\version "2.22.2"
\language english
\paper {
paper-width = 7\in
paper-height = 8\in
indent = 0
tagline = ##f
}
@rapidcow
rapidcow / README.md
Last active January 18, 2023 15:48
tool for doing isaac daily run :P

this is a python 3.8+ script that automatically toggles EnableDebugConsole... because to do daily run not only do you have to turn off all mods but also you have to disable the debug console.

(NOTE: ONLY FOR REPENTANCE ON WINDOWS!!!1!)

put this file literally anywhere on your device and it should work... i hope.

it finds the options.ini file in your $USERPROFILE/Document/My Games/Binding of Isaac Repentance/ directory and either

  • creates a new options.ini with a single line EnableDebugConsole=1, or
  • toggles the value of EnableDebugConsole in the preexisting options.ini file (by toggling i basically mean 0 turns into 1, and 1 turns into 0)
@rapidcow
rapidcow / basicproc.py
Last active June 21, 2022 18:08
The original code for the psp library --- basicproc.py
"""Basic processing of the backup file."""
# Docstrings use the conversion from numpy:
# https://numpydoc.readthedocs.io/en/latest/format.html
__all__ = [
'Panel', 'Entry', 'InvalidEntryError', 'backup_get_attributes',
'backup_get_data', 'backup_get_description', 'data_check_duplicates',
'data_get_by_date', 'format_bytes', 'BYTES_TENS_UNITS',
'BYTES_TWOS_UNITS',