Skip to content

Instantly share code, notes, and snippets.

% Encoding: UTF-8
@Manual{rlanguage,
title = {R: A Language and Environment for Statistical Computing},
author = {{R Core Team}},
organization = {R Foundation for Statistical Computing},
address = {Vienna, Austria},
year = {2015},
url = {https://www.R-project.org/},
}
@article{schonbrodtbfda,
@myd7349
myd7349 / Python_LRU_Cache_Usage_Guide.md
Created May 22, 2025 07:33 — forked from promto-c/Python_LRU_Cache_Usage_Guide.md
A detailed guide to using Python's functools.lru_cache for efficient function caching. Covers basic usage, cache management, custom cache control, and additional insights for optimal utilization in various development scenarios. Ideal for Python developers looking to enhance performance with caching techniques.

1703673950911

Python lru_cache Usage Guide

Overview

The lru_cache decorator in Python's functools module implements a caching strategy known as Least Recently Used (LRU). This strategy helps in optimizing the performance of functions by memorizing the results of expensive function calls and returning the cached result when the same inputs occur again.

Basic Usage

from functools import lru_cache
@myd7349
myd7349 / freedesktop.org_icons_with_descriptions.txt
Created March 25, 2025 01:04 — forked from peteristhegreat/freedesktop.org_icons_with_descriptions.txt
QIcon::fromTheme, List of icons in gnome theme, in qt standardPixmaps and list on freedesktop.org
# https://specifications.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html, aggregate list from each section
address-book-new The icon used for the action to create a new address book.
application-exit The icon used for exiting an application. Typically this is seen in the application's menus as File->Quit.
appointment-new The icon used for the action to create a new appointment in a calendaring application.
call-start The icon used for initiating or accepting a call. Should be similar to the standard cellular call pickup icon, a green handset with ear and mouth pieces facing upward.
call-stop The icon used for stopping a current call. Should be similar to the standard cellular call hangup icon, a red handset with ear and mouth pieces facing downward.
contact-new The icon used for the action to create a new contact in an address book application.
document-new The icon used for the action to create a new document.
document-open The icon used for the action to open a document.
document-open-recent T
@myd7349
myd7349 / new empty git branch.md
Created February 12, 2025 12:10 — forked from ozh/new empty git branch.md
Create a new empty branch in Git
$ git checkout --orphan NEWBRANCH
$ git rm -rf .

--orphan creates a new branch, but it starts without any commit. After running the above command you are on a new branch "NEWBRANCH", and the first commit you create from this state will start a new history without any ancestry.

You can then start adding files and commit them and they will live in their own branch. If you take a look at the log, you will see that it is isolated from the original log.

@myd7349
myd7349 / EventToCommandBehavior.cs
Created February 6, 2025 03:24 — forked from grimorde/EventToCommandBehavior.cs
Event To Command Behavior
public class EventToCommandBehavior : BindableBehavior<Xamarin.Forms.View>
{
public static BindableProperty CommandProperty =
BindableProperty.CreateAttached(
"Command",
typeof(ICommand),
typeof(EventToCommandBehavior),
null,
BindingMode.OneWay);
@myd7349
myd7349 / linux_reading_list.md
Created January 17, 2025 11:41 — forked from eenblam/linux_reading_list.md
Linux Networking Reading List

Linux Networking Reading List

Currently in no particular order. Most of these are kind of ancient.

Where's all the modern documentation? So much of what I've turned up searching is other folks complaining about having few options beyond reading source code.

The OREILLY books, while dated, seem to be some of the best available. Note that these can be read with a 7-day trial. Do this! At least get through the introduction section and first chapter of each to see if it's what you're after.

https://www.netfilter.org/

@myd7349
myd7349 / sugh.sh
Created January 17, 2025 11:32 — forked from erdincay/sugh.sh
su GitHub (downloading all repositories from a given user)
#!/bin/bash
if [ -z "$1" ]; then
echo "waiting for the following arguments: username + max-page-number"
exit 1
else
name=$1
fi
if [ -z "$2" ]; then
@myd7349
myd7349 / plot_csd_erp.ipynb
Created November 7, 2024 09:31 — forked from sherdim/plot_csd_erp.ipynb
Current Source Density with mne-python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@myd7349
myd7349 / eigen_matlab.cpp
Created October 21, 2024 02:53 — forked from phg1024/eigen_matlab.cpp
Eigen-MATLAB reference
// A simple quickref for Eigen. Add anything that's missing.
// Main author: Keir Mierle
#include <Eigen/Dense>
Matrix<double, 3, 3> A; // Fixed rows and cols. Same as Matrix3d.
Matrix<double, 3, Dynamic> B; // Fixed rows, dynamic cols.
Matrix<double, Dynamic, Dynamic> C; // Full dynamic. Same as MatrixXd.
Matrix<double, 3, 3, RowMajor> E; // Row major; default is column-major.
Matrix3f P, Q, R; // 3x3 float matrix.
@myd7349
myd7349 / Eigen Cheat sheet
Created October 16, 2024 14:42 — forked from gocarlos/Eigen Cheat sheet
Cheat sheet for the linear algebra library Eigen: http://eigen.tuxfamily.org/
// A simple quickref for Eigen. Add anything that's missing.
// Main author: Keir Mierle
#include <Eigen/Dense>
Matrix<double, 3, 3> A; // Fixed rows and cols. Same as Matrix3d.
Matrix<double, 3, Dynamic> B; // Fixed rows, dynamic cols.
Matrix<double, Dynamic, Dynamic> C; // Full dynamic. Same as MatrixXd.
Matrix<double, 3, 3, RowMajor> E; // Row major; default is column-major.
Matrix3f P, Q, R; // 3x3 float matrix.