@HunterGuimont ok well thats besides the point...you could choose the same string 5 times, and thus it will terminate without checking every possible salt
times=[pd.to_datetime(i) for i in '09:14:00','10:15:00','11:15:00','12:15:00','13:15:00','14:15:00','15:15:00', '15:30:00'] how do i create a minutely HH:MM:SS instead of hard coding time like above
Just seen a question from a new member closed in one minute with no comment other than the "put on hold" message. Is this common? The question could have been rescued ... stackoverflow.com/questions/54782276/…
Seems a bit intimidating for someone who doesn't know how SO works.
@holdenweb a comment appeared explaining what is wrong with the question. If OP improves on it, I will be more than happy to vote to reopen it. But I agree, it is prudent to comment on why the question is being closed and how to improve it, if possible.
@holdenweb bad questions should be closed fast (and, ideally, reopened when in good shape). People should leave comments, but it's not a requirement. After all, the potential problems with the question are listed in the yellow box
On my profile page SO have been advertising the same Senior Javascript Developer opening to me for about six months now. I wonder if they know something I don't?
Yeah, but he explained it better correctly :-p (I completely skipped over the "it has zipped files in it", and said "gives you an object" instead of the plural thing)
Morning! I'm trying to make a derived column using df['Count'] = df.shape[1] - df.count(axis=1), but I only want this to include specific columns by name. So right now it will calculate all 4 columns in my df, but let's say I only want to include two specific columns. Is that possible?
Hm, ok. My initial thought was to split off the columns of interest in a new df and run the shape - count line on the new df, then add the derived column back. Not sure if that's smart though
@TGrif Is there any difference between Raw and Unsecured Project of flask AND express? Regardless of making it secure by my self — Hossein Asmand8 hours ago
Huh? Which is more secure, my unlocked house, or my neighbour's unlocked house?
@Rick Why a BST in particular? I'd usually just say "when the recursive call returns" or similar. Unless I'm misunderstanding your question.
I'm trying to describe the process of checking if a BST is valid using recursion. I'm having a hard time describing how we compare the right node to the parent value of the bifurcated frame
I need to be able to explain it as a property of the graph and I'm having a hard time doing that.
the left and right are easy enough. we go to the furthest left node to get our lower bound value, but in visiting every subsequent adjacent element and comparing it to the parent that I am having a hard time explaining
if this was a list I could simply say a successive list of values
ok so I am building a rest api, but it's not only to support database operations but also processing operations. What I mean by that is the payload on the http requests to the live route act as inputs to some functions whose output needs to be put into the database. I plan on achieving this by having the api offload the request into a message queue and it can be handled by a dedicated processing program which will do the sql write once done. However I still want users to be able to get data
@ManishGupta You may want to read up on Django documentation or at least take a look at the tutorial, then you'll know that it's possible & pretty basic Django functionality.
my question is should I use flask-sqlalchemy on the flask side and a separate instance of sqlalchemy for other apps in my stack that may want to crud from db
@ex080 I'm no Flask expert, but it's your choice. If you think flask-sqlalchemy will be better in flask app, then use that, otherwise continue using just sqlalchemy.
If you end up using both (sqlalchemy & flask-sqlalchemy) then you may have to keep a tab on the correct versions to use
I don't want to make a recommendation due to lack of experience with sqlalchemy & flask, but in your case, I might stick with vanilla sqlalchemy, since you'll be using just that for other CRUD operations, and it's better to not have dependency issues & / or separate code for CRUD in the flask app & other places.
@ex080 shadow walker nailed it, flask is very great about not forcing you to use any tool for integration, a minimalist approach to frameworks so to speak. You can stick with your existing sqlalchemy code just fine.
@ManishGupta you don't have to use a database in your django app. I agree with the earlier comment that you read the documentation and work through the tutorial.
cbg urllib3 seems to have a delay on the first connection. All connections afterwards are quick/instant. Can anyone explain why or how to get around this?
Searching finds: https://stackoverflow.com/questions/45783655/first-https-request-takes-much-more-time-than-the-rest which gives info for requests but the same work arounds dont work in urllib3
My latest safari into the internet outside of SO has made me realize just how easy it is to have a productive and useful discussion on SO, whereas trying to have a discussion on other parts of the internet usually just turns into a flame war. So shoutout to the SO community for being mature. Crazy how a lot of people call us "elitist" and "toxic", innit?
Hey all, I have two dataframes. I am trying to count how many times a specific value appears in df2 for all IDs in df1. df2 can have duplicate IDs. Can someone help with a generic formula?
I've been trying to use join and groupby, but no dice
something like this new_df = df1.join(df2.groupby(['ID', 'Value']).size().rename('Count'), on='ID')
but it gives an error because they are not equal lengths