| Features | RAML | OAS |
|---|---|---|
| popularity | less popular | more popular and widely used |
| backed by | Mulesoft | OpenAPI Initiative, which is a consortium of industry leaders and experts |
| expressiveness | more expressive and flexible | less due to lack of annotations, overlays, extensions, libraries |
| interoperability | less compatable | more interoperable and compatible |
| maintenance | relatively less updates | more actively maintained and updated with a clear roadmap and vision for its future |
| focused on | modeling APIs |
ChatGPT appeared like an explosion on all my social media timelines in early December 2022. While I keep up with machine learning as an industry, I wasn't focused so much on this particular corner, and all the screenshots seemed like they came out of nowhere. What was this model? How did the chat prompting work? What was the context of OpenAI doing this work and collecting my prompts for training data?
I decided to do a quick investigation. Here's all the information I've found so far. I'm aggregating and synthesizing it as I go, so it's currently changing pretty frequently.
| // based on https://stackoverflow.com/a/56678483/65387 | |
| type RGB = [r: number, g: number, b: number] | |
| const UNK = 255 / 2 | |
| /** | |
| * @param hex RGB hex string like "#CCCFDB" | |
| * @returns RGB tuple in [0-255] | |
| */ |
| A collection of snippets |
| # Accessibility Checklist | |
| ## Overview | |
| This checklist can be referenced when building or updating a feature. Not every item will apply to every situation. | |
| - [ ] Feature is usable with a keyboard only (using Tab to move forward, Shift + Tab to move backwards) | |
| - [ ] You can interact with all controls, links, and menus | |
| - [ ] You can see what item has focus at all times | |
| - [ ] The visual focus order matches the intended interaction order | |
| - [ ] You are not “trapped” within one element |
Fish is a smart and user-friendly command line (like bash or zsh). This is how you can nstall it on MacOS and make your defaul shell.
Note that you need the https://brew.sh/ package manager.
You can also download the fish app from their website. I do recomand using brew because update are easier.
Install Fish
| #!/usr/bin/env python3 | |
| import asyncio | |
| import iterm2 | |
| THEME_LIGHT = "Tango Light" | |
| THEME_DARK = "Tango Dark" | |
| class AutoSwitchTheme: |
Many tools do not fully remove metadata, but just remove the link with in the metadata table. The data are thus still available in the PDF file itself.
While a lot of people rely on Exiftool to remove metadata, it actually does the same in PDFs. If you remove metadata with exiftool -all= some.pdf, you can always restore the data with exiftool -pdf-update:all= some.pdf.
There are several options to remove PDF metadata safely:
- Remove metadata with exiftool :
exiftool -all= some.pdf - Then remove ununsed objects with qpdf :
qpdf --linearize some.pdf - > some.cleaned.pdf
| library(tidyverse) | |
| geomid <- function(lat, lon) | |
| { | |
| # http://www.geomidpoint.com/calculation.html | |
| lat <- lat * pi / 180 | |
| lon <- lon * pi / 180 | |
| x <- mean(sum(cos(lat) * cos(lon))) | |
| y <- mean(sum(cos(lat) * sin(lon))) | |
| z <- mean(sum(sin(lat))) |