Skip to content

Instantly share code, notes, and snippets.

View komuw's full-sized avatar

Komu Wairagu komuw

View GitHub Profile
@komuw
komuw / fuzz_property_test.go
Last active September 4, 2024 07:47
Golang fuzz testing and also property-based testing.
package main
import (
"testing"
"pgregory.net/rapid"
)
// Sum adds two numbers.
func Sum(a, b int64) (total int64) {
@komuw
komuw / price_of_solar_panel.py
Last active February 24, 2025 08:20
price of solar
# How many units of KPLC do you use per month?
# Go to https://www.stimatracker.com/, click on `prepaid`, then enter amount in KES you use per month.
# Click `calculate`, it will give you your consumption in kwh. Mine is KES 5000, which give ~150kwh
monthly_kplc_cost = 5000 # KES
yearly_kplc_cost = monthly_kplc_cost * 12 # KES
consumption_per_month = 150 # kWh
consumption_per_month = 150 * 1000 # watt-hours
monthly_energy_production_of_solar_panel = (solar_panel_rating_in_watts * number_of_hrs_of_sunlight * solar_panel_efficiency_factor) * 30
@komuw
komuw / guide.txt
Last active October 2, 2024 11:39
Book summary: Finally Focussed by Dr. James Greenblatt MD.
Book: Finally Focussed by Dr. James Greenblatt MD.
Checkout: https://examine.com/ , no ads, non-industry affliated review of supplements backed by research
Checkout: https://consumerlab.com , no ads, non-industry affliated review of supplements backed by research
Checkout: https://www.webmd.com/vitamins/index
Nutrient Reference Value(NRV): are used to express the nutritional value of a food product as a percentage of the daily recommended intake for an average adult. It is by the European Food Safety Authority.
A. Magnesium/vitamin b6 guide.
1. Mg(glycinate,citrate,gluconate,l-threonate, but NOT oxide). Under 6yrs: 10mg daily in liquid form.
Liquid ionic magnesium from New beginnings co.
@komuw
komuw / spending.py
Last active February 6, 2025 09:00
cost/spending of public primary, jss and secondary education in kenya
# we are going to try estimate the amount of money the govt(ahem, taxpayer) spends per public school student per year/term.
# We are only interested in the figures for students in PUBLIC primary, jss AND secondary schools.
# All the figures here come from the 2024/25 supplementary estimates I.
# see: https://mwangocapital.com/wp-content/uploads/2024/07/fy-24-25-supplementary-1-.pdf
# aka, the one that was sent to parliament after the 2024/25 finance bill was rejected.
# Number of learners.
# We are only interested in primary, jss & secondary school figures.
# See page 221 of the supplementary estimates.
learners_in_public_primary_sch = 6_450_133 # 6million
@komuw
komuw / aba.md
Last active March 22, 2025 16:03
aba

course: https://edslearning.thinkific.com

  1. module 1: overview of autism and how ABA is used.
  2. module 2: science of ABA and principles used to make change.
  3. module 3: measurement and data collection. Without data, its hard to know if we are makin a difference.
  4. module 4: skill assessment. So as to know learners areas of weakness & strengths.
  5. module 5: different methodologies used to teach ABA.
  6. module 6: abhorrent behaviours and ways of reducing them.
  7. module 7: documentation and reporting requirements.