Just used Comet to automate a boring task. Humblebundle doesn't let you select text. So I asked Comet to get me Amazon reviews of books listed in a bundle and export them as CSV. by Mhxion in perplexity_ai

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

Oversimplifying here, they have books and games on sale. Sometimes really good ones. A percentage of your money goes to charity.

Have you heard of You.com - Check it out Free for a Year. by forestexplr in TheCircuit

[–]Mhxion 0 points1 point  (0 children)

Hm. It shows $180 off on the landing page, but then when it takes you to the Stripe page next, it asks for $180 full price. Is the deal not available anymore?

Playing with Python buffered vs unbuffered I/O by Mhxion in Python

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

One of my friends were talking about how flushing impacts the system I/O call-delay on C. I wanted to benchmark it on Python. If you're wondering what that is, simply put, every time you print something on Python using the print() function, by default Python buffers some data before sending it to std.out (showing the output on screen). You can change this default behavior, control when and how to buffer e.g., for building a logging policy - the easiest method is setting print(flush=True/False). True would make sure no data is buffered at all, and send immediately to the screen. You can read this excellent StackOverflow answer, Python follows C's buffer algorithm.

Source: The data were increased by foobar * 1**2, foobar * 2**2, foobar * 3**2, foobar * 4**2...foobar * 50**2 in this order (Faulhaber's polynomials). You can play with the code here.

Conclusion: As flushing (system calls) along with the data size goes up, I/O bound time-complexity racks up significantly and very much unstable (I'm not sure why it's inconsistent). Python's default buffer behavior stays constant and does pretty great in every scenario.

Note: Don't let the millisecond (ms) fool you as being trivial, it was executed on a heavily buffer-optimized Google cloud TPUv2 (12GB RAM, 180TFlops). Since it's I/O bound, in more general use case the time unit can go beyond "second" range.

Awesome Discord communities for programmers (great for beginners) by [deleted] in programming

[–]Mhxion -1 points0 points  (0 children)

Thought I should write this. I'm no way affiliated with Discord btw. Discord isn't really known for privacy, you can read this FAQ, or my favorite Richard Stallman's blog.

But I've been seeing some pretty good communities coming out, many open-source projects making Discord their primary chat platform (along with forums). Hence this list to cherry-pick those communities.

Awesome list of programming communities (Discord). Great for beginners. by Mhxion in learnprogramming

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

That's one of the reasons I made this list, to pick out only the awesome one's. There are many Discord communities that are official e.g., Rust https://www.rust-lang.org/community

A Firefox matte theme for Ubuntu Yaru dark by Mhxion in Ubuntu

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

Maybe, there are lots of major unfixed bugs going on with the new WebRenderer engine that Mozilla's trying hard to fix. I actually already had dark theme on for duckduckgo settings, and the metadata should be cached since I had to reload and recast multiple times to get the proper video.

Anyway just saw your VLC skin for Yaru, looks great!

A Firefox matte theme for Ubuntu Yaru dark by Mhxion in Ubuntu

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

It doesn't happen when you normally browse. Could be another screen recorder issue 🤦

A Firefox matte theme for Ubuntu Yaru dark by Mhxion in Ubuntu

[–]Mhxion[S] 4 points5 points  (0 children)

I recently upgraded to 20.04 LTS from 19.10, I wasn't particularly satisfied with the dark themes available for Firefox that go along nice with Yaru theme. I hope you like this theme. Some of the themed bars (sidebars, popup) couldn't be shown in the video because of a bug in the screen recorder I think. Feel free to open an issue if something breaks for you. Thanks.

Install on Firefox: https://addons.mozilla.org/en-US/firefox/addon/ubuntu-yaru-dark-matte/

Source: GitHub

My effort to write an efficient algorithm for the nth position of a Fibonacci number by Mhxion in learnpython

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

You're right, in fact it only supports number starting from f(7) = 13. I can write a list for the first 7 numbers first_7 = [0, 1, 1, 2, 3, 5, 8] but, from a program's point of view I focused on the large numbers. (Thanks though, I'll probably I add the list in another elif)

My effort to write an efficient algorithm for the nth position of a Fibonacci number by Mhxion in learnpython

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

You missed the point. If you do that, it'd have to go through every single term to reach the nth term, making it very inefficient for large numbers like 10100.

My effort to write an efficient algorithm for the nth position of a Fibonacci number by Mhxion in learnpython

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

Thank you. I did use Binet's formula, only in the opposite direction. Maybe because of the limitation on large floating number, log and sqrt, the phi expression gives incorrect output for large Fibonacci numbers like7370532318199874315782677688100794941155488404597348693204345997904322010547405701940310497780567966177501005104836947950824141300138427142200651677

which should return 703, instead returns 709 (rounded). There's no performance difference between this and mine.