Skip to content

Instantly share code, notes, and snippets.

View bryan-lunt's full-sized avatar

Bryan Lunt bryan-lunt

  • Department of Computer Science, UC San Diego
  • Urbana, Illinois
View GitHub Profile
@bryan-lunt
bryan-lunt / lu_fact.py
Created September 17, 2021 19:36
Simple LU factorization examples in Python
import numpy as np
def LU_recursive(A):
"""LU factorization without pivoting. Will fail if any diagonal is 0.
Recursive implementation.
"""
L = np.zeros_like(A,dtype=np.float_)
U = np.eye(*A.shape,dtype=np.float_)
a = A[0,0]
@bryan-lunt
bryan-lunt / parallel_subjob_test.slurm
Last active September 19, 2021 05:42
Example for submitting multiple steps within a SLURM batch file, those steps should execute in parallel if possible.
#!/bin/bash
#SBATCH --time=04:00:00
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=12
#SBATCH --exclusive
#SBATCH --job-name subjob-sched-test
#SBATCH -p secondary
module load openmpi/4.1.0-gcc-7.2.0-pmi2 gcc cmake
@bryan-lunt
bryan-lunt / Picard.ipynb
Last active December 8, 2021 09:36
Simple Picard Iteration Example
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bryan-lunt
bryan-lunt / FindGBench.cmake
Last active February 11, 2022 22:12
CMake find_package file to find Google Benchmark. Just sets up targets, does not download. Only tested on Linux.
#Copyright 2022 Bryan J. Lunt <[email protected]>
#
#Licensed under the Apache License, Version 2.0 (the "License");
#you may not use this file except in compliance with the License.
#You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#Unless required by applicable law or agreed to in writing, software
#distributed under the License is distributed on an "AS IS" BASIS,
@bryan-lunt
bryan-lunt / dataannotation_dashboard_greasemonkey.js
Created May 22, 2024 17:01
Prevent Lost work on DataAnnotation.tech
// ==UserScript==
// @name Disable Back Button
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Disables the back button for specified URLs
// @author You
// @match https://app.dataannotation.tech/workers/tasks/*
// @grant none
// ==/UserScript==
// Replace "your-target-website-url-here" with the actual URLs you want to target