#⌨coders-cave
1 messages · Page 107 of 1
how does that give joy lmao
the art of sarcasm
the art of no motivation!
the art of if you rely on motivation you will never get anything done
I've learned that waiting for motivation and inspiration is a shitty strategy and the only way to get stuff done is to just do it, even if you don't feel like it
nice pfp by the way 
always put comments bro
ok
Oh Frick oh no, feddy fazbar ber
Freddy fazbear bear*
so far i am not confused on any of my code (but sometimes i forgot what it does exactly)
i am good at organization
it runs
it gets the code for the event that the args specified from the source code (for the build)
it will check if the event exists (if it doesnt exist, return -1)
then it gets the parameters of the build and overwrites it with an argument (optional)
then it returns the result of the code
XDDDD
`> tells myself to JUST DO IT!!
doesn't have the motivation to just do it`
then why did you even do it in the first place
ps4 dreams?
hello fellow coders
Anyone here?
excuse me, could someone please direct me to the world-size mod?
no idea because this isn't worldbox help
what dreams
💀
~decode and ~encode using @bitter sedge
by map you mean dictionary?
oh its not lol
just tried C and wtf
why do you have to explicitly put the types like dude
you have to put struct or enum to declare a var that is struct or enum
That's helpful to use some times @next lotus
to me that makes complete sense ngl
but why do you have to explicitly type it tho
in java and c# we'd just have to languages language = English;
hmm fair
just incase you need a bible's worth of comments in your loop
It's a game on playstation. You can practically make a entire game on it.
really educational game
hm.. map.wbox encrypted? ihope its readable i coding a preview map app
Cool!
thats cool... but i just loaded .wbax i cant understand .wbox :(
it seems stripped
It's easely decrypted
@bitter sedge has ~decode and ~encode commands for it
but I can also explain how to decrypt it

YEAH BUT LIKE
its wbox
unless its just
encrypting decrypting
BUT I DOUBT
THAT'S GONNA HAPPEN
Well anyway. Working at the office without headphones is impossible
would not recommend
I think I am just gonna end work day for today and go to the gym lol
I forgot my headphones 
indeed
yeah, I'mma just head to the gym and work home a bit if I don't feel dead
interpreter tho
fair
Im the exact opposite
I cant code in peace
I get bored
Instead I turn on the loudest music possible and get drunk
Either on alcohol or caffeine
And two hours later forget what I did so I redo everything again
👍
Same, without being drunk
tfw rust analyzer is doing the worst job at getting types
ah i did that at work a cpl weeks ago
we just had beers and coded tipsy
did we get work done? not really
R.I.P powerbox
im thinking about making a chat app, what db should i use
i was thinking like discord with mongodb
or should i use postgresql
db for realtime messaging? thats gonna overheat your servers lmao
much better if store the messages in a dynamic array in the server you can get and stores messages from there
if you want to save the chat history in intervals then sure you can use a db for that
are you high?
i never said i was gonna use it for realtime
nope, you are
oh but you didnt say you wont either
im using websocket idiot
smh
the only time it'll be accessing the db is
a new message which happens once
secondly
a message fetch api
the messages are queued
to be written
that still sounds realtime
it is but im not like
fetching the db
every 0.5s
just once for loading up channel message
and the rest is ws
its even cached
like
the queue itself
smh
imagine having
1 time
message
where if you refresh
your history gone
not my goal
darn my internet being shit
imagine having an exam online but you're also required to be in class and your signal is shit in here
I made one with js, php and MySQL to learn ajax once
I don't think I made it efficiently
same
i made like
every 0.25s
it would do
a request
with the old XML thingy
lmao
it was very inefficient
Hello coding experts
I am here to propose you a problem I have been having with python
It involves the library of pillow
And web scraping
My problem is
I am trying to make a code that takes the raw image data of a gif from a website, then it gets a text from the header. But I have been unsuccessful
If anyone is willing to help me resolve my problem I could provide more details
- You needn't need to talk in such a fancy manner this is discord no matter coders or not we are all idiots
- Sure I don't have any experience in python so I cant do much but im sure pretty much anyone else here can help
Stack overflow also didn't help
Pls I'm desperate
I was hopeful that there would be some lifeless coder here to help me
@devs
Devs help me pls help me
Daddy mastef pls 
Pretty pls
🤣
tip number 1 for asking help. Tell what tf even is the problem
it's kinda hard to tell anything when I don't know shit what's wrong
I know the technologies used
so I can try helping
but not with the current information
+1
Step one: code goes to the website (example) https://folioscope.co/killer_qween/1657047
Step two: code gets the source code of the gif in the website
Step three: code opens the source as raw image data
Step four: code takes a specific text of data from the header except it doesn't do that bcs I suck at python
I will provide the actual code shortly
I am trying to get the text of the code below,
xmp:createdate2020-12-31T17:54:35+08:00</xmp:createdate>
from the source code of this url(and the variations of it depending on the id ...
Here is the question I asked on stack overflow
With far many information
Here
The stack overflow post has all the things I mentioned in it already so you can just read it first
Read the comments too
And thank you
@rose pawn
are you trying to get Headers data?
btw
when you open
it returns
an image/gif
no idea why you would like
read its content bytes to a BeautifulSoup
which data actually
you can just like
Press control shift QQ on Chromebook
why
Because it's the most amazing thing ever
pretty sure that just closes the tabs
which is just a keyboard shortcut
for chrome
If you press it twice, it shuts down your computer!
glad they made a shortcut for that, be a shame if there was a button made for that
lmao
Oh wow
Date
we're all cavemen here
So I can get the header without even getting the src first?
Tho I think the date there isn't the date in the header of the gif
It's date you have opened the site?
What I am trying to do is get the date from the header of the gif in the site
The date in the header of src file is the date gif was published
The date I'm searching for is in the files of this https://1b-f.s3.eu-west-1.amazonaws.com/a/114355-E06CC842-CCED-4C3C-86FC-2ACC6D5671A9-0-1609459352.gif
isnt it in Last-Modified
i think that's for something else
you wanna get the GIF creation date?
doesn't GIF contain that in its metadata
Yeah I think
I'm a bit confused
Which is the gif creation date there?
How do I get the metadata then?
I just had an idea for a game thats so good
it might make me relearn game development
What is it?
Ooh
it would make for a great rythm game
Interesting
plus its relatively easy to make
In fact its so simple to make I might not even use a game engine
but roll with just a graphics API
Wow
extra performance which is important a
and some cutimisability
fuck spelling that word
how do you do it
custi...
Customisability?
Yeah
no the autocorrect says its wrong
well either way
this is gonna be fun
even if I dont make it into a real game
Ok good luck
its gonna be fun to play it myself
what's your goal again
My ultimate goal is to get the date the gif was first published
Hey coding expert
I figured out how to take the "last modified" date
Which almost solves my problem but
If the gif has been updated since it was first published
Then the last modified date changes
Which is a problem bcz I'm trying to get the date it was first published
Which is actually in the raw image files of the gif
You can access the files by inspecting the source page
Press ctrl r and search "date" and you should find date:modified
The real published date is somewhere around there
Thanks rei for your help so far
Guys help mi
Rei help mi rei
Rei where are yu
i think rei answered how to get the date on it though
already
unless whatever rei posted was different from what they're looking for
A
I google the shite out of it
Why do you think I am looking for answers in worldbox God simulator discord server
Because I couldn't find help anywhere else
I would ask more questions on stack overflow but becthes kept downvoting me
Rei pleasss rei I'm starving for your wisdom arhrgrgrgrgeghhh
dude
its lie
like
3am for me
rn
Ok good morning
does the website have like
"published at"
in its document
if so you can just scrap that
then no way to know
But it exists
the file only contains data like
I just need to take it somehow
Sus
It's the same thing as the date in the src takes the place of the date seen in the website
In the src file you can find the un modified date
That's the real date
isn't the Date header supposed to mean your current time
like when you're making that request
You can also find the last updated date
And if the website has never been updated it gives you the publish date
The problem is some sites have been updated
But if you go the src link
You inspect the page
You open the file of the page
You press ctrl r
You search "date"
You can find the real date in line 1
That's what I am trying to get all along
Rei you there?
Rei?
Rei slept 
Good night rei
Ok did you check the file
im also on mobile
I cant do that today
when i asked for a screenshot suddenly you have alot of excuses
but
can't help
i don't know which part is that from
Well I also gotta figure out how to screenshot
Because my laptop is potoaot
What do you mean which part
From this
There is only one file you can open when you inspect it
Theekslalaeso
Look rei
oh found it
Oh cool
@rose pawn
its unethical
but works
i think i could've used
r.text.split() instead
but regex was the second thing came to my mind
so
i just
splitted the string into 3 parts
it'll split when it encounters a "CreateDate"
so i just get the middle of the splitted string
and then remove unwanted stuff
since the request text returns gibberish
and can't be parsed by bs4
it's dawn
Good dawn
Idk I only use it to steal code
dont we all hahaha
use it as a "reference"
e
not really
i just use it as actual reference
its hard to copy paste from SO in mobile
so ive grown the habits of just using as reference
any documentary on how to make mod using NCMS?
These are the definitions of what the structure of the mod looks like.
shouldnt be using it
what?
its not gonna get any updates any more
nikon stopped working on it
he did but he has started updating it again
bruh
sorry I didn't found that earlier
me when mini moding
👍
get well soon
I have 2 weeks left of like unpaid work that's just for my school, then I have 2 weeks of and I have paid work for a month at the same company. They'll probably want to take me for even longer though
so I'll be doing full stack web development for some time
Good luck
nice
Do you mind if I ask this question here?
just ask
don't ask to ask
unless its worldbox
go to #🌎general
if its worldbox mod
go to #🔧modding-talk
That is not a direct worldbox question but a code question
The reason I'm asking this question here is because World Box is achieving it.
And looks like i am not allowed to send a stackoverflow link
Okay i will move it here if it's not problem
yeah but
what's the thing
you wanna ask
if its not like worldbox directly
but a reference from it
is fine i guess
@limpid mantle
Hey rei
Ima try your code
Can you DM it to me or send it here as text
If you are on pc
But it's an image ;-;
literally this
How the world box provides pixel perfect when using zoom
I will try to explain in more detail
something called
canvas
i think it just renders the images on that focused perspective
in which it can just like
get the zoom level and resize the pixels based on that
oki
When camera zoom is 1f
hmm sending video is also not allowed
In short, there is no problem when the zoom I use is 1
When I use 1.31 zoom (For example), the view gets ugly
The reason it's like this is because I'm using the nearest filter. I have to use nearest filter for pixel art.
I want the map to look properly at different zooms.
when zoom is 1.0f, 1 unit equals 4 pixels(world is 320x180, screen is 1280x720) and there is no problem as there is integer scaling. but since I use zoom it is not possible to always keep the scale at the integer number.
Do you have any idea about this, Rei?
Yeah same
I just like observe and understand
Is there a chance anyone here knows how to use datetime module in python
2022-05-01T01:02:08 + 05:00
How can I only take the utc hour this is of
Or the same for day
There will be many of these dates and I want to sort them by hour or day or moth or whatever
i'm 99.99% you dont know how to google things
judging by how you are asking questions here
I feel like the documentation of whatever library you are using has an answer to all your questions
I know its boring to go through documentations but with some searching technices you could find things 10x faster
Use control shift QQ
I started some unity game 2 days ago as a beginner, so far not bad progress
Most of my time i spend rn is developing the game
What is it about?
just use the datetime module
there's a probability that the string is in a format datetime understands
okay found it
@rose pawn
datetime.fromisoformat
this take a string
and return the datetime
dont make it a big game
unity is much harder than it looks
its easy to make small games
but big games on unity are way harder than you think
HAPPY PRIDE MONTH
Ok so we doing parent jokes?
Fatherless
its really off topic
but
don't assume we all don't care about pride month
some of us do some don't
just because we didn't say it here
smh
100% programming related
I got 4 downvotes on stack overflow and my question got closed
Rei I will check your code thank yoy
because you don't know how to ask questions
i read a really good guide a couple of years ago
i forgot the link
but you should read one of them
even stackoverflow has a guide on how to ask questions which i guess you didnt read
Nah ppl on stack overflow are rude 😤
no you're rude for posting a bad question
lol
Nah they just hate beginners asking beginner questions
Sometimes the question askers dont search on google yeah but if they did and couldnot find then that sucks
they are but to minimize the effects you need to know how to ask questions
knowing how to ask questions is the most important skill for programmers
it's the whole basis for our work
aren't programmers all in a cult
why would someone take effort to give you information if you are not willing to take effort to search it up first and/or ask a question that can be answered without causing confusion which causes more effort
that's not cultish
you're just lazy
and none likes that
Understand the purpose but its painful
Do you mean like scripting based?
If otherwise i think i can make one
Sure scripting is hard but my game would sometimes use basic functions
And i already have an understanding in coding from roblox as i was a roblox developer
Not same coding language but can understand what to do or how
I hate when people get picky with their questions
Like
Im not about to write a 300 line question for an answer thats as big as 2 sentences
is there a script in mobile to unlock all traits?
where
Its not wb channel
#🚑help-chat maybe
But i think there is no such thing
Just go to files
And in game data
Change it
to?
i mean a big game
like v rising
the new game that just came out
its made in unity
gets 80 fps on a 3090
it should get around 130 at least i think
but it is early access and still not optimized
you will notice if you ever tried to make a game that's a bit complex
you wil get very low fps
unless you optimize with best practices
Hamza is your pfp nicolangelo or da vinci
My pc is considered extremely weak so ofc i wont go hard than my pc can handle
If i succeeded the game will be available for lot of low end devices
And V Rising is 3d and my main focus is 2d
2d isnot usually laggy
from that statement i assume you came from python
even worse
thatslua right?
Yea
lua is a garbage language for garbage programs
Ik
Ik
because the features are weird
makes it even more garbage
exactly
But gave me idea of how coding works
Roblox lua is almost like scratch but more practical and 3d
Well yeah
Iam good at Roblox lua so yeah thats why i assume different stuff
Roblox development became bit more painful so decided to move to unjty
So far not bad as a beginning
if you don't want to give 80% of your revenue to robloxc wise
and its own
i just don't make it pay to play
so its fair for everyone
i don't make gamepasses
i just make everything purchasable virtually in game
UNLIKE THOSE CASH GRAB
if i don't gain anything
roblox doesn't either
👍
win win
you can use
Most android games idk how tf do they make them as if it was random generated
vscode
for roblox
there's a Plugin and Extension that allows itself to bridge both app
I use vs code for unity
Well yeah
because vscode extensions helps you code faster
plot twist: they are
But faster to use scripts inside roblox studio editor
Instead of copying and pasting and sh**
i never do that
i swear
i actually learn the fundamental and concepts
Yeah same for me on unity
ah yeah
Been working hard for 3 days and today is the fourth
Thanks
It may be boring if you get burnt out without being able to bypass it or solve it
Rip
literally 24/7
so i just watch videos about stuff i already know
and laugh at videos where they try to oversimplify it for beginners
Alright
Nope its the owl house
oh
Alternate version of amphibia
They do have cross overs of amphibia in the owl house
Well not actual ones but just images from amphibia
interesting
sounds similar to milo murphy's law and phineas and ferb
where they're both related just not directly
what language does worlbox use?
k
Hello people and turtles
Rei!!!q1!1!1
It says invalid isoformat string
.
date = soup.select_one("#gif.borders") or ""
if date:
date = requests.get(str(soup.img["src"]))
date = re.split("CreateDate", date.text, re.IGNORECASE)[1][1:-6]
#date = date.text.split("CreateDate")[1][1:-6]
date = datetime.datetime.fromisoformat(date)
.
im not using #date = date.text.split("CreateDate")[1][1:-6] bcz it says no attribute of "text"
poor rei
Yeah Thanks rei for all your help so far
why is th
'2022-02-22T8:52:44+09:00' this gives isoformat error
however the ones that doesnt cause an error also doesnt change anything from the original date
Wait 🤨 🤨
It does work
It just doesn't assign isoformat version to the new date
Also this is still a problem
ok now ⬆️ that is the only problem
actually no, other problem is that when I view the day of 5 different dates that are in the same hour it gives 3 different days, sunday monday and saturday, which must be impossible, I think the problem is that dates are not considered in the same timezone
how can I make it that it transforms all dates I give to the code into the dame timezone and then I can sort them properly
and how can i fix this problem
reeeeeeeeeeeeeei heeeeeeeeeeeeeelpppppppppp
plzzzzzzzzzzzzzzzz
here are the dates
2022-02-21T18:38:50-05:00
2022-02-19T18:56:13-06:00
2022-02-20T18:50:37+01:00
2022-02-14T12:41:08+03:00
and here is what days these are on accorind to the code
Monday
Saturday
Sunday
Monday
doesnt make any sense since these dates are minutes apart
i see why you get downvoted on stackoverflow
What kind of dark magic is that
Mods go away
Where is rei
Would rei be mad if I tagged them
@reiiiiii come help plslzlzlzlz
Ohhhh rei is sleeping
Or is it, sleePING HAHAHAHAHA
Just kidding I would annoy someone who's sleeping
what in the actual fuck is going on in here
Why is everyone mods
Go away pesky mods
Don't chat here bcz when rei wakes up they need to see my messages
Our mods are so Chads they can code
someone is being lazy
Top 10 villian in anime laughing
Then help miiiii

I'm watching cs
can't
Watch ESL_CSGO's clip titled "LIVE: G2 Esports vs FURIA Esports - IEM Dallas 2022 - Quarterfinal"

can't miss shit like this
good idea
Hey mods don't chat off topic or mods might more you


If you see rei pls tell them I need their help
Rei help
Btw This is totally on topic
technically
Don't frogwg
why just why
why are you overriding
when you do the second line
just do like
r = requests.get()
date = r.text.split("CreateDate")[1][1:-6]
what does
"date" outputs
for fuck sake
im like
not always here 24/7
also those are what timezones do
also
if the output is different
what are your inputs
it works persistently for me
'2022-02-22T8:52:44+09:00' this gives isoformat error
When I try to turn it into isoformat
Now I only have two issues
issue 1:
datetime.datetime.fromisoformat("2022-02-21T8:12:45-06:00")
this gives Invalid isoformat string: '2022-02-21T8:12:45-06:00' error
same with this date 2022-02-22T8:52:44+09:00
issue 2:
I am trying to convert all dates into UTC time by using this code: date.astimezone(pytz.UTC)
import pytz first
but it doesnt work
if only someone whose name starts with r and ends with i and has e in the middle helped me
if they are avarible of course
You brought the fbi here
Okay
date = soup.select_one("#gif.borders") or ""
if frames:
date = requests.get(str(soup.img["src"]))
date = date.text.split("CreateDate")[1][1:-6]
#date = re.split("CreateDate", date.text, re.IGNORECASE)[1][1:-6]
date = datetime.datetime.fromisoformat(date)
date = date.astimezone(pytz.UTC)
date = (date.strftime("%c"))
import re
import datetime
import pytz
you do know
you're having a reference error
plus
where did you get the "soup"
i said
all
not partly
def get_data(id_):
url = "https://folioscope.co/blank/" + str(id_)
soup = BeautifulSoup(requests.get(url).content, "html.parser")
date = soup.select_one("#gif.borders") or ""
if frames:
date = requests.get(str(soup.img["src"]))
date = date.text.split("CreateDate")[1][1:-6]
#date = re.split("CreateDate", date.text, re.IGNORECASE)[1][1:-6]
date = datetime.datetime.fromisoformat(date)
date = date.astimezone(pytz.UTC)
date = (date.strftime("%c"))
return date
ok wait
from multiprocessing import Pool
import requests
from bs4 import BeautifulSoup
from PIL import GifImagePlugin, Image
import urllib3
import os
import re
import datetime
import pytz
def get_data(id_):
url = "https://folioscope.co/blank/" + str(id_)
soup = BeautifulSoup(requests.get(url).content, "html.parser")
frames = soup.select_one("#gif.borders") or ""
if frames:
frames = str(soup.img["src"])
with open('/tmp/fo.gif', 'wb') as f:
f.write(requests.get(frames).content)
"""frames = os.path.getsize('/tmp/fo.gif')
if frames > 0:"""
frames = Image.open('/tmp/fo.gif')
frames = (frames.n_frames)
date = soup.select_one("#gif.borders") or ""
if frames:
date = requests.get(str(soup.img["src"]))
date = date.text.split("CreateDate")[1][1:-6]
#date = re.split("CreateDate", date.text, re.IGNORECASE)[1][1:-6]
date = datetime.datetime.fromisoformat(date)
date = date.astimezone(pytz.UTC)
date = (date.strftime("%c"))
return frames, date
Data = []
if __name__ == "__main__":
with Pool() as pool:
for frames, date in pool.imap_unordered(
get_data, range(2104877,2104889)
):
if frames and date:
Data.append(frames), Data.append(date)
righr
just use
and then paste your code
and save
after that the url changes
copy that here
thats right i didnt use dictionaries
its easier this way okay?
if you are gonna run the code i recommend you erase "frames" part since that is pretty problematic
def data(p):
if p == 69:
print(Data)
else:
for i in range(0,len(Data),8):
print (Data[i+p], end= "\n")
?
import requests
from bs4 import BeautifulSoup
import datetime
def get_data(id_):
url = "https://folioscope.co/blank/" + str(id_)
soup = BeautifulSoup(requests.get(url).content, "html.parser")
date = soup.select_one("#gif.borders") or ""
date = requests.get(str(soup.img["src"]))
date = date.text.split("CreateDate")[1][1:-6]
date = datetime.datetime.fromisoformat(date)
return date
works normally
not sure why yours wouldn't
also
p
okay
@rose pawn
note i didn't change anything
on the test.py
it works
no idea watchu mean
okay
'2022-06-04T1:01:31+01:00'
turn this to isoformat
datetime.datetime.fromisoformat('2022-06-04T1:01:31+01:00')
did it work
okay you can alter it
how can i automate that
there is gonna be hundreds of flawed dates when I run the code in the big sclae
i cant manually alter them
plus its really complicated to alter strings
@MzxzM#8762
not really
just add a single 0
if the number after the T
is only length of 1
iso = '2022-06-04T1:01:31+01:00'
iso_split = iso.split(":",1)
if len(iso_split[0].split("T",1)[-1]) == 1:
num = f"0{iso_split[0][-1]}"
iso_split[0] = f"{iso_split[0][:-1]}{num}"
iso = ":".join(iso_split)
datetime.datetime.fromisoformat(iso)
i changed the bottom to
T12
and it works normally
not sure how you got
a weird result
from the website
this doenst work
date = soup.select_one("#gif.borders") or ""
if frames:
date = requests.get(str(soup.img["src"]))
date = date.text.split("CreateDate")[1][1:-6]
#date = re.split("CreateDate", date.text, re.IGNORECASE)[1][1:-6]
iso_split = date.split(":",1)
if len(iso_split[0].split("T",1)[-1]) == 1:
num = f"0{iso_split[0][-1]}"
iso_split[0] = f"{iso_split[0][:-1]}{num}"
date = ":".join(iso_split)
datetime.datetime.fromisoformat(date)
date = date.astimezone(pytz.UTC)
date = (date.strftime("%c"))
"doesn't work"
what does that mean
its not explanatory
like
what doesn't work
anything?
side effect?
AttributeError: 'str' object has no attribute 'strftime'
TypeError: 'str' object is not callable
AttributeError: 'str' object has no attribute 'astimezone'
yeah
like
did you forgot something?
maybe a variable assignment??
just look above it
its in plain views
ohhh
wow it almost worked
but ValueError: Invalid isoformat string: '٢٠٢٢-٠٦-٠٤T٠٥:١٠:٠٢+03:00'
why is it like this
the date depends on the language of the poster
geat
great
now thats impossible to fix
python moment
python moment
interpreter moment
no like
writing
literally all they had to do
is copy paste
why is it taking like 6m
there were so many unnecesseary code okay
slow python programmers scripters writing their essay language
when someone said
all
they mean
all
don't cut anything
a small detail matters
page doesn't exist
the interesting thing is it does
because
dude
m o m e n t
@rose pawnwhat are you trying to achieve
wait im confused
what are you trying to achieve by this url
what's the problem
bad design
go to the page
from the website end
im so sad
xmp:CreateDate٢٠٢٢-٠٦-٠٤T٠٥:١٠:٠٢+03:00
this is the source
rei what can i do
does datetime have like a datae trnaslation thing
wtf is this even a real language
'٢٠٢٢-٠٦-٠٤T٠٥:١٠:٠٢+03:00'
i cant translate it
it looks like arabic??????????????????
bill microsoft do you
