会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
机器狗mo
博客园
首页
新随笔
联系
管理
上一页
1
···
9
10
11
12
13
14
15
16
17
···
19
下一页
2019年6月13日
排序算法
摘要: 冒泡排序(Bubble Sort) 插入排序(Insertion Sort) 希尔排序(Shell Sort) 选择排序(Selection Sort) 快速排序(Quick Sort) def QuickSort(arr,start,end): if start>=end: return i =
阅读全文
posted @ 2019-06-13 21:54 机器狗mo
阅读(155)
评论(0)
推荐(0)
2019年5月24日
LeetCode 206.反转链表
摘要: 反转一个单链表。 # # @lc app=leetcode.cn id=206 lang=python3 # # [206] 反转链表 # # @lc code=start # Definition for singly-linked list. # class ListNode: # def __
阅读全文
posted @ 2019-05-24 10:59 机器狗mo
阅读(96)
评论(0)
推荐(0)
2019年2月11日
Pandas Statistical Functions
摘要: .dataframe tbody tr th:only of type { vertical align: middle; } .dataframe tbody tr th { vertical align: top; } .dataframe thead th { text align: righ
阅读全文
posted @ 2019-02-11 16:58 机器狗mo
阅读(169)
评论(0)
推荐(0)
2018年11月23日
pyspark 记录
摘要: import os import sys spark_name = os.environ.get('SPARK_HOME',None) if not spark_name: raise ValueErrorError('spark环境没有配置好') sys.path.insert(0,os.path
阅读全文
posted @ 2018-11-23 22:08 机器狗mo
阅读(419)
评论(0)
推荐(0)
2018年11月8日
pandas 使用总结
摘要: import pandas as pd import numpy as np ## 从字典初始化df ipl_data = {'Team': ['Riders', 'Riders', 'Devils', 'Devils', 'Kings', 'Kings', 'Kings', 'Kings', 'R
阅读全文
posted @ 2018-11-08 15:07 机器狗mo
阅读(424)
评论(0)
推荐(0)
2018年10月9日
ConfigParser 读写配置文件
摘要: 很多时候需要从配置文件中读取参数,在程序中使用,这时候就需要用到ConfigParser模块(在Python3以上的版本中为configparser模块) 首先新建一个配置文件样例:myapp.conf 在Python代码中: 如果配置文件中有中文等字符,可以使用codecs读取文件 DEFAULT
阅读全文
posted @ 2018-10-09 17:12 机器狗mo
阅读(240)
评论(0)
推荐(0)
2018年9月21日
Cheat Sheet pyspark RDD(PySpark 速查表)
摘要: 
阅读全文
posted @ 2018-09-21 21:15 机器狗mo
阅读(449)
评论(0)
推荐(0)
2018年9月20日
python随机生成字符
摘要: Python2: Unicode是一种通用的编码方式,不论是英文字母、汉字、日语还是其他文字都能够对应一个唯一的Unicode编码(序号)。 python3:
阅读全文
posted @ 2018-09-20 21:34 机器狗mo
阅读(1490)
评论(0)
推荐(0)
2018年8月28日
python dict 中的中文处理
摘要: ``` dict1 = {'中':'国 '} print dict1 ##{'\xc3\xa4\xc2\xb8\xc2\xad': '\xc3\xa5\xc2\x9b\xc2\xbd'} import json json1 = json.dumps(dict1) print json1 ##{"\u00e4\u00b8\u00ad": "\u00e5\u009b\u00bd"} print ...
阅读全文
posted @ 2018-08-28 20:21 机器狗mo
阅读(414)
评论(0)
推荐(0)
2018年7月13日
grep 命令
摘要: 参考: "shell命令之一天一见:grep"
阅读全文
posted @ 2018-07-13 17:57 机器狗mo
阅读(102)
评论(0)
推荐(0)
上一页
1
···
9
10
11
12
13
14
15
16
17
···
19
下一页
公告