Updates, updates everywhere

I will refrain from using That Meme again, although it would actually have been a nice companion for this post. However, it is 2024 and time for Something New, so no meme and instead of that sprinkling Random Uppercase throughout this post, let’s see if we can make a trend out of that (but that is not the point).

Nope, first some Real News (oops, last time I swear) on changes in the ControlOne Agent (these capitals where there already before 2024). Here are the tech updates:

  • Upped Java to openjdk-21.0.1
  • Upped Python to PyPy 3.10 v7.3
  • Upped Tika to 2.9.1

And started first explorations with tika-pipes! It would be too harsh to say that the current way Tika is used with Python and tika-app is not good enough because it serves us well and delivers the required results. But it felt a bit brittle and with recent updates I saw some unexplainable behaviour so probably the right time to make a move, also because I could not find a current and more extensive Python module alternative for Tika.

I did not know much about tika-pipes until I bumped into the LinkedIn post from Antonia Langfelder a while ago, linking to the blog post How to Parse Millions of PDF Documents Asynchronously with Apache Tika. “Well, that sounds familiar”, I thought and started to read, as always on the lookout for possible enhancements.

And what else could be on the roadmap this year? What about:

  • Analytics & reporting, currently in beta
  • Sharepoint integration
  • Direct secure streaming of meta and content scan results to the cloud
  • Integrating actionable work lists (we did a successful first real life test with this in 2023)
  • Advanced insights in user and subject based data ownership
  • Web UI overhaul, while user friendly acces to reports and charts is already available we feel there is some room for improvement

And of course we can add some Vector Search and/or GenAI capabilities, we have working demos already 🙂

The usual disclaimer applies, and if you are interested in any of those features or something completely different let me know.

Breaker! Breaker! en Convoy

Even iets heel anders dan mijn gebruikelijke stokpaardjes als geospatial, whisky en data in al zijn verschijningsvormen. Al decennialang ben ik gefascineerd door films als Convoy en Breaker! Breaker! (trouwens eigenlijk alles van Chuck Norris zeg ik er eerlijkheidshalve bij).

Omdat ik merk dat de kennis over deze films bij de huidige generatie stilaan verloren begint te gaan, heb ik de Rubber Duck maar eens bij de spreekwoordelijke veren gevat en een korte studie geschreven over de verschillen tussen deze twee films waarbij rekening wordt gehouden hoe zij beiden in de tijdgeest van de 70er jaren passen. Daarbij betrek ik ook de invloed van de regisseurs en hoe hun achtergrond in eventuele eerdere en latere films van hun hand zich ook toont in respectievelijk Breaker! Breaker! en Convoy. Overigens dacht ik altijd dat Breaker! Breaker! na Convoy uitkwam en ik was zelfs een tijdje bang dat Chuck een goedkope rip-off wilde maken, letterlijk & figuurlijk meeliftend op de populariteit van the truckers film genre. Gelukkig bleek niks minder waar en was Breaker! Breaker! zelfs eerder uit dan Convoy! Ik had het kunnen weten, Chuck faalt nooit (als filmheld hè… maar wat de…? https://chucknorrisfacts.net/ is niet langer online? Drat, drat & double drat!).

Tijdens dit korte onderzoek (want ik was eigenlijk met iets anders bezig, daarover later meer) moest ik natuurlijk ook luisteren naar de bijbehorende truckers muziek. Om mezelf niet te veel af te laten leiden, heb ik in eerste instantie gekozen vooral Nederlandse liedjes uitgebracht na de releases van Convoy en Breaker! Breaker!

Met gepaste trots op het Nederlandse truckerslied presenteer ik u een fijne selectie:

B.B. BandStille Willie

Tina TruckerLady Trucker is mijn naam

Kenteken OnbekendHou ‘m tussen de strepen

En eigenlijk valt de volgende buiten de strenge selectiecriteria maar omdat de naam van zowel artiest als liedje zo koel zijn, zet ik hem er toch bij:

Don MercedesRocky

(hiervan vind ik trouwens dat het loopje dat her en der opduikt, erg lijkt op de bas uit Seasons van Future Islands, vooruit hier de link dan kan je het zelf checken https://www.youtube.com/watch?v=upPl9mZW_zw)

(och en ons Bonny heeft natuurlijk meer gastbijdragen geleverd die een eervolle vermelding waard zijn, tadaah Dokter Bernhard! https://www.youtube.com/watch?v=7QEvU3n5axY)

Natuurlijk kon ik niet anders dan Convoy van C.W. McCall https://www.youtube.com/watch?v=wwaygKjs2fI meenemen in de luistersessies en al bij de eerste herbeluistering na jaren viel me meteen op dat het refrein eigenlijk in een soort van South Park stijl avant la lettre is.

‘Cause we got a little convoy
Rockin’ through the night.
Yeah, we got a little convoy,
Ain’t she a beautiful sight?
Come on and join our convoy
Ain’t nothin’ gonna get in our way.
We gonna roll this truckin’ convoy
‘Cross the U-S-A.
Convoy!

Dit inspireerde me om ChatGPT DALL·E 3 te vragen een aantal bijpassende afbeeldingen te maken die ik in de studie op redelijk willekeurige plekken toegevoegd heb. Zelf vind ik daarin vooral de vrijzinnige mix van de Southpark karakters en het niet geheel ontbreken van krachttermen interessant. En opnieuw onder de indruk van wat ChatGPT DALL·E 3 kan produceren. Nou daar komt ‘ie en vooral benieuwd of er nog aanvullingen zijn met betrekking tot eventuele inzichten die ik heb gemist.

“Breaker! Breaker!” (1977) en “Convoy” (1978) zijn twee films uit de late jaren ’70 die de truckerscultuur en het CB-radiofenomeen (Citizens’ Band radio oftewel 27MC bakkies) in de Verenigde Staten belichten. Ze passen in de tijdgeest van de jaren ’70, een periode waarin de truckercultuur en de CB-radio een hoogtepunt bereikten in populariteit. Deze films bieden interessante inzichten in de culturele en cinematografische trends van die tijd, alsook in de carrières van hun regisseurs, Don Hulette en Sam Peckinpah (ook zo’n ontzettende aanrader, alle films van Sam, misschien iets voor een volgende off-topic post).

Breaker! Breaker!

Geregisseerd door Don Hulette, vertelt “Breaker! Breaker!” het verhaal van J.D., een trucker gespeeld door Chuck Norris, die tegen corruptie vecht in een klein stadje. De film is een actiefilm en vertegenwoordigt een van de vroegere rollen van Norris, die toen nog aan het begin van zijn filmcarrière stond. Norris zelf beschreef de film als een “down-home soort film”. Merk op dat de film in slechts elf dagen werd opgenomen met een beperkt budget​​​​.

De regie van Hulette in “Breaker! Breaker!” kan worden gezien als een voorbeeld van onafhankelijke filmmaken in de jaren ’70. Zijn aanpak is rechttoe rechtaan, zonder veel flair of complexiteit, wat past bij de beperkte middelen en snelle productietijd (denk in dit verband ook aan de Dirty Harry en Death Wish films). Het was een van de slechts twee films die Hulette regisseerde, naast “A Great Ride”​​.

Convoy

“Convoy”, geregisseerd door Sam Peckinpah, is gebaseerd op het gelijknamige country-westernlied van C.W. McCall en speelt zich af tegen de achtergrond van de truckers- en CB-radio-cultuur. Met toen al bekende sterren als Kris Kristofferson, Ali MacGraw en Ernest Borgnine, vertelt de film het verhaal van truckers die zich verzetten tegen corrupte politieagenten (‘bears’) en autoriteiten.

Peckinpah, bekend om zijn eerdere werken zoals “The Wild Bunch” en “Straw Dogs”, had een turbulente carrière gekenmerkt door zijn strijd met alcoholisme en drugsverslaving. “Convoy” was een poging om zijn carrière weer op de rails te krijgen na een reeks commercieel teleurstellende films. Zijn stijl in “Convoy” weerspiegelt een mengeling van zijn kenmerkende gewelddadige esthetiek en een meer mainstream, commercieel georiënteerde benadering. Ondanks gemengde kritieken werd de film de meest commercieel succesvolle van Peckinpah’s carrière​​​​​​.

Vergelijking en Tijdgeest

Beide films weerspiegelen de fascinatie van de jaren ’70 voor de truckercultuur en CB-radio’s, een fenomeen dat ook zichtbaar was in andere media van die tijd maar bieden verschillende benaderingen van dit thema. “Breaker! Breaker!” leunt meer naar de kant van een onafhankelijke actiefilm, terwijl “Convoy” een grotere, meer dramatische productie is met een bekendere regisseur en cast.

De invloed van de regisseurs is duidelijk in beide films. Hulette’s werk in “Breaker! Breaker!” is eenvoudig en ongecompliceerd, passend bij de beperkte middelen en de vroege carrièrefase van Norris. Aan de andere kant laat Peckinpah’s “Convoy” zijn worstelingen en ambities zien om zowel commercieel succes als artistieke erkenning te bereiken, ondanks de uitdagingen van zijn persoonlijke leven en carrière.

In de context van de jaren ’70 vertegenwoordigen deze films de brede aantrekkingskracht van de truckerscultuur en een romantische kijk op de vrijheid van de open weg, thema’s die resoneren met de bredere Amerikaanse cultuur van dat decennium.

Nou dat was hem. Roept meteen de vraag op hoe de Amerikaanse (truckers)cultuur de Nederlandse beïnvloed heeft. En wat de mooiste truck was: Kentucky, Peterbilt, International… In Nederland in ieder geval de Scania met neus destijds. Oh ja, je had ook nog van die 27MC kaartjes van truckers, ook nog een tijdje verzameld. Voer voor vervolgen maar niet nu.

~Breaker one-nine, this here’s the Rubber Duck!~

Met dank aan onder andere Wikipedia en ongebrande studentenhaver (met uitzondering van de hazelnoten).

https://en.wikipedia.org/wiki/Breaker!_Breaker!

https://en.wikipedia.org/wiki/Convoy_(1978_film)

Some updates

The DataFitness ControlOne Agent is already doing its job of collecting vast amounts of data for about three years. The first ‘official’ commit to the Dataether DataFitness repository was on the day after my birthday in November 2020, and before that there were some initial versions stored in my private repos.

We have been tracking data developments over time at one company for close to two years know, really disclosing interesting insights and monitoring information fit for governance and general data management purposes.

Also, the collected data can be used in many different ways, including full-text fuzzy search and vector search (or ‘hybrid search’ as the combination is called nowadays), delivering additional information that can be fed back into the company for direct action. We even did a first successful test creating executable scripts for mass data movements based on customer driven rules and decision criteria (yes, the scripts were actually executed).

Development on the Agent is still ongoing. A small list of recent changes:

  • Updated all Python requirements so using latest safe modules to reduce vulnerability (thanks Snyk).
  • Better Better exception handling an logging when decrypting data to import into the persistent data layer. Still happily using MongoDB Atlas.
  • Some fixes to improve string handling in Windows and more.

The backlog still has over 100 tickets for further improvements so more to do for sure ¯\_(ツ)_/¯

Time to chat!

Bij Dataether gebruiken we verschillende manieren om informatie te extraheren en genereren om digitale assets uit te pluizen, verrijken en begrijpen. Denk aan metadata, content extractie, full text fuzzy search, rule based reasoning en meer op een veelheid aan digitale bronnen.

Natuurlijk is het voor mensen ook interessant om ‘gewoon’ met je data te kunnen praten, dus een voor de hand liggende optie hiervoor is gebruik van een chatbot op de eigen ‘body of knowledge’ (vooruit, kennislichaam in goed Nederlands).

Dus zelf aan de slag met een chatbot a la ChatGPT en dan eens verder onderzoeken hoe dit zo in te richten dat de relevante informatie nog makkelijker beschikbaar komt voor gebruik.

Meer hierover is te lezen op het Dataether blog, of zie de LinkedIn post. Wie meteen met de code aan de slag wil, kan naar de GitHub repo.

Don’t do geospatial calculations!

Recently I was asked about options to do ‘find nearest’ geospatial calculations for a set with lots of polygon features, and whether something like GeoSPARQL, a (spatial) database or something else like Python and GeoPandas would be a good fit. The exact question was finding the nearest top 3 Natura2000 areas for all Natura2000 areas. This came up in some of the project work Sensing Clues is doing in cooperation with their field partners.

My advise after some discussion was not to do geospatial calculations, at least not more often than necessary, meaning don’t do them runtime but run the operation upfront and store the results as properties with the data (e.g. additional triples in a graph database, some optional fields in a document oriented data platform, or just a good-old lookup table in a relational database).

I started with the Natura2000 data in Esri Shapefile format, wrote some Python code to load and process it with GeoPandas and ran the job. No optimisations, not split to run stuff in parallel or whatever. After about 2-3 days only 4000 areas were done (single process execution on my 2015 MacBook Pro), and I did not want to wait anymore so changed the approach and switched to PostgreSQL/PostGIS.

Decided to use the Natura2000 Geopackage instead of the Shapefile because running find nearest after Shapefile import in PostGIS seemed to be slower than using the Geopackage. Disclaimer: no idea yet why imported Shapefile is slower, no deep investigation done, maybe number of decimals after import, or difference in complexity of the (multi) polygon features, or the way either data from Shapefile or Geopackage are spatially indexed by PostGIS. Of course ogr2ogr helped with loading into PostGIS.

ogr2ogr -f PostgreSQL PG:"dbname='sensingclues'" /Users/emilzegers/GitHub/taatuut/NATURA9000/data/Natura2000_end2021_rev1.gpkg

Also started looping over the Natura2000 features instead of one time join all, wrote a procedure for this (prefer procedure over function because in procedure you can commit in between and track progress easier). Some features were still slow to process because they are very big and complex, and/or so are their neighbors. Some Natura2000 areas can span complete rivers and waterway systems covering tens to hundreds of square kilometers.

With this approach more than 10.000 features were done in less than a day, still with the slower ones consuming a fair amount of time. In less than two days the whole set of 27020 areas finished. A quick examination of the results revealed that the results of PostgreSQL/PostGIS and Python/Geopandas find nearest operation are the same most of the tim e. Again disclaimer that I did not check where and why they differ. But I’m sure PostGIS is ok 🙂

One optimisation that might make calculations way simpler and faster, is doing rubberband or envelope on these areas with ST_ConvexHull or ST_OrientedEnvelope, then do nearest on these ‘bounding polygons’.

In this case doing geospatial calculations only once and then add the results as properties or in a lookup table works because the set of Natura2000 areas does not change often. So redoing the whole set when needed is way cheaper then running nearest operations every time where doing analytics for specific areas. And in real life there are many more of these cases where preparing the data by creating smart lookups works fine so it can be a time and resource saver to consider.

The full description and code used can be found at https://github.com/taatuut/NATURA9000 It also includes some example code to visualise the results. Of course quick&dirty code but it should work for you too in case you want to test it.

If you find this interesting and have ideas how to improve this, or want to help Sensing Clues anyway with the work they do then let me know, and check out https://sensingclues.org/ anyway. Also looking for volunteers with GeoServer skills!

About an ASCII art data model…

Thought this is funny. A colleague at Solace posted on LinkedIn about ‘know your data, and be curious about your data’ with some comparisons that made me wonder what an ascii art model actually means.

Of course had to check what ChatGPT can do with that so got me some ascii art and requested an answer on the input.
The initial response was ‘a mountain range or landscape’. Quite an interesting response, not bad at all although the dirty mind still seems to be hard for AI? Or it is just polite and pretends not to see any NSFW stuff? But of course I did not take that first guess for a final answer, and (surprisingly?) the second take was way better.

Here is the actual dialogue:

EZ
Given the following text input below, describe what it means. Note that it might help to look at this text using a monospaced font although that is not required.

ChatGPT
The given text input appears to be an ASCII art representation of a mountain range or landscape. It depicts a series of mountains, represented by multiple lines and characters, with varying heights and shapes. The specific interpretation and meaning of the art may vary depending on the intended context or artist’s intention.

EZ
ASCII art is correct, but the representation is not a mountain range or landscape. Try again.

ChatGPT
Apologies for the previous incorrect interpretation. Upon closer inspection, the given text input appears to be an ASCII art representation of a person or figure. The arrangement of characters suggests the outline of a person, potentially in a standing or upright position. The specific details and features of the figure may vary depending on the specific arrangement and characters used. ASCII art can be open to interpretation, so different individuals may perceive it differently based on their own visual interpretation.

EZ
Almost right on the representation, it is a female person sitting on the ground. Respond with 3 similar ASCII arts.

ChatGPT
Certainly! Here are three similar ASCII art representations of a female person sitting on the ground:

markdown
       o
      /|\
      / \
scss
       o
     _( )_
      /|\
      / \
markdown
       o
     \_o_/
      /|\
      / \

Please note that ASCII art can vary in style and complexity, so these representations may differ in their level of detail or artistic interpretation.

EZ
Create 3 more ASCII arts on the same subject, but much more complex, using at least 30 lines with maximum width of 80 characters.

ChatGPT
Certainly! Here are three more complex ASCII art representations of a female person sitting on the ground:

javascript
                                  __
                           .-~~.-'  |
                          /        /
                         /        /
                        /  (   ' |
                       /   )    -|
                      /  /      /
                     /  /      /
                    /_ /______/
                   _;;-)'--(_/-.7
                  /  (_    . -(_/
                 /    /   /   /
                /    /   /   /
               /    /   /   /
              /    /   /   /
             /    /   /   /
            /    /   /   /
           /    /   /   /
          /    /   /   /
         /    /   /   /
        /    /   /   /
       /    /   /   /
      /    /   /   /
     /    /   /   /
    /    /   /   /
   /    /   /   /
  /    /   /   /
 /    /   /   /
/____/___/___/
arduino
                         ________
                        //  ||\ \
                      //____||_\ \
                    //      |   \ \
                  //  /|    |    \ \
                //  /  |    |     \ \
              //  /    |    |      \ \
            //  /      |    |        \ \
          //  /        |    |          \ \
        //  /  _______|    |_______    \ \
      //  /  /        |    |       \    \ \
    //  /  /          |    |        \    \ \
  //  /  /            |    |         \    \ \
//  /  /              |    |          \    \ \
||  ||               |    |           |    | |
||  ||               |    |           |    | |
||  ||               |    |           |    | |
ruby
                 _____
             .-'.  ':'-.
          __/_   `  _   \__
      .-'`    '-.,,.-'    `'-.
   _ /    .  ,           .    \ _
  / '- . ..-  -.._.._..-   . -' \
 |     _________________      |
 |  . /  ________________ \ .  |
  \__|  |               |  |__/
      |  |               |  |
       \  \             /  /
        '--'._________.'--'

Toys for boys and girls and AI

Tjemig de pemig! Nice new toys all over the place. Created some images with https://www.bing.com/images/create/

Here is an example using the following prompt:
photos of a desolate landscape on an unknown planet covered with dense vegetation covering the soil while a pale sun is hidden by heavy rains pouring down and big herbivore like animals frolic happily around because the dry season is over.

Then run through Meta AI SAM (Segment Anything Model, https://github.com/facebookresearch/segment-anything) to get the masks.

Now the only thing left to classify unknown species on an unknown planet is some class labels to attach to the masks. Just tapping into the interstellar radio traffic to see what I can find out there.

Value content / content value

Playing a bit with Microsoft Bing Image Creator powered by DALL-E at https://www.bing.com/images/create/

Not bad, in case you are looking for images of a ‘Sad pale goth girl with hands with four fingers fingers and a thumb wearing gloves reaching out for the skies dressed in total black dancing in colourful Elysean Fields with lots of crows flying around her, in romantic photo realistic style’.

One general remark on AI image creation: the random placement of limbs and amount on fingers that can be put on a human hand still needs some attention. So far I have not found an AI image creation engine that stays close to the more or less general accepted definition of ‘one arm at each side of the body with a hand with four fingers and a thumb at the end’. Maar een kniesoor die daarop let 🙂

Dude, where is my car?

Maybe my definitions are just not good enough to become an AI prompter professional yet. Something like ‘a human with one arm at each side of the body with a hand with four fingers and a thumb at the end of each arm, photo realistic style‘ still gives three, four arms, Donald Duck hands, it’s all there.

Still way cool to test drive, as I always wanted to have ‘hyper realistic photos of humanoids playing basketball in a high class area at the outskirts of a big city‘ before I get my Friday evening borrel.

I think for the near future the discussion about how to distinguish between human and AI generated content is going to be an interesting one from multiple perspectives.

Here are my holiday ‘photos of a desolate landscape on an unknown planet covered with dense vegetation covering the soil while a pale sun is hidden by heavy rains pouring down and big herbivore like animals frolic happily around because the dry season is over‘.