Pinned post
Pinned post

me coming to report you for offensive content (the toot was completely innocuous)

Pinned post
Pinned post

@coriander my superpower in education was that i tested very well.

god made sure i never experienced test anxiety, but at the cost making sure i had anxiety in absolutely everything else

Pinned post

it is said that speech first developed by primitive humans who would utter simple phrases to each other

I hate that the two hour video that roasts c++ has AI generated images in the background for the whole thing because it is a really good video otherwise

I remember when Holly boosted one of her posts and I went to comment at how good she was at Posting, only to see that I had commented on the post months before with the exact same sentiment

That girl crazy and sleep deprived.
She a yawndere

I encountered a fun coding challenge while programming today.

Suppose you are teaching a class and you brought with yourself a bag of candy to hand out to your students. You want to hand out every piece of candy, but do it in a way that disperses the candy provided to each student as evenly as possible. No student should have more than 1 extra piece of candy than any other student. Exactly which students get the extra pieces of candy does not matter.

Task: Write a function that takes N students and M pieces of candy, where M > N, and returns an array of length N showing the amount candy given to each student.

Followup Task: Generate this array in O(N) time, where N is the number of students (NOT the amount of candy!)

wow i just had a program fail because of floating point error, i have never had to deal with this before lol

I stitched two scripts together using python and it was weirdly annoying to do, when in bash it would have just been a simple one-liner with a command substitution

Show thread

sometimes bash really is just the best way to do something

the unix pipe is one of mankind's greatest inventions

:

the unix pipe is one of mankind's greatest inventions

i have reached the point where im not sure i understand my code anymore but it works

i have tapped trees outside of my farm tho. so im not completely innocent

Show thread

you might think with all of my stardew math wonkery that i would be one of those tryhard optimizer players but the truth is that i have gotten perfection twice and never once built a junimo hut

fine, i'll do it myself:

import matplotlib.pyplot as plt
from matplotlib.ticker import (MultipleLocator, AutoMinorLocator)
import csv
import math

y_star = [0]
y_ancient = [0]
x = [0]
with open('./output/1-plant-125-casks-448-days-1-sim.csv', mode='r') as file:
reader = csv.reader(file, delimiter=',')
for day, ancient, star in reader:
x.append(int(day))
y_ancient.append(int(ancient))
y_star.append(int(star))

_, ax = plt.subplots()
ax.plot(x, y_ancient)
ax.plot(x, y_star)

ax.set(xlabel='days since initial planting', ylabel='profit (g)',
title='Ancient Fruit vs Star Fruit profits')
ax.grid()
ax.xaxis.set_major_locator(MultipleLocator(112))
ax.xaxis.set_minor_locator(MultipleLocator(28))

ax.yaxis.set_major_locator(MultipleLocator(math.floor(max(y_ancient) / 10)))

plt.show()

Show thread

almost crashed my computer running 1,000,000 parallel processes at once just to see if i could do it

Show older
📟🐱 GlitchCat

A small, community‐oriented Mastodon‐compatible Fediverse (GlitchSoc) instance managed as a joint venture between the cat and KIBI families.