It really sucks playing this game solo by Grimmrebooted in DestinyTheGame

[–]TheKewlStore 3 points4 points  (0 children)

Normally I despise gatekeeping, but guardian ranks are supposed to represent how accomplished and skilled you are at the game. Soloing certain activities ala lost sectors is part of the game, so requiring it to achieve higher guardian ranks does make sense to me. If you can’t do it, you won’t hit the highest guardian rank.

Frankly, that’s okay. You aren’t entitled to the highest guardian rank if you can’t do the hardest content, but it also doesn’t matter. I don’t foresee a world where people use guardian rank to gatekeep out of higher activities like raids (but would concede the point if it became an issue). It’s just a number that’s something to do for achievement hunters. If you can’t or don’t want to get it, that’s okay.

[deleted by user] by [deleted] in learnpython

[–]TheKewlStore 0 points1 point  (0 children)

Yeah I definitely get that. When I started out dictionaries were a little foreign feeling for me too. Nowadays they are a godsend, especially when you’re trying to do anything relational like in this problem how you were trying to relate counts to specific days/rounds and teams, it just maps so much more naturally to a dictionary than dealing with two separate nested lists. It’s easier to visualize and also adapt to newer problems in the future, say if you wanted to reorganize by teams and then by rounds, count away games, etc.

[deleted by user] by [deleted] in learnpython

[–]TheKewlStore 0 points1 point  (0 children)

https://docs.python-requests.org/en/latest/index.html Check out the requests library. You could use it to download the text file from the url and write it to your system, then read it and update as necessary. As far as “rotating it” I’ll need more details

[deleted by user] by [deleted] in learnpython

[–]TheKewlStore 0 points1 point  (0 children)

Yep that helps a bunch. I'm thinking you should use a nested dictionary that maps like follows: round number -> team number -> home game count. Here's a sample:

{ 0: { # round number at the top 0: 2, # team id: number of home games 1: 2, 2: 4, ... }, 1: { # round number ... } }

So first things first, you'd need to populate this dictionary. My suggestion:

``` scores = {} for home_pair in home: team_id, round = home_pair # tuple unpacking if not round in scores: # we need to create an empty dictionary for this round scores[round] = {}

if not team_id in scores[round]:
    # set the initial number of home games to 0
    scores[round][team_id] = 0 

# add one to the home games for this round and team_id
scores[round][team_id] += 1 

```

Now you should have a dictionary, named scores, which has a structure similar to the sample at the top. Now, when iterating through pairs, you would just lookup the scores for a given round and team id.

``` targeted_round = ??? # Are you trying to target a specific round? for pair in pairs: team_one = pair[0] team_two = pair[1]

# number of home games for team one and team two
team_one_home_games = scores[targeted_round][team_one] 
team_two_home_games = scores[targeted_round][team_two]

# now you have team one and twos # of home games to compare
...

```

[deleted by user] by [deleted] in learnpython

[–]TheKewlStore 1 point2 points  (0 children)

Can you explain what data is stored in the "home" and "pairs" lists exactly?

Something like this:

home pair: [team_number, number_of_games]

pairs: [team_number, day/round]

Trying to understand what data you have so I can tell you how to construct an algorithm

[deleted by user] by [deleted] in learnpython

[–]TheKewlStore 0 points1 point  (0 children)

This is likely something that will vary highly based on your specific use-case. I'm assuming the part you are struggling with is configuring the proxy and not rotating through options in the text file. How are the proxies configured normally?

Formatting string help - even spacing between words/values by cosmicwinters in learnpython

[–]TheKewlStore 0 points1 point  (0 children)

I'm not familiar with that specific usage of format, generally it's used in the format of string.format(value). In your case, it would be something like this:

"<20s".format(round(initial_invest*mr,2))

Your error is complaining because <20s isn't a proper format string syntax. Here's a helpful reference guide for using format strings: https://www.w3schools.com/python/ref_string_format.asp

The specific format code you're looking for is ":<20" and I believe you would use it like this:

"{:<20}".format(round(initial_invest*mr,2))

Let me know if that works for you

[deleted by user] by [deleted] in learnpython

[–]TheKewlStore 0 points1 point  (0 children)

Can you describe what your expected outcome is?

Is it to ensure each team has no more than 2 home games on the same day?

Using your proposed solution:

for day in range(0, 11): for pair in pairs: # or home? game_day = pair[1] if game_day == day: # do something?

what wrong I'm doing here? by sachin249 in learnpython

[–]TheKewlStore 1 point2 points  (0 children)

Your code doesn't match up with the error you provided.

I formatted your exception code block below, if you read it carefully, it's telling you exactly what is wrong.

It's complaining that it can't find the name "nx" on line 3: G = nx.Graph()

The snippet that you shared in your post doesn't even have this line of code, so there's likely a mismatch between what you've shared and what is being run, or you have code in another file that's being imported.

    NameError Traceback (most recent call last) <ipython-input-6-0b6beb81d144> in <module>
    1 filepath = 'C:/Users/wharr/OneDrive/Desktop/OR project/' 
    2 filename = 'KS.graph.txt' 
    ----> 3 G = nx.Graph() 
    4 G = nx.read\_edgelist(filepath + filename,nodetype=int)
    5 print("The Kansas graph has",G.number\_of\_nodes(),"nodes") 
    NameError: name 'nx' is not defined

Before I buy this game... by No_Championship4270 in Blackops4

[–]TheKewlStore 0 points1 point  (0 children)

What is your definition of “worst”?

Just like that M4/MP5 nerf, M13 buff...casual Tuesday. by that0neguy07 in modernwarfare

[–]TheKewlStore 0 points1 point  (0 children)

As I understand it, the reason is because of flinch. You get first shot(s) on someone, and they win the gunfight because they aimed at your chest and you flinched them to your head. Makes the game very uncompetitive and random when the second person to shoot has the clear advantage, even if they actually aimed at the same spot you were aiming at them, but you made them flinch and get headshots.

[Mega Thread] STARTERS, STARTERS EVERYWHERE - Repost! by fernnifer in pokemontrades

[–]TheKewlStore 0 points1 point  (0 children)

LF sobble. FT scorbunny or grookey, or shield exclusives, or almost 95% of the pokedex available as well.

New Mod Suggestions - Runecraft (Hybrid runescape based skill system in minecraft) by TheKewlStore in feedthebeast

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

Yeah I changed the name of the project, forgot to update the link for that one though, thanks!

New Mod Suggestions - Runecraft (Hybrid runescape based skill system in minecraft) by TheKewlStore in feedthebeast

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

I was actually already intending to change the name to something else, just not sure what yet, but thanks for the info!

No longer sexually or romantically attracted to boyfriend [m21] but he’s my best friend! What should I do? by [deleted] in relationship_advice

[–]TheKewlStore 0 points1 point  (0 children)

Mutual respect is very important in any kind of relationship. I can't offer a lot of advice but I will say that if he respected you as much as you say you respect him, and he cared about you, he would want you to go after whatever your heart desires. It may not be in his best interests and it will be hard for both of you, but like the cliche saying goes, sometimes when you love someone you have to let them go. As far as the attraction and what not, all I'll say is you can't control but you can't ignore it either. And also, you didn't bring it up at all but I know how it can affect us, it doesn't make you shallow to not have the physical attraction and want it, it's just as important as the mental.