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
@scivision
scivision / Readme.md
Last active July 13, 2025 02:35
Intel oneAPI 2025.2 new options for MKLconfig.cmake

Intel oneAPI 2025.2 CMake MKLconfig.cmake new options

Intel oneAPI 2025.2 introduces functionality and some new flags and settings that broke projects using MKL Scalapack. If using CMake with MKLconfig.cmake from Intel oneAPI, here is how to keep working with oneMKL including 2025.2.

In the CMakeLists.txt or other CMake script using find_package(MKL CONFIG REQUIRED) do like the following example that uses MKL ScaLAPACK:

function test_strlength()
oct = isoctave();
if oct
pkg('load', 'tablicious')
v = ver('tablicious');
disp(['tablicious version: ' v.Version])
v = ver('octave');
fprintf('Octave version: %s\n', v.Version)
@scivision
scivision / blockquote.css
Created June 30, 2025 00:03
Hugo alert boxes
/* place under assets/css/blockquote.css */
/* General alert styling */
.alert {
padding: 1rem;
margin-bottom: 1rem;
border: 1px solid transparent;
border-radius: .25rem;
}
@scivision
scivision / Readme.md
Created June 26, 2025 16:17
Matlab set own BLAS or LAPACK

Setting environment variables BLAS_VERSION or LAPACK_VERSION to the path to the desired BLAS or LAPACK library path overrides Matlab's own BLAS or LAPACK. Matlab may fail to work, but this is claimed to work even with AOCL libraries or MKL for example.

Reference

@scivision
scivision / Readme.md
Last active July 10, 2025 14:08
Quickly upload WSJT-X default log to LoTW
@scivision
scivision / wspr_wsjtx_raw_archive.py
Last active June 9, 2025 17:31
Create tar archive of WSPR / WSJT-X raw audio save files
#!/usr/bin/env python3
import os
import tarfile
import platform
from pathlib import Path
import argparse
from datetime import datetime
a = argparse.ArgumentParser(
description="Compress and upload raw WSPR data to science archive."
@scivision
scivision / email_extract_attachment.py
Last active June 6, 2025 21:43
Extract attachements from .eml email downloaded file from GMail, email client, etc.
#!/usr/bin/env python3
"""
Use Python stdlib "email" to extract attachments from an .eml file
as obtained from an email client or Download from Gmail etc.
based on https://gist.github.com/urschrei/5258588
"""
from pathlib import Path
@scivision
scivision / Readme.md
Last active June 1, 2025 19:26
GCC Gfortran 15.1.0 new bug with -Wall flag

GCC Gfortran 15.1.0 has a new bug that is fixed in Gfortran 15.2.0 release on any operating system (Windows, macOS, ...) that is triggered by -Wall

gfortran -Wall wall.f90 && ./a.out

wall.f90:38:12: >

@scivision
scivision / Readme.md
Created May 25, 2025 06:31
PyPI upload from GitHub Actions without API token

For each package, go into PyPI projects and add a publisher.

This uses separate jobs for build and publish as recommended to avoid a poisoned package from hijacking the publish to put hostile code in a package.

@scivision
scivision / CMakeLists.txt
Created May 25, 2025 05:50
Maidenhead locator in Fortran. See https://github.com/space-physics/maidenhead/ for Python
cmake_minimum_required(VERSION 3.14...4.0)
project(Maidenhead LANGUAGES Fortran)
enable_testing()
if(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
add_compile_options(-fno-backtrace -fimplicit-none)
endif()
add_library(maidenhead OBJECT maidenhead.f90)