Skip to content

Instantly share code, notes, and snippets.

View feddernico's full-sized avatar

Federico Viscioletti feddernico

View GitHub Profile
@feddernico
feddernico / orchid_style_chord_generator.jsfx
Created February 7, 2026 14:19
Create an Orchid style chord generator in a Reaper plugin
desc:Orchid-Style Chord Generator
/*
Laptop keyboard chord generator inspired by Orchid synth
LEFT HAND (Chord Types) - Lower octave:
C2 (MIDI 36) = Major
C#2 (MIDI 37) = Minor
D2 (MIDI 38) = Sus2
D#2 (MIDI 39) = Sus4
@feddernico
feddernico / ibm_q2_2024_segment_performance.md
Created July 25, 2024 21:17
Chart: Segment Performance
Segment Revenue Growth Notable Highlights
Software +8% Driven by hybrid platforms and solutions
Infrastructure +3% Strong performance in IBM Z and distributed systems
Consulting +2% Impacted by discretionary spending constraints
@feddernico
feddernico / ibm_q2_2024_key_financial_metrics.md
Created July 25, 2024 21:13
Chart: IBM Q2 2024 Key Financial Metrics
Metric Q2 2024 Year-over-Year Growth
Revenue $15.8 billion +4%
Operating Pre-tax Income $2.8 billion +17%
Operating Diluted EPS $2.43 +11%
Free Cash Flow (First Half) $4.5 billion +$1.1 billion
Cash Position $16 billion +$2.5 billion
@feddernico
feddernico / titanic_head.csv
Last active May 29, 2024 21:38
The first 5 records of the Titanic dataset
survived pclass sex age sibsp parch fare embarked class who adult_male deck embark_town alive alone
0 3 male 22.0 1 0 7.2500 S Third man True NaN Southampton no False
1 1 female 38.0 1 0 71.2833 C First woman False C Cherbourg yes False
1 3 female 26.0 0 0 7.9250 S Third woman False NaN Southampton yes True
1 1 female 35.0 1 0 53.1000 S First woman False C Southampton yes False
0 3 male 35.0 0 0 8.0500 S Third man True NaN Southampton no True
@feddernico
feddernico / namedtuples_example.py
Created October 25, 2023 09:23
The magic of namedtuples. Useful to quickly store information regarding an entity, without creating a class
from collections import namedtuple
@feddernico
feddernico / if_multiple_conditions.py
Created October 24, 2023 11:31
Evaluate an if statement with multiple conditions
# Different ways to test multiple
# flags at once in Python
foo = 0
bar = 0
baz = 1
# Option 1: evaluate one by one
if foo == 1 or bar == 1 or baz == 1:
print('statement true')
else:
@feddernico
feddernico / merge_2_dicts.py
Created October 21, 2023 11:00
Merge two dictionaries in Python3
# How to merge two dictionaries
# in Python 3
foo = {'first_el': 13, 'second_el': 33, 'third_el': 491}
bar = {'second_el': 3, 'third_el': 4, 'fourth_el': 667}
baz = {**foo, **bar}
baz
# >>> {'first_el': 13, 'second_el': 3, 'third_el': 4, 'fourth_el': 667}
@feddernico
feddernico / ID_colour_loo_encoder_output.csv
Created October 16, 2023 11:56
ID and colour leave-one-out encoder output table
ID colour target LOO_Encoded
1 black 10 26.666667
2 yellow 20 10.000000
3 red 30 26.666667
4 white 40 26.666667
5 purple 50 26.666667
6 yellow 10 20.000000
@feddernico
feddernico / ID_colour_loo_encoder_input.csv
Created October 16, 2023 11:54
ID and colour leave-one-out encoder input table
ID colour target
1 black 10
2 yellow 20
3 red 30
4 white 40
5 purple 50
6 yellow 10
@feddernico
feddernico / ID_colour_hashed.csv
Created October 16, 2023 11:50
ID and colour hashed
ID colour Hashed_Value
1 black 1
2 yellow 3
3 red 0
4 white 0
5 purple 4