Instantly share code, notes, and snippets.

🙏
John Lewis 🇺🇲

# Dan Kowalczykbinary10

🙏
John Lewis 🇺🇲
• Sort options
Created Jul 31, 2020
View john-lewis.md

So I say to you, walk with the wind, brothers and sisters, and let the spirit of peace and the power of everlasting love be your guide.

John Lewis RIP

Created Jan 17, 2018
View py3k-matrix-multiplication.py
 import numpy as np A = np.eye(20) A @ A # `@` is the matrix multiplication operator
Last active Oct 17, 2017

# Project Name

A one or two line description.

## Features

Enables you to do...

## Setup

### Requirements

Last active Oct 7, 2017
View base64.py
 import base64 # Create a string and encode to bytes s = 'Convert me to base64!' sb = s.encode('utf-8') # Take bytes and encode to base64 string sb64 = base64.b64encode(sb).decode() # Q29udmVydCBtZSB0byBiYXNlNjQh
Created Nov 4, 2016
View convolution-theorem.py
 import numpy as np import scipy as sp # Initialize a signal v = np.random.randint(0,255, 2**5) # Convolve with self cv = sp.convolve(v,v) # Copy and pad signal
Created Oct 20, 2016
View encode-decode.py
 def scramble2Decrypt(cipherText): halfLength = len(cipherText) // 2 oddChars = cipherText[:halfLength] evenChars = cipherText[halfLength:] plainText = "" for i in range(halfLength): plainText = plainText + evenChars[i] plainText = plainText + oddChars[i] if len(oddChars) < len(evenChars): plainText = plainText + evenChars[-1]
Created May 27, 2016
View elimination-matrix.py
 def elim(row, minus_row, scale, n=3): m = np.eye(n) m[row, minus_row] = -scale return m
Last active Oct 19, 2016
View composite.py
 """ Test how to composite matrices with 'where' Test generator builds random incrementing matrices The compositor takes output from this generator and performs the compositing. Display an image map of the matrices """ import numpy as np from matplotlib import pyplot as pl
Last active May 24, 2016
Numpy ufunc.at()
View xor-tri-matrix.py
 """ Initiating a 9000x9000 triangular matrix and applying XOR across all elements """ """ Using ufunc without at() """ %%timeit a = np.tri(9000,dtype=int) a = np.bitwise_xor(a,1) # 1 loops, best of 3: 373 ms per loop
Last active Aug 29, 2015
IronPython, Accord.NET, and LINQ expressions
View iron-accord-linq