[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


what is this question even
>>
what is the problem here? are you burger education or something
>>
>>109143207
im with you OP idk what the fuck this is
>>
>>109143207
sounds easy, just "draw" text according to coordinates, what's the problem?
>>
I did this shit, the answer is HCMIDBO. Also don't worry, the AI bubble has popped and you will never actually get an account there for (((data annotation jobs))). If you did get an account and passed their humiliation ritual, jeets have already infested the gigs ;)
>>
>>109145801
>>109143207

import requests
from bs4 import BeautifulSoup

def decode_message(url):
# Get table from google doc html and extract text
html = requests.get(url).text
soup = BeautifulSoup(html, "html.parser")
lines = [
line.strip()
for line in soup.get_text("\n").splitlines()
if line.strip()
]

# Header row, hard-coded from google doc
start = None
for i in range(len(lines) - 2):
if (
lines[i] == "x-coordinate"
and lines[i + 1] == "Character"
and lines[i + 2] == "y-coordinate"
):
start = i + 3
break

if start is None:
raise ValueError("Could not find data table")

points = {}
max_x = max_y = 0

# Parse rows of (x, char, y) data
i = start
while i + 2 < len(lines):
try:
x = int(lines[i])
char = lines[i + 1]
y = int(lines[i + 2])
except ValueError:
break

points[(x, y)] = char
max_x = max(max_x, x)
max_y = max(max_y, y)

i += 3

# Fill empty spaces and assign characters
grid = [[" " for _ in range(max_x + 1)]
for _ in range(max_y + 1)]

for (x, y), char in points.items():
grid[y][x] = char

# Print each row
for row in reversed(grid):
print("".join(row))

decode_message(
"https://nigger_google_doc.com" # type the humiliation ritual google doc url here :)
)


I left the comments because they will ask you to explain your (((algorithm))), copy paste it as well because you won't pass anyway ;)
>>
>>109143207
What is it you dont understand?
you are given a URL to a document, your program is supposed to download it, interpret a set of characters & grid positions, then draw said characters on a grid in the terminal.



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.