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
# 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; |
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
Semantic Analysis [1232] max3... thread 14793 panic: Segmentation fault at address 0x0 | |
???:?:?: 0x2935580 in ??? (/home/manlio/src/contrib/zig/github.com/ziglang/zig/src/zig_llvm.cpp) | |
/home/manlio/src/contrib/zig/github.com/ziglang/zig/lib/std/mem/Allocator.zig:302:5: 0x9a06d7 in free__anon_3497 (zig) | |
@memset(non_const_ptr, undefined, bytes_len); | |
^ | |
/home/manlio/src/contrib/zig/github.com/ziglang/zig/lib/std/array_list.zig:550:47: 0xbc286b in deinit (zig) | |
allocator.free(self.allocatedSlice()); | |
^ | |
/home/manlio/src/contrib/zig/github.com/ziglang/zig/src/Module.zig:3396:36: 0xa72503 in destroyDecl (zig) | |
decl_emit_h.fwd_decl.deinit(gpa); |
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 | |
# Validate the code_begin lines in the Zig Language Reference. | |
import argparse | |
import sys | |
CODE_INDENT = 6 | |
def validate(file, verbose=False): |
NewerOlder