Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions data/bible_texts.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
Name,Role,Book,Chapter,Verse,Texts
Adam,First Man,Genesis,1,1,"In the beginning, God created the heavens and the earth."
Eve,First Woman,Genesis,22,5,"Abraham said to his young men, “Stay here with the donkey. The boy and I will go yonder. We will worship, and come back to you.”"
Noah,Builder of the Ark,Genesis,12,10,"There was a famine in the land. Abram went down into Egypt to live as a foreigner there, for the famine was severe in the land."
Abraham,Father of Nations,Genesis,6,15,"This is how you shall make it. The length of the ship shall be three hundred cubits, its width fifty cubits, and its height thirty cubits."
Sarah,Wife of Abraham,Genesis,28,2,"Arise, go to Paddan Aram, to the house of Bethuel your mother’s father. Take a wife from there from the daughters of Laban, your mother’s brother."
Moses,Leader of the Exodus,Exodus,2,3,"When she could no longer hide him, she took a papyrus basket for him, and coated it with tar and with pitch. She put the child in it, and laid it in the reeds by the river’s bank."
Aaron,Brother of Moses,Exodus,13,8,"You shall tell your son in that day, saying, ‘It is because of that which Yahweh did for me when I came out of Egypt.’"
David,King of Israel,1 Samuel,8,4,Then all the elders of Israel gathered themselves together and came to Samuel to Ramah.
Solomon,Wisest Man,Proverbs,12,9,"Better is he who is little know, and has a servant,
than he who honors himself, and lacks bread."
Isaiah,Prophet,Isaiah,4,6,"There will be a pavilion for a shade in the daytime from the heat, and for a refuge and for a shelter from storm and from rain."
Jeremiah,Prophet,Jeremiah,3,16,"It will come to pass, when you are multiplied and increased in the land, in those days,” says Yahweh, “they will no longer say, ‘the ark of Yahweh’s covenant!’ It will not come to mind. They won’t remember it. They won’t miss it, nor will another be made."
John the Baptist,Forerunner of Jesus,Matthew,12,5,"Or have you not read in the law, that on the Sabbath day, the priests in the temple profane the Sabbath, and are guiltless?"
Jesus Christ,Son of God,Matthew,5,10,"Blessed are those who have been persecuted for righteousness’ sake,

for theirs is the Kingdom of Heaven."
Mary,Mother of Jesus,Luke,6,15,"Matthew; Thomas; James, the son of Alphaeus; Simon, who was called the Zealot;"
Peter,Apostle,Matthew,4,2,"When he had fasted forty days and forty nights, he was hungry afterward."
Andrew,Apostle,Matthew,3,3,"For this is he who was spoken of by Isaiah the prophet, saying,
“The voice of one crying in the wilderness,
make ready the way of the Lord.
Make his paths straight.”"
James the Greater,Apostle,Matthew,5,8,"Blessed are the pure in heart,
for they shall see God."
John the Evangelist,Apostle,John,3,4,"Nicodemus said to him, “How can a man be born when he is old? Can he enter a second time into his mother’s womb, and be born?”"
Philip,Apostle,Matthew,6,9,"Pray like this: ‘Our Father in heaven, may your name be kept holy."
Thomas,Apostle,Matthew,4,6,"and said to him, “If you are the Son of God, throw yourself down, for it is written, ‘He will put his angels in charge of you.’ and,
‘On their hands they will bear you up,
so that you don’t dash your foot against a stone.’”"
James the Lesser,Apostle,Matthew,18,9,"If your eye causes you to stumble, pluck it out, and cast it from you. It is better for you to enter into life with one eye, rather than having two eyes to be cast into the Gehenna
of fire."
Jude Thaddeus,Apostle,Matthew,9,12,"When Jesus heard it, he said to them,
“Those who are healthy have no need for a physician, but those who are sick do."
Simon the Zealot,Apostle,Matthew,27,3,"Then Judas, who betrayed him, when he saw that Jesus was condemned, felt remorse, and brought back the thirty pieces of silver to the chief priests and elders,"
Bartholomew,Apostle,Matthew,6,2,"Therefore when you do merciful deeds, don’t sound a trumpet before yourself, as the hypocrites do in the synagogues and in the streets, that they may get glory from men. Most certainly I tell you, they have received their reward."
29 changes: 29 additions & 0 deletions data/doggies.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
facts,success
"Dogs judge objects first by their movement, then by their brightness, and lastly by their shape.",True
"Two Labradors, Lucky and Flo, were the first dogs known for sniffing out pirated DVDs.",True
"Flyball, a dog sport consisting of relays, hurdles, and ball retrieving, was developed in the late 60s, and the first tournament was held in 1983.",True
"According to a study shared by Cornell University, dogs were domesticated between 9,000 and 34,000 years ago.",True
Dogs are all direct descendants of wolves.,True
Dachshunds were originally bred for fighting badgers.,True
Petting a dog can lower your blood pressure.,True
"In Iran, it is against the law to own a dog as a pet. However, if an owner can prove the dog is a guard or hunting dog, this restriction doesn’t apply. Muslim reticence concerning dogs is perhaps due to the fact that rabies has always been endemic in the Middle East.",True
"The Beagle and Collie are the nosiest dogs, while the Akbash Dog and the Basenji are the quietest.",True
"The earliest dog fossil dates back to nearly 10,000 B.C.",True
Toto in The Wizard of Oz was played by a female Cairn Terrier named Terry.,True
"Different smells in the a dog’s urine can tell other dogs whether the dog leaving the message is female or male, old or young, sick or healthy, happy or angry.",True
"The fastest breed, the Greyhound, can run up to 44 miles per hour.",True
The most popular male dog names are Max and Jake. The most popular female dog names are Maggie and Molly.,True
"Revolutionary War soldiers sometimes brought their dogs with them into battle. Such was the case with George Washington and his dog, Sweetlips.",True
"Dogs engage in rapid-eye-movement when they sleep, and have dreams just like humans do.",True
Mastiffs wore armor and were sent after mounted knights in Roman times.,True
"Humans can detect sounds at 20,000 times per second, while dogs can sense frequencies of 30,000 times per second.",True
"There are nearly 14,000 animal shelters and rescue groups across North America.",True
The average dog is as intelligent as a two-year-old child.,True
Dogs often bury bones so that they can dig them up at some moment in the future when they are hungry.,True
"An elderly woman was saved by her 12-pound Yorkshire Terrier, who fought off an 80- pound Akita, and survived with only 9 stitches.",True
"Dog’s definitely don’t see like hawks. They have very poor eyesight, but can distinguish movement 10-20 times better than humans.",True
Many foot disorders in dogs are simply an issue of too-long toenails.,True
More than half of all U.S. presidents have owned dogs.,True
Your pup reaches his full size between 12 and 24 months.,True
"Female dogs are only ready to mate–""in heat""–twice a year for a total of roughly 20 days.",True
Many foot disorders in dogs are caused by long toenails.,True
104 changes: 61 additions & 43 deletions your-code/challenge-1.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,16 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"id": "215eb6bc",
"metadata": {},
"outputs": [],
"source": []
"source": [
"import pandas as pd\n",
"import requests \n",
"import json\n",
"import datetime"
]
},
{
"cell_type": "markdown",
Expand Down Expand Up @@ -47,29 +52,9 @@
"metadata": {},
"outputs": [],
"source": [
"# Your code here\n",
"# base_url"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "c503211c",
"metadata": {},
"outputs": [],
"source": [
"# Your code here\n",
"# endpoint "
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "e8563709",
"metadata": {},
"outputs": [],
"source": [
"# Your code here"
"base_url = \"https://dog-api.kinduff.com\"\n",
"endpoint = \"/api/facts\"\n",
"url_for_request = base_url + endpoint"
]
},
{
Expand All @@ -82,12 +67,25 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 3,
"id": "311d0c28",
"metadata": {},
"outputs": [],
"outputs": [
{
"data": {
"text/plain": [
"{'facts': [\"Service dogs are trained to know when they are on duty. When their harness is on, they know it's business time. When you take it off, the pups immediately become playful and energetic.\"],\n",
" 'success': True}"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Your code here"
"res = requests.get(url_for_request).json()\n",
"res"
]
},
{
Expand All @@ -110,12 +108,15 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 4,
"id": "e7dc2129",
"metadata": {},
"outputs": [],
"source": [
"# Your code here"
"def request_dog_facts():\n",
" for i in range (10):\n",
" res = requests.get(\"https://dog-api.kinduff.com/api/facts\").json()\n",
" print(res)"
]
},
{
Expand All @@ -136,12 +137,18 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 5,
"id": "9263e7c8",
"metadata": {},
"outputs": [],
"source": [
"# your code here"
"def request_dog_facts():\n",
" try:\n",
" for i in range (10):\n",
" res = requests.get(\"https://dog-api.kinduff.com/api/facts\").json()\n",
" print(res)\n",
" except:\n",
" print(\"Requested too many times\")"
]
},
{
Expand All @@ -162,12 +169,20 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 6,
"id": "1e7947fe",
"metadata": {},
"outputs": [],
"source": [
"# Your code here"
"def request_dog_facts():\n",
" dict_ = []\n",
" current_month = int(datetime.datetime.now().strftime(\"%m\"))\n",
" try:\n",
" for i in range (current_month):\n",
" res = requests.get(\"https://dog-api.kinduff.com/api/facts\").json()\n",
" except:\n",
" print(\"Requested too many times\")\n",
" return res"
]
},
{
Expand All @@ -180,12 +195,15 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 7,
"id": "731959ec",
"metadata": {},
"metadata": {
"scrolled": true
},
"outputs": [],
"source": [
"# Your code here"
"todays_date = int(datetime.datetime.now().strftime(\"%d\"))\n",
"dogs_facts = [request_dog_facts() for i in range (todays_date)]"
]
},
{
Expand All @@ -198,12 +216,12 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 8,
"id": "d22652ed",
"metadata": {},
"outputs": [],
"source": [
"# Your code here"
"df = pd.DataFrame(dogs_facts)"
]
},
{
Expand All @@ -216,12 +234,12 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 9,
"id": "b29f4826",
"metadata": {},
"outputs": [],
"source": [
"# Your code here"
"df[\"facts\"] = df[\"facts\"].apply(lambda x: \"\".join(x))"
]
},
{
Expand All @@ -242,12 +260,12 @@
},
{
"cell_type": "code",
"execution_count": 50,
"execution_count": 10,
"id": "ca21a372",
"metadata": {},
"outputs": [],
"source": [
"# Your code here"
"df.to_csv('../data/doggies.csv', index=False)"
]
}
],
Expand Down
Loading