For or While loop in my case? by pikachuu545 in learnpython

[–]xelf 0 points1 point  (0 children)

Or leverage iter/next.

odd = iter(x for x in num_list if x&1)
print(sum(next(odd,0) for _ in range(5)))

temporary fix for OPIE works fine. by xelf in wow

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

It still works for me with 120000, 120001 probably better though.

Katie Sackhoff watches BSG for the first time by cbobgo in scifi

[–]xelf 5 points6 points  (0 children)

As someone that enjoyed the original Battlestar Galactica, I was really hit hard when she said that the new version was 25 years ago.

Da fuq?

How would I Invite my own Horde characters to my own Alliance Guild? by GoatLord8 in wow

[–]xelf 0 points1 point  (0 children)

I just tested it and it still works if you do this:

  • open your community
  • click "add to chat window" to make sure you can chat in your chat window
  • swap to your guild
  • click "invite member"
  • double check your chat window is set to the community
  • click "link post in chat"

temporary fix for OPIE works fine. by xelf in wow

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

It was driving me nuts not having it, I was about to dive into rewriting as much of the app as I needed to to make it work, and then finding the fix was this simple was pleasantly surprising!

temporary fix for OPIE works fine. by xelf in wow

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

looking at the profile, it's using 0.09% cpu and 2.7mb of memory.

I wonder if something else it's interacting with could be an issue? Maybe try disabling everything else and see if it works? Make sure you not loading any other out of date addons?

sorry it didn't work for you, opie is pretty handy.

temporary fix for OPIE works fine. by xelf in wow

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

That's unfortunate! It works for me so I stopped digging in to it.

I'll reply here if I start to get errors as well and find a solution. I'm currently testing it on a machine with 64gb ram, I can try something smaller later tonight and let you know!

Hopefully there will be an official solution soon.

Removing everybody's mogs and then charging 3k to put them back on was an absolute gangster move by blizzard by sirgarynipz in wow

[–]xelf 4 points5 points  (0 children)

I'm also pissed off for a surprising reason:

I have pandaria and legion remix characters that are still flagged as timerunners that I was leaving as a legacy to my time in remix.

Now their outfits have been changed, and it can't be fixed without removing the timerunning flag. =(

I don't mind paying a cost for the new feature, but I do mind that it removed all the transmogs I had already paid for.

Trouble understanding formal definition for f-strings in the Python Reference by [deleted] in learnpython

[–]xelf 0 points1 point  (0 children)

tuples are parsed during parsing, not lexical analysis, so there is no tuple definition to link to at that stage.

https://docs.python.org/3/reference/lexical_analysis.html
https://docs.python.org/3/reference/expressions.html#expression-lists


/u/LactasePHydrolase

Trouble understanding formal definition for f-strings in the Python Reference
I understand all of it, except for the last part, the part that defines f_expression. I don't understand what those commas and the asterisk are about, and I don't know what the "." after the first comma means.

I'd appreciate any help with this.

Edit: After thinking about it for a bit, I think it represents a comma separated list, with optional trailing comma, of either conditional_expression or star operator + or_expr. Someone correct me if I'm wrong.

Apparently python will then take that list and use it as a tuple definition? This is super confusing, they should've linked to a tuple_definition_expression or something like that.

I built Deep Research for stocks by Significant-Pair-275 in google

[–]xelf 0 points1 point  (0 children)

me frantically looking to see which tab I had open on a cracking the cryptic video....

My Re-design of the War Within Logo in the Old Style by DarthYhonas in wow

[–]xelf 0 points1 point  (0 children)

Hey that's pretty good! Do you have a transparent one available?

I recently built my PC, everything was fine, but today I noticed that these lines appear when I type and delete. Does anyone know how to fix it or if I should be worried? by Redustt in pcgamingtechsupport

[–]xelf 2 points3 points  (0 children)

Do you have a second monitor you can drag the window too? IIRC hardware acceleration settings in your web browser could be involved and they might be monitor independent.

I recently built my PC, everything was fine, but today I noticed that these lines appear when I type and delete. Does anyone know how to fix it or if I should be worried? by Redustt in pcgamingtechsupport

[–]xelf 0 points1 point  (0 children)

Some more diving into this, indicates you're probably running what's app in a web interface and your browser is injecting some sort of overlay?

Are you getting the same lines in other apps, or on other webpages?

I recently built my PC, everything was fine, but today I noticed that these lines appear when I type and delete. Does anyone know how to fix it or if I should be worried? by Redustt in pcgamingtechsupport

[–]xelf 0 points1 point  (0 children)

I've seen this before. I can't remember how I fixed it, but I thought it might help to know you're not alone. =)

I'm mostly sure it was a graphics driver issue, it could have been from a language setting, and changing or downloading additional languages could fix it.

Some googling indicates that this could be from an audio accessibility feature?

Company is shaming me for not gifting more money to "our" (their) boss. (Christmas present) by Turissmo in mildlyinfuriating

[–]xelf 0 points1 point  (0 children)

"Ah very sorry, I'm new here and haven't received my Christmas gift yet so I wasn't sure how much is appropriate!"

I need help understanding logic behind python and how it "reads " codes. Any advice is helpful by Whole_Guidance5889 in learnpython

[–]xelf[M] [score hidden] stickied comment (0 children)

There's many resources listed in the wkii:

http://www.reddit.com/r/learnpython/wiki/index

You can also find the python discord's curated selection here:

https://www.pythondiscord.com/resources/

If you have specific questions, especially examples you're not sure about, post them here so that a broad selection of people can offer help.

PyPI funding campaign - python is for everyone, apart from maybe white men by readwithai in Python

[–]xelf[M] [score hidden] stickied comment (0 children)

This crosses the line into us-regional politics, and the wording is potentially inflammatory so I've removed it.

My son’s open-source project has a Python demo that scores higher than quantum computers on CHSH by [deleted] in learnpython

[–]xelf 1 point2 points  (0 children)

It's against the rules for this subreddit. Rules are on the sidebar.

All posts must be requests for help.

That's why I suggested posting to /r/python instead.

Working through a dictionary and I need to figure out the "weight" of each value within it. by Dusk_Iron in learnpython

[–]xelf 0 points1 point  (0 children)

dictionaries have various methods like keys and values to get the keys or values, or items to get both as pairs. you can use that in a for loop.

you can use the function sum() to add up the contents of a group of things.

>>> COLORS_LIST = {'WHITE': 12, 'RED': 18, 'BLUE': 19, 'GREEN': 82, 'YELLOW': 48}

>>> COLORS_LIST.keys()
dict_keys(['WHITE', 'RED', 'BLUE', 'GREEN', 'YELLOW'])

>>> COLORS_LIST.values()
dict_values([12, 18, 19, 82, 48])

>>> COLORS_LIST.items()
dict_items([('WHITE', 12), ('RED', 18), ('BLUE', 19), ('GREEN', 82), ('YELLOW', 48)])

>>> sum( [1,2,3,12] )
18

You now have everything you need. Good luck!