« first day (3899 days earlier)      last day (1032 days later) » 

8:02 AM
cabbage
 
cbg
 
8:53 AM
cbg
 
cbg
 
 
1 hour later…
10:14 AM
cbg
 
10:57 AM
cbg
 
11:45 AM
Hi everyone. if I have a column having datetime values at an user id level of granularity how do I count distinct datetimes for each user id making sure that datetime differences of 5 minutes or less are counted as a single entity for each user id?
 
You will need to resample
Actually, this is a continuous data source? So you want to look at consecutive results and always break a group if the gap is more than 5 mins?
 
so if there is an user id 'A' and there are datetime values '2021-06-19 14:20:43' and '2021-06-19 14:23:32' the distinct counts should be 1 for this user id
basically I shouldn't compare across different user ids but only within an user id
 
12:05 PM
Makes sense. If you give me an example df to play with, then I will
On a high level, you're probably going to need shift to get the next datetime stamp and then do a check against the timedelta. Then categorise it
 
 
3 hours later…
user15071349
3:31 PM
Hi i am new here can anyone tell me how chat feature works ?
 
4:41 PM
@Spartex welcome to the room, this is pretty much a normal chat room online, you can read the room rules sopython.com/chatroom to know more about this room
 
user15071349
5:06 PM
Ohh Can anyone tell me why i am banned from asking new questions ?
 
@Spartex That's maybe because you deleted some of your questions.
 
5:29 PM
@Spartex no, and asking for upvotes is bad form
 
user15071349
ok sir I will not do it again. I am really sorry
 
6:47 PM
Welcome to the Incurable Optimists Club. There's a special cake in the fridge over there, go have a bite to celebrate. At least I'm pretty sure someone brought a cake this time... There's no way we'd forget to prepare one for the 7th time in a row, right?
 
That's quite an optimistic thing to say...
 
RIP context. Oh well, I'm sure people will get the joke anyway.
 
I like it this way :P
 
We still have the cake, though, right? I don't need context to enjoy cake
 
7:00 PM
Well, to be honest, I didn't bring any cake today... but one of the other members probably did. I mean, there's a whole 2 other members. (Yourself included.) That's a lot more than we usually have. One of them definitely must've remembered. Especially after the last 6 times.
 
Oh, I was just an imposter at the meeting, purely for someone else's cake. I was at the Catastrophists Monthly Meet in the room down the corridor and someone told me there was cake to be had
 
7:21 PM
Hi, I'm trying to mock tests for cache.get('menus-a') which returns a list [Object, Object] like this mockcaching.get(f"menus-a", results) then mockcaching.get.assert_called_with(f"menus-a", results). Is the setup right?
 
That doesn't look quite right to me. If you're trying to test cache.get, why are you calling mockcaching.get?
 
7:50 PM
def mockcacing(mocker) has mocker.patch("flask_caching.Cache.get", return_value=_mr)
_mr = mocker.Mock(name="mockcaching")
 
Now it makes even less sense why you'd call mockcaching.get... given that mockcaching is a function and doesn't have a get method
 
What about
with unittest.mock.patch('flask_caching.Cache.get', return_value=results):
 assert cache.get(f"menus-{search_term}") == results
 
Assuming that cache is an instance of flask_caching.Cache, that looks correct
 
8:06 PM
Cache is Cache()
 
That's probably not particularly helpful for Aran. You could create any arbitrary class and call it Cache. He's asking where it comes from
 
from flask_caching import Cache -> cache = Cache()?
 
At this point I've given up on asking tbh. I'll just assume that the problem is solved unless new questions come along
 
Fair enough. I should be able to field flask questions, but flask_cache and mock is not a winning combo for me in terms of being able to help
 
I'm starting to look forward to these being a daily event
 
The question is whether Aran will bring the cake
In truth, I don't really know what happened there, so hopefully it won't be daily
 
something was in the cake
 
With all this stuff that's been happening lately, my opinion is quickly shifting from "everyone deserves a chance" to "nobody deserves a chance"
 
8:59 PM
I'm all for chances
people don't tend to take them, somehow
 
To be fair, they definitely tried to explain. It absolutely didn't work out, but they tried. But then, at the end... that was the opposite of trying, that was distorting history to make us the bad guys
 
I don't believe they did try to explain. They could have taken a step back and made something clear, but I could tell that it wasn't in their personality to do that
 
@AndrasDeak I, for one, am not wearing a cap with a skull on it. I don't know if you ROs have a uniform like that, though ;P
 
At the end of the day it turned out well because we rarely part ways with "have a great life". That's something to value.
@Aran-Fey as far as I know we're only uniform in the "orb of energy" sense
 
9:08 PM
I'll try draw blood from a stone if I think the person might be really trying. In this case, it just didn't strike me as a person that we could usefully help. My spidey sense seems to be correct with their final message
 
probably not worth ruminating more about
 
Indeed. Back to peaceful waters
 
Although that "draw blood from a stone" idiom gives me pause. It must be pretty rough to be the physician of The Thing.
(The Thing as in Fantastic Four, rather than The Thing as in Kill It With Fire Oh No Not The Dogs)
 
Diamond-tipped (or even in its totality) needles?
 
I don't think polycrystalline diamond is that strong, and I'm certain you can't cut a single crystal in a needle shape.
Dentist's drill?
 
9:15 PM
Alright, I've got a bit of a strange question. There's a repo I'm thinking of contributing to. But there's a bunch of problems with that:
1) It's poorly documented
2) It's messy (very WET)
3) There are a few design decisions I'm unhappy with (particularly the GUI)
So the question is... how terrible of an idea would it be to fork it?
I expect if I make too many changes, merging future commits back into my fork would probably take a lot of effort... right?
So I guess what I'm asking is if anyone has experience with maintaining a fork
 
Is the repo still well-maintained?
1) and 2) sound like things you could fix on the main repo, but 3) is less likely to fly
unless you can convince them to provide an option to choose your good GUI, but that would probably be more maintenance burden for them than worth anyone
 
How big is that exactly? All of 1, 2, 3 imply its not a code-base you want to work with. If it's small enough, start from scratch instead of forking and throwing away most of it.
 
you can always list the original repo as inspiration for how not to do it ;)
 
@AndrasDeak Yes. Every time I check the repo, there's a commit from the same day. The author's definitely putting a lot of work into it, and starting to attract an audience (and PRs).
 
Out of interest, why are the PRs not being dealt with? If it's a library that you could make use of, then I would assume a relatively high level of proficiency on the part of the maintainer
 
9:26 PM
Sounds like it would also be a lot of work to keep new changes comply with 1) and 2) even if you can somehow fix them
 
@MisterMiyagi Tough question. I've written a program like it in the past, when I was still more of an Italian chef than a Software Engineer. I've started writing a new version of it, but I'm running into tough design choices everywhere and it's once again starting to look more like a dish than a program.
 
@roganjosh did he say PRs are not being dealt with?
 
I've extrapolated from a) It being WET and b) it attracting PRs
 
Broken windows suggest the PRs might stick to crap style too
 
Tbh I don't know how quick the author is to deal with PRs. I can see there are currently 3 PRs waiting to be merged
 
9:28 PM
you can always look at closed/merged ones
assuming there are any
Of course there's also the obvious option: raising an issue pointing out what you said here, asking whether the author/maintainer would be open to substantial changes of this kind.
they might say "oh wow, that would be awesome" or "no way, hands off", both of which would make the choice for you
 
83 merged to date, 14 closed, 3 in limbo. Seems like most of them are dealt with quickly. One of the 3 pending ones is almost a year old though, I guess it probably has some issues
 
Are there things like CONTRIBUTING.md? Or does it just float in the air?
Is there a test suite?
 
@AndrasDeak Yeah, I'm basically trying to find out if forking is more or less work than doing that. But I guess it wouldn't hurt to start by giving them some feedback
 
I guess it's not without precedent that forks end up joining back upstream
 
There is a test suite, but... well... the average test is ~70 lines long with multiple asserts scattered throughout
To be fair, they're split into multiple steps with an @test_steps decorator (and a bunch of yields), but still
Alright, I could answer questions about the repo all night, but I think I got what I wanted. I'll start by giving them a piece of my mind and go from there
Thanks folks
 
9:36 PM
"Annoy with questions until they just ask" strategy is a success!
 
Truth be told, we also have a couple of repos that just seem disco dead because people have other things to do. Sometimes, all it takes is a little... push. To get the thing working again, I mean.
 
Sounds like it's working, but the way it's working is not to his liking.
"We're not dying; this is how we live"
 
It's kind of fascinating. The code I wrote for this is shaping up to be good and horrible at the same time. The development goes like: 1) Discover problem. 2) Discover metaprogramming as the "solution" to the problem. 3) I now have good code that's simultaneously horrible because it's meta.
I wrote my own version of @dataclass that works better with multiple inheritance. Need I say more?
 
2.5) Discover you now have two problems.
@Aran-Fey I didn't find the one I was looking for but monkeyuser.com/2020/early-contributor and monkeyuser.com/2019/code-entropy both seem relevant :D
 
9:52 PM
Hahaha, now forking/writing my own is starting to look more attractive again!
 

« first day (3899 days earlier)      last day (1032 days later) »