Skip to content

Instantly share code, notes, and snippets.

View 10bn's full-sized avatar

10bn 10bn

  • Berlin
View GitHub Profile
{
"global": {
"ask_for_confirmation_before_quitting": true,
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false,
"unsafe_ui": false
},
"profiles": [
{
@10bn
10bn / .md
Last active November 20, 2021 12:59
How to find recipe matches?

Finding matching recipe combinations

TLDR: How to find all (n_results) subsets of a_list with a given length of n_values in the range of n_values_delta, which sum_n_values equals a target_value in the range of target_value_delta. The index at which the n_values of each subset have been found in a_list is also needed.

a_list = pd.Series()
n_values_delta = upper and lower limit for every value in a subset.
sum_n_values = target_value b   
target_values_delta = upper and lower limit to approximately match the target value.
index = the index where the values of a subset have been found in a_list.
n_results = max amount of subsets to find.
@10bn
10bn / .h
Created October 17, 2021 19:06
Miryoku PAW3204 Polynominal Acceleration Settings
#if defined(MH_PD_PAW3204)
/* #define MH_PD_ROTATE 270
#define MH_ACCELERATION_POLYNOMIAL_LINEAR 1 / 4
#define MH_ACCELERATION_POLYNOMIAL_EXPONENTIAL 1 / 50
#define MH_PD_LOW_NUMERATOR 1
#define MH_PD_LOW_DENOMINATOR
#define MH_PD_BUTTON_DEAD 4
*/
#define MH_PD_ROTATE 180
#define MH_ACCELERATION_POLYNOMIAL_LINEAR 0.2
@10bn
10bn / gist:125fa6bc728a6fe1fa57876f5347278e
Last active October 8, 2021 09:04
Miryoku PIM447 Polynominal Acceleration Settings
#if defined(MH_PD_PIM447)
#define MH_PD_ROTATE 270
#define MH_ACCELERATION_POLYNOMIAL_LINEAR 1.7 // 3 / 2
#define MH_ACCELERATION_POLYNOMIAL_EXPONENTIAL 1000 // 500
#define MH_ACCELERATION_POLYNOMIAL_EXPONENT 4
#define MH_ACCELERATION_POLYNOMIAL_AVERAGING 10 // 2
#define MH_ACCELERATION_LINEAR_NUMERATOR 1
#define MH_ACCELERATION_LINEAR_DENOMINATOR 1
#define MH_PD_LOW_NUMERATOR 1
#define MH_PD_LOW_DENOMINATOR 2
Looking for git in: git
Using git 2.20.1 from git
> git rev-parse --git-dir
Open repository: /config
> git status -z -u
> git check-ignore -v -z --stdin
> git symbolic-ref --short HEAD
> git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track) refs/heads/master refs/remotes/master
> git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname)
> git remote --verbose