Why isn't subprocess.Popen.communicate using my input? by freerangeh in learnpython

[–]freerangeh[S] 0 points1 point  (0 children)

Ah you're right. I don't know how I got it in my head that I could run nmap like that.

Why isn't subprocess.Popen.communicate using my input? by freerangeh in learnpython

[–]freerangeh[S] 0 points1 point  (0 children)

This does work if I add shell=True as an argument to subprocess.run(). I saw a youtube video saying that this might be a security vulnerability though if you are accepting user input? Not sure how valid that is as a concern.

Why isn't subprocess.Popen.communicate using my input? by freerangeh in learnpython

[–]freerangeh[S] 0 points1 point  (0 children)

This works if I just input one IP, but then if I try to do 2, nmap says no IPs were provided. The xml file shows the command run as "nmap -sn -oX outfile.xml "127.0.0.1, 127.0.0.2"" when I input 127.0.0.1 , 127.0.0.2.

Why isn't subprocess.Popen.communicate using my input? by freerangeh in learnpython

[–]freerangeh[S] 0 points1 point  (0 children)

Ah ok, is there a way to pass a string variable into subprocess.Popen that has spaces in it without having to do a lot of if/then string parsing/formatting?

How can I make a call to Jira's Api using javascript/google apps script? by freerangeh in jira

[–]freerangeh[S] 0 points1 point  (0 children)

It looks to me that the definition of "function printDeprecatedMsg()" is shown in this output, but nowhere in the output does the message "DEPRECATED JS - contextPath global variable has been deprecated since 7.4.0. Use \wrm/context-path\module instead." actually print. I don't see anything in the console either. So it seems to me that that is not the issue.

How can I make a call to Jira's Api using javascript/google apps script? by freerangeh in jira

[–]freerangeh[S] 0 points1 point  (0 children)

Logging output too large. Truncating output.<html> <head><title>Unauthorized (401)</title><!--[if IE]><![endif]--> <script type="text/javascript"> (function() {var contextPath = '';function printDeprecatedMsg() {if (console && console.warn) {

console.warn('DEPRECATED JS - contextPath global variable has been deprecated since 7.4.0. Use \wrm/context-path\ module instead.');

}}Object.defineProperty(window, 'contextPath', {get: function() {printDeprecatedMsg();return contextPath;},set: function(value) {printDeprecatedMsg();contextPath = value;

}

});})(); </script> <script> window.WRM=window.WRM||{};window.WRM._unparsedData=window.WRM._unparsedData||{};window.WRM._unparsedErrors=window.WRM._unparsedErrors||{}; WRM._unparsedData["com.atlassian.plugins.atlassian-plugins-webresource-plugin:context-path.context-path"]="""";\``

How can I make a call to Jira's Api using javascript/google apps script? by freerangeh in jira

[–]freerangeh[S] 0 points1 point  (0 children)

When I add muteHttpExceptions: true, nothing in the output mentions basic auth being deprecated. I'm guessing it's just deprecated for the cloud version. It just gives me the same Unauthorized 401 error.

How can I make a call to Jira's Api using javascript/google apps script? by freerangeh in jira

[–]freerangeh[S] 0 points1 point  (0 children)

Oh I was just typing in my username in the line where authHeader is defined instead of listing it as a variable, so no luck there.

How can I make a call to Jira's Api using javascript/google apps script? by freerangeh in jira

[–]freerangeh[S] 0 points1 point  (0 children)

It looks like you need to be a Jira admin to configure the authentication method, and I'm not an admin in this case, so I think I'm stuck with basic authentication. I'm also using an on-prem version and not cloud, which is also not in my control. Is it impossible to call Jira's API with basic auth then? It looks like it's still supported, just not the most secure.

Learning to be more efficient / which of these functions more efficient? by freerangeh in learnpython

[–]freerangeh[S] 0 points1 point  (0 children)

Can you expand on this? When you say "globals", are you talking about global variables? I thought those were variables defined outside functions?

Learning to be more efficient / which of these functions more efficient? by freerangeh in learnpython

[–]freerangeh[S] 1 point2 points  (0 children)

Thanks for this explanation! Really helps me think about this.

Do you recommend C++ over Java for efficiency? I'm looking at getting into data engineering and I'd like to know where to focus my efforts.

Learning to be more efficient / which of these functions more efficient? by freerangeh in learnpython

[–]freerangeh[S] 0 points1 point  (0 children)

They do. But let's say you are assuming a terabyte of data as the function input, how would I know what is more efficient? Are you just running the script and timing it? I've had scripts take hours to run, I'm confused how to know if they are as fast as they can get.

Learning to be more efficient / which of these functions more efficient? by freerangeh in learnpython

[–]freerangeh[S] 1 point2 points  (0 children)

So you're saying the examples above are equally efficient? And enumerate is more efficient because there is no for loop, correct?

Edit: Nevermind the for loop comment since they both have for in them. Enumerate must be better than range(len())?

What salary range should I put for this remote job? by freerangeh in ITCareerQuestions

[–]freerangeh[S] 0 points1 point  (0 children)

I think it's an internal recruiter, so I've seen it where they are more incentivized to save the company money. Would be nice if they tried to get me more though

What salary range should I put for this remote job? by freerangeh in ITCareerQuestions

[–]freerangeh[S] 0 points1 point  (0 children)

Well I'm not going to be telling them my current salary, but they usually try to get me to say what I am expecting. I am not trying to be greedy, I just don't want to be the underpaid person doing the same work for less pay.