mirror of
https://github.com/RealKai42/qwerty-learner.git
synced 2026-04-05 06:19:08 +08:00
dict: 增加Python内置函数词典 (#194)
This commit is contained in:
68
public/dicts/python-array.json
Normal file
68
public/dicts/python-array.json
Normal file
@@ -0,0 +1,68 @@
|
||||
[
|
||||
{
|
||||
"name": "append()",
|
||||
"trans": [
|
||||
"用于在列表末尾添加新的对象。"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "buffer_info()",
|
||||
"trans": [
|
||||
"返回一个元组(address,length)以给出用于存放数组内容的缓冲区元素的当前内存地址和长度"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "byteswap()",
|
||||
"trans": [
|
||||
"更改基础数据的字节顺序"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "count()",
|
||||
"trans": [
|
||||
"用于统计某个元素在列表中出现的次数。"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "extend()",
|
||||
"trans": [
|
||||
"用于在列表末尾一次性追加另一个序列中的多个值(用新列表扩展原来的列表)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "fromfile()",
|
||||
"trans": [
|
||||
"用于从列表中找出某个值第一个匹配项的索引位置"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "index()",
|
||||
"trans": [
|
||||
"用于从列表中找出某个值第一个匹配项的索引位置"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "insert()",
|
||||
"trans": [
|
||||
"用于将指定对象插入列表的指定位置"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "pop()",
|
||||
"trans": [
|
||||
"用于移除列表中的一个元素(默认最后一个元素),并且返回该元素的值"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "remove()",
|
||||
"trans": [
|
||||
"用于移除列表中某个值的第一个匹配项"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "reverse()",
|
||||
"trans": [
|
||||
"用于反向列表中元素。"
|
||||
]
|
||||
}
|
||||
]
|
||||
80
public/dicts/python-class.json
Normal file
80
public/dicts/python-class.json
Normal file
@@ -0,0 +1,80 @@
|
||||
[
|
||||
{
|
||||
"name": "__call__(self, args, kwargs)",
|
||||
"trans": [
|
||||
"该方法的功能类似于在类中重载 () 运算符,使得类实例对象可以像调用普通函数那样,以“对象名()”的形式使用"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "__cmp__(self, other)",
|
||||
"trans": [
|
||||
"对象比较"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "__del__(self)",
|
||||
"trans": [
|
||||
"析构方法, 删除一个对象"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "__delattr__(self, name)",
|
||||
"trans": [
|
||||
"用于删除对象的属性"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "__getattr__(self, name)",
|
||||
"trans": [
|
||||
"内置方法,当使用点号获取实例属性时,如果属性不存在就自动调用__getattr__方法"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "__getattribute__(self, name)",
|
||||
"trans": [
|
||||
"属性访问拦截器"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "__index__(self)",
|
||||
"trans": [
|
||||
"对象被作为索引使用的时候"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "__init__(self, args)",
|
||||
"trans": [
|
||||
"构造函数"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "__new__(cls)",
|
||||
"trans": [
|
||||
"负责创建类实例的静态方法"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "__nonzero__(self)",
|
||||
"trans": [
|
||||
"通常在用类进行判断和将类转换成布尔值时调用"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "__repr__(self)",
|
||||
"trans": [
|
||||
"转化为供解释器读取的形式"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "__setattr__(self, name, attr)",
|
||||
"trans": [
|
||||
"用于设置属性值,该属性不一定是存在的"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "__str__(self)",
|
||||
"trans": [
|
||||
"用于将值转化为适于人阅读的形式"
|
||||
]
|
||||
}
|
||||
]
|
||||
236
public/dicts/python-date.json
Normal file
236
public/dicts/python-date.json
Normal file
@@ -0,0 +1,236 @@
|
||||
[
|
||||
{
|
||||
"name": "altzone",
|
||||
"trans": [
|
||||
"返回格林威治西部的夏令时地区的偏移秒数。如果该地区在格林威治东部会返回负值(如西欧,包括英国)。对夏令时启用地区才能使用。"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "asctime()",
|
||||
"trans": [
|
||||
"接受时间元组并返回一个可读的形式为'Tue Dec 11 18:07:14 2008'(2008年12月11日 周二18时07分14秒)的 24 个字符的字符串"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "clock()",
|
||||
"trans": [
|
||||
"用以浮点数计算的秒数返回当前的 CPU 时间。用来衡量不同程序的耗时,比 time.time() 更有用。"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "ctime()",
|
||||
"trans": [
|
||||
"Python time ctime() 函数把一个时间戳(按秒计算的浮点数)转化为time.asctime()的形式。 如果参数未给或者为None的时候,将会默认time.time()为参数。它的作用相当于 asctime(localtime(secs))。"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "gmtime()",
|
||||
"trans": [
|
||||
"接收时间辍(1970 纪元后经过的浮点秒数)并返回格林威治天文时间下的时间元组 t。注:t.tm_isdst 始终为 0"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "localtime()",
|
||||
"trans": [
|
||||
"接收时间辍(1970 纪元后经过的浮点秒数)并返回当地时间下的时间元组 t(t.tm_isdst 可取 0 或 1,取决于当地当时是不是夏令时)。"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "mktime()",
|
||||
"trans": [
|
||||
"接受时间元组并返回时间辍(1970 纪元后经过的浮点秒数)。"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "sleep()",
|
||||
"trans": [
|
||||
"推迟调用线程的运行"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "isocalendar()",
|
||||
"trans": [
|
||||
"isocalendar()返回指定日期的年,第几周,周几这三个值。"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "isoformat()",
|
||||
"trans": [
|
||||
"返回一个字符串,代表ISO 8601格式的日期,YYY-MM-DD。"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "isoweekday()",
|
||||
"trans": [
|
||||
"返回一周的整数"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "strftime()",
|
||||
"trans": [
|
||||
"strftime() 函数接收以时间元组,并返回以可读字符串表示的当地时间,格式由参数format决定"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "timetuple()",
|
||||
"trans": [
|
||||
"timetuple()等同于time.struct_time((d.year, d.month, d.day, 0, 0, 0, d.weekday(), yday, -1))"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "toordinal()",
|
||||
"trans": [
|
||||
"返回该日期的公历序数"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "weekday()",
|
||||
"trans": [
|
||||
"将星期几作为一个整数返回,其中星期一为0,星期日为6"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "astimezone()",
|
||||
"trans": [
|
||||
"返回一个带有新的tzinfo属性tz的日期时间对象,调整日期和时间数据,使结果与自己的UTC时间相同,但以tz的当地时间为准。"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "date()",
|
||||
"trans": [
|
||||
"返回具有相同年份、月份和日期的日期对象。"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "dst()",
|
||||
"trans": [
|
||||
"判断是否是夏令时"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "isocalendar()",
|
||||
"trans": [
|
||||
"返回一个有三个组成部分的命名元组:年、周和工作日"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "isoweekday()",
|
||||
"trans": [
|
||||
"返回一周的整数,其中周一为1,周日为7"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "time()",
|
||||
"trans": [
|
||||
"返回具有相同时、分、秒、微秒和折线的时间对象"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "timetz()",
|
||||
"trans": [
|
||||
"此方法的返回类型是具有相同时,分,秒,微秒,倍数和tzinfo的时间对象。"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "tzname()",
|
||||
"trans": [
|
||||
"包含一对根据情况的不同而不同的字符串,分别是带夏令时的本地时区名称,和不带的。"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "%%",
|
||||
"trans": [
|
||||
"%号本身"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "%a",
|
||||
"trans": [
|
||||
"本地简化星期名称"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "%b",
|
||||
"trans": [
|
||||
"本地简化的月份名称"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "%c",
|
||||
"trans": [
|
||||
"本地相应的日期表示和时间表示"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "%d",
|
||||
"trans": [
|
||||
"月内中的一天(0-31)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "%H",
|
||||
"trans": [
|
||||
"24小时制小时数(0-23)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "%I",
|
||||
"trans": [
|
||||
"12小时制小时数(01-12)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "%j",
|
||||
"trans": [
|
||||
"年内的一天(001-366)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "%m",
|
||||
"trans": [
|
||||
"月份(01-12)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "%p",
|
||||
"trans": [
|
||||
"本地A.M.或P.M.的等价符"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "%S",
|
||||
"trans": [
|
||||
"秒(00-59)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "%U",
|
||||
"trans": [
|
||||
"一年中的星期数(00-53)星期天为星期的开始"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "%w",
|
||||
"trans": [
|
||||
"星期(0-6),星期天为星期的开始"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "%x",
|
||||
"trans": [
|
||||
"本地相应的日期表示"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "%y",
|
||||
"trans": [
|
||||
"两位数的年份表示(00-99)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "%Z",
|
||||
"trans": [
|
||||
"当前时区的名称"
|
||||
]
|
||||
}
|
||||
]
|
||||
128
public/dicts/python-file.json
Normal file
128
public/dicts/python-file.json
Normal file
@@ -0,0 +1,128 @@
|
||||
[
|
||||
{
|
||||
"name": "close()",
|
||||
"trans": [
|
||||
"close() 方法用于关闭一个已打开的文件。关闭后的文件不能再进行读写操作, 否则会触发 ValueError 错误。 close() 方法允许调用多次。当 file 对象,被引用到操作另外一个文件时,Python 会自动关闭之前的 file 对象。 使用 close() 方法关闭文件是一个好的习惯。"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "fileno()",
|
||||
"trans": [
|
||||
"fileno() 方法返回一个整型的文件描述符(file descriptor FD 整型),可用于底层操作系统的 I/O 操作。"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "flush()",
|
||||
"trans": [
|
||||
"flush() 方法是用来刷新缓冲区的,即将缓冲区中的数据立刻写入文件,同时清空缓冲区,不需要是被动的等待输出缓冲区写入。一般情况下,文件关闭后会自动刷新缓冲区,但有时你需要在关闭前刷新它,这时就可以使用 flush() 方法。"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "isatty()",
|
||||
"trans": [
|
||||
"isatty() 方法检测文件是否连接到一个终端设备,如果是返回 True,否则返回 False。"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "next()",
|
||||
"trans": [
|
||||
"next() 方法在文件使用迭代器时会使用到,在循环中,next()方法会在每次循环中调用,该方法返回文件的下一行,如果到达结尾(EOF),则触发 StopIteration。"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "read()",
|
||||
"trans": [
|
||||
"read() 方法用于从文件读取指定的字节数,如果未给定或为负则读取所有。"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "readline()",
|
||||
"trans": [
|
||||
"readline() 方法用于从文件读取整行,包括 '\n' 字符。如果指定了一个非负数的参数,则返回指定大小的字节数,包括 '\n' 字符。"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "readlines()",
|
||||
"trans": [
|
||||
"readlines() 方法用于读取所有行(直到结束符 EOF)并返回列表,若给定sizeint>0,返回总和大约为sizeint字节的行, 实际读取值可能比sizhint较大, 因为需要填充缓冲区。如果碰到结束符 EOF 则返回空字符串。"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "seek()",
|
||||
"trans": [
|
||||
"seek() 方法用于移动文件读取指针到指定位置。"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "tell()",
|
||||
"trans": [
|
||||
"tell() 方法返回文件的当前位置,即文件指针当前位置。"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "truncate()",
|
||||
"trans": [
|
||||
"truncate() 方法用于截断文件,如果指定了可选参数 size,则表示截断文件为 size 个字符。 如果没有指定 size,则从当前位置起截断;截断之后 size 后面的所有字符被删除。"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "write()",
|
||||
"trans": [
|
||||
"write() 方法用于向文件中写入指定字符串。在文件关闭前或缓冲区刷新前,字符串内容存储在缓冲区中,这时你在文件中是看不到写入的内容的。"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "writelines()",
|
||||
"trans": [
|
||||
"writelines() 方法用于向文件中写入一序列的字符串。这一序列字符串可以是由迭代对象产生的,如一个字符串列表。 换行需要制定换行符\n。"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "xreadlines()",
|
||||
"trans": [
|
||||
"返回一个生成器,来循环操作文件的每一行。循环使用时和readlines基本一样,但是直接打印就不同"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "closed",
|
||||
"trans": [
|
||||
"如果文件已被关闭返回 True,否则返回 False。"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "encoding()",
|
||||
"trans": [
|
||||
" encoding 指定的编码格式编码字符串。errors参数可以指定不同的错误处理方案。"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "errors",
|
||||
"trans": [
|
||||
"如果该文件无法被打开,会被抛出"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "name",
|
||||
"trans": [
|
||||
"文件名"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "mode",
|
||||
"trans": [
|
||||
"文件打开模式"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "newlines",
|
||||
"trans": [
|
||||
"表示文件所采用的分隔符"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "softspace",
|
||||
"trans": [
|
||||
"文件末尾强制加空格标志,为0表示在输出一数据后,要再加上一个空格符,为1表示不加,这个属性一般用不到"
|
||||
]
|
||||
}
|
||||
]
|
||||
224
public/dicts/python-math.json
Normal file
224
public/dicts/python-math.json
Normal file
@@ -0,0 +1,224 @@
|
||||
[
|
||||
{
|
||||
"name": "math.ceil(x)",
|
||||
"trans": [
|
||||
"返回数字的上入整数(返回传入数字的向上取整的值)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "math.copysign(x,y)",
|
||||
"trans": [
|
||||
"方法返回一个浮点数,该浮点数由第一个参数的值和第二个参数的正负号(+/-)组成"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "math.fabs(x)",
|
||||
"trans": [
|
||||
"返回浮点型数字的绝对值,如math.fabs(-10) 返回10.0。"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "math.factorial(x)",
|
||||
"trans": [
|
||||
"返回数字的阶乘"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "math.floor(x)",
|
||||
"trans": [
|
||||
" 返回数字的下舍整数(向下取整的浮点型整数)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "math.fmod(x,y)",
|
||||
"trans": [
|
||||
"返回x/y的余数(模)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "math.frexp(x)",
|
||||
"trans": [
|
||||
"以成对(m,e)的形式返回尾数和指定数字的指数"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "math.fsum(iterable)",
|
||||
"trans": [
|
||||
"返回所有项目的总和"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "math.isinf(x)",
|
||||
"trans": [
|
||||
"检查值是否为无穷大"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "math.isnan(x)",
|
||||
"trans": [
|
||||
"检查值是否为NaN"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "math.ldexp(x,i)",
|
||||
"trans": [
|
||||
"返回给定数字x和i的x * (2 ** i),这是math.frexp()的反函数"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "math.modf(x)",
|
||||
"trans": [
|
||||
"返回x的整数部分与小数部分,两部分的数值符号与x相同,整数部分以浮点型表示"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "math.trunc()",
|
||||
"trans": [
|
||||
"返回数字的截断的整数部分"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "math.exp(x)",
|
||||
"trans": [
|
||||
"返回x的指数,ex"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "math.log(x[,base])",
|
||||
"trans": [
|
||||
"返回数字的自然对数,或数字以对数为底的对数"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "math.log10(x)",
|
||||
"trans": [
|
||||
"返回数字的以10为底的对数"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "math.log1p(x)",
|
||||
"trans": [
|
||||
"返回log(1 + number),即使在number的值接近于零的情况下,其计算方式也是准确的"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "math.pow(x,y)",
|
||||
"trans": [
|
||||
"方法返回 xy(x的y次方) 的值。"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "math.sqrt(x)",
|
||||
"trans": [
|
||||
"方法返回数字x的平方根"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "math.acos(x)",
|
||||
"trans": [
|
||||
"返回x的反余弦弧度值"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "math.asin(x)",
|
||||
"trans": [
|
||||
"返回x的反正弦弧度值。"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "math.atan(x)",
|
||||
"trans": [
|
||||
"返回x的反正切弧度值。"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "math.atan2(y,x)",
|
||||
"trans": [
|
||||
"返回给定的 X 及 Y 坐标值的反正切值。"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "math.cos(x)",
|
||||
"trans": [
|
||||
"返回x的弧度的余弦值"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "math.hypot(x,y)",
|
||||
"trans": [
|
||||
"返回欧几里德范数 sqrt(x*x + y*y)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "math.sin(x)",
|
||||
"trans": [
|
||||
"返回的x弧度的正弦值"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "math.tan(x)",
|
||||
"trans": [
|
||||
"返回x弧度的正弦值"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "math.degrees(x)",
|
||||
"trans": [
|
||||
"弧度转换为角度"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "math.radians(x)",
|
||||
"trans": [
|
||||
"将角度转换为弧度"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "math.acosh(x)",
|
||||
"trans": [
|
||||
"返回数字的反双曲余弦值"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "math.asinh(x)",
|
||||
"trans": [
|
||||
"返回数字的反双曲正弦"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "math.atanh(x)",
|
||||
"trans": [
|
||||
"返回数字的反双曲正切值"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "math.cosh(x)",
|
||||
"trans": [
|
||||
"求不同数的双曲余弦"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "math.sinh(x)",
|
||||
"trans": [
|
||||
"查找不同数字的双曲正弦值"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "math.tanh(x)",
|
||||
"trans": [
|
||||
"返回不同数的双曲正切"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "math.e",
|
||||
"trans": [
|
||||
"数学常量 e,e即自然常数(自然常数)。"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "math.pi",
|
||||
"trans": [
|
||||
"数学常量 pi(圆周率,一般以π来表示)。"
|
||||
]
|
||||
}
|
||||
]
|
||||
176
public/dicts/python-set.json
Normal file
176
public/dicts/python-set.json
Normal file
@@ -0,0 +1,176 @@
|
||||
[
|
||||
{
|
||||
"name": "x in s",
|
||||
"trans": [
|
||||
"判断键是否存在于字典中,如果键在字典 dict 里返回 true,否则返回 false"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "add()",
|
||||
"trans": [
|
||||
"用于给集合添加元素,如果添加的元素在集合中已存在,则不执行任何操作"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "clear()",
|
||||
"trans": [
|
||||
"用于移除集合中的所有元素"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "copy()",
|
||||
"trans": [
|
||||
"用于拷贝一个集合"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "difference_update()",
|
||||
"trans": [
|
||||
"用于移除两个集合中都存在的元素,没有返回值"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "difference()",
|
||||
"trans": [
|
||||
"返回一个移除相同元素的新集合"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "discard()",
|
||||
"trans": [
|
||||
"用于移除指定的集合元素"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "intersection_update()",
|
||||
"trans": [
|
||||
"用于获取两个或更多集合中都重叠的元素,原始的集合上移除不重叠的元素,即计算交集"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "intersection()",
|
||||
"trans": [
|
||||
"返回两个或更多集合中都包含的元素,即交集,返回一个新的集合"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "len()",
|
||||
"trans": [
|
||||
"返回对象(字符、列表、元组等)长度或项目个数"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "pop()",
|
||||
"trans": [
|
||||
"随机移除一个元素"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "remove()",
|
||||
"trans": [
|
||||
"移除集合中的指定元素"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "isdisjoint()",
|
||||
"trans": [
|
||||
"判断两个集合是否包含相同的元素,如果没有返回 True,否则返回 False。"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "issubset()",
|
||||
"trans": [
|
||||
"判断集合的所有元素是否都包含在指定集合中,如果是则返回 True,否则返回 False"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "issuperset()",
|
||||
"trans": [
|
||||
"判断指定集合的所有元素是否都包含在原始的集合中,如果是则返回 True,否则返回 False"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "symmetric_difference_update()",
|
||||
"trans": [
|
||||
"移除当前集合中在另外一个指定集合相同的元素,并将另外一个指定集合中不同的元素插入到当前集合中"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "symmetric_difference()",
|
||||
"trans": [
|
||||
"返回两个集合中不重复的元素集合,即会移除两个集合中都存在的元素。"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "union()",
|
||||
"trans": [
|
||||
"返回两个集合的并集,即包含了所有集合的元素,重复的元素只会出现一次"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "update()",
|
||||
"trans": [
|
||||
"修改当前集合,可以添加新的元素或集合到当前集合中,如果添加的元素在集合中已存在,则该元素只会出现一次,重复的会忽略"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "fromkeys()",
|
||||
"trans": [
|
||||
"创建一个新字典,以序列 seq 中元素做字典的键,value 为字典所有键对应的初始值"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "get()",
|
||||
"trans": [
|
||||
"返回指定键的值"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "has_key()",
|
||||
"trans": [
|
||||
"判断键是否存在于字典中,如果键在字典dict里返回true,否则返回false"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "items()",
|
||||
"trans": [
|
||||
"以列表返回可遍历的(键, 值) 元组数组"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "iteritems()",
|
||||
"trans": [
|
||||
"将一个字典以列表的形式返回,因为字典是无序的,所以返回的列表也是无序的"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "iterkeys()",
|
||||
"trans": [
|
||||
"返回一个迭代器"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "keys()",
|
||||
"trans": [
|
||||
"返回一个视图对象"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "popitem()",
|
||||
"trans": [
|
||||
"返回并删除字典中的最后一对键和值"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "setdefault()",
|
||||
"trans": [
|
||||
"如果键不存在于字典中,将会添加键并将值设为默认值"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "values()",
|
||||
"trans": [
|
||||
"返回一个视图对象"
|
||||
]
|
||||
}
|
||||
]
|
||||
162
public/dicts/python-string.json
Normal file
162
public/dicts/python-string.json
Normal file
@@ -0,0 +1,162 @@
|
||||
[
|
||||
{
|
||||
"name": "capitalize()",
|
||||
"trans": ["将字符串的第一个字母变成大写,其他字母变小写。对于 8 位字节编码需要根据本地环境。"]
|
||||
},
|
||||
{
|
||||
"name": "center()",
|
||||
"trans": ["返回一个原字符串居中,并使用空格填充至长度 width 的新字符串。默认填充字符为空格。"]
|
||||
},
|
||||
{
|
||||
"name": "count()",
|
||||
"trans": ["用于统计字符串里某个字符出现的次数。可选参数为在字符串搜索的开始与结束位置。"]
|
||||
},
|
||||
{
|
||||
"name": "decode()",
|
||||
"trans": ["以 encoding 指定的编码格式解码字符串。默认编码为字符串编码。"]
|
||||
},
|
||||
{
|
||||
"name": "encode()",
|
||||
"trans": ["以 encoding 指定的编码格式编码字符串。errors参数可以指定不同的错误处理方案。"]
|
||||
},
|
||||
{
|
||||
"name": "endswith()",
|
||||
"trans": ["用于判断字符串是否以指定后缀结尾,如果以指定后缀结尾返回True,否则返回False。可选参数'start'与'end'为检索字符串的开始与结束位置。"]
|
||||
},
|
||||
{
|
||||
"name": "expandtabs()",
|
||||
"trans": ["把字符串中的 tab 符号('\t')转为空格,默认的空格数 tabsize 是 8。"]
|
||||
},
|
||||
{
|
||||
"name": "find()",
|
||||
"trans": ["检测字符串中是否包含子字符串 str ,如果指定 beg(开始) 和 end(结束) 范围,则检查是否包含在指定范围内,如果包含子字符串返回开始的索引值,否则返回-1。"]
|
||||
},
|
||||
{
|
||||
"name": "format()",
|
||||
"trans": ["调用此方法的字符串可以包含文字文本或用大括号{}分隔的替换字段。每个替换字段包含位置参数的数字索引,或关键字参数的名称。"]
|
||||
},
|
||||
{
|
||||
"name": "index()",
|
||||
"trans": ["检测字符串中是否包含子字符串str ,如果指定 beg(开始) 和 end(结束) 范围,则检查是否包含在指定范围内,该方法与 python find()方法一样,只不过如果str不在 string中会报一个异常。"]
|
||||
},
|
||||
{
|
||||
"name": "isalnum()",
|
||||
"trans": ["检测字符串是否由字母和数字组成"]
|
||||
},
|
||||
{
|
||||
"name": "isalpha()",
|
||||
"trans": ["检测字符串是否只由字母组成"]
|
||||
},
|
||||
{
|
||||
"name": "isdecimal()",
|
||||
"trans": ["检查字符串是否只包含十进制字符。这种方法只存在于unicode对象"]
|
||||
},
|
||||
{
|
||||
"name": "isdigit()",
|
||||
"trans": ["检测字符串是否只由数字组成"]
|
||||
},
|
||||
{
|
||||
"name": "islower()",
|
||||
"trans": ["检测字符串是否由小写字母组成。"]
|
||||
},
|
||||
{
|
||||
"name": "isnumeric()",
|
||||
"trans": ["检测字符串是否只由数字组成。这种方法是只针对unicode对象"]
|
||||
},
|
||||
{
|
||||
"name": "isspace()",
|
||||
"trans": ["检测字符串是否只由空格组成"]
|
||||
},
|
||||
{
|
||||
"name": "istitle()",
|
||||
"trans": ["检测字符串中所有的单词拼写首字母是否为大写,且其他字母为小写"]
|
||||
},
|
||||
{
|
||||
"name": "isupper()",
|
||||
"trans": ["检测字符串中所有的字母是否都为大写"]
|
||||
},
|
||||
{
|
||||
"name": "join()",
|
||||
"trans": ["用于将序列中的元素以指定的字符连接生成一个新的字符串"]
|
||||
},
|
||||
{
|
||||
"name": "ljust()",
|
||||
"trans": ["返回一个原字符串左对齐,并使用空格填充至指定长度的新字符串。如果指定的长度小于原字符串的长度则返回原字符串"]
|
||||
},
|
||||
{
|
||||
"name": "lower()",
|
||||
"trans": ["转换字符串中所有大写字符为小写"]
|
||||
},
|
||||
{
|
||||
"name": "lstrip()",
|
||||
"trans": ["用于截掉字符串左边的空格或指定字符"]
|
||||
},
|
||||
{
|
||||
"name": "partition()",
|
||||
"trans": ["用来根据指定的分隔符将字符串进行分割"]
|
||||
},
|
||||
{
|
||||
"name": "replace()",
|
||||
"trans": ["把字符串中的 old(旧字符串) 替换成 new(新字符串),如果指定第三个参数max,则替换不超过 max 次"]
|
||||
},
|
||||
{
|
||||
"name": "rfind()",
|
||||
"trans": ["返回字符串最后一次出现的位置,如果没有匹配项则返回-1"]
|
||||
},
|
||||
{
|
||||
"name": "rindex()",
|
||||
"trans": ["返回子字符串 str 在字符串中最后出现的位置,如果没有匹配的字符串会报异常,你可以指定可选参数[beg:end]设置查找的区间"]
|
||||
},
|
||||
{
|
||||
"name": "rjust()",
|
||||
"trans": ["返回一个原字符串右对齐,并使用空格填充至长度 width 的新字符串。如果指定的长度小于字符串的长度则返回原字符串。"]
|
||||
},
|
||||
{
|
||||
"name": "rpartition()",
|
||||
"trans": ["从目标字符串的末尾也就是右边开始搜索分割符"]
|
||||
},
|
||||
{
|
||||
"name": "rsplit()",
|
||||
"trans": ["通过指定分隔符对字符串进行分割并返回一个列表,默认分隔符为所有空字符"]
|
||||
},
|
||||
{
|
||||
"name": "rstrip()",
|
||||
"trans": ["删除 string 字符串末尾的指定字符(默认为空格)."]
|
||||
},
|
||||
{
|
||||
"name": "split()",
|
||||
"trans": ["通过指定分隔符对字符串进行切片,如果参数num 有指定值,则仅分隔 num 个子字符串。"]
|
||||
},
|
||||
{
|
||||
"name": "splitlines()",
|
||||
"trans": ["按照行分隔,返回一个包含各行作为元素的列表,如果 num 指定则仅切片 num 个行."]
|
||||
},
|
||||
{
|
||||
"name": "startswith()",
|
||||
"trans": ["用于检查字符串是否是以指定子字符串开头,如果是则返回 True,否则返回 False。如果参数 beg 和 end 指定值,则在指定范围内检查。"]
|
||||
},
|
||||
{
|
||||
"name": "strip()",
|
||||
"trans": ["用于移除字符串头尾指定的字符(默认为空格)"]
|
||||
},
|
||||
{
|
||||
"name": "swapcase",
|
||||
"trans": ["用于对字符串的大小写字母进行转换"]
|
||||
},
|
||||
{
|
||||
"name": "title()",
|
||||
"trans": ["返回‘标题化’的字符串,就是说所有单词都是以大写开始,其余字母均为小写(见 istitle())"]
|
||||
},
|
||||
{
|
||||
"name": "translate()",
|
||||
"trans": ["根据参数table给出的表(包含 256 个字符)转换字符串的字符, 要过滤掉的字符放到 del 参数中"]
|
||||
},
|
||||
{
|
||||
"name": "upper()",
|
||||
"trans": ["将字符串中的小写字母转为大写字母"]
|
||||
},
|
||||
{
|
||||
"name": "zfill()",
|
||||
"trans": ["返回指定长度的字符串,原字符串右对齐,前面填充0。"]
|
||||
}
|
||||
]
|
||||
146
public/dicts/python-sys.json
Normal file
146
public/dicts/python-sys.json
Normal file
@@ -0,0 +1,146 @@
|
||||
[
|
||||
{
|
||||
"name": "altsep",
|
||||
"trans": [
|
||||
"另一种可以替代使用的文件路径分隔符,如果所在的系统支持其他的分隔符,那么可以使用os.altsep来使用系统支持的其他类型的分隔符,如果系统不支持,那么该值为None,如在Windows中,os.altsep为‘/’。"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "curdir",
|
||||
"trans": [
|
||||
"返回当前目录: ('.')。"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "defpath",
|
||||
"trans": [
|
||||
"当使用exec函数族的时候,如果没有制定PATH环境变量,则默认会查找os.defpath中的值作为子进程PATH的值。"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "devnull",
|
||||
"trans": [
|
||||
"在不同的系统上null设备的路径,在Windows下为‘nul’,在POSIX下为‘/dev/null’"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "extsep",
|
||||
"trans": [
|
||||
"文件名和文件扩展名之间分隔的符号,在Windows下为‘.’"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "linesep",
|
||||
"trans": [
|
||||
"输出当前平台使用的行终止符,win下为'\t\n',Linux下为'\n'。"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "pardir",
|
||||
"trans": [
|
||||
"获取当前目录的父目录字符串名:('..')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "pathsep",
|
||||
"trans": [
|
||||
"PATH环境变量中的分隔符,在POSIX系统中为‘:’,在Windows中为‘;’"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "sep",
|
||||
"trans": [
|
||||
"不同的平台有不同的路径表示方法,为了在编写代码的时候方便处理,增加可移植性,可以使用os.sep作为路径的分隔符"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "argv",
|
||||
"trans": [
|
||||
"命令行参数"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "builtin_module_names",
|
||||
"trans": [
|
||||
"链接c模块"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "byteorder",
|
||||
"trans": [
|
||||
"返回本机字节顺序"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "check_-interval",
|
||||
"trans": [
|
||||
"信号检测频率"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "exec_prefix",
|
||||
"trans": [
|
||||
"根目录"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "executable",
|
||||
"trans": [
|
||||
"可执行文件的名称"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "exitfunc",
|
||||
"trans": [
|
||||
"退出函数名"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "modules",
|
||||
"trans": [
|
||||
"加载模块"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "path",
|
||||
"trans": [
|
||||
"搜索路径"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "platform",
|
||||
"trans": [
|
||||
"查看当前操作系统的信息,来采集系统版本位数计算机类型名称内核等一系列信息"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "stdin",
|
||||
"trans": [
|
||||
"标准输入,stdin提供了read()和readline()函数,如果想按一行行来读取,可以考虑使用它"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "stdout",
|
||||
"trans": [
|
||||
"标准输出"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "stderr",
|
||||
"trans": [
|
||||
"错误输出"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "version_info",
|
||||
"trans": [
|
||||
"获取python版本号"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "winver",
|
||||
"trans": [
|
||||
"版本号"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -1,4 +1,4 @@
|
||||
export type Dictionary = {
|
||||
export type Dictionary = {
|
||||
id: string
|
||||
name: string
|
||||
description: string
|
||||
@@ -99,6 +99,70 @@ export const dictionaries: Dictionary[] = [
|
||||
url: './dicts/python-builtin.json',
|
||||
length: 65,
|
||||
},
|
||||
{
|
||||
id: 'python-array',
|
||||
name: 'Python: array',
|
||||
description: 'Python array API ',
|
||||
category: '代码练习',
|
||||
url: './dicts/python-array.json',
|
||||
length: 11,
|
||||
},
|
||||
{
|
||||
id: 'python-date',
|
||||
name: 'Python: date',
|
||||
description: 'Python date API ',
|
||||
category: '代码练习',
|
||||
url: './dicts/python-date.json',
|
||||
length: 39,
|
||||
},
|
||||
{
|
||||
id: 'python-file',
|
||||
name: 'Python: file',
|
||||
description: 'Python file API ',
|
||||
category: '代码练习',
|
||||
url: './dicts/python-file.json',
|
||||
length: 21,
|
||||
},
|
||||
{
|
||||
id: 'python-class',
|
||||
name: 'Python: class',
|
||||
description: 'Python class API ',
|
||||
category: '代码练习',
|
||||
url: './dicts/python-class.json',
|
||||
length: 13,
|
||||
},
|
||||
{
|
||||
id: 'python-set',
|
||||
name: 'Python: set',
|
||||
description: 'Python set API ',
|
||||
category: '代码练习',
|
||||
url: './dicts/python-set.json',
|
||||
length: 29,
|
||||
},
|
||||
{
|
||||
id: 'python-math',
|
||||
name: 'Python: math',
|
||||
description: 'Python math API ',
|
||||
category: '代码练习',
|
||||
url: './dicts/python-math.json',
|
||||
length: 37,
|
||||
},
|
||||
{
|
||||
id: 'python-string',
|
||||
name: 'Python: string',
|
||||
description: 'Python string API ',
|
||||
category: '代码练习',
|
||||
url: './dicts/python-string.json',
|
||||
length: 40,
|
||||
},
|
||||
{
|
||||
id: 'python-system',
|
||||
name: 'Python: system',
|
||||
description: 'Python system API ',
|
||||
category: '代码练习',
|
||||
url: './dicts/python-sys.json',
|
||||
length: 24,
|
||||
},
|
||||
{
|
||||
id: 'javeArrayList',
|
||||
name: 'Java: ArrayList',
|
||||
|
||||
Reference in New Issue
Block a user