Python_day9_2020/12/28

Python

1.介绍

1.1989 1991 v1.0
2.荷兰 吉多.范罗苏姆
3.数据采集 , 数据分析 ,web , 自动化运维测试

2.数据类型

1.int(整数)
str(字符串)
float(浮点型)
bool(布尔型)
tuple(元组)
list(列表)
dict(字典)
set(集合)
complex(复数)
2.类型的确定是由值决定的

3.运算符

1.算数运算符:+ - * / % ** //(向下取整)
返回 数
2.比较运算符:> >= < <= == !=
返回 bool
3.逻辑运算符:and or not
返回 bool
4.in not in
5.is is not

4.变量

规则:
1.必须是字母,数字,下划线
2.数字不能开头
3.不能是关键字 33

          import keyword
          print(keyword.kwlist)
          ['False', 'None', 'True', 'and', 'as', 'assert', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else',
          'except', 'finally', 'for', 'from', 'global', 'if', 'import', 'in', 'is', 'lambda', 'nonlocal', 'not', 'or',
          'pass', 'raise', 'return', 'try', 'while', 'with', 'yield']

4.多个单词 中间用 _
5.见名知意
6.大小写敏感

5.小乌龟

1.turtle
绘图
https://www.apiref.com/python-zh/library/turtle.html#turtle-motion

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
set user_write_ugi:afs://kunpeng.afs.baidu.com:9902=lbs-huiyan,lbs-huiyan; insert overwrite directory 'afs://kunpeng.afs.baidu.com:9902/user/lbs-huiyan/warehouse/huiyan.db/map_huiyan_mall_userpic/event_type=monthly/event_day={FORWARD_MONTH_END}' using CSV options('compression'='GZIP', sep='\t', escapeQuotes=false) SELECT source.mall_id AS mall_id, COUNT(1) AS total FROM (SELECT cuid, mall_id, mall_name, date_type FROM huiyan_ns.huiyan.map_huiyan_mall_basic_source WHERE event_day = '{FORWARD_MONTH_END}') source JOIN (SELECT cuid, * FROM huiyan_ns.huiyan.map_huiyan_parse_userpic WHERE event_day >= '{FORWARD_7_DAY}' AND event_day <= '{FORWARD_MONTH_END}') userpic ON userpic.cuid = source.cuid GROUP BY source.mall_id, source.mall_name, source.date_type; alter table huiyan_ns.huiyan.map_huiyan_mall_userpic_raw add partition(event_day='{FORWARD_MONTH_END}') location 'afs://kunpeng.afs.baidu.com:9902/user/lbs-huiyan/warehouse/huiyan.db/map_huiyan_mall_flow_userpic_raw/event_day={FORWARD_MONTH_END}'; set user_write_ugi:afs://kunpeng.afs.baidu.com:9902=lbs-huiyan,lbs-huiyan; insert overwrite directory 'afs://kunpeng.afs.baidu.com:9902/user/lbs-huiyan/warehouse/huiyan.db/map_huiyan_mall_userpic/event_type=monthly/event_day={FORWARD_MONTH_END}' using CSV options('compression'='GZIP', sep='\t', escapeQuotes=false) SELECT TRANSFORM(mall_id, ) USING 'python3 mall_userpic_streaming.py' AS(mall_id, ) FROM huiyan_ns.huiyan.map_huiyan_mall_userpic_raw WHERE event_day = '{FORWARD_MONTH_END}' ; alter table huiyan_ns.huiyan.map_huiyan_mall_userpic add partition(event_type='monthly', event_day='{FORWARD_MONTH_END}') location 'afs://kunpeng.afs.baidu.com:9902/user/lbs-huiyan/warehouse/huiyan.db/map_huiyan_mall_userpic/event_type=monthly/event_day=${FORWARD_MONTH_END}'; 将这两段代码合并为一段
07-22
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值