- 算法效率衡量
- 顺序表/链表,队列/栈,树,图
- 排序,堆,二分搜索,并查集,最小生成树,最短路径
Read More >>
- Install: selenium,browser drive
- browser
- 查找元素:find_elements/find_elements_by_xxx,find_element/find_element_by_xxx
- 交互操作:action(eg: click,key_down,...),action_chains (ActionChains,drag_and_drop)
- 执行javascript: execute_script(...)
- 切换:switch_to.xxx,back/forward()
- 异常处理:selenium.common.exceptions(eg: TimeoutException, NoSuchElementException)
- Cookie: add/get/delete_cookie(...),get_cookies(),delete_all_cookies()
- 等待元素: 强制等待 time.sleep(seconds), 隐式等待 browser.implicitly_wait(seconds),显示等待 WebDriverWait,expected_conditions
Read More >>
- Scrapy架构,常用命令,文档解析
- Spider: Spider,CrawlSpider,XMLFeedSpider,CSVFeedSpider,SitemapSpider
- Item,ItemLoader
- Middleware: ItemPipeline,Spider/DownloaderMiddleware,Item Exporters
- 应用示例:基于Excel爬取,Login,常见问题
- Scrapy-Redis 分布式架构(共享抓取队列)
- Scrapyd(分布式发布)
Read More >>
- requests
- aiohttp
- demo: download files
Read More >>
- 爬虫基础
- Re
- BeautifulSoup(include CSS Selector)
- XPath
- JSONPath
Read More >>
- Env & Tools: python(+pip),ipython,Anaconda(+conda),PyCharm
- 基础:keywords,comment,input,print,operation,if-else,for,while,try...except,sys.argv,unittest
- 基础数据类型: 不可变对象(int,float,str,tuple,) & 可变对象(list,set,dict),垃圾回收机制,类型转换,位运算
- 函数: 局部/全局变量,默认/不定长参数,闭包,列表生成式,生成器,迭代器,装饰器,匿名函数,常用内建函数
- 类: 类属性/方法/静态方法,实例属性/方法,继承与多态,元类,枚举类,单例模式,内置类属性,定制类
- 库:模块与包,导入,自定义库,发布/安装,常用标准库,常用扩展库
- 文件IO:读写文件,操作文件/目录
- 多任务:进程,线程,协程
- 访问数据库:SQLite,MySQL,Redis,MongoDB
Read More >>
- SpringBoot Redis + Demo
- 应用:Session持久化:NoSession方案,SpringSession方案
- 方案:NoSession示例
- 方案:SpringSession示例
Read More >>
- AMQP: Advanced Message Queuing Protocol
- RabbitMQ: Producer -> VirtualHost(Exchange -> Binding:routingKey,headers,all,... -> Queue) -> Consumer
- 使用Docker安装RabbitMQ
- Demo: Direct/Topic/Headers/Fanout Exchange
- Demo: Exchange object
- Demo: Reliability send
Read More >>
- RPC 远程过程调用
- 四个核心组建(Client,Server,Client Stub,Server Stub)
- 框架选择的关注点(I/O,线程,序列化,多语言,服务治理)
- 流行框架(Dubbo,Motan,Thrift,Grpc)
- Dubbo: Provider,Consumer,Registry,Monitor,Container
- HelloWorld
- Demo(with SpringBoot)
Read More >>
- dependency: curator-recipes
- Start/Close: CuratorFrameworkFactory.builder()...build(), start(),close()
- CRUD: create(),getData(),setData(),delete(),checkExists(),getChildren()
- Watch: usingWatcher(watcher),NodeCache,PathChildrenCache,TreeCache
- ACL: schema:id:permission, new ACL(perms,id),.aclProvider(aclProvider),.authorization(authInfoList),.withACL(aclList),get/setACL()
- 一个应用示例:Client端监控文件增删,实现文件从Server端到Client端的同步
Read More >>