nohup $python program.py &
-
first:
sudo nano /etc/ssh/sshd_config
-
add the following lines:
TCPKeepAlive no
def dict_inter(dict_in, flds): | |
dict_out = { | |
key: dict_in[key] for key in flds if key in dict_in.keys() | |
} | |
return dict_out | |
def dict_diff(dict_in, flds): | |
dict_out = { | |
key: dict_in[key] for key in dict_in.keys() if key not in flds | |
} |
import sqlite3, os | |
def vacuum(db_name): | |
print("Filesize of {} before vaccum is {:,d} bytes.". | |
format(db_name, os.stat(db_name).st_size) | |
) | |
conn = sqlite3.connect(db_name) | |
isolation = conn.isolation_level | |
print(isolation) | |
conn.isolation_level = None |
import openpyxl | |
import numpy as np | |
import pandas as pd | |
def get_column_letter(col_idx): | |
"""Convert a column number into a column letter (3 -> 'C') | |
Right shift the column col_idx by 26 to find column letters in reverse | |
order. These numbers are 1-based, and can be converted to ASCII | |
ordinals by adding 64. | |
""" |
import folium | |
ref_html = r'<a href="http://www.shenyang.gov.cn/" target="_blank"> I am here </a>' | |
pop_html = folium.Popup(folium.Html(ref_html, script=True)) | |
map_1 = folium.Map(location=[41.8057, 123.4315], zoom_start=12, | |
tiles='Stamen Terrain') | |
folium.Marker( | |
location = [41.8057, 123.4315], | |
popup = pop_html).add_to(map_1) |