Skip to content

Instantly share code, notes, and snippets.

View c58's full-sized avatar
🏠
Working from home

Artem Artemyev c58

🏠
Working from home
  • Building Open Web Inc.
View GitHub Profile
@c58
c58 / fastgen.pxd
Last active August 11, 2020 04:02
Very fast basic genetic algorithm implementation on CYthon
cdef class GeneticAlgorithm(object):
cdef:
public BasicGeneticFunction genetics
Population* population
cpdef run(self)
cpdef iteration(self)
cpdef stat(self)
@c58
c58 / fastpnn.pyx
Last active August 29, 2015 14:01
Fast (very fast) Probabilistic Neural Network implementation on CPython (based on encog project). Using parallel class computation. Learning will be later.
# encoding: utf-8
# cython: profile=False
# cython: wraparound=False
# cython: boundscheck=False
# filename: fastpnn.pyx
from libc.stdlib cimport malloc, realloc, free, rand
cimport cython
from cython.parallel import parallel, prange
from cython.view cimport array as cvarray
@c58
c58 / pyforge.pyx
Last active August 29, 2015 14:00
AForge.NET port (Basic Neural Network) with improovements to CYthon
# encoding: utf-8
# cython: profile=True
# cython: wraparound=False
# cython: boundscheck=False
# cython: infer_types=True
# filename: pyforge.pyx
from libc.stdlib cimport malloc, free, rand
cimport cython