Skip to content

Instantly share code, notes, and snippets.

View cdugeai's full-sized avatar

Colin Dugeai cdugeai

View GitHub Profile
date yyear distance pct_distance_over_21 day_duration peak_speed
2022-08-02 2022 4524.085076 1.9734052065823704 76.24236931 30.7559
2022-08-03 2022 5264.645855 4.670051847200651 65.21783048 28.67495
2022-08-04 2022 6886.542272 2.892311578625564 105.139759 29.2172
2022-08-05 2022 2622.552016 2.607739350173484 64.58843385 28.703
2022-08-06 2022 5654.028319 7.9074691525258345 46.04835304 30.29811976
2022-08-07 2022 7379.419445 3.1229608252739722 116.656904 30.8216
2022-08-08 2022 0 0 0 0
2022-08-09 2022 0 0 0 0
2022-08-10 2022 6388.152035 7.227888329367226 94.99376919 31.51548
previous_week md_minus_code day_duration distance peak_speed info_cols date match_week
4 0 54.35963408 5771.444638 30.180125 - 2025-02-14 139
4 -7 0 0 0 - 2025-02-15 139
4 -6 0 0 0 - 2025-02-16 139
4 -5 95.06969583 7301.824049 27.0818 - 2025-02-17 139
4 -4 98.6667945 3176.364698 30.9225 - 2025-02-18 139
4 -3 0 0 0 - 2025-02-19 139
4 -2 90.85104343 7119.253572 30.0393 - 2025-02-20 139
4 -1 80.15527937 4062.281285 30.6663 - 2025-02-21 139
3 0 29.64415436 5778.224429 30.2133881 - 2025-02-22 140
We can make this file beautiful and searchable if this error is corrected: It looks like row 6 should actually have 19 columns, instead of 10 in line 5.
date,yyear,wweek,md_plus_code,md_minus_code,distance,distance_over_21,distance_over_24,distance_over_27,accel_decel_over_2_5,accel_decel_over_3_5,accel_decel_over_4_5,day_duration,peak_speed,hr_zone_1_hms,hr_zone_2_hms,hr_zone_3_hms,hr_zone_4_hms,hr_zone_5_hms
2022-08-02,2022,31,10,-4,4524.085076,89.27853044,85.69031816,61.6343353,119.1081009,32.63692816,8.557442749,76.24236931,30.7559,00:03:40,00:17:29,00:19:20,00:11:23,00:00:02
2022-08-03,2022,31,10,-3,5264.645855,245.861691,91.34814267,20.21058834,45.97401948,6.309729836,3.095989752,65.21783048,28.67495,00:06:44,00:16:40,00:15:35,00:06:08,00:00:01
2022-08-04,2022,31,10,-2,6886.542272,199.1802595,84.63473481,22.58547047,97.48851155,24.40018007,3.82586928,105.139759,29.2172,00:17:29,00:37:09,00:23:49,00:06:30,00:00:02
2022-08-05,2022,31,10,-1,2622.552016,68.3893209,11.795402,6.360193345,43.75026526,14.64292521,2.189601741,64.58843385,28.703,00:07:34,00:15:51,00:07:31,00:01:51,00:00:00
2022-08-06,2022,31,0,0,5654.028319,447.0905452,164.5766708,82.74642973,122
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
uv init
mv hello.py main.py
uv add mypy coverage pytest ruff
cat <<EOT > Makefile
run:
uv run python3 main.py
test:
uv run coverage run -m pytest
lint:
uv run ruff check
{
"type": "object",
"properties": {
"indicateurs": {
"type": "array",
"description": "Liste des indicateurs",
"items": {
"type": "object",
"properties": {
"id": {
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
sudo apt-get update && apt-get install -y --no-install-recommends apt-utils
# install docker
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh ./get-docker.sh
sudo usermod -aG docker $USER
#newgrp docker
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#