Skip to content

Instantly share code, notes, and snippets.

@AlexanderNenninger
AlexanderNenninger / lazyarrays.jl
Last active August 3, 2023 12:27
Array that computes it's entries on the fly
# Lazy Array implementation. The explicit typing allows for static compilation leading to high performance.
using LinearAlgebra
using BenchmarkTools
# Quick implementation of a lazy Array. Yes, it's really *that* simple.
mutable struct LazyFunctionArray{F<:Function,T,N} <: AbstractArray{T,N}
const f::F # Julia 1.8 const field syntax for convenience
const size::NTuple{N,Int}
ncalls::Int
@cwhittl
cwhittl / ObsidianConvert.sh
Created May 29, 2023 23:46
Super note to Obsidian
#!/bin/bash
superNotePath="/Users/chriswhittle/Dropbox/Supernote/Note"
superNoteToolPath="/opt/homebrew/bin/supernote-tool"
noteTakingAppPath="/Users/chriswhittle/Library/Mobile Documents/iCloud~md~obsidian/Documents/WhitsNotes"
pdfPath="/Users/chriswhittle/Library/Mobile Documents/iCloud~md~obsidian/Documents/WhitsNotes/SuperNote/pdf"
imagePath="/Users/chriswhittle/Library/Mobile Documents/iCloud~md~obsidian/Documents/WhitsNotes/SuperNote/images"
if [[ -d $pdfPath ]]
then
echo "Deleting Old Pdfs"
@devinschumacher
devinschumacher / cloud-gpus.md
Last active July 21, 2024 11:09
Cloud GPUs // The Best Servers, Services & Providers [RANKED!]

Cloud GPUs: Servers, Providers & Everything You Would Ever Need

Your company's GPU computing strategy is essential whether you engage in 3D visualization, machine learning, AI, or any other form of intensive computing.

There was a time when businesses had to wait for long periods of time while deep learning models were being trained and processed. Because it was time-consuming, costly, and created space and organization problems, it reduced their output.

This problem has been resolved in the most recent GPU designs. Because of their high parallel processing efficiency, they are well-suited for handling large calculations and speeding up the training of your AI models.

When it comes to deep learning, GPUs can speed up the training of neural networks by a factor of 250 compared to CPUs, and the latest generation of cloud GPUs is reshaping data science and other emerging technologies by delivering even greater performance at a lower cost and with the added benefits of easy scalability and rapid deployment.

@gregoryhugaerts
gregoryhugaerts / nyxt.el
Last active December 20, 2022 15:07
some emacs nyxt commands
(defun emacs-with-nyxt-sly-connect (host port)
"Connect Sly to HOST and PORT ignoring version mismatches."
(sly-connect host port)
(sleep-for 1))
(defvar emacs-with-nyxt-sly-nyxt-delay 0.3)
(defun emacs-with-nyxt-start-and-connect-to-nyxt (&optional no-maximize)
"Start Nyxt with swank capabilities. Optionally skip window maximization with NO-MAXIMIZE."
(interactive)
(async-shell-command (format "nyxt -e \"(nyxt-user::start-slynk)\""))
@watofundefined
watofundefined / syncthing-git-backup.md
Last active July 18, 2024 15:12
Syncthing git backup recipe

Syncthing has awesome docs - start there if you haven't read them already. This is just a recipe to show how I set it up to have a git-versioned backup on Raspberry Pi.

Once machines are talking to each other via Syncthing add the folder through GUI, share it with another device, switch to that device and accept the incoming folder.

Let's say that the folder is ~/org.

On the 'backup' device in Syncthing GUI, go to Folder settings > File Versioning, choose "External File Versioning" and in Command input fill in: git-backup-org %FOLDER_PATH% %FILE_PATH%.

On the 'backup' device create the backup folder and initialize a git repository:

@rougier
rougier / clean.el
Created May 10, 2020 02:43
A very minimal but elegant emacs configuration file
(require 'org)
(setq-default indent-tabs-mode nil)
(setq org-display-inline-images t)
(setq org-redisplay-inline-images t)
(setq org-startup-with-inline-images "inlineimages")
(setq default-frame-alist
(append (list '(width . 72) '(height . 40))))
@mwfogleman
mwfogleman / gtd_basb_templates.org
Last active December 14, 2023 19:50
GTD/BASB Templates for Emacs and Org-Mode
@lehmacdj
lehmacdj / evil-mode.lisp
Last active August 6, 2019 10:00
Evil mode for nEXT browser
(in-package :next)
(defparenstatic scroll-half-page-down
(ps:chain window (scroll-by 0 (/ (ps:@ window inner-height) 2))))
(defparenstatic scroll-half-page-up
(ps:chain window (scroll-by 0 (/ (ps:@ window inner-height) -2))))
(defparenstatic scroll-page-down
(ps:chain window (scroll-by 0 (ps:@ window inner-height))))
(defparenstatic scroll-page-up
(ps:chain window (scroll-by 0 (- (ps:@ window inner-height)))))
@jasonrdsouza
jasonrdsouza / pocket_exporter.py
Last active January 31, 2024 19:13
Export archived article data from Pocket
'''This script can be used to export data from Pocket (getpocket.com)
Uses include migrating to a different "read it later" service, saving
specific articles to another service, backing up your reading history,
and more.
Currently it can be used to export links and metadata for archived
articles with a given tag, which are more recent than a given timestamp.
An example use case is to export all articles you have tagged as
"to-export", which are newer than 10 days old. The timestamp functionality
@matsen
matsen / md-nb-diffs.md
Last active February 22, 2021 21:44 — forked from iamlemec/nb2md
Markdown diffs for jupyter notebooks.

For sane jupyter notebook diffs

  • Install the nbconvert package, though you probably already have it if you are using jupyter.
  • Put the nb2md script below in your path and make executable
  • Add the following to your .gitattributes file, which can be in your home directory (use nb2md for all projects) or in the root of your project:
*.ipynb diff=nb2md
  • Run