diff --git a/build/Dockerfile b/build/Dockerfile index a6f0deb..e632d84 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -1,6 +1,6 @@ FROM redis:8.6.1 -RUN apt update && apt install -y --no-install-recommends gettext && apt clean && rm -rf /var/lib/apt/lists/* +RUN apt update && apt install -y --no-install-recommends gettext dnsutils && apt clean && rm -rf /var/lib/apt/lists/* ADD ./entrypoint.sh /entrypoint.sh ENTRYPOINT [ "/entrypoint.sh" ] diff --git a/build/entrypoint.sh b/build/entrypoint.sh old mode 100644 new mode 100755 index 4321ba7..7a50cea --- a/build/entrypoint.sh +++ b/build/entrypoint.sh @@ -1,6 +1,10 @@ #!/bin/sh set -e +export CONTAINER_NAME=$(dig -x "$(hostname -i)" +short | cut -d . -f 1) +mkdir -p /data/$CONTAINER_NAME +cd /data/$CONTAINER_NAME + if [ "${1%.tmpl}" != "$1" ]; then cat "$1" | envsubst > /etc/redis.conf set -- /etc/redis.conf diff --git a/compose.yml b/compose.yml index 8ddf0cf..6ca9b8e 100644 --- a/compose.yml +++ b/compose.yml @@ -4,9 +4,9 @@ services: ports: - 5540:5540 redis: - image: redis:8.6.1 + image: golyalpha/redis:8.6.1 build: ./build - command: ["/conf/redis.conf"] + command: ["/conf/redis.conf.tmpl"] healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 1m30s @@ -15,7 +15,7 @@ services: start_period: 30s volumes: - ./conf:/conf:ro - - /data + - redis_data:/data expose: - 6379 - 16379 @@ -38,3 +38,6 @@ services: userns_mode: keep-id volumes: - ./notebooks:/home/jovyan + +volumes: + redis_data: diff --git a/conf/redis.conf b/conf/redis.conf.tmpl similarity index 86% rename from conf/redis.conf rename to conf/redis.conf.tmpl index 4537a79..4675d13 100644 --- a/conf/redis.conf +++ b/conf/redis.conf.tmpl @@ -1,4 +1,4 @@ -dir /data/ +dir /data/${CONTAINER_NAME}/ aclfile /conf/users.acl diff --git a/notebooks/fill_test.ipynb b/notebooks/fill_test.ipynb index 6749d6d..51b14ba 100644 --- a/notebooks/fill_test.ipynb +++ b/notebooks/fill_test.ipynb @@ -2,39 +2,17 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "id": "05c0de49-0eb8-4cd2-89b2-c312111dda85", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Requirement already satisfied: redis in /opt/conda/lib/python3.13/site-packages (7.4.0)\n", - "Requirement already satisfied: hiredis in /opt/conda/lib/python3.13/site-packages (3.3.1)\n", - "Requirement already satisfied: fastid in /opt/conda/lib/python3.13/site-packages (0.0.5)\n", - "Requirement already satisfied: tqdm in /opt/conda/lib/python3.13/site-packages (4.67.3)\n", - "Requirement already satisfied: kagglehub in /opt/conda/lib/python3.13/site-packages (1.0.0)\n", - "Requirement already satisfied: kagglesdk<1.0,>=0.1.14 in /opt/conda/lib/python3.13/site-packages (from kagglehub) (0.1.16)\n", - "Requirement already satisfied: packaging in /opt/conda/lib/python3.13/site-packages (from kagglehub) (26.0)\n", - "Requirement already satisfied: pyyaml in /opt/conda/lib/python3.13/site-packages (from kagglehub) (6.0.3)\n", - "Requirement already satisfied: requests in /opt/conda/lib/python3.13/site-packages (from kagglehub) (2.32.5)\n", - "Requirement already satisfied: protobuf in /opt/conda/lib/python3.13/site-packages (from kagglesdk<1.0,>=0.1.14->kagglehub) (6.33.5)\n", - "Requirement already satisfied: charset_normalizer<4,>=2 in /opt/conda/lib/python3.13/site-packages (from requests->kagglehub) (3.4.6)\n", - "Requirement already satisfied: idna<4,>=2.5 in /opt/conda/lib/python3.13/site-packages (from requests->kagglehub) (3.11)\n", - "Requirement already satisfied: urllib3<3,>=1.21.1 in /opt/conda/lib/python3.13/site-packages (from requests->kagglehub) (2.6.3)\n", - "Requirement already satisfied: certifi>=2017.4.17 in /opt/conda/lib/python3.13/site-packages (from requests->kagglehub) (2026.2.25)\n", - "Note: you may need to restart the kernel to use updated packages.\n" - ] - } - ], + "outputs": [], "source": [ "%pip install redis hiredis fastid tqdm kagglehub" ] }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "id": "90326242-f141-4035-9053-d3aab6cc9224", "metadata": {}, "outputs": [], @@ -49,25 +27,10 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "id": "50b9f473-8924-4d03-acf8-71ecf25e54a8", "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "887890574a2048a587b6ed4dd8eef7c6", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - " 0%| | 0/1000000 [00:00\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
GSG9-JAGERSWAT-ASHSAT-HIBANAGSG9-BANDITGIGN-TWITCHSWAT-THERMITESPETSNAZ-FUZEBOPE-CAVEIRAG.E.O.-JACKALNAVYSEAL-VALKYRIE...GSG9-IQGIGN-MONTAGNESAT-ECHOGSG9-BLITZGSG9-RESERVESPETSNAZ-TACHANKASAS-RESERVESWAT-RESERVEGIGN-RESERVESPETSNAZ-RESERVE
total_kills5522544638253802357734413336329331352926...10277777754253862021831128984
total_rounds6999651949605257489450014222458640914319...157018801207782618436375206173145
won_rounds3535337025862684255326032164232121402177...785953634376317196159977865
dead_rounds5127455532943833318033942929336228503150...11281284775585468329297151122107
survival_rate0.2674667809690.3012732014110.3358870967740.2708769260030.3502247650180.3213357328530.3062529606820.2668992586130.3033488144710.270664505673...0.281528662420.3170212765960.3579121789560.2519181585680.2427184466020.2454128440370.2080.2669902912620.2947976878610.262068965517
win_rate0.5050721531650.5169504525230.5213709677420.5105573521020.5216591744990.520495900820.5125532922790.5061055385960.5230994866780.504051863857...0.50.5069148936170.5252692626350.4808184143220.5129449838190.4495412844040.4240.4708737864080.4508670520230.448275862069
\n", - "

6 rows × 35 columns

\n", - "" - ], - "text/plain": [ - " GSG9-JAGER SWAT-ASH SAT-HIBANA GSG9-BANDIT \\\n", - "total_kills 5522 5446 3825 3802 \n", - "total_rounds 6999 6519 4960 5257 \n", - "won_rounds 3535 3370 2586 2684 \n", - "dead_rounds 5127 4555 3294 3833 \n", - "survival_rate 0.267466780969 0.301273201411 0.335887096774 0.270876926003 \n", - "win_rate 0.505072153165 0.516950452523 0.521370967742 0.510557352102 \n", - "\n", - " GIGN-TWITCH SWAT-THERMITE SPETSNAZ-FUZE BOPE-CAVEIRA \\\n", - "total_kills 3577 3441 3336 3293 \n", - "total_rounds 4894 5001 4222 4586 \n", - "won_rounds 2553 2603 2164 2321 \n", - "dead_rounds 3180 3394 2929 3362 \n", - "survival_rate 0.350224765018 0.321335732853 0.306252960682 0.266899258613 \n", - "win_rate 0.521659174499 0.52049590082 0.512553292279 0.506105538596 \n", - "\n", - " G.E.O.-JACKAL NAVYSEAL-VALKYRIE ... GSG9-IQ \\\n", - "total_kills 3135 2926 ... 1027 \n", - "total_rounds 4091 4319 ... 1570 \n", - "won_rounds 2140 2177 ... 785 \n", - "dead_rounds 2850 3150 ... 1128 \n", - "survival_rate 0.303348814471 0.270664505673 ... 0.28152866242 \n", - "win_rate 0.523099486678 0.504051863857 ... 0.5 \n", - "\n", - " GIGN-MONTAGNE SAT-ECHO GSG9-BLITZ GSG9-RESERVE \\\n", - "total_kills 777 775 425 386 \n", - "total_rounds 1880 1207 782 618 \n", - "won_rounds 953 634 376 317 \n", - "dead_rounds 1284 775 585 468 \n", - "survival_rate 0.317021276596 0.357912178956 0.251918158568 0.242718446602 \n", - "win_rate 0.506914893617 0.525269262635 0.480818414322 0.512944983819 \n", - "\n", - " SPETSNAZ-TACHANKA SAS-RESERVE SWAT-RESERVE GIGN-RESERVE \\\n", - "total_kills 202 183 112 89 \n", - "total_rounds 436 375 206 173 \n", - "won_rounds 196 159 97 78 \n", - "dead_rounds 329 297 151 122 \n", - "survival_rate 0.245412844037 0.208 0.266990291262 0.294797687861 \n", - "win_rate 0.449541284404 0.424 0.470873786408 0.450867052023 \n", - "\n", - " SPETSNAZ-RESERVE \n", - "total_kills 84 \n", - "total_rounds 145 \n", - "won_rounds 65 \n", - "dead_rounds 107 \n", - "survival_rate 0.262068965517 \n", - "win_rate 0.448275862069 \n", - "\n", - "[6 rows x 35 columns]" - ] - }, - "execution_count": 2, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "query = (AggregateRequest( # pyright: ignore[reportUnknownMemberType,reportUnknownVariableType, reportAssignmentType]\n", " \"*\"\n", @@ -348,182 +97,10 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": null, "id": "task2-weapons", "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
416-C CARBINEL85A2MP7R4-C556XITYPE-89UMP45MP5F2MPX...SPAS-12SASG-12HK417SUPER 90SG-CQBSuperNovaSR-25G8A1M249ITA12L
primaryweapon416-C CARBINEL85A2MP7R4-C556XITYPE-89UMP45MP5F2MPX...SPAS-12SASG-12HK417SUPER 90SG-CQBSuperNovaSR-25G8A1M249ITA12L
total_kills5541376737904209341837743053293733842564...3622542102361871721731179468
times_used7005537152164993496448844726469345273794...525468404358346296239198160141
wins3535283326682572258225542348241423791934...243215194192156134118998768
\n", - "

4 rows × 46 columns

\n", - "
" - ], - "text/plain": [ - " 416-C CARBINE L85A2 MP7 R4-C 556XI TYPE-89 UMP45 MP5 \\\n", - "primaryweapon 416-C CARBINE L85A2 MP7 R4-C 556XI TYPE-89 UMP45 MP5 \n", - "total_kills 5541 3767 3790 4209 3418 3774 3053 2937 \n", - "times_used 7005 5371 5216 4993 4964 4884 4726 4693 \n", - "wins 3535 2833 2668 2572 2582 2554 2348 2414 \n", - "\n", - " F2 MPX ... SPAS-12 SASG-12 HK417 SUPER 90 SG-CQB \\\n", - "primaryweapon F2 MPX ... SPAS-12 SASG-12 HK417 SUPER 90 SG-CQB \n", - "total_kills 3384 2564 ... 362 254 210 236 187 \n", - "times_used 4527 3794 ... 525 468 404 358 346 \n", - "wins 2379 1934 ... 243 215 194 192 156 \n", - "\n", - " SuperNova SR-25 G8A1 M249 ITA12L \n", - "primaryweapon SuperNova SR-25 G8A1 M249 ITA12L \n", - "total_kills 172 173 117 94 68 \n", - "times_used 296 239 198 160 141 \n", - "wins 134 118 99 87 68 \n", - "\n", - "[4 rows x 46 columns]" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "query = (AggregateRequest( # pyright: ignore[reportUnknownMemberType,reportUnknownVariableType, reportAssignmentType]\n", " \"*\"\n", @@ -561,160 +138,10 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": null, "id": "task3-maps", "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
SKYSCRAPEROREGONKAFE DOSTOYEVSKYBORDERHEREFORD BASECHALETYACHTHOUSEPLANEKANALFAVELASCOASTLINECONSULATEBANKCLUB HOUSEBARTLETT U.
mapnameSKYSCRAPEROREGONKAFE DOSTOYEVSKYBORDERHEREFORD BASECHALETYACHTHOUSEPLANEKANALFAVELASCOASTLINECONSULATEBANKCLUB HOUSEBARTLETT U.
total_rounds7459736773176970679767726576657264616149605758125792576755955235
won_rounds3789376137323547345234493347333333003114308929412981294728372656
round_duration180.164097064187.90946111189.810714774179.218077475183.516698543180.794595393180.983880779179.114120511186.111437858188.070255326170.701337296183.439779766187.277106354192.193341425187.16997319191.232473734
\n", - "
" - ], - "text/plain": [ - " SKYSCRAPER OREGON KAFE DOSTOYEVSKY BORDER \\\n", - "mapname SKYSCRAPER OREGON KAFE DOSTOYEVSKY BORDER \n", - "total_rounds 7459 7367 7317 6970 \n", - "won_rounds 3789 3761 3732 3547 \n", - "round_duration 180.164097064 187.90946111 189.810714774 179.218077475 \n", - "\n", - " HEREFORD BASE CHALET YACHT HOUSE \\\n", - "mapname HEREFORD BASE CHALET YACHT HOUSE \n", - "total_rounds 6797 6772 6576 6572 \n", - "won_rounds 3452 3449 3347 3333 \n", - "round_duration 183.516698543 180.794595393 180.983880779 179.114120511 \n", - "\n", - " PLANE KANAL FAVELAS COASTLINE \\\n", - "mapname PLANE KANAL FAVELAS COASTLINE \n", - "total_rounds 6461 6149 6057 5812 \n", - "won_rounds 3300 3114 3089 2941 \n", - "round_duration 186.111437858 188.070255326 170.701337296 183.439779766 \n", - "\n", - " CONSULATE BANK CLUB HOUSE BARTLETT U. \n", - "mapname CONSULATE BANK CLUB HOUSE BARTLETT U. \n", - "total_rounds 5792 5767 5595 5235 \n", - "won_rounds 2981 2947 2837 2656 \n", - "round_duration 187.277106354 192.193341425 187.16997319 191.232473734 " - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "query = (AggregateRequest( # pyright: ignore[reportUnknownMemberType,reportUnknownVariableType, reportAssignmentType]\n", " \"*\"\n", @@ -741,84 +168,10 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": null, "id": "task3-gamemode", "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
PvP  SECURE AREAPvP  BOMBPvP  HOSTAGE
gamemodePvP  SECURE AREAPvP  BOMBPvP  HOSTAGE
total_rounds660342587210792
won_rounds33582131835510
total_kills46375183647275
round_duration183.826771057185.54363791182.205707932
\n", - "
" - ], - "text/plain": [ - " PvP SECURE AREA PvP BOMB PvP HOSTAGE\n", - "gamemode PvP SECURE AREA PvP BOMB PvP HOSTAGE\n", - "total_rounds 66034 25872 10792\n", - "won_rounds 33582 13183 5510\n", - "total_kills 46375 18364 7275\n", - "round_duration 183.826771057 185.54363791 182.205707932" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "query = (AggregateRequest( # pyright: ignore[reportUnknownMemberType,reportUnknownVariableType, reportAssignmentType]\n", " \"*\"\n", @@ -857,127 +210,10 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": null, "id": "task4-ranks", "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
GoldSilverCopperBronzePlatinumUnrankedDiamond
skillrankGoldSilverCopperBronzePlatinumUnrankedDiamond
total_rounds35770202711399613611115676797686
won_rounds18523103956959687059463174408
total_kills26270138049014906293623856646
total_deaths25039142979912965680784987431
round_duration187.55789768183.711558384173.63875393180.108809052190.132013487185.866411652187.030612245
\n", - "
" - ], - "text/plain": [ - " Gold Silver Copper Bronze \\\n", - "skillrank Gold Silver Copper Bronze \n", - "total_rounds 35770 20271 13996 13611 \n", - "won_rounds 18523 10395 6959 6870 \n", - "total_kills 26270 13804 9014 9062 \n", - "total_deaths 25039 14297 9912 9656 \n", - "round_duration 187.55789768 183.711558384 173.63875393 180.108809052 \n", - "\n", - " Platinum Unranked Diamond \n", - "skillrank Platinum Unranked Diamond \n", - "total_rounds 11567 6797 686 \n", - "won_rounds 5946 3174 408 \n", - "total_kills 9362 3856 646 \n", - "total_deaths 8078 4987 431 \n", - "round_duration 190.132013487 185.866411652 187.030612245 " - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "query = (AggregateRequest( # pyright: ignore[reportUnknownMemberType,reportUnknownVariableType, reportAssignmentType]\n", " \"*\"\n", @@ -1016,223 +252,10 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": null, "id": "task5-pivot", "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
GSG9-JAGERSWAT-ASHGSG9-BANDITSWAT-THERMITESAT-HIBANAGIGN-TWITCHBOPE-CAVEIRANAVYSEAL-VALKYRIESPETSNAZ-FUZEG.E.O.-JACKAL...GSG9-IQBOPE-CAPITAOSAT-ECHOGSG9-BLITZSPETSNAZ-TACHANKAGSG9-RESERVESAS-RESERVESWAT-RESERVEGIGN-RESERVESPETSNAZ-RESERVE
roleDefenderAttackerDefenderAttackerAttackerAttackerDefenderDefenderAttackerAttacker...AttackerAttackerDefenderAttackerDefenderAttackerAttackerDefenderAttackerDefender
operatorGSG9-JAGERSWAT-ASHGSG9-BANDITSWAT-THERMITESAT-HIBANAGIGN-TWITCHBOPE-CAVEIRANAVYSEAL-VALKYRIESPETSNAZ-FUZEG.E.O.-JACKAL...GSG9-IQBOPE-CAPITAOSAT-ECHOGSG9-BLITZSPETSNAZ-TACHANKAGSG9-RESERVESAS-RESERVESWAT-RESERVEGIGN-RESERVESPETSNAZ-RESERVE
total_rounds6999651952575001496048944586431942224091...157015541207782436219165847770
total_kills5522544638023441382535773293292633363135...1027108277542520213991454237
total_deaths5127455538333394329431803362315029292850...11281105775585329162119664957
\n", - "

5 rows × 35 columns

\n", - "
" - ], - "text/plain": [ - " GSG9-JAGER SWAT-ASH GSG9-BANDIT SWAT-THERMITE SAT-HIBANA \\\n", - "role Defender Attacker Defender Attacker Attacker \n", - "operator GSG9-JAGER SWAT-ASH GSG9-BANDIT SWAT-THERMITE SAT-HIBANA \n", - "total_rounds 6999 6519 5257 5001 4960 \n", - "total_kills 5522 5446 3802 3441 3825 \n", - "total_deaths 5127 4555 3833 3394 3294 \n", - "\n", - " GIGN-TWITCH BOPE-CAVEIRA NAVYSEAL-VALKYRIE SPETSNAZ-FUZE \\\n", - "role Attacker Defender Defender Attacker \n", - "operator GIGN-TWITCH BOPE-CAVEIRA NAVYSEAL-VALKYRIE SPETSNAZ-FUZE \n", - "total_rounds 4894 4586 4319 4222 \n", - "total_kills 3577 3293 2926 3336 \n", - "total_deaths 3180 3362 3150 2929 \n", - "\n", - " G.E.O.-JACKAL ... GSG9-IQ BOPE-CAPITAO SAT-ECHO \\\n", - "role Attacker ... Attacker Attacker Defender \n", - "operator G.E.O.-JACKAL ... GSG9-IQ BOPE-CAPITAO SAT-ECHO \n", - "total_rounds 4091 ... 1570 1554 1207 \n", - "total_kills 3135 ... 1027 1082 775 \n", - "total_deaths 2850 ... 1128 1105 775 \n", - "\n", - " GSG9-BLITZ SPETSNAZ-TACHANKA GSG9-RESERVE SAS-RESERVE \\\n", - "role Attacker Defender Attacker Attacker \n", - "operator GSG9-BLITZ SPETSNAZ-TACHANKA GSG9-RESERVE SAS-RESERVE \n", - "total_rounds 782 436 219 165 \n", - "total_kills 425 202 139 91 \n", - "total_deaths 585 329 162 119 \n", - "\n", - " SWAT-RESERVE GIGN-RESERVE SPETSNAZ-RESERVE \n", - "role Defender Attacker Defender \n", - "operator SWAT-RESERVE GIGN-RESERVE SPETSNAZ-RESERVE \n", - "total_rounds 84 77 70 \n", - "total_kills 45 42 37 \n", - "total_deaths 66 49 57 \n", - "\n", - "[5 rows x 35 columns]" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "query = (AggregateRequest( # pyright: ignore[reportUnknownMemberType,reportUnknownVariableType, reportAssignmentType]\n", " \"*\"\n", @@ -1270,178 +293,10 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": null, "id": "task6-matches", "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
matchidmapnamegamemodetotal_killstotal_roundsmax_duration
42936207894293620789CHALETPvP  HOSTAGE579232
15251486211525148621SKYSCRAPERPvP  SECURE AREA659237
15775811577581KAFE DOSTOYEVSKYPvP  HOSTAGE639232
42948427694294842769KAFE DOSTOYEVSKYPvP  SECURE AREA689232
28865412886541BARTLETT U.PvP  SECURE AREA529257
.....................
42875041494287504149BARTLETT U.PvP  BOMB31153
42945258294294525829YACHTPvP  BOMB51224
15230590211523059021YACHTPvP  SECURE AREA81133
27665935492766593549BARTLETT U.PvP  SECURE AREA91268
32811013281101CLUB HOUSEPvP  SECURE AREA71186
\n", - "

1900 rows × 6 columns

\n", - "
" - ], - "text/plain": [ - " matchid mapname gamemode total_kills \\\n", - "4293620789 4293620789 CHALET PvP HOSTAGE 57 \n", - "1525148621 1525148621 SKYSCRAPER PvP SECURE AREA 65 \n", - "1577581 1577581 KAFE DOSTOYEVSKY PvP HOSTAGE 63 \n", - "4294842769 4294842769 KAFE DOSTOYEVSKY PvP SECURE AREA 68 \n", - "2886541 2886541 BARTLETT U. PvP SECURE AREA 52 \n", - "... ... ... ... ... \n", - "4287504149 4287504149 BARTLETT U. PvP BOMB 3 \n", - "4294525829 4294525829 YACHT PvP BOMB 5 \n", - "1523059021 1523059021 YACHT PvP SECURE AREA 8 \n", - "2766593549 2766593549 BARTLETT U. PvP SECURE AREA 9 \n", - "3281101 3281101 CLUB HOUSE PvP SECURE AREA 7 \n", - "\n", - " total_rounds max_duration \n", - "4293620789 9 232 \n", - "1525148621 9 237 \n", - "1577581 9 232 \n", - "4294842769 9 232 \n", - "2886541 9 257 \n", - "... ... ... \n", - "4287504149 1 153 \n", - "4294525829 1 224 \n", - "1523059021 1 133 \n", - "2766593549 1 268 \n", - "3281101 1 186 \n", - "\n", - "[1900 rows x 6 columns]" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "query = (AggregateRequest( # pyright: ignore[reportUnknownMemberType,reportUnknownVariableType, reportAssignmentType]\n", " \"*\"\n", @@ -1486,35 +341,32 @@ "source": [ "def get_attachment_stats(field):\n", " \"\"\"Get attachment statistics for a specific field.\"\"\"\n", - " aggr = client.ft().aggregate(\n", - " f\"@primaryweapontype:{TagField.field_name('*')}\",\n", - " [\n", - " {\n", - " \"$group\": {\n", - " \"_id\": f\"${field}\",\n", - " \"count\": {\"$sum\": 1},\n", - " }\n", - " },\n", - " {\"$match\": {\"_id\": {\"$ne\": \"\"}}},\n", - " {\"$sort\": {\"count\": -1}},\n", - " {\"$limit\": 10},\n", - " ]\n", + " query = (AggregateRequest( # pyright: ignore[reportUnknownMemberType,reportUnknownVariableType, reportAssignmentType]\n", + " \"*\"\n", + " ).group_by(\n", + " f\"@{field}\",\n", + " reducers.count().alias(\"total_rounds\")\n", + " ).sort_by(Desc(\"@total_rounds\")) # pyright: ignore[reportArgumentType]\n", + " .limit(0, 35565).cursor(10, 1)\n", " )\n", - " return [{k: v for k, v in r.items() if k != \"type\"} for r in aggr[\"results\"]]\n", "\n", - "print(\"=== TOP 10 PRIMARY SIGHTS ===\")\n", - "sights = get_attachment_stats(\"primarysight\")\n", - "df_sights = pd.DataFrame(sights)\n", + " response = client.ft().aggregate(query)\n", + " rows = response[0][\"results\"]\n", + " cursor = response[1]\n", + " while cursor > 0:\n", + " response= client.ft().aggregate(Cursor(cursor))\n", + " rows.extend(response[0][\"results\"])\n", + " cursor = response[1]\n", + "\n", + " return pd.DataFrame.from_dict({attrs[\"extra_attributes\"][field]: attrs[\"extra_attributes\"] for attrs in rows})\n", + "\n", + "df_sights = get_attachment_stats(\"primarysight\")\n", "display(df_sights)\n", "\n", - "print(\"\\n=== TOP 10 PRIMARY BARRELS ===\")\n", - "barrels = get_attachment_stats(\"primarybarrel\")\n", - "df_barrels = pd.DataFrame(barrels)\n", + "df_barrels = get_attachment_stats(\"primarybarrel\")\n", "display(df_barrels)\n", "\n", - "print(\"\\n=== TOP 10 PRIMARY GRIPS ===\")\n", - "grips = get_attachment_stats(\"primarygrip\")\n", - "df_grips = pd.DataFrame(grips)\n", + "df_grips = get_attachment_stats(\"primarygrip\")\n", "display(df_grips)" ] }, @@ -1671,61 +523,30 @@ "metadata": {}, "outputs": [], "source": [ - "def get_daily_stats():\n", - " \"\"\"Get daily statistics using Redis aggregation.\"\"\"\n", - " aggr = client.ft().aggregate(\n", - " \"*\",\n", - " [\n", - " {\n", - " \"$group\": {\n", - " \"_id\": \"$dateid\",\n", - " \"total_players\": {\"$sum\": 1},\n", - " \"total_kills\": {\"$sum\": \"$nbkills\"},\n", - " \"matches\": {\"$addToSet\": \"$matchid\"},\n", - " \"avg_duration\": {\"$avg\": \"$roundduration\"},\n", - " }\n", - " },\n", - " {\"$sort\": {\"_id\": 1}},\n", - " ]\n", - " )\n", - " return [\n", - " {\n", - " \"date\": r[\"_id\"],\n", - " \"player_actions\": r[\"total_players\"],\n", - " \"total_kills\": r[\"total_kills\"],\n", - " \"matches\": len(r[\"matches\"]),\n", - " \"avg_round_duration\": round(r[\"avg_duration\"], 2),\n", - " }\n", - " for r in aggr[\"results\"]\n", - " ]\n", + "query = (AggregateRequest( # pyright: ignore[reportUnknownMemberType,reportUnknownVariableType, reportAssignmentType]\n", + " \"*\"\n", + " ).group_by(\n", + " \"@dateid\",\n", + " reducers.count().alias(\"total_playcount\"),\n", + " reducers.count_distinct(\"@matchid\").alias(\"matches\"),\n", + " reducers.sum(\"@nbkills\").alias(\"total_kills\"),\n", + " reducers.avg(\"roundduration\").alias(\"avg_duration\")\n", + " ).sort_by(Asc(\"@dateid\")) # pyright: ignore[reportArgumentType]\n", + " .limit(0, 35565).cursor(10, 1)\n", + ")\n", "\n", - "print(\"Computing daily statistics...\")\n", - "daily_stats = get_daily_stats()\n", - "df_daily = pd.DataFrame(daily_stats)\n", + "response = client.ft().aggregate(query)\n", + "rows = response[0][\"results\"]\n", + "cursor = response[1]\n", + "while cursor > 0:\n", + " response= client.ft().aggregate(Cursor(cursor))\n", + " rows.extend(response[0][\"results\"])\n", + " cursor = response[1]\n", + "\n", + "df_daily = pd.DataFrame.from_dict({attrs[\"extra_attributes\"][\"dateid\"]: attrs[\"extra_attributes\"] for attrs in rows}).transpose()\n", "display(df_daily)" ] }, - { - "cell_type": "code", - "execution_count": null, - "id": "task9-summary", - "metadata": {}, - "outputs": [], - "source": [ - "print(\"\\n=== DAILY ACTIVITY SUMMARY ===\")\n", - "total_days = len(df_daily)\n", - "avg_daily_matches = df_daily[\"matches\"].mean()\n", - "avg_daily_kills = df_daily[\"total_kills\"].mean()\n", - "busiest_day = df_daily.loc[df_daily[\"matches\"].idxmax()]\n", - "calmest_day = df_daily.loc[df_daily[\"matches\"].idxmin()]\n", - "\n", - "print(f\"Total days in dataset: {total_days}\")\n", - "print(f\"Average daily matches: {avg_daily_matches:.1f}\")\n", - "print(f\"Average daily kills: {avg_daily_kills:.1f}\")\n", - "print(f\"\\nBusiest day: {busiest_day['date']} with {busiest_day['matches']} matches\")\n", - "print(f\"Calmest day: {calmest_day['date']} with {calmest_day['matches']} matches\")" - ] - }, { "cell_type": "markdown", "id": "task10-header", @@ -1743,74 +564,30 @@ "metadata": {}, "outputs": [], "source": [ - "def get_round_end_stats():\n", - " \"\"\"Get round end reason statistics.\"\"\"\n", - " aggr = client.ft().aggregate(\n", - " \"*\",\n", - " [\n", - " {\n", - " \"$group\": {\n", - " \"_id\": \"$endroundreason\",\n", - " \"count\": {\"$sum\": 1},\n", - " \"avg_duration\": {\"$avg\": \"$roundduration\"},\n", - " }\n", - " },\n", - " {\"$sort\": {\"count\": -1}},\n", - " ]\n", - " )\n", - " return [\n", - " {\n", - " \"end_reason\": r[\"_id\"],\n", - " \"count\": r[\"count\"],\n", - " \"percentage\": 0,\n", - " \"avg_duration\": round(r[\"avg_duration\"], 2),\n", - " }\n", - " for r in aggr[\"results\"]\n", - " ]\n", + "query = (AggregateRequest( # pyright: ignore[reportUnknownMemberType,reportUnknownVariableType, reportAssignmentType]\n", + " \"*\"\n", + " ).group_by(\n", + " \"@endroundreason\",\n", + " reducers.count().alias(\"count\"),\n", + " reducers.avg(\"roundduration\").alias(\"avg_duration\")\n", + " ).sort_by(Desc(\"@count\")) # pyright: ignore[reportArgumentType]\n", + " .limit(0, 35565).cursor(10, 1)\n", + ")\n", "\n", - "print(\"=== ROUND END REASONS ===\")\n", - "round_end_stats = get_round_end_stats()\n", - "df_ends = pd.DataFrame(round_end_stats)\n", + "response = client.ft().aggregate(query)\n", + "rows = response[0][\"results\"]\n", + "cursor = response[1]\n", + "while cursor > 0:\n", + " response= client.ft().aggregate(Cursor(cursor))\n", + " rows.extend(response[0][\"results\"])\n", + " cursor = response[1]\n", + "\n", + "df_ends = pd.DataFrame.from_dict({attrs[\"extra_attributes\"][\"endroundreason\"]: attrs[\"extra_attributes\"] for attrs in rows}).transpose()\n", + "df_ends[\"count\"] = df_ends[\"count\"].astype(\"int\")\n", "total_rounds = df_ends[\"count\"].sum()\n", "df_ends[\"percentage\"] = (df_ends[\"count\"] / total_rounds * 100).round(2)\n", "display(df_ends)" ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "task10-visual", - "metadata": {}, - "outputs": [], - "source": [ - "print(\"\\n=== ROUND END DISTRIBUTION ===\")\n", - "for _, row in df_ends.iterrows():\n", - " bar = \"█\" * int(row[\"percentage\"] / 2)\n", - " print(f\"{row['end_reason']:25} | {bar} {row['percentage']:.1f}%\")" - ] - }, - { - "cell_type": "markdown", - "id": "conclusion", - "metadata": {}, - "source": [ - "## Summary\n", - "\n", - "This notebook demonstrated various data analysis tasks using Redis:\n", - "\n", - "1. **Operator Performance Analysis** - Kill counts and win rates by operator\n", - "2. **Weapon Analysis** - Primary and secondary weapon usage and effectiveness\n", - "3. **Map and Game Mode Analysis** - Popular maps and game modes\n", - "4. **Skill Rank Analysis** - Performance distribution across ranks\n", - "5. **Role Distribution Analysis** - Attack vs Defense operator usage\n", - "6. **Match-Level Analysis** - Individual match statistics\n", - "7. **Weapon Attachment Analysis** - Popular attachments (sights, grips, barrels)\n", - "8. **Redis-Side Pre-computation** - Using sorted sets for leaderboards\n", - "9. **Time-Series Analysis** - Daily activity trends\n", - "10. **Round End Reason Analysis** - Why rounds end\n", - "\n", - "All aggregations were performed directly in Redis using the FT.aggregate() command, demonstrating how Redis can handle complex analytical queries without moving data out of the database." - ] } ], "metadata": { diff --git a/notebooks/r6_load_resampled.ipynb b/notebooks/r6_load_resampled.ipynb index da46415..4a3b9fd 100644 --- a/notebooks/r6_load_resampled.ipynb +++ b/notebooks/r6_load_resampled.ipynb @@ -2,39 +2,17 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "id": "071f6969-c01a-4369-a763-871f5b9e65b3", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Requirement already satisfied: redis in /opt/conda/lib/python3.13/site-packages (7.4.0)\n", - "Requirement already satisfied: hiredis in /opt/conda/lib/python3.13/site-packages (3.3.1)\n", - "Requirement already satisfied: fastid in /opt/conda/lib/python3.13/site-packages (0.0.5)\n", - "Requirement already satisfied: tqdm in /opt/conda/lib/python3.13/site-packages (4.67.3)\n", - "Requirement already satisfied: kagglehub in /opt/conda/lib/python3.13/site-packages (1.0.0)\n", - "Requirement already satisfied: kagglesdk<1.0,>=0.1.14 in /opt/conda/lib/python3.13/site-packages (from kagglehub) (0.1.16)\n", - "Requirement already satisfied: packaging in /opt/conda/lib/python3.13/site-packages (from kagglehub) (26.0)\n", - "Requirement already satisfied: pyyaml in /opt/conda/lib/python3.13/site-packages (from kagglehub) (6.0.3)\n", - "Requirement already satisfied: requests in /opt/conda/lib/python3.13/site-packages (from kagglehub) (2.32.5)\n", - "Requirement already satisfied: protobuf in /opt/conda/lib/python3.13/site-packages (from kagglesdk<1.0,>=0.1.14->kagglehub) (6.33.5)\n", - "Requirement already satisfied: charset_normalizer<4,>=2 in /opt/conda/lib/python3.13/site-packages (from requests->kagglehub) (3.4.6)\n", - "Requirement already satisfied: idna<4,>=2.5 in /opt/conda/lib/python3.13/site-packages (from requests->kagglehub) (3.11)\n", - "Requirement already satisfied: urllib3<3,>=1.21.1 in /opt/conda/lib/python3.13/site-packages (from requests->kagglehub) (2.6.3)\n", - "Requirement already satisfied: certifi>=2017.4.17 in /opt/conda/lib/python3.13/site-packages (from requests->kagglehub) (2026.2.25)\n", - "Note: you may need to restart the kernel to use updated packages.\n" - ] - } - ], + "outputs": [], "source": [ "%pip install redis hiredis fastid tqdm kagglehub" ] }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "id": "526cb932-59aa-489e-bbba-954ac645b633", "metadata": {}, "outputs": [], @@ -66,20 +44,10 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "id": "be4c5461-1db2-4226-b71e-cdc7f06615bd", "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "'Downsample of full dump present: True'" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "dataset = Path(kagglehub.dataset_download(\"awesomizer/rainbox-six-siege-dataset\"))\n", "downsampled = dataset/\"downsampled_S5.csv\"\n", @@ -88,25 +56,10 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "id": "2efb5699-cced-4df0-9d76-278e23874436", "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "2fa9c64b42394db7a5764896d7d936d0", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "0it [00:00, ?it/s]" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "with downsampled.open(\"rb\") as f:\n", " rows = sum(1 for _ in tqdm(f)) - 1" @@ -114,25 +67,10 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "id": "9177760b-eec4-4ab4-8242-0dd8df5db9dd", "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "f235da3945864d409e81037d42269756", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Importing data into Redis...: 0%| | 0/102698 [00:00=0.1.14 in /opt/conda/lib/python3.13/site-packages (from kagglehub) (0.1.16)\n", - "Requirement already satisfied: packaging in /opt/conda/lib/python3.13/site-packages (from kagglehub) (26.0)\n", - "Requirement already satisfied: pyyaml in /opt/conda/lib/python3.13/site-packages (from kagglehub) (6.0.3)\n", - "Requirement already satisfied: requests in /opt/conda/lib/python3.13/site-packages (from kagglehub) (2.32.5)\n", - "Requirement already satisfied: protobuf in /opt/conda/lib/python3.13/site-packages (from kagglesdk<1.0,>=0.1.14->kagglehub) (6.33.5)\n", - "Requirement already satisfied: charset_normalizer<4,>=2 in /opt/conda/lib/python3.13/site-packages (from requests->kagglehub) (3.4.6)\n", - "Requirement already satisfied: idna<4,>=2.5 in /opt/conda/lib/python3.13/site-packages (from requests->kagglehub) (3.11)\n", - "Requirement already satisfied: urllib3<3,>=1.21.1 in /opt/conda/lib/python3.13/site-packages (from requests->kagglehub) (2.6.3)\n", - "Requirement already satisfied: certifi>=2017.4.17 in /opt/conda/lib/python3.13/site-packages (from requests->kagglehub) (2026.2.25)\n", - "Note: you may need to restart the kernel to use updated packages.\n" - ] - } - ], + "outputs": [], "source": [ "%pip install tqdm kagglehub" ] @@ -43,7 +24,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "id": "ed9fdf86", "metadata": {}, "outputs": [], @@ -64,18 +45,10 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "id": "8e6a156d", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Path to dataset files: /home/jovyan/.cache/kagglehub/datasets/awesomizer/rainbox-six-siege-dataset/versions/1\n" - ] - } - ], + "outputs": [], "source": [ "dataset = Path(kagglehub.dataset_download(\"awesomizer/rainbox-six-siege-dataset\"))\n", "\n", @@ -92,52 +65,10 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": null, "id": "30d83f96", "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "'Full dump present: True'" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/plain": [ - "'Objective picks present: True'" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/plain": [ - "'Operator loadouts present: True'" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "86eacf0882aa4337a32fc2ea893a4d18", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "0it [00:00, ?it/s]" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "full_dump = dataset/\"datadump_S5\"/\"datadump_S5.csv\"\n", "objectives = dataset/\"datadump_S5_summary_objectives\"/\"datadump_S5_summary_objectives.csv\"\n", @@ -160,17125 +91,10 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": null, "id": "477feac7", "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "5d34c1829a0b42649d675632071234a1", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Importing raw data into Redis...: 0%| | 0/85939712 [00:00