const std = @import("std");
const tests = @import("tests-tmp.zig");
pub fn build(b: *std.Build) void {
const test_step = b.step("test", "Run unit tests");
test_step.dependOn(tests.addCliTests(b));
}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //! Implements a schema for an indoor cycling workout. | |
| const Workout = @This(); | |
| pub const max_file_size = 2 * 4096; | |
| const SingleStep = struct { | |
| name: []const u8, | |
| /// The mode used for the single step. | |
| mode: Mode = .target_power, | |
| note: ?[]const u8 = null, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| workout: | |
| name: aerobic-threshold | |
| defaults: | |
| mode: target-power | |
| steps: | |
| - name: "warm-up" | |
| power: [100, 160] | |
| cadence: [0, 95] | |
| duration-minutes: 10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Default config for sway | |
| # | |
| # Copy this to ~/.config/sway/config and edit it to your liking. | |
| # | |
| # Read `man 5 sway` for a complete reference. | |
| ### Variables | |
| # | |
| # Logo key. Use Mod1 for Alt. | |
| set $mod Mod4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| set -euo pipefail | |
| # Build kcov | |
| scripts/make.sh | |
| printf "\n\n" | |
| # Build tests | |
| mkdir -p build-tests | |
| cd build-tests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def _get_dist_spec(dist): | |
| """Returns the specification used by the distribution. | |
| The result is "dist-info", "egg-info", "egg" or "distutils-legacy". | |
| """ | |
| def is_dir(): | |
| return dist.path is not None and os.path.isdir(dist.path) | |
| def is_file(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| from math import nan | |
| import sys | |
| from garmin_fit_sdk import Decoder, Stream | |
| import numpy as np | |
| from numpy.lib.stride_tricks import sliding_window_view | |
| def load(path): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def read_fit_header(path): | |
| """read_fit_header returns the FIT file header. | |
| The FIT SDK has the `Decoder.read_file_header` method, but it cannot be | |
| used because a local object can not be pickled and only the major version | |
| is used, for both protocol_version and profile_version. | |
| """ | |
| stream = Stream.from_file(path) | |
| header = {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| if [ ! -d exercises ]; then | |
| echo "Must be run from the project root directory." | |
| exit 1 | |
| fi | |
| build() { | |
| zig build -Dhealed -Dhealed-path=patches/tmp -Dn="$1" | |
| zig_ret=$? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const std = @import("std"); | |
| const root = @import("../build.zig"); | |
| const debug = std.debug; | |
| const fmt = std.fmt; | |
| const fs = std.fs; | |
| const mem = std.mem; | |
| const Allocator = std.mem.Allocator; | |
| const Build = std.build; |
NewerOlder