« first day (3896 days earlier)      last day (1035 days later) » 

2:02 AM
Can anyone help me on this? Or should I make a question? chat.stackoverflow.com/transcript/message/52335457#52335457
 
 
4 hours later…
6:05 AM
@12944qwerty that doesn't look like a Python question at all
 
6:47 AM
Should answers like stackoverflow.com/a/67997641/13382000 be voted to be removed or something?
 
@CoolCloud primarily downvote wrong answers ... in this case probably just vote to close the question too
 
Kay, done :D
 
Hello,
first message on the chat. I have a quick question about coding I did a formal post already but one of them can be answered without really spending time investigating the entire case deeper I might be missing something obvious ... may I ask it here ?
 
7:08 AM
You can ask the question here, sure. Given that it is not there in the main site
 
@CoolCloud Thanks :) !
for context my post is the following one: https://stackoverflow.com/questions/67992009/outlook-auto-flag-using-while-loop-and-win32com

Right now I'm throwing my brain on a wall to understand why my loop allows to execute iterations with not all conditions fulfilled.
here is a snapshot of the code:
message = folder_inbox.Item[i]
for y, z, in zip(df_excel_mail,df_excel_flag)
if message.Categories == '' and y == message.SenderEmailAddress
message.Categories = z
without being able to explain it sometimes I have iterations with message.Categories which is indeed empty but
 
Did I not say, to ask the question only if it is not asked in the main site....?
People who can answer the question are already viewing it and if they know, they will answer it too
Please read our rules here before asking question.
 
oh sorry I got your reply wrong
 
8:06 AM
In numpy, how do you remember which methods are defined on the ndarray class and which aren't? For example, in numpy.abs(diff).sum(axis=-1), how do I know that abs isn't an ndarray method?
 
with time
at least you can use abs(diff) to golf off a few characters ;)
 
lame :(
 
the alternative is waiting for the AttributeError
They are very carefuly about API surface area these days, I think all of these quirks are debt.
 
I spent 2 minutes trying to figure where my typo in img.subtract(rgb) was that was causing an AttributeError... then I realized it's numpy.subtract
 
8:24 AM
why not img - rgb?
 
I thought I'd have to pass some arguments to make it work correctly, but that ended up not being necessary
 
(subtracting a (r, g, b) tuple from each pixel in an image)
 
cbg
 
@Aran-Fey yeah, broadcasting does that
 
8:38 AM
Knowing pandas (a little bit), I thought I'd have to pass axis=-1 or something, but nope. Numpy even does it correctly with a 3x1 or 1x3 image
 
not really
I mean, depends on what you mean by 3 x 1 image
if that has shape (3, 1, 3) then yes
 
yeah
 
A 3-length tuple is compatible with shape (3,), (1, 3), (1, 1, 3), ... in terms of broadcasting. So any number of leading dimensions are OK as long as the last dimension is 3 long.
pandas is weird and 2d
the broadcasting rules are largely what makes numpy code concise
 
Yeah, I saw that in the broadcasting docs. It's nice when things are, y'know, documented and predictable. I can't remember what I used pandas for, but I ran into a problem where the code did something different if the dataframe's dimensions happened to match another array's (or Series, or whatever it was)
 
yeah, that's probably due to how in pandas rows and columns have very different semantics
I don't like it at all. But then again I also don't use it so it doesn't bother me much.
 
8:49 AM
Has anyone ever seen a nice implementation of a CLI tool with a bootstrapped update in Python? e.g. mycli update which updates itself?
hmm doesn't poetry have an update command? I guess it probably uses its own code to install it
oh but it also has its weirdo vendored install....
 
Well, most scripts are installed via pip or the OS's package manager, so they don't need to update themselves. Poetry is one of the few that wants to be installed in a weird way
Maybe I should've said "the only one", because I actually don't know any others
 
Yeah. I guess you need a bootstrapped way when you force a non-standard installation outside of a pkg manager. Ok, I guess I don't want to do that after all.
My use case is more akin to refreshing some artifact rather than actually reinstalling a package.
 
If it's like a cache, then I think it's fairly standard to have the user delete the corresponding file. But if this has to be done regularly, then you'd probably still want to implement a command for it
 
9:05 AM
I think I'll probably do something like place the file at install time into pkg resources, and when the user runs the update command, download it and replace the pkg resources file.
Hmm seems all those gears are intended for read-only
Is there a usual way to do this, outside of the user providing the directory? I figured pkg resources was a good way to get it cleaned up automatically on uninstall.
I guess I'll just do it all at install time, and a fresh install will refresh the artifact.
 
9:21 AM
cbg
@alkasm which is exactly the reason why it has a builtin update in the first place
 
@Arne yeah realized that after talking it out a bit more!
 
you can put your artifact into appdirs: pypi.org/project/appdirs , user_data_dir sounds like the place to go
no cleanup though
 
9:42 AM
neat, haven't seen that before! thanks for the suggestion.
 
10:17 AM
hi
 
Hi guys
Do any of you know how I would calculate the length of a curve in python...
I saw an answer to something similar, but I didn't understand how to implement it
https://stackoverflow.com/questions/58738928/python-plot-find-the-geometric-length-of-a-curved-line
or do you reckon i should break it into a bunch of straight lines an then use Pythagoras to find the hypotenuse... seems a bit too rough of a calculation.. was hoping to get something more refined
 
@cmk101010 How is the curve defined?
 
10:32 AM
imagine a parabolic curve.. the values are in a dataframe
I mean it can be converted to a numpy array ofcourse
 
If the curve is defined as a numpy array, it's already broken down into a bunch of straight lines.
 
erm, sorry I didnt quite understand whaqt u meant.. Yes it is a bunch of vertices... Oh you mean to tell the curve is actually all those straight lines
 
I mean, representing any non-linear curve with an array is already an approximation. So yes, I think, the straight lines between those vertices is as good as you can get in generic case. You can increase the sampling frequency, though, if possible.
 
true, but I'm limited by my data there, and I don't think I want to calculate the mid point between each vertice
 
11:01 AM
^ some discussion of which dupe target. I retracted my first suggestion on which target. But it's definitely a dupe.
 
11:17 AM
^^ Ah forget it, the OP eventually adds, buried in a comment In my input data, it seems when the logger with which the data were collected runs on low power, it introduces some special characters, like "v".
 
11:58 AM
Just curious, how often has anyone seen serial voting happening?
 
Maybe once or twice a year I'd say
 
I know of one user who was downvoted, not sure if they still are a target
 
Weird. I've been on SO for like 10 years, but have never seen this before yesterday.
After investigating the case I found that the cause was my comment telling that int(x) + 1 is not the same as math.ceil(x). People are weird.
 
if you so sure it is the user you think it is, I guess you can raise a mod flag meta.stackexchange.com/a/28758
 
They have already detected it automatically (surprisingly fast, btw).
@python_user but thanks, will save that for the future.
 
12:03 PM
that is most likely the script from what I know, if it happens every other day you could try that
 
 
2 hours later…
2:05 PM
Hi everyone I have a simple question but am quite confused
How do I check bias variance tradeoff for a logistic regression model(lets say the one we have from sklearn)?
 
2:19 PM
@JohnSohn please explain this message:
20 mins ago, by John Sohn
can we skip ahead to the point where the help was provided instead of chatting with bots lol
 
andras deak: oh this seems very very familiar is all, real deja vu
 
@JohnSohn Sounded like you were vocally unhappy with the quality of the free help you were given, and you might think you're entitled to.
@JohnSohn Let me be very clear: coming here and making snide remarks at the people who are kind enough to try and bail out your "python noob" self will not be tolerated. I'm -><- this close to kicking you. I suggest starting over and being real careful how you approach help here.
 
I entertained the idea of a kick as well, but I wasn't completely sure whether I and my friends were being compared unfavorably to robots
 
Knowing your usual tolerance: if you entertain the idea it's probably merited :P
OK, having given the transcript a second look let's call it even and trash all that
 
In any case I have dispensed all the C-related wisdom that I possess, so I will go away for a short time
 
2:27 PM
@python_user it runs each day
 
I remember these kicks I used to get :), thanks to them , I have improved(maybe a little ) @AndrasDeak
 
@RaphX you're not a problem at all, so you definitely have ;)
 
:D
 
You guys are too nice.
3
 
2:36 PM
@cmk101010 as bereal said, your data by definition corresponds to a piecewise linear function. If you want something better than that you have to interpolate your data, which is not a well-defined task. You can choose a given kind of interpolator, interpolate, and then integrate the length of the interpolator. Only you know what model makes sense for your data.
@Aran-Fey yeah
 
It's always so nice coming back to chat after being stuck in a meeting...
 
Room 6 is the gift that keeps on giving. Sometimes blood, sometimes entertainment.
 
@AndrasDeak Admittedly, I've complained about your moderating being too aggressive in the past, but this... this was something else
 
@AndrasDeak piecewise linear function! Yeah, was looking for the word. I have not heard that name in a long time.
@AndrasDeak Sometimes, both.
 
@AndrasDeak Good share of both. Keep up the good work, ROs.
 
2:40 PM
<3
 
Let me second that. You've sure had a lot of work to do lately. Especially @roganjosh has been shouldering a lot of it
 
I thought Room 6's motto was "Thank goodness we're not Room 11"
 
Thanks, all :)
@Machavity nah; it's been 17 for a long time
 
lol
 
So are you here to arrest me?
I knew this day would come...
Now where did I put those smoke bombs...
 
2:51 PM
@smci Right I already solved the issue the other day by converting to string as mentioned here
 
Well, you were "reported to stack" or something. I just dropped by to say "carry on" ;)
 
@Machavity Hehe, thanks, that's much appreciated
 
I'm a little lost on what this message means. I realized I had pyqt5 installed through the conda prompt 2 years ago. Then I installed PySide6 on the same environment using pip
Strange thing is I can't do a conda install PySide6 as it doesn't exist in the packages supported but it detects PySide6 when I do conda list. However, pip cannot detect the pyqt packages installed in conda
Looks like conda supports until PySide2 only and PySide6 is only available in pip
Anyway i'll just scrap the environment and make a new one probably too messy
 
vin
3:39 PM
is there an pythonic way of implementing a factory pattern without all the if cases ?
 
What are the if statements for?
 
vin
if statement are basically to choose an instance category based on some type
 
sounds like a job for a dictionary
 
4:06 PM
Hello, any hint on how to do this problem? I know what decorators are and how to decorate a class, but what I don't get how to add the attribute .get_change in class and instances attribute without affect their regular algebraic behaviour, and since I don't know in advance the attributes type I cannot have an inheritance.
(How this "last seen" thing works? Is is automated refreshes or people literally check every once in a while?)
XD
 
"Last seen" updates when the user interacts with the site, I think
 
BTW, from regular algebraic behaviour, I mean their regular properties, like if self.a is (used|initialized) as an integer, then it should show all property of integer (except of not having .get_change )
@AndrasDeak Cool, thanks.
 
"Copy constructor"? Do we say that in python?
 
(IDK, heard that in C++)
 
I kind of get what they mean but still
 
4:12 PM
Yeah we don't have a formal concept of copy constructor
 
(BTW ( BTW I'm still replying to my messages),only way that I can think of have is have a class with .get_change attribute, but this will destroy native properties )
 
"without affect their regular algebraic behaviour"... where does it say that's a requirement?
In the example they only set and delete attributes. They never read one
 
I'm trying to decide whether the problem, when read exactly as written, requires that a.x = 42; print(a.x) actually outputs 42
 
(Oh, they've in test) (wait, I've to try to paste some code here == 12l ines :P)
@change_detection
class Struct:
    x = 42
    no = None
    def __init__(self, y=0):
        self.y = y
        self.u = U(4)
        self.uuu = None
    def f(self):
        if self.tt.get_change:
            self.tt += 1
        else:
            self.tt = 0
(So, yeah self.tt += 1 is that)
Some other test too: test.assert_equals(2 * a.y + 20, 42, 'Integer attributes should work as integers')
 
I don't know if this has anything to do with the intended solution, but are you familiar with the descriptor protocol? It's one of the lesser-known ways of having more control over what happens during attribute access in your class.
 
4:21 PM
Ugh, that's a weird requirement then. weakref.proxy might help.
 
(Yes, I know what descriptor protocol is)
 
It's extra lesser-known because half of readers look at "descriptor" and think "oh, like that @whatever syntax I learned last chapter? Yeah, old news. Skip!"
 
I don't think descriptors help here tbh. Looks like a job for __setattr__ and __delattr__
 
Hmm, yeah, I'm leaning towards a __setattr__ approach now
Whenever I override the attr dunders, I can never get it right on the first try, and I end up infinitely recursing one way or another
 
The Leaning Kevin of Room 6 will soon start attracting tourists from all over the world
"This is Kevin. He has really bad posture." "Wow! Let's take a picture!"
Sorry, my brain is doing weird things today.
 
4:37 PM
"Don't forget to visit our gift shop", I say, leaningly
 
@Kevin Decently sure you just have to delegate the work to super().__set/get/delattr__
 
I agree, and yet my paranoia remains... Maybe I'll give it another shot.
 
With duck typing being so prominent, people tend to forget about the obvious "let your parent class handle it" solution
 
5:02 PM
Bah, super().foobar = 23 doesn't do what I want
 
@Aran-Fey It's been some good fun <rocks in corner>
Has anyone proxied requests through their web server before? I have a flask app that needs to communicate with one of our backend services. The webapp itself is on https and the backend service is on http. The browser sending a request to a http service is a no no, especially an internal one. I've tried to get it so that the frontend library actually hits a Flask route, I do the request from the backend, and then just return the response
In my head, I can just get the backend method to make the request with requests and then just return the JSON response it got back to the front end. But it is... changed...
And I don't know how it's changed. But every representation I can think of to return a faithful requests.response object back to the JS calling library just won't work. I know I'm being vague but I don't expect help unless someone has even tried such a setup, and then I can elaborate
 
5:19 PM
Take my sincere best wishes, and may the road rise up to meet you
 
Mm, that song's got good energy. Oh, to be an ally of justice that lives off the land and follows the setting sun...
 
5:35 PM
"and may the road rise up to meet you" just immediately triggered the memory (even if it's not a lyric in itself) :)
 
Hi, I'm new to chat - can someone help me with this error on pandas?
IndexError: boolean index did not match indexed array
 
In order to be a penniless yet somehow not malnourished folk hero, you need to regularly stumble upon enough free nutrients to keep you alive. It essentially requires the spirit of the land itself to guide your footsteps -- thus, the road rises up to meet you.
@AV111 My vague advice is, try to make sure all your data is the same shape.
 
@Kevin But the problem is the dataframes can;t be of the same shape. One has all the data i need, and the other is like a small list of data need addition to the first dataframe. My problem is better described here - stackoverflow.com/questions/67993241/…
 
Well heck.
 
@Kevin I dont know if i'm breaking chat decorum by posting this question on here
 
5:45 PM
Eh, maybe a little. I'll allow it.
 
Given your free pass on this, I don't understand what df1 and df2 have to do with your question. The only relevant df is df3
df3.pivot('Name', 'Property', 'Name').notnull() is also probably the best approach, too
 
So I simplified the dfs for the question. But my actual problem has many more columns that i will be replicating my action inside the for loop. DF1 is a list of Dataframes, DF2 is picked from the DF1 list and can be many dataframes cycling through. DF3 has 300+ columns
 
Then df2 is totally redundant in the context of your question. You have initialised an empty container that df3 becomes (with the filling, too) during the pivot operation. df2 is a redundant intermediate
 
The pivot solution only works for my example case, but i cant expand it. So the best approach for me would be for this to work : df2.iloc[df2['Name'].isin(df3['Name']) & (df3['Property']==cols), col_index] = 'Yes', where i will be updating col indexes
 
Expand it how?
 
5:55 PM
df2 is the dataframe that gets written to excel and ingested elsewhere. SO its the target and i cant chage its structure.
Expansion examples
1) df2.iloc[df2['Name'].isin(df3['Name']) & (df3['Property1']==cols), col_index] = 'Yes'
2) df2.iloc[df2['Name'].isin(df3['Name']) & (df3['Property2']==cols), col_index+2] = 'Yes'
3) df2.iloc[df2['Name'].isin(df3['Name']) & (df3['Property3']==cols), col_index+4] = 'Yes'
So that line gets repeated 15 times with slightly different conditions. And the for loop applies this X number of times, X being the number of values in df1
 
But those columns have to exist beforehand. Do they?
 
Yes they do
 
Then you probably want an outer join or a merge
 
anyone up for a suggestion review?
 
You said you're doing this in a loop too. As an aside, in terms of questions, you need to cover this in an MCVE. The answer you've been given totally addresses the problem you described, so that's why you've not had the help you expected
 
5:59 PM
So in my actual problem:
DF1 has 7 rows
DF2 has 201rows, 380 columns
DF3 is from a list of 7 dfs (7 df names from DF1)
whats an MCVE
 
[confetti falls from the ceiling]
 
got it thanks
so that is going to take some time for me to do. Thanks, I will post a link to it here when i do
 
Take your time, you can't rush greatness
 
@AV111 The best thing you can do is to make the dfs build themselves too e.g. df = pd.DataFrame({'a': [1, 2, 3], 'b': [4, 5, 6]}) then we can just copy/paste the code straight away and get solving the problem, not faffing with trying to copy from the clipboard. You only need tiny dfs to demonstrate the issue
 
6:09 PM
@AmitDash As in, you post some code and we give our opinions about it? I could do a bit of that, yeah
 
hey Kevin, I had a pending suggestion review here, and was wondering if someone can help - stackoverflow.com/review/suggested-edits/29210756
 
Ah, a suggested edit review. Ok, I can do that too.
 
@AmitDash what's wrong with the edit review queue?
 
I don't mind approving edits that make small improvements to capitalization and language style, etc, although I think a lot of editors consider that too minor.
 
I would consider the edit approvable, but certainly not one to bring to the attention of the room. It doesn't change the question and, as Andras has suggested, there are mechanisms for this already.
 
6:16 PM
thanks Kevin
as you said we need to keep stumbling into such minor improvements as enough nutrition for our penniless folk hero :)
roganjosh / andras
the edit review queue is a bit slower than usual, but I agree with your suggestion
 
So do I post the code here?
 
If it's bigger than about ten lines, the usual protocol is to upload it to pastebin or dpaste or gist or similar, and post a link here
 
can I edit my original post with the code, so that question becomes better?
 
Hmm, the more answers you've already got, the less you can get away with changing the final goal
Although the consequences for doing so are probably no more dire than "the people that already posted become mildly irritated"
And it's certainly possible to spin it as "my goal is exactly the same as when I first posted, I'm just doing a better job of explaining it now"
If you yourself believe that to be true, even better
 
@AV111 I wouldn't touch the post at the moment because it will invalidate the existing answer. We can try handle the extension here
I'm just about to go for a wander, but I can have a look at it shortly if others haven't helped you beforehand
 
6:30 PM
My normal numpy abilities are weak, but I gain a 10x effectiveness bonus if I'm given an A+ quality MCVE
 
Shame that this one is pandas, then :P
 
I'm sorry, I can't distinguish the two unless I have the MCVE boost.
 
But on another note (without having seen the new code) I appreciate your willingness to take the feedback and go back to make an MCVE. That in itself is often tough to get people to do. Hopefully the experience will help you with future questions, too, or even solving the problem yourself before it gets to a question (I solve a lot with my own MCVEs before I need to ask)
 
0
Q: IndexError: Boolean Index did not match indexed array

AV111I am trying to solve this issue in a specific way. Would love pointers on how to proceed. I have df1, which is: df1 = pd.DataFrame({'Model': ['model1', 'model2', 'model3']}) Then there is df2, which is: df2a = pd.DataFrame({'Model' : ['model1', 'model1', 'model1'], 'Rule' : ...

I updated the post. Will comment to explain the reasons for my edit better
 
import numpy as np
arr=np.array([1,3,2,4,5])
print(arr.argsort()[-3:][::-1])
please tell me how to read [-3:][::-1]
 
6:35 PM
@roganjosh Thanks, I'm trying stuff with the MCVE on my end. I see how it clears things up, might make it easier to better understand the problem myself and hopefully stumble upon a solution myself.
 
Assuming 1d arrays have similar behavior to regular lists, then [-3:] means "take only the elements three from the end and later", and [::-1] means "reverse the order of the elements"
I wonder if the official docs give a good introduction to slicing anywhere... docs.python.org/3/tutorial/introduction.html#lists mentions the [-3:] idiom, but not [::-1].
You can figure out the precise behavior by reading the language reference, but that's a far cry from a good primer
 
The slice() docs are also not particularly illuminating for someone not in the know docs.python.org/3/library/functions.html#slice
 
6:51 PM
@AV111 That's a drastic edit, so be wary about doing that in the future because it does change the input you got from others. That said, it's much better for describing your problem
 
@roganjosh Thank you I'll keep that in mind while formulating questions in the future.
 
@Kevin thanks
 
7:08 PM
if i am trying to reverse lookup python variables using ctypes and achieve retrieving a variable from its id. Can i get any where near to overflow or detect objects in memory, if i hypothetically manage to brute force, and somehow getaway with seg faults ?
 
I don't think that would cause an overflow. And if it did, I don't think it would harm anything that can't be fixed by rebooting
 
can i access objects and other credible chunks of information if i manage to randomly reverse look up using id ?
seg fault being a miss case, others being hit
 
I'm tempted to say yes, but the last couple of experiments I did to circumvent normal object access procedures, crashed a lot faster than I thought they would. Maybe python is more sensitive to that kind of thing than I'm imagining.
If you want a semi-reputable way to see all living and accessible objects, you may be interested in docs.python.org/3/library/gc.html#gc.get_objects
 
@AV111 We can start to get close with this approach but I'd like to suggest that the transposition is not a useful idea here. Do I continue down this line or can I get rid of .T?
 
Numpy question: I have an array and I'd like to get an arbitrary element for which a condition is true. Let's say < 5. Of course I can do arr[arr < 5][0], but is there a way to do it that doesn't pointlessly compute < 5 for 99% of the elements in my array?
 
7:19 PM
In no-numpy-allowed land, sometimes I do x = next(item for item in seq if item < 5)
 
Other than doing a single pass before you want to grab a random value, I don't think you can avoid evaluating the whole array
 
Alright. My array is tiny anyway, I'm just asking because I'm curious
 
I'm taking "arbitrary element" to be one that is picked at random, not sequentially
 
@Kevin I Will Look Up, thanks
 
@roganjosh Can we do it by my approach instead? I really want it to follow the iloc conditions approach.
 
7:22 PM
Poking around on Google gives me the impression that numpy doesn't try super hard to optimize "find me the first X that does Y" because it's so focused on parallel operations
A True Numpy Fan would be running his script on a million core machine, in which case "find the first X that..." is no faster than "find the first million Xes that...". [citation needed]
 
@roganjosh Not quite sure what you mean, I'm afraid. Both "randomly" and "sequentially" fit the description of "arbitrarily". Maybe this helps: The elements that remain after arr[arr < 5] are all completely interchangeable. It literally does not matter which one of them I pick. I just need one.
 
@AV111 I do have to ask why, at this point. Are you sure you've not just made this overcomplicated? What you're asking for is similar to the notorious variable number of variables question. Whatever you do downstream of this is gonna get complicated
 
@roganjosh because i need to expand this to my dataset which has 300+ columns. Let me try out the pivot solution a bit more
 
Then you're really complicating things
You do not want to expand that out into extra columns. You want it as a variable in rows
@Aran-Fey ah, so something like an early termination once you've found the first value that satisfies your condition? In that case, I'm not aware of any method to do this; I don't think there is a next() equivalent to evaluating that condition - it's more like a list comp
 
@roganjosh Unfortunately yes, because I need to be able to 'col_index+something' or something similar to that, whcih can be applied to 15 columns per "model" (there could be upto 15 models, so 15*15 different columns
 
7:30 PM
You don't need to do that. You've chosen to do that and avoid filtering the df on a single column
 
@roganjosh Yeah, exactly
 
@Kevin a lot of methods don't actually run multi-core :'(
 
@roganjosh correct, but i cant change the structure of the output DF, which i got from importing a file out of a product. Thats a constraint
 
Oh, man. I'd forgotten that. Back to the editor :/
 
Just putting this out there, if you have in mind a way of brute forcing this that requires you to write 15*15 lines of mostly identical code, then that may in fact be the most efficient solution in terms of developer time :-)
15*15 isn't even 256, which is like the smallest number
 
7:36 PM
I'm basically doing this to build a tool to automate that stuff. Today, those 15*15 is being done manually in excel with vlookups
My issue is this first code snippet works:
df3.iloc[df3['Name'].isin(df2[model]['Name']), col_index] = 'Yes'
This second code snippet doesnt, because of the ANDED additional condition:
df3.iloc[df3['Name'].isin(df2[model]['Name']) & (df2[model]['Rule']=='High'), col_index+1] = 0
I appreciate you folks spending your time on this, and sorry for brining the conversation to the same sticking point
 
8:00 PM
@Aran-Fey yeah, no dice :/ That's even more fundamental an ask
 
Oh well
 
 
1 hour later…
9:15 PM
@Aran-Fey no
 
Cabbage. I noticed in the transcript someone asking about Python tools that update themself. One fairly well-known example is youtube-dl.
@roganjosh You've done a fair bit of work with simulated annealing, right? You might enjoy this question on Math.SE. One of the answers there uses SA, but the author doesn't know how to improve their cooling function.
 
9:42 PM
This is true. I'd love to make a comment on the SA answer but the code is in C++ (which puts me on the back foot) and also, it's illegible
To me, these problems just boil down to "I'll guess faster than you, with the right cost function".
And then sleepless nights wondering how I might get smarter at guesses :P
 
@roganjosh Hi, any luck with this or any pointers for me?
 
I still think it's going to involve join or merge
I had forgotten that the output template was fixed. I suspect it will be join and either left or outer
 
@roganjosh Okay, i'm open to any solution you propose
 
10:07 PM
@roganjosh I think I found a solution that works with iloc. I created subset df2's based on my conditional argument. Then I dont need to use that condition in iloc, and everything seems to be working
 
Sounds promising :)
 
10:27 PM
@roganjosh Yeah, it's pretty illegible for me too. I can still read C (sort of), but I never learned C++. But thanks for taking a look.
Block design problems can be fun, but also very frustrating. When the numbers are nice, there are elegant efficient solutions, but otherwise you need to do all this ad-hoc and brute force stuff to get a vaguely acceptable solution, if one exists.
 
 
1 hour later…
11:49 PM
Hello someone here?
 

« first day (3896 days earlier)      last day (1035 days later) »