mirror of
https://github.com/titanscouting/tra-analysis.git
synced 2025-09-07 07:27:20 +00:00
added scoreboard
This commit is contained in:
@@ -4,26 +4,16 @@
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"ename": "NameError",
|
||||
"evalue": "name 'reload' is not defined",
|
||||
"output_type": "error",
|
||||
"traceback": [
|
||||
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
|
||||
"\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)",
|
||||
"\u001b[1;32m<ipython-input-1-b21f5957e8b4>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[0;32m 4\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mcsv\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 5\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0msys\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 6\u001b[1;33m \u001b[0mreload\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0msys\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 7\u001b[0m \u001b[0msys\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0msetdefaultencoding\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'utf-8'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 8\u001b[0m \u001b[1;31m# Use a service account\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
|
||||
"\u001b[1;31mNameError\u001b[0m: name 'reload' is not defined"
|
||||
]
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import firebase_admin\n",
|
||||
"from firebase_admin import credentials\n",
|
||||
"from firebase_admin import firestore\n",
|
||||
"import csv\n",
|
||||
"import numpy as np\n",
|
||||
"# Use a service account\n",
|
||||
"cred = credentials.Certificate(r'../keys/fsk.json')\n",
|
||||
"#add your own key as this is public. email me for details\n",
|
||||
"firebase_admin.initialize_app(cred)\n",
|
||||
"\n",
|
||||
"db = firestore.client()"
|
||||
@@ -31,7 +21,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"execution_count": 2,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
@@ -52,18 +42,16 @@
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"full[0]"
|
||||
]
|
||||
"source": []
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"execution_count": 4,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"def expcsv(loc,data):\n",
|
||||
" with open(loc+'.csv', 'w', newline='') as csvfile:\n",
|
||||
" with open(loc+'.csv', 'w', newline='', encoding='utf-8') as csvfile:\n",
|
||||
" w = csv.writer(csvfile, delimiter=',', quotechar=\"\\\"\", quoting=csv.QUOTE_MINIMAL)\n",
|
||||
" for i in data:\n",
|
||||
" w.writerow(i)"
|
||||
@@ -71,7 +59,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"execution_count": 12,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
@@ -93,7 +81,7 @@
|
||||
" return data\n",
|
||||
"wn=[]\n",
|
||||
"for i in full:\n",
|
||||
" wn.append(keymatch(i))\n",
|
||||
" wn.append(np.transpose(np.array(keymatch(i))).tolist())\n",
|
||||
"for i in range(len(wn)):\n",
|
||||
" expcsv(tms[i],wn[i])"
|
||||
]
|
||||
@@ -103,14 +91,7 @@
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"keys=set([])\n",
|
||||
"keys.add('a')\n",
|
||||
"keys.add('b')\n",
|
||||
"keys.add('c')\n",
|
||||
"keys.add('d')\n",
|
||||
"list(keys)"
|
||||
]
|
||||
"source": []
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
|
Reference in New Issue
Block a user