Skip to content

Instantly share code, notes, and snippets.

View BioGeek's full-sized avatar
🧬
Just another Genome hacker,

Jeroen Van Goey BioGeek

🧬
Just another Genome hacker,
View GitHub Profile
@BioGeek
BioGeek / FileOps.ipynb
Created September 12, 2022 08:50
Code review of FileOps code
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
# -----------------------------------------------------------------------------
# Author: Nicolas P .Rougier
# Date: 04/03/2014
# -----------------------------------------------------------------------------
import numpy as np
import time

Keybase proof

I hereby claim:

  • I am BioGeek on github.
  • I am jeroenvangoey (https://keybase.io/jeroenvangoey) on keybase.
  • I have a public key whose fingerprint is FB69 844E A743 0424 B6E3 553A 09DE 5B3F 6E92 96E2

To claim this, I am signing this object:

@BioGeek
BioGeek / day_of_week.py
Last active September 15, 2017 11:47
Algorithm that returns the day of the week for a given date. Works for the Gregorian calendar which began on September 14, 1752 up till December 31, 2299.Based on the description found at http://www.kungfoomanchu.com/z-creations/mentalcalculationofdate.pdf
import datetime
import calendar
months = [6, 2, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4]
weekdays = ["Sunday", "Monday", "Tuesday", "Wednesday",
"Thursday", "Friday", "Saturday", "Sunday"]
centuries = {17: 5,
18: 3,
19: 1,
20: 0,