Skip to content

Figure caption #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions components/content/ProseImg.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<template>
<figure v-if="caption">
<component
:is="imgComponent"
:src="refinedSrc"
:alt="alt"
:width="width"
:height="height"
/>
<figcaption v-html="caption" />
</figure>
<component
v-else
:is="imgComponent"
:src="refinedSrc"
:alt="alt"
:width="width"
:height="height"
/>
</template>

<script setup lang="ts">
// approach from https://github.com/nuxt/image/issues/813

import { withTrailingSlash, withLeadingSlash, joinURL } from "ufo";
import { useRuntimeConfig, computed, resolveComponent } from "#imports";

const imgComponent = useRuntimeConfig().public.mdc.useNuxtImage
? resolveComponent("NuxtImg")
: "img";

const props = defineProps({
src: {
type: String,
default: "",
},
alt: {
type: String,
default: "",
},
width: {
type: [String, Number],
default: undefined,
},
height: {
type: [String, Number],
default: undefined,
},
});

const refinedSrc = computed(() => {
if (props.src?.startsWith("/") && !props.src.startsWith("//")) {
const _base = withLeadingSlash(
withTrailingSlash(useRuntimeConfig().app.baseURL)
);
if (_base !== "/" && !props.src.startsWith(_base)) {
return joinURL(_base, props.src);
}
}
return props.src;
});

const caption = computed(() => {
return props.alt.replace(/\[([^\]]+)\]\(([^)]+)\)/g, '<a href="$2">$1</a>');
});
</script>
110 changes: 29 additions & 81 deletions content/blog/2018/09/simple-diagrams-deep-learning/index.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ But a void on the plinth is what world cannot bear
For statues are all made of one ancient matter
That somewhere deep inside we all share

![Revolution by Paweł Kuczyński ([Facebook](https://www.facebook.com/pawelkuczynskiart/) / [Instagram](https://www.instagram.com/pawelkuczynskiart/)). See also [78 More Brutally Honest Illustrations By Pawel Kuczynski Show What’s Wrong With Today’s Society](https://www.boredpanda.com/satirical-illustrations-polish-pawel-kuczynski/).](./00.jpeg)
![Revolution by Paweł Kuczyński (`[Facebook](https://www.facebook.com/pawelkuczynskiart/) / [Instagram](https://www.instagram.com/pawelkuczynskiart/)). See also [78 More Brutally Honest Illustrations By Pawel Kuczynski Show What’s Wrong With Today’s Society](https://www.boredpanda.com/satirical-illustrations-polish-pawel-kuczynski/).`](./00.jpeg)

- [Original lyrics](https://www.kaczmarski.art.pl/tworczosc/wiersze/posagi/)
- [Foreword + song by Jacek Kaczmarski](https://www.youtube.com/watch?v=etJDP6GBt_Q)
Expand Down
4 changes: 2 additions & 2 deletions content/blog/2020/03/types-tests-typescript/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ But, if you want to gamify adding tests, there is a way to go!

A typical issue with academic code is that it runs on a single computer, during a full moon. So how about testing it externally, with every single commit?

![[https://travis-ci.com/Quantum-Game/quantum-tensors](https://travis-ci.com/Quantum-Game/quantum-tensors)](./travis_ci_checks_pull_request.png)
![`[https://travis-ci.com/Quantum-Game/quantum-tensors](https://travis-ci.com/Quantum-Game/quantum-tensors)`](./travis_ci_checks_pull_request.png)

Continuous integration makes it easy to check against cases when the code:

Expand Down Expand Up @@ -218,7 +218,7 @@ Conversely, if the code works passes, but does not work locally, there is a fair

And the gamification part! Writing tests for all functions is boring… unless I get some score for that, as visible feedback. With [Codecov](https://codecov.io/gh/Quantum-Game/quantum-tensors/) it is easy to make jest & Travis CI generate one more thing:

![[https://codecov.io/gh/Quantum-Game/quantum-tensors/](https://codecov.io/gh/Quantum-Game/quantum-tensors/)](./codecov.png)
![`[https://codecov.io/gh/Quantum-Game/quantum-tensors/](https://codecov.io/gh/Quantum-Game/quantum-tensors/)`](./codecov.png)

### Further reading:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ What are you afraid more of — loneliness or being in chains? Do you under-
- FLIGHT: needing space, avoiding difficult subjects, ghosting (avoidant-dismissive attachment style)
- FREEZE: learned helplessness, hopelessness, or depression

![From [Attachment Theory — How Your Childhood Affects Your Love Style](https://www.youtube.com/watch?v=QP-nPJbTgTs&ab_channel=CharismaonCommand) by Charisma on Command](./02.jpg)
![From `[Attachment Theory — How Your Childhood Affects Your Love Style](https://www.youtube.com/watch?v=QP-nPJbTgTs&ab_channel=CharismaonCommand)` by Charisma on Command](./02.jpg)

As we all know, there is the Fountain of (Relationship) Life, secure attachment style. Feeling secure enough that we are fine with the ups and downs of relationships — reacting, but not overreacting. It is not easy, as a combination of our wiring, upbringing, and the current situation is likely to head us in one (or more) unhealthy directions. Sure, we have our inclinations — but the secure attachment style is a direction for growth.

Expand Down Expand Up @@ -98,7 +98,7 @@ It took me a lot of time that my intellectualism and objectivity were a flight r

Processing hard emotions is often about accepting them, integrating them. It might happen gradually, and you fail to notice it. Other times it is a moment of insight, impossible to miss. This intense, somewhat strange, calming feeling of reconnection — of once-a-horror, now something seen in detail, with full awareness, but not causing you an emotional cascade. It feels as if you were again one, reassembled from splinters.

![Now I read one of my favorite childhood games more metaphorically - [watch this scene on YouTube](https://www.youtube.com/watch?v=b36eDbvRGE0).](./prince_of_persia_mirror_shadow.jpg)
![Now I read one of my favorite childhood games more metaphorically - `[watch this scene on YouTube](https://www.youtube.com/watch?v=b36eDbvRGE0)`.](./prince_of_persia_mirror_shadow.jpg)

It does not mean that you suddenly start enjoying your pain (as with the hammer and the finger), or turning suffering into some mystical masochism. It’s about accepting that you are who you are. One example of such integration is the [5 Stages of Grief](https://en.wikipedia.org/wiki/Five_stages_of_grief) model. While it might be not a universal one, it turns out that these stages map beautifully into fear responses:

Expand Down Expand Up @@ -131,7 +131,7 @@ Being aware of one’s reactions is the first step. Whenever you feel distressed

Reintegrating parts of yourself takes time. Self-compassion is crucial, as well as kindness, warmth, and acceptance towards oneself. The environment in which we feel secure makes a day-and-night difference. Think of your broken parts as of a wounded kitten. They need time and care to recover. Pushing it to recover right now, or to walk despite wounds, would be cruel. Don’t do to yourself what you wouldn’t do to a cute kitten.

![“Don’t be afraid Mithrandir, you are not alone” — [one of the most beautiful scenes from the Hobbit (movie)](https://www.youtube.com/watch?v=MU5_-lLjhQw).](./04.jpg)
![`“Don’t be afraid Mithrandir, you are not alone” — `[one of the most beautiful scenes from the Hobbit (movie)](https://www.youtube.com/watch?v=MU5_-lLjhQw)`.`](./04.jpg)

I would like to thank Joanna Jasińska, Marcin Kotowski, Kasia Kańska, and Sarah Martin for valuable feedback on the draft. While it benefited from many inspirations, it was prompted by recent discussions with Agata Klinger, Meggy Peplanova, Krzysztof “Stefan” Stefanek, Anna Kubasiak, Agata Strojnowska, Ernesta Malina, and Pola Gościńska.

Expand Down
2 changes: 1 addition & 1 deletion content/blog/2021/09/embodiment-for-nerds/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ I started dancing. To some extent, dancing was much harder mentally than BDSM wo

However, the Balfolk community of [Chata Numinosum in Warsaw](https://www.facebook.com/ChataNuminosum/) turned out to be particularly warm and inviting. There are always a few people dancing for the first time, joining a group from the spectrum of beginners to seasoned dancers. Balfolk is a modern version of dances from Brittany, along with other regions of France and Europe in general. These are mostly danced in circles and chains, the setting is casual (usually t-shirts) and the focus is on moving together rather than a performance.

![Lovembal in Poznań — credits go to [Marianna Łakomy](https://www.facebook.com/mikromomenty/).](./05.jpeg)
![Lovembal in Poznań — credits go to `[Marianna Łakomy](https://www.facebook.com/mikromomenty/)`.](./05.jpeg)

A much higher bar was for blues dance. It is very soft, cuddly & improvised, focused on non-verbal communication, and relaxed body. Not my main skills, so that’s what makes it an interesting challenge & exploration. However, during the first classes, it turned out that all participants (some visibly nerdy) worked in IT. It seems that I am not the only one going that route.

Expand Down
2 changes: 1 addition & 1 deletion content/blog/2022/07/dall-e-2-and-transcendence/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ There is a lot of room to start a new AI cult. Fortunately, DALL·E 2 started gi

In AI baseline keeps constantly changing. In most fields, progress is slower than advertised. In deep learning, things move rapidly from “the Holy Grail” to “you can run in a Jupyter Notebook tutorial”-level. So, here goes my personal benchmark for symbolism, a Polish poster for a play Stalker (from 2012, NOT AI-generated)

![[“Stalker”, Polish Theater Poster by Lex Drewinski](https://polishposter.com/4935-stalker-polish-theater-poster.html)](./03.jpeg){ class=width-max-half }
![`[“Stalker”, Polish Theater Poster by Lex Drewinski](https://polishposter.com/4935-stalker-polish-theater-poster.html)`](./03.jpeg){ class=width-max-half }

While neither the book “Roadside Picnic” by Strugatsky brother nor the cinematic poetry [“Stalker” by Tarkovsky](https://www.youtube.com/watch?v=Q3hBLv-HLEc) are about God or radiation, in my opinion, a combination of these symbols works perfectly. I wouldn’t create it by myself, yet after seeing that I would guess the movie.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@ Data comes from two sources:

I got inspired by a map by [Jakub Marian](https://jakubmarian.com):

![[Number of metal bands per capita in Europe by Jakub Marian](https://jakubmarian.com/number-of-metal-bands-per-capita-in-europe/)](./metal-bands-map-europe-jakubmarian.jpg)
![`[Number of metal bands per capita in Europe by Jakub Marian](https://jakubmarian.com/number-of-metal-bands-per-capita-in-europe/)`](./metal-bands-map-europe-jakubmarian.jpg)

and this meme:

![[Scandinavian music vs Scandinavian society](https://knowyourmeme.com/photos/1749443), compared to Polish music & society](./scandinavian-music-society-meme.jpg)
![`[Scandinavian music vs Scandinavian society](https://knowyourmeme.com/photos/1749443)`, compared to Polish music & society](./scandinavian-music-society-meme.jpg)

If you want to explore the density of metal bands, see an [Interactive Map of Heavy Metal Bands By Country Per 100,000 People](https://www.gislounge.com/map-of-heavy-metal-bands-by-country-per-capita/).

_"Chocolate brings Nobel Prizes"_ is a reference to [There's A Shocking Connection Between Eating More Chocolate And Winning The Nobel Prize](https://www.businessinsider.com/chocolate-consumption-vs-nobel-prizes-2014-4?IR=T). Ironically, this research article takes this correlation non-ironically. While not entirely implausible (chocolate contains a lot of healthy ingredients that improve cognitive functions), most likely this relationship diminishes a lot after controlling for GDP per capita. Sure, the Swiss have lovely chocolate and they eat a lot of it. But also live in one of the richest countries.

![A figure from [F.H. Messerli, *"Chocolate Consumption, Cognitive Function, and Nobel Laureates"*, N Engl J Med (2012)](https://www.nejm.org/doi/full/10.1056/nejmon1211064)](./chocolate-consumption-nobel-laureates.png)
![A figure from `[F.H. Messerli, *"Chocolate Consumption, Cognitive Function, and Nobel Laureates"*, N Engl J Med (2012)](https://www.nejm.org/doi/full/10.1056/nejmon1211064)`](./chocolate-consumption-nobel-laureates.png)

## Disclaimer

Expand All @@ -53,7 +53,7 @@ I guess that it is about conditions that are favorable for creative activities.

Also, **all** surveys measuring happiness have their shortcomings. The answer might depend on the meanings of words in a given language or culture. Especially as Finland, a country with the highest density of metal bands [is the happiest country in the world](https://www.theguardian.com/world/2022/mar/19/finland-named-worlds-happiest-country-for-fifth-year-running) but also [has relatively high suicide rates](https://jakubmarian.com/suicide-rates-by-country-in-europe/). If anything, results **may** make more sense within a given country:

![[Money can buy happiness - The Economist](https://www.economist.com/graphic-detail/2013/05/02/money-can-buy-happiness)](./money-can-buy-happiness-the-economist-2013.png)
![`[Money can buy happiness - The Economist](https://www.economist.com/graphic-detail/2013/05/02/money-can-buy-happiness)`](./money-can-buy-happiness-the-economist-2013.png)

## Source code

Expand Down
4 changes: 2 additions & 2 deletions content/blog/2023/02/ai-artists-information-theory/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Month by month, the balance shifts from the first to the second. I will argue th

For a long time, machines were nowhere near human visual skills. Then in 2012, there was a breakthrough - convolutional neural networks that were able to decently classify photos. For there next few years [the progress continued rapidly](https://paperswithcode.com/sota/image-classification-on-imagenet). The inverse problem of turning text descriptions (called prompts) into images posed a challenge. But step-by-step it went from [generating small images](https://arxiv.org/abs/1605.05396) in 2016, through [working with photorealistic faces](https://www.youtube.com/watch?v=kSLJriaOumA), to open-ended image-generation tasks. The process is so fast that [my 2021 review of readily-applicable AI for image generation and enhancement](https://arxiv.org/abs/2107.07397) aged poorly - in just a year. This field was revolutionized in 2022 with [DALL·E 2 by OpenAI](https://openai.com/dall-e-2/) and an open-source [Stable Diffusion](https://stability.ai/blog/stable-diffusion-public-release), which is a basis for multiple projects, including commercial [Midjourney](https://midjourney.com).

![[Neil Goosey at AI Art Universe FB Group](https://www.facebook.com/groups/526007639164475/user/834840710/) and [Instagram @neilgoosey](https://www.instagram.com/neilgoosey/)](./neilgoosey-ai-art.jpg)
![`[Neil Goosey at AI Art Universe FB Group](https://www.facebook.com/groups/526007639164475/user/834840710/) and [Instagram @neilgoosey](https://www.instagram.com/neilgoosey/)`](./neilgoosey-ai-art.jpg)

While we may argue that it still has problems with as basic things such as drawing realistic hands, the progress continues. Will there be room for human artists?

Expand Down Expand Up @@ -99,6 +99,6 @@ One thing remains the same - computers don’t do what we wish them to do, they

I would like to thank [Klem Jankiewicz](https://jankiewiczstudio.com/), Maja Ratyńska and [Greg Kowal](https://www.linkedin.com/in/greg-kowal) for their fruitful remarks on the draft. I wouldn't write this blog post if it weren't for [Piotr Zientara](https://piotrzientara.pl/), who invited me to give a talk at the [100th WarsawJS Meetup](https://warsawjs.com/meetups/100). You can watch it here: [ChatGPT and Image Diffusion - should I be afraid or harness its power?](https://www.youtube.com/watch?v=oEHYzEBv6yg). Yes, “Image Diffusion”. I am just a human and I make silly mistakes.

![[A lizard works as a taxi driver](https://labs.openai.com/s/BjMtgzd4zlrreWQnEHn1cbDn) and [a velociraptor as a CEO](https://www.reddit.com/r/dalle2/comments/v411w9/velociraptor_in_a_suit_studio_portrait_dark_bg/) (Critter-Eating Officer). Generated by DALL·E 2, prompts are mine.](./lizard-taxi-velociraptor-ceo.jpg)
![`[A lizard works as a taxi driver](https://labs.openai.com/s/BjMtgzd4zlrreWQnEHn1cbDn) and [a velociraptor as a CEO](https://www.reddit.com/r/dalle2/comments/v411w9/velociraptor_in_a_suit_studio_portrait_dark_bg/) (Critter-Eating Officer). Generated by DALL·E 2, prompts are mine.`](./lizard-taxi-velociraptor-ceo.jpg)

UPDATE: I just joined [Dali Games](https://dali.games/) as the AI Lead. We are on our mission to deliver games purely generated by AI. You give a prompt, we deliver a complete mobile game.