###SSH into a remote machine###
ssh user@mydomain.com
#or by ip address
ssh user@192.168.1.1
exit: exit
###Install Something###
#If it's a new server, update apt-get first thing
###SSH into a remote machine###
ssh user@mydomain.com
#or by ip address
ssh user@192.168.1.1
exit: exit
###Install Something###
#If it's a new server, update apt-get first thing
| import pandas as pd | |
| import numpy as np | |
| from sklearn.feature_extraction import DictVectorizer | |
| def encode_onehot(df, cols): | |
| """ | |
| One-hot encoding is applied to columns specified in a pandas DataFrame. | |
| Modified from: https://gist.github.com/kljensen/5452382 | |
| #ifdef __ANDROID__ | |
| #include "jni.h" | |
| #include "android/log.h" | |
| #define LOG_TAG "psx" | |
| #define PRINTMSGS(...) __android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__) | |
| #endif | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <math.h> |
| import pandas as pd | |
| import pymysql | |
| from sqlalchemy import create_engine | |
| engine = create_engine('mysql+pymysql://<user>:<password>@<host>[:<port>]/<dbname>') | |
| df = pd.read_sql_query('SELECT * FROM table', engine) | |
| df.head() |