Skip to content

Instantly share code, notes, and snippets.

View anjohan's full-sized avatar
👨‍💻
Writing code

Anders Johansson anjohan

👨‍💻
Writing code
View GitHub Profile
@anjohan
anjohan / mrsscheduler.py
Last active April 27, 2026 19:49
MRS Spring 2026 AI Scheduler
"""
Script for going through all talks at MRS Spring 2026 and using AI to evaluate whether
a talk is interesting or not. The script generates a .ics calendar file.
This uses the Cerebras Cloud SDK as the AI endpoint, since this was the easiest
to get running for me. Each run costs ~$0.25.
This script was mostly written by Gemini 3.1 Pro within a few iterations.
STEP 1:
Download abstract book from https://www.mrs.org/docs/default-source/meetings-events/spring-meetings/2026/2026-mrs-spring-meeting-program.pdf
@anjohan
anjohan / lmpotf_lib.patch
Last active November 3, 2022 17:53
Patch for lammps/src/library.cpp for FLARE LMPOTF
diff --git a/src/library.cpp b/src/library.cpp
index cdc0a81..2d75d49 100644
--- a/src/library.cpp
+++ b/src/library.cpp
@@ -482,10 +482,10 @@ char *lammps_command(void *handle, const char *cmd)
BEGIN_CAPTURE
{
- if (lmp->update->whichflag != 0)
- lmp->error->all(FLERR,"Library error: issuing LAMMPS commands "
@anjohan
anjohan / clangoffload.md
Created December 3, 2020 02:37
Build Clang with OpenMP Target Offloading for NVIDIA GPUs

Note to self

This works with Clang 12 on Manjaro, and maybe other Linux versions. CUDA 11.1 is installed with pacman in /opt/cuda.

Download

git clone https://github.com/llvm/llvm-project.git

First build