ICode9

精准搜索请尝试: 精确搜索
首页 > 编程语言> 文章详细

Python Kite 使用教程 轻量级代码提示

2019-12-07 12:03:17  阅读:1192  来源: 互联网

标签:None Kite randint Python random high low 轻量级 size


 1: 概述

今天升级annacoda 插件 spyder  (4.0.0 )的时候 提示安装kite ,这是什么玩意? 下载下来试一试? 原来:就是一个代码提示插件..

说白了" 就是让开发者 在轻量级编辑器环境下 有一个高端的代码提示环境  "

https://kite.com 官网 

Kite 使用教程

Kite 安装教程

 

 

 2 安装

 下载链接 :https://kite.com/download/ 

提供 Install for macOS or Linux win 三大版本支持 

编辑器: Available for Atom, PyCharm, Sublime, VS Code, and Vim

注意: 默认是安装在C盘 ,不会给你选择安装盘符的选项

安装完成后: 输入你的邮箱 进行绑定注册

 

 

 进入插件选项,选择 你使用的编辑器插件,,这里我安装了 pyecharm

 

 

 3: annacoda 环境配置

   Preferences > Completions and linting > Completion 下面打上√

 

 

 

Preferences > Completions and linting > Advanced > Enable Kite (if the Kite engine is running) 打上√

 

 

 

上面完全设置好了以后 :  spyder 下标栏 出现kite

 

 

下面写一段代码试一试:

import numpy as np

print(np.random.randint(1,100));

 

 

 

 

 4: 其他使用姿势

查询某个模块的使用方法:

 

 

 

 

假设 查询 numpy 使用方法: 方法很详细 

 

SIGNATURE
low,
high=None,
size=None,
dtype='l'
RETURNSint | ndarray
HOW OTHERS USED THIS
randint(​low, high​)
randint(​low​)
randint(​low, high, size​)
randint(​low, size​)
randint(​low, high, size​)
DOCUMENTATION
randint(low, high=None, size=None, dtype='l')

Return random integers from `low` (inclusive) to `high` (exclusive).

Return random integers from the "discrete uniform" distribution of
the specified dtype in the "half-open" interval [`low`, `high`). If
`high` is None (the default), then results are from [0, `low`).

Parameters
----------
low : int
    Lowest (signed) integer to be drawn from the distribution (unless
    ``high=None``, in which case this parameter is one above the
    *highest* such integer).
high : int, optional
    If provided, one above the largest (signed) integer to be drawn
    from the distribution (see above for behavior if ``high=None``).
size : int or tuple of ints, optional
    Output shape.  If the given shape is, e.g., ``(m, n, k)``, then
    ``m * n * k`` samples are drawn.  Default is None, in which case a
    single value is returned.
dtype : dtype, optional
    Desired dtype of the result. All dtypes are determined by their
    name, i.e., 'int64', 'int', etc, so byteorder is not available
    and a specific precision may have different C types depending
    on the platform. The default value is 'np.int'.

    .. versionadded:: 1.11.0

Returns
-------
out : int or ndarray of ints
    `size`-shaped array of random integers from the appropriate
    distribution, or a single such random int if `size` not provided.

See Also
--------
random.random_integers : similar to `randint`, only for the closed
    interval [`low`, `high`], and 1 is the lowest value if `high` is
    omitted. In particular, this other one is the one to use to generate
    uniformly distributed discrete non-integers.

Examples
--------
>>> np.random.randint(2, size=10)
array([1, 0, 0, 0, 1, 1, 0, 0, 1, 0])
>>> np.random.randint(1, size=10)
array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0])

Generate a 2 x 4 array of ints between 0 and 4, inclusive:

>>> np.random.randint(5, size=(2, 4))
array([[4, 0, 2, 1],
       [3, 2, 2, 0]])
Jump toDESCRIPTION

 

 缺点: 我发现国内的某些库 不支持 , 支合适那些 开源库 很大的

 

 

主题设置:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

标签:None,Kite,randint,Python,random,high,low,轻量级,size
来源: https://www.cnblogs.com/dgwblog/p/12001232.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有