Skip to content

Instantly share code, notes, and snippets.

@JuxhinDB
JuxhinDB / Stack
Last active August 29, 2015 14:08
A Stack class without using arrays
/*
* This could have indeed been written in a much neater manner.. the direct variable assignment is something I never
* enjoyed doing but I just wanted to get things to work without alot of boilerplate code.
*
* No, I did not approach this challenge using any vector list, would've been easier. Same goes for one-dimensional
* arrays..
*/
public class Stack {
Element top;
int size;
@JuxhinDB
JuxhinDB / KohonenGrossberg-NN.py
Last active February 24, 2020 01:07
A naive Kohonen-Grossberg Counterpropogation Network in Python
__author__ = 'Juxhin Dyrmishi Brigjaj'
import sys
import math
import random
import argparse
def parse_args():
parser = argparse.ArgumentParser(description='A naive Kohonen-Grossberg Counterpropogation Network in Python')
@JuxhinDB
JuxhinDB / 2d-unnormalised-dataset.csv
Created December 23, 2018 15:27
Sample Dataset for KohonenGrossberg
-0.82 0.49
-0.77 0.47
-0.73 0.55
-0.71 0.61
-0.69 0.59
-0.68 0.60
-0.66 0.58
-0.61 0.69
0.28 0.96
0.31 0.95
@JuxhinDB
JuxhinDB / 2d-large-unnormalised-dataset.csv
Created December 23, 2018 15:54
KohonenGrossberg-NN Large Dataset
474.0 604.0
412.0 362.0
442.0 000.0
283.0 384.0
529.0 844.0
535.0 101.0
131.0 721.0
368.0 923.0
940.0 967.0
666.0 244.0
@JuxhinDB
JuxhinDB / fast_parity.s
Last active April 17, 2021 15:50
ASM generated by a slow parity algorithm
hamming_code_simd::hamming::fast_parity (src/hamming.rs:66):
eor x8, x0, x0, lsr, #1
eor x8, x8, x8, lsr, #2
eor x8, x8, x8, lsr, #4
eor x8, x8, x8, lsr, #8
eor x8, x8, x8, lsr, #16
lsr x9, x8, #32
eor w8, w9, w8
and x0, x8, #0x1
ret