The blog of a juvenile Geekus biologicus

Analyser des sons pour le programme Vigie-Chiro sur votre machine GNU/Linux avec Wine

Après avoir enregistré des sons de chauve-souris, orthoptères ou d’oiseaux, il est souvent utile de jeter un oeil aux spectrogrammes des enregistrements, par exemple lors de l’analyse d’enregistrements réalisés dans le cadre du programme Vigie-Chiro. Les logiciels recommandés dans les tutoriels Vigie-Chiro sont, pour certains, développés uniquement pour Windows. Dans cet article, nous apprendrons comment installer ces logiciels (Kaleidoscope, Syrinx, Batsound 4, 7-zip et Lupas-Rename) sur une machine Linux à l’aide de Wine.

News

<2024-04-15 Mon> Je commence un stage au Laboratoire de Mathématiques et Modélisation d'Évry (LaMME), pour travailler sur un pipeline de détection de gènes dupliqués en tandem sous la supervision de Carène Rizzon et Franck Samson.

How to render pseudocode in Hugo with pseudocode.js

To render pseudocode in Hugo, you can use the pseudocode.js library. Here is what I did to make this working on my blog. Theme configuration In your theme files, you will first need to add link to the library CDN. <!-- in themes/<theme>/layouts/partials/pseucodode.html --> <script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.7/katex.min.js" integrity="sha512-EKW5YvKU3hpyyOcN6jQnAxO/L8gts+YdYV6Yymtl8pk9YlYFtqJgihORuRoBXK8/cOIlappdU6Ms8KdK6yBCgA==" crossorigin="anonymous" referrerpolicy="no-referrer"> </script> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/pseudocode@latest/build/pseudocode.min.css"> <script src="https://cdn.jsdelivr.net/npm/pseudocode@latest/build/pseudocode.min.js"></script> And render all element with pseudocode HTMl class. <!-- in themes/<theme>layouts/partials/pseudocode-render.html --> <script> let pseudocodeElements = document.

Unixfu

A bin for some useful UNIX command. Add two hours This could be useful for nocmig fan, to ease the hour computation of a bird contact. hour() { start=$1 duration=$2 IFS=":" read -r duration_hour duration_minute <<< $duration date -d "$start $(($duration_hour * 60 + $duration_minute)) minutes" +"%H:%M" } hour 17:00 5:43 22:43 WAV creation datetime Here is a small snippet that demonstrates how to get the creation date-time of a WAV file with ffprobe

Analyze projects programming languages using github-linguist

github-linguist is a Ruby library and command line tool for detecting the programming languages used in a project. It is used by GitHub to detect the language of a project and to generate language statistics. We can use it through the command line, in order to analyze the programming languages used in a project. During my application to bioinformatics master degree, I had to say which programming languages I commend. So here is some quick tips to use github-linguist as I learned to do for this purpose.

Astuce: Copier du texte dans le presse-papier depuis un terminal Linux

Il suffit d’installer xclip: sudo dnf install xclip # sur fedora par exemple Puis, c’est tout simple: echo "Coucou !" | xclip -selection c Un exemple d’utilisation: copier une clé publique ssh dans le presse papier depuis le terminal: cat ~/.ssh/id_ecdsa.pub | xclip -selection c

Générer le code LaTeX/chemfig d'une réaction chimique avec Zyme

Durant les trois années de licence bioinformatique, nous avons des cours de biochimie, et ceux ci viennent avec leur lots de structure chimiques à connaître. En L1, j’avais réalisé un document pdf avec LaTeX/chemfig des acides aminées protéinogènes en représentation de FISCHER, et j’avais trouvé ça plutôt sympa, bien que ça m’avait pris pas mal de temps à rédiger. Ajourd’hui, j’améliore ma méthode: fini le code de la structure en chemfig (extension LaTeX) a la mano, vive le code généré par du code !

Faire tourner Stable Diffusion sur Google Colab

Introduction Stable Diffusion est un modèle de deep learning permettant de générer des images photoréalistes à partir d’un prompt texte J’ai récemment découver ce modèle via lexica.art, après avoir entendu parler des concurents DALL-E, Imagen et consorts. Stable Diffusion a l’avantage d’être open source: tout le monde peut l’utiliser, et il fonctionne bien de surcroît. Prérequis J’utilise un compte Google dédié, avec Google Colab pour faire tourner Stable Diffusion. Le modèle devrait pouvoir tourner sur n’importe quelle plateforme Python, pourvu qu’il y ai assez de ressources GPU.

Arduino Camera Trap

Some years ago, I had the opportunity to create a camera trap based on an Arduino board. The goal of this project was to capture photos of wild animals, and to have fun with electronics and programming. At the time, I created a website in html, to present the project; but I can’t find the source code anymore… That’s a shame. I will try to present this old project again, hoping that it may interest someone.

How to mount a shared folder between Linux KVM Host and Guests

Sharing folder between KVM virtual machines and host, may be useful. Here is a way found in fedora forum. Quickstart Change vm to your vm hostname. sudo mkdir -p /mnt/shared sudo chmod -R a+rwX /mnt/shared sudo semanage fcontext -a -t svirt_home_t "/mnt/shared(/.*)?" sudo restorecon -R /mnt/shared tee fs.xml << EOF > /dev/null <filesystem type='mount' accessmode='mapped'> <source dir='/mnt/shared'/> <target dir='shared'/> </filesystem> EOF virsh shutdown vm virsh attach-device vm fs.xml --config virsh start vm ssh vm sudo mkdir -p /mnt/shared sudo tee -a /etc/fstab << EOF > /dev/null shared /mnt/shared 9p trans=virtio 0 0 EOF sudo mount -a References Virt-manager and shared folder host/guest permission issue?

How to use virtual environments

To not interfere with your os configuration and keep your project reproducible, you should use a virtual environment as long as possible. Virtual environment are a way to isolate your project from the rest of the system, and to avoid dependencies conflicts. Python Virtualenv Lets start by installing the virtualenv package. sudo apt install python3-venv And now you can create venvs for your project: python3 -m venv .venv/myproject It is a good practice not to create a virtualenv with name “venv”, but to use a name that reflects the project you are working on, in order to see directly in which venv you are working.

Install Gephi on Linux

Gephi is a software package for graph visualization. Let’s install it on Linux. Install Gephi Don’t forget to update the release version in the URL, as well as in the resulting decompressed folder name. wget https://github.com/gephi/gephi/releases/download/v0.9.5/gephi-0.9.5-linux-x64.tar.gz tar -xzf gephi-0.9.5-linux-x64.tar.gz sudo mv gephi-0.9.5 /opt/gephi Now you could use it by running ./bin/gephi in the terminal. Setup desktop entry For an easier access, you could add a desktop entry to your menu.

How to Classify Blood Cells Using Neural Networks

Machine Learning is widely used for image recognition. Here, we tried to perform blood cell classification using Convolutional Neural Networks.

How to make automatic documentation using Doxygen, breathe and Sphinx

Doing documentation is required, to allow people to use your project. Here I present a rather easy solution.

How to render LaTeX formula in Pelican

Rendering $\LaTeX$ formulas in Pelican is easy. Firstly import the pelican plugin in the proper python environment: pip install pelican-render-math Add render_math to PLUGINS list in your pelicanconf.py file: PLUGINS = ['render_math'] Then type formula in your blog post markdown documents: $$ \frac{1}{2} $$ $$ \frac{1}{2} $$ And that’s it !

Draw a Plot in C with GNU plotutils

Install plotutils Debian $ sudo apt-get install plotutils-dev Fedora $ sudo dnf install plotutils-devel Use PlotUtils to plot a graph Let us draw the $sin(x)$ function using math library. #include <stdio.h> #include <math.h> #define RANGE 100 // Export data to stdout void plot(double *x, double *y, size_t len) { for (unsigned int i = 0; i < len; i++) printf("%lf %lf\n", x[i], y[i]); } int main(void) { int i; double x[RANGE], y[RANGE]; // Compute sin(x) for (i = 0; i < RANGE; i++) { x[i] = i * 0.

Analyse Sound on GNU/Linux using Wine

After recording bats, orthoptera or birds sounds, it is often necessary to have a look at the spectrograms of the sounds, for instance while analysing Vigie-Chiro Program bat records. The software needed to do so are often developped only for Windows. In this article, we will learn how to install these softwares (e.g., Kaleidoscope, Syrinx, Batsound 4, 7-zip and Lupas-Rename). Install Wine Wine is a software that enable .exe software to run on UNIX systems such as Linux or Mac OS.