Share
Explore

Ercia-"Excuse me, may I have some Extra Sauce please?"-Lee

Last edited 26 days ago by Eddie Coda

HAHAHA okay.. so...

We all have issues...

mine is leaving people on read while I prepare something cool for them....so...yeah. sorry 🥲

NOWWW BEFORE YOU RUN THE CODE...I made this presentation for you.

Enjoy👈(゚ヮ゚👈)

Here’s the file:
EricaExtraSaucePleaseLee.ipynb
4.9 kB

Note to self:

next time, don’t leave her on read for three days, or she might mistake you for one of your code comments – mostly useless and ignored.
Instructor: Eddie MF Coda, Assistant Professor of Computer pseudoScience, San Diego State University
WU-TANG

Overview

Sending a 33-bit binary string, "1111000000011000101101101101011" ok.... you're either a genius, or setting me up for a wild goose chase, or you've got too much time on your hands. Either way, decoding it is the same deal. Lets feed that binary string of unspoken digital affection into the function, and pray it's not the number for the rejection hotline.
def decode_binary(binary_string):
int_number = int(binary_string, 2)
# Convert the integer to a string
return str(int_number)

bin_message = '1111000000011000101101101101011'
drum_roll_pls = decode_binary(bin_message)
print(f"welp, decoded: {drum_roll_pls}")

welp, decoded:

Aiiiight:

ngl when I counted 33 I got confused at first...

Well... I guess we should continue this and make a secret message inside joke immediately. Here’s the secret:

It’s all in binary MUAHAHAAH
def encode_binary(phone_number):
int_number = int(phone_number)
# Convert the integer to a binary string
binary_string = bin(int_number)[2:] # We slice off the '0b' prefix
return binary_string


my_num = 6191111111
hehe = encode_binary(my_num)
print(f"welp, here's my bin numbner: {hehe}")

welp, here's my bin numbner:

Now, we have this other binary:

01110100 01100101 01111000 01110100 00100000 01101101 01100101 00100000 00111010 00101001

Leveling up from casual binary number dropping to extraaaaa long hidden messages?

I think I know the way, let's take control of things.

def long_ass_binary(binary):
# checking if I've got a pulse
if len(binary) % 8 != 0:
raise ValueError("this binary saga has missing pieces, or maybe I just can't count")

# slicing the binary into 8-bit ASCII chunks
characters = [binary[i:i+8] for i in range(0, len(binary), 8)]

# translating binary gibberish into sweet nothings
decoded_message = ''.join([chr(int(char, 2)) for char in characters])
return decoded_message

long_bin = '01110100011001010111100001110100001000000110110101100101001000000011101000101001'
hiddenmsg = long_ass_binary(long_bin)
print(f"Unveiling the hidden message: {hiddenmsg}")

DRUM ROLLLLL:

Unveiling the hidden message: text me :)

I Should have seen that coming...

damn why am I nervous all of a sudden...

Share
 
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.