## Intro 1: How to Create a Life that Flows Smoothly

It is safe to say that you – at least once in your lifetime – have experienced something that you can refer to as happiness.

How long did it last? Not long, I imagine. Perhaps, you uneventfully transitioned to something that resembled ‘normality’, or worse, other issues came up immediately and spoiled your mood.

Even though happiness didn’t last long, it does not stop you from seeking more of it.

But what kind of happiness are you seeking? The immediate kind? Fuelled by sex drugs and rock and roll? Happiness as a reward for your hard work and sacrifice? Maybe by obtaining an object of desire, such as a new house, job, car or spouse? Or are you just, “kinda-okay” – happy to sit and wait?

The choice seems to be between obtaining happiness now, later, or not seeking it at all. With the first, you will be happy immediately and miserable later, with the second, you will be waiting agonic until your goal materialises, and maybe, in the long run, you will feel happier. With the third, you are not even trying.

These are the options, are you ready?

If you haven’t chosen to give up already, maybe there is a better option. Let’s see what ancient Greece and Rome thought about this topic!

Continue reading “Intro 1: How to Create a Life that Flows Smoothly”

## Testing in Python

After having seen how to test in R.

Let’s see how to do the same in Python:

## Writing a tests-oriented program

A good practice demand that we should try to write our test before we code the program we intended to.

At least, we can try to write the code in a way that is easier to test in the future. Trying to fight out natural tendency to write the tests after your code.

To do that try to follow these guidelines:

### Guidelines

Continue reading “Testing in Python”

# A Review

What is a psychopath? Should I be scared of them? How can I know if somebody is one? Am I one?

These and many others are the questions that Jon Ronson try to answer in this book: The Psychopath Test!

This book is far from the usual philosophical book present here, but I think it is interesting to see another aspect of human mind. It’s interesting to see how genetic and upbringing can produce certain individual completely different from the great majority of human beings.

Ronson started his interest in psychopathy almost by random, by a strange book contained inside an unanimous parcel.

He is not the only one who encountered this mysterious book and, around the world, psychiatric and journalist have already received it.

This episode kicks off a spiral of research, interviews and paranoias that last for almost two years, and that is summarised in this book.

Continue reading “The Psychopath Test, by Jon Ronson”

## “Stillness is the Key” by R. Holiday

Stillness is the key is the latest book by the American author and entrepreneur Ryan Holiday.

I already wrote about one of his previous books the Daily Stoics (2016) in my post on the best book for Stoicism.

With this book Holiday completes an ideal trilogy of books: The Obstacle is the Way (2014) and Ego is the Enemy (2016).

I found this book in the gift bag of the latest Stoicon in Athens, and despite having a huge backlog of books I started reading immediately. I was not particularly familiar with Holiday’s assays, as I haven’t read the other two books of this trilogy.

Continue reading ““Stillness is the Key” by R. Holiday”

## Stoicon 2019 Athens, Greece

On the 5 of September took place, in Athens, the 2019 Stoicon!
The word conference of Stoicism.

I have been so lucky that I was able to assist it for the second time after last year in London. This was actually the 5th Stoicon ever done. There were: London 2014 and 2015; New York 2016, Toronto 2017 and London 2018.

The next location for 2020, is still to be decided, although, I hope that after Athens, Rome will follow.

Athens is, of course, the perfect city for hosting a conference on an ancient Greek philosophy.

By walking its street and ruins you can have the sense that this was one of the most important birthplace of philosophy, democracy and in general the western civilisation. it has been a constant trill for me.

Besides, the city offers good food and its autumn weather was better of this year summer here in the UK!

## The conference

This year conference was hosted in the Cotsen Hall of the American School of Classical Studies at Athens.

Continue reading “Stoicon 2019 Athens, Greece”

## Review on: “On Living and Dying Well” by Cicero

If you, like me, had the to translate Cicero in school, you probably hate the guy! The first thing you would, in every Latin test, was to glance a the author name and hope that was not Cicero. Anything but Cicero!!! Such his texts are hard to translate!

Despite, be the name of the book I want to suggest you is titled On Living and Dying Well. I’m still more frightened by the name of the author.

Continue reading “Review on: “On Living and Dying Well” by Cicero”

## Alpha parameter doesn’t work on geom_rect!!! Sort of…

The parameter alpha in the R package ggplot2 is used to express the transparency of the fill colour of the function geom_

However for the function geom_rect it might not work as aspected.

In my latest work, I tried to combine different geom function but I was stuck when all was covered when I used geom_rect.
Let’s see an example:

library("dplyr")
library("ggplot2")
df =
data.frame(
x = c(rep(1, 25), rep(2, 25), rep(3, 25)),
y = c(sample(1:50, 25), sample(51:100, 25), sample(101:150, 25)),
classes = c(rep("A", 25), rep("B", 25), rep("C", 25)))

head(df)
#  x  y classes
#1 1 45       A
#2 1  4       A
#3 1 41       A
#4 1 32       A
#5 1  8       A
36 1 14       A


If we plot the data using geom_jitter and geom_boxplot we obtain the plot:

ggplot(data = df,
aes(x = x, y = y, colour = classes)) +
geom_jitter() +
geom_boxplot(alpha = 0.2) +
theme_minimal()

Continue reading “Alpha parameter doesn’t work on geom_rect!!! Sort of…”

## More Than Happiness: Buddhist and Stoic Wisdom for a Sceptical Age

In the book “More Than Happiness: Buddhist and Stoic Wisdom for a Sceptical Age” the author Antonia Macaro offers a detailed comparison between two ancient philosophic and life inspiring practice: Stoicism and Buddhism.

## Review

In the book “More Than Happiness: Buddhist and Stoic Wisdom for a Sceptical Age” the author Antonia Macaro offers a detailed comparison between two ancient philosophic and life inspiring practice: Stoicism and Buddhism.

In my experience, when the first is mentioned or discussed the second is usually brought up. After reading this book It is clear to me, how the two philosophy offer similar solutions for how to tackle day-to-day. Although, those solution come from traditions and sensibilities way different.

Continue reading “More Than Happiness: Buddhist and Stoic Wisdom for a Sceptical Age”

## Hidden Markov Model applied to biological sequence. Part 2

This is part 2, for part 1 follow this link.

# Application on Biological sequences

As seen thus far, MC and HMM are powerful methods that can be used for a large variety of purposes. However, we use a special case of HMM named Profile HMM for the study of biological sequences. In the following section, my description of this system should explain the reasoning behind the use of Profile HMM.

# Analysis of a MSA

Let us consider a set of functionally related DNA sequences. Our objective is to characterise them as a “family”, and consequently identify other sequences that might belong to the same family [1].

We start by creating a multiple sequence alignment to highlight conserved positions:

 A C A – – – A T G T C A A C T A T C A C A C – – A G C A G A – – – A T C A C C G – – A T C

It is possible to express this set of sequences as a regular expression. The family pattern for this set of sequences is:

$[AT][CG][AC][ACGT]^{*}A[TG][GC]$ Continue reading “Hidden Markov Model applied to biological sequence. Part 2”

## Introduction on Markov Chains Models

The Markov Chains (MC) [1][2] and the Hidden Markov Model (HMM) [3] are powerful statistical models that can be applied in a variety of different fields, such as: protein homologies detection [4]; speech recognition [5]; language processing [6]; telecommunications [7]; and tracking animal behaviour [8][9].

HMM has been widely used in bioinformatics since its inception. It is most commonly applied to the analysis of sequences, specifically to DNA sequences [10], for their classification [11], or the detection of specific regions of the sequence, most notably the work made on CpG islands [12].

### Overview

The Markov Chain models can be applied to all situations in which the history of a previous event is known, whether directly observable or not (hidden). In this way, the probability of transition from one event to another can be measured, and the probability of future events computed.

The Markov Chain models are discrete dynamical systems of finite states in which transitions from one state to another are based on a probabilistic model, rather than a deterministic one. It follows that the information for a generic state $X$ of a chain at the time $t$ is expressed by the probabilities of transition from the time: $t-1$.

Continue reading “Hidden Markov Model applied to biological sequence. Part 1”