Skip to content

Instantly share code, notes, and snippets.

View scivision's full-sized avatar
💭
I will be slow to respond.

scivision

💭
I will be slow to respond.
View GitHub Profile
cmake_minimum_required(VERSION 3.19)
project(mod_files LANGUAGES Fortran)
enable_testing()
include(CheckCompilerFlag)
set(tgt dummy)
set(submod define_pi)
@scivision
scivision / aocc.sh
Last active September 10, 2026 22:01
AOCC AMD compiler source script
# Activate AOCC compilers by
# source aocc.sh
version=6.0.0
root=/opt/AMD/aocc-compiler-${version}
[[ ! -d ${root} ]] && echo "ERROR: ${root} not found" && exit 1
source ${root}/setenv_AOCC.sh
@scivision
scivision / CMakeLists.txt
Last active September 11, 2026 22:42
Find maximum source file length a Fortran compiler can handle with CMake
cmake_minimum_required(VERSION 3.25)
project(MaxFortran LANGUAGES Fortran)
set(CMAKE_EXECUTE_PROCESS_COMMAND_ECHO STDOUT)
if(NOT DEFINED N)
if(CMAKE_Fortran_COMPILER_ID STREQUAL "NVHPC")
# tested with NVHPC SDK 26.5
set(N 1000)
@scivision
scivision / CMakeLists.txt
Created August 31, 2026 19:14
Test CMAKE_COMPILE_WARNING_AS_ERROR with Fortran
cmake_minimum_required(VERSION 4.4)
project(FlangErr LANGUAGES Fortran)
if(CMAKE_Fortran_COMPILER_ID MATCHES "GNU|LLVMFlang")
add_compile_options(-Wunused-variable)
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "Intel")
add_compile_options(-warn:unused)
endif()
@scivision
scivision / Readme.md
Last active August 28, 2026 23:58
Analyze Brandmeister DMR devices data, converting to Parquet first.

Analyze DMR ham radio hotspot statistics

With the continued growth of DMR as a voice and data mode for amateur radio, DMR hotspots are a popular way to access talkgroups without the need to tie up a community repeater. The DMR hotspot links a DMR mobile or portable radio to most other DMR radios, repeaters, hotspots over the internet. Think of a DMR hotspot like a networked repeater you controls, but without rebroadcasting your signal locally - just to and from other DMR systems over the internet. Hotspots might be used at a specific location, or might be used with celllar mobile network connectivity to be used on the go.

DMR hotspots typically have low transmit power (10 mW - 1000 mW) and are typically used with small rubber duck antennas. However, hotspots can be connected to high outdoor antennas.

@scivision
scivision / check_raspi_throttle.py
Last active August 24, 2026 17:46
Raspberry Pi low voltage and temperature Python check
#!/usr/bin/env python3
"""Decode Raspberry Pi "vcgencmd throttled" bitmask into text."""
import argparse
import re
import subprocess
import sys
BITMAP = {
0: "Under-voltage detected",
@scivision
scivision / keybase.md
Last active August 31, 2026 19:15
keybase.md

Keybase proof

I hereby claim:

  • I am scivision on github.
  • I am scivision (https://keybase.io/scivision) on keybase.
  • I have a public key ASBMR0td50Qp7eO72M2ZaqfXyE2ArikjSRwGA8b9IvkFOAo

To claim this, I am signing this object:

@scivision
scivision / LICENSE
Last active August 14, 2026 19:41
with Homebrew pin a specific GCC version to install and build if needed
Copyright 2026 SciVision
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER D
@scivision
scivision / LICENSE
Last active August 31, 2026 19:16
Beaglebone LED flasher
Copyright (c) 2019 SciVision
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTH