2018年12月7日

windows安装配置git和Tortoisegit

摘要: git github gitlab Tortoisegit 的概念自行百度 1. 安装git 2. 安装小乌龟:Tortoisegit 和中文包 3. 配置 4. 使用 参考: Git与TortoiseGit基本操作 阅读全文

posted @ 2018-12-07 15:31 andy_1 阅读(263) 评论(0) 推荐(0) 编辑

2018年12月5日

重装windows系统后配置Anaconda

摘要: 给电脑换了系统,十分担心anaconda需要重装。还好以下方法完美解决。(同是win10 64位) 原始anaconda安装路径:D:\ProgramData\Anaconda3 (不能有空格哦) 一、添加环境变量 D:\ProgramData\Anaconda3 (有Python.exe,Pyth 阅读全文

posted @ 2018-12-05 19:26 andy_1 阅读(6391) 评论(0) 推荐(2) 编辑

2018年11月19日

mysql ON DUPLICATE KEY UPDATE重复插入时更新

摘要: mysql ON DUPLICATE KEY UPDATE重复插入时更新 阅读全文

posted @ 2018-11-19 15:12 andy_1 阅读(177) 评论(0) 推荐(0) 编辑

2018年11月12日

python的MD5

摘要: import hashlib def md5(str0): hl = hashlib.md5()# 创建md5对象 hl.update(str0.encode(encoding='utf-8'))#此处必须声明encode #print('MD5加密前为 :' + str);print('MD5加密后为 :' + hl.hexdigest()) return hl... 阅读全文

posted @ 2018-11-12 16:29 andy_1 阅读(145) 评论(0) 推荐(0) 编辑

2018年11月8日

用 Python 排序数据的多种方法

摘要: 用 Python 排序数据的多种方法 阅读全文

posted @ 2018-11-08 10:15 andy_1 阅读(183) 评论(0) 推荐(0) 编辑

2018年11月7日

使用Python进行描述性统计

摘要: https://www.cnblogs.com/jasonfreak/p/5441512.html 阅读全文

posted @ 2018-11-07 13:56 andy_1 阅读(194) 评论(0) 推荐(0) 编辑

2018年11月5日

python操作文件

摘要: https://www.cnblogs.com/feeland/p/4463682.html 阅读全文

posted @ 2018-11-05 16:44 andy_1 阅读(134) 评论(0) 推荐(0) 编辑

apache显示目录文件列表

摘要: 在apache服务器下访问一个目录,如果没有index.html/index.php,则会报错。 为了访问文件夹: 1. 在 /var/www/html 目录下新建 /d/ mkdir d 2. touch .htaccess vi .htaccess #写入: <Files *> Options 阅读全文

posted @ 2018-11-05 11:58 andy_1 阅读(6436) 评论(0) 推荐(0) 编辑

2018年11月3日

python实现FTP服务器

摘要: python实现FTP服务器 阅读全文

posted @ 2018-11-03 17:01 andy_1 阅读(190) 评论(0) 推荐(0) 编辑

2018年11月2日

python openpyxl 操作 excel

摘要: python openpyxl 操作 excel 制作一个excel模板, 并将新数据 都填到这个模板中,实现excel自定义格式化输出python的数据。 (项目中这段代码作废了,好可惜。) 阅读全文

posted @ 2018-11-02 19:30 andy_1 阅读(340) 评论(0) 推荐(0) 编辑

2018年11月1日

Python的CGI编程实现-通过接口运行服务器py脚本

摘要: yum 安装apcche 【apache】yum 安装Apache(Centos 6.9) https://www.cnblogs.com/lauren1003/p/5993654.html只需一行命令:yum instal httpd -y #安装service httpd start #启动ap 阅读全文

posted @ 2018-11-01 15:51 andy_1 阅读(581) 评论(0) 推荐(0) 编辑

2018年10月31日

Python 直接赋值、浅拷贝和深度拷贝解析

摘要: http://www.runoob.com/w3cnote/python-understanding-dict-copy-shallow-or-deep.html 阅读全文

posted @ 2018-10-31 01:48 andy_1 阅读(127) 评论(0) 推荐(0) 编辑

2018年10月29日

Pandas DataFrame数据的增、删、改、查

摘要: Pandas DataFrame数据的增、删、改、查 https://blog.csdn.net/zhangchuang601/article/details/79583551 #删除列 df_2 = df_1.drop(columns=['deptNo','routeNo']).copy() de 阅读全文

posted @ 2018-10-29 20:18 andy_1 阅读(460) 评论(0) 推荐(0) 编辑

2018年10月23日

python正则表达式

摘要: Python 正则表达式 http://www.runoob.com/python/python-reg-expressions.html Python中正则表达式的详细教程 https://www.jb51.net/article/65286.htm https://www.cnblogs.com 阅读全文

posted @ 2018-10-23 14:49 andy_1 阅读(131) 评论(0) 推荐(0) 编辑

2018年10月19日

Python 字典(Dictionary)操作详解

摘要: https://www.jb51.net/article/47990.htm 六、字典内置函数&方法 Python字典包含了以下内置函数: cmp(dict1, dict2) #比较两个字典元素。len(dict) #计算字典元素个数,即键的总数。str(dict) #输出字典可打印的字符串表示。t 阅读全文

posted @ 2018-10-19 15:37 andy_1 阅读(538) 评论(0) 推荐(0) 编辑

MySQL root密码忘记后更优雅的解决方法

摘要: MySQL root密码忘记后更优雅的解决方法 https://www.jb51.net/article/143453.htm /usr/bin/mysqld_safe --defaults-file=my.cnf --skip-grant-tables --skip-networking &/us 阅读全文

posted @ 2018-10-19 14:46 andy_1 阅读(151) 评论(0) 推荐(0) 编辑

2018年10月18日

linux下升级python

摘要: 服务linux器自带的是python2.6.无法安装 pip install paramiko。总是报错。 系统自带的Python2.6又不能动。无奈只好再安装一个版本。 自己尝试手动升级python2.7 最后还是放弃了,因为安装成功了,pip等组件也没法使用,尴尬。 最终, 还是改为用anaco 阅读全文

posted @ 2018-10-18 11:05 andy_1 阅读(5690) 评论(0) 推荐(0) 编辑

2018年10月17日

mysql实现复杂groupby : GROUP_CONCAT

摘要: select che,GROUP_CONCAT(concat_ws(':',routeNo,num) ORDER BY num DESC SEPARATOR ',') as gg from (select che,routeNo,count(distinct paicheNo) as num from tableA where carrierType=1... 阅读全文

posted @ 2018-10-17 17:47 andy_1 阅读(1478) 评论(0) 推荐(0) 编辑

2018年10月16日

Python常用time处理

摘要: #coding=utf-8 # python2.7工具语句 from sys import version_info import time import datetime if version_info<(3,0): print('注意当前是:python2') else: print('python3') #把datetime转成字符串 def unixtime_toS... 阅读全文

posted @ 2018-10-16 15:24 andy_1 阅读(340) 评论(0) 推荐(0) 编辑

2018年10月15日

spark安装

摘要: 参见:https://archive.apache.org/dist/spark/spark-2.3.2/spark-2.3.2-bin-hadoop2.7.tgz cd /root/lhc wget https://archive.apache.org/dist/spark/spark-2.3.2 阅读全文

posted @ 2018-10-15 16:34 andy_1 阅读(120) 评论(0) 推荐(0) 编辑

2018年10月11日

python2脚本批量转成python3

摘要: #查看 模块的安装路径 import tools print (tools.__file__)#进入cmd,然后python 2to3.py -w 需要批量转换的文件所在的路径#参考:http://www.cnblogs.com/wushuaishuai/p/7611915.html 阅读全文

posted @ 2018-10-11 11:21 andy_1 阅读(465) 评论(0) 推荐(0) 编辑

2018年10月8日

linux zip压缩文件

摘要: http://man.linuxde.net/zip 阅读全文

posted @ 2018-10-08 17:52 andy_1 阅读(134) 评论(0) 推荐(0) 编辑

2018年9月29日

dataframe 差集

摘要: >>>data_a={'state':[1,1,2],'pop':['a','b','c']}>>>data_b={'state':[1,2,3],'pop':['b','c','d']}>>>a=pd.DataFrame(data_a)>>>a pop state0 a 11 b 12 c 2>> 阅读全文

posted @ 2018-09-29 11:05 andy_1 阅读(404) 评论(0) 推荐(0) 编辑

使程序在Linux下后台运行

摘要: 1. 在终端输入命令,使程序后台执行: nohup ./pso > pso.log 2>&1 & 解释:nohup就是不挂起的意思,将pso直接放在后台运行,并把终端输出存放在当前 目录下的pso.log文件中。当客户端关机后重新登陆服务器后,直接查看pso.log文件就可看执行结果(命令:#cat 阅读全文

posted @ 2018-09-29 04:09 andy_1 阅读(33270) 评论(1) 推荐(1) 编辑

2018年9月28日

pandas 合并数据

摘要: 1. pandas 的merge,join 就不说了。 2. 神奇的: concat append 参考: PANDAS 数据合并与重塑(concat篇) 3. 阅读全文

posted @ 2018-09-28 19:44 andy_1 阅读(172) 评论(0) 推荐(0) 编辑

mysql 当前时间

摘要: 1. mysql 获取当前时间 select now() ,current_timestamp(),localtimestamp(),sysdate() ,curdate(),curtime(),utc_date() ; 2. # 获取当前时间24小时的事件 select date_sub(now( 阅读全文

posted @ 2018-09-28 17:29 andy_1 阅读(243) 评论(0) 推荐(0) 编辑

2018年9月26日

钉钉机器人-实现监控通知功能-python

摘要: 1. 首先得创建有 一个 钉钉群。(因为只能发群通知) 2. 添加机器人,得到一个url: 3. 开始写Python脚本: 阅读全文

posted @ 2018-09-26 14:06 andy_1 阅读(3049) 评论(0) 推荐(0) 编辑

hive常用语句

摘要: 1. 删除分区 ALTER TABLE dms.tracklog_5min DROP PARTITION(DAY='${today}');ALTER TABLE table_name DROP IF EXISTS PARTITION(dt='2018-01-01', game_code='gcol' 阅读全文

posted @ 2018-09-26 09:51 andy_1 阅读(1011) 评论(0) 推荐(0) 编辑

pandas删除dataframe列

摘要: data2 = data.drop(data.columns[0,1,3,4,6,8,10], 1) 阅读全文

posted @ 2018-09-26 09:40 andy_1 阅读(215) 评论(0) 推荐(0) 编辑

2018年9月21日

Python多线程-2(线程共享全局变量)

摘要: 例子: python进阶之多线程对同一个全局变量的处理 阅读全文

posted @ 2018-09-21 15:52 andy_1 阅读(9029) 评论(0) 推荐(1) 编辑

Python多线程

摘要: 一、进程和线程的区别: 简而言之: 一个程序至少有一个进程,一个进程至少有一个线程. 守护线程:当所有的非守护线程结束时,程序也就终止了,同时会杀死进程中的所有守护线程。 进程是资源分布的单元 线程是进程中真正执行代码的 进程运行起来,会有一个主线程进行运行 父子线程:相互独立运行,当所有的子线程执 阅读全文

posted @ 2018-09-21 15:13 andy_1 阅读(381) 评论(0) 推荐(0) 编辑

Spyder 快捷键大全

摘要: Spyder 快捷键大全 阅读全文

posted @ 2018-09-21 14:50 andy_1 阅读(153) 评论(0) 推荐(0) 编辑

2018年9月19日

坐标转换

摘要: 坐标转换 原文链接:https://github.com/wandergis/coordtransform 地图坐标转换 -- 火星坐标与GPS坐标 https://www.cnblogs.com/sylvanas2012/p/5342530.html 阅读全文

posted @ 2018-09-19 11:59 andy_1 阅读(244) 评论(0) 推荐(0) 编辑

为Python添加默认模块搜索路径

摘要: 原文出处:https://www.douban.com/note/334738164/ 方法一:增加.pth文件,推荐! 在site-packages添加一个路径文件,如mypkpath.pth, 必须以.pth为后缀,写上你要加入的模块文件所在的目录名称就是了。 site-packages文件夹路 阅读全文

posted @ 2018-09-19 11:40 andy_1 阅读(3197) 评论(0) 推荐(0) 编辑

2018年9月18日

python try详细说明(python的异常捕捉模块)

摘要: # 划重点: 1. 详解。参考链接 阅读全文

posted @ 2018-09-18 22:43 andy_1 阅读(5225) 评论(0) 推荐(0) 编辑

2018年9月14日

mongdb学习笔记

摘要: mongodb学习资源:https://www.runoob.com/mongodb pymongo基本语法 1. 查看所有数据库 2. 切换数据库 运行"use"命令,可以连接到一个指定的数据库。db查看当前数据库 > use local switched to db local > db loc 阅读全文

posted @ 2018-09-14 16:33 andy_1 阅读(161) 评论(0) 推荐(0) 编辑

python在不同层级目录import模块的方法

摘要: python在不同层级目录import模块的方法 阅读全文

posted @ 2018-09-14 11:42 andy_1 阅读(206) 评论(0) 推荐(0) 编辑

python 入门

摘要: 学习任何教程时建议跳过Python的安装、环境配置、ide安装过程(这些过程太打击自信且不重要)。 直接下载安装如下软件,安装好后打开spyder代替黑命令框或者pycharm(超级吃内存)。 anaconda下载地址:(32位)https://mirrors.tuna.tsinghua.edu.c 阅读全文

posted @ 2018-09-14 00:07 andy_1 阅读(219) 评论(4) 推荐(1) 编辑

2018年9月12日

windows中连接hive-客户端

摘要: 参考连接:http://lxw1234.com/archives/2016/09/723.htm 这里主要介绍:Oracle SQL Developer 1. 下载,免安装包 SQL Developer 4.1.5。及hive对应jar包 (- 我的百度云链接:https://pan.baidu.c 阅读全文

posted @ 2018-09-12 17:10 andy_1 阅读(4991) 评论(1) 推荐(0) 编辑

shell中后台进程管理: ps -aux 详解

摘要: 常用 查找进程id方法: ps -aux | grep "jupyter" 杀进程: kill -9 具体的PID 1、ps命令 要对进程进行监测和控制,首先必须要了解当前进程的情况,也就是需要查看当前进程,而ps命令就是最基本同时也是非常强大的进程查看命令.使用该命令可以确定有哪些进程正在运行和运 阅读全文

posted @ 2018-09-12 15:30 andy_1 阅读(2403) 评论(0) 推荐(0) 编辑

导航