Skip to content

Instantly share code, notes, and snippets.

View BenjaminWegener's full-sized avatar
🙃
I may be slow to respond.

@BenjaminWegener BenjaminWegener

🙃
I may be slow to respond.
View GitHub Profile
@BenjaminWegener
BenjaminWegener / CAS.glsl
Created July 25, 2022 19:37 — forked from kevinlekiller/CAS.glsl
AMD's Contrast Adaptive Sharpening filter ported to mpv along with ReShade modifications
// LICENSE
// =======
// Copyright (c) 2017-2019 Advanced Micro Devices, Inc. All rights reserved.
// -------
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy,
// modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
// -------
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
@BenjaminWegener
BenjaminWegener / RPi-install-wifi.sh
Last active May 19, 2024 23:56 — forked from kmonsoor/RPi-install-wifi.sh
install wifi adapter drivers on Raspberry Pi; origin: http://www.fars-robotics.net/install-wifi
#!/bin/bash
#set -e
# install-wifi - 03/05/2021 - by MrEngman.
UPDATE_SELF=${UPDATE_SELF:-1}
UPDATE_URI="http://downloads.fars-robotics.net/wifi-drivers/install-wifi"
ROOT_PATH=${ROOT_PATH:-"/"}
WORK_PATH=${WORK_PATH:-"${ROOT_PATH}/root"}

Install armhf debian system on qemu

Environment

Operation system: Raspbery Pi OS (Debian 10)

QEMU emulator version: 2+

Installation

@BenjaminWegener
BenjaminWegener / entfox.py
Last active November 1, 2022 11:28 — forked from justheuristic/entfox.py
updated for > tf2.0
import tensorflow as tf
def entmax15(inputs, axis=-1):
"""
Entmax 1.5 implementation, heavily inspired by
* paper: https://arxiv.org/pdf/1905.05702.pdf
* pytorch code: https://github.com/deep-spin/entmax
:param inputs: similar to softmax logits, but for entmax1.5
:param axis: entmax1.5 outputs will sum to 1 over this axis
:return: entmax activations of same shape as inputs
@BenjaminWegener
BenjaminWegener / bpe.js
Created December 15, 2020 15:43 — forked from atdt/bpe.js
var assert = require( 'assert' );
function findFrequentBigram( s ) {
var i, freqs = {}, topFreq = 0, topPair = null, bigram;
for ( i = 0; i < s.length; i += 2 ) {
bigram = s.slice( i, i + 2 );
freq = ++freqs[bigram];