Skip to content

Instantly share code, notes, and snippets.

View has2k1's full-sized avatar

Hassan Kibirige has2k1

View GitHub Profile
import numpy as np
class geom(object):
"""Base class of all geoms"""
DEFAULT_AES = dict()
REQUIRED_AES = set()
DEFAULT_PARAMS = dict()
data = None
aes = None
@has2k1
has2k1 / integer_test.f90
Created May 28, 2014 07:58
Understanding fortran integers
! compile and run using either of the following commands
! and investigate the output.
!
! gfortran integer_test.f90; a.out
! gfortran -fdefault-integer-8 integer_test.f90; a.out
program main
implicit none
! define some integer types

Keybase proof

I hereby claim:

  • I am has2k1 on github.
  • I am has2k1 (https://keybase.io/has2k1) on keybase.
  • I have a public key whose fingerprint is 627C 61BD CA3F 3F1C CDC4 A099 BF6C 6B75 366D BE25

To claim this, I am signing this object:

@has2k1
has2k1 / metaprogramming.ipynb
Last active June 29, 2022 18:11
Automatic registration for single dispatch
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import pandas as pd
from plotnine import *
df = pd.DataFrame({'x': range(5), 'y': range(5), 'z': list('ccddf')})
df['z'] = pd.Categorical(df['z'], categories=list('cdf'), ordered=True)
p = (ggplot(df, aes('x', 'y', color='z'))
+ geom_point()
)
p
@has2k1
has2k1 / quartodoc-docstring-spec.html
Last active August 25, 2023 13:33
Quartodo Docstring Specification
<!-- package.module.some_function -->
<!--
The docstring for some_function, the type information may come
from type annotations.
"""
Title of Some Function
Some more description of some function