Skip to content

Commit

Permalink
Merge pull request #53 from UoMResearchIT/dockerfile-2nd-pass
Browse files Browse the repository at this point in the history
Dockerfile 2nd pass
  • Loading branch information
fherreazcue authored Oct 17, 2024
2 parents 92204d5 + f42c2bd commit 2fb4c3e
Show file tree
Hide file tree
Showing 3 changed files with 367 additions and 147 deletions.
10 changes: 8 additions & 2 deletions code/SPUC-Stats/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@
from __main__ import file_path

import pandas as pd
import os

@app.route('/stats', methods=['GET'])

@app.route("/stats", methods=["GET"])
def stats():
if not os.path.exists(file_path):
return {"message": "No unicorn sightings yet!"}

with open(file_path) as f:
df = pd.read_csv(f)
df = df.iloc[:, 1:]
stats = df.describe()
return stats.to_json()
return stats.to_json()
2 changes: 1 addition & 1 deletion episodes/docker-cli-toolkit.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ Deleted Containers:
90d006980a999176dd82e95119556cdf62431c26147bdbd3513e1733be1a5897
Deleted Images:
untagged: ghcr.io/uomresearchit/spuc@sha256:bc43ebfe7dbdbac5bc0b4d849dd2654206f4e4ed1fb87c827b91be56ce107f2e
untagged: spuacv/spuc@sha256:bc43ebfe7dbdbac5bc0b4d849dd2654206f4e4ed1fb87c827b91be56ce107f2e
deleted: sha256:f03fb04b8bc613f46cc1d1915d2f98dcb6e008ae8e212ae9a3dbfaa68c111476
Total reclaimed space: 13.09MB
Expand Down
Loading

0 comments on commit 2fb4c3e

Please sign in to comment.