Snail Life

basketball dance rap


  • Home

  • Tags

  • Categories

  • Archives

  • Search

hot_site_arrange

Posted on 2021-03-08 | In 巧技 | | Visitors: ℃
Words count in article: 782 | Reading time ≈ 2

Hot Site Arrange

常用站点

​ Github热门

划水站点

微博热搜 百度风云榜 搜狗热搜榜 360实时热点 微信热门 微博实时热点 知乎热榜 贴吧热议榜

抽屉新热榜 豆瓣热门讨论 观察者热评 虎扑社区热帖 V2EX热议 站长之家热点

今日文章头条 知乎话题榜 cnBeta TOP10

钛媒体热文 36Kr资讯热榜 虎嗅24小时

Read more »

Radar_chart_1

Posted on 2021-02-26 | In -[DataAnalysis] | | Visitors: ℃
Words count in article: 602 | Reading time ≈ 3

Radar chart

The radar chart is a chart and/or plot that consists of a sequence of equi-angular spokes, called radii, with each spoke representing one of the variables. The data length of a spoke is proportional to the magnitude of the variable for the data point relative to the maximum magnitude of the variable across all data points. A line is drawn connecting the data values for each spoke. This gives the plot a star-like appearance and the origin of one of the popular names for this plot.

When to use it ?

  • Comparing two or more items or groups on various features or characteristics.
  • Examining the relative values for a single data point.
  • Displaying less than ten factors on one radar chart.
Read more »

Spark_2.2.0_ALS_recommend_scala

Posted on 2020-12-31 | In spark | | Visitors: ℃
Words count in article: 609 | Reading time ≈ 3

Spark_2.2.0_ALS_recommend_scala

针对spark 2.2.0版本,从hive读取数据,转为rdd(由于scala 版本原因,用spark.ml会报错,只能用spark.mllib,所以会转为rdd),以及利用scala工具和sparkML相关工具包进行数据处理与建模,然后对模型进行详细评价,代码如下:

1
2
3
4
5
6
7
8
import spark.implicits._

import org.apache.spark.rdd._
import org.apache.spark.sql._

import org.apache.spark.mllib.recommendation.Rating
import org.apache.spark.mllib.recommendation.ALS
import org.apache.spark.mllib.recommendation.MatrixFactorizationModel
Read more »

Spark_2.2.0_LogisticRegression_scala

Posted on 2020-12-31 | In spark | | Visitors: ℃
Words count in article: 1.6k | Reading time ≈ 8

Spark_2.2.0_LogisticRegression_scala

针对spark 2.2.0版本,从hive读取数据,转为DataFrame,以及利用scala工具和sparkML相关工具包进行数据处理与建模,然后对模型进行详细评价,代码如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import org.apache.spark.sql.SparkSession
import org.apache.spark.sql.hive.HiveContext

import scala.collection.mutable.ListBuffer

import util.Random
import org.apache.spark.sql.Row
import org.apache.spark.sql.types._
import org.apache.spark.sql.functions
import org.apache.spark.sql.functions.udf
import org.apache.spark.sql.functions.rand

import org.apache.spark.ml.stat.ChiSquareTest
import org.apache.spark.ml.linalg.DenseVector
import org.apache.spark.ml.linalg.{Vector, Vectors}
import org.apache.spark.ml.classification.LogisticRegression

import org.apache.spark.ml.param.ParamMap
import org.apache.spark.ml.{Pipeline,PipelineStage}
import org.apache.spark.ml.tuning.{ParamGridBuilder, TrainValidationSplit}

import org.apache.spark.ml.feature.Binarizer
import org.apache.spark.ml.feature.VectorSlicer
import org.apache.spark.ml.feature.StandardScaler
import org.apache.spark.ml.feature.{IndexToString, OneHotEncoder,StringIndexer, VectorIndexer,VectorAssembler}

import org.apache.spark.mllib.evaluation.MulticlassMetrics
import org.apache.spark.ml.evaluation.MulticlassClassificationEvaluator
import org.apache.spark.ml.classification.{BinaryLogisticRegressionSummary, LogisticRegression, LogisticRegressionModel,LogisticRegressionSummary}
Read more »

github_ssh_免密登录

Posted on 2020-12-02 | In 巧技 | | Visitors: ℃
Words count in article: 646 | Reading time ≈ 3

Github ssh key生成,免密登录服务器方法

生成sshkey

1、查看是否存在ssh key,如果有会列出key的列表

1
2
$ ls -al ~/.ssh
# Lists the files in your .ssh directory, if they exist

2.生成密钥 参数说明

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
$ ssh-keygen -t rsa -C "snailfrying@gmail.com"
Too many arguments.
usage: ssh-keygen [-q] [-b bits] [-t dsa | ecdsa | ed25519 | rsa]
[-N new_passphrase] [-C comment] [-f output_keyfile]
ssh-keygen -p [-P old_passphrase] [-N new_passphrase] [-f keyfile]
ssh-keygen -i [-m key_format] [-f input_keyfile]
ssh-keygen -e [-m key_format] [-f input_keyfile]
ssh-keygen -y [-f input_keyfile]
ssh-keygen -c [-P passphrase] [-C comment] [-f keyfile]
ssh-keygen -l [-v] [-E fingerprint_hash] [-f input_keyfile]
ssh-keygen -B [-f input_keyfile]
ssh-keygen -D pkcs11
ssh-keygen -F hostname [-f known_hosts_file] [-l]
ssh-keygen -H [-f known_hosts_file]
ssh-keygen -R hostname [-f known_hosts_file]
ssh-keygen -r hostname [-f input_keyfile] [-g]
ssh-keygen -G output_file [-v] [-b bits] [-M memory] [-S start_point]
ssh-keygen -T output_file -f input_file [-v] [-a rounds] [-J num_lines]
[-j start_line] [-K checkpt] [-W generator]
ssh-keygen -s ca_key -I certificate_identity [-h] [-U]
[-D pkcs11_provider] [-n principals] [-O option]
[-V validity_interval] [-z serial_number] file ...
ssh-keygen -L [-f input_keyfile]
ssh-keygen -A
ssh-keygen -k -f krl_file [-u] [-s ca_public] [-z version_number]
file ...
ssh-keygen -Q -f krl_file file ...

3.运行日志

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#存储密钥路径 /users/admin/   woniu@DESKTOP-04BM85Q MINGW64 ~/.ssh (master)
$ cd ~/.ssh
#查看是否已有历史密钥文件
$ ls
id_rsa id_rsa.pub known_hosts
#如果有则删除
$ rm *
#回到当前路径
$ cd ~
#生成密钥
$ ssh-keygen -t rsa -C "snailflying@gmail.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/woniu/.ssh/id_rsa):#直接回车
Enter passphrase (empty for no passphrase):#输入github密码
Enter same passphrase again:#再一次输入github密码
Your identification has been saved in /c/Users/woniu/.ssh/id_rsa.
Your public key has been saved in /c/Users/woniu/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:EIJXUUfM0KGak/6U69zVf+ux2ZKcgD9ZVjt2o/osQRE snailfrying@gmail.com
The key's randomart image is:
+---[RSA 2048]----+
| ...+oo*+E. |
| . .. . o+. |
| . . . . |
| = . .|
| = S .. ..|
| . . .....o=.|
| . o .o*+++|
| + o o=.=.*|
| .= ..++.*=|
+----[SHA256]-----+
#进入生成密钥存储文件
$ cd .ssh
woniu@DESKTOP-04BM85Q MINGW64 ~/.ssh (master)
#查看
$ ls
id_rsa id_rsa.pub
#查看公共密钥,粘贴进github主页存储密钥路径
#即github主页(头像)--> settings --> SSH and GPG keys --> SSH keys
#删除已有key,重新导入 下列输出公钥
$ cat id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDTt4T7Ht1+uYW9eZhecy/ztAQ0X3WujF1rwXeTlHRgMBk6iTPvOVO34WnmThOcvv3cLkUiYHNJB8SfihjikoILgJUWFwMEXLC/kOZMhy/UXh9QQZuGksS6ExXuw/WRVgzJ99jzAwyqXG+cMgoUt5CnuPUD15HLstHj8wzMajHJ8+eUny2BiQDzIqAg07Hj7xXtVwMOPXH+fVMhQ6yUEqEhDMEt0udjuz8zcBzY5vwlWHISexvuw2ktoC2TpY8KbB3YB1HazE53ixP7l0qBRkt+6Vpk2dKrjyUWOj5u+mBXowJjaEJGje6IeiCXwbOdyaflirdnzPy+8B9FwwJFVEs7 snailfrying@gmail.com

#配置账户
$ git config --global user.name "snailfrying"
#配置邮箱
$ git config --global user.email "snailfrying@gmail.com"
#验证是否成功
$ ssh -T git@github.com
The authenticity of host 'github.com (192.30.255.112)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,192.30.255.112' (RSA) to the list of known hosts.
Enter passphrase for key '/c/Users/woniu/.ssh/id_rsa':
Hi snailfrying! You've successfully authenticated, but GitHub does not provide shell access.
#推送到远程,实现同步
$ git push
fatal: The current branch master has no upstream branch.
To push the current branch and set the remote as upstream, use

git push --set-upstream origin master

#回到工程目录,进行提交
$ cd
$ cd D:
$ cd snail_blog
$ cd blog
$ hexo d g
12…11

snail json

您心底所憧憬的事物,一定在某个维度发生

54 posts
15 categories
21 tags
RSS
GitHub E-Mail Google 知乎

Tag Cloud

  • -- thread1
  • Anaconda1
  • Optimization1
  • algorithms27
  • db22
  • github1
  • hive2
  • linux1
  • markdown1
  • python20
  • self-study1
  • site1
  • sql2
  • statistics1
  • thread3
  • vim1
  • win10快捷键1
  • 古月山风1
  • 梦想1
  • 破晓1
  • 随笔2
© 2021 snail json | Site words total count: 137.6k
Powered by Hexo
|
Theme — NexT.Mist v5.1.4
snail silly?