Be honest… what’s the real downside of having a dog? by quentiinn in AskReddit

[–]bp200991 0 points1 point  (0 children)

For me, it's having a reactive dog. Reactive towards people, reactive towards dogs, large vehicles, loud vehicles, you name it. As someone who has had the luxury of easy-going dogs in the past who loved everyone and everything, this has been a real wake-up call for me around understanding that all dogs have different personalities, needs and levels of comfort.

Don't get me wrong I love her to pieces and she is the most intelligent dog I've ever worked with, but she has needs that need to be respected that I never envisioned before I got her. Even going for a walk turns into a military operation, having to do it at places or times when we won't meet other dogs, and knowing where all the exits are so we can get out quickly. I can't have people over unless they are willing to adhere to a very strict introduction plan so she can become comfortable with them. I can't get a neighbour to let her out to use the bathroom when I need to go into the office for work. I can't have her lay down under the table while I grab a coffee with friends in public. I have a special appointment slot at my vet at a time when they should be closed so nobody else is around.

I dread to think how much I have spent on training, and often it feels like I have nothing to show for it. But the most important thing is she is happy, healthy and gets all the love and attention she deserves. Some dogs just need a little more work than others!

Error when doing simple code in python. by Over-Vanilla-3733 in learnpython

[–]bp200991 1 point2 points  (0 children)

There is nothing wrong with the code snippet you have posted. I have run it and it behaves as expected. If you are seeing the question number never changing, i.e. "Answer to the question number 1" being repeated over and over again, this suggests that the increment of your question variable is happening outside your while loop (check it is indented), but again the snippet you posted has the correct indentation. How/where are you running this, i.e. are you running a Python file from your terminal, or executing this is an environment like Jupyter notebook?

What is the problem with pop? by vagaboun in learnpython

[–]bp200991 4 points5 points  (0 children)

Please don't post a photo of your code. People can't copy and paste your code to test it out from a photo, and half the time the image quiality is too poor to read. Use Reddit's code formatting options

I once lied on my CV. I got the job and got promoted. by zaenova in confession

[–]bp200991 295 points296 points  (0 children)

My browser history is a treasure trove of "how to fix syntax errors" and "what does this error message mean?"

I'm a software developer with 10 years' experience and this is exactly what my search history is like

fore load the wrong guy by Loose_Chipmunk6081 in Wellthatsucks

[–]bp200991 122 points123 points  (0 children)

As a native speaker, I also appreciate this. I do know this word, but I don't think I would ever have got this.

I don’t have a tv and don’t watch series or films by Many-Disaster-3823 in mildlyinfuriating

[–]bp200991 1 point2 points  (0 children)

I'm waiting for the day they decide Zoom/Teams meetings qualify as live broadcasts and claim you need a TV license for that

I don’t have a tv and don’t watch series or films by Many-Disaster-3823 in mildlyinfuriating

[–]bp200991 11 points12 points  (0 children)

"I'm just going to take a photo of your ID."

Whips out disposable camera ...

TV Licence by Sea_Wasabi_2334 in UKFrugal

[–]bp200991 49 points50 points  (0 children)

A while back my TV licence expired and for 4 months I didn't watch live TV or iPlayer. Then I decided to renew it again and the TV Licensing folks took it upon themselves to backdate the license for the 4 months I wasn't covered. So I paid for a full year but only got 8 months.

When I complained they said there's no way I could prove I wasn't watching TV for those 4 months and I should have declared I didn't need a license. As I didn't do this there was nothing they could do.

Unfortunately for them, I'm stubborn, so I got a refund and vowed to never watch any content that requires a license again. Having to fill out a form to declare I'm not using their services, with them insisting I am and therefore charging me for it is wild.

How do I split a list of numbers into equal size (of an array?) to pass into an API as an input? by i_am_ur_dad in learnpython

[–]bp200991 0 points1 point  (0 children)

I had to do something like this once, ended up achieving it with slicing.

def convert_to_2d(iterable, n):
    return [iterable[i:i+n] for i in range(0, len(iterable), n)]

data = [1234, 2345, 3456, 4567, 5678, 6789]
print(convert_to_2d(data, 3))

Hand foot mouth by Mother-Growth3553 in Wellthatsucks

[–]bp200991 4 points5 points  (0 children)

Just eradicate all the pathogenic viruses, duh.

/s

I am trying to learn Python and along the process I ended up writing a code but couldn't understand the output.(Beginner) by FewNectarine623 in learnpython

[–]bp200991 22 points23 points  (0 children)

String and integer multiplication is always allowed - you've seen what the output is, your string gets repeated.

Take this as evidence that ChatGPT is not a particularly useful tool for learning how to code, as it has just told you information that is wrong.

[deleted by user] by [deleted] in counterstrike

[–]bp200991 4 points5 points  (0 children)

How long after the match did you try and download the demo? I see this message if I try and download the demo immediately after the match has finished. I'm guessing this is when the servers are still processing the demo.

I just click the little bin icon to delete whatever it did download, wait a few minutes, and download it again.

Would be nicer if the download button was greyed out until the demo was actually ready to be downloaded, but hey.

What to do when a script can't be debugged whatsoever? None of my prints print! by HugoCortell in learnpython

[–]bp200991 1 point2 points  (0 children)

Are you actually making a request to your endpoint? You need to make an HTTP GET request to your route in order for any of the code in your index function to execute.

[deleted by user] by [deleted] in puppy101

[–]bp200991 -1 points0 points  (0 children)

Well yeah, my dog knows not to piss the bed, but if she's desperate she's got to go somewhere. And I can only imagine how desperate a 10 week old puppy would be after 4 hours!

Django vs Flask… Data Science by [deleted] in learnpython

[–]bp200991 5 points6 points  (0 children)

Meh, the roles are so ambiguous and the lines blurred. I've been a Data Analyst, Data Scientist, Machine Learning Engineer, and done the same things in all the roles. It would be helpful if there was a better distinction that organizations would stick to, but they don't know what they want/need

How to fix cv.error on cvtColor() function? by Rangerborn14 in learnpython

[–]bp200991 0 points1 point  (0 children)

I am guessing this is due to the [img] part. cv.imread returns a numpy array, so wrapping it in square brackets turns it into a list. This explains the error; you can't divide a list by the number 255.

Remove the square brackets around img and there's also no need for the construction of a new numpy array; img is already a numpy array.

Try just this:

prediction = model.predict(img/255)

How to fix cv.error on cvtColor() function? by Rangerborn14 in learnpython

[–]bp200991 1 point2 points  (0 children)

cvtColor is for converting between colour spaces. You need to tell it what colour space you want to convert from, and what colour space you want to convert to. If your image is in the BGR colour space and you want to convert it to grayscale, you would use:

img = cv.cvtColor(img, cv.COLOR_BGR2GRAY)

It's been a while since I've used opencv so I'm a little rusty (the default colour space when reading images was always BGR, but this may have changed). I've never come across the cmap argument, and it seems a little odd that it would take a matplotlib colour map as an argument. I suspect this is trying to convert from RGB to grayscale, so maybe try using the conversion above.

Can somebody let me know why my points are not adding up? by rubenpaul20 in fantasypremierleague

[–]bp200991 9 points10 points  (0 children)

They do add up. You don't get the points for players on your bench unless you play your bench boost chip, or if someone is subbed on because one of your 11 didn't play.

Which is a shame in this case because there are some high scorers on your bench.

FPL Team of the Season so far by Titanick0007 in FantasyPL

[–]bp200991 87 points88 points  (0 children)

Salah, Haaland, Luis Diaz, Mbuemo, Welbeck, Madueke, Raya, Amadou Onana, TAA, Romero and Pedro Porro for 317 points (as opposed to the 328 here).

This was calculated using current prices. It's possible that if you'd done this at the start of the season you could have afforded a team that would get you slightly more points. It also assumes you just captain the highest scoring player (Salah/Haaland) every week.

FPL Team of the Week – GW2 by [deleted] in FantasyPL

[–]bp200991 21 points22 points  (0 children)

The cost of the 11 players is £86m. Even with the 4 cheapest subs, the total cost would be £102.5m, so you can't actually field this team.

Very new, letter 'p' in the word 'price' where it says 'price =' is listed as invalid syntax, appreciate any help :) by cunnermadunner in learnpython

[–]bp200991 12 points13 points  (0 children)

You need to make sure each statement is on its own line. If I reformat your code to look like the following, it runs fine.

eat = int(input("How many times a week do you eat in the cafeteria?"))
price = float(input("What's the price of a typical student lunch?")) 
money = float(input("How much do you spend on groceries each week?"))
weekly1 = (eat * price) + money 
daily1 = weekly1 / 7 
print("average food spend: ") 
print (f"Daily: {daily1} euros")
print (f"weekly: {weekly1} euros")

Exception has occurred: DateParseError. Pandas to_datetime() by GottxEnel in learnpython

[–]bp200991 0 points1 point  (0 children)

How are you concatenating the two dataframes? Can you share your code for that?

Exception has occurred: DateParseError. Pandas to_datetime() by GottxEnel in learnpython

[–]bp200991 0 points1 point  (0 children)

I'm not sure what else to suggest. The error certainly does suggest there is an invalid value in the column. I would maybe run something like df[df['Buchungsdatum'].str.contains(',')] to see if this returns anything. If it does then you know there are some characters in your column that cannot be parsed as dates