Vim-mediawiki-editor

vim-mediawiki-editor might make the links wiki fun again for me.

Pandas

Jupyter/pandas output entire text in column without truncating

pd.set_option('display.max_colwidth', -1)
d[['co','otext']]

Pandas count occurrences of value inside a df row (and of values inside a list in a column)

I need to work on my descriptions. d['pos'] contains a list inside every row. I need to count the occurrences of a value inside this list. So I transform the list in a Series and then do value_counts, and each element of the list will be in its own column. The value of each column will be the number of occurrences.

d['pos'].apply(pd.Series.value_counts)

I can do .fillna(0) at the end to put a 0 instead of NaN.

Though this feel awfully slow. (And why doesn’t simply .tolist work?)

(SO)

Pandas latex code output

Apparently if text between two $s in the output of a command gets parsed like latex?

Quotes

Michael Crichton invented the term Gell-Mann Amnesia as a reference to Nobel-winning physicist Murray Gell-Mann, who remarked that even though the newspapers were always wrong about his area of expertise (physics), he always found himself trusting them about everything else. (SSC)

Thesis

0530_final_dataset.csv contains the final cleaned-up dataset with tokens, parts of speech, URIs/hashtags/mentions as their own POS, etc.

Zsh taskwarrior statusline indicator

Changed the statusline to the following:

function task_indicator {
    if [ `task +READY +OVERDUE count` -gt "0" ]  ; then
        #printf "%b" "\u$OVERDUE"
        printf "%b" "!!!"
    elif [ `task +READY +O count` -gt "0" ]  ; then
        #printf "%b" "\u$DUETODAY"
        printf "%b" "!!"
    elif [ `task +READY +A count` -gt "0" ]  ; then
        printf "%b" "!"
    else
        printf "%b" "\u$OK"
    fi
}
task="\$(task_indicator)"
addprompt=$task

Now in zsh the statusline gets changed based on the amount of important tasks still pending. More simple than what was before.