随笔分类 -  python

Django框架
摘要:#手动写web框架,包括wsgi,数据库连接,登陆验证https://www.cnblogs.com/yuanchenqi/articles/8946917.html #三期讲解:https://www.cnblogs.com/yuanchenqi/articles/6083427.html框架:一 阅读全文

posted @ 2020-04-26 16:26 锋锋2019 阅读(141) 评论(0) 推荐(0)

python数据类型
摘要:1 元组: 可参考django框架 简单记忆:圆括号就是元组, 特点: 就是不能增,删,修改,但是item是可以重复. In [9]: t3 = (1,1,3,3,4) In [10]: t3.count(1) Out[10]: 2 函数也可以加到元组,list里 如:会用函数的返回值替换 def 阅读全文

posted @ 2020-04-17 15:11 锋锋2019 阅读(118) 评论(0) 推荐(0)

python连接hive
摘要:参考: https://blog.csdn.net/a6822342/article/details/80713652 #简单 https://www.zhihu.com/question/269333988 #复杂点的 方法一: ali-bigdata-gateway-guard-1 deacti 阅读全文

posted @ 2020-02-14 15:04 锋锋2019 阅读(3604) 评论(1) 推荐(0)

python发邮件
该文被密码保护。

posted @ 2020-01-02 21:17 锋锋2019 阅读(10) 评论(0) 推荐(0)

实例一 airflow_failover
摘要:源码: https://github.com/teamclairvoyant/airflow-scheduler-failover-controller #怎么判断scheduler是running的, is_scheduler_running https://github.com/teamclai 阅读全文

posted @ 2019-11-13 16:10 锋锋2019 阅读(323) 评论(0) 推荐(0)

装饰器
摘要:装饰器:又叫包装函数 作用: 1. 添加说明,提醒等. 2. 添加登,验证陆装饰器 原理是在执行student时会把student作为deco的参数传到deco中执行,student函数在deco的子函数wrapper中做为参数被执行.(即在装饰器的装饰下执行函数) def deco(func): 阅读全文

posted @ 2019-11-13 15:56 锋锋2019 阅读(82) 评论(0) 推荐(0)

面向对象
摘要:面向过程:根据业务逻辑从上到下垒代码,所有的事都需要自己去处理. 引入函数,避免可重复使用代码.面向函数: 将某功能代码封装到函数中,以后直接调用,不需要再次编写 面向对象:先要写一个类, 对函数进行分类和封装,类里可以有很多函数,让开发“更快更好更强...” 像Java和C++等编程语言仅支持面向 阅读全文

posted @ 2019-11-13 15:24 锋锋2019 阅读(111) 评论(0) 推荐(0)

for循环
摘要:for var in .... statement statement else: statement 例子:注意range(5)是5次循环,range(0,5)是5次循环,range(1,5)是4次循环, for i in range(5): print (i) else: print ("the 阅读全文

posted @ 2019-11-13 15:17 锋锋2019 阅读(121) 评论(0) 推荐(0)

if---else
摘要:if x= =A: do something for A elif x = = B: do something for B else: do something for else python没有分支结构case, 用多个elif来实现分支。 例子: AGE = 56 guess_age = int 阅读全文

posted @ 2019-11-13 15:13 锋锋2019 阅读(1003) 评论(0) 推荐(0)

airflow状态监控
该文被密码保护。

posted @ 2019-11-02 17:07 锋锋2019 阅读(1) 评论(0) 推荐(0)

python常用
摘要:1/ #取当前时间. import timet=time.ctime 2/ 变量一般用数字,字母和下划线,不用中划线. i='*'for m in range(10): for n in range(m+1): print i, print '' 阅读全文

posted @ 2019-08-11 16:57 锋锋2019 阅读(114) 评论(0) 推荐(0)

导航