snippet

lsyncd - synchronize daemon

What’s lsyncd My understanding is, it’s kind of rsync daemon. Install On Ubuntu Install on source servers (no need to install on destination servers). apt update apt install lsyncd Set kernel parameter fs.inotify.max_user_watches. /etc/sysctl.conf # for lsyncd fs.inotify.max_user_watches = 8192000 Before running We should configure firewall so that the source server can SSH to destination servers. Here is my ssh snippets. Use (sync) Configuration Here is the configuration example. mkdir /etc/lsyncd vim /etc/lsyncd/lsyncd.

Pandas - cheetsheet

Basic information about dataframe df.info() #basic information about dataframe len(df.index) #rethrn the number of rows (data) df.count() #return the number of values which are non-NaN on each column df.head() df.tail() Count the data in a column In this example, the column is “Product”. df["Product"].value_counts() unique values to series. df["Product"].unique() # the type numpy.ndarray check distrivution in graph # Check the data distribution # The column is Score ax = df["Score"]value_counts().plot(kind='bar') fig = ax.