This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import itertools | |
nuggets = { | |
4: 2.39, | |
6: 3.49, | |
10: 4.89, | |
20: 6.19, | |
40: 11.99, | |
} | |
upper_price = 50 | |
max_orders = upper_price // 1 # upper price / cheapest item |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# bmp to csv | |
# only mildly cursed | |
FILENAME = "image.bmp" | |
DIMENSIONS = (100, 100) | |
HEADER_END = 0x36 # the address where the header ends, too lazy to read all of that | |
def bmp_to_csv_text(img_bytes) -> str: | |
out = "" | |
all_bytes = img_bytes.read(3 * DIMENSIONS[0] * DIMENSIONS[1]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def rotate(key: int, character: chr) -> chr: | |
if character == ' ': | |
return ' ' | |
character = character.upper() | |
v = ord(character[0]) - ord('A') | |
v -= key | |
v %= 26 | |
v += ord('A') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "ChrisJ/SpiralShader" | |
{ | |
Properties | |
{ | |
} | |
SubShader | |
{ | |
Tags { "RenderType"="Opaque" } | |
Pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Collections.Immutable; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace Discord.Commands | |
{ | |
internal static class CommandParser | |
{ |