Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working on Projects

Emmanuel EmmanuelMess

🏠
Working on Projects
View GitHub Profile
@EmmanuelMess
EmmanuelMess / VariableAlphaImage.ino
Last active Mar 12, 2021
It displays an image with alpha
View VariableAlphaImage.ino
// include the library code:
#include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
// make some custom characters:
byte BlankTopLeft[8] = {
0b00000,
@EmmanuelMess
EmmanuelMess / calculator.kt
Last active Oct 28, 2018
A calculator using shunting yard and inverse polish (aka postfix) notation
View calculator.kt
import java.math.BigInteger
import java.util.*
import kotlin.IllegalArgumentException
sealed class Values(value: Any) {
data class Boolean(val value: kotlin.Boolean): Values(value) {
override fun toString() = value.toString()
}
data class Decimal(val value: BigInteger): Values(value) {
override fun toString() = value.toString()
@EmmanuelMess
EmmanuelMess / DensityPixelsUtils.kt
Created Oct 1, 2018
Intuitive Dp to Px and Px to Dp converter in kotlin
View DensityPixelsUtils.kt
import android.content.res.Resources
val Int.px: Pixels
get() = Pixels(this.toFloat())
val Int.dp: DensityPixels
get() = DensityPixels(this.toFloat())
/*inline*/ class Pixels(val value: Float) {
@EmmanuelMess
EmmanuelMess / main.cpp
Created Sep 4, 2018
Competitive unsuperviced learning of MINST w/Oja's algorithm (18.45% error)
View main.cpp
#include <iostream>
#include <vector>
#include <cmath>
#include <random>
#include <csetjmp>
#include "mnist/mnist_reader.hpp"
using namespace std;
@EmmanuelMess
EmmanuelMess / main.cpp
Last active Aug 20, 2018
Competitive unsupervised learning without Oja's algorithm
View main.cpp
#include <iostream>
#include <vector>
#include <random>
typedef double T;
class VectorWrongSizeException : public std::exception {
const char* what() const noexcept override {
return "Different vector sizes!";
}
@EmmanuelMess
EmmanuelMess / main.cpp
Last active Jul 21, 2018
Perceptron learning algorithm with Pocket implementation with heuristic
View main.cpp
#include <iostream>
#include <vector>
#include <random>
enum Halfspace {N, P};
typedef double T;
class VectorWrongSizeException : public std::exception {
const char* what() const noexcept override {
@EmmanuelMess
EmmanuelMess / main.cpp
Created Jul 13, 2018
Perceptron learning algorithm implementation with heuristic
View main.cpp
#include <iostream>
#include <vector>
#include <random>
enum Halfspace {N, P};
typedef double T;
class VectorWrongSizeException : public std::exception {
const char* what() const noexcept override {
@EmmanuelMess
EmmanuelMess / main.cpp
Last active Jul 12, 2018
Perceptron learning algorithm (the worst one) implementation with heuristic
View main.cpp
#include <iostream>
#include <vector>
#include <random>
enum Halfspace {N, P};
typedef double T;
class VectorWrongSizeException : public std::exception {
const char* what() const noexcept override {
@EmmanuelMess
EmmanuelMess / NASM-MIPS.md
Last active Sep 16, 2020 — forked from t-mullen/NASM-MIPS.md
Fixed titles
View NASM-MIPS.md
View FileNamesForLimitedCharacters.cpp
#include <iostream>
#include <algorithm>
#include <stdio.h>
#include <string.h>
#include <map>
#include <queue>
using namespace std;
struct TRIE {