Jump to content

Wikipedia:Reference desk/Archives/Computing/2022 March 18

From Wikipedia, the free encyclopedia
Computing desk
< March 17 << Feb | March | Apr >> Current desk >
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 18

[edit]

Drawing Venn Diagrams of small sets

[edit]

I've found mathplotlib-venn for Python, but I'm looking for something slightly different. In particular, I want to pass (small) sets to the library, and I want the actual elements to appear in the resulting Venn diagram. So when I pass e.g. Set([1, 2, 3, 4]) and Set([3, 4, 5, 6]), I want 1 and 2 only in the left circle, 3 and 4 in the intersection, and 5 and 6 only in the right circle. Mathplotlib-venn scales the areas to match the cardinalities, and also (by default) seems to print the cardinalities of the subsets, but it does not include the individual elements at all (or if so, I've not found a way). I'm not wed to Python, but I do like it ;-). --Stephan Schulz (talk) 01:13, 18 March 2022 (UTC)[reply]

On the face of it (without testing), the mathplotlib-venn usage notes offer ways to access the subsets, set the labels (I'm looking at v.get_label_by_id('A').set_text('Set "A"')), and change the circle sizes (it looks like you pass a list of sizes which you choose yourself?) or avoid the scaling altogether (venn2_unweighted). To turn a list of integers foo into a string suitable for use as a label, do this:
", ".join([repr(x) for x in foo])
 Card Zero  (talk) 10:09, 18 March 2022 (UTC)[reply]
These usage notes also state: "The functions venn2_circles and venn3_circles draw just the circles, whereas the functions venn2 and venn3 draw the diagrams as a collection of colored patches, annotated with text labels." [My emphasis by underlining.]  --Lambiam 11:53, 18 March 2022 (UTC)[reply]
It seems to me that nothing is drawn until plt.show() is called at the end of the code, and before that happens, there's an opportunity to change the labels. (Really if I was less lazy I'd install this module and do some testing. Somebody should definitely do that.)  Card Zero  (talk) 13:35, 18 March 2022 (UTC)[reply]
So far, I've failed to get it to run - something with my Python being build without TK support or so. I'll experiment some more. --Stephan Schulz (talk) 15:42, 18 March 2022 (UTC)[reply]
Ok, I got it to run, and I've solved the problem (or at least figured out the technical aspects so that I now can write a nice wrapper around it). See below.
from matplotlib_venn import venn2
from matplotlib import pyplot as plt
set1 = set(['A', 'B', 'C', 'D'])
set2 = set(['C', 'D', 'E','F'])
v = venn2([set1, set2], ["Set 1","Set 2"])
v.get_label_by_id('10').set_text('A,B')
v.get_label_by_id('11').set_text('C,D')
v.get_label_by_id('01').set_text('E,F')
plt.show()
--Stephan Schulz (talk) 19:57, 18 March 2022 (UTC)[reply]
Glad it works! I was anticipating if I tried it I'd have some similar hurdle about TK (I've been using Kivy).  Card Zero  (talk) 01:13, 23 March 2022 (UTC)[reply]
I solved the problem by installing py310-tkinter (using MacPorts, and after some false starts - Python 3.9 is my system default, but Jupyter used Python 3.10). --Stephan Schulz (talk) 16:41, 23 March 2022 (UTC)[reply]

No audio in video chats

[edit]

We've all been there, joining a video chat only to find they can't hear you. You log off and log on again, and the problem disappears. It's not just Zoom, or Google Talk, or Teams. Why and how can I avoid the problem? Thank you. Imagine Reason (talk) 16:14, 18 March 2022 (UTC)[reply]

Are you looking for comparison of services? There are a lot more aspects to consider apart from audio glitches (which appear to be universal to some degree). There is no software that doesn't glitch on occasion. Our article at List of video telecommunication services and product brands lists the brands available, but does only very basic comparisons of features and doesn't really touch on reliability. I didn't read the article, but I find Tom's Guide quite reliable normally - here is their take on it. My own $.02 is that Zoom has the smoothest video and best audio for two-way chatting, but seems more prone to glitching than GoTo (the software I used prior to Zoom). Matt Deres (talk) 16:37, 18 March 2022 (UTC)[reply]
If you accidentally toggle "Mute", they can't hear you, and then the problem disappears if you log off and on, which resets "Mute" to the default "non-Mute".  --Lambiam 23:49, 18 March 2022 (UTC)[reply]
I'm not comparison-shopping. I always try mute/unmute but it doesn't always solve the problem. Imagine Reason (talk) 00:53, 19 March 2022 (UTC)[reply]

Way to get a lite or mobile version of Youtube

[edit]

A version that doesn't allow all the chat and suggestions and comments and really doesn't strain your computer memory much at all. Thank you in advance for any and all suggestions!2600:1702:690:F7A0:E8E1:9433:B98D:8559 (talk) 23:31, 18 March 2022 (UTC)[reply]

I don't think that exists. To my knowledge, there is no version of youtube that doesn't show comments or video suggestsions besides maybe Youtube Kids (but I don't think that's what you're wanting). There might be some kind of browser plug-in out there that will do what you want but I don't know of any. ― Blaze WolfTalkBlaze Wolf#6545 23:33, 18 March 2022 (UTC)[reply]
Thanks Blaze Wolf, anything that will cut the memory usage in half or 2/3rds is what I'm looking for (if that means eliminating comments, suggestions, chat, other video links etc.), yes all I can find online are apps but so far none are ** magic word ** free. 2600:1702:690:F7A0:E8E1:9433:B98D:8559 (talk) 23:52, 18 March 2022 (UTC)[reply]
Vanced used to be available. It stripped out the marketing junk. It has been shut down. But, alternatives will come. They will get shut down. More alternatives will apear, etc... 97.82.165.112 (talk) 12:11, 19 March 2022 (UTC)[reply]
vancedapp.com still provides a SHA-256 signature, so that should you happen to bump into the .apk file of the app in some interesting nook or corner of the internet, you can verify that it's genuine.  Card Zero  (talk) 13:08, 23 March 2022 (UTC)[reply]
Text comments are pretty much nothing in terms of bandwidth in comparison to streaming a video. If your computer is struggling to show streaming video, you possibly have bigger problems. It's a bit drastic, but one possibility would be to use Firefox as your browser and install the add-in for NoScript. NoScript is a kind of scorched earth way of controlling what gets loaded on your browser and definitely not for everyone, but you can pick and choose specific bits to allow on a temporary or permanent basis. It's certainly opened my eyes as to how much interdependence there is between seemingly unrelated websites. You may find a setup that gives you the functionality you need with as little of the other stuff as possible, but it will take some effort. Both Firefox and NoScript are free, so your risk is small. Matt Deres (talk) 17:21, 19 March 2022 (UTC)[reply]
Most of those chats don't load until you scroll down. Even if they did, they'd be a negligible fraction of other demands on your computer's resources. Look elsewhere for the culprit. Imagine Reason (talk) 02:08, 20 March 2022 (UTC)[reply]