#ot2-the-original-pubsta
652 messages · Page 90 of 1
same, how else should it?
a circle has constant curl, yes
only 14 characters blessed with curl/circle
hmm i think its supposed to be
i love it when google drive tells me that my own python script is a virus
!server 
https://open.spotify.com/track/02xwA3Ej9NPetftp9V7VZ3?si=853f8b194005442c i really like this song for some reason. aaaaah so relaxing
cute
this is my discovery today https://open.spotify.com/track/7cSZP2ugBFSBbWUiEYwAkC?si=RlGGYcTFQAi6GZhVljDXbg
photons not fotons
futons
||fuck||ons
It is almost Halloween!
woo!
Is Sir Lancebot always online or something??
Oh, it runs on the server huh
Your computer's gonna burn if you run it 24 hours.
-a day
rate my the project out of ten https://github.com/WolfPack9108/K-means
?????
I think they have servers :/
ask a statistician
duh why trolling 🤣
my ot does not exi- 😔
Terrific. Golang devs live without try catch exceptions
their code is full of verbose error catching after every action, all the errors are returned in tuples as secondary func output!
They have idioms to fight it though
lmao nice idea
its more verbose but it makes more sense
yeah, it makes sense in their case. with compiled language they have more predictability that allows them having it
we do have panic and recover tho, but the go creators purposely didnt want people to use it (avoid it at least)
one of main things I like about try catch thing in python...
that it keeps main code... as happy path clear of any error handling, all error handling happens somewhere at the end or somewhere else.
it looks just more readable
in golang case I guess we have a choice only to allign the happy path at the left to reach something similar
in languages with try / catch patterns, the error handling part would happen at the very end, meaning you can put more than one pieces of code that may error out and catch it at once. it does look more readable, whereas in go you'd have to check if errors at every step. in python:
try:
return_value = job()
return_value2 = job2(return_value)
except JobError as e:
handle_error(e)
and go:
returnValue, err := job()
if err != nil { handleError(err) }
returnValue2, err := job2(returnValue)
if err != nil { handleError(err) }
however, it makes it easier to ignore errors. in python:
try:
return_value = job()
except:
pass
in go:
returnValue, _ := job()
try:
return_value = job()
except:
pass
and to ignore even language syntax errors
that's why it is the biggest anti pattern #1 ;b
right, in that case it just doesn't make sense. why would one want to ignore a syntax error unless they're using eval on arbitrary input
but that would only happen in interpreted languages
anyway, if you want to ignore specific error (which we always want being specific), python offers... readable and compact alternative, although even here you could try to ignore everything with pointing to suppress Exception
from contextlib import suppress
with suppress(FileNotFoundError):
os.remove('somefile.tmp')
however, it makes it less readable if we're handling an error specific to a job when we have multiple things to do:
try:
one()
two()
three()
except OneError:
pass
except TwoError:
pass
except ThreeError:
pass
in the above case it's more readable to handle the error after each job, but that would just be the same as go
try:
one()
except OneError:
pass
try:
two()
except TwoError:
pass
# etc
err := one()
if err != nil {}
err := two()
if err != nil {}
err := three()
if err != nil {}
from contextlib import suppress
suppress(BaseException).__enter__()
# full code
suppress(BaseException).__exit__()
🧠
while we're at it: https://github.com/gautamkrishnar/tcso#readme
lmao
try:
one()
two()
three()
except (OneError, TwoError, ThreeError) as err:
raise MyAppException from err
or we could handle all errors at once in some cases ;b
or just regather them as your own app exception
err != nil does just that, you can also err == package.SomeError || err == package.OtherError. but your code is only if we're handling those errors together
i think in rust you return a Result enum variant which can be either Ok or Err and then you have to pattern match against that
but python's in operators amazing so you don't have to a==b or a==c or a==d
doesnt rust have like error assertion or something
wdym
nvm maybe it's another language
so you can either return Results or you can panic!
what's the most minimalistic to assert smth in golang tests btw?
I like using just assert in python
assert Something == WithSomething
always available ;b and verbose enough to find the problem
@assert vinam == c++
vinam == void* for now
no
yes
so we can catch the exception directly from the enum :pog:
lol
go doesn't have assertions. but why would you want it though? assert in python is just syntax sugar and I barely ever use it apart from unit tests. go also has many things that differ to other languages practices: https://golang.org/doc/faq#assertions. but if you reaaally want it: https://pkg.go.dev/github.com/stretchr/testify/assert
xD exactly for testing
everything begins and ends with testing
I went even further, my coding begins with building CI/CD pipeline
TDD isn't always that good
I am not exactly following TDD to... all specifications
but still, it has quite great point. Build your software with testing in mind in advance
I start with writing infrastructure code, building the pipeline
packing my application to containers, running unit and integration tests
it is all just makes better final product and allows me to have less strain on remembering how to deploy things (because everything is automated)
damn
hey
hello
hey
TDD depends on the nature of the project
but usually it is mostly used because it fits to almost anything
if for example your project cant be checked through tests alone, then probably you need to choose BDD
automation is both amazing and annoying
im drinking coffee and it tastes good
the matter of having the right tools. once I learned the full package of necessary tools, it became certainly amazing.
the right tools for the right job is usually the go to choice unless you wanna live on the edge
DevOps is really fresh, it is already living on the edge
among its instruments is certain competion, which will win
behaviour driven? how does that improve upon tdd?
there is also MLOps which i am interested to learn. i dont have time though. school succs
for example among Configuration Management tools, I like Ansible pretty much. in comparison to other similar tools, it wins really strongly IMO because it is agentless and decentralized-serverless.
it covers and borrows the principles of TDD
https://en.m.wikipedia.org/wiki/Behavior-driven_development
i still wonder why my teacher on highschool mentioned this kind of things. 🤔 probably because he expects some of us will learn programming in the future which I did. Still noob though lol
In software engineering, behavior-driven development (BDD) is an agile software development process that encourages collaboration among developers, quality assurance testers, and customer representatives in a software project. It encourages teams to use conversation and concrete examples to formalize a shared understanding of how the application...
Oh well. i havent finished my coffee yet.
it looks to me like TDD plus natural language, user behaviour and... more descriptive I guess
It is like TDD is the dough of the pizza and the other things are the toppings
Speaking of tests
Does anyone know of a gui project with testing done
I got one at work and i dont even know how to start testing tkinter shit
That's why I don't like to write tests >:(
Sometimes it's impossible to implement tests
probably test the inputs and outputs. the gui itself is tricky to test
because sometimes there is no need to test it and let the users tell u there is an issue
dunno. just my observations on some stuff like window managers
Legit thought the second link was legit for a moment
Like a github.com link
im not gonna trust users to report things to me tbh
Would it be disrespectful/weird to wear a shirt that says ‘Captain’ to MEPS? 🤔
will someone join my server and leave?
no
yeah, that is 200% advertising
no
import discord
from discord.ext import commands
intents = discord.Intents.default()
intents.typing = False
intents.presences = False
TOKEN = open('token.txt', 'r').read()
bot = commands.Bot(command_prefix="lk!", intents=intents)
@bot.event
async def on_ready():
print('Loki In Charge as @{0.user}'.format(bot))
@bot.command(name="hello")
async def embedm(ctx: commands.Context):
embed = discord.Embed(color=0x00ff00)
embed.title = "Hello!"
embed.description = f'{ctx.author.mention},Ok! Maybe Boy or girl!'
await ctx.send(embed=embed)
@bot.event
async def on_message(message):
if message.content == "hello":
await message.channel.send(f"Hey Man! Whats up?{message.author.mention}")
await message.author.create_dm()
await message.author.dm_channel.send(f'Hi {message.author.name}, Hope you are Fine!, Isnt? {message.author.mention}!')
elif isinstance(message.channel, discord.channel.DMChannel) and message.author != bot.user:
if message.content == "hello":
embed = discord.Embed(color=0x00ff00)
embed.title = "Hello!"
embed.description = f'{message.author.mention},Ok! Maybe Boy or girl!'
await message.dm_channel.send(embed=embed)
await bot.process_commands(message)
@bot.event
async def on_member_join(member):
await member.create_dm()
await member.dm_channel.send(f'Hello {member.mention}!! Welcome to Our Discord Server!')
await bot.process_commands(member)
bot.run(TOKEN)
seee
full code
@jade bolt
!e
!eval [code]
Can also use: e
*Run Python code and get the results.
This command supports multiple lines of code, including code wrapped inside a formatted code block. Code can be re-evaluated by editing the original message within 10 seconds and clicking the reaction that subsequently appears.
We've done our best to make this sandboxed, but do let us know if you manage to find an issue with it!*
!e
import discord
from discord.ext import commands
intents = discord.Intents.default()
intents.typing = False
intents.presences = False
TOKEN = open('token.txt', 'r').read()
bot = commands.Bot(command_prefix="lk!", intents=intents)
@bot.event
async def on_ready():
print('Loki In Charge as @{0.user}'.format(bot))
@bot.command(name="hello")
async def embedm(ctx: commands.Context):
embed = discord.Embed(color=0x00ff00)
embed.title = "Hello!"
embed.description = f'{ctx.author.mention},Ok! Maybe Boy or girl!'
await ctx.send(embed=embed)
@bot.event
async def on_message(message):
if message.content == "hello":
await message.channel.send(f"Hey Man! Whats up?{message.author.mention}")
await message.author.create_dm()
await message.author.dm_channel.send(f'Hi {message.author.name}, Hope you are Fine!, Isnt? {message.author.mention}!')
elif isinstance(message.channel, discord.channel.DMChannel) and message.author != bot.user:
if message.content == "hello":
embed = discord.Embed(color=0x00ff00)
embed.title = "Hello!"
embed.description = f'{message.author.mention},Ok! Maybe Boy or girl!'
await message.dm_channel.send(embed=embed)
await bot.process_commands(message)
@bot.event
async def on_member_join(member):
await member.create_dm()
await member.dm_channel.send(f'Hello {member.mention}!! Welcome to Our Discord Server!')
await bot.process_commands(member)
bot.run(TOKEN)
@jovial island :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 1, in <module>
003 | ModuleNotFoundError: No module named 'discord'
!e
import os
@jovial island :warning: Your eval job has completed with return code 0.
[No output]
lol if I sent the github link it doesnt have da docs
ah yes
well, this is depressing... Apparently I've only been in this server for a day 
!user
You are not allowed to use that command here. Please use the #bot-commands channel instead.
youch
don't think so
"language apart from go" lmao
I just put a 100ms sleep in a program so that things happen in the right order... I feel dirty
concurrency mess I'm guessing?
not really - it's a gtk application and there's probably some kind of timer in another thread. it's not my program and the other threads appear to be blocked/idle while the main thread sleeps, but clearly do something in those 100ms
First time I've disliked python a lot was just now...
I just printed 14 pages accidentally because instead of typing console.log(first_elem) I typed print(first_elem)
lol
print() does actual printing in JS? That's pretty funny.
also, please indent your code
No one likes to read code that isn't
Happened with me. Yes.
Yes. It opens print page bar
I was once so fucking confused that what the fuck is happening
F
It was because I had just copied that cause I cut it out while debugging trust me I can't not indent from programming in python for multiple years.
Yes, that's what I was saying, I'm teaching myself js and from instinct from coding in python for so long instead of typing console.log I typed print thus printing out the pages.
hello guys
I am coding this event input leaderboard thing
and I am stuck at the moment, using python
is anyone down to help
i think its just how the lemonsona works
because it does
printing as in the printer?
as in physical paper?
oof
Yup…
a big beard
@plain granite
ok so of course it wouldn't compile in some languages, but that's how it is for most static languages

such as? there aren't many i can think of that would let that compile
a char is a size of integer and you can convert (in some cases lossily)
a string (c calls it a char *) is a collection and you cannot convert
C, C++, I'm sure rust has a version of it aswell, same with go
it's just coercion lol
char in rust is not an int type
you get the idea
Doesn't rust use u8?
substitute it with other types if you wish
the syntax wouldn't compile on rust anyways lmao
yeah, but you can't add it to u8, you have to cast it
such as? i can't think of any
"char" in rust is not equivalent to the concept of "char" in other languages
Char typically refers to a byte, but in rust it's a unicode scalar.
The equivalent type in Rust would be u8, not char
i think it's a unicode scalar, but i'm just nitpicking
ok, i guess rust is an exception, but other languages work like that
Rust still does work, but only with the type which is actually analogous
that's because their char type is basically just a reskinned u8
@radiant socket here you go
well yeah. he basically said "you can pass a u8 into a function othat accepts a u8"
ok, well java also has parameter coercion
does it?
yeah
can you show me an example?
so does C#
C# does allow defining implicit conversions
Not sure about Java
Extending an int to a larger size and/or a float is walking on the border of "Yeah, it technically is a coercion, but come on" though
yeah, a lot do widening conversions like thata
public class Main
{
public static double coerce(double x) {
return x;
}
public static void main(String[] args) {
System.out.println(coerce(4));
}
}
there
that's a working java example
don't judge my code 😭 i dont do java
afaik java only allows coercion from char to int to float to double
^there you go
Yeah, that's what I'm talking about. Technically you'd call that a coercion, but it's really just... it's very, very far removed from coercing a string to an int
oh, and the byte short long thingies too ig
Oh, java also coerces to string on +
oh right
But yeah, these are the very basic conversions that are rarely problematic. Except for the string one, I prefer Python's approach
it doesnt have a f-string equivalent so its handy 🤷
Yeah fair
i think c# has something like f-strings?
yeah it does
Yeah, $ for interpolated string literals
package main
import "fmt"
func coerce(x float32) float32 {
return x;
}
func main() {
fmt.Printf("%T\n",coerce(5))
}
here's one in go
Again, it's the same
@radiant socket as you can see it will compile on most languages
Extending to a different numeric type is the most "ackchyually" coercion of all coercions
fair
but then again the original point was statically typed languages do more coercions in general, not just widening conversions of numbers
whatever ¯_(ツ)_/¯
widening numbers are pretty much the essence of coercion
if you say so ¯_(ツ)_/¯
wait
I don't understand why u have the same types for the return value and the parameter of that coerce function
isn't that useless
or is 4 not a double
right
so can't u do (double) 4
or 4.0
the point was that ints get coerced to doubles implicitly
@rugged portal 🥳
Yeah sorry, I see if you wanna leave dude
It needs to download first
Its my fault to have too many things on my plate so
ok then maybe we can finish this one?
fast internet!
ok lets go then while I got you here hehe
So we have the functions, but the one with average need to be N=28
and then we somehow need to get the results from different functions into a new function tabell(vaxthusgaserdata)
im clueless hehe
When is this due anyways?

tomorrow before lunch
yepp xd
chaos
I've had so much in school so I really coudln't get to this before a couple days ago
and a bunch of things outside school happend so yeah
For sure
So im guessing its "just" to forst print the header, then the -----, then more headers, then info then ===
"just"
Judging on this we would need to find the longest string an make a table based off of that.
I mean maybe we can make it look like a table using format?
oh maybe that's wrong then
i odn't know
I googled on how to make a table wihtout modules
But I think that's th eonly way
Is this good enough?
!e ```py
table_data = [
['a', 'b', 'c'],
['aaaaaaaaa', 'b', 'c'],
['a', 'bbbbbbbbbb', 'c']
]
for row in table_data:
print("{: >20} {: >20} {: >20}".format(*row))
@rugged portal :white_check_mark: Your eval job has completed with return code 0.
001 | a b c
002 | aaaaaaaaa b c
003 | a bbbbbbbbbb c
yeeah for sure!
and I can add the lines and stuff
and the header and center it somehow
Baby steps
so done ig
Livsmedelsindustri 936 845
Metallindustri (exkl. jarn- och stal) 1319 1121
Kemiindustri 2103 2022
Ovrig (gruvindustri travaruhandel m.m.) 2710 2402
Massa- och pappersindustri samt tryckerier 2613 2272
Raffinaderier samt distribution av olja och gas 2206 2333
Mineralindustri (exkl. metaller) 3065 2659
Jarn- och stalindustri 5584 5434
😂
Yeah but over that there's some text "Utsläppsnivåer av koldioxidekvivalenter (uttryckt i tusen ton) inom olika branscher under åren 1991 till 2018."
centered over the table
?
in the screen shot
u can just paste in what I wrote in swedish heh
its that long text over the headers
naahhh your goood
You can also see it's sorted on avg price lol
covid, a pc and 6 months
I started python 6 months ago but i already coded some things in PHP
how old are you?
i wished lol
Well maby not in coding since in our school we're forced to also study our own language.
And if you happen to suck at it you basically can't do any education :)
whaat
but that's a great thing tho about this buissnies
you don't need a degree
make a good portfolio and you'll have job offers everywhere you look
I have a freind who taught himself coding, he works in copenhagen now and earns 5+k euros a month as his first job
no formal coding education
Oh btw i found some old code of mine from before i learned python
function firsterr(array $num, int $pr): int {
$err = 0;
for ($i = $pr; $i < count($num); $i++) {
$encc = false;
for ($j = $i - $pr; $j < $i; $j++) {
for ($k = $i - $pr; $k < $i; $k++) {
if ($num[$j] + $num[$k] == $num[$i]) {
$encc = true;
break;
}
}
if ($encc) {
break;
}
}
if ($encc === false) {
return $num[$i];
}
}
return $err;
}
``` so don't feel too bad 😂
hahah that looks crazy xD
Ah y know with me it clicked one day
I hope that happens to me too!
You start learning about functions and objects and if your are busy with those you just learn alot
yeah after this assignment i wanna learn "for real"
I recommend learning functions, objects and OOP
import csv
with open("./vaxthusgaserdata_3.csv", "r", newline='') as csv_file:
csv_data = list(csv.reader(csv_file, delimiter=";"))
def func_max_min(input_list: list) -> tuple:
min_val, max_val = input_list[0], input_list[0]
min_year = csv_data[0][1:][0]
max_year = csv_data[0][1:][0]
for year, item in zip(csv_data[0][1:], input_list):
if item > max_val:
max_year = year
max_val = item
if item < min_val:
min_year = year
min_val = item
return (min_val, max_val, min_year, max_year)
def avg_co2(input_list: list, N: int) -> list:
def chunks(lst: list, n: int) -> list:
for i in range(0, len(lst), n):
yield lst[i:i + n]
result = list(chunks(input_list, N))
years = list(chunks(csv_data[0][1:], N))
return ", ".join(
[
f"{sum(r) / len(r)} (avarage of years {'+'.join(year)})"
for r, year
in zip(result, years)
]
)
headers = ["name", "min_val", "min_year", "max_val", "max_year", "Model 1991-2018 (avg)"]
print("{: >60} | {: >10} | {: >10} | {: >10} | {: >10} | {: >20}".format(*headers))
for row in csv_data[1:]:
numbers = list(map(int, row[1:]))
min_val, max_val, min_year, max_year = func_max_min(numbers)
data = [row[0], min_val, min_year, max_val, max_year, avg_co2(numbers, 28).split(' ')[0].split('.')[0]]
print("{: >60} | {: >10} | {: >10} | {: >10} | {: >10} | {: >20}".format(*data))
thaaanks man
hmm
I get the avg before the name
but I think that a Jupyter issue cause the string looks right
wut?
That is bcs your screen is too small lol
yeah I figured xD
Yeah It doesn't make sense to me at all
that solved it! Thanks! ❤️
So dude, I hate, really hate to ask but... could you help me with one or two more depending on your download?
I did it in record time so.
doubt
Do you know plotting?
I'm a quick learner
... do we need to use plotter for that?
Is this also due for tomorrow?
The funciton name is plotta_data(vaxthusgaser)
Yes 😦
But If you don't want to do it
I ll leave it blank and I think I can squeeze out an extra few days
this hand in is to other students, then we can change a few things and then its the hand in for grading
Tbf this one is doable, you should look into it, it's not that late yet.
I think you could solve this one in an hour tops
Yeah It looks super hard, I have never done any plotting or something
You basically need to pass the lists in the function object then print it to an img.
If you can't help I will for sure try! But I have somethings with my family members I have to help them with tonight
There are tons of examples online.
Yeah sounds easy when you write it like that haha
Haha, no but i've been coding since 9 am now so it's me time now :)
Ok dude, Thanks for the help. Wanna answer my friend request? you seem nice, maybe we can play a game or something some day
no pressure
Sure,
I really appericiate your help so much, I can barely describe
Also if you deliver these results you will likely get some extra time..
might ACTUALLY save my studies
Sure
there's been things outside of school happening which I couldn't control really so
thanks man
Atleast i can help someone make their studies instead of my own😂
I will see If I can make a try tonight. Otherwise Ill be in here again begging for help on sunday haha 🤣
Sorry my man, hope you can get to it! If its something I can help with I will! I'm used to write business english and long papers haha
*after my hand in heh
Enjoy friday! I hope to hear from you 🙂 Cya!
You too :)
Hahaha english is not the issue, it's dutch unless you are good with that hehe
haha, sorry, not my strong suit xD
Really? Huh weird.
👋
@grim seal i know i keep bothering you about this (sorry
) but can you just confirm this is right? (if im hosting a web AND mail server on my network)
the mail bit is tripping me up
uhhh
Is that how MX works
yeah that should be right
good question
What a weird record
oh
NS and MX and a few others cannot point to CNAMES
Okay, that's just stupid at that point
I can see why NS
But not why MX cannot point to a CNAME
like?
good reason
where the two blacked out ip's are the same
it's because MX records should resolve backwards as well
ah makes sense
Does hiding the IP do anything? Isn't it public anyways
a lot of email relies on being able to resolve a domain name from an IP, CNAME breaks that
I like it that way
Isn't that what RDNS is for?
lol ya
it is, and currently it isnt even my ip so i dont know why im bothering lol
yes, but if you RDNS then you'll get back one of two values, do you use the MX or the CNAME pointer?
Well just make your RDNS return one record and not two?
is that right now?
Or is that a bad thing
no, RDNS should only ever return 1 record
but which do you return
it's similar to the reasons why CNAMEs do not work at the root
if a CNAME RR is present at a label then no other record data should be present
and it also just isn't great to have mail servers recursive resolving to high heaven
So how can RDNSing that IP can return two records
If RDNS is only ever supposed to return one
well the IP will be valid for mail.whatever.com as well as whatever the CNAME points to
it means you have to update the ip in both A records (mail/web) tho if it changes right?
whereas for simplicity it should really be one, and the returned value should be a label, the label matters more than the IP in some scenarios for MX
yes you would need to update the A
is this right now?
eventually ALIAS RR might exist
and then that'd even work on the apex
Alias RR Type (Internet-Draft, 2017)
expired in 2017 though
some DNS providers might implement it
it's basically a standard for CNAME flattening
and with that you could have an MX that points at an ALIAS
Authoritative name servers with support for ALIAS records MUST
support both A and AAAA materialization. When an authoritative name
server receives a request for a name, and the zone contains an ALIAS
record at that location, the authoritative name server MUST respond
as follows:
The server will respond with one or more A records (for a QTYPE A) or
one or more AAAA records (for a QTYPE AAAA) obtained by either: *
executing a recursive query for the ALIAS content or, * returning a
previously cached response.
If the recursive query returns an NXDOMAIN response, then the
authoritative name server MUST return an NXDOMAIN response as well.
it'd be nice to have a standardised ALIAS but no one desperately needs it
joe please 😂 a yes/no/idk would help greatly lol
yep
oof
that's a choice
if you actually want to use that domain for email in the future, don't learn SMTP on it
wdym?
if you start playing around with SMTP and don't get it fully right then email servers will blocklist your domain and IP
and it's almost impossible to rebuild that
get a burner domain and IP if you want to play with SMTP
ive installed an SMTP server locally and am writing scripts that hopefully communicate with it to learn locally before expanding
so if i block my own IP i can just delete the entry
if someone like Microsoft or Google block you then you can't use that domain anymore
wouldnt testing it locally mean i dont deal with them yet?
locally is fine yeah
just don't leak SMTP onto the public web
ill try not too lol
and ill really try to not accidentally implement an email proxy for anyone to use (which ive heard is more common then i think)
cant i just proxy messages from my own custom email address ONLY
so noone but me can use it?
yes, but you need proper authorization for that to work
yeah that fine, i can make... something that will work
a public/private key perhaps
Does this work on Windows or Linux only ?
https://github.com/thombashi/tcconfig
the faCtOrY mUst Grow
exactly!
What game is this?
factorio
factorio
Thanks
Looks... normal? I'm not sure what to say besides that
factorio
factorio
fair
factorio
it is already past midnight, dear god
I thought I played for like an hour max
I could watch trains all day long
Thank you 158
always more
That is so fetch
this game's great
Lmfao
I can't play factorio alone those things scare me even if I am armed
i have not tried playing factorio
cant relate
i guess i will buy it
Honestly I'm more scared by trains than bitters
If it gets too hairy and I cannot kill them in time, I just do a artillery launch
It will destroy some of my buildings but I have drones, sooo
I wonder if there are death counts somewhere
Honestly I think the train damages are way too high
I have like three MK. II shields and the best armor and they still destroy me
U r far into game
60h of gameplay
Lol use train to kill those bitters
this is a LOT
on which game btw
nvm factorio
gotta check out
need to get rid of my genshin addiction
by finding another addictive game
factocool
i like when games let me instate a dictatorship supremacy and then commit genocide
rimworld go brrrrrr
lesgo
commit genocide sounds good
i wish genshin gives me more freedom
i want to kill every npc
or u can get a bethesda game then quick save and murder everyone on the town then reload
mmm
sounds good too
just kill timmy's birds
elemental burst the heck out of them
i always do that
who doesnt
i get an easy commission
me
for killing timmy's birds
and killing timmy's ducks
i killed timmy's mama
i killed timmy's 10th gen ancestors
okay im pretty sure im at the point of trolling again byebye
i wish they let me to, and get extra wuest
nah, doesnt everyone do that
i killed timmy's son
at least we are not like the other trolls that really disrupt shit and become an annoyance to mods even to disrespect them lol
but imma head out. im reading an article and u dont wanna read what im reading
bet
perhaps
send me, bet
im reading weathering with you's novel because i have too much time to waste
bet
spicy
dark mode when
i dont use dark mode on PDFs ¯_(ツ)_/¯
i prefer the original format
otherwise it becomes unfaithful

this vadar one's great haha
jokes on you i cant even read that lmao
what is this an image for ants?
jokes on you i study microbiology
goodnight zzz
well maybe u. it is 12AM here
hmm i guess the earth is flat too. maybe
most likely
baii
It's 6 pm here
you live in the wrong timezone
And what's the wrong time zone
the one you live in
its 11am yall are buying into fake time made up by BIG TECH smh
no thats what BIG MEDIA wants you to believe
europe aint reak
look at briish food its like an alien tried to copy human culture and then came up with nonsense like WATER SANDWICH
jellied eel
what is going on here 👀
That's just Brits, they're aliens, as you say, but the rest of us Europeans are real!
zucc hometown 😂
im sure thats just BIG PHARMA or BIG TECH or BIG CHUNGUS

I give you big catto
lowkey a perfect ellipse lmao
https://www.desmos.com/calculator/oujgafbikq
lol
Yep. He's lying on a circular mat. Perfectly
I remember reading that cats like to lay on contrasting objects
like things that stand out from what they're on top of
Well, he doesn't seem to mind being basically the same colour of the mat and the table
I have photos with the other cat in the box. But my nibling is also in the box, so I'm not gonna post it
I'll send the shipping label
yea cats like mice
i knew BIG CATTO was behind all of this "timezone" lie
Of course. Who else would benefit from day virtually being longer?
damn wake up sheeple, BIG CATTO is here
*later
not longer
bruh
dm @vapid maple about it
lol even i got a similar message
Lmao it's the same freaking message 10000% selfbots
ikr, i got it three times from a person
Hi new, im dad
No, they clearly said that they are "new here" not "new" :^)
hi new im old
hehe
how dare you, their name is "new here!" not "new", im new.
dont mistake me and them
hi new and new here!
Happy Halloween
Hi there!
"virtually longer"
Virtually means not really, it just seems like it
I'll buy all of it
it doesn't seem longer if you get up early
it is virtually later, since although it isn't actually later, it seems so due to how we set our clocks
it is not virtually longer
It does seem longer if you go by your biological clock. Because you wake up that one hour "earlier" if you wake up naturally. Or you sleep one hour more if you wake up with the alarm
It can be virtually both. Because "virtually" describes the illusion and you just perceive the illusion in a different way
Also, the longer thing was mainly to make the joke about big catto (after Starcy mentioned big tech/big pharma as jokes )
so really you should say
from day virtually being longer for me?
yeah ik
but I enjoy nitpicking
*for cattos
Hm, since when do I have 180 notifications...
157 from one server XDDD
And it's not a spam server!
Just a gdkp server, with over 15 channels for raids...
@pliant trench [*zip(*matrix)] Try this on for size.
I just found out this on the docs
transpose 🎉
'CALL "C:\Program Files\nodejs\\node.exe" "C:\Program Files\nodejs\\node_modules\npm\bin\npm-cli.js" prefix -g' is not recognized as an internal or external command, operable program or batch file.
why does this happen when i run npm
i think u should ask that in the node server
what node server?
the discord one, cause this is for py only
It's off topic so
ah. mb i thought this was like general or something
cause discord is glitchy asf on linux
Np np
because you are using windows
you will most likely have less issues in linux
why does that have anything to do with it
¯\_(ツ)_/¯
linux just fixes everything
i switched to wsl for everything
Better design and architecture
#bot-commands
How far is checking crypto transactions to training a model for image recognition
Mmmmm, feels good on a chill Sunday. 
how does one create a matrix with a kernel that has a basis {(2, 2, 1, 0), (3, 1, 0, 1)}
let's choose (totally arbitrarily, in such a way as to simplify the matrix as much as possible) two other eigenvectors are (0,0,1,0) and (0,0,0,1), both with eigenvalue 1. Then:
A[:,3] = (0,0,0,1)
A[:,2] = (0,0,1,0)
so this choice gives us half the matrix already, and then we're left with:
A =
a00 a01 0 0
a10 a11 0 0
a20 a21 1 0
a30 a31 0 1
A (2, 2, 1, 0) = 0
A (3, 1, 0, 1) = 0
which we solve:
2a00+2a01 = 0 (from first)
3a00 + a01 = 0 (from second)
therefore a00=a01=0
Similarly a10 = a11 = 0
Third row is slightly different:
2a20+2a21+1 = 0 (from first)
3a20+a21=0 (from second)
therefore -4a20+1=0 => a20 = 1/4, a21 = -3/4
So is fourth row:
2a30+2a31 = 0
3a30+a31+1 = 0
-4a30-2=0 => a30 = -1/2, a31 = 1/2
So
A =
0 0 0 0
0 0 0 0
1/4 -3/4 1 0
-1/2 1/2 0 1
fits the bill. We can multiply it by the two original vectors to see that we indeed get zeros.
@radiant socket
:O
ty <3
@sharp wyvern Can you change your profile pic?
ye sorry
love this otname
WOOOO WHO ARE THE LOSERS IN CHAT TONIGHT
?
?
@shadow plover - You made a comment in #python-discussion earlier that having all the automation tests written by devs runs the risk that the devs don't know the end-user experience like a QA team does. You're 100% correct and what my workplace is finding is that it isn't an excuse we accept anymore. The devs step up, level up, and consider not only how the code should work but how a user might use it.
Not easy, with plenty of struggle in the process. We're merging QA teams into dev teams to help break the silo's down and spread the knowledge. A year will show if we've learned anything 
yeah totally, its not an easy problem to solve.. but putting everything on the devs isnt really fair IMO
u need ppl to use it in weird ways u cant think of and break it xD
A QA engineer walks into a bar. Orders a beer. Orders 0 beers. Orders 99999999999 beers. Orders a lizard. Orders -1 beers. Orders a ueicbksjdhd.
First real customer walks in and asks where the bathroom is. The bar bursts into flames, killing everyone.
lmao
100% this!
My teams struggle to bring on new folks because "They just work on tier one". Oh boy does that get me on my soap box 
JUST tier 1? My friends, those folks know more about how to use our systems than you do.
lul. so many bugs in my code were when something happened that i didnt think of.. which is why getting other brains to interact is importanto
The Phoenix Project changed my mind on this humorous concept.
hsp
how dark is your brain
hsp has a brain??
i mean his outer layer is just plain poop
literally i can classify him as a slime
just poop
that is an interesting thought I don't want to follow through with
be like my brain
yeah and?
apparently it's comprised of only females
well latinize everything
The New Mexico whiptail (Aspidoscelis neomexicanus) is a female-only species of lizard found in the southwestern United States in New Mexico and Arizona, and in northern Mexico in Chihuahua. It is the official state reptile of New Mexico. It is one of many lizard species known to be parthenogenetic. Individuals of the species can be created eith...
ah an ace
https://www.youtube.com/watch?v=h6DNdop6pD8 imma reshare this gold
☆twitter - https://twitter.com/sensenzawa
☆ instrumental used belongs to - https://www.youtube.com/watch?v=_qzo8fRwWHc
oh nah
._.
i see. so is it time for me to get a bonk?
oh my. I updated pipewire-media-session
and my laptop audio seems so loud now
👀 GitHub Copilot works on CLion now
hm
it has been working in pycharm since i got it
Yeah, only a few IDEs worked with 1.0.1
but now it works on all of them, I think
PyCharm was one that worked, along with I think WebStorm and IntelliJ
but now CLion and Rider work as well
dunno about GoLand or anything
arent all jetbrains ides basically just intellij with different skins lol
thats actually true
but
each IDE is specialized for it. it is not just a reskin
do you want a hex code of the colour
maybe
#000000
#ddddddd
i have a few
yes u used fb messenger bad
git commit sin
sad. i mean how can i avoid using it if the country itself has 99% fb users?
india moment
he isnt indian lol
oH
Indonesia is like that too. They also got mom as ultra undefeated infitie powered diety
. Just like us.
And you find your parents and all the neighbor uncles and all the family folks on fb
@regal plume You almost have it. You need to call your analysis function and give it the array. You assign the return of that to your vars.
but ITS NOT MAKING SENSE
i have analyzeValues(floatArray)
so my function is running
but how do i access the return
and put it o my variable
its not clicking
a, b, c = analyzeValues(floatArray)
Where a,b,c are the appropriately named vars
and the right number of them
and in the order you returned them
yes
thank god
thank you so much
@frigid pollen i appreciate it so much, have a great night, enjoy your dinner
hi neighbor country
Pakistan ?
is it not
depends on what you are comparing with
pakistan is a neighbor of indonesia, if you're comparing between sun and earth

probably a messed up sense of geography but okiee
is it a problem to not really know much about geography on the other side of the world? 
yes
well
u gotta know a drop of something about the other side of the world at least
probably in the universe
no, geography is irrelevant
why would i have to know about some country when they definitely dont know about mine
but i want to know where Alpha Centuari is
oooof
Why learn about it when you can literally just google it
bet you alpha centaurians dont know where earth is
what is google? also why is liquid choking again
- google it lol
- it's TL, what do you expect
probably the north star
probably
Americans should learn geography if they wanna play world cop so bad
true
true
also true
You should know by now that everything i say is the unfiltered raw truth
hmmm hi mom
unless
youre my dad
I can be both if need be
an advantage of not having a dad is that you can trigger conservatives over that
apparently believing in human rights and shit is a sign of lacking a dad, lol
Will you become my dad? 
i'll adopt every one here whether they want it or not
Boomers and radical conservatives are so fucking dumb
im based tho
not really
K
i barely got to enjoy mj before paparazzi killed him

but hey i got to see nikocado kill himself slowly...
ok take me out of this timeline
Yeah...
which letter to choose after running out characters for gen θ
ιτ τοοκ α λονγ τιμε φινδινγ τηισ ινοθτ μετηοδ ον γβοαρδ
:πενσιωε:
@real forum how many years do u even have left before ur out of touch and old too anyway 
I will never be old
4?
I will always be hip
i always help them to cross the street during red light
Ok. You have two grandkids by the similar 'adoption' system :3
did u 'adopt' random discord keds? 
No, one is irl friend which love of my life 'adopted', and the other is our common online friend whom I've been helping a lot and who was worried about it and I said 'at this point, you're already my kid'
mmm keds
They both are just slightly younger than me XD
Hmmmmm
@wheat aurora so this is what i was using to merge pdfs https://github.com/mstamy2/PyPDF2
idk if i'll be able to find the specific issue i got though
what were you using?
I was using that as well
oo. and what was the error again?
So I got two, one was a "-5: Unfinished Bytestream" or whatever, essentially the pdf was too big for the buffer. The other was the EOF marker missing
i wrote a script with this several years ago and I think I got the bytestream error, but I don't remember how i fixed it
happy to help, any time
I think I have to like manually decompress it and then extract it or something? I did not care enough last night to troubleshoot it
bc it was a final step for me i ended up continuing using pdftk to merge (not python)
Context: my script takes many resumes (pdf and docx) and combines it into 1 big pdf for a sponsor. The combined pdf ended up being 547 pages without the handful of resumes missing, so I called it good enough. (Sponsors still get them all individually as well)
I think I used it at uni, or something similar
i'm trying to resurrect this script to see what my issue was lol
ok idk if this is the exact error i got last time, but i'm getting RecursionError: maximum recursion depth exceeded while calling a Python object when attempting to merge 1500 2 page pdf files
i guess i can change the recursion limit? but i don't think this is the error i got last time actually
yo peoples social credits gone down
:incoming_envelope: :ok_hand: applied mute to @jovial island until <t:1635790426:f> (59 minutes and 59 seconds).
muting everyone smh
!mute 253696366952316929 No pope allowed here
:incoming_envelope: :ok_hand: applied mute to @upbeat sandal until <t:1635790466:f> (59 minutes and 58 seconds).
preach steler
You can't mute the Pope
!tban 801053892832919562 14d Seems like you have just been sending spam here so far. If you want to join again, make sure to read our rules this time.
:incoming_envelope: :ok_hand: applied ban to @hearty ferry until <t:1636996506:f> (13 days and 23 hours).
watch me
they were about to tell me a secret!
I can tell you mine instead 
!unmute 253696366952316929
:incoming_envelope: :ok_hand: pardoned infraction mute for @upbeat sandal.
too bad
if the secret is how I can not get destroyed at my week five (?) exam they can get unbanned
I always miss the fun fun rule stuff, such as when people get muted/banned
- winney the pooh points
@tall sparrow over here
Didn't want to overexplain the situation in case it wasn't particularly relevant
What game is it by the way, if I may ask?
Kohan: Ahriman’s Gift, awarded “Strategy Game of the Year” by Computer Gaming World, is a real-time strategy game set in the fantasy world of Khaldun. Built on the award-winning Kohan:Immortal Sovereigns gameplay, Ahriman’s Gift is the stand-alone prequel to Kohan: Immortal Sovereigns. Experience the world of Khaldun from a whole new perspective...
$9.99
103
79
It's Kohan: Ahriman's Gift. Context wise, the company that made the game (TimeGate) is dead, the online services for it (GameSpy) is also dead, and the modding tool that was released for the game is very buggy and restrictive. The mods we still use today were made a long time ago by people with python experience, using a script.
that game
And unfortunately a lot of those guys are no longer reachable anymore, a lot of them have moved on. So I have to make something from scratch.
Ah .... and the creators have yet to update it for something else?
You mean the game creators, or the script creators?
If I may ask ....
Sure, go ahead.
What type of genre is it?
RTS? Real time RPG? Turn-based RPG? etc.
It's a fantasy RTS game.
... heard of OpenRA ?
Bit like Battle For Middle Earth or Dawn of War, if you've ever seen those ones. And yes, I'm a huge fan of OpenRA.
I got C&C: RA2 / YR in CD form, but sadly I don't have a drive to install them with
Stupid "use online / USB to get everything" ideas
Yep, an external DVD drive is also really useful for that sort of thing.
The game or an external DVD drive?
The latter (external DVD drive)
I only got a CD player ... and it is part of my alarm clock
But there's bad news with that ... I cannot get the batteries out of it
Sorry, didn't answer your question before about libraries. Bit of a coding pleb here, but I basically need the script to read a directory filled with ini files, and compile it all into a single .tgx file. So I'm using os and sys for now, os for reading directories and sys for being able to point the script at different directories, I guess?
.ini is normally a plain text file, like how .json is, but is just formatted differently than JSON.
damn their site 404's
Never thought I'd see the day where alarm clocks were the only thing with cd players in them lol. I had a tiny netbook once that I used for uni, didn't have a cd drive in it so we had an external USB one for it. Been using that one for a looooooooong time.
Yeah timegate abandoned kohan a long time before they went bankrupt
odd that the game itself is still sold
It's a very special RTS game, though.
it looks cool
My understanding is that the CEO bought the rights to kohan at his own bankruptcy auction
So the steam pages aren't managed, the game doesn't even work right away if you just download it and play. It's been a pretty big struggle to rebuild the community for it, but we've been doing well.
Still, the lost art of proper mod making is something we need to get back
Allowed either CD+RW or CD-RW ... forgot which.
But it does allow me to play my old "Age of Empires II: The Age of Kings" in-game background music on loop ... (only audio track on it ... starts on track 2 (data is on track 1, and that data is not meant for human ears)
Yeah they are plain text files, but the .tgx itself is something I've been trying to figure out. It's basically a Data/ directory, and the last guy with a python script figured out how to put art and audio files in there as well, not just text data about the units. The game is very finicky and if it detects any issues with the tgx file, it will just refuse to start.
Aha, you've got great taste in OSTs lol
tried searching: modding tgx and the game name?
it's literally on the game's CD!
Did try that.
@tall sparrow It is probably because messing with the file alters the header or something
Unfortunately, 2001 game. Lots of sites have shut down since then
@tall sparrow did u come across this ? https://stronghold.fandom.com/wiki/TGX_file_format
ooh
I think tgx for kohan stands for timegate x - Or something like that.
ah cool
So in that screenshot there. apaladinshield.tgx is a quick mod I made with the tool K-Mod, that has one unit changed. Patch 1.3.10 is one of the more robust patches I was talking about, but it has only unit data in it, no added custom content like audio or art
So the average size of the patches was about 450 kb, for one that changes a lot of values
The PatchMP-0.2.0.2.tgx was explicitly made with a python script, and has a whole lot of extra stuff in it, so it's a self contained thing. It's much much larger, and it seems there isn't really a limit on how large they can be.
at such a small file size it must be referencing more data though
wish i had the game, I'd open the file in a hex editor to see if I can glean some info there. or perhaps open the game in hex editor while running
Just need a moment to make a basic script that can show you what the raw data in the tgx looks like
I had it earlier but changed a lot of things
@calm bolt It's basically this, but in the tgx format, there's a lot of extra data that I'm not sure if it requires to work or not
so the output is a bunch of hex values?
I'm reading the tgx in binary mode in the top pic, and the bottom pic is what the data looks like when extracted
I don't have a script that writes tgx files yet
But yeah the tgx itself is a bunch of hex values thrown in with plain text
everything in the computer is "a bunch of hex values"
all data is binary, all binary can be grouped into groups of 4 and therefore represented as hex
They are, yeah.
Very easy to edit in that form. Problem is, I'm not sure if I try to put them back into the tgx format whether or not I'm going to have missing data
And if I'm missing data, it probably won't work.
man, that is over my head. Sounds cool.
Threewood is the guy who used to create mod files for the game, he was diagnosed with cancer and unfortunately it's not possible to contact him anymore, but he used a python script to do it
Maybe it is checking if the ini file size has changed
maybe check if the sources are somewhere? github maybe?
It would be amazing if they were uploaded to a git somewhere, but if it was, it was never made public. Really, really wish I could've seen that original script
But nobody bothered to get it from threewood, so we're back at square one
We're playing the game with community patches that were made 10+ years ago, because we don't know how to make our own
That sux, pretty much the whole situation from dude getting cancer to source code disappearing
Yeah, really really sad. Feels like we went into a bit of a dark age from then on. I hope the guy is doing alright, but there's been no word from him at all.
how do you extract the file?
if you have some ini and tgx file sets, I can analyse them for you. from what you posted above, it just seems a lot of that tgx file is just padding made of \x00 bytes
Hey @tall sparrow!
Uh-oh! It looks like your message got zapped by our spam filter. We currently don't allow .txt attachments, so here are some tips to help you travel safely:
• If you attempted to send a message longer than 2000 characters, try shortening your message to fit within the character limit or use a pasting service (see below)
• If you tried to show someone your code, you can use codeblocks
(run !code-blocks in #bot-commands for more information) or use a pasting service like:
pastebin probs
I'd be extremely grateful for any help, I'm here on behalf of the community just trying to make some progress with it. Not a skilled programmer by any means myself, so trying to teach myself as I go. I did look at it in the hex editor and saw that it wasn't all \x00, there are a few bytes with values in them.
open (MOD,$modfile) or die "Unable to open mod file ".$modfile;
read *MOD,$mod,10000000;
@data=split /\x00+/,$mod;
$firstFileIndex=0;
@fileNames=();
for ($i=0;$i<@data;$i++) {
if ($data[$i] =~ /data\\[\w\\]+/i) {
push @fileNames,$data[$i];
} elsif ( ! $firstFileIndex && length($data[$i])>100){
$firstFileIndex = $i;
}
}
if ($createDirStructure) {
for ($i=0;$i<@fileNames;$i++) {
&CreateDir($fileNames[$i]);
open (INI,">$fileNames[$i]");
print INI $data[$firstFileIndex+$i];
close INI;
}
}
sub CreateDir {
my($fileName)=$_[0];
my(@elements)=split /\\/,$fileName;
my($i)=0;
my($dirName)="";
for(;$i<@elements-1;$i++) {
$dirName= $dirName . $elements[$i] . "/";
if ( ! -e $dirName ) {
mkdir $dirName;
}
}
}
51,023
218,500
