Skip to content

Instantly share code, notes, and snippets.

View Sanae6's full-sized avatar

Aubrey Sanae6

View GitHub Profile
def main():
infile = open("input.txt", 'r')
outfile = open("output.txt", 'w')
data = infile.readlines()
# add a variable, name it count to keep track of how many numbers in the input file since it is used for average the total
count = 0
# add code here to loop through the numbers
numbers = list(map(float, data)) # far easier shorthand for a for loop that converts all data elements to floats
count = len(numbers) # get count from for loop
import math
def main():
print("This program computes the volume and surface area of a sphere.")
print()
radius = int(input("Please enter the radius of the sphere: "))
print()
def sphereArea(radius):
@Sanae6
Sanae6 / heaps.md
Last active October 11, 2026 23:05
An overview on working with sead Heaps.

sead::Heap

When diving into a game's code, it will likely use sead::Heap to organize the memory range it's given. Heaps are used to divide up the system's RAM, and are used to keep track of where to put data games use.

Using a Heap

Using a heap is very simple, using the operator new and operator new[] overloads, running a simple new Structure() or new Structure[size] will use the currently active heap to allocate the requested memory. There is also an overload to pass in the heap directly, or you can either set the current heap temporarily to your heap.

#include <basis/seadNew.h>
#include <heap/seadHeap.h>
#include <heap/seadHeapMgr.h>
@Sanae6
Sanae6 / info.md
Last active January 25, 2022 20:13
smo modding stuff i know about

Small gist of links to modding SMO

If you want to get started, you should have a hacked switch with SMO 1.0.0 dumped as that's what most of the community is using for modding.

Make sure you have at least some knowledge of C++ before doing code mods.

You can find existing mods on GameBanana.

General File Tools