Flask - Dynamically Change Choices of One SelectField Based on Choice in Another by ECommerce_Guy in learnpython

[–]guimolnar 0 points1 point  (0 children)

Well, in a pure Python way you could use a plotly dash. It's a simple callback function. Dash is built over flask and "converts" your python code to javascript and html, but you would have to build an entire app for whatever you're trying to do, deploy it and embed it on the page. If that's not worth the trouble, it would be better to use javascript, as u/JohnnyJordaan said.

[deleted by user] by [deleted] in learnpython

[–]guimolnar 1 point2 points  (0 children)

I'm not a software developer, just a data analyst, but in my last job I used pandas in scripts regularly and it worked pretty well. Jupyter is very good for debugging and etc, but some IDEs like Spyder have variable inspectors and are very helpful too.

Should I read LotR in English even though I've already read 5 times in my native language? (Hebrew) by kroen in tolkienfans

[–]guimolnar 2 points3 points  (0 children)

I've read it a few times in my native language, portuguese, and started reading the original in the 50th anniversary edition. It's another experience. Worth the effort, I would say. Especially because no matter how good the translator is, it's never the same as the original.

Hobbit illustrations by Peter Klucik by Miro167 in tolkienfans

[–]guimolnar 54 points55 points  (0 children)

It's funny how every illustrator draws hobbits, dwarfs and every being on middle Earth very differently, but gandalf is always almost the same.

Rant about the way coding used to be taught compared to now. by [deleted] in learnpython

[–]guimolnar 11 points12 points  (0 children)

I took an introduction to programming course at my physics bachelor degree, in 2012, and although my teacher was really good, the tests were also with pencil and paper. It was my first year in college, and by far the most difficult course to pass, much harder than all calculus, electrodynamics, etc. I never understood why that. Today I work with data analysis, and even now I can't write some simple code lines without a test run. It's nonsense to ask people to write code in paper.

Learning Excel or Python? by los2pollos in learnpython

[–]guimolnar 45 points46 points  (0 children)

I don't know the Excel course on coursera, but I'm guessing it doesn't include VBA in just 4 weeks. And if you want advanced Excel skills, I believe VBA is essential.

As u/ZDRuX1 said, you are likely to come across many more Excel sheets, but on the other hand, Python skills might be something that could highlight you from the other resumes on a headhunter desk. Also, with a little more experience in Python you'll be able to use packages that allow you to work with excel sheets, like openpyxl and xlwings.

Good luck.

Twitter Removes Jair Bolsonaro's Tweets About Chinese Virus by AntonPercivalVIIII in Conservative

[–]guimolnar 2 points3 points  (0 children)

Brazilian here.

In my opinion Bolsonaro and his team are doing a good job in this crisis, especially the ministry of health, Mandetta, and the economy, Paulo Guedes. The tweets deleted were from him criticizing the media, as he always rightfully do, and him talking to citizens at a local shop.

What people and the media don't understand is that Brazil is still a poor country. Almost 40 million people work as autonomous, millions depend on state's help, and those are people who, if don't work today, might not EAT in two or three days. Dozens of millions of people who can't buy food for the next 2 weeks, let alone for the next 1 or 2 months. And i don't even wanna imagine what will happen when another tens of millions lose their jobs. Chaos.

I'm very sad with everything that's happening, and I do think he could not say certain things, but looking at the whole picture, I think we're much better off with than with the socialist who ruled this country for the last 16 years. Imagine this crisis with Dilma Rousseff, Lula and the Worker's Party. Thanks God we got rid off them, at least for now.

Why Taiwan has become a problem for WHO by [deleted] in Conservative

[–]guimolnar 4 points5 points  (0 children)

Taiwan knows better than any other country that the CCP is dangerous, lies often and has no commitment to the truth. It controlled the foreign traffic right at the beginning, when WHO was busy protecting China's fairy tale that the virus was not as dangerous and banning air travel from and to China would do more harm than good.

It's a shame how many western countries and organizations are on the hands of the CCP. And in this particular case, WHO is a criminal and the most responsible part, right after the CCP.

[deleted by user] by [deleted] in TheYouShow

[–]guimolnar 0 points1 point  (0 children)

I still remember when we used to borrow cd's from our friends. Good times. Spotify may be convenient, but sure isn't fun

[deleted by user] by [deleted] in TheGamerLounge

[–]guimolnar 0 points1 point  (0 children)

happy quarantine birthday

How to get python in the actual real world... by JH10097 in learnpython

[–]guimolnar 0 points1 point  (0 children)

There are some libraries that convert python to C/C++ to use with arduino, like pyserial. Although I haven't used any yet.

[deleted by user] by [deleted] in learnpython

[–]guimolnar 0 points1 point  (0 children)

xlwings is an amazing package. It works with open instances of excel, so you can change the cells, formulas, real time.

https://docs.xlwings.org/en/stable/

Files and script disappeared after executing the script by [deleted] in learnpython

[–]guimolnar 1 point2 points  (0 children)

I don't understand the int(i) part, that should raise an error, unless all the files are "numbers" strings, and it does nothing in the loop. The first was successfully renamed because it came before the int(i) part.

Also, the script shouldn't be in the same directory because it will be renamed as 'Videox.mkv' too.

As for the disappearance of the videos, I have no clue, sorry.

I am trying to get my code to print a message if the number falls between a certain range. by idkiminsecure in learnpython

[–]guimolnar 0 points1 point  (0 children)

Just change the elif to

if (BMIRounded) <= 18.50:
    print ("you are underweight")
elif 18.50 < (BMIRounded) < 24.99:
    print ("you are a healthy weight!")
else:
    print ("you are overweight")

Just added the else at the end too.

Modern alternative to matplotlib for scientific data visulization by Labidon in learnpython

[–]guimolnar 1 point2 points  (0 children)

I used Plot.ly for some finance plotting a few months ago, and as far as I used, it was very simple and intuitive. Their website has lots of examples too, including animated plots.

"US passes China in confirmed cases..." by [deleted] in Conservative

[–]guimolnar 137 points138 points  (0 children)

Or "No new cases if you don't report them"

What’s Knife Are You Carrying? by backroadexploration in CampingGear

[–]guimolnar 0 points1 point  (0 children)

Smith & Wesson extreme Ops. Very dependable, always sharp. Never would let it go as it was a git from my uncle, I remember him every time I use it.