@WayneWerner technically you could still compile python script to ELF binaries, but instead of directly wrapping it inside a ELF header, using cython to compile it might work better. (it'll compile to a .C source file, which you can then compile a last time to a binary file)
obviously if you know RE or ASM/machine code, it's still possible to get something out of it, but as long as you delete the original reference to your code inside (or if you use the right flags with cython) you're probably fine
(and you also get a decent speed up by doing that, but your mileage may vary)
For using selenium and looking at the "elements" tab of "inspect element" in Chrome I cannot seem to find exactly which identifiers to use to get the item of interest. Some fields seem to appear/disappear depending whether the dropdown is opened/closed such as <div class="next-overlay-wrapper opened"></div>
This is the button that is pressed before the previous field appears/disappears but the issue is the class seems to appear 10 times within the html. So i'm not sure how to tell selenium to get a specific one. Is there a simpler way to automate my file downloading task or should I approach it in a different way
I can try i'm actually quite new to selenium it's my first time using it but all the tutorials are pretty straight forward where there is an obvious identifier
What I know if they have the same name/identifier they get the first one they stumble upon according to the reference
I also had to read a new topic on CSS selectors as advised by a friend but the stuff I see in the elements panel of the dev tool in chrome is not so obvious to me even when I try to isolate the containers. And to authenticate the program to log in to my account is also another issue which I feel is a little complicated
It's not such an important program anyway just something to automate me from clicking the download button everytime on several pages
@Aran-Fey you won't be able to open the page as it requires authentication to an account to get to the page of interest. Gonna read more on selenium and its features more on my free time will hold it for now hah thanks
@AlexandreMarcq yeah this seems like one of the things I might need in the future thanks i'll just include this in my list to read
Does a bare -- have special meaning for argparse? I seem to have accidentally put it into the docs of some script as script --foo bar -- pos1 and, surprise, it works and I don't know why.
It seems to behave like "end of optional named parameter list", but I can't find anything in the docs.
# run as `script.py --opts a b c -- bar`
import argparse
CLI = argparse.ArgumentParser("Dash Dash Em Arr Eeh \o/")
CLI.add_argument("pos")
CLI.add_argument("--opts", nargs="*")
print(CLI.parse_args())
Yes.. But unfortunately I can't find what I am looking for. Apparently; true and false are 1 and 0 respectively. But I don't want to print out 1 and 0, but I want to print out the mismatched between the two dfs..
I have no idea what you're doing with a piece of code that counts the rows you want. You want to filter out rows that match the condition df['your_column_name'].isin(df2['your_column_name']). You have the condition figured out. All you need is a piece of code that selects rows based on a condition.
I'm noticing this a lot. Even though you've already figured out a part of the problem, you have no idea how to apply this knowledge. It was the same thing with your question about last names and currencies. They were practically identical problems, but you still struggled with the 2nd one after you figured out the 1st. You really need to start understanding what you're doing so you can effectively (re-)use the code you find.
@Aran-Fey I just don't manage to understand python.. I'm struggeling so much with it, and I just don't know HOW I can understand it. It's always the same and it's driving me crazy. I don't know what I'm doin wrong
You might want to take a step back from "I don't understand Python". That is not what you are struggling with, but it will subconsciously keep you from facing the challenge. What you are struggling with is subdividing a task into smaller tasks, and figuring out which of these are specific to a problem and which ones are generic.
It's also possible that you need to understand some pandas basics. For example, if you don't know that df['your_column_name'].isin(df2['your_column_name']) returns a boolean mask, and you just think of it as some sort of magic incantation, then, well, you'll have a hard time doing anything useful with pandas.
I want to subset two dataframes with same column names (drop the ones that don't match in each). I have been googling and testing but have yet to find something. So if df1 has columns A,B,C and df2 has columns B,C,D; I want to get df1_1 to have only columns B,C and df2_1 to have only columns B,C.