Skip to content

Instantly share code, notes, and snippets.

@alexander-wei
Last active October 5, 2022 21:10
Show Gist options
  • Save alexander-wei/25db7389996deca9c562f699b1f48985 to your computer and use it in GitHub Desktop.
Save alexander-wei/25db7389996deca9c562f699b1f48985 to your computer and use it in GitHub Desktop.
hacker news posts eda
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 67,
"id": "8cb7cf2f-9036-498c-8825-3aca52bb30b6",
"metadata": {},
"outputs": [],
"source": [
"words = [\"programming\",\"iphone\", \"lessons\", \"law\"]"
]
},
{
"cell_type": "code",
"execution_count": 488,
"id": "270749e5-03da-464a-a546-1a5d43784368",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>id</th>\n",
" <th>title</th>\n",
" <th>url</th>\n",
" <th>num_points</th>\n",
" <th>num_comments</th>\n",
" <th>author</th>\n",
" <th>created_at</th>\n",
" <th>timebin</th>\n",
" <th>log_comments</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>132</th>\n",
" <td>12577219</td>\n",
" <td>motivation behind functional programming in si...</td>\n",
" <td>https://www.linkedin.com/pulse/artistic-way-pr...</td>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>rovercaps</td>\n",
" <td>9/25/2016 20:21</td>\n",
" <td>8.0</td>\n",
" <td>0.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>217</th>\n",
" <td>12576307</td>\n",
" <td>forever alone programming [fap]</td>\n",
" <td>https://github.com/nopara73/ForeverAloneProgra...</td>\n",
" <td>3</td>\n",
" <td>0</td>\n",
" <td>misnamed</td>\n",
" <td>9/25/2016 17:36</td>\n",
" <td>7.0</td>\n",
" <td>0.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>476</th>\n",
" <td>12573578</td>\n",
" <td>a brief guide to c++ template metaprogramming</td>\n",
" <td>https://github.com/MCGallaspy/dr_strangetemplate</td>\n",
" <td>79</td>\n",
" <td>15</td>\n",
" <td>Halienja</td>\n",
" <td>9/25/2016 2:22</td>\n",
" <td>0.0</td>\n",
" <td>2.772589</td>\n",
" </tr>\n",
" <tr>\n",
" <th>520</th>\n",
" <td>12573093</td>\n",
" <td>gpu programming in rust [pdf]</td>\n",
" <td>https://www.cs.indiana.edu/~eholk/papers/hips2...</td>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>peeyek</td>\n",
" <td>9/24/2016 23:25</td>\n",
" <td>9.0</td>\n",
" <td>0.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>580</th>\n",
" <td>12572483</td>\n",
" <td>core war: the ultimate programming game</td>\n",
" <td>http://corewar.co.uk</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>jdmoreira</td>\n",
" <td>9/24/2016 20:22</td>\n",
" <td>8.0</td>\n",
" <td>0.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>292900</th>\n",
" <td>10178498</td>\n",
" <td>programming coordinated behavior in java (2010...</td>\n",
" <td>http://www.wisdom.weizmann.ac.il/~amarron/BPJ%...</td>\n",
" <td>5</td>\n",
" <td>0</td>\n",
" <td>pron</td>\n",
" <td>9/6/2015 18:31</td>\n",
" <td>7.0</td>\n",
" <td>0.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>292972</th>\n",
" <td>10177851</td>\n",
" <td>peteris krumins: my top 100 programming, compu...</td>\n",
" <td>http://www.catonmat.net/blog/top-100-books-par...</td>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>yarapavan</td>\n",
" <td>9/6/2015 15:14</td>\n",
" <td>6.0</td>\n",
" <td>0.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>292994</th>\n",
" <td>10177716</td>\n",
" <td>alda: a music programming language</td>\n",
" <td>http://daveyarwood.github.io/alda/2015/09/05/a...</td>\n",
" <td>276</td>\n",
" <td>75</td>\n",
" <td>daveyarwood</td>\n",
" <td>9/6/2015 14:21</td>\n",
" <td>5.0</td>\n",
" <td>4.330733</td>\n",
" </tr>\n",
" <tr>\n",
" <th>293031</th>\n",
" <td>10177454</td>\n",
" <td>developing effective bioinformatics programmin...</td>\n",
" <td>http://journals.plos.org/ploscompbiol/article?...</td>\n",
" <td>22</td>\n",
" <td>2</td>\n",
" <td>snake117</td>\n",
" <td>9/6/2015 12:36</td>\n",
" <td>5.0</td>\n",
" <td>1.098612</td>\n",
" </tr>\n",
" <tr>\n",
" <th>293076</th>\n",
" <td>10177168</td>\n",
" <td>the effects of computer programming on the bra...</td>\n",
" <td>http://virtuecenter.com/blog/the_effects_of_co...</td>\n",
" <td>73</td>\n",
" <td>22</td>\n",
" <td>bl00djack</td>\n",
" <td>9/6/2015 9:13</td>\n",
" <td>3.0</td>\n",
" <td>3.135494</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>2293 rows × 9 columns</p>\n",
"</div>"
],
"text/plain": [
" id title \\\n",
"132 12577219 motivation behind functional programming in si... \n",
"217 12576307 forever alone programming [fap] \n",
"476 12573578 a brief guide to c++ template metaprogramming \n",
"520 12573093 gpu programming in rust [pdf] \n",
"580 12572483 core war: the ultimate programming game \n",
"... ... ... \n",
"292900 10178498 programming coordinated behavior in java (2010... \n",
"292972 10177851 peteris krumins: my top 100 programming, compu... \n",
"292994 10177716 alda: a music programming language \n",
"293031 10177454 developing effective bioinformatics programmin... \n",
"293076 10177168 the effects of computer programming on the bra... \n",
"\n",
" url num_points \\\n",
"132 https://www.linkedin.com/pulse/artistic-way-pr... 2 \n",
"217 https://github.com/nopara73/ForeverAloneProgra... 3 \n",
"476 https://github.com/MCGallaspy/dr_strangetemplate 79 \n",
"520 https://www.cs.indiana.edu/~eholk/papers/hips2... 2 \n",
"580 http://corewar.co.uk 1 \n",
"... ... ... \n",
"292900 http://www.wisdom.weizmann.ac.il/~amarron/BPJ%... 5 \n",
"292972 http://www.catonmat.net/blog/top-100-books-par... 2 \n",
"292994 http://daveyarwood.github.io/alda/2015/09/05/a... 276 \n",
"293031 http://journals.plos.org/ploscompbiol/article?... 22 \n",
"293076 http://virtuecenter.com/blog/the_effects_of_co... 73 \n",
"\n",
" num_comments author created_at timebin log_comments \n",
"132 0 rovercaps 9/25/2016 20:21 8.0 0.000000 \n",
"217 0 misnamed 9/25/2016 17:36 7.0 0.000000 \n",
"476 15 Halienja 9/25/2016 2:22 0.0 2.772589 \n",
"520 0 peeyek 9/24/2016 23:25 9.0 0.000000 \n",
"580 0 jdmoreira 9/24/2016 20:22 8.0 0.000000 \n",
"... ... ... ... ... ... \n",
"292900 0 pron 9/6/2015 18:31 7.0 0.000000 \n",
"292972 0 yarapavan 9/6/2015 15:14 6.0 0.000000 \n",
"292994 75 daveyarwood 9/6/2015 14:21 5.0 4.330733 \n",
"293031 2 snake117 9/6/2015 12:36 5.0 1.098612 \n",
"293076 22 bl00djack 9/6/2015 9:13 3.0 3.135494 \n",
"\n",
"[2293 rows x 9 columns]"
]
},
"execution_count": 488,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"_X.query('title.str.contains(\"programming\")')"
]
},
{
"cell_type": "code",
"execution_count": 489,
"id": "acba919c-8f69-49d9-a394-147379a58189",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>id</th>\n",
" <th>title</th>\n",
" <th>url</th>\n",
" <th>num_points</th>\n",
" <th>num_comments</th>\n",
" <th>author</th>\n",
" <th>created_at</th>\n",
" <th>timebin</th>\n",
" <th>log_comments</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>190</th>\n",
" <td>12576719</td>\n",
" <td>beyond the iphone</td>\n",
" <td>https://stratechery.com/2016/beyond-the-iphone/</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>pvsukale3</td>\n",
" <td>9/25/2016 18:49</td>\n",
" <td>7.0</td>\n",
" <td>0.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>289</th>\n",
" <td>12575590</td>\n",
" <td>secret hack to get headphone jack on the iphon...</td>\n",
" <td>https://www.youtube.com/watch?v=5tqH-Un9SFU</td>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>skolos</td>\n",
" <td>9/25/2016 14:54</td>\n",
" <td>6.0</td>\n",
" <td>0.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>461</th>\n",
" <td>12573753</td>\n",
" <td>turn off your iphone notifications, and four m...</td>\n",
" <td>http://qz.com/788533/iphone-7-and-ios-10-turn-...</td>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>okket</td>\n",
" <td>9/25/2016 3:16</td>\n",
" <td>1.0</td>\n",
" <td>0.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>493</th>\n",
" <td>12573372</td>\n",
" <td>jailbroke the iphone 7 in just 24 hours</td>\n",
" <td>https://motherboard.vice.com/read/iphone-7-jai...</td>\n",
" <td>3</td>\n",
" <td>0</td>\n",
" <td>CapitalistCartr</td>\n",
" <td>9/25/2016 1:10</td>\n",
" <td>0.0</td>\n",
" <td>0.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>678</th>\n",
" <td>12571686</td>\n",
" <td>these photos prove the iphone 7 plus doesn't t...</td>\n",
" <td>http://www.forbes.com/sites/bensin/2016/09/24/...</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>lunayo</td>\n",
" <td>9/24/2016 17:12</td>\n",
" <td>7.0</td>\n",
" <td>0.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>292209</th>\n",
" <td>10183433</td>\n",
" <td>waltr converts and transfers any video to ipho...</td>\n",
" <td>http://www.idownloadblog.com/2015/09/07/waltr-...</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>rare455</td>\n",
" <td>9/7/2015 23:13</td>\n",
" <td>9.0</td>\n",
" <td>0.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>292462</th>\n",
" <td>10181647</td>\n",
" <td>apple plans to use hydrogen as iphone and macb...</td>\n",
" <td>http://news.softpedia.com/news/apple-plans-to-...</td>\n",
" <td>2</td>\n",
" <td>1</td>\n",
" <td>serghei</td>\n",
" <td>9/7/2015 15:03</td>\n",
" <td>6.0</td>\n",
" <td>0.693147</td>\n",
" </tr>\n",
" <tr>\n",
" <th>292591</th>\n",
" <td>10180972</td>\n",
" <td>chinese smartphones already have rumoured feat...</td>\n",
" <td>http://www.thememo.com/2015/09/07/iphone-6s-ap...</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>alexwoodcreates</td>\n",
" <td>9/7/2015 11:05</td>\n",
" <td>4.0</td>\n",
" <td>0.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>292789</th>\n",
" <td>10179487</td>\n",
" <td>the shape of apples new iphones</td>\n",
" <td>http://techcrunch.com/2015/09/06/the-shape-of-...</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>confiscate</td>\n",
" <td>9/6/2015 23:25</td>\n",
" <td>9.0</td>\n",
" <td>0.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>292997</th>\n",
" <td>10177667</td>\n",
" <td>would the iphone exist if steve jobs did not t...</td>\n",
" <td>https://medium.com/@OctavianRistea/would-the-i...</td>\n",
" <td>3</td>\n",
" <td>0</td>\n",
" <td>wenqin123</td>\n",
" <td>9/6/2015 14:03</td>\n",
" <td>5.0</td>\n",
" <td>0.000000</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>1487 rows × 9 columns</p>\n",
"</div>"
],
"text/plain": [
" id title \\\n",
"190 12576719 beyond the iphone \n",
"289 12575590 secret hack to get headphone jack on the iphon... \n",
"461 12573753 turn off your iphone notifications, and four m... \n",
"493 12573372 jailbroke the iphone 7 in just 24 hours \n",
"678 12571686 these photos prove the iphone 7 plus doesn't t... \n",
"... ... ... \n",
"292209 10183433 waltr converts and transfers any video to ipho... \n",
"292462 10181647 apple plans to use hydrogen as iphone and macb... \n",
"292591 10180972 chinese smartphones already have rumoured feat... \n",
"292789 10179487 the shape of apples new iphones \n",
"292997 10177667 would the iphone exist if steve jobs did not t... \n",
"\n",
" url num_points \\\n",
"190 https://stratechery.com/2016/beyond-the-iphone/ 1 \n",
"289 https://www.youtube.com/watch?v=5tqH-Un9SFU 2 \n",
"461 http://qz.com/788533/iphone-7-and-ios-10-turn-... 2 \n",
"493 https://motherboard.vice.com/read/iphone-7-jai... 3 \n",
"678 http://www.forbes.com/sites/bensin/2016/09/24/... 1 \n",
"... ... ... \n",
"292209 http://www.idownloadblog.com/2015/09/07/waltr-... 1 \n",
"292462 http://news.softpedia.com/news/apple-plans-to-... 2 \n",
"292591 http://www.thememo.com/2015/09/07/iphone-6s-ap... 1 \n",
"292789 http://techcrunch.com/2015/09/06/the-shape-of-... 1 \n",
"292997 https://medium.com/@OctavianRistea/would-the-i... 3 \n",
"\n",
" num_comments author created_at timebin log_comments \n",
"190 0 pvsukale3 9/25/2016 18:49 7.0 0.000000 \n",
"289 0 skolos 9/25/2016 14:54 6.0 0.000000 \n",
"461 0 okket 9/25/2016 3:16 1.0 0.000000 \n",
"493 0 CapitalistCartr 9/25/2016 1:10 0.0 0.000000 \n",
"678 0 lunayo 9/24/2016 17:12 7.0 0.000000 \n",
"... ... ... ... ... ... \n",
"292209 0 rare455 9/7/2015 23:13 9.0 0.000000 \n",
"292462 1 serghei 9/7/2015 15:03 6.0 0.693147 \n",
"292591 0 alexwoodcreates 9/7/2015 11:05 4.0 0.000000 \n",
"292789 0 confiscate 9/6/2015 23:25 9.0 0.000000 \n",
"292997 0 wenqin123 9/6/2015 14:03 5.0 0.000000 \n",
"\n",
"[1487 rows x 9 columns]"
]
},
"execution_count": 489,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"_X.query('title.str.contains(\"iphone\")')"
]
},
{
"cell_type": "code",
"execution_count": 490,
"id": "c9463a4e-ffd0-427a-acb6-82e6bb1d0cd1",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>id</th>\n",
" <th>title</th>\n",
" <th>url</th>\n",
" <th>num_points</th>\n",
" <th>num_comments</th>\n",
" <th>author</th>\n",
" <th>created_at</th>\n",
" <th>timebin</th>\n",
" <th>log_comments</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>1449</th>\n",
" <td>12564437</td>\n",
" <td>webgl lessons custom shaders in threejs</td>\n",
" <td>https://github.com/Jam3/jam3-lesson-webgl-shad...</td>\n",
" <td>3</td>\n",
" <td>0</td>\n",
" <td>mattdesl</td>\n",
" <td>9/23/2016 13:33</td>\n",
" <td>5.0</td>\n",
" <td>0.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1645</th>\n",
" <td>12562840</td>\n",
" <td>the painful lessons a tree must learn</td>\n",
" <td>http://nautil.us/issue/40/learning/the-harsh-h...</td>\n",
" <td>3</td>\n",
" <td>0</td>\n",
" <td>prostoalex</td>\n",
" <td>9/23/2016 7:04</td>\n",
" <td>2.0</td>\n",
" <td>0.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1984</th>\n",
" <td>12559631</td>\n",
" <td>webgl lessons a brief intro to fragment shaders</td>\n",
" <td>https://github.com/Jam3/jam3-lesson-webgl-shad...</td>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>mattdesl</td>\n",
" <td>9/22/2016 19:35</td>\n",
" <td>8.0</td>\n",
" <td>0.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2141</th>\n",
" <td>12558237</td>\n",
" <td>lessons in supply and demand: housing market e...</td>\n",
" <td>http://cityobservatory.org/3277-2/</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>jseliger</td>\n",
" <td>9/22/2016 16:57</td>\n",
" <td>7.0</td>\n",
" <td>0.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2175</th>\n",
" <td>12557971</td>\n",
" <td>a lasting marriage: lessons learned after 7 ye...</td>\n",
" <td>https://www.jackkinsella.ie/articles/google-an...</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>jackkinsella</td>\n",
" <td>9/22/2016 16:26</td>\n",
" <td>6.0</td>\n",
" <td>0.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>292400</th>\n",
" <td>10182006</td>\n",
" <td>a twitter parody leads to expensive lessons in...</td>\n",
" <td>http://www.chicagotribune.com/news/opinion/edi...</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>wglb</td>\n",
" <td>9/7/2015 16:27</td>\n",
" <td>6.0</td>\n",
" <td>1.098612</td>\n",
" </tr>\n",
" <tr>\n",
" <th>292503</th>\n",
" <td>10181421</td>\n",
" <td>lessons learned: tcp slow start doesnt have to...</td>\n",
" <td>https://packetzoom.com/blog/lessons-learned-tc...</td>\n",
" <td>24</td>\n",
" <td>1</td>\n",
" <td>johnpjoseph</td>\n",
" <td>9/7/2015 13:56</td>\n",
" <td>5.0</td>\n",
" <td>0.693147</td>\n",
" </tr>\n",
" <tr>\n",
" <th>292525</th>\n",
" <td>10181352</td>\n",
" <td>remote teams: best practices and culture lesso...</td>\n",
" <td>https://redbooth.com/blog/remote-teams</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>gorachel007</td>\n",
" <td>9/7/2015 13:35</td>\n",
" <td>5.0</td>\n",
" <td>0.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>292714</th>\n",
" <td>10180011</td>\n",
" <td>lessons from making a shit app</td>\n",
" <td>https://medium.com/next-to-launch/lessons-from...</td>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>bootload</td>\n",
" <td>9/7/2015 3:58</td>\n",
" <td>1.0</td>\n",
" <td>0.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>292803</th>\n",
" <td>10179432</td>\n",
" <td>blockchain with 100k transactions/second borro...</td>\n",
" <td>https://bitshares.org/technology/industrial-pe...</td>\n",
" <td>5</td>\n",
" <td>0</td>\n",
" <td>joeyspn</td>\n",
" <td>9/6/2015 23:01</td>\n",
" <td>9.0</td>\n",
" <td>0.000000</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>738 rows × 9 columns</p>\n",
"</div>"
],
"text/plain": [
" id title \\\n",
"1449 12564437 webgl lessons custom shaders in threejs \n",
"1645 12562840 the painful lessons a tree must learn \n",
"1984 12559631 webgl lessons a brief intro to fragment shaders \n",
"2141 12558237 lessons in supply and demand: housing market e... \n",
"2175 12557971 a lasting marriage: lessons learned after 7 ye... \n",
"... ... ... \n",
"292400 10182006 a twitter parody leads to expensive lessons in... \n",
"292503 10181421 lessons learned: tcp slow start doesnt have to... \n",
"292525 10181352 remote teams: best practices and culture lesso... \n",
"292714 10180011 lessons from making a shit app \n",
"292803 10179432 blockchain with 100k transactions/second borro... \n",
"\n",
" url num_points \\\n",
"1449 https://github.com/Jam3/jam3-lesson-webgl-shad... 3 \n",
"1645 http://nautil.us/issue/40/learning/the-harsh-h... 3 \n",
"1984 https://github.com/Jam3/jam3-lesson-webgl-shad... 2 \n",
"2141 http://cityobservatory.org/3277-2/ 1 \n",
"2175 https://www.jackkinsella.ie/articles/google-an... 1 \n",
"... ... ... \n",
"292400 http://www.chicagotribune.com/news/opinion/edi... 2 \n",
"292503 https://packetzoom.com/blog/lessons-learned-tc... 24 \n",
"292525 https://redbooth.com/blog/remote-teams 1 \n",
"292714 https://medium.com/next-to-launch/lessons-from... 2 \n",
"292803 https://bitshares.org/technology/industrial-pe... 5 \n",
"\n",
" num_comments author created_at timebin log_comments \n",
"1449 0 mattdesl 9/23/2016 13:33 5.0 0.000000 \n",
"1645 0 prostoalex 9/23/2016 7:04 2.0 0.000000 \n",
"1984 0 mattdesl 9/22/2016 19:35 8.0 0.000000 \n",
"2141 0 jseliger 9/22/2016 16:57 7.0 0.000000 \n",
"2175 0 jackkinsella 9/22/2016 16:26 6.0 0.000000 \n",
"... ... ... ... ... ... \n",
"292400 2 wglb 9/7/2015 16:27 6.0 1.098612 \n",
"292503 1 johnpjoseph 9/7/2015 13:56 5.0 0.693147 \n",
"292525 0 gorachel007 9/7/2015 13:35 5.0 0.000000 \n",
"292714 0 bootload 9/7/2015 3:58 1.0 0.000000 \n",
"292803 0 joeyspn 9/6/2015 23:01 9.0 0.000000 \n",
"\n",
"[738 rows x 9 columns]"
]
},
"execution_count": 490,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"_X.query('title.str.contains(\"lessons\")')"
]
},
{
"cell_type": "code",
"execution_count": 491,
"id": "69b1046c-7ceb-4a9c-8ec2-e1442758e539",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>id</th>\n",
" <th>title</th>\n",
" <th>url</th>\n",
" <th>num_points</th>\n",
" <th>num_comments</th>\n",
" <th>author</th>\n",
" <th>created_at</th>\n",
" <th>timebin</th>\n",
" <th>log_comments</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>364</th>\n",
" <td>12574737</td>\n",
" <td>california enacts law requiring imdb to remove...</td>\n",
" <td>http://www.hollywoodreporter.com/news/californ...</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>adventured</td>\n",
" <td>9/25/2016 10:33</td>\n",
" <td>4.0</td>\n",
" <td>0.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>388</th>\n",
" <td>12574537</td>\n",
" <td>new law forces imdb to remove the age of actor...</td>\n",
" <td>http://gizmodo.com/new-law-will-force-imdb-to-...</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>allendoerfer</td>\n",
" <td>9/25/2016 9:14</td>\n",
" <td>3.0</td>\n",
" <td>0.693147</td>\n",
" </tr>\n",
" <tr>\n",
" <th>439</th>\n",
" <td>12574093</td>\n",
" <td>california passes law requiring removal of act...</td>\n",
" <td>http://variety.com/2016/film/news/california-l...</td>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>PKop</td>\n",
" <td>9/25/2016 5:23</td>\n",
" <td>2.0</td>\n",
" <td>0.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>491</th>\n",
" <td>12573377</td>\n",
" <td>california enacts law requiring imdb to remove...</td>\n",
" <td>http://www.hollywoodreporter.com/news/californ...</td>\n",
" <td>7</td>\n",
" <td>1</td>\n",
" <td>eplanit</td>\n",
" <td>9/25/2016 1:13</td>\n",
" <td>0.0</td>\n",
" <td>0.693147</td>\n",
" </tr>\n",
" <tr>\n",
" <th>524</th>\n",
" <td>12573077</td>\n",
" <td>california enacts law requiring imdb to remove...</td>\n",
" <td>https://www.yahoo.com/movies/california-enacts...</td>\n",
" <td>3</td>\n",
" <td>2</td>\n",
" <td>danso</td>\n",
" <td>9/24/2016 23:20</td>\n",
" <td>9.0</td>\n",
" <td>1.098612</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>292731</th>\n",
" <td>10179911</td>\n",
" <td>moores law may be running out of steam, but ch...</td>\n",
" <td>http://www.economist.com/news/technology-quart...</td>\n",
" <td>18</td>\n",
" <td>5</td>\n",
" <td>tdaltonc</td>\n",
" <td>9/7/2015 3:16</td>\n",
" <td>1.0</td>\n",
" <td>1.791759</td>\n",
" </tr>\n",
" <tr>\n",
" <th>292760</th>\n",
" <td>10179733</td>\n",
" <td>the law billable hour: trading your time for m...</td>\n",
" <td>http://www.williamha.com/the-law-billable-hour...</td>\n",
" <td>3</td>\n",
" <td>0</td>\n",
" <td>burritofanatic</td>\n",
" <td>9/7/2015 1:23</td>\n",
" <td>0.0</td>\n",
" <td>0.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>292883</th>\n",
" <td>10178658</td>\n",
" <td>under new oregon law, all eligible voters are ...</td>\n",
" <td>http://www.latimes.com/nation/la-na-oregon-aut...</td>\n",
" <td>3</td>\n",
" <td>0</td>\n",
" <td>MilnerRoute</td>\n",
" <td>9/6/2015 19:13</td>\n",
" <td>8.0</td>\n",
" <td>0.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>292901</th>\n",
" <td>10178484</td>\n",
" <td>man arrested for parodying mayor on twitter se...</td>\n",
" <td>http://arstechnica.com/tech-policy/2015/09/man...</td>\n",
" <td>8</td>\n",
" <td>3</td>\n",
" <td>leephillips</td>\n",
" <td>9/6/2015 18:27</td>\n",
" <td>7.0</td>\n",
" <td>1.386294</td>\n",
" </tr>\n",
" <tr>\n",
" <th>293099</th>\n",
" <td>10176994</td>\n",
" <td>law for the commons</td>\n",
" <td>http://wiki.commonstransition.org/wiki/Law_for...</td>\n",
" <td>27</td>\n",
" <td>0</td>\n",
" <td>walterbell</td>\n",
" <td>9/6/2015 7:09</td>\n",
" <td>2.0</td>\n",
" <td>0.000000</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>2007 rows × 9 columns</p>\n",
"</div>"
],
"text/plain": [
" id title \\\n",
"364 12574737 california enacts law requiring imdb to remove... \n",
"388 12574537 new law forces imdb to remove the age of actor... \n",
"439 12574093 california passes law requiring removal of act... \n",
"491 12573377 california enacts law requiring imdb to remove... \n",
"524 12573077 california enacts law requiring imdb to remove... \n",
"... ... ... \n",
"292731 10179911 moores law may be running out of steam, but ch... \n",
"292760 10179733 the law billable hour: trading your time for m... \n",
"292883 10178658 under new oregon law, all eligible voters are ... \n",
"292901 10178484 man arrested for parodying mayor on twitter se... \n",
"293099 10176994 law for the commons \n",
"\n",
" url num_points \\\n",
"364 http://www.hollywoodreporter.com/news/californ... 1 \n",
"388 http://gizmodo.com/new-law-will-force-imdb-to-... 1 \n",
"439 http://variety.com/2016/film/news/california-l... 2 \n",
"491 http://www.hollywoodreporter.com/news/californ... 7 \n",
"524 https://www.yahoo.com/movies/california-enacts... 3 \n",
"... ... ... \n",
"292731 http://www.economist.com/news/technology-quart... 18 \n",
"292760 http://www.williamha.com/the-law-billable-hour... 3 \n",
"292883 http://www.latimes.com/nation/la-na-oregon-aut... 3 \n",
"292901 http://arstechnica.com/tech-policy/2015/09/man... 8 \n",
"293099 http://wiki.commonstransition.org/wiki/Law_for... 27 \n",
"\n",
" num_comments author created_at timebin log_comments \n",
"364 0 adventured 9/25/2016 10:33 4.0 0.000000 \n",
"388 1 allendoerfer 9/25/2016 9:14 3.0 0.693147 \n",
"439 0 PKop 9/25/2016 5:23 2.0 0.000000 \n",
"491 1 eplanit 9/25/2016 1:13 0.0 0.693147 \n",
"524 2 danso 9/24/2016 23:20 9.0 1.098612 \n",
"... ... ... ... ... ... \n",
"292731 5 tdaltonc 9/7/2015 3:16 1.0 1.791759 \n",
"292760 0 burritofanatic 9/7/2015 1:23 0.0 0.000000 \n",
"292883 0 MilnerRoute 9/6/2015 19:13 8.0 0.000000 \n",
"292901 3 leephillips 9/6/2015 18:27 7.0 1.386294 \n",
"293099 0 walterbell 9/6/2015 7:09 2.0 0.000000 \n",
"\n",
"[2007 rows x 9 columns]"
]
},
"execution_count": 491,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"_X.query('title.str.contains(\"law\")')"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"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.5"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment