Tuesday, May 8, 2018

Python read files line by line

fo = open('inputFileName', 'r')
lines = fo.readlines()
for ln in lines:
    print(ln)

Tuesday, May 1, 2018

To remove parenthesis and all the stuff inside:

AAV (South Africa) Volkswagen
AHT (South Africa) Toyota
AFA (South Africa) Ford
CL9 (Tunisia) Wallyscar

sed -e 's/([^()]*)//g'


AAV     Volkswagen
AHT     Toyota
AFA     Ford

CL9     Wallyscar

Monday, April 30, 2018

my .vimrc file

set nocompatible
        filetype off
        set rtp+=~/.vim/vundle.git/
        call vundle#rc()
        "Bundles:
        Bundle 'gmarik/vundle'
        Bundle 'jiangmiao/auto-pairs'
        Bundle 'Lokaltog/vim-powerline'
        Bundle 'scrooloose/syntastic'
        Bundle 'scrooloose/nerdcommenter'
        Bundle 'scrooloose/nerdtree'
        Bundle 'tmhedberg/SimpylFold'
       "
set number
set relativenumber
syntax on
set background=light
hi clear
syntax enable
colorscheme monokai
set shiftwidth=4
set tabstop=4
set expandtab
set laststatus=2

" searching
set hlsearch
set incsearch
set ignorecase
set smartcase
set showmatch

my-alpine and docker-compose.yml

 ``` version: '1' services:     man:       build: .       image: my-alpine:latest   ```  Dockerfile: ``` FROM alpine:latest ENV PYTH...