Goodbye source/VENV/bin/activate

TL;DR: run pip install --user vex and vex --path venv* $SHELL

I have used python virtual environments for years without caring about its details. I recently had to because of heavy changes to my terminal setup, including the change of shell from the boring bash to fish shell, which ...


Yaml fixture with ManyToManyField in Django

The official docs explain how to set up “natural keys” for easier writing of fixtures.

The things to remember are basically two:

  • setup a models.Manager (write the class with an appropriate get_by_natural_key method and instantiate it in the managed class)
  • the fields used for a natural key must be ...

automatically activate python virtualenv in pycharm

I slightly modified an answer from stackoverflow to make it work on linux

nano ~/.pycharmrc
if [ -r ".pycharm/term-activate" ]; then
   source ~/.bash_profile
   source ".pycharm/term-activate"
   source $PYCHARM_VENV/bin/activate

On your project folder, assuming you have a virtual environment called venv35,

mkdir .pycharm
nano .pycharm/term-activate

With the content ...


Lessons learnt from my bachelor thesis

In this post I’ll describe what I did for the bachelor thesis, some problems I encountered and the solutions I found.

My bachelor degree required a final group project; mine was about the fatigue failure in poly-crystalline silicon. My job was focused on running static load simulations using finite ...