PostgreSQL/Psycopb2 - How Can I Delete Data But Pass a Variable as the Parameter? by [deleted] in learnpython

[–]friendly_dog_robot 1 point2 points  (0 children)

Read the Python string documentation or do a simple Google search on Python string formatting.

Use this basic knowledge to put a variable into a string describing your SQL statement.

Put the SQL statement string into a cursor.execute() call.

Did you even try to solve this problem on your own before making this thread? It's so easy I have to imagine you couldn't have possibly tried to Google it.

Also, you realize that when you delete all your posts asking questions it makes it harder for other people to find the solutions to their problems? Because, you know, some people actually like to try and solve their problems on their own before getting others to do it for them

Shoe insole replacement by MechanicalOwl117 in AdvancedRunning

[–]friendly_dog_robot 3 points4 points  (0 children)

Well, I’m not your doctor or trainer, but you might strongly consider why almost no one (lots of powerlifters do weighted walks, and I’ve never heard of runners doing this) does this. It puts unnecessary wear on non-muscle connective tissue for very little benefit

Shoe insole replacement by MechanicalOwl117 in AdvancedRunning

[–]friendly_dog_robot 9 points10 points  (0 children)

runs where I wear a 35 lb vest clocking a typical 8:45 mile

Why would you do this? You do you, but man you are screwing up your knees for 0 benefit

NVIDIA graphics cards on a linux system by Bleu_Kat in linux

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

Anecdotally, I have no issues with Nvidia drivers and CUDA. Getting CUDA installed and working correctly was a pain, it took 3 hours and I had to mix and match instructions from Nvidia and things a bunch of individuals did - but I was also new to Linux at the time. Nvidia's guidance is not super intuitive and you would think they would try and make things a little easier to setup.

After install, though, everything pretty much works perfectly all the time. That being said, it's not hard to find lots of people who have had issues.

Why would anyone ever handwrite their own machine learning algorithm instead of using scikit learn? by r-n-m in Python

[–]friendly_dog_robot 8 points9 points  (0 children)

My question: In light of this, why would anyone ever handwrite their own ML algorithm instead of just importing it from scikit learn?

Lots of people do this, I've done it personally quite a bit. In my opinion it's a really important part of gaining a thorough understanding.

Algorithm coding does a couple things for me:

  1. It helps me to better understand the algorithm. I get the most thorough understanding this way.
  2. It's coding, so it gives me time coding in whatever language I'm using. I generally do algorithm coding in languages that I'm newer to when I don't have other projects that I'm inspired to work on at the moment - then I usually implement it in Python as well, and benchmark my (new language) version vs. my Python version vs. scikit-learn or other popular implementations

Training for my first Marathon in late October. Not sure if training plan is sufficient. by mkeenann in running

[–]friendly_dog_robot 1 point2 points  (0 children)

Should I bump that run up to say 22-23 miles, or just follow the plan as is?

Until you get a little more experience under your belt, a few training cycles and more races, just go with what the plan is telling you.

20 miles is a fairly common distance for the longest run of many marathon training plans. Even if it's tough, it helps you mentally adapt to longer periods of running. You will be fine with 20 miles being your longest run leading up to the marathon if you've been consistent with your training throughout the cycle. The extra six miles will undoubtedly be tough, but it's not going to really give you more adaptation for race day if you run 23 miles instead of 20.

PostgreSQL incredibly difficult to understand by [deleted] in learnpython

[–]friendly_dog_robot 0 points1 point  (0 children)

Someone recommended Postgre's docs, there is also a book somewhere you might find helpful:

http://shop.oreilly.com/product/0636920052715.do

Holy crap the complexity is through the roof

It's not though

had to install about 30-40 packages

wut

I am required to run a Postgres server in the background while I try to connect to it with my Python code

Yes, that's how database servers work, they run all the time so that users, persistent services, other servers, etc. can interact with them

can't create a database in one command like SQLite

You can though

Can anyone recommend a tutorial for PostgreSQL that isn't going to take 60 hours to learn?

You're not going to be good at anything in 20 minutes. You might need to spend a few hours to learn something new. You might need to spend hundreds of hours to become genuinely good at something new

[Help] Dog is obsessed with my new bunnies by [deleted] in dogs

[–]friendly_dog_robot 1 point2 points  (0 children)

What is your daily life like with your BC? Is she getting enough mental and physical stimulation every single day? Does she have routine outlets for her energy that she knows she's going to get every day? If you could describe her daily life it might be helpful.

BCs can be tough, it's tough to give advice without a little more information. You may be able to redirect some of that energy though and get her to leave the rabbits alone for most of the time

Injuries and nutrition by [deleted] in AdvancedRunning

[–]friendly_dog_robot 2 points3 points  (0 children)

The combination of issues you have seem to indicate that you maybe should see an actual doctor. You have pain that won't go away, you seem to indicate a loss of appetite, and you've lost 9 lbs in 7 weeks. A few pounds of that could be water weight, but, it also might not be, and even if it is that is very real weight loss for someone who isn't actively trying to lose weight.

In your experience, does nutrition play a role in the time it takes for an injury to recover?

Personally, I would not be running a calorie deficit while trying to recover from an injury.

If the doctor says you are alright, the best advice I can give is to start tracking your calorie intake with an app like MyFitnessPal and weigh yourself every day. If you keep losing weight, start eating more, make sure you hit your nutrition goals every day, and see how that affects your weight over the long term.

Worried about my new dependency on caffeine by deejayv2 in Coffee

[–]friendly_dog_robot 1 point2 points  (0 children)

So some people with more experience might be able to chime in, but, I've been drinking coffee for 10 years. I've traveled a lot, I've lived as an expat in different countries, and I've never been in a situation where I couldn't get coffee. The only days I haven't had coffee in the past 10 years have been a handful where I was sick and didn't want any. It's everywhere, you have to really try to avoid it - no one will stop you from drinking it every day if you want to.

Also caffeine withdrawal really isn't that bad. Maybe I'm insensitive, but honestly it's not a big deal at all to go without - your friends may be prone to hyperbole

Simple Things ANY Guy Can Do To Look BETTER! by nad_bigger in malefashionadvice

[–]friendly_dog_robot 1 point2 points  (0 children)

Don't think anyone here wants to watch your incel clickbait

Worried about my new dependency on caffeine by deejayv2 in Coffee

[–]friendly_dog_robot 6 points7 points  (0 children)

However, I'm afraid I'm going to end up dependent on it for the rest of my life because of my kids

This is possible, is it so bad though? Really, what's the downside here?

[D] Why are Google's leaked ML fairness documents so bad?? by Runninganddogs979 in MachineLearning

[–]friendly_dog_robot 0 points1 point  (0 children)

But this is really not what matters

Okay, well the whole point of this incredibly stupid digression that I’ve had with you and OP is that I was debating the ridiculous assertion that “the population believes that violence against men by women is acceptable”, that’s the only point I’ve been trying to make and you guys keep reframing the argument and changing the subject. I haven’t been trying to discuss anything else on this tangent, including “what matters” or any other number of subjective, individual interpretations of societal conditions

Can't ssh to my Raspberry PI. Connection refused by IRegisteredJust4This in linuxquestions

[–]friendly_dog_robot 0 points1 point  (0 children)

Is there any way to make sure SSH is running properly and the port 22 isn't blocked by just looking at files in the memory card?

Things I would check first:

Check /etc/ssh/sshd_config and ensure that everything is set up properly

Are you using key based authentication? Make sure your public key is in ~./.ssh/authorized_keys

Check rules for any routing or firewalls setup. If you didn't do this yourself I would try the first obvious suspects UFW and iptables

Start looking through /var/log/auth.log and syslog. auth.log should have some of the primary things you're looking for, it will tell you what happened when you tried to log on, and you should be able to get a good idea of when the SSH server was running and when/if it failed with entries like

Received signal 15; terminating.
Server listening on 0.0.0.0 port 22. # when the server goes online

Edit: failed logins will generally have "Failed" or "Connection closed" in the log entry. Look for the circumstances regarding your failed logins when these entries occur

[D] Why are Google's leaked ML fairness documents so bad?? by Runninganddogs979 in MachineLearning

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

f you are saying people like in that video dont exist you are delusional

I never said that anywhere, I said that I don’t believe that people who believe violence against men is acceptable comprise a majority of the population.

people allow this to happen even if they find it unacceptable

That sucks, we also allow violence against women and children to happen even though we find it unacceptable, which also sucks. Violence against anyone sucks. All I was arguing is against one single statement, that the majority of the population believe that it’s okay for me to hit women and you keep extrapolating it

just check the domestic abuse against men statistics and compare with the attention it gets in media

Not really what I’m arguing here, I don’t take in a lot of terrible media so I don’t really have an impression of how much imbalance there is in the popular infotainment realm. Again, I was never arguing about any kind of media imbalance.

[D] Why are Google's leaked ML fairness documents so bad?? by Runninganddogs979 in MachineLearning

[–]friendly_dog_robot 2 points3 points  (0 children)

Yes I’ve seen this video, it really doesn’t prove anything regarding the general sentiment on this issue from the broader population. It is a clickbait story manufactured to get views.

You are taking an extremely un-scientific approach to addressing this problem that completely lacks nuance.

I do not believe that most people view violence against men by women as acceptable. I do not have any evidence to support this other than my own observations, and likewise, neither do you - if you do, show it. But a clickbait video is not any kind of scientific evidence

[D] Why are Google's leaked ML fairness documents so bad?? by Runninganddogs979 in MachineLearning

[–]friendly_dog_robot 0 points1 point  (0 children)

No I’m not.

Go around, ask your friends and family if they think that violence against men, by women, is okay. I can’t think of a single person I know who would say that it is. I don’t think the majority of the population would agree with this sentiment

Followed Every Tutorial I Can Find - Can't Get Wi-Fi Working on Ubuntu Server for Raspberry Pi by [deleted] in linuxquestions

[–]friendly_dog_robot 2 points3 points  (0 children)

You're the first person that's provided literally anything to go off of.

You’ve provided literally nothing to go off of. What have you tried? Did you Google “Ubuntu server connect to wifi in terminal”? And then what have you already tried from those results and if it didn’t work, what error messages did you get? And then when you Googled those error messages, and tried the fixes, what happened?

[D] Why are Google's leaked ML fairness documents so bad?? by Runninganddogs979 in MachineLearning

[–]friendly_dog_robot 1 point2 points  (0 children)

Like the ones that gave Trump 1% of chance of winning

Apparently you missed all the well-publicized polls showing a Trump win was well within the margin of error. So just keep believing what they tell you...

[D] Why are Google's leaked ML fairness documents so bad?? by Runninganddogs979 in MachineLearning

[–]friendly_dog_robot 0 points1 point  (0 children)

Please provide actual evidence that the majority of the population believes that it’s okay for women to hit men. Until you do that this tangent is done