|
884 | 884 | }, |
885 | 885 | { |
886 | 886 | "cell_type": "code", |
887 | | - "execution_count": 25, |
| 887 | + "execution_count": null, |
888 | 888 | "metadata": {}, |
889 | 889 | "outputs": [ |
890 | 890 | { |
|
1139 | 1139 | "\t\to.write(description)" |
1140 | 1140 | ] |
1141 | 1141 | }, |
| 1142 | + { |
| 1143 | + "cell_type": "code", |
| 1144 | + "execution_count": 33, |
| 1145 | + "metadata": {}, |
| 1146 | + "outputs": [ |
| 1147 | + { |
| 1148 | + "data": { |
| 1149 | + "text/html": [ |
| 1150 | + "<div>\n", |
| 1151 | + "<style scoped>\n", |
| 1152 | + " .dataframe tbody tr th:only-of-type {\n", |
| 1153 | + " vertical-align: middle;\n", |
| 1154 | + " }\n", |
| 1155 | + "\n", |
| 1156 | + " .dataframe tbody tr th {\n", |
| 1157 | + " vertical-align: top;\n", |
| 1158 | + " }\n", |
| 1159 | + "\n", |
| 1160 | + " .dataframe thead th {\n", |
| 1161 | + " text-align: right;\n", |
| 1162 | + " }\n", |
| 1163 | + "</style>\n", |
| 1164 | + "<table border=\"1\" class=\"dataframe\">\n", |
| 1165 | + " <thead>\n", |
| 1166 | + " <tr style=\"text-align: right;\">\n", |
| 1167 | + " <th></th>\n", |
| 1168 | + " <th>title</th>\n", |
| 1169 | + " <th>short_description</th>\n", |
| 1170 | + " <th>description</th>\n", |
| 1171 | + " <th>tags</th>\n", |
| 1172 | + " <th>agenda</th>\n", |
| 1173 | + " <th>featured</th>\n", |
| 1174 | + " <th>active</th>\n", |
| 1175 | + " <th>start_date</th>\n", |
| 1176 | + " <th>end_date</th>\n", |
| 1177 | + " <th>application_start</th>\n", |
| 1178 | + " <th>application_end</th>\n", |
| 1179 | + " <th>link</th>\n", |
| 1180 | + " <th>image</th>\n", |
| 1181 | + " <th>dcc</th>\n", |
| 1182 | + " <th>carousel</th>\n", |
| 1183 | + " <th>cfde_specific</th>\n", |
| 1184 | + " <th>flyer</th>\n", |
| 1185 | + " </tr>\n", |
| 1186 | + " </thead>\n", |
| 1187 | + " <tbody>\n", |
| 1188 | + " <tr>\n", |
| 1189 | + " <th>0</th>\n", |
| 1190 | + " <td>Summer Research Program in Biomedical Big Data...</td>\n", |
| 1191 | + " <td>This virtual symposium was hosted by the Ma’ay...</td>\n", |
| 1192 | + " <td>LINCS’ Summer Research Training Program in Bio...</td>\n", |
| 1193 | + " <td>[\"training program\"]</td>\n", |
| 1194 | + " <td></td>\n", |
| 1195 | + " <td>True</td>\n", |
| 1196 | + " <td>True</td>\n", |
| 1197 | + " <td>2024-06-03T00:00:00-04:00</td>\n", |
| 1198 | + " <td>2024-08-09T00:00:00-04:00</td>\n", |
| 1199 | + " <td></td>\n", |
| 1200 | + " <td>2024-02-01T00:00:00-05:00</td>\n", |
| 1201 | + " <td>https://labs.icahn.mssm.edu/maayanlab/summer-r...</td>\n", |
| 1202 | + " <td>https://cfde-drc.s3.amazonaws.com/assets/img/l...</td>\n", |
| 1203 | + " <td>LINCS</td>\n", |
| 1204 | + " <td>False</td>\n", |
| 1205 | + " <td>True</td>\n", |
| 1206 | + " <td></td>\n", |
| 1207 | + " </tr>\n", |
| 1208 | + " <tr>\n", |
| 1209 | + " <th>1</th>\n", |
| 1210 | + " <td>2024 HuBMAP Undergraduate Student Internship P...</td>\n", |
| 1211 | + " <td>The Undergraduate Student Internship Program p...</td>\n", |
| 1212 | + " <td>Applications will be accepted from November 27...</td>\n", |
| 1213 | + " <td>[\"internship\"]</td>\n", |
| 1214 | + " <td></td>\n", |
| 1215 | + " <td>False</td>\n", |
| 1216 | + " <td>True</td>\n", |
| 1217 | + " <td>2024-05-20T00:00:00-04:00</td>\n", |
| 1218 | + " <td>2024-08-16T00:00:00-04:00</td>\n", |
| 1219 | + " <td>2023-11-07T00:00:00-05:00</td>\n", |
| 1220 | + " <td>2024-02-01T00:00:00-05:00</td>\n", |
| 1221 | + " <td>https://hubmapconsortium.org/internship-program/</td>\n", |
| 1222 | + " <td>https://cfde-drc.s3.amazonaws.com/assets/img/h...</td>\n", |
| 1223 | + " <td>HuBMAP</td>\n", |
| 1224 | + " <td>False</td>\n", |
| 1225 | + " <td>False</td>\n", |
| 1226 | + " <td></td>\n", |
| 1227 | + " </tr>\n", |
| 1228 | + " <tr>\n", |
| 1229 | + " <th>2</th>\n", |
| 1230 | + " <td>Coursera Course: Big Data Science with the BD2...</td>\n", |
| 1231 | + " <td>In this course the LINCS DCC covers computatio...</td>\n", |
| 1232 | + " <td>In this course the LINCS DCC introduces the da...</td>\n", |
| 1233 | + " <td>[\"course\"]</td>\n", |
| 1234 | + " <td></td>\n", |
| 1235 | + " <td>False</td>\n", |
| 1236 | + " <td>True</td>\n", |
| 1237 | + " <td></td>\n", |
| 1238 | + " <td></td>\n", |
| 1239 | + " <td></td>\n", |
| 1240 | + " <td></td>\n", |
| 1241 | + " <td>https://www.coursera.org/learn/bd2k-lincs</td>\n", |
| 1242 | + " <td>https://cfde-drc.s3.amazonaws.com/assets/img/l...</td>\n", |
| 1243 | + " <td>LINCS</td>\n", |
| 1244 | + " <td>False</td>\n", |
| 1245 | + " <td>False</td>\n", |
| 1246 | + " <td></td>\n", |
| 1247 | + " </tr>\n", |
| 1248 | + " <tr>\n", |
| 1249 | + " <th>3</th>\n", |
| 1250 | + " <td>SenNet + HOA - Hacking the Human Vasculature i...</td>\n", |
| 1251 | + " <td>The goal of this competition is to segment blo...</td>\n", |
| 1252 | + " <td>The “SenNet + HOA - Hacking the Human Vasculat...</td>\n", |
| 1253 | + " <td>[\"competition\"]</td>\n", |
| 1254 | + " <td></td>\n", |
| 1255 | + " <td>False</td>\n", |
| 1256 | + " <td>True</td>\n", |
| 1257 | + " <td>2023-11-07T00:00:00-05:00</td>\n", |
| 1258 | + " <td>2024-02-06T00:00:00-05:00</td>\n", |
| 1259 | + " <td></td>\n", |
| 1260 | + " <td>2024-01-30T00:00:00-05:00</td>\n", |
| 1261 | + " <td>https://www.kaggle.com/competitions/blood-vess...</td>\n", |
| 1262 | + " <td>https://cfde-drc.s3.amazonaws.com/assets/img/b...</td>\n", |
| 1263 | + " <td>SenNet</td>\n", |
| 1264 | + " <td>False</td>\n", |
| 1265 | + " <td>False</td>\n", |
| 1266 | + " <td></td>\n", |
| 1267 | + " </tr>\n", |
| 1268 | + " <tr>\n", |
| 1269 | + " <th>4</th>\n", |
| 1270 | + " <td>GlyGen & CFDE Workshop Summer 2023</td>\n", |
| 1271 | + " <td>This workshop provides an opportunity to learn...</td>\n", |
| 1272 | + " <td>The purpose of this workshop is to bring toget...</td>\n", |
| 1273 | + " <td>[\"workshop\"]</td>\n", |
| 1274 | + " <td></td>\n", |
| 1275 | + " <td>False</td>\n", |
| 1276 | + " <td>False</td>\n", |
| 1277 | + " <td>2023-08-07T00:00:00-04:00</td>\n", |
| 1278 | + " <td></td>\n", |
| 1279 | + " <td></td>\n", |
| 1280 | + " <td></td>\n", |
| 1281 | + " <td>https://wiki.glygen.org/GlyGen_CFDE_Workshop_S...</td>\n", |
| 1282 | + " <td>https://cfde-drc.s3.amazonaws.com/assets/img/g...</td>\n", |
| 1283 | + " <td>GlyGen</td>\n", |
| 1284 | + " <td>False</td>\n", |
| 1285 | + " <td>True</td>\n", |
| 1286 | + " <td></td>\n", |
| 1287 | + " </tr>\n", |
| 1288 | + " </tbody>\n", |
| 1289 | + "</table>\n", |
| 1290 | + "</div>" |
| 1291 | + ], |
| 1292 | + "text/plain": [ |
| 1293 | + " title \\\n", |
| 1294 | + "0 Summer Research Program in Biomedical Big Data... \n", |
| 1295 | + "1 2024 HuBMAP Undergraduate Student Internship P... \n", |
| 1296 | + "2 Coursera Course: Big Data Science with the BD2... \n", |
| 1297 | + "3 SenNet + HOA - Hacking the Human Vasculature i... \n", |
| 1298 | + "4 GlyGen & CFDE Workshop Summer 2023 \n", |
| 1299 | + "\n", |
| 1300 | + " short_description \\\n", |
| 1301 | + "0 This virtual symposium was hosted by the Ma’ay... \n", |
| 1302 | + "1 The Undergraduate Student Internship Program p... \n", |
| 1303 | + "2 In this course the LINCS DCC covers computatio... \n", |
| 1304 | + "3 The goal of this competition is to segment blo... \n", |
| 1305 | + "4 This workshop provides an opportunity to learn... \n", |
| 1306 | + "\n", |
| 1307 | + " description tags \\\n", |
| 1308 | + "0 LINCS’ Summer Research Training Program in Bio... [\"training program\"] \n", |
| 1309 | + "1 Applications will be accepted from November 27... [\"internship\"] \n", |
| 1310 | + "2 In this course the LINCS DCC introduces the da... [\"course\"] \n", |
| 1311 | + "3 The “SenNet + HOA - Hacking the Human Vasculat... [\"competition\"] \n", |
| 1312 | + "4 The purpose of this workshop is to bring toget... [\"workshop\"] \n", |
| 1313 | + "\n", |
| 1314 | + " agenda featured active start_date \\\n", |
| 1315 | + "0 True True 2024-06-03T00:00:00-04:00 \n", |
| 1316 | + "1 False True 2024-05-20T00:00:00-04:00 \n", |
| 1317 | + "2 False True \n", |
| 1318 | + "3 False True 2023-11-07T00:00:00-05:00 \n", |
| 1319 | + "4 False False 2023-08-07T00:00:00-04:00 \n", |
| 1320 | + "\n", |
| 1321 | + " end_date application_start \\\n", |
| 1322 | + "0 2024-08-09T00:00:00-04:00 \n", |
| 1323 | + "1 2024-08-16T00:00:00-04:00 2023-11-07T00:00:00-05:00 \n", |
| 1324 | + "2 \n", |
| 1325 | + "3 2024-02-06T00:00:00-05:00 \n", |
| 1326 | + "4 \n", |
| 1327 | + "\n", |
| 1328 | + " application_end \\\n", |
| 1329 | + "0 2024-02-01T00:00:00-05:00 \n", |
| 1330 | + "1 2024-02-01T00:00:00-05:00 \n", |
| 1331 | + "2 \n", |
| 1332 | + "3 2024-01-30T00:00:00-05:00 \n", |
| 1333 | + "4 \n", |
| 1334 | + "\n", |
| 1335 | + " link \\\n", |
| 1336 | + "0 https://labs.icahn.mssm.edu/maayanlab/summer-r... \n", |
| 1337 | + "1 https://hubmapconsortium.org/internship-program/ \n", |
| 1338 | + "2 https://www.coursera.org/learn/bd2k-lincs \n", |
| 1339 | + "3 https://www.kaggle.com/competitions/blood-vess... \n", |
| 1340 | + "4 https://wiki.glygen.org/GlyGen_CFDE_Workshop_S... \n", |
| 1341 | + "\n", |
| 1342 | + " image dcc carousel \\\n", |
| 1343 | + "0 https://cfde-drc.s3.amazonaws.com/assets/img/l... LINCS False \n", |
| 1344 | + "1 https://cfde-drc.s3.amazonaws.com/assets/img/h... HuBMAP False \n", |
| 1345 | + "2 https://cfde-drc.s3.amazonaws.com/assets/img/l... LINCS False \n", |
| 1346 | + "3 https://cfde-drc.s3.amazonaws.com/assets/img/b... SenNet False \n", |
| 1347 | + "4 https://cfde-drc.s3.amazonaws.com/assets/img/g... GlyGen False \n", |
| 1348 | + "\n", |
| 1349 | + " cfde_specific flyer \n", |
| 1350 | + "0 True \n", |
| 1351 | + "1 False \n", |
| 1352 | + "2 False \n", |
| 1353 | + "3 False \n", |
| 1354 | + "4 True " |
| 1355 | + ] |
| 1356 | + }, |
| 1357 | + "execution_count": 33, |
| 1358 | + "metadata": {}, |
| 1359 | + "output_type": "execute_result" |
| 1360 | + } |
| 1361 | + ], |
| 1362 | + "source": [ |
| 1363 | + "outreach = pd.read_csv('data/outreach.tsv', sep=\"\\t\")\n", |
| 1364 | + "outreach = outreach.fillna('')\n", |
| 1365 | + "outreach.head()\n" |
| 1366 | + ] |
| 1367 | + }, |
| 1368 | + { |
| 1369 | + "cell_type": "code", |
| 1370 | + "execution_count": 36, |
| 1371 | + "metadata": {}, |
| 1372 | + "outputs": [ |
| 1373 | + { |
| 1374 | + "data": { |
| 1375 | + "text/plain": [ |
| 1376 | + "'2024-05-20'" |
| 1377 | + ] |
| 1378 | + }, |
| 1379 | + "execution_count": 36, |
| 1380 | + "metadata": {}, |
| 1381 | + "output_type": "execute_result" |
| 1382 | + } |
| 1383 | + ], |
| 1384 | + "source": [ |
| 1385 | + "outreach.loc[1, 'start_date'].split('T')[0]" |
| 1386 | + ] |
| 1387 | + }, |
| 1388 | + { |
| 1389 | + "cell_type": "code", |
| 1390 | + "execution_count": 32, |
| 1391 | + "metadata": {}, |
| 1392 | + "outputs": [ |
| 1393 | + { |
| 1394 | + "data": { |
| 1395 | + "text/plain": [ |
| 1396 | + "np.int64(9)" |
| 1397 | + ] |
| 1398 | + }, |
| 1399 | + "execution_count": 32, |
| 1400 | + "metadata": {}, |
| 1401 | + "output_type": "execute_result" |
| 1402 | + } |
| 1403 | + ], |
| 1404 | + "source": [ |
| 1405 | + "(outreach.end_date == '').sum()" |
| 1406 | + ] |
| 1407 | + }, |
| 1408 | + { |
| 1409 | + "cell_type": "code", |
| 1410 | + "execution_count": 40, |
| 1411 | + "metadata": {}, |
| 1412 | + "outputs": [], |
| 1413 | + "source": [ |
| 1414 | + "for i, row in outreach.iterrows():\n", |
| 1415 | + "\tyml = {\"layout\": \"../../layouts/Outreach.astro\"}\n", |
| 1416 | + "\tdescription = ''\n", |
| 1417 | + "\tfor k,v in row.items():\n", |
| 1418 | + "\t\tif not v == '':\n", |
| 1419 | + "\t\t\tif not k == 'description':\n", |
| 1420 | + "\t\t\t\tif k == 'dcc':\n", |
| 1421 | + "\t\t\t\t\tv = v.split(\"; \")\n", |
| 1422 | + "\t\t\t\tyml[k] = v\n", |
| 1423 | + "\t\t\telse:\n", |
| 1424 | + "\t\t\t\tdescription = v\n", |
| 1425 | + "\tdate = ''\n", |
| 1426 | + "\tif \"start_date\" in yml:\n", |
| 1427 | + "\t\tdate = yml['start_date'] \n", |
| 1428 | + "\tif \"end_date\" in yml:\n", |
| 1429 | + "\t\tdate = yml['end_date'] \n", |
| 1430 | + "\n", |
| 1431 | + "\tfilename = yml[\"title\"]\n", |
| 1432 | + "\tif not date == '':\n", |
| 1433 | + "\t\tfilename = \"%s (%s)\"%(yml['title'], date.split('T')[0])\n", |
| 1434 | + "\tfilename = filename.replace(\"/\", \"-\")\n", |
| 1435 | + "\twith open('out/outreach/%s.md'%filename, 'w') as o:\n", |
| 1436 | + "\t\to.write('---\\n')\n", |
| 1437 | + "\t\to.write(yaml.dump(yml))\n", |
| 1438 | + "\t\to.write('---\\n')\n", |
| 1439 | + "\t\to.write(description)" |
| 1440 | + ] |
| 1441 | + }, |
1142 | 1442 | { |
1143 | 1443 | "cell_type": "code", |
1144 | 1444 | "execution_count": null, |
|
0 commit comments