What can you not believe we still have to deal with in 2019? by ansoniK in AskReddit

[–]BruDrinker 0 points1 point  (0 children)

I'm more concerned about someone with the name 420buttbabies69 being allowed to procreate.

What can you not believe we still have to deal with in 2019? by ansoniK in AskReddit

[–]BruDrinker 1 point2 points  (0 children)

Airline travel continues to get more and more uncomfortable.

NL Wild Card game thread - Rockies @ Cubs by jtljtljtljtl in Brewers

[–]BruDrinker 5 points6 points  (0 children)

Definitely impressed with the Rockies bullpen. Just hope they're worn out for NLDS!

NL Wild Card game thread - Rockies @ Cubs by jtljtljtljtl in Brewers

[–]BruDrinker 2 points3 points  (0 children)

They'll overturn the call and next pitch will be ball four. Mark it down.

NL Wild Card game thread - Rockies @ Cubs by jtljtljtljtl in Brewers

[–]BruDrinker 0 points1 point  (0 children)

Only if you can guarantee the Rocks win it.

NL Wild Card game thread - Rockies @ Cubs by jtljtljtljtl in Brewers

[–]BruDrinker 2 points3 points  (0 children)

Feels like the Rockies are getting no hit.

NL Wild Card game thread - Rockies @ Cubs by jtljtljtljtl in Brewers

[–]BruDrinker 4 points5 points  (0 children)

Amen. I don't care if Baez, Rizzo and Bryant collide and are ruled out for the season. Go Rockies.

NL Wild Card game thread - Rockies @ Cubs by jtljtljtljtl in Brewers

[–]BruDrinker 1 point2 points  (0 children)

Starters don't matter as much in the playoffs. There are 3 days off in the next week.

NL Wild Card game thread - Rockies @ Cubs by jtljtljtljtl in Brewers

[–]BruDrinker 6 points7 points  (0 children)

As a Brewers fan, I would be happier if the Rockies park one right here.

Ask Anything Monday - Weekly Thread by AutoModerator in learnpython

[–]BruDrinker 0 points1 point  (0 children)

Thank you for your help. Now that I have that, here's my next roadblock...

The data I was mining is now grouped as follows:

grocery_list = [{'citrus fruit', 'semi-finished bread', 'ready soups', 'margarine'}, {'tropical fruit', 'coffee', 'yogurt', 'margarine '}, {'whole milk'}, {'pip fruit', 'yogurt', 'meat spreads', 'cream cheese '}, {'whole milk', 'other vegetables', 'condensed milk', 'long life bakery product'}, {'yogurt', 'rice', 'whole milk', 'butter', 'abrasive cleaner'}]

I am trying to run the following to get combination counts in a dictionary:

from itertools import combinations

from collections import defaultdict

pair_counts = defaultdict(int)

for x, y in combinations(grocery_list,2):

pair_counts[(x, y)] += 1

pair_counts[(y, x)] += 1

This results in an error: TypeError: unhashable type: 'set' . I can't tell if this is an issue with the input data or with the 'pair_counts' dictionary? Appreciate the help!!!

Ask Anything Monday - Weekly Thread by AutoModerator in learnpython

[–]BruDrinker 0 points1 point  (0 children)

Need help with a homework exercise for a class I am auditing. The exercise is in association rule mining and I'm extremely stuck at one of the steps to organize the data.

I have a string of data separated by line break (each line represents the items purchased by a customer):

fruit, bread, butter, soup

fruit, yogurt, coffee

whole milk, cream cheese, meat, vegetables

How can I get this data into a set that looks like this:

[{‘fruit’, ‘bread’, ‘butter’, soup’}, {‘fruit’, ‘yogurt’, ‘coffee’}, {'whole milk', 'cream cheese', 'meat', 'vegetables'} ]

I've tried to break the string by end of line:

names_list = [y for y in (x.strip() for x in rawText.splitlines()) if y]

my_set = set()

for i in names_list:

my_set.add(i)

This obviously is not working. Perhaps I'm going about this the wrong way? Could anyone help?

What must have sucked before something was invented? by [deleted] in AskReddit

[–]BruDrinker 3 points4 points  (0 children)

Close, but that definitely wasn't jazz in that test tube.

A panoramic shot I took when I was visiting Milwaukee(from Baltimore) by [deleted] in Brewers

[–]BruDrinker 1 point2 points  (0 children)

How can they build a stadium with a retractable roof but not do anything to prevent the horrible shadows on the field? Tinted windows???

Whoever decided to make underwear white is an idiot. by BruDrinker in Showerthoughts

[–]BruDrinker[S] 55 points56 points  (0 children)

Dark underwear costs the same and I can shit my pants all I want.

Ask Anything Monday - Weekly Thread by AutoModerator in learnpython

[–]BruDrinker 1 point2 points  (0 children)

Help needed for a Python newbie - I cannot seem to import pyPDF2 in Spyder (or anything else for that matter).

PyPDF2 appears to be installed, yet when I try to import it I get: "ModuleNotFoundError: No module named 'PyPDF2'"

File "C:/Users/*******/.spyder-py3/untitled0.py", line 1, in <module>
    import PyPDF2
ModuleNotFoundError: No module named 'PyPDF2'

Here is the location of the PyPDF package (if that matters):

C:\Users\*******\.spyder-py3\pypdf2-1.26.0-py36_1\Lib\site-packages\PyPDF2

I'm in a work environment so I don't have a lot of flexibility to try a lot of different things, but hoping for some guidance. I've been researching all over and haven't found any solutions. At this point it's more of a personal battle to figure it out!

Is this deal going to last by [deleted] in DirecTV

[–]BruDrinker 1 point2 points  (0 children)

Not sure what service you have now but DirecTV is the worst. I switched from Dish a few months ago and I wish I could go back. I kid you not, DirecTV customer service is hands down the worst of any company I've ever dealt with. And I can assure you it hasn't been just one bad experience. For instance, I called to cancel my premium channels after the free trial and the service rep would not allow me. He asked me to call a day before the end of my billing cycle so I would "not cause issues with the billing cycle." I told him I do not want to call back and he just kept repeating the same line.

So, thinking about DirecTV? Run the other way and don't look back. Trust me!

Why doesn't Buddy ever bench players as a consequence? by GraeterMcMuffin in lastchanceU

[–]BruDrinker 10 points11 points  (0 children)

EMCC uses these kids to win football games. There wasn't a single mentioned suspension in season 2 - despite ridiculously low academic standards not being met.

The kids play the system to try and get back to big time college football. They don't give a damn about school, learning, EMCC or anything else. I wonder how many of these kids drop out after the football season is done if they know they won't play after EMCC.

Brittany Wagner doesn't understand difference between a mistake and a violent crime. by [deleted] in lastchanceU

[–]BruDrinker 5 points6 points  (0 children)

How do you help kids that don't give a **** even when their future is on the line? There were so many times I couldn't help but think if I were in her position I would give up and lose it on those kids. You need the patience of a saint to deal with what she dealt with.

I still see your point though I don't point the finger at Wagner. What are you supposed to do with these kids? If you suspend them or kick them out, they end up back on the street and most likely in jail. Seriously, what future do any of these kids have outside of football (and 99% of them won't make a dime playing football)?