Skip to content

Commit

Permalink
more facts
Browse files Browse the repository at this point in the history
  • Loading branch information
TabulateJarl8 committed Aug 15, 2021
1 parent bc46114 commit 6d6202e
Show file tree
Hide file tree
Showing 4 changed files with 161 additions and 11 deletions.
2 changes: 1 addition & 1 deletion randfacts/__version__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
__title__ = "randfacts"
__description__ = "Package to generate random facts"
__url__ = "https://github.com/TabulateJarl8/randfacts"
__version__ = "0.8.0"
__version__ = "0.9.0"
__author__ = "Tabulate"
__author_email__ = "[email protected]"
__license__ = "MIT"
Expand Down
158 changes: 152 additions & 6 deletions randfacts/safe.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1191,7 +1191,6 @@ A group of giraffes is called a tower.
Students who chew gum have better math test scores than those who do not, a study found.
White Chocolate isn't technically Chocolate, as it contains no cocoa solids or cocoa liquor.
An apple didn't hit Isaac Newton in the head, but it did make him wonder if the force that makes apples fall influences the moon's motion around Earth.
None of The Beatles Could Read Music.
The five most practiced religions in the world --Christianity, Islam, Hinduism, Chinese folk religion and Buddhism-- have their origins in Asia.
Bolivia has 37 official languages
Isaac Newton developed a sunlight phobia from staring at the sun.
Expand Down Expand Up @@ -2764,7 +2763,6 @@ Ukrainian monk, Dionysius Exiguus, created the modern day Christian calendar
The revenue that is generated from gambling is more than the revenue that comes from movies, cruise ships, recorded music, theme parks, and spectator sports combined
Every 30 seconds a house fire doubles in size
An alligator has about 80 teeth in its mouth at one time. An alligator can go through 3,000 teeth in a lifetime
A starfish can turn its stomach inside out
The story of Rudolph the Red-Nosed Reindeer was written in 1939 for a store promotion by an advertising employee of the department store Montgomery Ward
Actor Charlie Chaplin made 81 movies over a career that spanned 50 years
The music group Simply Red got its name from band member Mick Hucknall, who has red hair
Expand Down Expand Up @@ -4663,7 +4661,6 @@ The average American works 24,000 hours in their lifetime just to pay their taxe
If you have 3 quarters, 4 dimes, and 4 pennies, you have $1.19. You also have the largest amount of money in coins without being able to make change for a dollar.
The numbers '172' can be found on the back of the U.S. $5 dollar bill in the bushes at the base of the Lincoln Memorial.
President Kennedy was the fastest random speaker in the world with upwards of 350 words per minute.
In the average lifetime, a person will walk the equivalent of 5 times around the equator.
Odontophobia is the fear of teeth.
The 57 on Heinz ketchup bottles represents the number of varieties of pickles the company once had.
In the early days of the telephone, operators would pick up a call and use the phrase, "Well, are you there?". It wasn't until 1895 that someone suggested answering the phone with the phrase "number please?"
Expand Down Expand Up @@ -5165,7 +5162,6 @@ Ingrown toenails are hereditary.
"Underground" is the only word in the English language that begins and ends with the letters "und"
The longest word in the English language, according to the Oxford English Dictionary, is: pneumonoultramicroscopicsilicovolcanoconiosis.
The longest place-name still in use is: Taumatawhakatangihangakoauauotamateaturipukakapikimaungahoronukupokaiakitnatahu, a New Zealand hill.
An ostrich's eye is bigger than its brain.
Alfred Hitchcock didn't have a belly button. It was eliminated when he was sewn up after surgery.
Telly Savalas and Louis Armstrong died on their birthdays.
Donald Duck's middle name is Fauntleroy.
Expand Down Expand Up @@ -5357,7 +5353,6 @@ The color red doesn't really make bulls angry; they are color-blind.
In 2007, Scotland spent £125,000 devising a new national slogan. The winning entry was: "Welcome to Scotland".
Until 2016, the "Happy Birthday" song was not for public use. Meaning, prior to 2016, the song was copyrighted and you had to pay a license to use it.
There is a punctuation mark used to signify irony or sarcasm that looks like a backwards question mark ⸮
Lettuce is a member of the sunflower family.
Researches have found that flossing your teeth can help your memory. Flossing prevents gum disease, which prevents stiff blood vessels, which cause memory issues.
A cluster of bananas is called a "hand". Along that theme, a single banana is called a "finger".
The Hobbit has been published in two editions. In the first edition, Gollum willingly bet on his ring in the riddle game.
Expand Down Expand Up @@ -5473,4 +5468,155 @@ There is a United Arab Emirates' territory inside an Oman's territory that itsel
Disappointment Island is an uninhabited island in New Zealand. Over 65,000 pairs of white-capped albatross live there. In 1868, a steel tanker crashed on the island which killed 68 people, leaving the 15 survivors waiting 18 months to be rescued. In 1907, another ship ended up crashing there and 12 men drowned.
During the entire run of Gilligan's Island, it was never revealed if "Gilligan" was his first or last name.
When Jorge Garcia first got the part on LOST as Hurley, he lost a total of 30 pounds in weight before filming started.
Video games have been found to be more effective at battling depression than therapy.
Video games have been found to be more effective at battling depression than therapy.
Polar bear fur is actually clear, and their skin is black.
Baby flamingos are born grey, not pink.
A woodpecker's tongue actually wraps all the way around its brain, protecting it from damage when it's hammering into a tree.
A shrimp's heart is located in its head.
Elephants suck on their trunks for comfort.
Anteaters have no teeth.
Nine-banded armadillos always have quadruplets, and they're always identical.
Wombat poop is cube-shaped.
Hippos and horses are actually distant relatives.
All clownfish are born male.
In the UK, The Queen legally owns all unmarked swans.
To keep from drifting apart, sea otters hold hands while they sleep.
Goats have accents.
Dolphins give names to each other.
Gorillas can catch human colds
The turkey was once almost named the national bird.
A group of owls is called a parliament.
There are 32 muscles in a cat's ear.
Snails can regenerate their eyes.
Female turtles hiss and male turtles grunt.
A starfish can turn its stomach inside out.
French Poodles are actually from Germany.
Seahorses mate for life and can often be seen holding each other's tales.
A group of porcupines is called a prickle.
Andrew Jackson's parrot had to be removed from his funeral because it wouldn't stop swearing.
Sloths can hold their breaths for up to 40 minutes.
Henry VIII knighted all four of his "Grooms of Stool" - the people in charge of wiping his butt for him.
Jeannette Rankin was elected to Congress four years before women could even vote.
Women couldn't apply for credit at a bank until 1974.
Before the invention of modern false teeth, dentures were commonly made from the teeth of dead soldiers.
In ancient Egypt, servants were smeared with honey so flies would flock to them instead of the pharaoh.
It was once considered sacrilegious to use a fork.
Abe Lincoln was a champion wrestler. He was also a licensed bartender.
George Washington owned a whiskey distillery.
More than two percent of the American population was killed during the Civil War.
Joseph Stalin used to have people removed from photos after they died or were removed from office.
Since 1945, all British tanks have been equipped with the necessary items for making tea.
Pope Gregory IV once declared war on cats because he believed Satan used black cats. His declaration lead to the mass extermination of cats.
That lack of cats led to a rat infestation which led to the spread of the plague.
John Adams was the first president to live in the White House.
Chernobyl, the Exxon Valdez Oil Spill, and the Challenger explosion have all been attributed to a lack of sleep.
The average person living in Sweden eats about 22 pounds of chocolate a year.
While the Wright Brothers are famous as a pair, they actually only flew together once. They promised their father they'd always fly separately.
Montana has three times as many cows as it does people.
Parts of the Great Wall of China were made with sticky rice.
Ninety percent of the world's population lives above the equator.
Finland has more saunas than cars.
Sixty percent of the World's lakes (three million total) are located in Canada.
Virginia is the only state that has the same state flower and state tree, the Dogwood.
Think before you season. In Egypt, it's considered incredibly rude to salt food that has been served to you.
Ninety percent of Libya is desert.
The height of the Eiffel Tour can vary up to six inches, depending on the temperature.
Spend too much on drinks when you eat out? A small town in Italy actually has a fountain that serves free wine.
Pilots and their co-pilots are required to eat different meals before flights so that they don't both end up with food poisoning.
Roughly 600 Parisians work at the Eiffel Tower each day.
There's a city named Rome on six out of seven continents.
When visiting Key West, you're actually closer to Havana than you are to Miami.
Mary, of "Mary Had A Little Lamb" fame, was a real person and the song is based on a true story.
"Happy Birthday" was the first song ever played on Mars. Mars Rover Curiosity played the song to itself on its first anniversary on the planet.
While listening to music, your heart can sync to the rhythm.
President Nixon was an accomplished musician. He played five instruments, including the accordion.
Got a song stuck in your head? That's called an "earworm."
None of The Beatles could actually read music.
George Harrison could reportedly play 26 instruments.
Barry Manilow did not, in fact, write "I Write The Songs."
Metallica is the only band to perform on all seven continents.
Most department stores tend to play slower music, in order to slow down customers and keep them shopping longer. The opposite is true for restaurants.
Monaco's orchestra is bigger than its army.
A concert promoter once sold a thousand tickets to a Spice Girls concert in Hawaii that was never actually booked. Maybe that's where they got the idea for Fyre Fest.
Leo Fender, the inventor of the Stratocaster and the Telecaster, couldn't play guitar.
In 2016, Mozart sold more albums than Beyoncé.
During a fundraiser for Hurricane Katrina relief efforts, someone donated $35,000 so that VH1 Classic would have to play "99 Luftballons" on repeat for an entire hour.
"A Boy Named Sue" wasn't written by Johnny Cash. Shel Silverstein wrote it.
In 2015, Belfast police used ice cream truck music to deter teenage rioters.
Gatorade was named after the University of Florida Gators.
China didn't win its first Olympic medal until 1984.
The average golf ball has 336 dimples.
Tennis was originally played with bare hands.
The Cleveland Browns are the only team to neither play in or host a Super Bowl.
Wilt Chamberlain is in the Volleyball Hall of Fame.
Some golf balls are filled with honey.
Despite taking about three hours to play out, the average baseball game only has about 18 minutes of active playing time.
MLB umpires are required to wear black underwear in case they split their pants.
Bo Jackson refused the teams that originally tried to draft him in both baseball and football.
Both volleyball and basketball were invented in Massachusetts.
Michael Jordan and the Chicago Bulls once went eight seasons (starting in 1990) without a three-game losing streak.
NFL refs also get Super Bowl rings.
President Hubert Hoover invented a game called "Hooverball" which was a cross between tennis and volleyball and was played with a medicine ball.
Only one city has won three major championships in one year. In 1935, the Detroit Lions won the Super Bowl, the Tigers won the world series, and the Red Wings won the Stanley Cup.
In WWII British soldiers had to make do with only three sheets of toilet paper per day!
In Russia, beer was considered a soft drink, not alcohol, until 2011!
Strawberries are NOT berries, but bananas actually are!
A tomato is actually a fruit.
The cashew nuts we eat are actually attached to a large cashew apple that is used to make soft drinks in Brazil.
Mice do not like cheese. They prefer sweets if given the choice - they like to eat fruit, seeds, and grains.
Turkey was probably not eaten at the first Thanksgiving - instead, wildfowl, goose, and possibly passenger pigeons and swans were consumed.
A flock of ravens is called a conspiracy.
Caterpillars have 12 eyes.
Mice have pretty funny names: A female mouse is a doe and a male mouse is a buck. Baby mice are sometimes called pinkies because of their color and sometimes called pups.
Gorillas, monkeys, bonobos, and other primates make a new nest to sleep in every night.
Chickens don't just eat seeds, they like to eat insects and also mice and lizards.
Giraffes don't just have long necks: They have long tongues. Their tongues are between 18 and 20 inches long.
In Arizona, you can't feed garbage to pigs without getting a permit.
Sea otters like to hold each other's paws when they sleep, so they don't drift apart while dreaming.
Apples come from the same plant family as roses. So do plums, raspberries, and many other delicious fruits.
The first Akita dog came to this country in 1937 - as a present for Helen Keller.
Turns out, a dog's paw print is just as unique as a human's.
A camel can drink up to 40 gallons of water in one go.
Fortune telling is illegal in Maryland.
The technical term for a fear of long words is ""hippopotomonstrosesquippedaliophobia."
The White House has 35 bathrooms.
Greyhounds can run up to 45 mph.
Hiking naked is illegal in Switzerland.
A flock of flamingos is called a flamboyance.
New York's Central Park is bigger than Monaco.
Using ferrets to hunt other animals is illegal in West Virginia.
There are over 9,000 benches in Central Park.
Theodore Roosevelt's kids had a pet bear, badger, and hyena, to name but a few animals - and they brought them all to the White House.
There are over 700 ancient Egyptian hieroglyphic symbols.
Saturn's surface is less dense than water.
The expression "heart of gold" was invented by Shakespeare.
To make one pound of honey, a bee has to fly 90,000 miles.
One bee typically only makes one twelfth of a teaspoon of honey in its lifetime.
An ostrich's eye is bigger than its brain.
The United States apparently makes 25 percent of the world's cheese.
The human hand has 54 bones.
Most U.S. stamp adhesive contains about one-tenth of a calorie. British stamps could set you back 5.9 calories.
Crows hold funerals for their dead.
Bees are the only insect that produce food that people eat.
Lettuce is a member of the sunflower family.
Jin Songhao of China won the world record for longest skin contact with snow at 46 minutes and 7 seconds!
The heaviest onion on record was grown by Pete Glazebrook of England which weighed 17 pounds.
The title of tallest Mohawk goes to Kazuhito Watanabe, a Japanese fashion designer. It measures three feet 8.6 inches.
Elmer Fudd's original name was Egghead.
The actors who voiced Mickey and Minnie mouse from the 1980s to the 2010s were married.
In some Harry Potter movie scenes where Harry, Ron, and Hermione are doing their Hogwarts schoolwork, the actors were actually doing their real schoolwork.
The oldest domestic cat on record lived for 38 years.
Little brown bats make for the longest nappers - in captivity, they nap up to 19.9 hours a day.
The longest noodle ever made is more than 10,000 feet long, or almost two miles.
Otto the bulldog broke the record for dog to skate through the longest human tunnel when he skated through the legs of 30 people without any assistance.
A flock of peacocks is called a party.
The Supreme Court has its own basketball court.
We believe that time stops at the speed of light.
In their lifetime, the average person walks the equivalent of five times around the Earth.
Humans wouldn't be able to taste food without saliva.
If Betelgeuse exploded right now, the star's last light show would brighten our sky for around two months.
Oona Chaplin, who played Robb Stark's wife in Game of Thrones, is Charlie Chaplin's granddaughter.
The founder of sportswear companies Puma and Adidas were brothers.
The only letter of the alphabet that doesn't appear in any American state is q.
The original Ferris Wheel was designed and constructed in Chicago, Illinois, by George Washington Gale Ferris, Jr.
While SPAM is most popular in Hawaii, it was actually invented in Minnesota.
2 changes: 1 addition & 1 deletion tests/fix_encoding.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
safe_path = os.path.join(parent, 'randfacts', 'safe.txt')
unsafe_path = os.path.join(parent, 'randfacts', 'unsafe.txt')

bad_characters = [("‘", "'"), ("’", "'"), ("“", '"'), ("”", '"')]
bad_characters = [("‘", "'"), ("’", "'"), ("“", '"'), ("”", '"'), ("…", "..."), ('—', '-')]

with open(safe_path, encoding="utf-8") as f:
safe = f.read()
Expand Down
10 changes: 7 additions & 3 deletions tests/test.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import unittest
import randfacts
import sys
import pathlib
import subprocess

sys.path.insert(1, str(pathlib.Path(__file__).parents[1]))
from randfacts import randfacts # local randfacts instead of installed version

class TestRandfacts(unittest.TestCase):

def test_get_fact(self):
Expand Down Expand Up @@ -30,9 +34,9 @@ def test_cli_mixed_args(self):
child = subprocess.Popen(['python3', '-m', 'randfacts', '--mixed'], stdout=subprocess.DEVNULL)
child.communicate()
self.assertEqual(child.returncode, 0, '`python3 -m randfacts --mixed` must return with exit code 0')

def test_invalid_characters(self):
bad_characters = ["‘", "’", "“", "”"]
bad_characters = ["‘", "’", "“", "”", "…", "—"]
for index, fact in enumerate(randfacts.all_facts):
for char in bad_characters:
self.assertNotIn(char, fact, f'Index: {index}')
Expand Down

0 comments on commit 6d6202e

Please sign in to comment.