Skip to content

Instantly share code, notes, and snippets.

View tommylees112's full-sized avatar
🐘

Tommy Lees tommylees112

🐘
  • University of Oxford
  • Oxford
View GitHub Profile
@tommylees112
tommylees112 / 2021.csv
Created May 27, 2023 09:31
Cotswold Way Ultra 100 Mile 2021
Position Time Name Category Affiliation year gender hours
0 1 0 days 21:41:17 Daniel Hendriksen MV50 2021 M 21.688055555555554
1 2 0 days 22:21:13 Craig Rumble MV40 Corsham Running Club 2021 M 22.35361111111111
2 3 0 days 23:12:42 Colin Crowhurst MSnr 2021 M 23.211666666666666
3 4 0 days 23:36:35 Mathew Favell MV45 2021 M 23.60972222222222
4 5 0 days 23:39:00 Greg Moore MV40 2021 M 23.65
5 6 0 days 23:39:00 Andrew Stevens MV40 2021 M 23.65
6 7 0 days 23:40:36 David Musgrove MV45 Cirencester AC 2021 M 23.676666666666666
7 8 1 days 00:52:34 Andrew Gaskell MV40 2021 M 24.87611111111111
8 9 1 days 01:00:39 Adrian Busolini MSnr Fairlands Valley Spartans 2021 M 25.010833333333334
@tommylees112
tommylees112 / 2022.csv
Created May 27, 2023 09:30
Cotswold Way Ultra 100 Mile 2022
Position Bib Name Time Last Location year Category gender hours
0 1 13 Martin IndgeNoon Start 0 days 21:14:00 Finish 2022 M M 21.233333333333334
1 2 42 Nicholas BerryNoon Start 0 days 21:50:00 Finish 2022 M M 21.833333333333332
2 3 3 Will FrankNoon Start 0 days 21:50:00 Finish 2022 M M 21.833333333333332
3 4 45 Matthew KennedyNoon Start 0 days 23:42:00 Finish 2022 M M 23.7
4 5 24 Javier MonllorNoon Start 0 days 23:55:00 Finish 2022 M M 23.916666666666668
5 6 2 Dom JacksonNoon Start 1 days 00:27:00 Finish 2022 M M 24.45
6 7 29 Carl MorganNoon Start 1 days 01:27:00 Finish 2022 M M 25.45
7 8 51 Keith ShawNoon Start 1 days 01:43:00 Finish 2022 M M 25.716666666666665
8 9 9 Rachel GillingsNoon Start 1 days 02:25:00 Finish 2022 F F 26.416666666666668
import xarray as xr
import numpy as np
import pandas as pd
from pathlib import Path
import rioxarray
from tqdm import tqdm
from scripts.clip_netcdf_to_shapefile import (
prepare_rio_data,
rasterize_all_geoms,
create_timeseries_of_masked_datasets,
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
"""[summary]
1) Load the LDD map rasterio
2) Load numpy array into pyflwdir
PCRASTER convention
Value: 1-9 (5 is a bit, 1-8 is direction)
(alternate=arcgis 0-128)
3) Execute flwdir
`conda install pyflwdir -c conda-forge`
Documentation:
@tommylees112
tommylees112 / pysheds.sh
Created June 20, 2022 18:34
environment for pysheds
conda create -n pysheds --yes
conda activate pysheds
conda install -c conda-forge pysheds --yes
conda install -c conda-forge rioxarray --yes
conda install -c conda-forge ipython xarray seaborn jupyterlab --yes
@tommylees112
tommylees112 / sympy_calculations.py
Created May 24, 2022 21:36
for pibal tracking (tenerife fieldtrip), encode the equations that convert Lift Rate, Azimuth, Elevation, TimeDifference into wind speeds using trigonometry
"""
WIND SPEED = f(L, b_w, azβ‚€, elβ‚€, az₁, el₁, Tβ‚€, T₁)
____________________________________________________________
β•± βŽ› βŽ› βŽ›azβ‚€ azβ‚βŽžβŽž ⎞
β•± ⎜ 2 2β‹…Tβ‚€β‹…T₁⋅cosβŽœΟ€β‹…βŽœβ”€β”€β”€ - β”€β”€β”€βŽŸβŽŸ 2 ⎟
β•± ⎜ Tβ‚€ ⎝ ⎝180 180⎠⎠ T₁ ⎟
β•± Lβ‹…βŽœβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ - ────────────────────────── + β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€βŽŸ
β•± ⎜ 2βŽ›Ο€β‹…elβ‚€βŽž βŽ›Ο€β‹…elβ‚€βŽž βŽ›Ο€β‹…elβ‚βŽž 2βŽ›Ο€β‹…elβ‚βŽžβŽŸ
β•± ⎜tan βŽœβ”€β”€β”€β”€β”€βŽŸ tanβŽœβ”€β”€β”€β”€β”€βŽŸβ‹…tanβŽœβ”€β”€β”€β”€β”€βŽŸ tan βŽœβ”€β”€β”€β”€β”€βŽŸβŽŸ
β•± ⎝ ⎝ 180 ⎠ ⎝ 180 ⎠ ⎝ 180 ⎠ ⎝ 180 ⎠⎠
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.