Skip to content

Instantly share code, notes, and snippets.

View tpb1908's full-sized avatar

Theo Pearson-Bray tpb1908

View GitHub Profile
@fesago90
fesago90 / gist:ae7a56628c35e65ddaab
Last active February 20, 2019 14:29
shared element transition mem leak fix
package com.dopplerlabs.hereactivelistening.hacks;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.Matrix;
import android.graphics.RectF;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
year = 2017
rpi = 0.02
inflation = 0.027778
maintance = 8570
start_fee = 9250
def loan(target, maint=maintance):
return (start_fee * (1 + inflation) ** (target - year)) + maint