Skip to content

Instantly share code, notes, and snippets.

@paprikka
Last active November 17, 2022 18:47
Show Gist options
  • Save paprikka/7bb33a29d00fa24fe774ddfb8b7ab9bb to your computer and use it in GitHub Desktop.
Save paprikka/7bb33a29d00fa24fe774ddfb8b7ab9bb to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 23,
"metadata": {},
"outputs": [],
"source": [
"import requests\n",
"\n",
"base_url=\"https://api.stackexchange.com/2.3\"\n",
"\n",
"with requests.get(f\"{base_url}/sites?pagesize=300\", ) as response:\n",
" if(response.status_code == 200):\n",
" sites = response.json()['items']\n",
" else:\n",
" print(\"Request error :(\")"
]
},
{
"cell_type": "code",
"execution_count": 36,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[1/300] Fetching stackoverflow\n",
"[2/300] Fetching serverfault\n",
"[3/300] Fetching superuser\n",
"[4/300] Fetching meta\n",
"[5/300] Fetching webapps\n",
"[6/300] Fetching webapps.meta\n",
"[7/300] Fetching gaming\n",
"[8/300] Fetching gaming.meta\n",
"[9/300] Fetching webmasters\n",
"[10/300] Fetching webmasters.meta\n",
"[11/300] Fetching cooking\n",
"[12/300] Fetching cooking.meta\n",
"[13/300] Fetching gamedev\n",
"[14/300] Fetching gamedev.meta\n",
"[15/300] Fetching photo\n",
"[16/300] Fetching photo.meta\n",
"[17/300] Fetching stats\n",
"[18/300] Fetching stats.meta\n",
"[19/300] Fetching math\n",
"[20/300] Fetching math.meta\n",
"[21/300] Fetching diy\n",
"[22/300] Fetching diy.meta\n",
"[23/300] Fetching meta.superuser\n",
"[24/300] Fetching meta.serverfault\n",
"[25/300] Fetching gis\n",
"[26/300] Fetching gis.meta\n",
"[27/300] Fetching tex\n",
"[28/300] Fetching tex.meta\n",
"[29/300] Fetching askubuntu\n",
"[30/300] Fetching meta.askubuntu\n",
"[31/300] Fetching money\n",
"[32/300] Fetching money.meta\n",
"[33/300] Fetching english\n",
"[34/300] Fetching english.meta\n",
"[35/300] Fetching stackapps\n",
"[36/300] Fetching ux\n",
"[37/300] Fetching ux.meta\n",
"[38/300] Fetching unix\n",
"[39/300] Fetching unix.meta\n",
"[40/300] Fetching wordpress\n",
"[41/300] Fetching wordpress.meta\n",
"[42/300] Fetching cstheory\n",
"[43/300] Fetching cstheory.meta\n",
"[44/300] Fetching apple\n",
"[45/300] Fetching apple.meta\n",
"[46/300] Fetching rpg\n",
"[47/300] Fetching rpg.meta\n",
"[48/300] Fetching bicycles\n",
"[49/300] Fetching bicycles.meta\n",
"[50/300] Fetching softwareengineering\n",
"[51/300] Fetching softwareengineering.meta\n",
"[52/300] Fetching electronics\n",
"[53/300] Fetching electronics.meta\n",
"[54/300] Fetching android\n",
"[55/300] Fetching android.meta\n",
"[56/300] Fetching boardgames\n",
"[57/300] Fetching boardgames.meta\n",
"[58/300] Fetching physics\n",
"[59/300] Fetching physics.meta\n",
"[60/300] Fetching homebrew\n",
"[61/300] Fetching homebrew.meta\n",
"[62/300] Fetching security\n",
"[63/300] Fetching security.meta\n",
"[64/300] Fetching writing\n",
"[65/300] Fetching writing.meta\n",
"[66/300] Fetching video\n",
"[67/300] Fetching video.meta\n",
"[68/300] Fetching graphicdesign\n",
"[69/300] Fetching graphicdesign.meta\n",
"[70/300] Fetching dba\n",
"[71/300] Fetching dba.meta\n",
"[72/300] Fetching scifi\n",
"[73/300] Fetching scifi.meta\n",
"[74/300] Fetching codereview\n",
"[75/300] Fetching codereview.meta\n",
"[76/300] Fetching codegolf\n",
"[77/300] Fetching codegolf.meta\n",
"[78/300] Fetching quant\n",
"[79/300] Fetching quant.meta\n",
"[80/300] Fetching pm\n",
"[81/300] Fetching pm.meta\n",
"[82/300] Fetching skeptics\n",
"[83/300] Fetching skeptics.meta\n",
"[84/300] Fetching fitness\n",
"[85/300] Fetching fitness.meta\n",
"[86/300] Fetching drupal\n",
"[87/300] Fetching drupal.meta\n",
"[88/300] Fetching mechanics\n",
"[89/300] Fetching mechanics.meta\n",
"[90/300] Fetching parenting\n",
"[91/300] Fetching parenting.meta\n",
"[92/300] Fetching sharepoint\n",
"[93/300] Fetching sharepoint.meta\n",
"[94/300] Fetching music\n",
"[95/300] Fetching music.meta\n",
"[96/300] Fetching sqa\n",
"[97/300] Fetching sqa.meta\n",
"[98/300] Fetching judaism\n",
"[99/300] Fetching judaism.meta\n",
"[100/300] Fetching german\n",
"[101/300] Fetching german.meta\n",
"[102/300] Fetching japanese\n",
"[103/300] Fetching japanese.meta\n",
"[104/300] Fetching philosophy\n",
"[105/300] Fetching philosophy.meta\n",
"[106/300] Fetching gardening\n",
"[107/300] Fetching gardening.meta\n",
"[108/300] Fetching travel\n",
"[109/300] Fetching travel.meta\n",
"[110/300] Fetching crypto\n",
"[111/300] Fetching crypto.meta\n",
"[112/300] Fetching dsp\n",
"[113/300] Fetching dsp.meta\n",
"[114/300] Fetching french\n",
"[115/300] Fetching french.meta\n",
"[116/300] Fetching christianity\n",
"[117/300] Fetching christianity.meta\n",
"[118/300] Fetching bitcoin\n",
"[119/300] Fetching bitcoin.meta\n",
"[120/300] Fetching linguistics\n",
"[121/300] Fetching linguistics.meta\n",
"[122/300] Fetching hermeneutics\n",
"[123/300] Fetching hermeneutics.meta\n",
"[124/300] Fetching history\n",
"[125/300] Fetching history.meta\n",
"[126/300] Fetching bricks\n",
"[127/300] Fetching bricks.meta\n",
"[128/300] Fetching spanish\n",
"[129/300] Fetching spanish.meta\n",
"[130/300] Fetching scicomp\n",
"[131/300] Fetching scicomp.meta\n",
"[132/300] Fetching movies\n",
"[133/300] Fetching movies.meta\n",
"[134/300] Fetching chinese\n",
"[135/300] Fetching chinese.meta\n",
"[136/300] Fetching biology\n",
"[137/300] Fetching biology.meta\n",
"[138/300] Fetching poker\n",
"[139/300] Fetching poker.meta\n",
"[140/300] Fetching mathematica\n",
"[141/300] Fetching mathematica.meta\n",
"[142/300] Fetching psychology\n",
"[143/300] Fetching psychology.meta\n",
"[144/300] Fetching outdoors\n",
"[145/300] Fetching outdoors.meta\n",
"[146/300] Fetching martialarts\n",
"[147/300] Fetching martialarts.meta\n",
"[148/300] Fetching sports\n",
"[149/300] Fetching sports.meta\n",
"[150/300] Fetching academia\n",
"[151/300] Fetching academia.meta\n",
"[152/300] Fetching cs\n",
"[153/300] Fetching cs.meta\n",
"[154/300] Fetching workplace\n",
"[155/300] Fetching workplace.meta\n",
"[156/300] Fetching chemistry\n",
"[157/300] Fetching chemistry.meta\n",
"[158/300] Fetching chess\n",
"[159/300] Fetching chess.meta\n",
"[160/300] Fetching raspberrypi\n",
"[161/300] Fetching raspberrypi.meta\n",
"[162/300] Fetching russian\n",
"[163/300] Fetching russian.meta\n",
"[164/300] Fetching islam\n",
"[165/300] Fetching islam.meta\n",
"[166/300] Fetching salesforce\n",
"[167/300] Fetching salesforce.meta\n",
"[168/300] Fetching patents\n",
"[169/300] Fetching patents.meta\n",
"[170/300] Fetching genealogy\n",
"[171/300] Fetching genealogy.meta\n",
"[172/300] Fetching robotics\n",
"[173/300] Fetching robotics.meta\n",
"[174/300] Fetching expressionengine\n",
"[175/300] Fetching expressionengine.meta\n",
"[176/300] Fetching politics\n",
"[177/300] Fetching politics.meta\n",
"[178/300] Fetching anime\n",
"[179/300] Fetching anime.meta\n",
"[180/300] Fetching magento\n",
"[181/300] Fetching magento.meta\n",
"[182/300] Fetching ell\n",
"[183/300] Fetching ell.meta\n",
"[184/300] Fetching sustainability\n",
"[185/300] Fetching sustainability.meta\n",
"[186/300] Fetching tridion\n",
"[187/300] Fetching tridion.meta\n",
"[188/300] Fetching reverseengineering\n",
"[189/300] Fetching reverseengineering.meta\n",
"[190/300] Fetching networkengineering\n",
"[191/300] Fetching networkengineering.meta\n",
"[192/300] Fetching opendata\n",
"[193/300] Fetching opendata.meta\n",
"[194/300] Fetching freelancing\n",
"[195/300] Fetching freelancing.meta\n",
"[196/300] Fetching blender\n",
"[197/300] Fetching blender.meta\n",
"[198/300] Fetching mathoverflow.net\n",
"[199/300] Fetching meta.mathoverflow.net\n",
"[200/300] Fetching space\n",
"[201/300] Fetching space.meta\n",
"[202/300] Fetching sound\n",
"[203/300] Fetching sound.meta\n",
"[204/300] Fetching astronomy\n",
"[205/300] Fetching astronomy.meta\n",
"[206/300] Fetching tor\n",
"[207/300] Fetching tor.meta\n",
"[208/300] Fetching pets\n",
"[209/300] Fetching pets.meta\n",
"[210/300] Fetching ham\n",
"[211/300] Fetching ham.meta\n",
"[212/300] Fetching italian\n",
"[213/300] Fetching italian.meta\n",
"[214/300] Fetching pt.stackoverflow\n",
"[215/300] Fetching pt.meta.stackoverflow\n",
"[216/300] Fetching aviation\n",
"[217/300] Fetching aviation.meta\n",
"[218/300] Fetching ebooks\n",
"[219/300] Fetching ebooks.meta\n",
"[220/300] Fetching alcohol\n",
"[221/300] Fetching alcohol.meta\n",
"[222/300] Fetching softwarerecs\n",
"[223/300] Fetching softwarerecs.meta\n",
"[224/300] Fetching arduino\n",
"[225/300] Fetching arduino.meta\n",
"[226/300] Fetching cs50\n",
"[227/300] Fetching cs50.meta\n",
"[228/300] Fetching expatriates\n",
"[229/300] Fetching expatriates.meta\n",
"[230/300] Fetching matheducators\n",
"[231/300] Fetching matheducators.meta\n",
"[232/300] Fetching meta.stackoverflow\n",
"[233/300] Fetching earthscience\n",
"[234/300] Fetching earthscience.meta\n",
"[235/300] Fetching joomla\n",
"[236/300] Fetching joomla.meta\n",
"[237/300] Fetching datascience\n",
"[238/300] Fetching datascience.meta\n",
"[239/300] Fetching puzzling\n",
"[240/300] Fetching puzzling.meta\n",
"[241/300] Fetching craftcms\n",
"[242/300] Fetching craftcms.meta\n",
"[243/300] Fetching buddhism\n",
"[244/300] Fetching buddhism.meta\n",
"[245/300] Fetching hinduism\n",
"[246/300] Fetching hinduism.meta\n",
"[247/300] Fetching communitybuilding\n",
"[248/300] Fetching communitybuilding.meta\n",
"[249/300] Fetching worldbuilding\n",
"[250/300] Fetching worldbuilding.meta\n",
"[251/300] Fetching ja.stackoverflow\n",
"[252/300] Fetching ja.meta.stackoverflow\n",
"[253/300] Fetching emacs\n",
"[254/300] Fetching emacs.meta\n",
"[255/300] Fetching hsm\n",
"[256/300] Fetching hsm.meta\n",
"[257/300] Fetching economics\n",
"[258/300] Fetching economics.meta\n",
"[259/300] Fetching lifehacks\n",
"[260/300] Fetching lifehacks.meta\n",
"[261/300] Fetching engineering\n",
"[262/300] Fetching engineering.meta\n",
"[263/300] Fetching coffee\n",
"[264/300] Fetching coffee.meta\n",
"[265/300] Fetching vi\n",
"[266/300] Fetching vi.meta\n",
"[267/300] Fetching musicfans\n",
"[268/300] Fetching musicfans.meta\n",
"[269/300] Fetching woodworking\n",
"[270/300] Fetching woodworking.meta\n",
"[271/300] Fetching civicrm\n",
"[272/300] Fetching civicrm.meta\n",
"[273/300] Fetching medicalsciences\n",
"[274/300] Fetching medicalsciences.meta\n",
"[275/300] Fetching ru.stackoverflow\n",
"[276/300] Fetching ru.meta.stackoverflow\n",
"[277/300] Fetching rus\n",
"[278/300] Fetching rus.meta\n",
"[279/300] Fetching mythology\n",
"[280/300] Fetching mythology.meta\n",
"[281/300] Fetching law\n",
"[282/300] Fetching law.meta\n",
"[283/300] Fetching opensource\n",
"[284/300] Fetching opensource.meta\n",
"[285/300] Fetching elementaryos\n",
"[286/300] Fetching elementaryos.meta\n",
"[287/300] Fetching portuguese\n",
"[288/300] Fetching portuguese.meta\n",
"[289/300] Fetching computergraphics\n",
"[290/300] Fetching computergraphics.meta\n",
"[291/300] Fetching hardwarerecs\n",
"[292/300] Fetching hardwarerecs.meta\n",
"[293/300] Fetching es.stackoverflow\n",
"[294/300] Fetching es.meta.stackoverflow\n",
"[295/300] Fetching 3dprinting\n",
"[296/300] Fetching 3dprinting.meta\n",
"[297/300] Fetching ethereum\n",
"[298/300] Fetching ethereum.meta\n",
"[299/300] Fetching latin\n",
"[300/300] Fetching latin.meta\n"
]
}
],
"source": [
"site_ids=[s['api_site_parameter'] for s in sites]\n",
"s=site_ids[0]\n",
"\n",
"def get_top_question(site_id):\n",
" with requests.get(f\"{base_url}/questions?order=desc&sort=activity&site={site_id}\") as response:\n",
" return response.json()\n",
"\n",
"top_questions=[]\n",
"from time import sleep\n",
"\n",
"count=1\n",
"for site_id in site_ids:\n",
" print(f\"[{count}/{len(site_ids)}] Fetching {site_id}\")\n",
" count+=1\n",
" top_questions.append(get_top_question(site_id))\n",
" sleep(.1)\n",
" "
]
},
{
"cell_type": "code",
"execution_count": 58,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'items': [{'tags': ['python', 'pandas', 'reshape', 'multi-index'],\n",
" 'owner': {'account_id': 26174802,\n",
" 'reputation': 27,\n",
" 'user_id': 19859149,\n",
" 'user_type': 'registered',\n",
" 'profile_image': 'https://lh3.googleusercontent.com/a/AItbvmki4v8nngs53fWEqxcs6E9NYzpjxRxnWiH4xjjt=k-s256',\n",
" 'display_name': 'Lola Ro',\n",
" 'link': 'https://stackoverflow.com/users/19859149/lola-ro'},\n",
" 'is_answered': False,\n",
" 'view_count': 1,\n",
" 'answer_count': 0,\n",
" 'score': 0,\n",
" 'last_activity_date': 1668707909,\n",
" 'creation_date': 1668707909,\n",
" 'question_id': 74480048,\n",
" 'content_license': 'CC BY-SA 4.0',\n",
" 'link': 'https://stackoverflow.com/questions/74480048/flatten-hierarchical-table-from-yahoo-finance',\n",
" 'title': 'Flatten hierarchical table from Yahoo Finance'},\n",
" {'tags': ['linux', 'networking', 'wireshark', 'tshark', 'mpls'],\n",
" 'owner': {'account_id': 19098412,\n",
" 'reputation': 1,\n",
" 'user_id': 13947202,\n",
" 'user_type': 'registered',\n",
" 'profile_image': 'https://lh3.googleusercontent.com/a-/AOh14GhuL1fHlomn2VbdeSDnVl5IyiNxsuOL_cKf_AE8kA=k-s256',\n",
" 'display_name': 'Giridhar Radhakrishnan',\n",
" 'link': 'https://stackoverflow.com/users/13947202/giridhar-radhakrishnan'},\n",
" 'is_answered': False,\n",
" 'view_count': 1,\n",
" 'answer_count': 0,\n",
" 'score': 0,\n",
" 'last_activity_date': 1668707908,\n",
" 'creation_date': 1668707908,\n",
" 'question_id': 74480047,\n",
" 'content_license': 'CC BY-SA 4.0',\n",
" 'link': 'https://stackoverflow.com/questions/74480047/i-have-a-pcap-with-two-mpls-headers-i-observe-the-match-criteria-for-every-fie',\n",
" 'title': 'I have a pcap with two MPLS headers . i observe the match criteria for every field in both the MPLS headers are similar . How do I differentiate?'},\n",
" {'tags': ['java', 'android', 'react-native', 'yandex-maps', 'yandex-mapkit'],\n",
" 'owner': {'account_id': 22321603,\n",
" 'reputation': 209,\n",
" 'user_id': 16544164,\n",
" 'user_type': 'registered',\n",
" 'profile_image': 'https://www.gravatar.com/avatar/b5cd41125141ab5709be2e62bca5a8e0?s=256&d=identicon&r=PG&f=1',\n",
" 'display_name': 'Zero0',\n",
" 'link': 'https://stackoverflow.com/users/16544164/zero0'},\n",
" 'is_answered': False,\n",
" 'view_count': 2,\n",
" 'answer_count': 0,\n",
" 'score': 0,\n",
" 'last_activity_date': 1668707893,\n",
" 'creation_date': 1668707893,\n",
" 'question_id': 74480046,\n",
" 'content_license': 'CC BY-SA 4.0',\n",
" 'link': 'https://stackoverflow.com/questions/74480046/load-only-one-region-or-country-and-not-the-whole-world-map-in-yandex-mapkit',\n",
" 'title': 'Load only one region or country and not the whole world map in yandex mapkit'},\n",
" {'tags': ['python', 'selenium', 'selenium-chromedriver', 'chromium'],\n",
" 'owner': {'account_id': 10951861,\n",
" 'reputation': 731,\n",
" 'user_id': 8047989,\n",
" 'user_type': 'registered',\n",
" 'accept_rate': 64,\n",
" 'profile_image': 'https://graph.facebook.com/10209068940431987/picture?type=large',\n",
" 'display_name': 'Daniel Slätt',\n",
" 'link': 'https://stackoverflow.com/users/8047989/daniel-sl%c3%a4tt'},\n",
" 'is_answered': True,\n",
" 'view_count': 6243,\n",
" 'accepted_answer_id': 49030040,\n",
" 'answer_count': 1,\n",
" 'score': 0,\n",
" 'last_activity_date': 1668707892,\n",
" 'creation_date': 1519818646,\n",
" 'last_edit_date': 1668707892,\n",
" 'question_id': 49028909,\n",
" 'content_license': 'CC BY-SA 4.0',\n",
" 'link': 'https://stackoverflow.com/questions/49028909/selenium-cant-find-elements-by-this-xpath-expression',\n",
" 'title': 'Selenium can't find elements by this XPath expression'},\n",
" {'tags': ['vtk', 'pyvista'],\n",
" 'owner': {'account_id': 3295418,\n",
" 'reputation': 430,\n",
" 'user_id': 2772805,\n",
" 'user_type': 'registered',\n",
" 'profile_image': 'https://i.stack.imgur.com/7N6Ln.jpg?s=256&g=1',\n",
" 'display_name': 'PBrockmann',\n",
" 'link': 'https://stackoverflow.com/users/2772805/pbrockmann'},\n",
" 'is_answered': False,\n",
" 'view_count': 19,\n",
" 'answer_count': 1,\n",
" 'score': 0,\n",
" 'last_activity_date': 1668707890,\n",
" 'creation_date': 1668635818,\n",
" 'last_edit_date': 1668707878,\n",
" 'question_id': 74467727,\n",
" 'content_license': 'CC BY-SA 4.0',\n",
" 'link': 'https://stackoverflow.com/questions/74467727/how-to-extract-edges-from-polydata-as-connected-features',\n",
" 'title': 'How to extract edges from polydata as connected features?'},\n",
" {'tags': ['rdf', 'openrdf', 'r2rml'],\n",
" 'owner': {'account_id': 25437832,\n",
" 'reputation': 17,\n",
" 'user_id': 19241292,\n",
" 'user_type': 'registered',\n",
" 'profile_image': 'https://lh3.googleusercontent.com/a/AATXAJzT45FVPrVhP8D9DxB9jq6l0zK8zEyC0A3D-2ta=k-s256',\n",
" 'display_name': 'نظام الارشاد الطلابي',\n",
" 'link': 'https://stackoverflow.com/users/19241292/%d9%86%d8%b8%d8%a7%d9%85-%d8%a7%d9%84%d8%a7%d8%b1%d8%b4%d8%a7%d8%af-%d8%a7%d9%84%d8%b7%d9%84%d8%a7%d8%a8%d9%8a'},\n",
" 'is_answered': False,\n",
" 'view_count': 12,\n",
" 'answer_count': 0,\n",
" 'score': 0,\n",
" 'last_activity_date': 1668707884,\n",
" 'creation_date': 1668636921,\n",
" 'last_edit_date': 1668707884,\n",
" 'question_id': 74467912,\n",
" 'content_license': 'CC BY-SA 4.0',\n",
" 'link': 'https://stackoverflow.com/questions/74467912/how-make-org-openrdf-rio-parser-supports-turtle-documents',\n",
" 'title': 'How make org.openrdf.rio parser supports Turtle documents?'},\n",
" {'tags': ['sql', 'postgresql'],\n",
" 'owner': {'account_id': 6591255,\n",
" 'reputation': 775,\n",
" 'user_id': 5092332,\n",
" 'user_type': 'registered',\n",
" 'accept_rate': 20,\n",
" 'profile_image': 'https://i.stack.imgur.com/hSM18.jpg?s=256&g=1',\n",
" 'display_name': 'Cemal Okten',\n",
" 'link': 'https://stackoverflow.com/users/5092332/cemal-okten'},\n",
" 'is_answered': False,\n",
" 'view_count': 11,\n",
" 'answer_count': 1,\n",
" 'score': 0,\n",
" 'last_activity_date': 1668707881,\n",
" 'creation_date': 1668707119,\n",
" 'question_id': 74479902,\n",
" 'content_license': 'CC BY-SA 4.0',\n",
" 'link': 'https://stackoverflow.com/questions/74479902/where-inside-coalesce',\n",
" 'title': 'WHERE inside COALESCE'},\n",
" {'tags': ['javascript', 'try-catch', 'prisma'],\n",
" 'owner': {'account_id': 20330835,\n",
" 'reputation': 1241,\n",
" 'user_id': 14912872,\n",
" 'user_type': 'registered',\n",
" 'profile_image': 'https://www.gravatar.com/avatar/edcd10f5b20fe4f2d84181044cccbf22?s=256&d=identicon&r=PG&f=1',\n",
" 'display_name': 'SlothOverlord',\n",
" 'link': 'https://stackoverflow.com/users/14912872/slothoverlord'},\n",
" 'is_answered': False,\n",
" 'view_count': 12,\n",
" 'answer_count': 0,\n",
" 'score': 0,\n",
" 'last_activity_date': 1668707879,\n",
" 'creation_date': 1668689731,\n",
" 'last_edit_date': 1668707879,\n",
" 'question_id': 74475834,\n",
" 'content_license': 'CC BY-SA 4.0',\n",
" 'link': 'https://stackoverflow.com/questions/74475834/do-not-cancel-the-first-try-return-due-to-inner-try-error',\n",
" 'title': 'Do not cancel the first TRY return due to INNER TRY error'},\n",
" {'tags': ['spring-boot', 'caching', 'cors', 'amazon-cloudfront'],\n",
" 'owner': {'account_id': 26162612,\n",
" 'reputation': 1,\n",
" 'user_id': 19848882,\n",
" 'user_type': 'registered',\n",
" 'profile_image': 'https://www.gravatar.com/avatar/d69ef13493798de0ffc021e05c72b493?s=256&d=identicon&r=PG',\n",
" 'display_name': 'mingsang',\n",
" 'link': 'https://stackoverflow.com/users/19848882/mingsang'},\n",
" 'is_answered': False,\n",
" 'view_count': 2,\n",
" 'answer_count': 0,\n",
" 'score': 0,\n",
" 'last_activity_date': 1668707878,\n",
" 'creation_date': 1668707878,\n",
" 'question_id': 74480044,\n",
" 'content_license': 'CC BY-SA 4.0',\n",
" 'link': 'https://stackoverflow.com/questions/74480044/aws-cloudfront-cache-access-control-allow-origin',\n",
" 'title': 'Aws cloudfront cache access-control-allow-origin'},\n",
" {'tags': ['c#', 'unity3d', 'unityscript', 'multiplayer'],\n",
" 'owner': {'account_id': 26579798,\n",
" 'reputation': 13,\n",
" 'user_id': 20204636,\n",
" 'user_type': 'registered',\n",
" 'profile_image': 'https://i.stack.imgur.com/z2ars.png?s=256&g=1',\n",
" 'display_name': 'Jesse VANKERREBROUCK',\n",
" 'link': 'https://stackoverflow.com/users/20204636/jesse-vankerrebrouck'},\n",
" 'is_answered': False,\n",
" 'view_count': 2,\n",
" 'answer_count': 0,\n",
" 'score': 0,\n",
" 'last_activity_date': 1668707874,\n",
" 'creation_date': 1668707874,\n",
" 'question_id': 74480043,\n",
" 'content_license': 'CC BY-SA 4.0',\n",
" 'link': 'https://stackoverflow.com/questions/74480043/having-trouble-calling-a-serverrpc-function-from-button-unity-netcode',\n",
" 'title': 'Having trouble calling a ServerRpc function from button - Unity Netcode'},\n",
" {'tags': ['python', 'python-3.x', 'unicode', 'python-2.x', 'diacritics'],\n",
" 'owner': {'account_id': 17306,\n",
" 'reputation': 45010,\n",
" 'user_id': 38626,\n",
" 'user_type': 'registered',\n",
" 'accept_rate': 51,\n",
" 'profile_image': 'https://www.gravatar.com/avatar/0c1235b75e5f26b854dce060f906d2dc?s=256&d=identicon&r=PG',\n",
" 'display_name': 'MiniQuark',\n",
" 'link': 'https://stackoverflow.com/users/38626/miniquark'},\n",
" 'is_answered': True,\n",
" 'view_count': 448730,\n",
" 'protected_date': 1346932513,\n",
" 'accepted_answer_id': 518232,\n",
" 'answer_count': 13,\n",
" 'score': 714,\n",
" 'last_activity_date': 1668707873,\n",
" 'creation_date': 1233868240,\n",
" 'last_edit_date': 1593560844,\n",
" 'question_id': 517923,\n",
" 'content_license': 'CC BY-SA 4.0',\n",
" 'link': 'https://stackoverflow.com/questions/517923/what-is-the-best-way-to-remove-accents-normalize-in-a-python-unicode-string',\n",
" 'title': 'What is the best way to remove accents (normalize) in a Python unicode string?'},\n",
" {'tags': ['javascript', 'regex'],\n",
" 'owner': {'account_id': 9562754,\n",
" 'reputation': 15,\n",
" 'user_id': 7102962,\n",
" 'user_type': 'registered',\n",
" 'profile_image': 'https://www.gravatar.com/avatar/1d5e13a84e948d2b921f0877f915c581?s=256&d=identicon&r=PG&f=1',\n",
" 'display_name': 'New Claffly',\n",
" 'link': 'https://stackoverflow.com/users/7102962/new-claffly'},\n",
" 'is_answered': False,\n",
" 'view_count': 4,\n",
" 'answer_count': 0,\n",
" 'score': 0,\n",
" 'last_activity_date': 1668707873,\n",
" 'creation_date': 1668707873,\n",
" 'question_id': 74480042,\n",
" 'content_license': 'CC BY-SA 4.0',\n",
" 'link': 'https://stackoverflow.com/questions/74480042/masking-middle-except-first-2-digit-and-last-2-digit-in-javascript',\n",
" 'title': 'Masking middle except First 2 digit and Last 2 digit in JavaScript'},\n",
" {'tags': ['nuxtjs3'],\n",
" 'owner': {'account_id': 13891481,\n",
" 'reputation': 187,\n",
" 'user_id': 10029354,\n",
" 'user_type': 'registered',\n",
" 'profile_image': 'https://www.gravatar.com/avatar/586833405bb3cb3d90a5fbf6b3f5905f?s=256&d=identicon&r=PG&f=1',\n",
" 'display_name': 'hipsterstomper69',\n",
" 'link': 'https://stackoverflow.com/users/10029354/hipsterstomper69'},\n",
" 'is_answered': False,\n",
" 'view_count': 2,\n",
" 'answer_count': 0,\n",
" 'score': 0,\n",
" 'last_activity_date': 1668707869,\n",
" 'creation_date': 1668707869,\n",
" 'question_id': 74480041,\n",
" 'content_license': 'CC BY-SA 4.0',\n",
" 'link': 'https://stackoverflow.com/questions/74480041/how-to-create-a-nuxt3-server-side-method-without-exposing-it-as-an-api-or-server',\n",
" 'title': 'How to create a Nuxt3 server-side method without exposing it as an API or server route?'},\n",
" {'tags': ['android', 'gradle', 'dependencies'],\n",
" 'owner': {'account_id': 24695699,\n",
" 'reputation': 61,\n",
" 'user_id': 18587711,\n",
" 'user_type': 'registered',\n",
" 'profile_image': 'https://lh3.googleusercontent.com/a/AATXAJy_ucukXShyf9F9h0q4xJrPxtA4-uX-cf11cdkX=k-s256',\n",
" 'display_name': 'Dash',\n",
" 'link': 'https://stackoverflow.com/users/18587711/dash'},\n",
" 'is_answered': True,\n",
" 'view_count': 4226,\n",
" 'answer_count': 7,\n",
" 'score': 5,\n",
" 'last_activity_date': 1668707869,\n",
" 'creation_date': 1648292994,\n",
" 'question_id': 71627522,\n",
" 'content_license': 'CC BY-SA 4.0',\n",
" 'link': 'https://stackoverflow.com/questions/71627522/failed-to-resolve-com-github-bartekscandroid-pdf-viewer3-2-0-beta-1-how-to-fi',\n",
" 'title': 'Failed to resolve: com.github.barteksc:android-pdf-viewer:3.2.0-beta.1 how to fix this'},\n",
" {'tags': ['storage', 'cockroachdb'],\n",
" 'owner': {'account_id': 21711217,\n",
" 'reputation': 1,\n",
" 'user_id': 16022823,\n",
" 'user_type': 'registered',\n",
" 'profile_image': 'https://www.gravatar.com/avatar/3b15b5d9d513898e14b48006b1f326dd?s=256&d=identicon&r=PG&f=1',\n",
" 'display_name': 'Vanshaj',\n",
" 'link': 'https://stackoverflow.com/users/16022823/vanshaj'},\n",
" 'is_answered': False,\n",
" 'view_count': 10,\n",
" 'answer_count': 1,\n",
" 'score': 0,\n",
" 'last_activity_date': 1668707867,\n",
" 'creation_date': 1668585342,\n",
" 'question_id': 74456907,\n",
" 'content_license': 'CC BY-SA 4.0',\n",
" 'link': 'https://stackoverflow.com/questions/74456907/cockroachdb-storage-increasing-without-any-reason',\n",
" 'title': 'Cockroachdb storage increasing without any reason'},\n",
" {'tags': ['tensorflow', 'keras', 'deep-learning', 'loss-function'],\n",
" 'owner': {'account_id': 10408770,\n",
" 'reputation': 41,\n",
" 'user_id': 7674869,\n",
" 'user_type': 'registered',\n",
" 'profile_image': 'https://lh4.googleusercontent.com/-Zi5_ERBmNoM/AAAAAAAAAAI/AAAAAAAAAA8/eDgeOK-wk-I/photo.jpg?sz=256',\n",
" 'display_name': 'Jatin Mandav',\n",
" 'link': 'https://stackoverflow.com/users/7674869/jatin-mandav'},\n",
" 'is_answered': True,\n",
" 'view_count': 86,\n",
" 'bounty_amount': 50,\n",
" 'bounty_closes_date': 1669285802,\n",
" 'answer_count': 1,\n",
" 'score': 2,\n",
" 'last_activity_date': 1668707862,\n",
" 'creation_date': 1668507793,\n",
" 'last_edit_date': 1668707862,\n",
" 'question_id': 74444011,\n",
" 'content_license': 'CC BY-SA 4.0',\n",
" 'link': 'https://stackoverflow.com/questions/74444011/model-with-normalized-binary-cross-entropy-loss-does-not-converge',\n",
" 'title': 'Model with normalized binary cross entropy loss does not converge'},\n",
" {'tags': ['networking', 'wifi', 'scapy', 'monitor'],\n",
" 'owner': {'account_id': 16567596,\n",
" 'reputation': 13,\n",
" 'user_id': 18583484,\n",
" 'user_type': 'registered',\n",
" 'profile_image': 'https://lh5.googleusercontent.com/-eT7JkmWKlak/AAAAAAAAAAI/AAAAAAAAAAA/ACHi3rfhghTz7yvKuMHNFSKllR4RNiPkLw/photo.jpg?sz=256',\n",
" 'display_name': 'lydonuis',\n",
" 'link': 'https://stackoverflow.com/users/18583484/lydonuis'},\n",
" 'is_answered': False,\n",
" 'view_count': 3,\n",
" 'answer_count': 0,\n",
" 'score': 0,\n",
" 'last_activity_date': 1668707862,\n",
" 'creation_date': 1668707862,\n",
" 'question_id': 74480038,\n",
" 'content_license': 'CC BY-SA 4.0',\n",
" 'link': 'https://stackoverflow.com/questions/74480038/scapy-exception-not-a-supported-capture-file-on-python3',\n",
" 'title': 'Scapy_Exception: Not a supported capture file on Python3'},\n",
" {'tags': ['java', 'swing', 'locale'],\n",
" 'owner': {'account_id': 21411227,\n",
" 'reputation': 45,\n",
" 'user_id': 15771391,\n",
" 'user_type': 'registered',\n",
" 'profile_image': 'https://www.gravatar.com/avatar/f497f5ebbb0f84899844fa7b0888ff17?s=256&d=identicon&r=PG&f=1',\n",
" 'display_name': 'Obscuritas',\n",
" 'link': 'https://stackoverflow.com/users/15771391/obscuritas'},\n",
" 'is_answered': False,\n",
" 'view_count': 10,\n",
" 'answer_count': 0,\n",
" 'score': 0,\n",
" 'last_activity_date': 1668707861,\n",
" 'creation_date': 1668705023,\n",
" 'last_edit_date': 1668707861,\n",
" 'question_id': 74479479,\n",
" 'content_license': 'CC BY-SA 4.0',\n",
" 'link': 'https://stackoverflow.com/questions/74479479/java-how-to-refresh-gui-after-locale-change',\n",
" 'title': 'java how to "refresh" gui after locale change'},\n",
" {'tags': ['airflow'],\n",
" 'owner': {'account_id': 19502076,\n",
" 'reputation': 57,\n",
" 'user_id': 14267886,\n",
" 'user_type': 'registered',\n",
" 'profile_image': 'https://lh5.googleusercontent.com/-en8ndiGcbQY/AAAAAAAAAAI/AAAAAAAAAAA/AMZuuclRfF5AeClcYDDtlVJv0tWAbBP6bw/photo.jpg?sz=256',\n",
" 'display_name': 'Zaoza14',\n",
" 'link': 'https://stackoverflow.com/users/14267886/zaoza14'},\n",
" 'is_answered': False,\n",
" 'view_count': 2,\n",
" 'answer_count': 0,\n",
" 'score': 0,\n",
" 'last_activity_date': 1668707860,\n",
" 'creation_date': 1668707860,\n",
" 'question_id': 74480037,\n",
" 'content_license': 'CC BY-SA 4.0',\n",
" 'link': 'https://stackoverflow.com/questions/74480037/get-dags-url-to-alert-message-in-slack',\n",
" 'title': 'get dag's url to alert message In slack'},\n",
" {'tags': ['dart-sass'],\n",
" 'owner': {'account_id': 112365,\n",
" 'reputation': 10730,\n",
" 'user_id': 296430,\n",
" 'user_type': 'registered',\n",
" 'accept_rate': 93,\n",
" 'profile_image': 'https://www.gravatar.com/avatar/e7823da1c923cc2c2267055bfd794617?s=256&d=identicon&r=PG',\n",
" 'display_name': 'Jules Colle',\n",
" 'link': 'https://stackoverflow.com/users/296430/jules-colle'},\n",
" 'is_answered': False,\n",
" 'view_count': 2,\n",
" 'answer_count': 0,\n",
" 'score': 0,\n",
" 'last_activity_date': 1668707860,\n",
" 'creation_date': 1668707860,\n",
" 'question_id': 74480036,\n",
" 'content_license': 'CC BY-SA 4.0',\n",
" 'link': 'https://stackoverflow.com/questions/74480036/dart-sass-create-subfolder-for-each-generated-css-file',\n",
" 'title': 'dart sass create subfolder for each generated css file'},\n",
" {'tags': ['bash', 'shell'],\n",
" 'owner': {'account_id': 1495517,\n",
" 'reputation': 12276,\n",
" 'user_id': 1401560,\n",
" 'user_type': 'registered',\n",
" 'accept_rate': 70,\n",
" 'profile_image': 'https://www.gravatar.com/avatar/347d89519bdf28150424b22543d0fbdb?s=256&d=identicon&r=PG',\n",
" 'display_name': 'Chris F',\n",
" 'link': 'https://stackoverflow.com/users/1401560/chris-f'},\n",
" 'is_answered': True,\n",
" 'view_count': 9,\n",
" 'answer_count': 2,\n",
" 'score': 0,\n",
" 'last_activity_date': 1668707859,\n",
" 'creation_date': 1668706930,\n",
" 'question_id': 74479863,\n",
" 'content_license': 'CC BY-SA 4.0',\n",
" 'link': 'https://stackoverflow.com/questions/74479863/in-bash-how-to-store-top-level-dirs-in-an-array-for-post-processing',\n",
" 'title': 'In bash, how to store top-level dirs in an array for post-processing?'},\n",
" {'tags': ['php', 'laravel', 'laravel-8'],\n",
" 'owner': {'account_id': 5193654,\n",
" 'reputation': 798,\n",
" 'user_id': 6873608,\n",
" 'user_type': 'registered',\n",
" 'accept_rate': 87,\n",
" 'profile_image': 'https://www.gravatar.com/avatar/02fcd1776adb818a51c631d64e78c0cc?s=256&d=identicon&r=PG&f=1',\n",
" 'display_name': 'DarkFenix',\n",
" 'link': 'https://stackoverflow.com/users/6873608/darkfenix'},\n",
" 'is_answered': False,\n",
" 'view_count': 3,\n",
" 'answer_count': 0,\n",
" 'score': 0,\n",
" 'last_activity_date': 1668707856,\n",
" 'creation_date': 1668707856,\n",
" 'question_id': 74480034,\n",
" 'content_license': 'CC BY-SA 4.0',\n",
" 'link': 'https://stackoverflow.com/questions/74480034/what-refactoring-technique-can-you-use-a-cast-inside-preparevalidation-laravel-f',\n",
" 'title': 'What refactoring technique can you use a cast inside prepareValidation Laravel FormRequest'},\n",
" {'tags': ['java', 'android', 'proxy', 'android-source', 'system-services'],\n",
" 'owner': {'account_id': 22215880,\n",
" 'reputation': 15,\n",
" 'user_id': 16454332,\n",
" 'user_type': 'registered',\n",
" 'profile_image': 'https://www.gravatar.com/avatar/bbfee73dda391b24a9ab10a80757d139?s=256&d=identicon&r=PG&f=1',\n",
" 'display_name': 'Markusbug',\n",
" 'link': 'https://stackoverflow.com/users/16454332/markusbug'},\n",
" 'is_answered': False,\n",
" 'view_count': 19,\n",
" 'answer_count': 1,\n",
" 'score': 0,\n",
" 'last_activity_date': 1668707856,\n",
" 'creation_date': 1665428365,\n",
" 'question_id': 74019596,\n",
" 'content_license': 'CC BY-SA 4.0',\n",
" 'link': 'https://stackoverflow.com/questions/74019596/is-it-possible-to-restrict-access-to-a-system-service-in-aosp',\n",
" 'title': 'Is it possible to restrict access to a System Service in AOSP?'},\n",
" {'tags': ['typescript'],\n",
" 'owner': {'account_id': 14122919,\n",
" 'reputation': 49,\n",
" 'user_id': 10202981,\n",
" 'user_type': 'registered',\n",
" 'profile_image': 'https://i.stack.imgur.com/DDUaz.jpg?s=256&g=1',\n",
" 'display_name': 'iBoolGuy',\n",
" 'link': 'https://stackoverflow.com/users/10202981/iboolguy'},\n",
" 'is_answered': False,\n",
" 'view_count': 2,\n",
" 'answer_count': 0,\n",
" 'score': 0,\n",
" 'last_activity_date': 1668707855,\n",
" 'creation_date': 1668707855,\n",
" 'question_id': 74480032,\n",
" 'content_license': 'CC BY-SA 4.0',\n",
" 'link': 'https://stackoverflow.com/questions/74480032/check-if-time-exists-in-date-string-typescript',\n",
" 'title': 'Check if time exists in date string typescript'},\n",
" {'tags': ['sql', 'sql-server'],\n",
" 'owner': {'account_id': 6366548,\n",
" 'reputation': 903,\n",
" 'user_id': 9901683,\n",
" 'user_type': 'registered',\n",
" 'profile_image': 'https://lh3.googleusercontent.com/-XdUIqdMkCWA/AAAAAAAAAAI/AAAAAAAAAAA/4252rscbv5M/photo.jpg?sz=256',\n",
" 'display_name': 'dafie',\n",
" 'link': 'https://stackoverflow.com/users/9901683/dafie'},\n",
" 'is_answered': False,\n",
" 'view_count': 23,\n",
" 'answer_count': 1,\n",
" 'score': 0,\n",
" 'last_activity_date': 1668707855,\n",
" 'creation_date': 1668705762,\n",
" 'last_edit_date': 1668706952,\n",
" 'question_id': 74479618,\n",
" 'content_license': 'CC BY-SA 4.0',\n",
" 'link': 'https://stackoverflow.com/questions/74479618/allow-duplicated-column-names-in-query-result',\n",
" 'title': 'Allow duplicated column names in query result'},\n",
" {'tags': ['oracle-sqldeveloper'],\n",
" 'owner': {'account_id': 26965856,\n",
" 'reputation': 1,\n",
" 'user_id': 20532732,\n",
" 'user_type': 'registered',\n",
" 'profile_image': 'https://lh3.googleusercontent.com/a/ALm5wu1VMjuXaOnTg6EYolHD2k2r2HY8MQ8EEApAjsNn8Q=k-s256',\n",
" 'display_name': 'Rahul Roy',\n",
" 'link': 'https://stackoverflow.com/users/20532732/rahul-roy'},\n",
" 'is_answered': False,\n",
" 'view_count': 2,\n",
" 'answer_count': 0,\n",
" 'score': 0,\n",
" 'last_activity_date': 1668707853,\n",
" 'creation_date': 1668707853,\n",
" 'question_id': 74480031,\n",
" 'content_license': 'CC BY-SA 4.0',\n",
" 'link': 'https://stackoverflow.com/questions/74480031/i-do-need-help-in-writing-sql-query-in-oracle-for-the-below-sample-data',\n",
" 'title': 'I do need help in writing SQL Query in ORACLE for the below sample data'},\n",
" {'tags': ['regex'],\n",
" 'owner': {'account_id': 2147820,\n",
" 'reputation': 2787,\n",
" 'user_id': 1905056,\n",
" 'user_type': 'registered',\n",
" 'accept_rate': 46,\n",
" 'profile_image': 'https://www.gravatar.com/avatar/5a0c3020a033261ddd8985f1f4b32250?s=256&d=identicon&r=PG',\n",
" 'display_name': 'Jay Bienvenu',\n",
" 'link': 'https://stackoverflow.com/users/1905056/jay-bienvenu'},\n",
" 'is_answered': False,\n",
" 'view_count': 21,\n",
" 'answer_count': 2,\n",
" 'score': 0,\n",
" 'last_activity_date': 1668707853,\n",
" 'creation_date': 1668701024,\n",
" 'question_id': 74478572,\n",
" 'content_license': 'CC BY-SA 4.0',\n",
" 'link': 'https://stackoverflow.com/questions/74478572/regular-expression-for-function-call-containing-two-arguments',\n",
" 'title': 'Regular expression for function call containing two arguments'},\n",
" {'tags': ['php', 'sql', 'ajax', 'row'],\n",
" 'owner': {'account_id': 18810081,\n",
" 'reputation': 1,\n",
" 'user_id': 13718444,\n",
" 'user_type': 'registered',\n",
" 'profile_image': 'https://graph.facebook.com/1775211672620714/picture?type=large',\n",
" 'display_name': 'Mustafa Hashim',\n",
" 'link': 'https://stackoverflow.com/users/13718444/mustafa-hashim'},\n",
" 'is_answered': False,\n",
" 'view_count': 7,\n",
" 'answer_count': 0,\n",
" 'score': 0,\n",
" 'last_activity_date': 1668707852,\n",
" 'creation_date': 1668706955,\n",
" 'last_edit_date': 1668707852,\n",
" 'question_id': 74479868,\n",
" 'content_license': 'CC BY-SA 4.0',\n",
" 'link': 'https://stackoverflow.com/questions/74479868/insert-sql-command-inside-array',\n",
" 'title': 'insert SQL command inside array'},\n",
" {'tags': ['.net', 'iis', '.net-6.0', 'iis-10'],\n",
" 'owner': {'account_id': 23811847,\n",
" 'reputation': 120,\n",
" 'user_id': 17820562,\n",
" 'user_type': 'registered',\n",
" 'profile_image': 'https://www.gravatar.com/avatar/efa35eb4690b632894e12a7cf90cedcd?s=256&d=identicon&r=PG',\n",
" 'display_name': 'JohnS',\n",
" 'link': 'https://stackoverflow.com/users/17820562/johns'},\n",
" 'is_answered': False,\n",
" 'view_count': 6,\n",
" 'answer_count': 1,\n",
" 'score': 0,\n",
" 'last_activity_date': 1668707845,\n",
" 'creation_date': 1668707584,\n",
" 'question_id': 74479983,\n",
" 'content_license': 'CC BY-SA 4.0',\n",
" 'link': 'https://stackoverflow.com/questions/74479983/iis-10-error-when-want-to-see-configuration-editor-for-net-6-0-project',\n",
" 'title': 'IIS 10 error when want to see Configuration Editor for .Net 6.0 project'},\n",
" {'tags': ['python',\n",
" 'pandas',\n",
" 'classification',\n",
" 'xgboost',\n",
" 'data-preprocessing'],\n",
" 'owner': {'account_id': 5340767,\n",
" 'reputation': 368,\n",
" 'user_id': 4257964,\n",
" 'user_type': 'registered',\n",
" 'accept_rate': 57,\n",
" 'profile_image': 'https://www.gravatar.com/avatar/e23634a5289ee80b6a95e56c4b469987?s=256&d=identicon&r=PG&f=1',\n",
" 'display_name': 'Sudhakar Samak',\n",
" 'link': 'https://stackoverflow.com/users/4257964/sudhakar-samak'},\n",
" 'is_answered': False,\n",
" 'view_count': 11,\n",
" 'answer_count': 1,\n",
" 'score': 0,\n",
" 'last_activity_date': 1668707838,\n",
" 'creation_date': 1668701987,\n",
" 'question_id': 74478807,\n",
" 'content_license': 'CC BY-SA 4.0',\n",
" 'link': 'https://stackoverflow.com/questions/74478807/using-ordinal-variables-as-categories-in-xgboost-python',\n",
" 'title': 'Using Ordinal Variables as categories in XGBoost Python'}],\n",
" 'has_more': True,\n",
" 'quota_max': 300,\n",
" 'quota_remaining': 278}"
]
},
"execution_count": 58,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"top_questions[0]"
]
},
{
"cell_type": "code",
"execution_count": 87,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'title': 'Flatten hierarchical table from Yahoo Finance',\n",
" 'url': 'https://stackoverflow.com/questions/74480048/flatten-hierarchical-table-from-yahoo-finance',\n",
" 'community': 'stackoverflow'}"
]
},
"execution_count": 87,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"questions_with_communities = list(zip(site_ids, top_questions))\n",
"\n",
"def make_desc(question_with_community):\n",
" c,_= question_with_community\n",
" q=_['items'][0]\n",
" return {\n",
" 'title': q.get('title'),\n",
" 'url': q.get('link'),\n",
" 'community': c\n",
" }\n",
"def has_items(q): return q[1].get('items') != None\n",
"\n",
"top_questions_global = list(\n",
" map(\n",
" make_desc,\n",
" filter(\n",
" has_items,\n",
" questions_with_communities\n",
" )\n",
" )\n",
")\n",
"\n",
"top_questions_global[0]"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3.10.6 64-bit ('3.10.6')",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.6"
},
"orig_nbformat": 4,
"vscode": {
"interpreter": {
"hash": "a9be3b63f22a1a552d4ee9c71664622b0c3004378b7bfc5360ee37e759140bf0"
}
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment