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 December 17, 2025 19:09 — forked from fopina/portquiz.py
portquiz.net concurrent Python asyncio port connectivity tester

Check outbound port connectivity using portquiz.net and Python

Demonstrates use of concurrent.futures.ThreadPoolExecutor and asyncio.Semaphore in separate examples to check outbound port connectivity.

In both examples, the maximum number of concurrent connections is limited to 5 (user option). This examples shows that Asyncio using

@scivision
scivision / amsnr.m
Created December 15, 2025 01:33
AM, FM SNR calculation in Matlab
%amsnr: SNR in AM systems
%
%This code contains functions to generate a message signal, amplitude
%modulate a carrier and detect the message using envelope detection.
%
%Homework: Write code to perform SNR analysis as discussed in homework
%5. Additional information is available in the comments below.
%
% Last modified: 2009-April-07
%
@scivision
scivision / SSBdemod.m
Created December 15, 2025 01:29
SSB modulation and demodulation without using Matlab without using toolboxes.
function aud = SSBdemod(modeDemod, fc)
%k = [55e3 65e3]; %sample range to use
k = [1 .2e6-1];
figure(1)
hT = subplot(3,1,1);
hD = subplot(3,1,2);
hF = subplot(3,1,3);
@scivision
scivision / Readme.md
Last active November 26, 2025 00:39
Boston University Shared Computing Cluster (SCC) MPI interactive job with qrsh example

There are a few node types on BU SCC that are designed for MPI jobs. The job script syntax can be used for interactive session start.

qrsh -pe mpi_28_tasks_per_node 56
@scivision
scivision / CMakeLists.txt
Last active October 21, 2025 14:37
Diagnose issue with Fortran directive, CMake, Ninja, and Flang
cmake_minimum_required(VERSION 3.20)
project(mini LANGUAGES Fortran)
message(STATUS "CMAKE Generator: ${CMAKE_GENERATOR}")
add_executable(mini mini.F)
@scivision
scivision / wstj-x-improved-Readme.txt
Created October 10, 2025 03:14
Notes on WSJT-X Installation for Mac OS X
Notes on WSJT-X Installation for Mac OS X
-----------------------------------------
First just drop the wsjtx.app onto the Applications folder in the dmg window to
install to Applications
If you have already downloaded a previous version of WSJT-X then I suggest
you change the name in the Applications folder from WSJT-X to WSJT-X_previous
before proceeding.
I recommend that you follow the installation instructions especially if you
@scivision
scivision / .flake8
Last active September 22, 2025 03:29
inhibit Windows from suspend/sleep while subprocess is running
[flake8]
max-line-length = 100
@scivision
scivision / vitter.c
Created August 28, 2025 22:15
Vitter algorithm
//Copyright Kevin Lawler, released under ISC License
// https://getkerf.wordpress.com/2016/03/30/the-best-algorithm-no-one-knows-about/
double random_double() //your random double function
{
//[0,1) uniformly random double, mt19937-64.c source is fine
//keep in mind most double-based implementations drop randomness to 52-bits
return genrand64_real2();
}
@scivision
scivision / readme.md
Created August 27, 2025 16:34
Discussion on parallelization (threads) using Performance cores vs. Efficiency cores

This becomes an issues with MPI workers with synchronized parallelism. There are "14 core" laptops with two P-cores and 12 E-cores. I have seen project teams that configure their programs (say via enviornment variables) to only use the P-cores, but this can lead to a performance drop vs. their much older all P-core computer.

fastbuild/fastbuild#995

@scivision
scivision / captive_portal.py
Last active December 17, 2025 17:54
Python requests to test if captive portal is grabbing connection
#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.10"
# dependencies = ["requests"]
# ///
import requests
def get_urls() -> dict[str, tuple[str, int]]: