08 2017 档案

摘要:#coding=utf-8 from __future__ import division from nltk.book import * # 打印文本名称 print text1 # 查找文本中的词monstrous print text2.concordance("monstrous") # 查找与词monstrous有相似上下文的其他词 print text2.similar("mo... 阅读全文
posted @ 2017-08-24 10:30 右介
摘要:机器IP为192.168.58.11,计划在上面新建两个分片并添加到原有分片集群中。 实施如下: 1、58.11创建mongodb文件夹 mkdir -p /opt/mongodb cd /opt/mongodb 2、58.11下载mongodb的安装程序包 wget http://fastdl.m 阅读全文
posted @ 2017-08-11 14:18 右介
摘要:import os import base64 fileSize = os.path.getsize(文件路径) with open(文件路径, 'rb') as f: data = base64.b64encode(f.read()) 阅读全文
posted @ 2017-08-09 14:05 右介
摘要:# coding: utf8 from PIL import Image img = Image.open("img.jpg") print img.sizeprint img.format 阅读全文
posted @ 2017-08-08 14:16 右介
摘要:#连接mongos /opt/mongodb/mongodb-linux-x86_64-2.4.8/bin/mongo 127.0.0.1:27017 #使用admin数据库 use admin #指定testdb分片生效 db.runCommand( { enablesharding :"dbna 阅读全文
posted @ 2017-08-04 12:03 右介
摘要:在部门服务器搭建MongoDB分片集群,记录整个操作过程,朋友们也可以参考。 计划如下: 用5台机器搭建,IP分别为:192.168.58.5、192.168.58.6、192.168.58.8、192.168.58.9、192.168.58.10。分为两个分片,每个分片下有一个primary,一个 阅读全文
posted @ 2017-08-04 11:03 右介