Categories
Uncategorized

Random Bézier Walk in a Random Neural Network

The video above was generated using neuralart.

Categories
Uncategorized

Neural Art

neuralart is a Python library and utility for rendering generative art from a randomly initialized neural network.

It’s based on the following blog posts and pages from studio otoro.

The package is available on PyPI, the Python Package Index. It can be installed with pip.

$ pip install neuralart

For example command line usage, see neuralart#example.

For example library usage, see example.py.

Categories
Uncategorized

echo and printenv in x86 Assembly

This post contains implementations of echo and printenv in 32-bit x86 assembly for Linux.

echo is a Unix utility that prints its arguments to standard output.

printenv is a Unix utility that prints the environment to standard output.

The core functionality of these programs can be written in a few lines of C, where program arguments and the environment are passed as function arguments to main.

When a process is executed on Linux (or other Unix-like systems), its stack contains pointers to the program arguments and the environment, as shown below.

        |--------------------------|     Low
0(%esp) |      Argument Count      |  Addresses
        |--------------------------|
4(%esp) |     Argument Pointers    |
        |           ...            |
        |--------------------------|
        |            0             |
        |--------------------------|
        |   Environment Pointers   |
        |           ...            |
        |--------------------------|
        |            0             |
        |--------------------------|
        |     Additional Data      |
        |           ...            |     High
        |--------------------------|  Addresses
Categories
Uncategorized

k-means Image Color Quantization

I implemented a web page that can apply color quantization to images using k-means clustering. Here’s the link:
https://dstein64.github.io/k-means-quantization-js/

The JavaScript source code is available on GitHub:
https://github.com/dstein64/k-means-quantization-js

Categories
Uncategorized

Factorization Machines with Theano

Update 11/4/2019: The github repo was renamed from PyFactorizationMachines to pyfms.

Update 4/20/2017: The library is now available on PyPI, the Python Package Index. It can be installed with pip.

$ pip install pyfms

A Factorization Machine (FM) is a predictive model that can be used for regression and classification (Rendle 2010). FMs efficiently incorporate pairwise interactions by using factorized parameters.

PyFactorizationMachines is a Theano-based Python implementation of factorization machines. documentation, see documentation.md.

For example usage, see example.py.