dsp-uga / elizabeth

Scalable malware detection
MIT License
0 stars 0 forks source link

Add load_data, load_labels, and split_bytes #2

Closed cbarrick closed 6 years ago

cbarrick commented 6 years ago

I've added three functions to get us started. I have not tested these yet, but I thought to submit the PR anyway. I'll test them after dinner.

You can pull this code into your local git repo to use and test.

First, make sure you have my remote if you don't already:

$ git remote add cbarrick https://github.com/cbarrick/elizabeth.git

Next, download my preprocess branch and switch to it:

$ git fetch cbarrick preprocess
$ git checkout cbarrick/preprocess

Now you can use and test the code.

If you want to create new work based on this, make a new branch:

$ git checkout -b my_new_branch

I'll do my own testing later tonight. Hopefully this can merge as-is. If you need help with git or GitHub, HMU on slack!

cbarrick commented 6 years ago

Tested and fixed

cbarrick commented 6 years ago

Rebased on master

cbarrick commented 6 years ago

A closure is just a function that uses variables outside of it's definition. In this case, the lambda uses the variables base, kind, and x, but only x is local to it's definition. The other two are defined outside the lambda, making it a closure.

Typically, we use the word "closure" for any function being passed around like any other object (e.g. being returned) even when the function is not a true closure.

In our case, it's a closure by both definitions.

This is related to the concept of decorators in Python.