Skip to content

Instantly share code, notes, and snippets.

View MattBlack85's full-sized avatar
🦉
owly crap

Mattia Procopio MattBlack85

🦉
owly crap
  • Kraków
View GitHub Profile
@PM2Ring
PM2Ring / julian_day.py
Created March 6, 2022 08:13
Julian Day Number conversion, Gregorian & Julian
""" Julian day number to date conversion
Proleptic Gregorian and Julian, with Astronomical years
i.e., 1 AD = year 1, 1 BC = year 0, 2 BC = year -1, etc
Derived from RG Tantzen (1963), ACM.
Algorithm 199: conversions between calendar date and Julian day number.
https://en.wikipedia.org/wiki/Julian_day
Julian day number 0 assigned to the day starting at noon on
January 1, 4713 BC, proleptic Julian calendar
@thalamus
thalamus / ArchLinuxARM-M1
Last active March 11, 2024 16:55
How to boot Arch Linux ARM in QEMU (patched for M1)
/*
* This document is provided to the public domain under the
* terms of the Creative Commons CC0 public domain license
*/
How to boot Arch Linux ARM in QEMU (patched for M1)
Prerequisites:
QEMU - patched for M1 processors - patches: https://github.com/utmapp/qemu
@todgru
todgru / aws-ec2-redis-cli.md
Created June 12, 2014 23:01
AWS redis-cli on EC2
(defun make-random-bitarray (n)
"Generate a random list of bits of length N"
(let ((arr nil)
(i 0))
(loop while (not (eq i n)) do
(progn (incf i 1) (push (random 2) arr)))
arr))
(defun make-random-adj-mat (n)
"Generate a random adjacency matrix (for a digraph) of size n"