Skip to content

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
vbarda committed Oct 22, 2024
1 parent 58cb8ee commit b957dfa
Showing 1 changed file with 52 additions and 10 deletions.
62 changes: 52 additions & 10 deletions docs/docs/integrations/tools/ddg.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"id": "21e46d4d",
"metadata": {},
"outputs": [],
Expand All @@ -31,7 +31,7 @@
{
"data": {
"text/plain": [
"'When Ann Dunham and Barack Obama Sr. tied the knot, they kept the news to themselves. \"Nobody was invited,\" Neil Abercrombie, a college friend of Obama Sr., told Time in 2008. The wedding came as ... As the head of the government of the United States, the president is arguably the most powerful government official in the world. The president is elected to a four-year term via an electoral college system. Since the Twenty-second Amendment was adopted in 1951, the American presidency has been Most common names of U.S. presidents 1789-2021. Published by. Aaron O\\'Neill , Jul 4, 2024. The most common first name for a U.S. president is James, followed by John and then William. Six U.S ... Obama\\'s personal charisma, stirring oratory, and his campaign promise to bring change to the established political system resonated with many Democrats, especially young and minority voters. On January 3, 2008, Obama won a surprise victory in the first major nominating contest, the Iowa caucus, over Sen. Hillary Clinton, who was the overwhelming favorite to win the nomination. Former President Barack Obama released a letter about President Biden\\'s decision to drop out of the 2024 presidential race. Notably, Obama did not name or endorse Vice President Kamala Harris.'"
"\"The White House, official residence of the president of the United States, in July 2008. The president of the United States is the head of state and head of government of the United States, [1] indirectly elected to a four-year term via the Electoral College. [2] The officeholder leads the executive branch of the federal government and is the commander-in-chief of the United States Armed ... Here is a list of the presidents and vice presidents of the United States along with their parties and dates in office. ... Chester A Arthur: Twenty-First President of the United States. 10 Interesting Facts About James Buchanan. Martin Van Buren - Eighth President of the United States. Quotes From Harry S. Truman. 2 of 2. Barack Obama: timeline Key events in the life of Barack Obama. Barack Obama (born August 4, 1961, Honolulu, Hawaii, U.S.) is the 44th president of the United States (2009-17) and the first African American to hold the office. Before winning the presidency, Obama represented Illinois in the U.S. Senate (2005-08). Table of Contents As the head of the government of the United States, the president is arguably the most powerful government official in the world. The president is elected to a four-year term via an electoral college system. Since the Twenty-second Amendment was adopted in 1951, the American presidency has been limited to a maximum of two terms.. Click on a president below to learn more about ... Most common names of U.S. presidents 1789-2021. Published by. Aaron O'Neill, Aug 9, 2024. The most common first name for a U.S. president is James, followed by John and then William. Six U.S ...\""
]
},
"execution_count": 2,
Expand Down Expand Up @@ -64,7 +64,7 @@
{
"data": {
"text/plain": [
"[{\"snippet\": \"Barack and Michelle Obama will make their first campaign appearances alongside Kamala Harris at rallies in Georgia and Michigan. By Reid J. Epstein Reporting from Ashwaubenon, Wis. Here come the ...\", \"title\": \"Harris Will Join Michelle Obama and Barack Obama on Campaign Trail\", \"link\": \"https://www.nytimes.com/2024/10/18/us/politics/kamala-harris-michelle-obama-barack-obama.html\"}, {\"snippet\": \"Obama's leaving office was 'a turning point,' Mirsky said. 'That was the last time anybody felt normal.' A few feet over, a 64-year-old physics professor named Eric Swanson who had grown ...\", \"title\": \"Obama's reemergence on the campaign trail for Harris comes as he ...\", \"link\": \"https://www.cnn.com/2024/10/13/politics/obama-campaign-trail-harris-biden/index.html\"}, {\"snippet\": \"WASHINGTON (AP) — Vice President Kamala Harris will make her first campaign appearances with Barack Obama and Michelle Obama, two of the most popular figures in the Democratic Party, at get-out-the-vote events this month in Georgia and Michigan.. It will be the former first lady's first time hitting the trail for Harris. Harris, the Democratic presidential nominee, is set to appear with ...\", \"title\": \"Harris will campaign with the Obamas later this month in Georgia and ...\", \"link\": \"https://apnews.com/article/harris-barack-michelle-obama-b31b662260f8e22131123a0d32888b56\"}, {\"snippet\": \"Barack Obama was born on August 4, 1961, in Honolulu, Hawaii. He is the 44th president of the United States and the first African American to hold the office. Learn more about his life, education, presidency, books, and awards.\", \"title\": \"Barack Obama | Biography, Parents, Education, Presidency, Books ...\", \"link\": \"https://www.britannica.com/biography/Barack-Obama\"}]"
"\"snippet: He maintains a close friendship with Mr. Obama. He first weighed in on presidential politics to criticize President Reagan's re-election campaign, and has since supported Mr. Obama, Hillary ..., title: Bruce Springsteen to Appear With Harris and Obama at Atlanta and ..., link: https://www.nytimes.com/2024/10/22/us/politics/springsteen-harris-atlanta-obama-philly.html, snippet: Learn about the life and achievements of Barack Obama, the 44th president of the United States and the first African American to hold the office. Explore his early years, education, political career, books, awards, and more., title: Barack Obama | Biography, Parents, Education, Presidency, Books ..., link: https://www.britannica.com/biography/Barack-Obama, snippet: Obama's personal charisma, stirring oratory, and his campaign promise to bring change to the established political system resonated with many Democrats, especially young and minority voters. On January 3, 2008, Obama won a surprise victory in the first major nominating contest, the Iowa caucus, over Sen. Hillary Clinton, who was the overwhelming favorite to win the nomination., title: Barack Obama - 44th President, Political Career, Legacy | Britannica, link: https://www.britannica.com/biography/Barack-Obama/Politics-and-ascent-to-the-presidency, snippet: Former President Barack Obama endorsed Kamala Harris and Tim Walz for president and vice president in his keynote address at the 2024 Democratic National Convention. He criticized Donald Trump's rhetoric and policies, and praised Harris' empathy and decency., title: Watch: Barack Obama's full speech at the 2024 DNC, link: https://www.cbsnews.com/news/watch-barack-obamas-full-speech-2024-dnc-transcript/\""
]
},
"execution_count": 3,
Expand All @@ -80,6 +80,48 @@
"search.invoke(\"Obama\")"
]
},
{
"cell_type": "markdown",
"id": "aacc1186",
"metadata": {},
"source": [
"By default the results are returned as a comma-separated string of key-value pairs from the original search results. You can also choose to return the search results as a list by setting `output_format=\"list\"` or as a JSON string by setting `output_format=\"json\"`."
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "5ac4602d",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[{'snippet': 'Obama was headed to neighboring Michigan later Tuesday, among the several stops the former president is making in battleground states to encourage early voting. Harris has been spending a lot of time in the \" blue wall \" states of Wisconsin, Michigan and Pennsylvania in the final weeks of the campaign, including stops in Michigan and ...',\n",
" 'title': 'Obama and Walz host rally in Wisconsin as early voting kicks off | AP News',\n",
" 'link': 'https://apnews.com/article/wisconsin-voting-trump-harris-obama-walz-aeeff20ab17a54172263ee4778bed3dc'},\n",
" {'snippet': \"Obama has directed plenty of criticisms at Trump over the years, so some might perceive this as little more than the latest installment in a larger pattern. But let's not be too quick to rush ...\",\n",
" 'title': 'Why Obama slamming Trump on his response to Covid matters - MSNBC',\n",
" 'link': 'https://www.msnbc.com/rachel-maddow-show/maddowblog/obama-slamming-trump-response-covid-matters-rcna176624'},\n",
" {'snippet': 'Learn about the life and achievements of Barack Obama, the 44th president of the United States and the first African American to hold the office. Explore his early years, education, political career, books, awards, and more.',\n",
" 'title': 'Barack Obama | Biography, Parents, Education, Presidency, Books ...',\n",
" 'link': 'https://www.britannica.com/biography/Barack-Obama'},\n",
" {'snippet': \"He maintains a close friendship with Mr. Obama. He first weighed in on presidential politics to criticize President Reagan's re-election campaign, and has since supported Mr. Obama, Hillary ...\",\n",
" 'title': 'Bruce Springsteen to Appear With Harris and Obama at Atlanta and ...',\n",
" 'link': 'https://www.nytimes.com/2024/10/22/us/politics/springsteen-harris-atlanta-obama-philly.html'}]"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"search = DuckDuckGoSearchResults(output_format=\"list\")\n",
"\n",
"search.invoke(\"Obama\")"
]
},
{
"cell_type": "markdown",
"id": "e17ccfe7",
Expand All @@ -90,17 +132,17 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 5,
"id": "21afe28d",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[{'snippet': \"The former president used his predecessor's middle name as he criticized him during the Al Smith charity dinner.\", 'title': \"Donald Trump's Barack Obama Remarks Spark Fury from Online Critics\", 'link': 'https://www.msn.com/en-us/news/politics/donald-trumps-barack-obama-remarks-spark-fury-from-online-critics/ar-AA1sw0Io', 'date': '2024-10-18T17:02:36+00:00', 'source': 'Newsweek on MSN.com'}, {'snippet': 'Barack Obama is hitting the Arizona campaign trail for Kamala Harris in the final weeks of the presidential race.', 'title': 'Barack Obama to campaign for Kamala Harris in Tucson: What to know', 'link': 'https://www.statesman.com/story/news/politics/elections/2024/10/18/barack-obama-campaigns-for-kamala-harris-in-tucson-what-to-know/75694640007/', 'date': '2024-10-18T15:04:00+00:00', 'source': 'Austin American-Statesman'}, {'snippet': 'Former first lady Michelle Obama will join former President Barack Obama and Vice President Kamala Harris at rallies next week.', 'title': \"Harris' Final Push Involves Michelle Obama and Pursuing Crucial Black Voters\", 'link': 'https://www.msn.com/en-us/news/other/harris-final-push-involves-michelle-obama-and-pursuing-crucial-black-voters/ar-AA1swkeu', 'date': '2024-10-18T18:46:00+00:00', 'source': 'U.S. News & World Report on MSN.com'}, {'snippet': 'While former President Barack Obama has become increasingly involved in the Harris campaign, the former first lady has been conspicuously absent. The Harris campaign announced that this will change on Saturday, Oct. 26, when she is set to appear alongside Harris in Michigan.', 'title': 'Michelle Obama moves up Harris campaign debut to stump in Michigan next week', 'link': 'https://www.msn.com/en-us/news/politics/michelle-obama-moves-up-harris-campaign-debut-to-stump-in-michigan-next-week/ar-AA1svasJ', 'date': '2024-10-18T16:45:00+00:00', 'source': 'Washington Examiner on MSN.com'}]"
"\"snippet: Springsteen, a longtime Democratic activist, will be joined by former President Barack Obama at both shows, with Harris scheduled to attend the Atlanta concert. Springsteen, a New Jersey native, has maintained a deep connection with Philadelphia throughout his career., title: Bruce Springsteen to hold battleground concerts with Kamala Harris, Barack Obama, link: https://www.statesman.com/story/news/politics/elections/2024/10/22/springsteen-obama-2024-concerts-harris/75791934007/, date: 2024-10-22T20:45:00+00:00, source: Austin American-Statesman, snippet: Obama roasts Trump's bible: 'He's Mr. Tough Guy on China except when it comes to making a few bucks', title: Obama roasts Trump's bible: 'He's Mr. Tough Guy on China except when it comes to making a few bucks', link: https://www.msnbc.com/deadline-white-house/watch/obama-roasts-trump-he-s-mr-tough-guy-on-china-except-when-it-comes-to-making-a-few-bucks-222399557750, date: 2024-10-22T20:28:00+00:00, source: MSNBC, snippet: Democratic nominee and Vice President Kamala Harris is sending a potentially powerful closer to Detroit today to shore up her standing in Michigan: Former President Barack Obama. The campaign has been notably mum on exactly when and where Obama is speaking but as he hits the campaign trail on behalf of his fellow Democrat,, title: Watch live tonight: Former President Obama to rally for Kamala Harris in Detroit, link: https://www.msn.com/en-us/news/politics/watch-live-tonight-former-president-obama-to-rally-for-kamala-harris-in-detroit/ar-AA1sJpiB, date: 2024-10-22T18:32:26+00:00, source: Detroit Free Press on MSN.com, snippet: During a campaign rally in Wisconsin, former President Obama called into question former President Trump's mental fitness and joked about him ending a town hall to listen to music with attendees., title: 'Our playlist would be better': Obama jokes about Trump listening to music at town hall, link: https://www.msnbc.com/msnbc/watch/obama-jokes-about-trump-ending-town-hall-to-listen-to-music-222399045983, date: 2024-10-22T20:31:00+00:00, source: MSNBC\""
]
},
"execution_count": 4,
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -121,17 +163,17 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 6,
"id": "c7ab3b55",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[{'snippet': \"Megan Lebowitz. Former President Barack Obama will campaign for Harris in Tucson, Arizona, today. He's set to hit a string of swing states in the final stretch of the campaign, including Nevada ...\", 'title': 'Election 2024 live updates: Barack Obama to stump for Harris; Trump to ...', 'link': 'https://www.nbcnews.com/politics/2024-election/live-blog/trump-harris-election-live-updates-rcna175182'}, {'snippet': 'Three former presidents — with 20 years of Oval Office experience among them — will hit the campaign trail on Friday: Barack Obama and Bill Clinton will stump for Vice President Kamala Harris ...', 'title': 'Trump, Harris and Obama Hit the Campaign Trail: Election 2024 Live ...', 'link': 'https://www.nytimes.com/live/2024/10/18/us/harris-trump-election'}, {'snippet': 'Befindlichkeiten von Politikern: Gedemütigter Donald Trump, gekränkter Wladimir Putin, überheblicher Barack Obama. Es hätte auch alles anders kommen können. Es gibt keinen stumpfsinnigeren ...', 'title': 'Was Vorfälle vor 20 Jahren mit der Situation heute zu tun haben', 'link': 'https://www.diepresse.com/18982635/was-vorfaelle-vor-20-jahren-mit-der-situation-heute-zu-tun-haben'}, {'snippet': \"Michelle Obama is set to campaign for the first time this election cycle, appearing with Harris on Saturday, Oct. 26 in Michigan. The former first lady's pull-no-punches speech at the Democratic ...\", 'title': 'Obamas set to hit campaign trail with Kamala Harris for first time', 'link': 'https://www.straitstimes.com/world/obamas-set-to-hit-campaign-trail-with-kamala-harris-for-first-time'}]"
"'snippet: 22.10.2024, 18.21 Uhr. 1. Macht der Worte. Der beste Redner der US-Politik: Obama in Tucson. Foto: Mamta Popat / Arizona Daily Star / AP / dpa. Politik ist Sprache. Das wussten die Jakobiner im ..., title: News des Tages: Barack Obama und Donald Trump, Elon Musk, Herbert Kickl, link: https://www.spiegel.de/politik/deutschland/news-des-tages-barack-obama-und-donald-trump-elon-musk-herbert-kickl-a-c1a76de5-f9aa-4038-a1ad-f426b85267f8, snippet: Oct. 22, 2024, 12:38 p.m. ET. The rocker Bruce Springsteen will perform at a rally on Thursday in Atlanta, appearing alongside Vice President Kamala Harris and former President Barack Obama, as ..., title: Bruce Springsteen to Appear With Harris and Obama at Atlanta and ..., link: https://www.nytimes.com/2024/10/22/us/politics/springsteen-harris-atlanta-obama-philly.html, snippet: In-person early voting has kicked off across battleground Wisconsin, with former President Barack Obama and Democratic vice presidential nominee Tim Walz hosting a rally in liberal Madison, title: Watch live: Barack Obama and VP nominee Tim Walz hold rally in ..., link: https://news.sky.com/video/watch-live-barack-obama-and-and-vp-nominee-tim-walz-hold-rally-in-wisconsin-13239026, snippet: Barack Obama will speak to a campaign rally for Kamala Harris in Madison, Wisconsin this afternoon. The former US president was expected to be joined by Tim Walz, the Democratic vice presidential ..., title: Obama-Walz rally live: Former president campaigns for Harris in Madison, link: https://www.telegraph.co.uk/us/politics/2024/10/22/obama-walz-rally-campaigns-kamala-harris-madison-wisconsin/'"
]
},
"execution_count": 5,
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -173,7 +215,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.5"
"version": "3.12.3"
},
"vscode": {
"interpreter": {
Expand Down

0 comments on commit b957dfa

Please sign in to comment.