Solve quadratic equations with impunity #Python #SS
#!/usr/bin/python3
import math
import sys
a = float(sys.argv[1])
b = float(sys.argv[2])
c = float(sys.argv[3])
d = b**2 - 4 * a * c
if d >= 0:
x1 = (-b + math.sqrt(d)) / (2 * a)
x2 = (-b - math.sqrt(d)) / (2 * a)
else:
x1= complex((-b/(2*a)),math.sqrt(-d)/(2*a))
x2= complex((-b/(2*a)),-math.sqrt(-d)/(2*a))
if d > 0:
print("The function has two real roots: {} and {}".format(x1,x2))
elif d == 0:
print("The function has one double root: {}".format(x1))
else:
print("The function has two complex roots: {} and {}".format(x1,x2))

If you know how to program and can spare 3 hours a week, you could help some Palestinian computer science student with their graduation project through weekly 1-on-1 calls (for example, on the weekends).
It doesn't matter what your area of expertise is: If you can help students set up virtual environments in Python, do some data processing with Pandas dataframes, or if you mentor with some JavaScript framework.
They don't have 24/7 internet in Gaza like we do. They can't just go to StackOverflow or ask ChatGPT whenever they're stuck. No, when they're stuck, they often don't have internet for some more hours. When they can't google their problems, it's all the more valuable to have somebody accessible for 2–3 hours to unstuck them and answer their accumulated questions. You don't have to do their homework for them, you're there to remove roadblocks so that they can continue on their own for a week. And to give emotional support. It's still a genocide, after all.
I'm offering my help with Python. Let's see if someone will take up my offer.
I've heard of seasoned industry veterans who do the most difficult, most low-level stuff with C++ but cannot wrap their head around installing dependencies with pip. 😅
Maybe some Palestinian student can use my Python knowledge around virtual environments, git, or anything else.
I'm sure you also have some programming skills to offer. Remember, these are students who are probably just beginning. Even if you're a Junior dev with just 1 year of experince, you are still leaps ahead of them and they would learn lots from you. Don't feel like an impostor. Don't hesitate!
#gaza #palestine #python #javascript #typescript #swift #swiftui #golang
https://hachyderm.io/@paulbiggar/115430758962214040
@ehmatthes @jochie httpx is indeed the most common recommendation I've gotten for an async-capable equivalent of requests, although I don't think it qualifies as a drop-in replacement.
The alternative might be to use worker threads in Textual, if you can't switch to use httpx.
Although I'm sure there would be a lot of interest in a Mastodon client library that could be used asynchronously... 😁
Mulling over my options to make "Mastodon.py" play nice within a "Textual" (TUI) environment, with respect to making the non-streaming bits work asynchronously:
- Mastodon.py uses "requests", not "aiohttp", so I don't think asyncio is an option?
- Unclear what the current state of the art is in terms of async drop-in replacements for "requests", unsure I could override Mastodon.py's use of it anyway.
- Best option seems to be gevent and "monkey-patching", then?
Путь к Computer Vision: Чему меня научил простой NLP-классификатор на 5 МБ
Ретроспектива pet-проекта, который стал полигоном для отладки, архитектуры и оптимизации перед более сложными задачами в CV.
https://habr.com/ru/articles/960198/
#python #cnn #классификация #pytorch #квантизация
🎉 Chúc mừng! Tôi nhận được người dùng miễn phí đầu tiên. Trốn về module BASH đầu tiên cho Script Beacon hôm nay. Tiếp theo là Python! Cần viết bài toitarem. #SaaS #ScriptBeacon #SEO #ModuleBASH #Python
https://www.reddit.com/r/SaaS/comments/1og24v4/i_got_my_first_free_user/
BTW... the Scaper is well performing in the background. #Python #BeautifulSoup #Pandas #Sqlite3
With my earlier rant on add-ons affecting/breaking other add-ons, maybe I'll do a video on "add-on etiquette." How to code an add-on that plays well with other add-ons, whether in direct interactions or just not blocking other add-ons or forcing things upon the user.
I know my audience is split, half of my videos aren't coding related at all, but any thoughts on this?
My kid just randomly asked me to install #python on their iPad 🥹
so I created a small python script that renders ANSI art in UTF-8 terminal, respecting CP437 code page and fonts.
I was so proud that it works with some demo .ans files I had on my disk and then tried it on art pack and boom... it's all broken all around.
so much pride gone in the same second as I need to continue working on the script. But I've learned something about #python today.
🤚 Free Saturday
👉 Saturday spent working on Free Software
Highlights from #Gentoo:
• #Gemato is now compatible with #FreePG and mostly compatible with #SequoiaPGP chameleon.
• Prepared patches to support FreePG and SequoiaPGP chameleon as "gpg" symlink providers.
• #FlexiBLAS is now enabled by default on ~arch.
• Finally finished working on #PkgCheck check for missing #PyPI provenance checks.
• gpy-list-pkg-impls now includes "does this package have tests?" state, can optionally include PythonCompatUpdate results from PkgCheck and output mIRC colors. In other words, our IRC bot will now tell us when dependencies let us port new packages to #Python 3.14, and whether these packages have tests.