252 views, 1 RAM, and 0 comments
- Correct Horse Battery Staple from XKCD, if somehow you haven't seen this before.
- There's also a generator that can be used here.
- How to Choose a Password - Computerphile
Code for Correct Horse Battery Staple
Correct Horse Battery Staple in Python
def correct_horse_battery_staple(): # Opens a newline-separated list of words that is generally included by default in Unix/Linux distributions # See https://gist.github.com/wchargin/8927565 with open("/usr/share/dict/words") as f: lines = f.readlines() # Get four random lines and put them into an array arr = list() while len(arr) < 4: arr.append(random.choice(lines).strip() ) # Add a random number and random piece of punctuation arr.append(str(random.randint(1000,9999)) ) arr.append( random.choice(string.punctuation) ) # Join the array elements using a random choice of punctiation as a separator return random.choice(string.punctuation).join(arr) print( correct_horse_battery_staple() ) # Example Outputs: # stepchild$lasagnes$Eridanus$castor's$9080$% # medic:afforded:Pincus:derailment:6333:] # mythologies\ankhs\keystroke's\cathodes\6201\(
Correct Horse Battery Staple in Bash
Previously posted in the quality content dump thread.
for i in `seq 1 10`; do nice_dogs=`shuf -n 5 /usr/share/dict/words | tr '\n' '-'` && echo $nice_dogs$RANDOM; done
Sir, I can do you a nice SEO.
Post a New Comment
Do you like having a good time?
Register an Account
Read Quality Articles
Read some quality articles. If you can manage to not get banned for like five minutes, you can even post your own articles.
Argue with People on the Internet
Use your account to explain why people are wrong on the Internet forum.
Vandalize the Wiki
Or don't. I'm not your dad.
Ask and/or Answer Questions
If someone asks a terrible question, post a LMGTFY link.
Make Some Money
Hire freelancers and/or advertise your goods and/or services. Hire people directly. We're not a middleman or your dad. Manage your own business transactions.
Answers— Read More
Find more related content below!
- [BASH, cURL] Yellow Pages Scraper: Fully Functional Script with Source Code
- [cURL, BASH] How to Crawl and Scrape DuckDuckGo Search Results
- The Basics to Web Scraping with cURL and XPath
- Extracting Emails from HTML with Google Sheets: Get Contact Information in Bulk for Guest Posts, (lmao) 404 Re...
- [Infographic] The Beginner's SQLite Cheat Sheet
- Analyzing the Web: Downloading the Majestic Million, Setting up SQLite, Crawling the Web, and Generating Repor...
- Downloading Bulk Images: ThisPersonDoesNotExist with Python and urllib2
- Spit in the Face of God: Five Tasks You Didn’t Know Could be Done with Google Sheets
- An introduction to scraping with Python and BeautifulSoup