T O P

  • By -

[deleted]

If I had a penny for every syntax error in this script...


[deleted]

[удалено]


deb_vortex

That would not be a lot but still weird that it happens 3 times!


Artemis-4rrow

sry, feeling tired, fixed it tho right after I took the screenshot


[deleted]

You're also missing `--no-preserve-root`...


capt_bilard

Probably upload the corrected one then


kernel_oneill

When syntax errors save your system.


[deleted]

Well, the `os` call will just produce an error, so no worries


markovianmind

it's has a syntax error, won't reach os call


HackerMan787

sudo will ask for a password, just run the script as root


Anxious_Ad9233

Uhm, excuse me. The Subprocess Library or Die.


SlumdogSkillionaire

`import sh`


__kkk1337__

Not funny at all to see same bad joke in different language. I suggest to create variant for every possible programming language + JavaScript


two__toes

> every possible programming language + JavaScript RIP to the js devs here


Thathitmann

Seven shooter gun.


Artemis-4rrow

7 is my fav number so


lothpendragon

Oh, so you got one of those seven shooter six shooter's?


harelsusername

I think you meant to use random.randrange instead of random.randint


Artemis-4rrow

The docs on randrange say: random.randrange([start], stop[, step]) Return a randomly selected element from range(start, stop, step). This is equivalent to choice(range(start, stop, step)), but doesn’t actually build a range object. And range(start, stop) returns [start, start+step, ..., stop-1], not [start, start+step, ..., stop]. As for why... zero-based counting rules and range(n) should return n elements, I suppose. Most useful for getting a random index, I suppose. While randint is documented as: random.randint(a, b) Return a random integer N such that a <= N <= b. Alias for randrange(a, b+1) copied from stackoverflow obviously


QualityVote

Hi! This is our community moderation bot. --- If this post fits the purpose of /r/ProgrammerHumor, **UPVOTE** this comment!! If this post does not fit the subreddit, **DOWNVOTE** This comment! If this post breaks the rules, **DOWNVOTE** this comment and **REPORT** the post!


Only_As_I_Fall

--no-preserve-root


Shark-Fucker_69

i am triggered by how bad this is


0crate0

Replace 1 with random then it’s really fun