Created
October 9, 2018 20:03
-
-
Save adam704a/adb20c5143e27806c7c7378dd70ddc25 to your computer and use it in GitHub Desktop.
remove duplicate events in DHIS2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# Event duplicate remover\n", | |
"On OCtober 9th, it was discovered that multiple events were loaded in the data base. This script will read all of the events in a then generate a call to delete the duplicates, sort of like this:\n", | |
"\n", | |
"> curl -X DELETE \"localhost/api/29/events/ID\" -u admin:district\n", | |
"\n" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 25, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"import json\n", | |
"import csv\n", | |
"import datetime\n", | |
"\n" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 51, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"59" | |
] | |
}, | |
"execution_count": 51, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"with open('duplicated_events/events-eth-ov.json') as data_file: \n", | |
" events_parsed = json.load(data_file)\n", | |
" \n", | |
"len(events_parsed['events'])" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# ok here are the events to delete" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 60, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"CEdTLEbpMK8\n", | |
"DF3m4MmFTDc\n", | |
"ftDt5o3Sxdy\n", | |
"lyLAiHsN0DV\n", | |
"TrIq80CDsLM\n", | |
"ZxjzcvYbteD\n", | |
"hTBLzV4bCIO\n", | |
"XLcB5wczS0e\n", | |
"UzPopl8FMn0\n", | |
"t0qZ57gPiE1\n", | |
"nqVOyERsF9F\n", | |
"wf7uwAqH0d2\n", | |
"QGm7O8jOkBa\n", | |
"BCk3Q4nFCfc\n", | |
"tHwxxr9zcnq\n", | |
"geH3lupaqEJ\n", | |
"MivYcYfYFMK\n", | |
"MivYcYfYFMK\n", | |
"ca0OKcMHNWu\n", | |
"ca0OKcMHNWu\n", | |
"tOHreUBv8cL\n", | |
"tOHreUBv8cL\n", | |
"nwukRzFzHFW\n", | |
"nwukRzFzHFW\n" | |
] | |
} | |
], | |
"source": [ | |
"\n", | |
"event_set = set()\n", | |
"for event in events_parsed[\"events\"]:\n", | |
" # there should only be one event for each org unit, for each year\n", | |
" event_time = datetime.datetime.strptime(event[\"eventDate\"],\"%Y-%m-%dT%H:%M:%S.%f\")\n", | |
" my_key = event[\"orgUnitName\"]+event_time.strftime(\"%Y\")\n", | |
" \n", | |
" if my_key in event_set:\n", | |
" print(event[\"event\"])\n", | |
" else:\n", | |
" event_set.add(my_key)\n", | |
" \n", | |
" # also get rid of empty events (those with not data values) \n", | |
" if len(event[\"dataValues\"]) == 0:\n", | |
" print(event[\"event\"])\n" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 61, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"237" | |
] | |
}, | |
"execution_count": 61, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"with open('duplicated_events/events-eth-lf.json') as data_file: \n", | |
" events_parsed = json.load(data_file)\n", | |
" \n", | |
"len(events_parsed['events'])" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 67, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"YgPDS3LmvfQ Kilte Awlaelo 2016-01-01T00:00:00.000\n", | |
"uq3vKzCbLpD Gimbi Rural 2016-01-01T00:00:00.000\n", | |
"OlLI6SD8dne Dano 2016-01-01T00:00:00.000\n", | |
"SpMYZsLJiPG Ambo Zuria 2016-01-01T00:00:00.000\n", | |
"TM0Mcplpb51 Seyo 2016-01-01T00:00:00.000\n", | |
"PYTRAnGAHV0 Dale Wabera 2016-01-01T00:00:00.000\n", | |
"u1L5e5EhzzB Anfilo 2016-01-01T00:00:00.000\n", | |
"qHJdAvvfI2K Amuru 2016-01-01T00:00:00.000\n", | |
"tgH8OvAZAWY Teltele 2016-01-01T00:00:00.000\n", | |
"RVzDlQIdsn8 Dugda Dawa 2016-01-01T00:00:00.000\n", | |
"pOv4hAQxAPO Rayitu 2016-01-01T00:00:00.000\n", | |
"NVMANENxsMT Lege hida 2016-01-01T00:00:00.000\n", | |
"R7eX0gBfAf2 Harana Buluk 2016-01-01T00:00:00.000\n", | |
"jpGVsAt9w2l Adama 2016-01-01T00:00:00.000\n", | |
"vMI3Bp9O6xq Kore 2016-01-01T00:00:00.000\n", | |
"LG23IYmQ2m5 Kokosa 2016-01-01T00:00:00.000\n", | |
"JN5Etw7112r Wondo 2016-01-01T00:00:00.000\n", | |
"eoYMWFdLwCd Kofele 2016-01-01T00:00:00.000\n", | |
"IQo1VNvkVD3 Tena 2016-01-01T00:00:00.000\n", | |
"wtFPo2smbIX Merti 2016-01-01T00:00:00.000\n", | |
"TQa2q6wEiVr MaoKomo 2016-01-01T00:00:00.000\n", | |
"QdjEwdvK532 Yasso 2016-01-01T00:00:00.000\n", | |
"JY0XbQujclT Sedal (Sirba Abay) 2016-01-01T00:00:00.000\n", | |
"GBjNGEXCquJ Kamashi 2016-01-01T00:00:00.000\n", | |
"F2J18jsrsxN Belo Jegonfoy 2016-01-01T00:00:00.000\n", | |
"aSkgXzv11Tt Agalometi 2016-01-01T00:00:00.000\n", | |
"McRzOnEy8qh Sherkole 2016-01-01T00:00:00.000\n", | |
"HGRFC74l53T Oda bildigilu 2016-01-01T00:00:00.000\n", | |
"znFMSnreOZ6 Menge 2016-01-01T00:00:00.000\n", | |
"HYqXdplymp7 Homosha 2016-01-01T00:00:00.000\n", | |
"rJw2ojSElC5 Assosa Town 2016-01-01T00:00:00.000\n", | |
"AWmz7oUR8Xt Asossa 2016-01-01T00:00:00.000\n", | |
"iQongdBbQoR Kilte Awlaelo 2016-01-01T00:00:00.000\n", | |
"b7hrkrQZ0eG Gimbi Rural 2016-01-01T00:00:00.000\n", | |
"e94v816pwNT Dano 2016-01-01T00:00:00.000\n", | |
"G43cy7ShUyN Ambo Zuria 2016-01-01T00:00:00.000\n", | |
"mwzasEN8k8Q Seyo 2016-01-01T00:00:00.000\n", | |
"CeNuFMo3rBU Dale Wabera 2016-01-01T00:00:00.000\n", | |
"aCWmnTw5ogl Anfilo 2016-01-01T00:00:00.000\n", | |
"Q9b5ysS9AsC Amuru 2016-01-01T00:00:00.000\n", | |
"mf2GUSbnAU2 Teltele 2016-01-01T00:00:00.000\n", | |
"ZVTxRI8KF2d Dugda Dawa 2016-01-01T00:00:00.000\n", | |
"BlWbrtkcXxt Rayitu 2016-01-01T00:00:00.000\n", | |
"I6KAFen81K5 Lege hida 2016-01-01T00:00:00.000\n", | |
"irgeN8iD45l Harana Buluk 2016-01-01T00:00:00.000\n", | |
"LmNVZJFgsHo Adama 2016-01-01T00:00:00.000\n", | |
"M2tj6hWCvJJ Kore 2016-01-01T00:00:00.000\n", | |
"q0p0LMPAFtQ Kokosa 2016-01-01T00:00:00.000\n", | |
"nF6p7QbJ1Jj Wondo 2016-01-01T00:00:00.000\n", | |
"Ms2ZfhmjAjW Kofele 2016-01-01T00:00:00.000\n", | |
"J9UjMvU5gnZ Tena 2016-01-01T00:00:00.000\n", | |
"obkrXYXr2rx Merti 2016-01-01T00:00:00.000\n", | |
"CVATC9PNwhv MaoKomo 2016-01-01T00:00:00.000\n", | |
"oJdGCcbZsss Yasso 2016-01-01T00:00:00.000\n", | |
"JAkEKymbevZ Sedal (Sirba Abay) 2016-01-01T00:00:00.000\n", | |
"WK54dU7mIXi Kamashi 2016-01-01T00:00:00.000\n", | |
"U1fxlw02JXJ Belo Jegonfoy 2016-01-01T00:00:00.000\n", | |
"uY5cAA8FMUU Agalometi 2016-01-01T00:00:00.000\n", | |
"CNOqvV75uPX Sherkole 2016-01-01T00:00:00.000\n", | |
"itqqZS0Q4NV Oda bildigilu 2016-01-01T00:00:00.000\n", | |
"Od0BFAT7rqs Menge 2016-01-01T00:00:00.000\n", | |
"DY5l7v2CcnW Homosha 2016-01-01T00:00:00.000\n", | |
"Or5oSA16MN8 Assosa Town 2016-01-01T00:00:00.000\n", | |
"UX985DOPzNA Asossa 2016-01-01T00:00:00.000\n", | |
"QcIryyHTkM7 Kilte Awlaelo 2016-01-01T00:00:00.000\n", | |
"bE7hBMly8uT Gimbi Rural 2016-01-01T00:00:00.000\n", | |
"xZIVMpI511Y Dano 2016-01-01T00:00:00.000\n", | |
"TmdfYv9mMkQ Ambo Zuria 2016-01-01T00:00:00.000\n", | |
"IXGO21kMsDk Seyo 2016-01-01T00:00:00.000\n", | |
"vE8RPgg3fFS Dale Wabera 2016-01-01T00:00:00.000\n", | |
"WA2GexQcaoV Anfilo 2016-01-01T00:00:00.000\n", | |
"C3J1nha1DcZ Amuru 2016-01-01T00:00:00.000\n", | |
"rwBllPYfftp Teltele 2016-01-01T00:00:00.000\n", | |
"BCaFeecm4QT Dugda Dawa 2016-01-01T00:00:00.000\n", | |
"PmGRC95rGG3 Rayitu 2016-01-01T00:00:00.000\n", | |
"bYlrXQGnBjo Lege hida 2016-01-01T00:00:00.000\n", | |
"QmtsU04zZsJ Harana Buluk 2016-01-01T00:00:00.000\n", | |
"lUq3Azni1Vn Adama 2016-01-01T00:00:00.000\n", | |
"LzXGK0f6pbO Kore 2016-01-01T00:00:00.000\n", | |
"jN12LLe1aTN Kokosa 2016-01-01T00:00:00.000\n", | |
"I2tDCh8kOiM Wondo 2016-01-01T00:00:00.000\n", | |
"S3gvfh1vYpc Kofele 2016-01-01T00:00:00.000\n", | |
"r1GV1883CWz Tena 2016-01-01T00:00:00.000\n", | |
"qWxWFJasU4y Merti 2016-01-01T00:00:00.000\n", | |
"CTcQTLFHw7N MaoKomo 2016-01-01T00:00:00.000\n", | |
"UrSOVAfa2Az Yasso 2016-01-01T00:00:00.000\n", | |
"pM92JZ0EEk5 Sedal (Sirba Abay) 2016-01-01T00:00:00.000\n", | |
"qKk69CeLadx Kamashi 2016-01-01T00:00:00.000\n", | |
"bWQRsTLYkYS Belo Jegonfoy 2016-01-01T00:00:00.000\n", | |
"Ki8lcBy7EUD Agalometi 2016-01-01T00:00:00.000\n", | |
"wdpzCxv1MkB Sherkole 2016-01-01T00:00:00.000\n", | |
"h04wRYwdk0i Oda bildigilu 2016-01-01T00:00:00.000\n", | |
"wAqteQirHA4 Menge 2016-01-01T00:00:00.000\n", | |
"irN1UVVVcZW Homosha 2016-01-01T00:00:00.000\n", | |
"fsqCjdSCXq1 Assosa Town 2016-01-01T00:00:00.000\n", | |
"t99pLbFN8Uo Asossa 2016-01-01T00:00:00.000\n", | |
"yx7gam4Prgh Kilte Awlaelo 2016-01-01T00:00:00.000\n", | |
"MMtef8rbJgx Gimbi Rural 2016-01-01T00:00:00.000\n", | |
"Q86rWJPBu8i Dano 2016-01-01T00:00:00.000\n", | |
"OpT3nUhslV6 Ambo Zuria 2016-01-01T00:00:00.000\n", | |
"vDqvKiTWs8v Seyo 2016-01-01T00:00:00.000\n", | |
"wVDvRp50g7q Dale Wabera 2016-01-01T00:00:00.000\n", | |
"prAY7YMkzWZ Anfilo 2016-01-01T00:00:00.000\n", | |
"Dc6QWbJEc54 Amuru 2016-01-01T00:00:00.000\n", | |
"t9yP0W94loz Teltele 2016-01-01T00:00:00.000\n", | |
"WuHJ8k8wdeN Dugda Dawa 2016-01-01T00:00:00.000\n", | |
"NALJkysg4Xv Rayitu 2016-01-01T00:00:00.000\n", | |
"twkYVfq7VAq Lege hida 2016-01-01T00:00:00.000\n", | |
"i7ed08ekkk4 Harana Buluk 2016-01-01T00:00:00.000\n", | |
"zwf5lpPwzG8 Adama 2016-01-01T00:00:00.000\n", | |
"Zp4RQ6QeybK Kore 2016-01-01T00:00:00.000\n", | |
"BESMD86wnRz Kokosa 2016-01-01T00:00:00.000\n", | |
"qOpTkuALj2l Wondo 2016-01-01T00:00:00.000\n", | |
"jvWCf0OBjo0 Kofele 2016-01-01T00:00:00.000\n", | |
"F8NarNfwWb1 Tena 2016-01-01T00:00:00.000\n", | |
"AoeHQIRvzhH Merti 2016-01-01T00:00:00.000\n", | |
"F8Z1IzHyxYk MaoKomo 2016-01-01T00:00:00.000\n", | |
"xqAvyDfBdMG Yasso 2016-01-01T00:00:00.000\n", | |
"RDE9Ps1x905 Sedal (Sirba Abay) 2016-01-01T00:00:00.000\n", | |
"noKMXMVCXj7 Kamashi 2016-01-01T00:00:00.000\n", | |
"VF2bmLufw0r Belo Jegonfoy 2016-01-01T00:00:00.000\n", | |
"PLlsxfTuFBv Agalometi 2016-01-01T00:00:00.000\n", | |
"NCx9GsVdsNJ Sherkole 2016-01-01T00:00:00.000\n", | |
"QxxQgPbjytu Oda bildigilu 2016-01-01T00:00:00.000\n", | |
"rtPzIT2Tonb Menge 2016-01-01T00:00:00.000\n", | |
"LX0JlVoKl8o Homosha 2016-01-01T00:00:00.000\n", | |
"TjpSJXDmKEt Assosa Town 2016-01-01T00:00:00.000\n", | |
"mLvozuESpfg Asossa 2016-01-01T00:00:00.000\n", | |
"rs9jM2nAB3T Asossa 2016-01-01T00:00:00.000\n" | |
] | |
} | |
], | |
"source": [ | |
"event_set = set()\n", | |
"duplicate_ones = set()\n", | |
"for event in events_parsed[\"events\"]:\n", | |
" # there should only be one event for each org unit, for each year\n", | |
" event_time = datetime.datetime.strptime(event[\"eventDate\"],\"%Y-%m-%dT%H:%M:%S.%f\")\n", | |
" my_key = event[\"orgUnitName\"]+event_time.strftime(\"%Y\")\n", | |
" \n", | |
" if my_key in event_set:\n", | |
" #print(event[\"event\"])\n", | |
" duplicate_ones.add(event[\"event\"])\n", | |
" print(event[\"event\"] + ' '+ event[\"orgUnitName\"] + ' ' + event[\"eventDate\"])\n", | |
" else:\n", | |
" event_set.add(my_key)\n", | |
" \n", | |
" # also get rid of empty events (those with not data values) \n", | |
" if len(event[\"dataValues\"]) == 0:\n", | |
" duplicate_ones.add(event[\"event\"])" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# wait\n", | |
"ok this is going to take too long to do by hand, which is what i did last time. Instead So I will print the curl command out and i'll slap it in a shell file then run\n", | |
"\n", | |
"> curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/nwukRzFzHFW \n", | |
"\n" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 75, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/WA2GexQcaoV\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/HGRFC74l53T\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/oJdGCcbZsss\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/LzXGK0f6pbO\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/qWxWFJasU4y\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/vE8RPgg3fFS\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/uq3vKzCbLpD\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/BCaFeecm4QT\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/UrSOVAfa2Az\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/CVATC9PNwhv\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/xZIVMpI511Y\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/qOpTkuALj2l\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/vDqvKiTWs8v\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/prAY7YMkzWZ\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/BESMD86wnRz\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/GBjNGEXCquJ\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/QcIryyHTkM7\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/NALJkysg4Xv\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/IXGO21kMsDk\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/PYTRAnGAHV0\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/twkYVfq7VAq\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/BlWbrtkcXxt\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/t99pLbFN8Uo\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/i7ed08ekkk4\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/rwBllPYfftp\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/YgPDS3LmvfQ\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/I2tDCh8kOiM\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/b7hrkrQZ0eG\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/Q86rWJPBu8i\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/QxxQgPbjytu\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/h04wRYwdk0i\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/xqAvyDfBdMG\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/q0p0LMPAFtQ\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/TjpSJXDmKEt\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/jN12LLe1aTN\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/HYqXdplymp7\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/jvWCf0OBjo0\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/yx7gam4Prgh\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/McRzOnEy8qh\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/bE7hBMly8uT\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/VF2bmLufw0r\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/mf2GUSbnAU2\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/eoYMWFdLwCd\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/JN5Etw7112r\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/LG23IYmQ2m5\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/aCWmnTw5ogl\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/AoeHQIRvzhH\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/J9UjMvU5gnZ\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/AWmz7oUR8Xt\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/t9yP0W94loz\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/JY0XbQujclT\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/itqqZS0Q4NV\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/rs9jM2nAB3T\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/LmNVZJFgsHo\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/U1fxlw02JXJ\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/WuHJ8k8wdeN\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/CNOqvV75uPX\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/SpMYZsLJiPG\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/CeNuFMo3rBU\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/F2J18jsrsxN\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/F8Z1IzHyxYk\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/JAkEKymbevZ\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/NVMANENxsMT\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/fsqCjdSCXq1\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/R7eX0gBfAf2\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/wdpzCxv1MkB\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/CTcQTLFHw7N\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/I6KAFen81K5\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/Od0BFAT7rqs\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/pM92JZ0EEk5\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/wVDvRp50g7q\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/irN1UVVVcZW\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/rtPzIT2Tonb\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/M2tj6hWCvJJ\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/G43cy7ShUyN\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/bYlrXQGnBjo\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/UX985DOPzNA\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/Or5oSA16MN8\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/ZVTxRI8KF2d\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/r1GV1883CWz\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/RDE9Ps1x905\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/mLvozuESpfg\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/wAqteQirHA4\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/OlLI6SD8dne\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/MMtef8rbJgx\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/vMI3Bp9O6xq\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/iQongdBbQoR\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/PLlsxfTuFBv\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/u1L5e5EhzzB\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/bWQRsTLYkYS\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/S3gvfh1vYpc\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/TQa2q6wEiVr\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/e94v816pwNT\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/obkrXYXr2rx\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/C3J1nha1DcZ\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/jpGVsAt9w2l\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/noKMXMVCXj7\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/aSkgXzv11Tt\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/NCx9GsVdsNJ\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/DY5l7v2CcnW\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/tgH8OvAZAWY\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/lUq3Azni1Vn\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/QmtsU04zZsJ\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/qKk69CeLadx\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/irgeN8iD45l\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/Zp4RQ6QeybK\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/F8NarNfwWb1\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/TM0Mcplpb51\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/rJw2ojSElC5\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/qHJdAvvfI2K\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/RVzDlQIdsn8\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/pOv4hAQxAPO\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/Q9b5ysS9AsC\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/PmGRC95rGG3\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/Dc6QWbJEc54\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/OpT3nUhslV6\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/mwzasEN8k8Q\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/LX0JlVoKl8o\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/Ms2ZfhmjAjW\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/uY5cAA8FMUU\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/WK54dU7mIXi\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/nF6p7QbJ1Jj\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/wtFPo2smbIX\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/QdjEwdvK532\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/TmdfYv9mMkQ\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/IQo1VNvkVD3\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/znFMSnreOZ6\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/Ki8lcBy7EUD\n", | |
"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/zwf5lpPwzG8\n" | |
] | |
} | |
], | |
"source": [ | |
"for event_id in duplicate_ones:\n", | |
" print(\"curl -X DELETE https://ethntd.rti-ghd.org/api/29/events/\"+event_id)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 70, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"129" | |
] | |
}, | |
"execution_count": 70, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"len(duplicate_ones)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 73, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"{'Abay Comen2015',\n", | |
" 'Abe Dongoro2015',\n", | |
" 'Aboker2015',\n", | |
" 'Adama2015',\n", | |
" 'Adama2016',\n", | |
" 'Adama2017',\n", | |
" 'Adwa2015',\n", | |
" 'Agalometi2016',\n", | |
" 'Agalometi2017',\n", | |
" 'Ambo Zuria2015',\n", | |
" 'Ambo Zuria2016',\n", | |
" 'Ambo Zuria2017',\n", | |
" 'Amuru2016',\n", | |
" 'Amuru2017',\n", | |
" 'Aneded2015',\n", | |
" 'Anfilo2016',\n", | |
" 'Anfilo2017',\n", | |
" 'Arbegona2015',\n", | |
" 'Asossa2016',\n", | |
" 'Asossa2017',\n", | |
" 'Assosa Town2016',\n", | |
" 'Assosa Town2017',\n", | |
" 'Atsibi Wonberta2015',\n", | |
" 'Basoliben2015',\n", | |
" 'Belo Jegonfoy2016',\n", | |
" 'Belo Jegonfoy2017',\n", | |
" 'Bensa2015',\n", | |
" 'Bule Hora2015',\n", | |
" 'Chora Botor2015',\n", | |
" 'Dale Wabera2016',\n", | |
" 'Dale Wabera2017',\n", | |
" 'Dangila2015',\n", | |
" 'Dano2016',\n", | |
" 'Dano2017',\n", | |
" 'Dawo2015',\n", | |
" 'Demba Gofa2015',\n", | |
" 'Dugda Dawa2016',\n", | |
" 'Dugda Dawa2017',\n", | |
" 'Ebinat2015',\n", | |
" 'Efratanagidem2015',\n", | |
" 'Enarje Enawuga2015',\n", | |
" 'Erebti2015',\n", | |
" 'Fogera2015',\n", | |
" 'Gida Ayyana2015',\n", | |
" 'Gimbi Rural2016',\n", | |
" 'Gimbi Rural2017',\n", | |
" 'Goro2015',\n", | |
" 'Guangua2015',\n", | |
" 'Guradamole2015',\n", | |
" 'Harana Buluk2016',\n", | |
" 'Harana Buluk2017',\n", | |
" 'Hawzien2015',\n", | |
" 'Homosha2016',\n", | |
" 'Homosha2017',\n", | |
" 'Hulbarg2015',\n", | |
" 'Jabi Tehinan2015',\n", | |
" 'Kamashi2016',\n", | |
" 'Kamashi2017',\n", | |
" 'Kebena2015',\n", | |
" 'Kilte Awlaelo2016',\n", | |
" 'Kilte Awlaelo2017',\n", | |
" 'Kofele2016',\n", | |
" 'Kofele2017',\n", | |
" 'Kokosa2015',\n", | |
" 'Kokosa2016',\n", | |
" 'Kokosa2017',\n", | |
" 'Kore2015',\n", | |
" 'Kore2016',\n", | |
" 'Kore2017',\n", | |
" 'Lege hida2016',\n", | |
" 'Lege hida2017',\n", | |
" 'MaoKomo2016',\n", | |
" 'MaoKomo2017',\n", | |
" 'Menge2016',\n", | |
" 'Menge2017',\n", | |
" 'Merhabete2015',\n", | |
" 'Merti2016',\n", | |
" 'Merti2017',\n", | |
" 'Miyo2015',\n", | |
" 'Moretnajiru2015',\n", | |
" 'Oda bildigilu2016',\n", | |
" 'Oda bildigilu2017',\n", | |
" 'Rayitu2016',\n", | |
" 'Rayitu2017',\n", | |
" 'Sawena2015',\n", | |
" 'SawlaT2015',\n", | |
" 'Sedal (Sirba Abay)2016',\n", | |
" 'Sedal (Sirba Abay)2017',\n", | |
" 'Seyo2016',\n", | |
" 'Seyo2017',\n", | |
" 'Sherkole2016',\n", | |
" 'Sherkole2017',\n", | |
" 'Sibu Sire2015',\n", | |
" 'Simada2015',\n", | |
" 'South Aari2015',\n", | |
" 'Sululta2015',\n", | |
" 'Tach Gaint2015',\n", | |
" 'Teltele2016',\n", | |
" 'Teltele2017',\n", | |
" 'Tena2015',\n", | |
" 'Tena2016',\n", | |
" 'Tena2017',\n", | |
" 'Wendo Genet2015',\n", | |
" 'Wondo2016',\n", | |
" 'Wondo2017',\n", | |
" 'Yabello Town2015',\n", | |
" 'Yasso2016',\n", | |
" 'Yasso2017'}" | |
] | |
}, | |
"execution_count": 73, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"event_set" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Python 3", | |
"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.6.0" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment