Pandemic Diary #87 – risks (16 Sep 2022)

wow

okay a lot has happened (i saw the last date was end of july)

went home to GA (took a test 2 or 3 days in), then to a wedding (with ~100 people, almost all unmasked) – had a false positive scare too (expired test, but I did have a known exposure to someone who tested positive two or three days later; the false positive was a sickening feeling of, was I selfish to still go through with this and risk my friend attending as a bridesmaid also, followed by how logistically and expensive it would be to quarantine in NYC), then to NYC to stay with friends (ate in a restaurant without a mask on), then hung out with MITERS folks, then back to MA on a train (managed to sit next to a roboticist even). then shortly thereafter flew to Toronto, where I stayed in a hostel in a 8-bed dorm room, mostly tried to keep n95 on but didn’t manage the first night as I had the comfier but also looser one. then woke up to someone with a wet cough in the room.

so, a lot of aggressive risk taking. I had covid not too long ago and it hadn’t turned out too bad thanks to pax and a less virulent strain. that made me feel more aggressive about risk-taking. and i did miss it. i had a lot of fun eating at a restaurant with a friend and being at a party (oh shoot, need to remember to donate money in my friend’s honor, now that my paycheck is stable again)

tumultous times

school started, and somehow everything is a-ok. are there parts that could be better? certainly. but it’s not so bad, and perhaps thinking about what i could have or should be or need to be doing is detracting away from enjoying my present. it has been nice to see faces haven’t seen in a long time. actually less than i expected, but still the feeling is there. (and some movement on old projects / the force sensors, unexpected and coolllll, I guess that is a reason to publish). running services / api’s / websites for people. not just doing side projects

but honestly, after this paper process, feeling like I knew how to make a difference in the past: writing blog posts, emailing people, holding competitions or hackathons, connecting people, sponsoring others, being creative. these are all things I miss in my insecurity of publishing and finding Internships.

being able to pay it forward by treating the UROPs with respect. that has been good. (but somehow, I still haven’t asked for feedback for improving…)

need to clean up my code. but honestly something has changed. I guess I feel less despair now, like caught in an endless rabbit hole with no direction of where to go to get out. just thinking about all the wrong turns i made.

had a week straight of 2 or 3 hrs of talking about talking each day, but i fixed an area that was a huge mental energy sink. feeling my executive function come back online as school starts has been a great feeling. continuous small successes in person. interspersed with celebrating roommates leaving/coming back. a weird era for sure. the additional income is a huge energy relief also. just feeling like buying all the snacks i want and not background running calculations. the debt-free responsibility-free life (this income would not be reasonable otherwise). but harvard health insurance is actually worse in many respects. alas

made delicious dumplings with roommate who came back,

then …

roommate got sick the next day, tested positive the day after !

actually it wasn’t so stressful now that i’ve had covid before, except

wow it was a much more virulent strain, sounded awful, swallowing as razors and just too sick to even eat much

but almost felt routine, open up the windows to ventilate, set up the hepa filters, set the fans going, obsessively read about various aspects of the latest variants for a while, bring the masks and hand sanitizer out, close my own door. be paranoid but not too paranoid. test and then run chores to get cold medication and foodstuffs. order more tests. run some weird communication negotiation understanding information sharing probability calculations.

Q: ventilation != filtration

from this email newsletter i subscribe to

https://yourlocalepidemiologist.substack.com/p/a-plan-for-the-upcoming-school-year?utm_source=substack&utm_medium=email

https://sites.google.com/site/whitneyrobinsonphd/clean-air-1-pager-aug-20-2022?authuser=0

https://sites.google.com/site/whitneyrobinsonphd/clean-air-1-pager-aug-20-2022?authuser=0

(Got on a tangent trying to re-find the corsi-rosenthal diy filter, which is just box fan + two home furnace filters + duct tape)

Image source: https://en.wikipedia.org/wiki/Corsi%E2%80%93Rosenthal_Box

Q: what direction to point fans?

“When you are inside, open windows or doors whenever possible… The use of ceiling fans can improve the circulation of air from outside and avoid pockets of stagnant air forming indoors. However, it is important to bring in air from the outside by opening windows when using a ceiling fan.” https://www.who.int/news-room/questions-and-answers/item/coronavirus-disease-covid-19-ventilation-and-air-conditioning

https://www.cdc.gov/coronavirus/2019-ncov/prevent-getting-sick/Improving-Ventilation-Home.html

Image

Q: if your roommate is still testing positive when is estimate of time to them not being infectious

It looks like (on average) infectious ends around day 8 (we’re at day 9, if day 0 is Tuesday), based on attempting to culture live virus from samples

Studies using viral cultures show that, although patients can remain RNA-positive for weeks after symptom onset, live virus cannot be cultured from specimens collected later than 9 days after symptom onset, suggesting that the mean period of infectiousness and risk of transmission could be restricted to the period between 2 and 3 days before and 8 days after symptom onset. RNA-positive culture-negative samples could represent the detection of genomic fragments rather than an actively replicating virus.

Dec 2021 from https://www.thelancet.com/article/S0140-6736(21)02346-1/fulltext (also the image src) (CDC says you can def exit isolation by now (fever free 24 hrs), and can unmask around other after two negative tests 2 days apart)

Image

mostly missed hanging out in common areas and eating chips, shooting the breeze

but anyway, roommate then tested negative, so all that calculation to questionable use, but was interesting to see the latest (or at least more recent) science

but was extremely sobering to see how sick my roommate got

quals are scheduled, my advisor joked to my collaborators that i’d have a phd at the end of the semester, so … i guess time to kick my butt into gear !

Summing Table Rows by Condition with TamperMonkey Javascript

this is more just braindump notes,

we have a fancypants website for our apartment where we pay rent, so we are actually able to independently pay our parts of the rent on the website. this however led to a build up of confusion over time.

the table is structured like a balance sheet, so yuo can paste it into google docs. and the easy thing to do is to just add it up per person using the SUMIF function.

=-1 * SUMIF(B13:B110, "*Joly*", C13:C110)
=-1 * SUMIF(B13:B110, "*Brie*", C13:C110)
=-1* SUMIF(B13:B110, "*Cho*", C13:C110)
= SUMIF(C13:C110, ">0", C13:C110)

in English it is

“for each row, if column B contains the 2585 then add column C to sum”.

Oh, for the final one is, The Charges are + so sum those. (what we’ve paid is -) –> this conversion, from the $(xyz) to +/- format, is done automatically when pasted into google sheets.

querySelectorAll.forEach

find the table

The core is the function filterAndSum(). Specifically, I select all table rows that are not “hidden”. I use the “querySelectorAll” function.

        var rows = document.querySelectorAll('tr:not(.hidden)');

(Note: I noticed actually each row is repeated twice, so I had to filter to only select rows that did NOT have a “hidden” in their class.)

This returns an array which I iterate through using a for loop.

        for (let i=0; i <rows.length; i++) {

For each row in the array: If the text string in that table row contains e.g. my name,

            if (row.textContent.includes("orangenarwhals")) {

then I look for the $$$ in that row. So I use another querySelector, and look at table-data, or “td”, with class “mat-column-Amount”. In the below code, that’s what the “period” is for, it is a CSS class selctor. (see examples at https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors e.g. you can specific child with “>”)

 row.querySelector('td.mat-column-Amount').textContent;

Then I used some copy-pasta to remove the $, (), and the comma from the string, e.g. $(1,234.53) turns into 1234.53

var punctuation = '$,()';
var regex = new RegExp('[' + punctuation + ']', 'g');
some_string.replace(regex, '')

Then I can use the built-in parseFloat to get a float, which I can them sum.

parseFloat

So the whole function looks like this.

function filterAndSum(str_filter) {
        var punctuation = '($,)';
        var regex = new RegExp('[' + punctuation + ']', 'g');
        //console.log(row.textContent);
        var rows = document.querySelectorAll('tr:not(.hidden)');
        var sum = 0;

        for (let i=0; i <rows.length; i++) {
            var row = rows[i];
            if (row.textContent.includes(str_filter)) {
                var str_amt = row.querySelector('td.mat-column-Amount').textContent;
                var amt = parseFloat(str_amt.replace(regex, ''));
                console.log('amount: ', amt);
                sum += amt;
            }
        }
        console.log('if filter by string', str_filter, 'there is sum', sum);
        return sum;
}

click

The other problem to solve is. That only a few months are revealed at first, so have to click “show more” button. So I can use the built-in click() to do so.

            document.querySelector('div.data-grid__show-more-container').childNodes[0].click();

This is the html

<div class="data-grid__show-more-container ng-star-inserted">
    <a bdi18n="Global.Component.Grid.ShowMore">Show more</a>
</div>

And to keep clicking until there’s no more to click..

function clickMores() {
    try{
        while (true){
            document.querySelector('div.data-grid__show-more-container').childNodes[0].click();
        }
    }
    catch (e) {
        console.log('done clicking "Show Mores"');
    }
}

Later on I added a sleep function, to allow for page load issues. This is from the internet, titled “ES6 vanilla sleep” or something like that. I guess ES6 is the latest-er version of javascript.


function sleep(ms) {
    return new Promise(resolve => setTimeout(resolve, ms));
}

Which then can be used (note “async”) like so:

async function clickMores() {
    try{
    while (true){
        document.querySelector('div.data-grid__show-more-container').childNodes[0].click();
        await sleep(1000);
    }

Show the information: make a div

then for the lulz I wanted to show the information. So create a div. Add text. Style. Figure out where to put it.

    var my_div = document.createElement('div');
    my_div.innerHTML = 'Please wait 10 seconds for the magic to happen :)';
    my_div.setAttribute("style", "font-size: 35px; color:red;");
    document.querySelector('body').prepend(my_div);

Later we can clean up this div

my_div.setAttribute('style', "visibility: hidden;");

templates with backticks

so i think python might have copied this from javascript… you can put expressions inside a string. just use backticks instead of quotes.

my_info_div.innerHTML = `Cool Info: Sum for N is ${filterAndSum('orangenarwhals')}`

all together

// ==UserScript==
// @name         New Userscript
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        https://bradleyproperties.managebuilding.com/Resident/portal/payments
// @icon         https://www.google.com/s2/favicons?sz=64&domain=managebuilding.com
// @grant        none
// ==/UserScript==


async function clickMores() {
    console.log('trying to click');
    try{
        while (true){
            console.log('clicking');
            document.querySelector('div.data-grid__show-more-container').childNodes[0].click();
            await sleep(1000);
        }
    }
    catch (e) {
        console.log('done clicking "Show Mores"');
    }

}

function filterAndSum(str_filter) {
        var punctuation = '($,)';
        var regex = new RegExp('[' + punctuation + ']', 'g');
        //console.log(row.textContent);
        var rows = document.querySelectorAll('tr:not(.hidden)');
        var sum = 0;

        for (let i=0; i <rows.length; i++) {
            var row = rows[i];
            if (row.textContent.includes(str_filter)) {
                //console.log('found string', row.textContent);
                var str_amt = row.querySelector('td.mat-column-Amount').textContent;
                var amt = parseFloat(str_amt.replace(regex, ''));
                console.log('amount: ', amt);
                sum += amt;
            }
        }
        console.log('if filter by string', str_filter, 'there is sum', sum);
        return sum;
}


function sleep(ms) {
    return new Promise(resolve => setTimeout(resolve, ms));
}

(async function() {
    console.log('hi');
    'use strict';

    var my_div = document.createElement('div');
    my_div.innerHTML = 'Please wait 10 seconds for the magic to happen :)';
    my_div.setAttribute("style", "font-size: 35px; color:red;");
    document.querySelector('body').prepend(my_div);


    console.log('Taking an 4 sec break...');
    await sleep(4000);
    console.log('4 seconds later...');


    my_div.innerHTML = 'Please wait for the magic to happen, we are clicking the page for you :)';
    my_div.setAttribute("style", "font-size: 35px; color:red;");
    document.querySelector('table').parentElement.prepend(my_div);


    clickMores();

    await sleep(2500); // i guess must wait for the clicks if they're asynchronous?


    var charges = filterAndSum('Charge');

    var expect_A = charges / 3.5 * .5;
    var expect_B = charges / 3.5; 
    var expect_C = charges / 3.5 * 2;

    var AAA = filterAndSum('nameA');
    var BBB = filterAndSum('nameB');
    var CCC = filterAndSum('nameC');

    var my_info_div = document.createElement('div');

    my_info_div.innerHTML = `Cool Info:
<br>  Sum for A is ${AAA}
<br>  Sum for B is ${BBB}
<br>  Sum for C is ${CCC}
<br>
<br>  Total Charges are ${charges}
<br>  Total Paid is  ${AAA+BBB+CCC}
<br>  Diff is ${charges - (AAA+BBB+CCC)}
<br>  ============================
<br>  Approx. Expectations (note that we are rounding to cents so won't quite match),
<br>
<br>  A: ${expect_A}, Diff is ${expect_A - AAA}, aka ${Math.round(expect_A - AAA)}
<br>  B: ${expect_B}, Diff is ${expect_B - BBB}, aka ${Math.round(expect_B - BBB)}
<br>  C: ${expect_C}, Diff is ${expect_C - CCC}, aka ${Math.round(expect_C - CCC)}
  `;
    my_info_div.setAttribute("style", "font-size: 35px; color:blue;");
    document.querySelector('table').parentElement.prepend(my_info_div);
    my_div.setAttribute('style', "visibility: hidden;");

}

Misc. Notes

IKEA - get all URLs on shopping cart
document.querySelectorAll("[data-testid=product_name]").forEach(function getHref(result){
console.log(`${result.childNodes[0].href}`);
});

XPath

    xpath=//div[contains(text(), "orangenarwhals")]/..//following-sibling::td[contains(@class, "mat-column-Amount")]/b/text()
    amts_iterator = document.evaluate(xpath, document.body, null, XPathResult.ANY_TYPE,
            null);

    var amt = amts_iterator.iterateNext();

    while (amt) {
        sum += blahblah(amt);
        amt = amts_iterator.iterateNext();
    };

http://ponderer.org/download/xpath/

https://scrapfly.io/blog/parsing-html-with-xpath/

https://jsfiddle.net/34wf5gzs/

Pandemic Diary #86 – agkcwjglkd

when did i last even post about my life?

anyway, i’ll braindump the covid stuff (my time with covid), post covid stuff (party), roe v wade, idk what else

COVID — when I caught covid. that’s when the roe v wade decision came out. i couldn’t protest. was pretty stressful time.

tests. can get not just the free tests through usps, but also 8 free ones per month through insurance. if get them through pharmacy, they may be able to bill insurance directly so you don’t have to deal with reimbursement. also, a friend can pick it up for you potentially if they have all the information (insurance card and birthday etc.) and you are on the phone.

paxlovid is free through test-to-treat if you have some pre-existing conditions, nationwide.

https://aspr.hhs.gov/TestToTreat/Pages/process.aspx “Paxlovid is currently being used to treat mild-to-moderate COVID-19; the treatment costs $530 per person. However, it is being distributed for free by the U.S. federal government”

and MA has free telehealth, doesn’t interact with insurance. (but if you have insurance, it probably also provides free online apptmts)

https://www.mass.gov/info-details/free-telehealth-for-covid-19-treatment-with-paxlovid

and, they’re totally happy to have someone else pick the paxlovid script up for you (they can also mail it overnight)

was kinda curious a lot of mental health conditions are listed as risk factor

https://www.cdc.gov/coronavirus/2019-ncov/need-extra-precautions/people-with-medical-conditions.html

learned through researching that there is more linking physical and mental health than i thought (despite once writing an email citing articles about how laughter was good for your immune system! for SIGTBD)

mental health conditions don’t really exist as a separate thing from physical health conditions in many cases. like depression is associated with a low-level inflammatory response and increased metabolic stress which further develop the condition, especially in specific parts of the brain

do you know why covid can temporarily/permanently screw with your sense of taste and smell? that’s actually covid infecting the olfactory nerve and having integrated itself into the nervous system and causing inflammation. so if you already have a condition like depression the additional stressor of covid can cause even more inflammation or a chain reaction

and more scientifically

i thought it might be mostly social stuff, like bipolar = more like to be poor, less social support, etc. but from this JAMA paper we have both

“Mental health disorders are also associated with socioeconomic deprivation4 and reduced access to care,2 important factors of poor COVID-19 outcomes”

https://jamanetwork.com/journals/jamapsychiatry/fullarticle/2782457

and also this

“Variation in the human leukocyte antigen complex is one of the most consistently replicated findings in genome-wide association studies in patients with schizophrenia and bipolar disorders. Human leukocyte antigen predominantly regulates viral infection, especially COVID-19. Genetic variability across major human leukocyte antigen class I genes may contribute to differences in the immune response to COVID-19, and an inappropriate T-cell response has been implicated in severe COVID-19 outcomes. Abnormal cytokine levels have also been found in the cerebrospinal fluid of patients with schizophrenia and bipolar disorders, who are also at higher risk of hypovitaminosis D, contributing to poor COVID-19 prognosis

https://jamanetwork.com/journals/jamapsychiatry/fullarticle/2782457

was interesting inversion, cdc said okay to go out after 10 days but still have mental holdover of 14 days, go into stores wearing an n95 to protect other people. unexpectedly standing in checkout line with a crowd of people is less stressful.

tested daily, negative on friday morning, then positive on sat morning on cue. symptoms not obvious right when i woke up

during noon-ish telehealth could talk for a while but eventually cough a bit. perhaps the only real sign prior to positive test is the tickle in the back of my throat didn’t go away after two days.

telehealth answered questions / med interactions and script went to walgreens. called to check they had it, and they actually didn’t and had to go elsewhere.

really tired and slept most of two or three days, had a bit of wet cough (mucousy), throat got sore enough for a day to want cough drops but it was wincing not agony. but no symptoms bad enough to interfere with sleep. not sure if i ever had a fever, no thermometer

no symptoms, negative on sat evening and again on mon morning -> went to fourth of july o__o

on the whole, possibly thanks to paxlovid my symptoms were much better than for my normal cold — can’t stop coughing and sore throat hurts that swallowing is agony like swallowing needles, if you get up snot goes everywhere, and can’t sleep well

i had clear eligibility so I didn’t ask a lot of questions, my healthier friends asked more questions during telehealth

the most relevant thing would be if I were suffering right now, it’d ease my symptoms
the long covid stuff is mostly a lingering cough for a couple months, but that does go away
if I’m not having problems with the cough now (while immediately sick), anecdotally I should be in the clear for that

so, idk, who knows…

Pfizer PFE announced additional data from the phase II/III EPIC-SR study, which evaluated the use of its COVID-19 treatment pill Paxlovid in patients who are at standard risk for developing severe COVID-19 infection.
As was reported last year, the EPIC-SR study had failed to achieve its primary endpoint of self-reported, sustained alleviation of all symptoms for four consecutive days …
And updated study concurred for hospitalization and death

https://www.msn.com/en-us/health/medical/vaccinated-low-risk-people-won-t-benefit-from-covid-19-pill-paxlovid-pfizer-study/ar-AAYKm5v ttps://www.nasdaq.com/articles/pfizer-pfe-covid-pill-ineffective-in-standard-risk-patients

set up a whole kitchen in my room, then managed to drown my work laptop. hepa filtered and n95, somehow roommate sitting next to me in living room while I was eating didn’t catch it. stressful to communicate over text. still felt like a lot of bother even though on other side I knew I wouldn’t mind in the least grabbing chopsticks etc from the kitchen.

used one of the binax tests, was confusing at first. stuck my test to the table instead of sticking it closed on itself. lol.

post covid: time to kiss all the strangers! jkjk. but i did go clubbing! at club cafe. went to indoor brunch with a live band. wow, there are so many possibilities! room escape games, whale watch tours, live comedy shows..

i didn’t get around to a lot of it, but was still fun to come up with list of ideas

other stuff?

oh, went to acadia! (and tj maxx and walmart). good hikes. saw supermoonrise, milky way. played undertale, enjoyed. fixed fuse, brakers, shifter on my ebike, spray painted it, next step attach trailer hitch and go to costco (?!). was super stressed then less stressed about phd. still pondering startup life. roommate watercolor night. want to get isntant electric feedback, looking at cameras. bookbinding! and leatherworking. woodworking tbd.

reading effortless. still listening to npr indicator and shortwave. (oh, got a bunch of npr swag and a planet money comic!), the song freaking out.

monkeypox spreading through shirtless clubbing, fire island. the webb telescope. not making progress on side projects, maybe that’s okay. dreading the future but remembering that any particular state of life can change drastically in 3 or 4 years.

projects blog (nouyang)