Skip to content

Instantly share code, notes, and snippets.

View wuurrd's full-sized avatar

David Emanuel Buchmann wuurrd

  • Ntropy Network
  • Oslo, Norway
View GitHub Profile
@wuurrd
wuurrd / matrixmultiplication.py
Last active June 21, 2021 14:58
Matrix multiplication
import numpy as np
import unittest
A = np.random.randn(5, 5)
B = np.random.randn(5, 3)
C = A @ B
def matrix_multiply(A, B):
# TODO: Implement me
### Keybase proof
I hereby claim:
* I am wuurrd on github.
* I am wuurrd (https://keybase.io/wuurrd) on keybase.
* I have a public key whose fingerprint is BFB1 38FD 1AEB C090 B852 3155 166B 8975 063B D3D1
To claim this, I am signing this object:
{
/* Keybindings for emacs emulation. Compiled by Jacob Rus.
*
* To use: copy this file to ~/Library/KeyBindings/
* after that any Cocoa applications you launch will inherit these bindings
*
* This is a pretty good set, especially considering that many emacs bindings
* such as C-o, C-a, C-e, C-k, C-y, C-v, C-f, C-b, C-p, C-n, C-t, and
* perhaps a few more, are already built into the system.
*
@wuurrd
wuurrd / symmetric_group.py
Created September 28, 2012 14:21
This plaything finds the first way one can combine elements in S_4 to create the (12) permutation (group theory).
from itertools import combinations_with_replacement, chain, permutations
def flatten(l):
a = []
for b in l:
for c in b:
a.append(c)
return a
class PermutationElement(object):