#ot2-the-original-pubsta
652 messages Β· Page 92 of 1
Hmm.. I wonder if you could make proof of work based appeals
I messed up between Swedish miles, kilometers and English miles
Need to show you put enough efforts into the appeal message
Wait, there are English and Swedish miles?
this is why metric system was invented, yikes π
I don't understand this person, are they for or against this report?
A swedish mile ("mil") is 10 kilometers
That's the unit that was used in the paper, very common here in Sweden

thats a long mile
Against, but his arguments are next level flawed
i mean... i feel like some people could do with a bit more googling compared to the policies they enact..so.. uhm.. yeah
am i trippin or is that infinite tabs
yeah, firefox mobile starts showing infinity when you exceed, like, 100 tabs
yeah
pathetic, really
well
i want to know how many hundred I have
Yes
if u have more than a 100 tabs on ur phone u dont need to know the exact number
Hm... Counted mine. 226
But scrolling through tab view, I found some i can close for sure, even without looking
I have 14 in mine, but most of them are tab groups
I just counted 140 tabs
So not too sane of a person
Yeah, mine's also on mobile
do u get infinite power from infinite tabs?
π tab groups are pog
usually i have at mos t20
but thats only for projects for school which require a lot of googling
on average i usuually have 5-6
rn i have 3 (one of which i just xed out i never needed it)

:incoming_envelope: :ok_hand: applied mute to @jovial island until <t:1636219104:f> (9 minutes and 59 seconds) (reason: mentions rule: sent 6 mentions in 10s).
Yeah
@jovial islandWassup?
@minor wedge you can look at the source of it to see what it does
Can someone please help me I tried every channel π’
see #βο½how-to-get-help to claim a specific channel just for you π
Thank you , hopefully someone answers soon I've been stuck for nearly 4 hours now :(
which channel is yours?
:ok_hand: applied mute to @buoyant hawk until <t:1636246700:f> (9 minutes and 58 seconds) (reason: newlines rule: sent 22 consecutive newlines in 10s).
!unmute 765506588474867753
:ok_hand: pardoned infraction mute for @buoyant hawk.
Don't deliberately trip the spam-filter please @buoyant hawk
I was seeing if it muted me
Ah, well there you go π
π
maybe you need a lot of xp to get to wizard level
nah they just casted a magic on themselves to make themselves look old
ah i didn't watch that show
not avaliable in my region ig
no you just need to be 30
pretty pretty 
although my touchpad has the weirdest acceleration curve I've ever used π€
do I smell Rich
bien oui!
lol I love Rich
I'm sorry, I can speak some french and therefore I have to use it sometimes as it's so fun to do so
haha c'est vrai
honestly now back on windows I do miss it surprisingly enough
the shell experience is less good than linux IMO but ignoring that it's pretty damn good
only thing I miss is software support
other than that, totally fine sticking to openSUSE for the rest of my days
eh I rarely game so that wasn't really an issue when I moved to ubuntu
yeah games is the big thing, for me
it's such an awesome library, soo pretttttyyyy
oh yeah it's so the traceback handler
although I just use the console object instead
I've never really liked logging
I like logging style output but not the logging API
I don't think I know what this means \π€
I've never done much more than just logger.debug() and stuff lol
sorry you've discovered my magical ability to forgot to write certain words
I mean "oh yeah it's so nice the traceback handler"
oh lol
I honestly have no idea why I just forget to write certain words, I used to not to do it π
I do it all the time
I originally thought having your style inline would be a downgrade when I switched from click's output utilities
and while sometimes I do wish I could do bold=True in general the inline styles are way nicer to work with
off-topic, but who decided that integrating gitlens into the source version control panel was a good idea
yeah but it's not as convenient as I usually have a boolean variable when I find myself in such situations
probably, I'm still rather new to rich
Admittedly, I've not used it in a while
no interesting projects that need to be pretty 
I should probably look into setting up custom styles
that's a real shame π
the highlighters seem cool
Yeah in most instances probably very little, I've just noticed diff-shades (the program I showed above) a multi-core program suffering a 5-12% performance drop in verbose mode
to be fair it's very chatty in verbose mode
I figure the most performance intensive things are the handlers
handlers? highlighters
from #black-formatter message
@lusty brook cc tone indicators
i would like to see more of the / in general
its a cool concept
in some cases, people need to use it more
but in other cases, i think they're overused
and yes, I say this as a neurodivergent person
eg /half-serious or things like, where they aren't widespread to use yet
yeah one day I'll be getting an OTN along the lines of #off-topic-richard-in-black-fmt π /hj
dude that's what i initially used the channel for
it was basically offtopic of black users
i'm not kidding, either
!pypi black
also #black-formatter
yes, I understand now
for context lol
I agree! they're so useful even as (edit: a | case in point ahhhhhhhh) neurotypical as I misread / write poorly thought-out messages constantly
if someone misunderstood in the moment, i don't want someone to misunderstand it later π
such a mood
there's one server that takes everything i say as passive agressive, when its supposed to be a kind of support server/school club
d'aw that sucks :( /g
smh i asked a clarifiying question its not my fault you said you took your girl to the vet and only by the end of the message i realised it was a dog.
actually one question I've had about tone indicators is whether using a full emotion / tone word is acceptable
I've used /joke before but I got quickly corrected to use /j
<rant type="minor">me too</rant>
uh, before i get to that, some times i use /hsrs or /halfserious so i'd just use the full words
that is actually what i use them for
although I typically just do
<rant>
fuck fuck fuck fuck fuck
</rant>
<rant /> fuck
and often the first tag gets edited in after I realise I've written a rant
$insert-aggravating-topic
what's funny is how different "fuck" and "oh no" hit
i actually think oh no hits harder
ugh something happened today and it had to do with cw badcode ||isort breaking coveragepy|| and now i did some oopsie and doopsie and reinstalled it yay
Note: this is an example and not serious
lpn
least punctuation necessary
ooh, don't spoil it lol
I used to write in a really formal style but as time has passed it has deteriorated
yeah i recall that.
I still use punctuation but I'm wayy more lax about capitalization
oh lmao
you can tell when i'm on pc or mobile
mobile has no typos and great caps
okay that's uh, not true
mobile will sometimes screw up my messages so bad i just send them anyways
mobile either has no typos or insanely bad typos ^^
can't fucking relate
awesome! /lh
man I love #duck-pond far too much
but so far never pushed a commit with a swear word in it in anywhere to anywhere
i think
there may have been one
i feel like that's a lie.
but that would have been to a branch and fork of my own project that was because fucking github actions
although
i have now taken a liking to yaml
so uh
yeah
it may be
yaml would be nice if there weren't a million ways to do any one thing
also the fact 3.10 == 3.1 bothers me way more than it should
the worst english I've commited so far is a comment that was just
# message deletion events are messed up
above 3 defined dictionaries
that was it. that was the whole comment.
well HAVE FUN FIGURING WHAT'S MESSED UP π€
its more accurate now
# message deletion events are messed up, so we have to use these sets
# to track if we deleted a message, and if we have already relayed it or not.
# these lists hold the ids of deleted messages that have
# been acted on before a on_msg_delete event is received
#FuckDiscord
nx?
I am learning so many new tone indicators today
don't worry about it 
d'oh
yes.
removed it
yeaa...
and deleted the definition smh
y'all have dirty minds i just wanted to use the tone indicators smh
!otn add add-sexy-wrong-assumptions
I wouldn't never guessed
i love how assumptions was mispelled
f.warn 717983911824588862 we don't talk about that
LOL
(that's my bot's prefix fyi)
figured it was
banned for self-bot
you better know what it stands for
fuckblack?
f...un
friendship
also no.
dang. what did I miss
mhmm
i searched your history lmao
i had remembered you sending screenshots of your bot in #dev-contrib
lily was a little girl
but i couldn't remember the username for like, 15 seconds ;-;
in her own castle world ... π΅
oh are you ready for the bot logging to be really weird for an hour?
no I should be asleep by now honestly.
oh wait nvm it doesn't use EST
nvm
i should modify my bot to use UTC only as well... hmmm
close enough \π©
too bad
alan walker?
what timezone are you in again?
utc-4
i have a stomach ache, a sore throat, a stuffy nose, and I think im gonna go have a bunch of milk now because i like pain
uh oh
:>
no tone indicator because imma leave you guessing if im serious or not about liking pain
i view it as /s
but then again, i don't read documentation until i've done it the hard way first so.... take that as you will
no. /srs
its probably /s and /srs
\:weary: is my own personal tone indicator \π©
I end up typing it everywhere :faint:
sorry offtopic but @wide totem look at this
metadata description included in the auto generated config
the problem is atoml/pyyyaml don't support comments, so i need to manipulate the config using regex
atoml does support comments
i looked into ruanamel.yaml but it just didn't work and was talking too much time
it does π
as of version 1.0 atoml is a fork of tomlkit which is a style preserving toml parser
however, it comes at huge speed costs
i would only use atoml if you're editing user's files and need to keep the style the same
welp, this is fast and sure though, so I shouldn't worry
its pretty noticiable on larger toml files
eg modmail's poetry lock takes 12 seconds to be parsed by tomlkit/atoml
tomli takes 0.25 seconds ;-;
uhh isn;t it frostming/atoml
!pypi atoml
ye
tests/test_build.py line 11
doc.add(comment("This is a TOML document. Boom."))```
it's part of the tomlkit requirements
since poetry modifies pyproject.toml to add dependencies
it can't be a culprit of removing the comments that a user added!
however, if not needing comments, and style, eg an automatically generated file, tomli and tomli_w are very much worth it
ah π
!pypi tomli_w
discord-modmail/modmail#75 rewrites the configuration system
although, you have given me some ideas for it, hmmmm
currently I make use of eval for the metadata generation, need to figure out a better way
π
@dim roottldr the configuration system i have works in reverse.
everything is stored in the code itself. I realise now that isn't terribly the best, but i wanted it all in one place at the time
what's bat?
what error?
bat is pog
Does it conbatenate?
ugh
this
i now have an unexplainable error
this line
gets removed on github, but not locally
Different versions of the module being used for toml writing, maybe?
should be the same....
unless the cache wasn't updated and it was
nope didn't hit the cache
well, did hit the other cache ig
would you believe i had to write the diff function right now just for debugging purposes ;-;
I don't think so, it is using a poetry lock file after all
lol
I mean the error where you can't use slash commands for no reason. The module must have been made in a different way or version.
Anyway, I found a new module!
ur using dc in bright mode?
Flashbang edition
I am making a twitter TUI client, aiming it to be a drop-in replacement for the web version, it would mostly be using textual and tweepy. If someone is interested in helping out... Lemme know.
bruh
I use light mode
It's quite soothing
Your eyes, hurt but the embeds and everything look kinda organized.
bruh fine
I turned on dark mode
this is cursed
as f
my eyes
your eyes
ah shit im blind now
can i see what embeds look like ?
oh i hate that π€’
I love this site's UI. Tell me I should be writing without telling me I should be writing.
NaNoWriMo?
That's weird, but does it work?
I look at it and my brain goes "Oh no, that needs to be fixed" 
It's also the only visual reminder of "have you written today?" on the dashboard.
Oh.. no, other than this
Weird... my brain attaches to the graph far more heavily than the big 0
24620 π₯΄ that's a lot
It was so hard not to force another 380 words last night to be at the mid-way point.
But nothing forced ever fits well, in my experience, so I stopped when the scene felt concluded.
Hi, Does someone have a headphone recommendation to online meetings?
anything, really. anything can get you through a call, it's not like you need some special quality like you do with music
o i want recs too, ive not been happy with anything
We have a coffee gulag?
Yes, by @copper tartan's rule you're only allowed to enjoy coffee once a month with a dessert
What the fuck?!
I feel like the Geneva Conventions prevent this
how are you supposed to form your addiction then..?
This actually summarizes my experiences with Twitter's dev docs quite accurately. I'm either in-and-out with the info I need or left physically angry that they made me read multiple pages of fluff and still didn't provide the answer 
At first I was curious why the angy face and not a confused face... now I know.
I just realised that over a period of time, healthcare will become more in demand as success rates increase because the hereditary traits that ended up causing the need will be passed down
Survival of the fittest no more
This effect will not be as strong as you might think. Most health care is provided to people who are middle aged or older, and most children are born to parents who are below that age, so the genes will have been passed on regardless of health care success rates.
Vaccines and sanitation have likely made much more impact on who survives to breed than any recent health care breakthroughs.
that's a good point
eh, i guess i speak as someone who's had cancer twice, a transplant, and several other things so I'm a little bit biased
Maybe adopt π
actually I don't have a choice if i want kids /shrug
The effect you point to is definitely real - but we've been removing selection pressures for a long time
not that there aren't other terrifying patterns in this venue - like, say, that there seems to be a weak but statistically significant negative correlation between intelligence and number of (surviving) children, which should result in a selection pressure against intelligence
yeah...
Hm. You're missing some major positives, though. Better nutrition and the removal of lead from environments where children spend time has greatly increased average intelligence
removal of lead
response: flint michigan
Ok, but remember that 100 years ago, most places had lead pipes. We're getting better.
Even if both of these effects exist, the former is still worth worrying about, because the latter is inherently limited - there's only so much you can improve conditions, after all
Hell, the Romans used lead as a sweetener.
a) I'm not sure that's true, given that we're constantly figuring out new things about what conditions are better, and b) that's assuming the impacts are on the same order of magnitude, when there's no reason to believe they are. Studies of intelligence that I've seen show a steady uptick over time since we began measuring IQ
true...
but we also aren't making conditions that much better
We are. Lead pipes weren't the biggest source of lead exposure, lead paint and leaded gasoline were.
We've made massive, gigantic strides towards removing a source of brain damage that all children were being exposed to.
At least 50% of intelligence is attributed to environmental factors rather than genetic ones, and we've made very large strides towards improving some of those factors for all children
Maybe it's the other way round too
genes that might have helped prevent diseases happening to older people don't get selectively passed down since they don't come in useful before the reproductive age and consequently these are the diseases requiring more healthcare
Yep. Selection pressures don't really apply past breeding age, whether for helpful or harmful traits.
And further complicating things: one trait can be both helpful and harmful. The trait that causes sickle cell anemia is selected for because it helps prevent death by malaria.
dang
removing selection pressures is a positive thing for humanity as a whole anyway. more gene variety means greater chances of some subset of humanity surviving should new, unremovable selection pressures arrive
That's a good point.
@odd sphinx you broke the chain in #ot1-this-regex-is-impossible
change your nick to hspv5
nice
ping 
nah social darwinism is a meme
Not really
@unreal sigil sorry for the ping, but good luck for your exams
@tight stag actually I can reproduce it.
(and obviously updating settings.json as suggested fixes it)
but that's definitely a bug with code runner, and a pretty awkward one at that
I bet it's writing the output to file before displaying it, and that's causing python to use the system default's encoding, which may be cp1252
@grand pollen because, C is a much smaller language than C++, and is often faster than it because of its smaller size.
Oo
C++ is great, do not get me wrong, but i would be lying if i said C++ was not a massive language.
difficulty is subjective.
i find C incredibly simple most of the time.
I tried to learn input in java after a while i quited
both in complexity and language features.
i do most of my coding in C, and i am coding in C right now.
I am dumb so i will learn c now instead of c++
and i am kind of this server's resident C programmer, so.
C does a lot less for you than C++.
i do not see how that makes you dumb though.
No i mean that i cant learn something for a long time
practicing makes everything easy
C is nice
maybe i'll learn c for fun
you heard it here first, from the Rust programmer.
but i need to finish js
Lmao
what is Rust useful for it look pretty intersting
I found js cool
struct CtVector3 ct_vector3_scale(struct CtVector3 vector, double scalar) {
struct CtVector3 new_vector;
new_vector.vec_x = vector.vec_x * scalar;
new_vector.vec_y = vector.vec_y * scalar;
new_vector.vec_z = vector.vec_z * scalar;
return new_vector;
}
double ct_vector3_magnitude(struct CtVector3 vector) {
return sqrt(pow(vector.vec_x, 2) +
pow(vector.vec_y, 2) +
pow(vector.vec_z, 2));
}
struct CtVector3 ct_vector3_unit(struct CtVector3 vector) {
double vector_magnitude = ct_vector3_magnitude(vector);
return ct_vector3_divide(vector, ct_vector3_init(vector_magnitude,
vector_magnitude,
vector_magnitude));
}
Web dev, systems dev
Rust is a systems programming language. it is much, much safer than C.
Concurrent programming
What is rust used for
whats the best language for backend webdev
Depends
Rust also actually has a type system instead of the shit show that is C's type system.
I wouldnt say there's a best
i use python for backend rn
Sure, python is great
i beg to differ
is there any language i should look forward to
Rust and C are good learns
Brainfuck
Django does have a learning curve, yes
work on small projects
Uh
I said i am dumb i need someone to slap my as* to get work done
if u lose motivation really fast then coding is not your thing lol
not necessarily
Maybe
it could just mean that what you are doing with coding does not interest you.
speaking from experience.
I just compare myself to other and thats a big problem
yes exactly work on stuff you like
well u need to learn focusing on ur self
It intrest me but after then i find more stuff cool
i was talking to HERO.
Hmm... Yes
Oops
oh
I've lost motivation on quite a few of my projects
yes but if someone lose interest a lot in general thats a problem
Dont ww3
?
Not really
Aboo is a professional
he knows what he is talking about. all Rust users suffer from chronic demotivation.
it is just a fact of life.
Hello?
hi
mariosis searching for signal since 1969
Hm
Hm
Perhaps
Perhaps
hm
Is it me you're looking for?
Just put down an offer for a flat, these bitches surprised me with an extra 200Β£ bills
Can we eat landlords yet
Can we what
aboo are you struggling with the concept of eating fat landlord pigs
I guess youre right youre not supposed to eat that much fat
This landlord im talking to wants me to pay Β£1800 for a 1 bedroom apartment
Heck no, what the fuck
Perhaps
Tf
me breaking diet π©
dude sometimes i find a costco pizza and eat like 7 slices
or 3 burgers
or like 5 kfc chicken pieces π©
and christmas is coming soon rip
Costco pizza is fantastic
@classmethod
def build_obj(cls, obj: Dict[str, Any]) -> "Tweet":
"""Builds object from dictionary"""
tweet = cls()
tweet.id = obj["id"]
tweet.text = obj["text"]
tweet.created_at = obj.get("created_at")
tweet.author_id = obj.get("author_id")
tweet.conversation_id = obj.get("conversation_id")
tweet.in_reply_to_user_id = obj.get("in_reply_to_user_id")
tweet.possibly_sensitive = obj.get("possibly_sensitive")
tweet.lang = obj.get("lang")
tweet.reply_settings = obj.get("replay_settings")
tweet.source = obj.get("source")
tweet.errors = obj.get("errors")
tweet.referenced_tweets = (
[ReferencedTweets.build_obj(rt) for rt in obj.get("referenced_tweets")]
if obj.get("referenced_tweets")
else None
)
tweet.attachments = Attachments.from_obj(obj.get("attachments"))
tweet.geo = Geo.from_obj(obj.get("geo"))
tweet.context_annotations = ContextAnnotations.from_obj(
obj.get("context_annotations")
)
tweet.entities = Entities.from_obj(obj.get("entities"))
tweet.withheld = Withheld.from_obj(obj.get("withheld"))
tweet.public_metrics = PublicMetrics.from_obj(obj.get("public_metrics"))
tweet.non_public_metrics = NonPublicMetrics.from_obj(
obj.get("non_public_metrics")
)
tweet.organic_metrics = OrganicMetrics.from_obj(obj.get("organic_metrics"))
tweet.promoted_metrics = PromotedMetrics.from_obj(obj.get("promoted_metrics"))
tweet.includes = Includes.from_obj(obj.get("includes"))
tweet.meta = Meta.from_obj(obj.get("meta"))
return tweet

Ah, the joys of complex APIs
@flint hull #βο½how-to-get-help
If I can get half of this object completely mapped before dinner I'll be happy.
dinner immediately arrives
....

aren't there already existing twitter api wrappers around?
But not Preocts\β’ twitter APIs π
Totes. Twitter even has "official" python wrappers open source.
@latent oxide update: I didn't finish before midnight lmao
@chilly pawn nice username π

Changes to be committed:
(use "git restore --staged <file>..." to unstage)
new file: twitterapiv2/model/__init__.py
new file: twitterapiv2/model/tweet/__init__.py
new file: twitterapiv2/model/tweet/annotations.py
new file: twitterapiv2/model/tweet/attachments.py
new file: twitterapiv2/model/tweet/cashtags.py
new file: twitterapiv2/model/tweet/context_annotations.py
new file: twitterapiv2/model/tweet/coordinates.py
new file: twitterapiv2/model/tweet/domain.py
new file: twitterapiv2/model/tweet/entities.py
new file: twitterapiv2/model/tweet/entity.py
new file: twitterapiv2/model/tweet/geo.py
new file: twitterapiv2/model/tweet/hashtags.py
new file: twitterapiv2/model/tweet/includes.py
new file: twitterapiv2/model/tweet/mentions.py
new file: twitterapiv2/model/tweet/meta.py
new file: twitterapiv2/model/tweet/non_public_metrics.py
new file: twitterapiv2/model/tweet/organic_metrics.py
new file: twitterapiv2/model/tweet/promoted_metrics.py
new file: twitterapiv2/model/tweet/public_metrics.py
new file: twitterapiv2/model/tweet/referenced_tweets.py
new file: twitterapiv2/model/tweet/tweet.py
new file: twitterapiv2/model/tweet/urls.py
new file: twitterapiv2/model/tweet/withheld.py
23 files changed, 485 insertions(+)
That was thought provoking.
atomic commits π
Yup, nothing small about that commit hash 
Hmm... refactor goes brrr
I feel like I could push this idea further but I think I'd be recreating dataclasses to a degree.
https://github.com/Preocts/twwordmap/commit/eeeaf494f65c6039d9160af782bc8d57e69e6a3a#diff-889093439c07e7da16044538b0bb4034afc352e0968fc317bbb64387464f24cc
neater
Okay
I've been supposed to be writing for NaNoWriMo for the last two hours.... time to do that.
Such as:
- Pull the class attributes
- Determine if they are a nested object (how?)
- Determine if they are an array or an array of an object (how?)
- Assume their name is the key in the incoming dict/json data
- iterate over them taking the actions needed
- nested objects would need to inherit/have the same method (interface?)
- all this just for a model that is already written feels overkill (fun)
make a branch and put that in separate commits lol
Editor design:
print("Hello world")|
The | is the text cursor
And the quote is the embed!
lmao
Neither did we
Interesting.
it was a short night, wasn't it
@limber pollen did you natively compile your emacs?
Yes
I recompile every 2 weeks to pull in changes
Well your power level is massive
π€ i guess i have to do it later in the weekend then
Break a leg
Looks like my commit history...
mhm kind of. I had worse though, I am not really good with keeping up a good sleep schedule
imagine having a good sleep schedule instead of waking up at 2 am every day because your country is dumb and hates you
I go to sleep at 2am, then have problems falling asleep for at least an hour...
somthing like 6:45
I think my average sleep, excluding weekends is around 7 hours
whats sleep
whats life
A terminal, self-replicating STD
wait a minute
lol
food
#TechnicallyCorrect
@echo flower how about mine 
i didnt comment because it was too close to the truth

I didn't knew that fuck this country then
What
i sent a message to the wrong oft
!resources
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
whoa who's vivek and why does he want my kidneys?!
steak bot :p
vivek likes kidneys, duh
very, very, much
Does anyone else hate plagiarism checking software? I'm getting matches on my paper for websites I've never visited in my life.
Sus channel
what is sus?
I dont like them either, but I haven't had cases where it thinks I plagiarized websites I've never seen
(also my teachers applies them in submission but doesn't actually check them
)
u
sorry, what?
Oh well, I suppose this isn't exactly hard of a match to make
It's someone's title, so fair enough
The other one is some student's paper, so I dunno what matched there.
which plagiarism checking tool?
omg flashback
Hello, I'm Vivek.
Would you be interested in donating a kidney or two?
does it check for actual quote/references? I think it's legal to use someone's text if it's referenced in bibliography but not all plagiarism checkers can recognize it
No idea
And like, neither of those are actually copies that do anything, regardless of whether I meant it or not, so it doesn't really matter.
But it's still kind of annoying
plagiarism is when u write a southamerican person's full name π©
first name middle name father's last name mom's last name and then whatever other additions ppl think are necessary Β―_(γ)_/Β―
hi
anyone really good at assembly language?
best vivek story
True
lol
mood
@frank lark soo
Ok oreo is a copy of hydrox
matpat?
why will you eat me smh
education bad
I was thinking are you bad for mental health but ok
lmao
read till example word @full haven
:superiority:
Pretty sure this is the link
Grab Atlas VPN for $1.39/mo before the deal expires: https://atlasv.pn/Hook
Oreo is the best-selling cookie in the world.
You probably know of the tradition of twisting, licking or dunking the cookie, but few know the dark side of its history.
Thatβs because many of its secrets have been buried for over 100 years, starting with the cookie bei...
You are wrong, oreos are perfect.
it was proofed right here
how did you not see matpat's video on this first
I don't know
Also i have disabled my youtube
why
yes
i can literally cite the source of it being fake
Uh bcz youtube has become too big of a distraction for my studies
Fake news are so bad
This is not fake news
for me it's discord, currently I should be writing essay but I'm rather in discord
Same here
well I have made 1/5 of essay in 40 minutes so not too bad
Philosophically youtube and discord are just sources of dopamine
that hit very close to home
Addicted to discord + coding at school == good (not really pls help)
Heroine is also unnatural amount of dopamine
so discord == diluted heroine
This all fun and discord and youtube and facebook is just addiction loop, i have reached Enlightnment
hey, i'm confused between these two words, "expected" and "desired".
when to use it?
or just give an example
for variable name, which do you think is more suitable? expected_result or desired_result
expected sounds better
owh ok
βExpectedβ is for what you predict will happen but βdesiredβ is for what you want to happen
Those arenβt always the same, even if the phrases are used relatively interchangeably
π
Last pizza this year, probably. It was around 0 degrees Celsius outside when we started the fire in the oven
There are no volunteers for red part, only one person. With hot peppers
@small pivot what is pah?
I think that was just expressing dislike. Like "bah"
yeah, should be. what's the context?
^ forgot to reply, just realized its a bit old
you in akarys server, but you left so fast i couldn't ask
it was an accident! why do invites just go through pah
was wondering if pah was a different server or something π
oh nah, just meant it like "ick" or "gosh"
lmao
wait, Ak has a server? π
yes, you're in it smh
is that you
Β―_(γ)_/Β―
its the minion i keep caged in my basement and use to record mp3 dont worry
or it might just be me -w-
haha
!ot what does this command do
Off-topic channels
There are three off-topic channels:
β’ #ot0-fear-of-python
β’ #ot1-this-regex-is-impossible
β’ #ot2-the-original-pubsta
Their names change randomly every 24 hours, but you can always find them under the OFF-TOPIC/GENERAL category in the channel list.
Please read our off-topic etiquette before participating in conversations.
Any thoughts on a cleaner / easier way to process this? Parameters represent the fields of a URL query string. They need to be translated into the field dict for urllib3 to use. This works, only defining fields that were provided in the parameters, but I can't help but feel there's a better way.
def search_recent(
self,
query: str,
*,
max_results: Optional[int] = None,
next_token: Optional[str] = None,
start_time: Optional[datetime] = None,
end_time: Optional[datetime] = None,
since_id: Optional[str] = None,
until_id: Optional[str] = None,
expansions: Optional[str] = None,
media_fields: Optional[str] = None,
place_fields: Optional[str] = None,
poll_fields: Optional[str] = None,
tweet_fields: Optional[str] = None,
user_fields: Optional[str] = None,
) -> List[Tweet]:
"""Search tweets from up to the last seven days matching parameters"""
fields: Dict[str, Any] = {"query": query}
fields.update({"max_results": max_results} if max_results else {})
fields.update({"next_token": next_token} if next_token else {})
fields.update({"start_time": str(start_time)} if start_time else {})
fields.update({"end_time": str(end_time)} if end_time else {})
fields.update({"since_id": since_id} if since_id else {})
fields.update({"until_id": until_id} if until_id else {})
fields.update({"expansions": expansions} if expansions else {})
fields.update({"media.fields": media_fields} if media_fields else {})
fields.update({"place.fields": place_fields} if place_fields else {})
fields.update({"poll.fields": poll_fields} if poll_fields else {})
fields.update({"tweet.fields": tweet_fields} if tweet_fields else {})
fields.update({"user.fields": user_fields} if user_fields else {})
NovaMono
ah i see. sad. it looks good but i have to use JuliaMono
It looks good! I might try it at work tomorrow.
yeah
Got lost in the sauce and only have 2 hours to get my writing goal in 
instead of None default it to {}? The typehint won't agree thogh 
and just put them in fields like:
fields = {
"max_results": max_results or {},
...
}
defaulting to a mutable arg is risky
It's not a bad thought. Chances are the api will handle an empty query parameter as a null. But then, some don't which is why I'd like to avoid having the field key at all if not provided. I think it might just be one of those "if you don't want to use **kwargs then you have to have a few lines of parsing the data. 
Hmm, is there a list of supported fields? If yes, we can just use kwargs and defaultdict
I might use your lib for my project - twitter.tui which has no TUI as of now lol
Why can't you default it to an empty dictionary? You're not modifying the dictionary - the real modification happens on fields
Always late to the party smh
That said, why not just default it and clear the values that are None?
def clean_dict(mapping):
return {k: v for k, v in mapping.items() if v is not None}
Definitive Edition β’οΈ
What do you call a part in an expression? 
If I have 5 + 3 then what do you call 5 and 3?
operands, perhaps?
Oh that's perfect!
@elfin vineterm may also be useful depending on context
Ah right for multiplication
Oh I like this... See? Ya'll super good at this programming stuff.
boop
beep
def search_recent(
self,
query: str,
*,
max_results: Optional[int] = None,
next_token: Optional[str] = None,
start_time: Optional[datetime] = None,
end_time: Optional[datetime] = None,
since_id: Optional[str] = None,
until_id: Optional[str] = None,
expansions: Optional[str] = None,
media_fields: Optional[str] = None,
place_fields: Optional[str] = None,
poll_fields: Optional[str] = None,
tweet_fields: Optional[str] = None,
user_fields: Optional[str] = None,
) -> Recent:
"""Search tweets from up to the last seven days matching parameters"""
fields = {
"query": query,
"max_results": max_results,
"next_token": next_token,
"start_time": str(start_time),
"end_time": str(end_time),
"since_id": since_id,
"until_id": until_id,
"expansions": expansions,
"media.fields": media_fields,
"place.fields": place_fields,
"poll.fields": poll_fields,
"tweet.fields": tweet_fields,
"user.fields": user_fields,
}
clean_fields = {key: value for key, value in fields.items() if value}
result = self.http.request("GET", self.RECENT, clean_fields, self._headers())
self._last_response = ResponseHeader.build_from(result)
return Recent.build_obj(self.data2dict(result.data))
Still a lot but easier to read by leaps and bounds. Quick little line for cleaning and this feels good. 
ugh, discord just ate all the indents at the top. 
Usually when I show my own functions like that, people tell me to put my options into a class π₯΄
that would actually look quite poggers with a builder pattern
imagine
RecentQuery(query).from_time(31231231).to_time(645625422).since_id(173423).search()
Hmmm, that's an interesting model.
So RecentQuery is a factory and it's just chaining the resulting object. Mutating itself at each step?
Either that, or returning changed copies, but the former is obviously a bit less wasteful
.bm, iirc
That's a Lance command, not Python haha
i love the builder pattern
I like the idea. Gonna play with it tomorrow probably. I think I want it mutated in place so things are more readable.
query = query.from_time(...)
# versus
query.from_time(...)

angry functional programmer noises
usually one uses chaining, like
(RecentQuery(query)
.from_time(31231231)
.to_time(645625422)
.since_id(173423)
.search())
This is totally not a common pattern in Rust libraries, no sir π
oh yes
... I could use a context manager too.
with QueryBuilder() as query:
query.from_time = ...
query.search = ""
results = query.run()
oh yes
hmm, interesting, what'd the manager do?
no that doesn't look as nice as the builder pattern
I agree... just playing with the thoughts
but writing builders is kinda a pain, you gotta have attributes and methods for all of them
have.... you seen the data model for this alone? I'm in for the pain
we need something like this in py https://docs.rs/derive_builder/0.10.2/derive_builder/
Derive a builder for a struct
https://github.com/Preocts/twwordmap/blob/main/twitterapiv2/model/recent/data.py Do it once, use it forever.
.bm 908575309283074100
Hmmm
I wonder if you could build a tool to do something similar
exactly my idea
for classes though, not structs
hmm but I wonder syntactically how you'd do it
Well, how you'd make it not icky at all
When in doubt, abuse future annotations
@Builder(name='LolBuilder')
class Lol:
x: int
y: int
myobject = LolBuilder().x(0).y(0).build();
Do decorators work on classes?
can you elaborate
If so, that would make it much easier
yes
!e ```py
@lambda c: print(f"Hello, {c}")
class Bruh:
...
@cedar turtle :white_check_mark: Your eval job has completed with return code 0.
Hello, <class '__main__.Bruh'>
You can do anything with the power of from __future__ import annotations
althought, isn't annotations available by default
Will it write my novel for me? 
Future annotations are stringified
Which opens up all sort of cursed opportunities
OMG HOW DID I NOT KNOW THIS
Future annotations do make the process of things easier.
!e
from __future__ import annotations
@lambda c:c()
class __annotations__:
def __setitem__(self, k, v):
if k == "For":
self.condition = v.split(",")[1].strip()
self.var = v.split(",")[0].strip("(")
globals()[self.var] = 0
elif k == "_":
code = v.strip("{").strip("}").strip().split(", ")
code_string = "\n".join(stuff.strip("'") for stuff in code)
while eval(self.condition):
exec(code_string)
globals()[self.var] += 1
For:(x, x < 4, ++x);_:{
print("Hello world"),
print(x)
}
@unreal sigil :white_check_mark: Your eval job has completed with return code 0.
001 | Hello world
002 | 0
003 | Hello world
004 | 1
005 | Hello world
006 | 2
007 | Hello world
008 | 3
I wrote a wrapper that leveraged them... then wrote it to not use them and just.... ugh.
This is illegal in 12 states.
although i imagine this future trick may break existing annotations on classes
!e
from __future__ import annotations
def _(func):
code = "\n".join(func.__annotations__["return"][1:-1].split(", "))
def wrapper():
exec(code)
return wrapper
@_
def test()->{
print("test"),
print("hello world")
}:...
test()
@unreal sigil :white_check_mark: Your eval job has completed with return code 0.
001 | test
002 | hello world
It will break everything
let the world burn
did you just use return type to write code
Perhaps
mayhaps
I am concerned for your sanity Jack
wait but thats illegal
!e
from __future__ import annotations
@lambda c:c()
class __annotations__:
def __setitem__(self, name, value):
globals()[value] = globals()[name]
class Number:
def __init__(self, value):
self.value = value
def __pos__(self):
self.value += 0.5
return self
def __str__(self):
return str(self.value)
class console:
def log(*args, **kwargs):
print(*args, **kwargs)
let: i = Number(5);
++i;
console.log(i);
@unreal sigil :white_check_mark: Your eval job has completed with return code 0.
6.0
and yet, there it is.
I do love my future annotatinos
omg
wow
should've deleted globals()[name] for true effect
π
Go all out, yeet: globals()[name]
yeetscript
I need to yeet myself to bed. Thanks for the feed backs @daring jay 
Night you code breakers you. 
globals have been yeeted
uhh, I gave you no advice, that was Reptile
But good night, Preocts
@echo fern thanks for the advice/suggestion! 
I'm very tired...
but I'm telling myself it's Friday and I only work in 4 hours and only for 7 hours at that so I coooould just stay up and play around with a builder model instead
woah it's midnight already I should sleep too
damn
I was going to post this 15 minutes ago, but my internet went out π
@generate_builder()
@dataclass
class RecentQuery:
query: str
max_results: Optional[int] = None
next_token: Optional[str] = None
start_time: Optional[datetime] = None
end_time: Optional[datetime] = None
since_id: Optional[str] = None
until_id: Optional[str] = None
expansions: Optional[str] = None
media_fields: Optional[str] = None
place_fields: Optional[str] = None
poll_fields: Optional[str] = None
tweet_fields: Optional[str] = None
user_fields: Optional[str] = None
i have tons of frogs shouting at me
is there a lib for it
^ you can probably make a decorator to autogenerate the builder methods like this
yeah I didn't realize decorators worked on classes. Now why I thought that, I couldn't tell you.
tbf dataclass is the only class decorator ive seen
dunno if there's any other in the stdlib at all
Imagine this without dataclasses lmao
lol
bruh
is this really how you uninstall stuff on mac lmao
I figured it was the best way to tell Pycharm CE that it ain't welcome on my system
Get off my Mac, Jetbrains!
how rude π
π’
Pycham has been 10,000 times as rude, it almost overheated my mac, I had to yeet the poor laptop into the freezer because pycharm was heating it up
How did you manage that? \π€
bruh
Death to Pycharm. Glory to VS Code.
Glory to emacs
nah
love JetBrains IDEs
same
bruh wtf, my fans are working even if I have nothing opened
always the same on windows
I definitely do not love Pycharm CE overheating my Mac and forcing me to yeet the thing into the freezer.
Sound like a mac problem I guess
Meanwhile I open like 3 different IDEs at once and have no problems :faint:
Well, I have the bad feeling it's going to happen again even when I make the switch to Ubuntu
No contest, death to PyCharm. No joke.
98% of pycharm is bloat
._.
Your mac is broken.
damn
which is why i can't wait to upgrade to linux
linux is not gonna be that good too
1,000% imo
just imagine doing C/C++ development without UNIX tooling
what are linux plus points?
eh
Worse?
I'd say better tbh, since there are so many more tools geared towards *nix than Windows
but how many games out there actually supports linux
Oh wait, you said progaming not programming
I didn't even realized you typoed
Idk about gaming
yes linux not really good for gaming
You'd be surprised
Linux is great for gaming
the only problem is that games deliberately choose not to work
namely because of anticheats
AFAIK and IIRC, Linux also actually outperforms Windows in a good chunk of Proton benchmarks
._.
This is slowly changing, however
More anticheats are pushing to support Linux via Proton
waiting to see stores actually sell computers with linux
in my region they only sell windows/macos
I'm sure you'll find some retail stores with Linux computers
I know Dell and Lenovo have Linux computers
ah i probably havent been in those stores
oohh
do they?
interesting
they do
das good
idk how do i craft a laptop, id like to have a desktop crafted, but uh i want everything to be easy cariable
oh laptops :/
so that i can drop database and run away
you could get a random laptop then just install linux on it
yeah, ive been using windows for too long im afraid that changing an os isnt an easy task
Framework moment
just get one without a preloaded OS
do i need a physical disk to run that os? never seen one of those
uh i mean for .iso files
just build your iso before getting the new one
oh, I understand now
yeah you'd want to go into this with installation media available beforehand
but hey, it cuts down on the price. No paying for a Windows license or whatever
you can run a test version of windows at least with a bootable iso without actually installing it im guessing you can with linux but ive never tried, just to test it
lol i totally didnt get a windows key for 3$ on ebay
that would be baddddd
but ye always test an iso first as building one for the first time is usually sort of confusing, i tried for an hour to use an iso i never made bootable so..
huh?
How'd you manage that
it's literally just like... plug in USB, select iso, click epic button, reboot into one time boot menu, select USB
done
idk i looked up how to use an iso and they said download it, make it bootable, then put it in the pc but never actually said how to make it bootable
but the weird thing was it wasnt getting to bios so I thought my mobo had broke as i dropped it on fabric the other day
[Unit]
Description=Home assistant
[Service]
Type=simple
Restart=on-failure
ExecStart=cd /home/darren/homeassistant && bash start.sh
CPUAccounting=yes
MemoryAccounting=yes
[Install]
WantedBy=default.target
```Whats wrong with my config?
config of what
which linux os should i get (new to programming, first time linux)
ubuntu
would be good
Ubuntu for sure
how's it called again when you merge two meanings of a word in a sentence?
like, I dunno, "I hanged my coat and up on him"
portmanteau?
what
portmanteau is just joining two words into one
nah
like brunch
oh wait
you hanged your coat and you hanged up on him
yeah
that took me a while
there's a word for this, and I forgot it
confusion
got it
zeugma is what I'm looking for, I think
Zeugma (often also called syllepsis, or semantic syllepsis): a single word is used with two other parts of a sentence but must be understood differently in relation to each.[6][7][8][9] Example: "He took his hat and his leave." The type of figure is grammatically correct but creates its effect by seeming, at first hearing, to be incorrect by its exploiting multiple shades of meaning in a single word or phrase.
You held your breath and the door for me
is zeugma like ligma
im sowwy uwu
Zeugma breath and door
He took his hat and his deez
deez what?
interesting

But there is what I think a builder pattern should do. Now to go read up on builders and see if I guessed right
https://github.com/Preocts/twwordmap/blob/main/twitterapiv2/search_client.py#L175-L188
twitterapiv2/search_client.py lines 175 to 188
nanotag = (
SearchClient()
.start_time("2021-11-10T00:00:00Z")
.end_time(datetime.utcnow() - timedelta(seconds=10))
.expansions("author_id,attachments.poll_ids")
)
for idx in range(2):
result = nanotag.search(
"#NaNoWriMo",
max_results=10,
page_token=nanotag.next_token,
)
for tweet_text in result.data:
print(tweet_text.text)```
cc: @echo fern
um
that is some syntax I've never seen before
In [1]: foo = (
...: "foo"
...: .split()
...: )
In [2]: foo
Out[2]: ['foo']
wow and it works \π€
Why has nobody brought this to my attention lol
#PEP8
I think it would look better with the method calls indented another block but I understand why they aren't.
Not sure I have a strong preference of
nanotag = (
SearchClient()
.start_time("2021-11-10T00:00:00Z")
.end_time(datetime.utcnow() - timedelta(seconds=10))
.expansions("author_id,attachments.poll_ids")
)
over
nanotag = SearchClient(
start_time="2021-11-10T00:00:00Z",
end_time=datetime.utcnow() - timedelta(seconds=10),
expansions="author_id,attachments.poll_ids",
)
But having the builder method makes docstrings far more useful
Which helps devs and users.... so I think that sells me on it.
What are the dozen different fields I can add? Oh right, a popup or help() call away.https://github.com/Preocts/twwordmap/blob/main/twitterapiv2/search_client.py#L102-L109 easy.
twitterapiv2/search_client.py lines 102 to 109
def tweet_fields(self, tweet_fields: Optional[str]) -> "SearchClient":
"""
Define tweet_fields of query. Comma seperated with no spaces:
attachments, author_id, context_annotations, conversation_id,
created_at, entities, geo, id, in_reply_to_user_id, lang,
non_public_metrics, public_metrics, organic_metrics,
promoted_metrics, possibly_sensitive, referenced_tweets,
reply_settings, source, text, withheld```
@rocky coyote , couldn't you use .replaceAll()? (per the JS question from pygen)
It seems that I can, my intellisence was not working properly so that did show up. Thanks
If your terminal isn't using utf8 by default on Windows, you should be able to change the encoding of the current session with chcp 65001
@tepid hamlet also this question may help
https://stackoverflow.com/questions/2476953/python-utf-8-howto-align-printout
uhm how do i do that
oh chcp 65001
this is font dependent usually
you'll need a monospace font that supports these symbols
yeah, i was just checking this for pycharmkiller.py 's question.
