Skip to content

Instantly share code, notes, and snippets.

View Imxset21's full-sized avatar

Pedro Rittner Imxset21

View GitHub Profile
$ flatpak run org.zdoom.Raze
Raze 1.10.0 - 2024-04-20 04:12:49 -0400 - SDL version
Compiled on Apr 20 2024
Log started: 2024-04-20 16:20:32
OS: Freedesktop SDK 23.08 (Flatpak runtime), Linux 6.8.6-200.fc39.x86_64 on x86_64
Using video driver wayland
Number of detected displays 1 .
Creating window [2752x1152] on adapter 0
Vulkan device: NVIDIA GeForce RTX 3080 Ti

Keybase proof

I hereby claim:

  • I am imxset21 on github.
  • I am imxset21 (https://keybase.io/imxset21) on keybase.
  • I have a public key ASBHrDzw442A_Eh4jJC36AZWpJQLn0Jz_mpnX_nU3wIMugo

To claim this, I am signing this object:

"""
..module:: deltadict
:platform: Linux
:synopsis: Dictionary that saves old key values to disk
.. moduleauthor:: Pedro Rittner <pr273@cornell.edu>
"""
import tempfile
@Imxset21
Imxset21 / lapack_cholesky.c
Last active September 1, 2021 12:14
C89 Cholesky decomposition using LAPACK
/**
@file lapack_cholesky.c
@author Pedro Rittner
@date November 25, 2014
@brief Small example for how to perform a Cholesky decomposition using LAPACK
A small example performing a Cholesky decomposition using LAPACK's C API.
This is meant to demystify the API somewhat and to make it clearer what
is happening in terms of the function call/arguments/etc.
@Imxset21
Imxset21 / damerau_levenshtein.c
Last active August 29, 2015 14:06
Portable C99 Implementation of Damerau–Levenshtein Distance Algorithm for Strings
/*
Copyright (c) 2014 Pedro Rittner
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
class wrap_file_function(object):
"""
Wrap a function which takes a file or a str as it's first argument.
If a str is provided, replace the first argument of the wrapped function
with a file handle, and close the file afterwards
Example:
@wrap_file_function('w')
def write_hi(f):
@Imxset21
Imxset21 / annotation_enforcer.py
Last active August 29, 2015 14:05
Simple python3k function annotation enforcer
#!/usr/bin/python3
"""
Pure-Python 3 function annotation enforcer.
@author Pedro Rittner
"""
from functools import wraps
from inspect import getcallargs
@Imxset21
Imxset21 / ode_test.c
Created June 9, 2014 20:30
GSL ODE Solver Example
/*
Example adapted from the GNU Scientific Library Reference Manual
Edition 1.1, for GSL Version 1.1
9 January 2002
URL: gsl/ref/gsl-ref_25.html#SEC381
Revisions by: Dick Furnstahl furnstahl.1@osu.edu
Pedro Rittner pr273@cornell.edu
Revision history:
@Imxset21
Imxset21 / kernel.cu
Last active August 29, 2015 14:00
CUDA C Device Symbol Malloc
/*
Dynamically allocates memory for a device-side variable-length array.
Primary purpose is to be able to use the device variable to access the
allocated memory rather than having to keep track through function params.
@author Pedro Rittner
@email pedro.rittner@outlook.com
*/
#include <stdio.h>