Skip to content

Instantly share code, notes, and snippets.

View MarcvdSluys's full-sized avatar
💭
Alive and coding...

Marc van der Sluys MarcvdSluys

💭
Alive and coding...
View GitHub Profile
##--------------------------------
# general options
start: 1187000000
stop: 1187001000
instruments: H1L1
min-instruments: 1
##--------------------------------
@MarcvdSluys
MarcvdSluys / 000_readme.txt
Created November 14, 2021 11:44
Reconstruction of model of infections at a large event in the Netherlands, quoted in the Volkskrant on Fri 2021-11-12.
* Results
+ Original: VK assumption that vaccinated carry the virus as often as non-vaccinated outside the event.
+ Updated: vaccinated carry the virus 25% as often as non-vaccinated outside the event (like inside).
|----------+------------+--------------------+------------------+-------------------------|
| Model | Var. | Infections | Hospitalisations | Comments |
|----------+------------+--------------------+------------------+-------------------------|
| Original | No testing | 833 + 1110 = 1943 | 1 + 20 = 21 | Mine, no VK equivalent |
| Original | 3G | 531 + 708 = 1239 | 0 + 13 = 14 | Perfect match |
| Original | 2G | 807 + 0 = 807 | 1 + 0 = 1 | ~ match ('800') |
| Original | Asian VK | 175 + 155 = 330 | 0 + 4 = 4 | Numbers (~) from VK |
Reconstruction of model of infections at a large event in the Netherlands, quoted in the Volkskrant on Fri 2021-11-12.
https://www.volkskrant.nl/nieuws-achtergrond/waarom-de-coronapas-geen-redding-bracht-en-of-2g-wel-gaat-werken~bb63b508/
Point of interest: the VK seems to implicitly assume that vaccinated people get infected 75% less often than
non-vaccinated people at the event, but not outside. See what happens when using 25% for both (assumption 2).
Assumptions:
- number of people at the event: 300000.0
- if vaccinated, relative probability of infection at contact (NL): [1. 0.25]
- if vaccinated, relative probability of infection at contact (event): 0.25
@MarcvdSluys
MarcvdSluys / snippet.py
Created February 4, 2021 07:40
Pandas date/time str -> localised datetime object
# Read file:
df = pd.read_csv(inFile, header=0, sep=r'\s*,\s*', engine='python')
# Make period_end a datetime object (with tz=UT) and convert the dates to CET:
cet = tz.timezone('Europe/Amsterdam')
df.date = pd.to_datetime(df.date, utc=True) # utc=True needed because midnight timestamps have no time and no tz!
df.date = df.date.dt.tz_convert(cet) # Works when already converted to UT by to_datetime!
# Make a plot of DNI and DHI:
@MarcvdSluys
MarcvdSluys / finalAssignment_AccuracyPtolemaios.py
Created April 19, 2020 08:24
HistAstro/Ptolemaios: loop over dates
# MvdS: use a loop:
year = [-103,-102,-101,-100, -99, -98, -97, -96, -94, -93, -92]
month = [ 5, 6, 7, 8, 9,10,11,12, 1, 2, 3]
day = [ 2, 7,13,18,24,28,27,27,26,26,30]
Mod = np.zeros(len(year)) # Create array with zeros to collect modern positions
for iDat in range(len(year)):
JD = julianDay(year[iDat],month[iDat],day[iDat])
Lpl,Bpl,Rpl = computeLBR(JUP,JD)
Lea,Bea,Rea = computeLBR(EAR,JD)
l,b,r = hc2gc(Lpl,Bpl,Rpl,Lea,Bea,Rea)
@MarcvdSluys
MarcvdSluys / .ackrc
Created May 13, 2018 08:55
Qt cpp class for ack
# Define Qt class: match files *.cpp, except moc_*.cpp, *.h except ui_*.h, and *.ui:
--type-set=qt:match:/^(?!moc_).*\.cpp$/
--type-add=qt:match:/^(?!ui_).*\.h$/
--type-add=qt:match:/.*\.ui$/