zoukankan      html  css  js  c++  java
  • C++_基本语法_Python 常用包汇总

    变量

    1.类型:
      01.常见数据类型
        内置类型
    	    基本类型
    		   bool、true、false
    		   char、wchar_t
    		   int、double、float、short、long、signed、unsigned
    		复合类型
    		    enum  struct、class、union
        自定义类型
    	
    	第三方类型
    	
      02.类型修饰
         类型修饰符
    	  const  mutable volatile
      
         typename 和编译器 关键字告诉编译器把一个特殊的名字解释为一个类型
         typedef  声明,为现有数据类型创建一个新的名字
         typeid   返回结果为标准库种类型的引用
    	 sizeof   返回类型名或表达式具有的类型对应的大小
    
      03.类型转换 和类型推断
          explicit 该关键字的作用就是避免自定义类型隐式转换为类类型
          static_cast  const_cast  dynamic_cast reinterpret_cast 
    	  auto    关键字会根据初始值自动推断变量的数据类型。不是每个编译器都支持auto
    变量的权限和作用域以及生命周期
        using  namespace
    

    运算符:方向 优先级 运算功能

    算数运算  加减乘除 取模 指数对数运算  幂运算 三角函数运算
    关系运算  大于 小于 等于 不大于 不小于
    逻辑运算:称布尔运算: 与 或 非 异或 短路或 短路与
    位运算  左移  右移
    

    控制语句

        顺序语句
        条件语句  if/else  switch
        循环语句  ?for循环、while循环、do-while循环或for-each语句?
             switch、case、default  do、for、while  if和else
            break、cotinue、goto 
        异常处理机制
             catch、throw、try
    
     C++11新增的关键字
         char16_t、char32_t、constexpr nullptr
         lignas、alignof、、decltype、noexpect、、static_assert、thread_local	
    

    Python基本内容

    语法 句法
    调试 开发 
    测试test 日志logging  性能指标metric
    

    Python标准库

       1. os --- 多种操作系统接口
        sys --- 系统相关的参数和函数
        os.path --- 常用路径操作
        shutil --- 高阶文件操作
        tkinter --- Tcl/Tk的Python接口
        zipfile --- 使用ZIP存档
    	pickle --- Python 对象序列化
    	json --- JSON 编码和解码器
    	re --- 正则表达式操作
    	argparse --- 命令行选项、参数和子命令解析器
    	configparser --- 配置文件解析器
    	math --- 数学函数
    	random --- 生成伪随机数
    	collections --- 容器数据类型
    	types --- 动态类型创建和内置类型名称
    	ctypes --- Python 的外部函数库
        copy --- 浅层 (shallow) 和深层 (deep) 复制操作
    	time --- 时间的访问和转换
    	datetime --- 基本日期和时间类型
    	calendar --- 日历相关函数
    	zoneinfo --- IANA 时区支持
    	logging --- Python 的日志记录工具
    	unittest --- 单元测试框架
    	test --- Python回归测试包
    	2.threading --- 基于线程的并行
    	multiprocessing --- 基于进程的并行
    	queue --- 一个同步的队列类
    	concurrent 包
    	subprocess --- 子进程管理
    	asyncio --- 异步 I/O
    	3.pdb --- Python 的调试器
    	distutils --- 构建和安装 Python 模块
        traceback --- 打印或检索堆栈回溯  调试	
        base64 --- Base16, Base32, Base64, Base85 数据编码	
        urllib --- URL 处理模块		
    

    Python常用的第三方包

     IPython  pyenv 是针对 python 版本的管理 virtualenv来管理python的包环境 
     requests  lxml  BeautifulSoup  scrapy
     Django flask
     pymysql  openpyxl  xlrd
     NumPy  pandas  SciPy Scikit-learn@sklearn
     matplotlib Plotly wordcloud 
     pytorch@torch
     Pillow opencv-python@cv2   scikit-image@skimage  jieba  nltk      
     PyInstaller Py2exe 
    

    1.Scikit-learn的基本功能主要被分为六大部分:

      数据预处理: 数据集加载 数据集转换
      数据降维
      聚类
      分类
      回归
      模型选择和评估
    

    2.python调用外部函数库

     Python调用C库比较简单,不经过任何封装打包成so,再使用python的 ctypes 调用即可
     Python调用C++(类)动态链接库
     Python调用C/C++可执行程序
    

    参考:

     Python 标准库  https://docs.python.org/zh-cn/3/library/index.html
     Python Cookbook 3rd Edition Documentation  https://python3-cookbook.readthedocs.io/zh_CN/latest/
     Python生成requirements.txt方法 https://www.cnblogs.com/flyfish919/p/7711394.html
     apachecn/sklearn-doc-zh  https://github.com/apachecn/sklearn-doc-zh
     Python 语言参考手册    https://docs.python.org/zh-cn/3/reference/index.html
  • 相关阅读:
    SPOJ SAMER08A
    SPOJ TRAFFICN
    CS Academy Set Subtraction
    CS Academy Bad Triplet
    CF Round 432 C. Five Dimensional Points
    CF Round 432 B. Arpa and an exam about geometry
    SPOJ INVCNT
    CS Academy Palindromic Tree
    身体训练
    简单瞎搞题
  • 原文地址:https://www.cnblogs.com/ytwang/p/15339176.html
Copyright © 2011-2022 走看看