I am not very happy with the speed of the solution from the previous toot, as there is a small, but noticeable delay when rendering this card. So, instead of looping on my own I've tried a different approach - let jinja process the data. However, I am not certain, if this is any faster.
type: custom:auto-entities
card:
type: glance
filter:
template: |-
{%-
set replacestr='{
"entity":"person.\\1",
"tap_action": {
"action":"navigate",
"navigation_path":"/dashboard-residents/\\1"
}
}'
-%}
{{
states.person | selectattr('attributes.device_trackers','ne',[]) | map(attribute="attributes.id") |
map("regex_replace","^(.*)$",replacestr) | map("from_json") |
list
}}
Any idea how to measure the performance? Is my intuition, that this version should be faster?
RT @populartourist: Jinja-Chat-Templates für Qwen 3.5 & 3.6 wurden korrigiert.
mehr auf Arint.info
<p>RT @populartourist: Jinja-Chat-Templates für Qwen 3.5 & 3.6 wurden korrigiert.</p> <p><a href="https://arint.info/@Arint/116593586219693961">mehr</a> auf <a href="https://arint.info/">Arint.info</a></p> <p>#AI #ChatTemplates #HuggingFace #Jinja #Qwen #arint_info</p> <p><a href="https://x.com/populartourist/status/2055411766926979140#m">https://x.com/populartourist/status/2055411766926979140#m</a></p>
RT @populartourist: Jinja-Chat-Templates für Qwen 3.5 & 3.6 korrigiert
mehr auf Arint.info
<p>RT @populartourist: Jinja-Chat-Templates für Qwen 3.5 & 3.6 korrigiert</p> <p><a href="https://arint.info/@Arint/116585088747626602">mehr</a> auf <a href="https://arint.info/">Arint.info</a></p> <p>#AI #ChatTemplates #HuggingFace #Jinja #Qwen #arint_info</p> <p><a href="https://x.com/populartourist/status/2055411766926979140#m">https://x.com/populartourist/status/2055411766926979140#m</a></p>
Just released the askama rust crate (jinja templating) 0.16.0 version!
It comes with a lot of nice features and increased support of jinja features.
You can see the full details here: https://github.com/askama-rs/askama/releases/tag/v0.16.0
https://crates.io/crates/askama
Enjoy!
山形・庄内神社、住み着いた“看板猫”にそっくりの「福猫みくじ」を頒布スタート!「めっちゃ可愛い」「欲しい」が相次ぐ
https://www.huffingtonpost.jp/entry/story_jp_69cda9cae4b0a891ea436848
#huffingtonpost #LIFE #ネットで話題 #猫 #神社 #nettodewadai #neko #jinja
Totally normal workflow:
I work on documenting #Jinja syntax used in #CondaForge recipes.
https://github.com/conda-forge/conda-forge.github.io/pull/2782
I decide that the snippets would use Jinja syntax highlighting. However, #Prism doesn't have one. But Internets suggest Twig would work instead.
https://github.com/PrismJS/prism/issues/759
So I try Twig. Except that Twig highlighter crashes in #Docusaurus. But there's a workaround.
https://github.com/facebook/docusaurus/issues/8065
So I copy the code over to the project, fix it and while at it, rename it to "jinja" and adjust a bit.
But then, highlighting Jinja expressions alone looks pretty bleak, so let's combine it with YAML… Hmm, that actually doesn't work that well, needs some more adjustments. And before you know it, I have a pretty new Jinja highlighter, and a recipe highlighter that combines Jinja expressions, YAML, v0 recipe selectors, v1 if:/skip: conditions, and also highlighting shell / cmd variables for a good measure.
https://github.com/conda-forge/conda-forge.github.io/pull/2790
Apache Superset — боремся с фильтрами по дате. Часть 2
В этой статье продолжаем борьбу с фильтрами по дате в Apache Superset. Сегодня разберем, как реализовать подобие логики remove_filter в старых версиях (до 5), чтобы виртуальный датасет не оборачивался фильтрами.
https://habr.com/ru/articles/1016384/
#apache_superset #jinja #фильтр #дата #танцы_с_бубном #визуализация #большие_данные