Skip to content

Instantly share code, notes, and snippets.

View sushihangover's full-sized avatar

Robert N. sushihangover

View GitHub Profile
%{
using System;
using System.IO;
using System.Linq;
using System.Collections.Generic;
namespace MarkdownParser
{
class Counter
{
@JonDouglas
JonDouglas / xamarinandroidbindings.md
Last active March 12, 2024 10:36
Xamarin Android Bindings Troubleshooting

Approaching a Xamarin.Android Bindings Case

1. Investigation

One of the best ways to investigate a problematic Xamarin.Android Binding is to first ensure you have the proper tooling available:

Movie Recommendations with k-Nearest Neighbors and Cosine Similarity


Introduction

The k-nearest neighbors (k-NN) algorithm is among the simplest algorithms in the data mining field. Distances / similarities are calculated between each element in the data set using some distance / similarity metric ^[1]^ that the researcher chooses (there are many distance / similarity metrics), where the distance / similarity between any two elements is calculated based on the two elements' attributes. A data element’s k-NN are the k closest data elements according to this distance / similarity.


1. A distance metric measures distance; the higher the distance the further apart the neighbors. A similarity metric measures similarity; the higher the similarity the closer the neighbors.
@TheDonDope
TheDonDope / escape.from.tarkov.keybindings.md
Last active January 20, 2023 19:00
Escape from Tarkov Keybindings

Escape from Tarkov Controls Cheat Sheet

BEGINNER'S GUIDE - ALL CONTROLS + TIPS (Escape from Tarkov)

Controls

  • Hold Shift when zoomed in with Mouse Right Click to hold breath and steady aim
  • Press B to switch between firing modes 🔥 (You will always start a raid in single fire mode)
    • The animation when switching to 🔥 🔥 🔥 fire is an ⬆️ flick
  • The animation when switching to 🔥 fire is an ⬇️ flick
@sushihangover
sushihangover / ClearableEditText.cs
Created February 23, 2018 22:57
Xamarin.Android translation of DroidParts ClearableEditText
// DroidParts is under Apache License 2.0
// https://github.com/droidparts/droidparts/blob/master/droidparts-misc/src/org/droidparts/widget/ClearableEditText.java
public class ClearableEditText : EditText, View.IOnTouchListener, View.IOnFocusChangeListener, ITextWatcher
{
public ClearableEditText(IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer) : base(javaReference, transfer) { Initialize(); }
public ClearableEditText(Context context) : base(context) { Initialize(); }
public ClearableEditText(Context context, Android.Util.IAttributeSet attrs) : base(context, attrs) { Initialize(); }
public ClearableEditText(Context context, Android.Util.IAttributeSet attrs, int defStyleAttr) : base(context, attrs, defStyleAttr) { Initialize(); }
public ClearableEditText(Context context, Android.Util.IAttributeSet attrs, int defStyleAttr, int defStyleRes) : base(context, attrs, defStyleAttr, defStyleRes) { Initialize(); }