Add included files to your ctags file

To add the headers to the ctags file I found this little gem: https://vim.fandom.com/wiki/Generate_ctags_file_for_a_C/C%2B%2B_source_file_with_all_of_their_dependencies_(standard_headers,_etc)

And I ended up using it like this

gcc -M * | sed -e 's/[\ ]/\n/g' | sed -e '/^$/d' -e '/.o:[ \t]*$/d' | ctags-universal -R -L - --c-kinds=+p --fields=+iaS --extras=+q

I’m still missing the implementation of the header files though. That is my next step…

Posted in Uncategorized | Tagged , , , , | Leave a comment

Deoplete works well for latest vim

Neocomplete does not work with my current version of VIM. so I had to install an alternative. Deoplete is writen by Shougo and does the simple autocompletion that I expected to start with. Easy install with Bundles https://github.com/Shougo/deoplete.nvim

Posted in Uncategorized | Leave a comment

GPG links/tutorials/FAQ

Will not write yet another tutorial about how to setup GPG. I will link to the ones that I used to do several things.

Settup up GPG

https://oguya.ch/posts/2016-04-01-gpg-subkeys/

https://blog.tinned-software.net/create-gnupg-key-with-sub-keys-to-sign-encrypt-authenticate/

Setting up subkeys

https://oguya.ch/posts/2016-04-01-gpg-subkeys/

https://wiki.debian.org/Subkeys

Setting up GPG for SSH authentication

https://gregrs-uk.github.io/2018-08-06/gpg-key-ssh-mac-debian/

https://ryanlue.com/posts/2017-06-29-gpg-for-ssh-auth

https://opensource.com/article/19/4/gpg-subkeys-ssh

FAQ

https://security.stackexchange.com/questions/206072/how-do-i-interpret-output-that-produces-gpg-listing-keys

https://superuser.com/questions/1371088/what-do-ssb-and-sec-mean-in-gpgs-output

Posted in Uncategorized | Tagged , , , | Leave a comment

GPG does not output the key IDs by default

Wanted to start signing my mails and my git commits with my newly minted sub key. But when I did a

gpg2 --list-keys

I could not see the key ids to add to my git nor to my muttrc. After some searching around I found this nifty gpg argument that gave me what I wanted.

gpg2 --keyid-format LONG --list-keys

The LONG stands for the 16 character ID. And alternatively you can also define short for the 8 character one.

Posted in Uncategorized | Tagged , , , | Leave a comment

Always remember the clockwise/spiral rule

From time to time I need to go back and see how to “read” the const pointer order when declaring in C++. Here is a good reminder/link for it.

And try to always append a const in order for it to be less confusing.

Posted in Uncategorized | Leave a comment

Simple git commit auto fill

Back in the days when I worked for RedHat I remember having a neat autocomplete git hook that filled in my git commit message. I liked the way it was formatted and I remember it being something similar to this.

* /Path/To/Changed/File0 (Method0):
(Method1)
(Method2)
(Struct)
* /Path/To/Changed/File1 (Method0):
...

Here I try to reproduce this effect by having a very simple script that uses the git diff. Here is the script:

git diff --cached | \ [ruby-2.7.1p83]
grep -e '^@@.*@@.*(.' -e '^@@.*@@..struct.{' -e '^diff ..git' | \ sed 's/^@@.*@@ /@@ /' | \
sed 's/(.//' | \
sed 's/@@.struct/@@@ struct/' | uniq | \
awk -F " " '/^diff --git/{gsub(/^./,"",$3);print "#*"$3" :"} /^@@@ struct/{gsub(/{/,"", $3);print "#("$3") :"} /^@@ /{print "#("$2") :"}'

The `grep` line selects the relevant git diff lines. The `sed` lines remote the text that goes around the lines containing the “@@” string. And finally the awk line formats three types of lines: 1. the file change, 2. the method change, and 3. the struct change.

This script has some shortcomings:

  1. New methods, structs do not show up
  2. Sometimes the diff will have a method, struct name that is not actually changed.

Still I’ll make this post as a reminder to myself and a place where I can start next time I want to “give this a shot”

Posted in Uncategorized | Tagged , , , | Leave a comment

Phenology Detection At IBIMET

I was a visiting researcher at the Institute of BIoMETeorology (IBIMET) in Sassari Italy in the month of July 2013. My work there was directed at applying known research from the Richardson lab for using color responses to characterize phenological behavior. You can find the relevant research in this paper.

Research at IBIMET centers on monitoring phenological behavior of the different plant species in the north-west of Sardinia in the Porto Conte – Capo Caccia Nature reserve. The people at IBIMET-Sassari have installed a pan-tilt-zoom camera in a location of interest and have collected images during several months of the species growing in the natural reserve. I have compiled these images in a this movie which shows, among other things, the flowering of a species (around the 8th second). This is picked up by the excess green signal calculated with the Richardson paper concepts.

The gist of my work in Sassari can be summarized in the following figure:

The blue line represents the "raw" signal from the Excess Green Color space on the image series. The red represents the fitted Sigmoid signal. The date is calculated using the inflection point of the sigmoid and is when the flowering occurred.

The blue line represents the “raw” signal from the Excess Green Color space on the image series. The red represents the fitted Sigmoid signal. The date is calculated using the inflection point of the Sigmoid and is when the flowering occurred.

We see how the color signal can pick up relevant phenological variations. The idea is to automate the whole process and have an automata go through large amounts of image databases trying to detect these types of behavior.

Posted in Uncategorized | Tagged , , | Leave a comment

Leaf Counting and Identification.

Automating plant phenotyping. We have added an initial approximation to leaf counting and identification. This will detect the leaf centers and give the number of leafs of a plant. Inspiration came from a paper presented at CVPPP20143-D Histogram-Based Segmentation and Leaf Detection for Rosette Plants. Jean-Michel Pape et. al. 2014. And while there is still some false negatives that need to be addressed, I think the use of a simple distance map, together with local maximum is a pretty good starting point. Here is an example image from our data set:

The circles mark the places where we detect a leaf.

The circles mark the places where we detect a leaf. Notice how the plants in the right did not get detected, this is due to segmentation errors.

The circles mark the detected leaf centers. Some of the leafs of these plants are not detected because they don't translate into a detectable maximum in the distance transformation.

The circles mark the detected leaf centers. Some of the leafs of these plants are not detected because they don’t translate into a detectable maximum in the distance transformation.

Image | Posted on by | Tagged , , , , , , , | Leave a comment

Automatic Season Detection

It’s not very difficult for a human to know when a season starts or ends from seeing an image series. It becomes very tedious to do it when you have millions of images to go through. This is where automatic season detection can aid efforts in academic (e.g. research on global warming) and industrial (e.g. Agriculture) contexts.

Posted in Uncategorized | Tagged , , , | Leave a comment

Image Recognition and Machine Learning are Cool/Scary :)

Check this link out. Cool because emotions (smile == happy), age, identity and lots more can now all be gathered automatically but its scary because emotions, age, identity and lots more can all be gathered automatically.

Check out the Smart Me Up company web page. It shows a really cool way of presenting all these concepts as well as how far these fields have come.

Posted in Uncategorized | 1 Comment