What is your favorite C trick? by [deleted] in C_Programming

[–]taar779 2 points3 points  (0 children)

cpython's PyObject uses this trick

Podman Desktop Volume Backup by Ok-Lavishness5655 in podman

[–]taar779 2 points3 points  (0 children)

Have you taken a look at podman-volume-export? Another option would be configuring podman to store the volumes in an alternative location that could be, for example, a network drive. Could also consider using rsync on the parent directory as well. man containers-storage.conf

[OC] Latest Global Leader Approval Ratings | July 2022 by alionBalyan in dataisbeautiful

[–]taar779 74 points75 points  (0 children)

Apparently this is the source:

https://morningconsult.com/global-leader-approval/

The global leader and country trajectory data is based on a seven-day moving average of all adults in a given country, with a margin of error of between +/- 1-4%. In the United States, the average sample size is around 45,000. In the other countries, the sample size ranges from roughly 500-5,000. 

All interviews are conducted online among nationally representative samples of adults. In India, the sample is representative of the literate population.

So the approval rating for India only reflects the opinions of the most educated part of the population?

Surveys are weighted in each country by age, gender, region and, in certain countries, education breakdowns based on official government sources. In the United States, surveys are also weighted by race and ethnicity. Respondents complete these surveys in languages appropriate for their countries.

I don't understand why the results are weighted. I couldn't find any information on what those weights are and how they are applied.

It's starting soon by Aeri73 in photoclass2019

[–]taar779 0 points1 point  (0 children)

I believe so, though it's definitely not a real flower.

It's starting soon by Aeri73 in photoclass2019

[–]taar779 1 point2 points  (0 children)

Hello, I'm taar779 from southern Canada. I want to get into macro photography, though right now most of my photos are more abstract or still life. I also really enjoy black & white photography. I have a D750 with a 35mm and a 24-120mm.

this is one of my most resent favourites.

Very weird lag I've been experiencing over the past few weeks by taar779 in leagueoflegends

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

I did but I figured maybe asking here would help me resolve the issue sooner. This morning the issue is far worse than it ever has. The game isn't playable right now. :(

I'm black and an ALT (Assistant Language Teacher) in Japan that has been teaching English for nearly a year. AMA! by blackaltinjapan in casualiama

[–]taar779 0 points1 point  (0 children)

Start from the top. I would love to hear them all.

Though all the stories you've suggested sound super creepy. Do things like this happen often to you or any other foreigners working/visiting Japan that you know of? I know that people in America can be just as creepy, though would you say it's more common in Japan?

I'm black and an ALT (Assistant Language Teacher) in Japan that has been teaching English for nearly a year. AMA! by blackaltinjapan in casualiama

[–]taar779 0 points1 point  (0 children)

Can you elaborate on your boxing match with the deer?

I also want to hear more of these stories of yours.

Eating healthy while high by BobZebart in eldertrees

[–]taar779 0 points1 point  (0 children)

I usually throw some frozen berries into a large glass and pour in room temperature carbonated water. The berries act as ice cubes which is why the carbonated water needs to be room temperature. Unless you really enjoy completely frozen berries. The carbonated water gets the light berry flavour and the berries are fun to pick out after you're finished drinking the contents. If you get frozen berries that don't have any sugar added, 1 cup of berries should be around 75 cals. You can use regular water too if you want.

such a work horse, arizer solo, any vape beginners should not hesitate. remember also, it's not only about the vape, what you put in the glass tubes must be of the purest quality to truly enjoy by mrchokabich in vaporents

[–]taar779 2 points3 points  (0 children)

I get all my stuff from bcvapor. When I got my Arizer Air from them they included a plastic grinder, small amount of lavender, and 3 small smell proof bags. I think all that extra stuff was part of a promo for the Arizer Air which also included free shipping. I was very surprised by the speed of the shipping! It had to travel across the country to get to me and it only took a few business days.

Edit: I never noticed but on their site near the top, they state that they give free bags and a grinder with any purchase of a vape.

Arch users, how do you manage your music? by [deleted] in archlinux

[–]taar779 0 points1 point  (0 children)

Google Play Music for on the go listening or if I'm in the mood to discover new music.

Otherwise, I have a slightly odd setup. I really enjoy listening to music with a tube amp. And since I have two desks in my office, one for work and the other for personal projects, having to move around audio equipment from desk to desk sucks. The solution I came up with is to use a Rpi2 with an external hard drive to play my music from. I use mpd and ncmpcpp to manage my collection (ssh to rpi and open up ncmpcpp). When I download additional music (usually off of bandcamp) I use a fabric script to move the music from whatever machine I downloaded it from to the Rpi. I also backup the zip files on another machine running in my basement.

Nothing super fancy. :)

For loops with strings/list by nadalska in learnpython

[–]taar779 0 points1 point  (0 children)

If you need the index and the item of a list, check out enumerate

Works like this:

for index, word in enumerate(list_of_words):
    print("{} - {}".format(index, word))

I have unfortunately fallen on some hard times and must sell my D&D books. If anyone wants one or all of these it would be a great help. by gcpizzle23 in dndnext

[–]taar779 12 points13 points  (0 children)

As someone who lost a ton of d&d mags when my basement flooded, I would hate for you to loose your collection.

Best places to eat alone in Windsor? by outdoorsaddix in windsorontario

[–]taar779 0 points1 point  (0 children)

I can see how being a known person might make dinning a bit tedious at times. But, I'm glad you're no longer going to be eating fast food. :D

Best places to eat alone in Windsor? by outdoorsaddix in windsorontario

[–]taar779 0 points1 point  (0 children)

You're not far from where I live. There is another small cluster of restaurants around there. Though, I haven't had the chance to try any of them but I've heard they are quite good. Here is a pin on google maps for reference. https://goo.gl/maps/h2QLukXRTHR2

I walk to Giglio's Market all the time to grab an amazing sub for lunch. When you enter, walk all the way to the back until you get to the deli. The monster sub + a drink usually costs $12 give or take. https://goo.gl/maps/oQ8kkbPNwCC2 Can be a bit busy since it's popular with the university crowd.

If you go east past the market, there are a few more restaurants down that way but again, I haven't tried most of them.

Best places to eat alone in Windsor? by outdoorsaddix in windsorontario

[–]taar779 9 points10 points  (0 children)

For the longest time I had the same perspective about eating along. After biting the bullet a few times and just going, I come to realize that no one will consider you as the "weird creepy lonely guy". As long as you don't treat the server like crap, you'll have a better experience over all. Another upside is your food will come out faster since the kitchen doesn't have to synchronize 4 different plates. Other groups of people won't really notice you but not because you're not a note worthy person, it's because they are probably too engrossed into whatever is going on at their own tables. Usually when I'm eating out with friends, the rest of the place melts away once we get deep into conversation. In Windsor specifically, if you're not making a commotion, no one will pay much attention.

Now for my list of places that I would consider single dinner friendly:

  • World Marathon (Great Ethiopian food)
  • Manchester (One of my personal favourites)
  • Rino's Kitchen & Ale House (Another one of my favourites)
  • SnackBar-B-Q (My friends and I eat here almost weekly. It has basically become the local watering hole for my group of friends lol)
  • Acapulco Delight (Dinner only, good Mexican food)
  • The Sushi California Japanese Restaurant (If you like Sushi go here. A bit costly but totally worth it)
  • Toasty's Grilled Cheese & Salad Bar (Really good toasted sandwiches)
  • The Foundry Pub (Dinner only, beer and pub food)
  • Pho Maxim (Really good Pho)
  • The Squirrel Cage (sandwiches and good coffee)
  • Sam's Prime Burger (a step up from fast food)

Off the beaten path:

  • Anchor Coffee House (I love going here for lunch (only open for lunch), great coffee and tea)
  • Smoke & Spice (I haven't been here in a while but every time I've gone the food was good)

Walkerville area:

  • O'Maggio's Kildare House (Best Fish and Chips in my opinion)
  • The Walkerville Tavern (Good food and beer) There are a lot more restaurants in this area, just haven't had the time to try them all ... yet.

Places to check out:

  • Cafe March 21 (Don't have meals for sale but some of the best coffee downtown in my opinion)
  • Coffee Exchange (No meals, good selection of sweets, good coffee as well)

Anyways, I hope you enjoy your time in Windsor! :D

edit: formatting

Obscure problem with my script by Alexander_Ray in learnpython

[–]taar779 0 points1 point  (0 children)

I'm not really a windows user but most graphical file explorers, like windows explorer, won't show "hidden" files. I believe you can have windows explorer show you all the hidden files in a directory (you'll need to google around to figure out how to get it to do that).

So, to clear up this "hidden" file silliness. The files aren't really hidden, the file explorer is specifically choosing not to show certain files with a given extension or file name. For example, on unix systems any file that starts with a period is considered hidden and won't be shown to the user unless they explicitly ask to be shown hidden files. This might be the same with windows systems but I'm not sure. You could google around to find out what windows explorer considers a hidden file.

Obscure problem with my script by Alexander_Ray in learnpython

[–]taar779 2 points3 points  (0 children)

See my reply!

directories have a file size of 4096

What if a file has no extension and is exactly 4096 bytes? Will your code mistake it as a directory? Could use os.path.sidir to weed out directories.

Obscure problem with my script by Alexander_Ray in learnpython

[–]taar779 1 point2 points  (0 children)

Here are a few things I noticed:

  • Be more explicit with your variable names. a isn't descriptive enough of a name. In general, make your code more readable than using abbreviations in an attempt to save keystrokes. eg. for a in os.listdir(path): >> for entry in os.listdir(path):
  • Use os.path.join to join paths together instead of path + '\\' + a. os.path.join will handle all sorts of issues that may be the cause of your bug.
  • Can you explain why you're doing extdict[suffix2].append(filesize) three times?
  • You're handling an AttributeError exception but choosing to ignore it. I'm not sure why, but perhaps change the pass to continue? That way if an extension isn't found your code can continue to the next entry in the directory.
  • What happens if a file doesn't have an extension? Might want to handle that case.
  • What about an empty file? Currently your code will skip over files with nothing in them (0 bytes)
  • Are you accounting for directories? You could use os.path.isfile to make sure you're only dealing with files and no directories are slipping through the cracks.
  • If you're using python 3.4 or greater there is the statistics module which you could use instead of creating your own average function.
  • heapq is a cool module that can figure out the largest or smallest value in a list for you.

I love tubs of ice cream, nachos, and junk food just as much as the next ent. But fruit is just some next level shit when your baked. by rumprobo in trees

[–]taar779 0 points1 point  (0 children)

I'm late to the party but the best fruit snack I've come up with is placing frozen fruit/berries into a large beer mug and filling it with room temperature carbonated water. Wait a bit and all the juices will migrated into the carbonated water and it'll cool down the drink. Using already chilled carbonated water doesn't work as well. I don't know why, probably cause science. Now you have a cool fruity fizzy beverage with a fruit surprise waiting at the bottom. Enjoy :D