This file contains hidden or 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
/* | |
The code responsible for crushing monsters to gibs in PIT_ChangeSector is this | |
// crunch bodies to giblets | |
if (thing->health <= 0) | |
{ | |
P_SetMobjState (thing, S_GIBS); | |
thing->flags &= ~MF_SOLID; | |
thing->height = 0; |
This file contains hidden or 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
from PIL import Image | |
with open("DOOM1.WAD", 'rb') as f: | |
contents = f.read() | |
# IWAD or PWAD? | |
wad_type = contents[0:4].decode('ascii') | |
# Get Lump Count | |
lump_count = int.from_bytes(contents[4:8], 'little', signed=True) |
This file contains hidden or 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 socket, os, mimetypes | |
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: | |
s.bind(('0.0.0.0', 80)) | |
s.listen() | |
while True: | |
conn, addr = s.accept() | |
with conn: | |
req = conn.recv(1024).decode("utf-8") | |
print(req) |
This file contains hidden or 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 openai, praw, time | |
#OpenAI credentials | |
openai.api_key = "" # put OpenAI api key here | |
#Reddit Credentials | |
cl_id = "" # put client id here | |
cl_sec = "" # put client secret here | |
pword = "" # put reddit password here | |
uname = "" # put reddit username here |
This file contains hidden or 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
package net.minecraft.world.level.levelgen.synth; | |
import com.google.common.annotations.VisibleForTesting; | |
import com.google.common.collect.ImmutableList; | |
import com.mojang.datafixers.util.Pair; | |
import it.unimi.dsi.fastutil.doubles.DoubleArrayList; | |
import it.unimi.dsi.fastutil.doubles.DoubleList; | |
import it.unimi.dsi.fastutil.ints.IntBidirectionalIterator; | |
import it.unimi.dsi.fastutil.ints.IntRBTreeSet; | |
import it.unimi.dsi.fastutil.ints.IntSortedSet; |