上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 19 下一页
摘要: 冒泡排序(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)
摘要: 反转一个单链表。 # # @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)
摘要: .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)
摘要: 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)
摘要: 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)
摘要: 很多时候需要从配置文件中读取参数,在程序中使用,这时候就需要用到ConfigParser模块(在Python3以上的版本中为configparser模块) 首先新建一个配置文件样例:myapp.conf 在Python代码中: 如果配置文件中有中文等字符,可以使用codecs读取文件 DEFAULT 阅读全文
posted @ 2018-10-09 17:12 机器狗mo 阅读(240) 评论(0) 推荐(0)
摘要: ![](https://img2018.cnblogs.com/blog/724315/201809/724315-20180921223109361-1426293188.jpg) 阅读全文
posted @ 2018-09-21 21:15 机器狗mo 阅读(449) 评论(0) 推荐(0)
摘要: Python2: Unicode是一种通用的编码方式,不论是英文字母、汉字、日语还是其他文字都能够对应一个唯一的Unicode编码(序号)。 python3: 阅读全文
posted @ 2018-09-20 21:34 机器狗mo 阅读(1490) 评论(0) 推荐(0)
摘要: ``` 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)
摘要: 参考: "shell命令之一天一见:grep" 阅读全文
posted @ 2018-07-13 17:57 机器狗mo 阅读(102) 评论(0) 推荐(0)
上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 19 下一页