CyberSpy

Rantings from a guy with way too much free time

Making Heads or Tails out of Recursion and Combinatorial Math

2017-11-09 Programming Math Python

GNU — GNU’s Not Unix

I thought I’d take a look at two topics at once and make some fun by mashing them together. Today’s topic is recursion. In computer science (and in math, although we call the equation a recurrence relation) recursion is an often misunderstood concept causing lots of panic and anxiety. In reality - it’s pretty easy once you wrap you head around the idiom.

What is recursion?

When we define a function in such a way that it calls itself, we’ve defined a recusive function. The most basic example is the Factorial function, $f(n)=n!$. We define the function recursively by defining it in reference to itself. So, recursively, we define $f(n)$ as:

Continue reading

Do the Numpy

2017-11-07 Programming Python

Do the Numpy Dance, Is your Chance to do the Nump!

Sir Numpy says:

The Numpy Dance is your chance to do the nump Do the Numpy Nump, come on and do the Numpty Nump Do the Numpy Nump, just watch me do the Numpty Nump Do ya know what I’m doin’, doin’ the Numpty Nump Do the Numpy Nump, do the Numpty Nump

Start at the beginning: NumPy

The first library that we will investigate is numpy. Simply put, numpy allows us to represent mathematical objects like arrays and matricies of different datatypes and performs operations on those objects thereby easing the burden of writing the tedious code within your applications to do the mundane representations and operations.

Continue reading

Data Science with Python: Let there be Light

2017-11-05 Programming

Data-Science - Clueless? No prob. We got you dude.

So you’ve likely heard all the hype about “data-science” - and if you’re not among the cool kids, it might be a wee-bit overwhelming to you. Where to even start? What does it all mean? How do you even begin to understand what you need to know to begin learning more and making progress in the field.

Let’s start off with a few definitions:

Continue reading