Currently reading articles under label: backend-server-linux

Python Code Cookbook

See also:

Learning Python, the Language

Pandas

Get column_nr in pandas/numpy.

if isinstance(X, pd.DataFrame):

X_is_df = True

row_nr = X.shape[0]

column_nr = X.shape[1]

if isinstance(X.columns, pd.core.index.MultiIndex):

df_columns_is_multi_index = True

else:

......

Steps to Check Netwok Interface Card (NIC) Configurations

Check the physical NIC is connected.

lspci

Note: The NIC will be shown regardless if drivers are installed, this is a PCI feature. Ref.

Then check if it is recognized as network interfaces:

ifconfig -a

Check if it is up:

ifconfig

Quota

INSTALL

apt-get install quota

CONFIG

Add options usrquota,grpquota in /etc/fstab:

UUID=a5bcc8d7-asdf / ext4 errors=remount-ro,usrquota,grpquota 0 1

Set quota:

setquota -u -F vfsv0 USERNAME 4000000 5000000 0 0 /

4 000 000 ≈ 4GB.

OBS: block size is always 1 KB as unit, regardless file ......

Powershell In Case Of

Customizing PS Prompt

See more in [codeship].

install chocolatey i.e. win pkg manager

Option 1[chocolatey official]:

Set-E......

Bitvise SSH Client & Server

CLIENT

tunnelling (c2s)

(redirect traffic from C*lient ports to *S*erver ports)

The client will listen on **interface* 127.0.0.1 and forward the request to the server, the server will forward the request to the destination.

See also: bit.ly/s_ssh > # SSH Tunneling > ## port forwarding (direc......

SFTP (FTP over SSH)

TODO.

https://www.digitalocean.com/community/tutorials/how-to-enable-sftp-without-shell-access-on-ubuntu-16-04

Install

Config

Permission