I went to Nairobi Textiles and got some awesome kitenge fabric. Can’t wait to start sewing with them!

kitenge fabric

Nairobi Textiles is a cool place. It’s a small building with many independent vendors selling fabric from their stalls. A lot of tailors also work there, ready to turn new purchases into custom clothes. The fabric are more expensive there than in Eastleigh but more affordable than say, in Canada.

The atmosphere reminded me a lot of Lotus Pond Market in Chengdu (colorful and crowded). Though, I haven’t visited Lotus Pond Market in over a decade so I’m sure a lot has changed.

If you’re buying fabric in Nairobi, I’d recommend a visit, but allow ample travel time: it’s in the heart of CBD and many Uber drivers don’t pick up there.

I’m having a real “time is circular” moment.

It’s been almost 8 years since I wrote Python scripts to create stuffed animals using 3D models from video games. Now that I’m getting back into sewing, I’m discovering a whole new world of software for pattern makers.

CLO3D is the industry standard, offering advanced cloth simulations.

Valentina is the best open source alternative (GPL3!).

With FOSS tools, some are just as amazing as their non-FOSS counterparts while others are a little lacking. For example, I think Blender is entirely able to replace Maya and 3DS Max for a hobbyist animator. The same is true for Krita replacing Photoshop for illustrators. OpenSCAD and FreeCAD are not quite able to replace Solidworks for engineers.

I have very limited pattern making experience so I’m not a great judge for pattern making software. If cloth simulation is critical, then Valentina needs a lot more features to be able to compete with CLO3D. If cloth simulation isn’t super necessary, maybe Valentina would make an adequate substitute.

Either way, I’m loving learning about the ecosystem around sewing and making clothes. Sewing is a craft that dates back to ancient days and has neat jargon (like armscye). At the same time it’s been really modernized with the industrial clothing supply chain. It also has a fascinating digital component, like the transformation from flat pattern making to pattern making software.

It’s so cool!

I recently picked up sewing as another pandemic hobby. When making my first cami, I realized I needed a loop turner for turning straps inside out. Not having one on hand, I searched for good substitutes. YouTube suggested using chopsticks, safety pins, and bobby pins. Unfortunately, none of them worked.

Harry suggested I use a zip tie. I was initially skeptical but zip ties worked great! You can sew one end to the head of the zip tie and pull without worry!

diy loop turner

Posting this for anyone else who’s too impatient to wait for a loop turner.

Harry and I started making hand pulled noodles for the New Year!

noodles

Although we’re still mastering the pulling, the flavors and textures are quite good.

If you’re looking to get started, check out the recipe from Xi’an Famous Foods:

I’m taking a Swahili class and it’s awesome!

In particular, I’m loving the bits about linguistics. I’m really enjoying all the classifications of sounds and phonemes, especially “ng” (ŋ) and “ny” (ɳ).

These two sounds are challenging for me so I’m doing a lot of practice. Turns out ŋ is in English too, so this is definitely helping me distinguish “thin” from “thing”.

Bert Hubert recently published Reverse Engineering the source code of the BioNTech/Pfizer SARS-CoV-2 Vaccine and I (along with the rest of the internet) loved it! It provided a clear review of Pfizer’s mRNA vaccine written for a software engineering audience. Given my previous synthetic biology experience, I was excited to read about how their vaccine actually worked.

Bert linked to a document by the WHO containing the genetic sequence of the mRNA. In that sequence, the symbol “Ψ” represents 1-methyl-3′-pseudouridylyl. Bert explained that this was a clever substitution to help the mRNA escape our immune system’s detection. He also linked to a tweet about Karikó and Weissman which implied that they had discovered 1-methyl-3′-pseudouridylyl.

I was fascinated! I’d never heard of Ψ before. Digging in a little deeper I realized that the symbolic representation had confused me, and maybe other folks were confused too.

Karikó and Weissman published a lot of papers about pseudouridine, which they denoted with “Ψ.” Replacing uracil for pseudouridine in mRNA does indeed help the mRNA escape our immune system’s detection [1]. However, pseudouridine is not pseudouridylyl.

Looking at the WHO document that Bert linked, the two molecules are structurally similar but definitely not the same. I’m not any good at organic chemistry, but my guess is the extra phosphorus and oxygens are from the sugar phosphate backbone. But what’s with the extra methyl group (carbons and hydrogens) on the nitrogen? My intuition says that’s important.

pseudouridine 1-methyl-3′-pseudouridylyl
Wikipedia WHO 11889

So what’s pseudouridylyl?

Why did Pfizer choose to use pseudouridylyl instead of pseudouridine? I had guessed that it must offer either a biological benefit (increasing effectiveness) or a manufacturing benefit (reducing cost). “Pseudouridylyl” (or even “uridylyl”) is not a common word either on the internet or in the literature. I found lots of references to similar chemicals, but couldn’t find literature linking any of them to immune system responses or mRNA synthesis.

And then came the a-ha moment!

In the WHO document, the author represented 1-methyl-3′-pseudouridylyl as “m1Ψ” (with “m1” indicating a modification). However, in the actual genetic sequence, the author chose to abbreviate “m1Ψ” to simply “Ψ.”

Now that I knew what I was looking for, I found an abundance of papers referencing m1Ψ. The canonical name seems to be “N(1)-methylpseudouridine.”

N(1)-methylpseudouridine looks to be an even better substitution than pseudouridine [2]. It also shares the convenient property of escaping immune system detection [3]. The N(1)-methylpseudouridine papers definitely build upon the work of Karikó and Weissman.

The diagrams show that they’re pretty close! See the methyl group?

N1-Methylpseudouridine-UTP 1-methylpseudouridine 1-methyl-3′-pseudouridylyl
Jena Bioscience Modomics WHO 11889

I’m now fairly confident that Ψ in the Pfizer sequence is m1Ψ. They’re calling it “1-methyl-3′-pseudouridylyl,” but it’s also known as “N(1)-methylpseudouridine” or “1-methylpseudouridine.”

References

[1] Karikó K, Muramatsu H, Welsh FA, Ludwig J, Kato H, Akira S, Weissman D. Incorporation of pseudouridine into mRNA yields superior nonimmunogenic vector with increased translational capacity and biological stability. Mol Ther. 2008 Nov;16(11):1833-40. doi: 10.1038/mt.2008.200. Epub 2008 Sep 16. PMID: 18797453; PMCID: PMC2775451.

[2] Callum J C Parr, Shunsuke Wada, Kenjiro Kotake, Shigetoshi Kameda, Satoshi Matsuura, Souhei Sakashita, Soyoung Park, Hiroshi Sugiyama, Yi Kuang, Hirohide Saito, N1-Methylpseudouridine substitution enhances the performance of synthetic mRNA switches in cells, Nucleic Acids Research, Volume 48, Issue 6, 06 April 2020, Page e35, https://doi.org/10.1093/nar/gkaa070

[3] Andries O, Mc Cafferty S, De Smedt SC, Weiss R, Sanders NN, Kitada T. N(1)-methylpseudouridine-incorporated mRNA outperforms pseudouridine-incorporated mRNA by providing enhanced protein expression and reduced immunogenicity in mammalian cell lines and mice. J Control Release. 2015 Nov 10;217:337-44. doi: 10.1016/j.jconrel.2015.08.051. Epub 2015 Sep 3. PMID: 26342664.

Suppose you had sales table with timestamp and customer_id as the columns.

id timestamp customer_id
1 2011-03-17 10:31:01 7
2 2011-03-17 10:45:05 8
3 2011-03-17 10:47:05 7
4 2011-03-17 10:50:10 8

You want to query for what’s the average time between purchases for each customer.

You can use:

SELECT t.customer_id,
       AVG(t.difference) as interval
FROM ( 
  SELECT customer_id,
         timestamp - lag(timestamp) OVER (PARTITION BY customer_id ORDER BY timestamp) AS difference
  FROM sales
) t
GROUP BY t.customer_id

You’ll get:

customer_id interval
7 00:16:04
8 00:05:05

Sources: