Skip to content

Instantly share code, notes, and snippets.

View TomMelt's full-sized avatar

tommelt TomMelt

View GitHub Profile
@TomMelt
TomMelt / valgrind-memory-leak-example.f90
Last active May 25, 2024 18:54
Example memory leak
program test_memory
implicit none
integer, dimension(:), allocatable :: array
integer :: i
allocate(array(5))
do i = 1, 5
@TomMelt
TomMelt / VectorStuff.ipynb
Last active April 16, 2020 09:18
orthogonal vectors
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@TomMelt
TomMelt / format_arguments.py
Created March 14, 2019 10:59
format a string (parsed from vim selection) into the PEP8 standard
#!/usr/bin/python3
import re
import sys
def insert(string, index, char):
"""
string - string in which to insert char
index - position at which char is inserted into string
char - character that is to be inserted