« first day (2681 days earlier)      last day (2492 days later) » 

00:33
Whoa, only one row of avatars in the little thing that shows who's in the room.
I show 1.5
chat switched to windows xp and forced a restart. Not everyone has jumped back on yet
00:51
@piRSquared Long time no talk! What's new with you?
sick 2 weeks ago... got over it. got something else. Not really bad, but enough for my wife to keep me away from kids )-:
You? I found out my work issued a new dress code and I'm excited about it.
Oh my. True that it still is the flu season. Hope that's the end of it :)
Comfy polo shirts all week long now
Good stuff. Found a place to work in the summer.
Need to hit the gym soon.
polos are so comfy.
That's good! Gym as in part of a regular routine? Or you need to start focusing on that.
00:55
But I'm starting to outgrow my polos >:(
I think that answers my last question
Need to make it a regular thing... it used to be but this sem has been hectic
you can see I haven't been contributing as much of late
what are you doing at job?
yeah, I noticed
I'll be in Irvine. Working on some hardcore NLP stuff
really? do you know I'm in irvine?
00:57
You are? I thought you were based in Bellevue.
Cool!
Not sure if I told you that my kids got mold poisoning in Bellevue and I moved my family back down to SoCal. I commute every other week to Seattle
Wow, that sounds horrible. Do you fly down?
its probably too far to drive every week...
01:18
Hello everyone!
What u talking?
¯\_(ツ)_/¯ :)
01:37
@piRSquared sorry to hear that
@cᴏʟᴅsᴘᴇᴇᴅ What is nlp?
@Code-Apprentice ty. Happy to report they are way better after a year playing in the sun. NLP == Natural Language Processing
It takes that long to recover from mold?
Probably not, but it takes a while to figure out what to do as doctors have been little help
\O/
Rhubarb all.
Rbrb @simon
02:14
Are you kidding me? I got 194 rep "yesterday" (in SO days)
so close
 
1 hour later…
03:29
@Code-Apprentice Are you gunning for Legendary?
03:41
(Pdb) Organization
<class 'orgchart.models.Organization'>
(Pdb) Organization.object
*** AttributeError: type object 'Organization' has no attribute 'object'
(Pdb) Organization.all
*** AttributeError: type object 'Organization' has no attribute 'all'

where in documentation can i learn how to work with model objects?
@cᴏʟᴅsᴘᴇᴇᴅ that would be nice. I'll settle with Epic for now.
(Pdb) Organization.objects.all()
<QuerySet [<Organization: Globex>, <Organization: Acme Corp.>]>
there we go
how do i query that object?
Organization.objects.where(id:1)
Organization.objects.find(1)
alright! Organization.objects.get(id=1)
04:10
@Code-Apprentice 6 good answers per day should get you there, easily, given enough time (hah!)
days represented 717
rep cap was reached via rep from upvotes *only* on 198 days
earned at least 200 reputation on 271 days
earned 32 reputation from suggested edits
@piRSquared Nice, how do you find this?
It isn't easy to do that... that's for sure
go to the end
Oh, nice... this is the complicated rep bookkeeping they keep doing. What are "days represented"?
This is mine:

days represented 296
rep cap was reached via rep from upvotes *only* on 155 days
earned at least 200 reputation on 187 days
earned 16 reputation from suggested edits
Not sure
04:19
@piRSquared your avatar just blew my mind
who ever thought of adding the other 3 sides to a radius square
(Pdb) Organization.objects.first().users.all()
<QuerySet [<User: janae>, <User: laynetrain>]>

is there a shorter way to just get Orgnization.users ?
@HashRocketSyntax I have to honest... I have no idea what you mean in regards to my avatar. The way I understood it, it is showing the area of a circle overlaid with the area of a square whose side is equal to the radius of the circle. I don't think it's getting cute at all.
rbrb for dinner
@piRSquared i just always thought of it as a line segment and never thought of 4 equally sized squares that could overlay a circle
@cᴏʟᴅsᴘᴇᴇᴅ apparently my answers aren't quite good enough
okay, I should be a little more realistic. 6 is a bit too less.
I cannot cross 200 unless I've written at least 6-10 answers in a day
I don't usually do that many
I had a relatively good rep day yesterday in part because of a fast start shortly after 0000 UT
05:09
@Code-Apprentice I have 20 pages... not 20 answers... 20 pages of zero scored answers.
I have 4325 answers in 2-ish years. Martijn has 18,000 answers over 8 years. Thats 6 answers a day. Practice and you'll get better. That is the beauty of this site. The answers are only partly for the question askers. They are also for you to learn.

What I'm trying to say but too tired to say it well is... keep at it.
 
1 hour later…
wim
wim
06:25
days represented 2259
rep cap was reached via rep from upvotes *only* on 51 days
earned at least 200 reputation on 85 days
earned 14 reputation from suggested edits
@piRSquared kinda weird that you hit cap something like 3-4x as much as me, but still having lower in total? their bookkeeping seems off.
Oh, man. I have a JSON lines file with a few lines malformed, for whatever reason. One such example of an invalid entry is this: {"location": " Pell City (33.56\' 52"N - 86.15\' 00" W), AL"} As you can see, the 52"N is causing parser issues.
I'm wondering if there is a quick and dirty way to fix something like this
There are a total of 26 malformed rows out of 61k such rows of data.
@wim I powered through that hit cap so many times... Way past it on many days. My total rep isn't a good representation of my total activity. But I wasn't too concerned about total rep.
 
5 hours later…
11:30
cbg
 
1 hour later…
13:14
@piRSquared I have 4 pages of 0 score answers, luckily, that's less than 50% though.
13:35
How's it going?
good tending to okay
Superb.
14:22
Is there an equivalent to vars for objects with __slots__ instead of __dict__?
14:53
@Aran-Fey tangentially related: vars was suggested to work for that case (RHettinger's objection near the end)
he does say "vars(obj) is basically obj.__dict__", and he doesn't add an alternative for .__slots__, so perhaps the answer is "no"
He's primarily arguing against changing vars to support __slots__ though, not against having a method that can handle both. But yes, it doesn't look like there's a builtin solution.
yeah, I know, but I suspect if there was a straightforward solution other than try-except use .__slots__, he might have mentioned it
oh, and the end is from last April
Psst
Jan 14 at 23:19, by vaultah
There's inspect.getmembers
eehhhh, that returns too much :P
Isn't that the same list of names as dir?
or is more comprehensive?
15:09
Seems to be the same list, yeah. (Except getmembers returns (name, value) tuples)
The thing is, vars gives me the attributes that are stored directly on the instance. getmembers however gives me a list of all attributes, regardless whether they "exist" on the instance or not, so it's not what I want
so try-except?
doesn't sound that tragic
then again it can have neither .__dict__ nor .__slots__
OH WOW! ctrl+click on the new tab icon creates a new tab right next to the current tab instead of after the last tab in firefox. I'm almost considering using my mouse instead of ctrl+t...
I don't see how a try...except would help me. What would I put into the try block? getattr(obj, attr)? That would give me a bunch of bound methods like __str__ and __repr__ and whatnot, and I don't want those
Basically I want only objects that already exist, and not ones that are generated as they're accessed
try vars(obj), except obj.__slots__ unless that doesn't exist either?
Ah. The thing is, there's a bunch of cases that can trip you up. For one, __slots__ isn't a complete list of attributes - you have to traverse the class's MRO and collect all parent class's __slots__ too
Then __slots__ can contain "__dict__", in which case the vars(obj) will work but won't return all the attributes
And to top it off, __slots__ can be a single string instead of a tuple of strings. There's soooo many silly little things that can trip you up, I'd really prefer not to DIY this
ah...
"single string or a tuple of strings" sounds like bad design
15:24
I could not agree more.
so just hard deprecate __slots__ (dunderbold!), assuming this is for your safepickle :P
Heh. Wouldn't be the worst idea.
good cbg to all
I'm going back to zzz
 
2 hours later…
17:06
weekend cbg
17:17
highly productive day rbrb :)
17:29
New pet peeve... people calling this a csv...
A B
1 2
cbg and rbrb
17:42
days represented 1569
rep cap was reached via rep from upvotes *only* on 4 days
earned at least 200 reputation on 8 days
earned 28 reputation from suggested edits
@cᴏʟᴅsᴘᴇᴇᴅ @piRSquared @wim
I hypothesize that "days represented" is the number of days where one's rep changed.
I think so too
Did you click the link that Coldspeed gave earlier, Andras?
14 hours ago, by piRSquared
https://stackoverflow.com/reputation
oh, it was piRSquared
17:53
@piRSquared I have you beat with 28 pages of 0-vote answers.
I was just disappointed that I got 194 rep the other day. So very close to another 200 rep day, but just not quite there.
wim
wim
@Aran-Fey since vars just gets the object __dict__, and things with __slots__ don't have that, first you'll have to describe what the "equivalent" should actually do!
I thought it'd be obvious, but it's become clear that I was mistaken :(
wim
wim
18:10
not really
for example namedtuple uses` __slots__` to disable the instance dict, but it doesn't use the slots for the variables - the slots is just empty. descriptor protocol is used for the "attribute" access.
also, slots usage can get pretty gnarly when used with inheritance. so just asking "a vars which works with __slots__" is not a well-defined problem
That's gross. What prevented them from storing the variable names in the __slots__?
wim
wim
it needs to be equivalent (and equal) to a normal tuple
Luckily, I don't have to care about tuples. Those get special treatment anyway, so it doesn't matter if their __slots__ are screwed up.
wim
wim
field names are just syntax sugar, they're not real attributes (and not considered when making eq comparisons, for example)
Well, you are gonna have the same question for anything that uses descriptor protocol unfortunately. namedtuple was just a simple example.
Normal tuples don't have __slots__ but namedtuples do. So they might as well store the variable names in there, no?
wim
wim
18:17
@piRSquared csv doesn't have to be comma delimited, despite the name
@wim ok, I'll give you that. but what about:
D1           D1value  D2           D2value  D3           D3value
1/2/2018     21.14    1/2/2018     11.14    1/6/2018     1.55
1/3/2018     19.13    1/3/2018     51.14    1/13/2018    2.66
1/6/2018     19.89    1/14/2018    31.14    1/14/2018    3.77
1/13/2018    20.24
1/14/2018    20.91
wim
wim
you can probably still get csv module to parse that correctly
although it looks like a dataframe :P
it sure does (-:
wim
wim
@Code-Apprentice sounds reasonable
I can't understand guys that are here like half as long as I have been, and have 2-3x as many answers as I do
bcos I feel like I'm here all the time. How can they do it?!
wow, I have 8 pages of zero score answers too
I'm gonna batch delete them all, if they weren't useful then, they probably never will be.
Heh, welcome to the club
18:25
@wim it could be useful for unregistereds
*wipes sweat* arbitrary code execution avoided due to a bug in the deserializer!
wim
wim
@Aran-Fey do you know about the verbose flag on nt ?
namedtuple('MyPoint', ['x', 'y'], verbose=True)
you will find your answer in there
@AndrasDeak Don't care about unregisturds :P
oh yuck, I used to indent my Python code with 2 spaces
@wim Oh, is it because the descriptors defined by namedtuple would clash with the descriptors for the __slots__?
wim
wim
omg, this Telugu character bug for iOS. as if the "login as root with empty password" bug wasn't hilarious enough.
Oh, that's why. TypeError: nonempty __slots__ not supported for subtype of 'tuple'
wim
wim
18:35
nods
>>> tuple.__itemsize__
8
do you think bulk deleting 9 pages of my answers would trigger mod flags somehow?
You won't be able to do this in one day, that's for sure
@wim I once passed names as namedtuple('MyPoint','x','y') and I didn't understand why I got a dump if weird python code printed in the REPL...
@wim yes
BalusC got suspended once for self-deleting (with or without vandalization, I don't know) if their subpopular answers
well, those might have been upvoted answers if you consider George Stocker to be a credible source (I don't)
haha, nice undertones in that post
Apple Users DO NOT click this tweet thread #iPhone #Bug
wim
wim
wow
is there really a hard limit of 5 deletes per day?
The reply to that tweet has the nefarious character
18:50
@AndrasDeak s/if/a lot of/
wim
wim
Wow, bad call from George Stocker
he seems to have a knack for that meta.stackoverflow.com/questions/315696/… (deleted and non-deleted answer of his there)
wim
wim
is that the one?
>>> unicodedata.name('ఞ')
'TELUGU LETTER NYA'
@wim Now now, don't be a turd. Even if it's just apple users
wim
wim
I'm an apple user
18:53
hmm, "messaging and email apps", so perhaps browsers are fine?
wim
wim
yes, am on my macbook right now
apparently it's a notifications bug
@AndrasDeak LMAO it's the same excuse of just getting on/off a plane!!
wim
wim
@vaultah omg
locked I understandd, but deleting everything? why?
Does the bug even affect mac? It sounds like it is just iOS.
19:10
@wim yup...
@vaultah :|
wim
wim
3 strikes...George Stocker should have the ♦ revoked.
19:46
Evening Cabbage all.
20:33
Hmmm... I'm trying to do a many-to-many between Profile and Organization.
If I put the Profile model first in the file I get `NameError: name 'Organization' is not defined`
If I put the Organization model above in the file I get `NameError: name 'Profile' is not defined`
I want to be able to access orgs from profile, and profiles from org
20:53
Got it working if I lazy loaded the model that was lower in the file
organizations = models.ManyToManyField('Organization')
Is that a bad idea?
wim
wim
Nope. That's the correct way to resolve the issue.
21:43
I feel I'm about to be condemned for posting that...
~nya
sudo apt install nyancat and replace your login shell with that, as a punishment
OK Wait a second...
Oh wait: `'sudo' is not recognized as an internal or external command,
operable program or batch file.`
@ByteCommander I'm on Windows :p
Then no more punishment is necessary :P
XD I'm really feeling that at the moment.
i remember my first computer
21:53
Hi. Is there a Dash Framework chatroom?
It's the Z1.
@Simon that is enough punishment then
Oh, someone said that already
@AndrasDeak thanks
21:55
@ByteCommander I'm punishment safe...
@ByteCommander Check this out: youtu.be/wZZ7oFKsKzY
shall I really dare...
I dare you to :p
And listen to it for the full 10 hours
anyone know how to get a console in the error page for django?
22:12
@Aran-Fey I didn't know you changed your username. It looks cool.
Thanks. It took me a couple of months to find one I liked :)
ah, ex-Rawing
didn't notice either
22:50
weird, so i know that i have 2 orgs associated with my request.user.profile in the db, but the queryset appears empty?

(Pdb) request.user.profile.organizations
<django.db.models.fields.related_descriptors.create_forward_many_to_many_manager.<locals>.ManyRelatedManager object at 0x10fc8d828>
(Pdb) request.user.profile.organizations.all()
<QuerySet []>
(Pdb) request.user.profile.organizations.objects.all()
*** AttributeError: 'ManyRelatedManager' object has no attribute 'objects'
ah nvm, the django admin ui was tricking me.
voting no MCVE; entry_1.get will trip them up later anyway

« first day (2681 days earlier)      last day (2492 days later) »