Monday, September 17, 2018

5 available pane layouts when using tmuxp

 
tmuxp pane layout options:  
 
1. even-horizontal
 
2. even-vertical 
 
3. main-horizontal 
 
4. main-vertical
 
5. tiled

Thursday, July 12, 2018

Add multiple columns to Pandas dataframe by applying a function that returns multiple values

df[['sum', 'difference']] = df.apply(
    lambda row: pd.Series(myfunc(row['a'], row['b'])), axis=1)
# The pd.Series is the key!

Tuesday, May 8, 2018

Python read files line by line

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

my-alpine and docker-compose.yml

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