Jianghao Wang | 2021-11-26
https://github.com/ffay/lanproxy
Taking Ubuntu 20.04 as an example
login Tencent Server: first change the root pwd setting.
Jianghao Wang | 2021-11-26
https://github.com/ffay/lanproxy
Taking Ubuntu 20.04 as an example
login Tencent Server: first change the root pwd setting.
# wang** | |
ssh root@45.79.186.179 | |
# add a user | |
sudo adduser sentiment | |
cd ../home/ | |
sudo chmod 700 sentiment/ | |
# Add the new user to the sudo group | |
usermod -aG sudo sentiment | |
# test |
# Ref: https://rpubs.com/Koundy/71792 | |
library(ggplot2) | |
library(gridExtra) | |
library(ggsci) | |
library(extrafont) | |
library(grid) | |
library(ggthemes) | |
library(ggpmisc) |
# method 1 | |
Sys.setlocale("LC_TIME", "C") | |
options(encoding = "gbk") | |
shp <- maptools::readShapePoly("**.shp") | |
proj4string <- CRS("+proj=longlat +datum=WGS84") | |
proj4string(shp) <- proj4string | |
# method 2 | |
library(rgdal) | |
shp <- readOGR("**.shp", layer = "**", use_iconv = TRUE, encoding = "UTF-8") |
df <- mutate(df, !!paste0("days_", d) := number) | |
--- | |
title: "Title" | |
author: "Jianghao Wang" | |
date: "`r Sys.Date()`" | |
output: | |
html_document: | |
toc: true | |
toc_float: true | |
collapsed: false | |
smooth_scroll: false |
--- | |
title: "Title" | |
author: "Jianghao Wang" | |
date: "`r Sys.Date()`" | |
output: | |
prettydoc::html_pretty: | |
theme: architect # architect cayman leonids tactile hpstr | |
highlight: github # vignette github | |
toc: true | |
toc_depth: 2 |
library(foreach) | |
library(doSNOW) | |
cl <- makeCluster(20) | |
registerDoSNOW(cl) | |
start.time <- Sys.time() | |
pb <- txtProgressBar(max = length(users.sub), style = 3) | |
progress <- function(n) setTxtProgressBar(pb, n) | |
opts <- list(progress = progress) | |
fddf <- foreach(u = 1:length(users.sub), .options.snow = opts) %dopar% { | |
access_token <- access_tokens[u %% 10 + 1] |
setCurl <- function(uid=1404376560, access_token="2.00X_6UXFwXYrFD089496f37cRKW2TB"){ | |
prefix <- "curl \".....................&request_data=" | |
suffix <- "&_t=0\" --compressed --connect-timeout 5 -m 10" | |
url <- paste0(prefix, "uid%3D", uid, "%26access_token%3D", access_token, suffix) | |
return(as.character(url)) | |
} |
# Ref: https://rpubs.com/Koundy/71792 | |
library(ggplot2) | |
library(gridExtra) | |
library(ggsci) | |
library(extrafont) | |
library(grid) | |
library(ggthemes) | |
library(ggpmisc) |