Skip to content

Instantly share code, notes, and snippets.

View DecoderMG's full-sized avatar
🥤
Drinking Coffee

Dakota Gallimore DecoderMG

🥤
Drinking Coffee
View GitHub Profile
@DecoderMG
DecoderMG / scrim.xml
Last active May 23, 2019 12:22
Scrim to make text overlaying an image more legible (For Android)
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="90"
android:endColor="@android:color/transparent"
android:startColor="#66000000"/>
</shape>
@DecoderMG
DecoderMG / rotate90
Last active October 23, 2017 16:53
In-place algorithm that rotates an NxN integer matrix array by 90 degrees.
/**
* In-place algorithm that rotates an NxN integer matrix array by 90 degrees.
* @param array - input array to rotate
* @return - array rotated 90 degrees
*/
public static int[][] rotate90(int[][] array) {
int topLeftTemp;
for(int i = 0; i < array.length - i; i++) {
int arrayBound = array.length - 1;
for(int j = i; j < arrayBound-i; j++) {
@DecoderMG
DecoderMG / Kalman-filter.py
Last active May 24, 2018 18:38
Kalman filter built in python 3 that will output the predicted path of an object based off old data. It's just a normal kalman filter really :)
# Scalable Kalman Filter written in python 3 that takes in multiple matrixes and outputs both a predicted state estimate and predicted estimate covariance.
# NOTE: matrixes passed into the Kalman filter MUST adhear to linear algebra matrix multiplication rules.
# Uncomment import if matrix has not been imported yet.
# from Matrix import matrix
# inputs:
# measurements: Sensor world data.
# x: Initial state.
# P: Initial uncertainty.