ARTS-week60
Algorithms
Perfect Number
思路: 按照定义一个整数等于除其本身外的所有因子之和。那么除了1外,其他的范围在[2, sqrt(n)]内,遍历其中的数字进行判断。
1 | class Solution { |
1 | class Solution { |
Review
本周阅读英文文章:
1、Ping monitoring between Kubernetes nodes
Technique
1、看书和专栏学习了MySQL事务,笔记:
初识MySQL事务
2、之前某个Scrapy爬虫去下载文件的时候遇到了302重定向,翻了翻文档,MEDIA_ALLOW_REDIRECTS
设置可以处理重定向,将其写在setting.py
中即可:
1 | MEDIA_ALLOW_REDIRECTS = True |
官方文档: https://docs.scrapy.org/en/latest/topics/media-pipeline.html#allowing-redirections