Wikipedia:Reference desk/Archives/Computing/2021 March 25

Computing desk
< March 24 << Feb | March | Apr >> March 26 >
Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is a transcluded archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


March 25 edit

Why does it say invalid syntax when I try to install folium for Python? edit

So, on Python, I do this:

import pip

So far, so good, right? But then I do this:

pip install folium

And this output results:

SyntaxError: invalid syntax

Why exactly is this the case?

For the record, I want to install this: https://pypi.org/project/folium/

Futurist110 (talk) 01:41, 25 March 2021 (UTC)[reply]

I don't really know much about Python but I'll try to answer. The "pip install" part is usually run in a shell (Bash shell etc.). It installs the pip-imported Python program to your hard drive. I think if you want to invoke a package from inside a Python script, you use a different syntax, probably that "import" keyword. — Preceding unsigned comment added by 93.136.7.84 (talk) 12:29, 25 March 2021 (UTC)[reply]
I've never tried what you are doing and I assume it doesn't work. pip is not a library. pip is a program in itself. Outside of python - on the command line - you run "pip install folium" to install a library. Then, in your python code, you can import the folium library. 97.82.165.112 (talk) 17:12, 25 March 2021 (UTC)[reply]

Browser console on Facebook edit

If you open the browser console on Facebook, you see a message saying "Stop! This is a tool for developers. If someone told you to copy & paste something here, it is a hack and a scam."

Now I am not asking here how to bypass this or how to hack Facebook. What I am asking here is how was that done. Does the Facebook page somehow know when the user opens the browser console? JIP | Talk 16:39, 25 March 2021 (UTC)[reply]

Assuming you know how to use console.log, it is easy to style the console text. See https://www.telerik.com/blogs/how-to-style-console-log-contents-in-chrome-devtools 97.82.165.112 (talk) 17:15, 25 March 2021 (UTC)[reply]
Opening the console window doesn't trigger the message, as this would be relatively difficult to detect. Facebook's site simply prints it every time a page loads, regardless of whether or not the user will actually see it. RoxySaunders (talk · contribs) 20:47, 25 March 2021 (UTC)[reply]

Rational Unified Process: Supporting Waterfall and Agile? edit

I'm writing a paper on a project I recently did to develop a large knowledge graph to represent Covid-19 data (this is the same paper as the one I mentioned in an earlier comment above). I want to make a point about the development process based on an analogy with the Rational Unified Process (RUP). I know RUP is typically seen as an iterative approach and at least in my experience everyone that uses it uses it that way. But I recall a conversation I had with someone at Rational (this was back when they were still an independent company and hadn't been assimilated by the Borg... I mean IBM) where they said that RUP was really independent of whether and to what extent you used iterative development. This was when I was doing a lot of Agile development and some people claimed that Agile and RUP were not compatible. What I recall the Rational person saying was that if you wanted you could tailor RUP so that Analysis had to be done before Design which had to be done before implementation, etc. Or you could do them all in parallel. I want to say this but I need a reference to support it and so far everything I've found (I think because there is so much pressure on RUP from Agile and Waterfall has mostly fallen out of favor) is about how RUP can support Agile rather than how it can also support Waterfall. Any feedback if I'm remembering this correctly or not and even better pointers to papers that describe this would be greatly appreciated. --MadScientistX11 (talk) 19:30, 25 March 2021 (UTC)[reply]

I found an answer. In the book RUP Made Easy by Per Kroll he talks about iteration and how in transitioning to iterative development some customers used RUP in a purely waterfall model to start. --MadScientistX11 (talk) 15:12, 26 March 2021 (UTC)[reply]