info

Elasticsearch初探(一)

半腔热情 提交于 2020-03-14 10:02:21
一、安装(Linux篇) 现在的开源软件越来越成熟,都打好包了,下载后直接解压就可以测试了。 1 curl -L -O https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.3.1.tar.gz 2 tar -zxvf elasticsearch-6.3.1.tar.gz 3 cd elasticsearch-6.3.1/bin/ 4 ./elasticsearch 注意:elasticsearch不允许使用root权限启动,所以使用root下载解压的同学,要chown改变一下文件夹的用户权限。 看到如下信息就说明启动成功了。 [2018-07-12T11:07:00,877][INFO ][o.e.n.Node ] [] initializing ... [2018-07-12T11:07:00,922][INFO ][o.e.e.NodeEnvironment ] [4LdtI3q] using [1] data paths, mounts [[/home (/dev/mapper/cl-home)]], net usable_space [229.9gb], net total_space [240.9gb], types [xfs] [2018-07-12T11:07:00,923]

模块简介:(random)(xml,json,pickle,shelve)(time,datetime)(os,sys)(shutil)(pyYamal,configparser)(hashlib)

北城以北 提交于 2020-03-14 09:42:54
Random模块: #!/usr/bin/env python #_*_encoding: utf-8_*_ import random print (random.random()) #0.6445010863311293 #random.random()用于生成一个0到1的随机符点数: 0 <= n < 1.0 print (random.randint(1,7)) #4 #random.randint()的函数原型为:random.randint(a, b),用于生成一个指定范围内的整数。 # 其中参数a是下限,参数b是上限,生成的随机数n: a <= n <= b print (random.randrange(1,10)) #5 #random.randrange的函数原型为:random.randrange([start], stop[, step]), # 从指定范围内,按指定基数递增的集合中 获取一个随机数。如:random.randrange(10, 100, 2), # 结果相当于从[10, 12, 14, 16, ... 96, 98]序列中获取一个随机数。 # random.randrange(10, 100, 2)在结果上与 random.choice(range(10, 100, 2) 等效。 print(random.choice('liukuni')

身份证号的验证工具类---java

落爺英雄遲暮 提交于 2020-03-14 06:36:59
就简单的不调用身份证接口就验证身份证的一方法: package com.zelyy.common.util; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import java.util.HashMap; import java.util.Map; import org.apache.commons.lang3.StringUtils; /** * 身份证工具类 * */ public class IdcardUtils extends StringUtils{ /** 中国公民身份证号码最小长度。 */ public static final int CHINA_ID_MIN_LENGTH = 15; /** 中国公民身份证号码最大长度。 */ public static final int CHINA_ID_MAX_LENGTH = 18; /** 省、直辖市代码表 */ public static final String cityCode[] = { "11", "12", "13", "14", "15", "21", "22", "23", "31", "32", "33",

python数据分析处理库-Pandas

北慕城南 提交于 2020-03-14 06:13:10
1、读取数据 import pandas food_info = pandas.read_csv("food_info.csv") print(type(food_info)) # <class 'pandas.core.frame.DataFrame'> 2、数据类型 3、数据显示 food_info.head() # 显示读取数据的前5行 food_info.head(3) # 显示读取数据的前3行 food_info.tail(3) # 显示读取数据的后3行 food_info.columns # 列名 food_indo.shape # 数据规格 food_info.loc[0] # 第0行数据 food_info.loc[3:6] # 第3-6行数据 food_info.log[83,"NDB_No"] # 读取第83行的NDB_No数据 food_info["NDB_No"] # 通过列名读取列 columns = ["Zinc_(mg)", "Copper_(mg)"] food_info[columns] # 读取多个列 # 读取单位为g的列 col_names = food_info.columns.tolist() # 列名 gram_columns = [] for c in col_names: if c.endswith("(g)"): gram

centos7安装activemq

纵然是瞬间 提交于 2020-03-14 02:20:46
activemq下载地址,http://activemq.apache.org/download.html,下载后解压,进入bin,直接运行 activemq start bin/activemq start INFO: Loading '/usr/local/activemq/bin/env' INFO: Using java '/usr/local/jdk8/bin/java' INFO: Starting - inspect logfiles specified in logging.properties and log4j.properties to get details INFO: pidfile created : '/usr/local/activemq/data/activemq.pid' (pid '3880') 默认端口是61616,可以查看端口有没被占用 [root@localhost init.d]# netstat -an|grep 61616 tcp6 0 0 :::61616 :::* LISTEN 端口61616加入防火墙,后台管理端口8161也加入防火墙 firewall-cmd --zone=public --add-port=61616/tcp --permanent firewall-cmd --zone=public --add-port

【cl】找不到火狐Cannot find firefox binary in PATH

旧时模样 提交于 2020-03-13 23:56:55
org.openqa.selenium.WebDriverException: Cannot find firefox binary in PATH. Make sure firefox is installed. OS appears to be: VISTA Build info: version: '2.48.2', revision: '41bccdd', time: '2015-10-09 19:59:12' System info: host: 'MININT-RQ9DS4O', ip: '30.10.3.30', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_60' Driver info: driver.version: FirefoxDriver 解决办法有四个: 1.重新安装firefox在默认路径下; OS Expected Location of Firefox Linux firefox (found using "which") Mac /Applications/Firefox.app/Contents/MacOS/firefox Windows %PROGRAMFILES%\Mozilla Firefox\firefox.exe 2

iOS-简单拍照/取照片

我们两清 提交于 2020-03-13 20:34:21
在iOS中,系统提供了一个拍照视图控制器 UIImagePickerController, UIImagePickerController继承于 UIViewController,可以直接present出来。 在一个按钮事件里调出拍照界面来 - ( IBAction )click:( id )sender { self . controller = [[ UIImagePickerController alloc ] init ]; if ([ UIImagePickerController isCameraDeviceAvailable : UIImagePickerControllerCameraDeviceRear ]) { self . controller . delegate = self ; self . controller . allowsEditing = YES ; self . controller . sourceType = UIImagePickerControllerSourceTypeCamera ;//或者 UIImagePickerControllerSourceTypeSavedPhotosAlbum self . controller . cameraDevice =

python 的日志logging模块学习

三世轮回 提交于 2020-03-13 13:07:10
1.简单的将日志打印到屏幕 import logging logging . debug ( 'This is debug message' ) logging . info ( 'This is info message' ) logging . warning ( 'This is warning message' ) 屏幕上打印: WARNING:root:This is warning message 默认情况下,logging将日志打印到屏幕,日志级别为WARNING; 日志级别大小关系为:CRITICAL > ERROR > WARNING > INFO > DEBUG > NOTSET,当然也可以自己定义日志级别。 2.通过logging.basicConfig函数对日志的输出格式及方式做相关配置 import logging logging . basicConfig ( level = logging . DEBUG , format = '%(asctime)s %(filename)s[line:%(lineno)d] %(levelname)s %(message)s' , datefmt = '%a, %d %b %Y %H:%M:%S' , filename = 'myapp.log' , filemode = 'w' ) logging . debug

Fabrc 2.0 外部链码开发教程

ぐ巨炮叔叔 提交于 2020-03-13 09:54:15
在Hyperledger Fabric 2.0中引入的一个新特性,就是可以使用外部的链码启动器,这种外部启动链码的方式非常适合使用kubenetes或dowcker swarm来统一管理节点容器和链码容器。在这片文章中,我们将学习如何使用外部链码启动器在K8s集群中部署链码。 1、Fabric外部链码实验的前提条件 Hyperledger Fabric区块链开发教程: Fabric Node.js开发详解 | Fabric Java开发详解 | Fabric Golang开发详解 下面是我们实验的一些前提条件 一个kubenetes集群,你可以使用minikube或一个单节点的kubeadmin。在 本文中我们使用kubeadmin hyperledger fabric 2.0.1 docker镜像 hyperledger fabric 2.0.1 预编译程序。我们需要其中的工具来创建 密码学资料和通道交易配置文件。可以从 这里 下载。 从 这里 下载本文的代码 2、安装预编译程序 使用以下命令安装预编译程序: wget https://github.com/hyperledger/fabric/releases/download/v2.0.1/hyperledger-fabric-linux-amd64-2.0.1.tar.gz tar -xzf hyperledger

linux命令之man和info

我的未来我决定 提交于 2020-03-13 08:46:29
linux命令之man和info man ➜ ~ man ls result: LS(1)中1这样的数字的意义例如以下所看到的: 代号 内容 1 用户在shell环境中能够操作的命令或可运行文件 2 系统内核可调用的函数与工具等 3 一些经常使用的函数(function)与函数库(library)。大部分为C的函数库(libc) 4 设备文件的说明,通常在/dev下的文件 5 配置文件或者是某些文件的格式 6 游戏(games) 7 惯例与协议等,比如Linux文件系统、网络协议、ASCII code等说明 8 系统管理员可用的管理命令 9 跟kernel有关的文件 man page的内容意义例如以下所看到的: 代号 内容 NAME 简短的命令、数据名称说明 SYNOPSIS 简短的命令运行语法(syntax)简单介绍 DESCRIPTION 较为完整的说明 OPTIONS 针对SYNOPSIS部分中选项的说明 COMMANDS 当这个程序在运行时。能够在此程序中运行的命令 FILES 这个命令或所使用或參考或连接到的某些文件 SEE ALSO 这个命令或数据的其它说明 EXAMPLE 范例 BUGS 是否有相关的错误 man 命令的具体信息可通过 man man 查询。 除了man文档外,另一些别的说明文档,在 /usr/share/doc 这个文件夹下,比方info文档。