[python]bokeh学习总结——QuickStart

2023-11-20

bokeh是python中一款基于网页的画图工具库,画出的图像以html格式保存。

一个简单的例子:

from bokeh.plotting import figure, output_file, show

output_file("patch.html")

p = figure(plot_width=400, plot_height=400)

# add a patch renderer with an alpha an line width
p.patch([1, 2, 3, 4, 5], [6, 7, 8, 7, 3], alpha=0.5, line_width=2)

show(p)

画出图像后:


代码中有一行为

from bokeh.plotting import figure

figure是一个什么类型的数据?通过查看源代码,发现原来figure是一个函数,返回值为Figure类,Figure类以来自bokeh.models中的Plot类为父类,Figure类继承了Plot类中的各种属性。

from ..models import ColumnDataSource, Plot, Title, Tool, GraphRenderer

class Figure(Plot):
省略...

def figure(**kwargs):
    ''' Create a new :class:`~bokeh.plotting.figure.Figure` for plotting.

    Figure objects have many glyph methods that can be used to draw
    vectorized graphical glyphs:

    .. hlist::
        :columns: 3

{glyph_methods}

    There are also two specialized methods for stacking bars:

    * :func:`~bokeh.plotting.figure.Figure.hbar_stack`
    * :func:`~bokeh.plotting.figure.Figure.vbar_stack`

    And one specialized method for making simple hexbin plots:

    * :func:`~bokeh.plotting.figure.Figure.hexbin`

    In addition to the standard :class:`~bokeh.plotting.figure.Figure`
    property values (e.g. ``plot_width`` or ``sizing_mode``) the following
    additional options can be passed as well:

    .. bokeh-options:: FigureOptions
        :module: bokeh.plotting.figure

    Returns:
       Figure

    '''

    return Figure(**kwargs)

Plotting with Basic Glyphs

Creating Figures

Scatter Markers

画出圆形可以使用circle()方法:

from bokeh.plotting import figure, output_file, show

# output to static HTML file
output_file("line.html")

p = figure(plot_width=400, plot_height=400)

# add a circle renderer with a size, color, and alpha
p.circle([1, 2, 3, 4, 5], [6, 7, 2, 4, 5], size=20, color="navy", alpha=0.5)

# show the results
show(p)

得到的图形为:


同样的,如果要画出方形,可以使用square()方法,参数都是一样,将代码中的circle替换为square即可:

from bokeh.plotting import figure, output_file, show

# output to static HTML file
output_file("square.html")

p = figure(plot_width=400, plot_height=400)

# add a square renderer with a size, color, and alpha
p.square([1, 2, 3, 4, 5], [6, 7, 2, 4, 5], size=20, color="olive", alpha=0.5)

# show the results
show(p)

画出的图形为:


还有许多其它图形函数,其参数也都是一样,x表示x轴的数据,y表示y轴的数据,size表示图形的大小。还有一些参数包含angle——表示角度的大小,radius——表示图形的半径。

详细使用方法见:

https://bokeh.pydata.org/en/latest/docs/reference/plotting.html#bokeh.plotting.figure.Figure.x

以annular_wedge()函数为例:

from bokeh.plotting import figure, output_file, show

# output to static HTML file
output_file("square.html")

p = figure()
x = [61,62,63,64,65]
y = [66,67,68,69,70]

# add a square renderer with a size, color, and alpha
p.annular_wedge(x=x, y=y, inner_radius=0.1, outer_radius=0.3, start_angle=0, end_angle=5, direction='anticlock')

# show the results
show(p)

Line Glyphs

Single Lines
from bokeh.plotting import figure, output_file, show

output_file("line.html")

p = figure(plot_width=400, plot_height=400)

# add a line renderer
p.line([1, 2, 3, 4, 5], [6, 7, 2, 4, 5], line_width=2)

show(p)

Step Lines
from bokeh.plotting import figure, output_file, show

output_file("line.html")

p = figure(plot_width=400, plot_height=400)

# add a steps renderer
p.step([1, 2, 3, 4, 5], [6, 7, 2, 4, 5], line_width=2, mode="center")

show(p)

Multiple Lines
from bokeh.plotting import figure, output_file, show

output_file("patch.html")

p = figure(plot_width=400, plot_height=400)

p.multi_line([[1, 3, 2], [3, 4, 6, 6]], [[2, 1, 4], [4, 7, 8, 5]],
             color=["firebrick", "navy"], alpha=[0.8, 0.3], line_width=4)

show(p)

需要注意的是,第一个list表示x轴的数据,[[1,3,2],[3,4,6,6]]中的两个list代表lines是分离的;第二个list表示y轴的数据。

Missing Points

NaN可以作为line()和multi_line()函数参数的一部分,用该值可以表示不连续点。若x=NaN,则对应的y值将被忽略。

from bokeh.plotting import figure, output_file, show

output_file("line.html")

p = figure(plot_width=400, plot_height=400)

# add a line renderer with a NaN
nan = float('nan')
p.line([1, 2, 3, nan, 3, 5], [6, 7, 2, 4, 4, 5], line_width=2)

show(p)

Bars and Rectangles

Rectangles
from bokeh.plotting import figure, show, output_file

output_file('rectangles.html')

p = figure(plot_width=400, plot_height=400)
p.quad(top=[2, 3, 4], bottom=[1, 2, 3], left=[1, 2, 3],
       right=[1.2, 2.5, 3.7], color="#B3DE69")

show(p)

还有一个例子:

from math import pi
from bokeh.plotting import figure, show, output_file

output_file('rectangles_rotated.html')

p = figure(plot_width=400, plot_height=400)
p.rect(x=[1, 2, 3], y=[1, 2, 3], width=0.2, height=40, color="#CAB2D6",
       angle=pi/3, height_units="screen")

show(p)

Bars

vertical bars:

from bokeh.plotting import figure, show, output_file

output_file('vbar.html')

p = figure(plot_width=400, plot_height=400)
p.vbar(x=[1, 2, 3], width=0.5, bottom=0,
       top=[1.2, 2.5, 3.7], color="firebrick")

show(p)

horizon bars:

from bokeh.plotting import figure, show, output_file

output_file('hbar.html')

p = figure(plot_width=400, plot_height=400)
p.hbar(y=[1, 2, 3], height=0.5, left=0,
       right=[1.2, 2.5, 3.7], color="navy")

show(p)

Hex Tiles

import numpy as np

from bokeh.io import output_file, show
from bokeh.plotting import figure
from bokeh.util.hex import axial_to_cartesian

output_file("hex_coords.py")

q = np.array([0,  0, 0, -1, -1,  1, 1])
r = np.array([0, -1, 1,  0,  1, -1, 0])

p = figure(plot_width=400, plot_height=400, toolbar_location=None)
p.grid.visible = False

p.hex_tile(q, r, size=1, fill_color=["firebrick"]*3 + ["navy"]*4,
           line_color="white", alpha=0.5)

x, y = axial_to_cartesian(q, r, 1, "pointytop")

p.text(x, y, text=["(%d, %d)" % (q,r) for (q, r) in zip(q, r)],
       text_baseline="middle", text_align="center")

show(p)

import numpy as np

from bokeh.io import output_file, show
from bokeh.plotting import figure
from bokeh.transform import linear_cmap
from bokeh.util.hex import hexbin

n = 50000
x = np.random.standard_normal(n)
y = np.random.standard_normal(n)

bins = hexbin(x, y, 0.1)

p = figure(tools="wheel_zoom,reset", match_aspect=True, background_fill_color='#440154')
p.grid.visible = False

p.hex_tile(q="q", r="r", size=0.1, line_color=None, source=bins,
           fill_color=linear_cmap('counts', 'Viridis256', 0, max(bins.counts)))

output_file("hex_tile.html")

show(p)

Patch Glyphs

Single Patches
from bokeh.plotting import figure, output_file, show

output_file("patch.html")

p = figure(plot_width=400, plot_height=400)

# add a patch renderer with an alpha an line width
p.patch([1, 2, 3, 4, 5], [6, 7, 8, 7, 3], alpha=0.5, line_width=2)

show(p)

Multiple Patches
from bokeh.plotting import figure, output_file, show

output_file("patch.html")

p = figure(plot_width=400, plot_height=400)

p.patches([[1, 3, 2], [3, 4, 6, 6]], [[2, 1, 4], [4, 7, 8, 5]],
          color=["firebrick", "navy"], alpha=[0.8, 0.3], line_width=2)

show(p)

Missing Points
from bokeh.plotting import figure, output_file, show

output_file("patch.html")

p = figure(plot_width=400, plot_height=400)

# add a patch renderer with a NaN value
nan = float('nan')
p.patch([1, 2, 3, nan, 4, 5, 6], [6, 7, 5, nan, 7, 3, 6], alpha=0.5, line_width=2)

show(p)

Ovals and Ellipses

from math import pi
from bokeh.plotting import figure, show, output_file

output_file('ovals.html')

p = figure(plot_width=400, plot_height=400)
p.oval(x=[1, 2, 3], y=[1, 2, 3], width=0.2, height=40, color="#CAB2D6",
       angle=pi/3, height_units="screen")

show(p)

from math import pi
from bokeh.plotting import figure, show, output_file

output_file('ellipses.html')

p = figure(plot_width=400, plot_height=400)
p.ellipse(x=[1, 2, 3], y=[1, 2, 3], width=[0.2, 0.3, 0.1], height=0.3,
          angle=pi/3, color="#CAB2D6")

show(p)

Segments and Rays

Sometimes it is useful to be able to draw many individual line segments at once. Bokeh provides the segment() and ray() glyph methods to render these.

from bokeh.plotting import figure, show

p = figure(plot_width=400, plot_height=400)
p.segment(x0=[1, 2, 3], y0=[1, 2, 3], x1=[1.2, 2.4, 3.1],
          y1=[1.2, 2.5, 3.7], color="#F4A582", line_width=3)

show(p)

The ray() function accepts start points xy with a length (in screen units) and an angle. The default angle_units are "rad" but can also be changed to "deg". To have an “infinite” ray, that always extends to the edge of the plot, specify 0 for the length:

from bokeh.plotting import figure, show

p = figure(plot_width=400, plot_height=400)
p.ray(x=[1, 2, 3], y=[1, 2, 3], length=45, angle=[30, 45, 60],
      angle_units="deg", color="#FB8072", line_width=2)

show(p)

Wedges and Arcs

from bokeh.plotting import figure, show

p = figure(plot_width=400, plot_height=400)
p.arc(x=[1, 2, 3], y=[1, 2, 3], radius=0.1, start_angle=0.4, end_angle=4.8, color="navy")

show(p)

from bokeh.plotting import figure, show

p = figure(plot_width=400, plot_height=400)
p.wedge(x=[1, 2, 3], y=[1, 2, 3], radius=0.2, start_angle=0.4, end_angle=4.8,
        color="firebrick", alpha=0.6, direction="clock")

show(p)

from bokeh.plotting import figure, show

p = figure(plot_width=400, plot_height=400)
p.annular_wedge(x=[1, 2, 3], y=[1, 2, 3], inner_radius=0.1, outer_radius=0.25,
                start_angle=0.4, end_angle=4.8, color="green", alpha=0.6)

show(p)

from bokeh.plotting import figure, show

p = figure(plot_width=400, plot_height=400)
p.annulus(x=[1, 2, 3], y=[1, 2, 3], inner_radius=0.1, outer_radius=0.25,
          color="orange", alpha=0.6)

show(p)

Combining Multiple Glyphs

from bokeh.plotting import figure, output_file, show

x = [1, 2, 3, 4, 5]
y = [6, 7, 8, 7, 3]

output_file("multiple.html")

p = figure(plot_width=400, plot_height=400)

# add both a line and circles on the same plot
p.line(x, y, line_width=2)
p.circle(x, y, fill_color="white", size=8)

show(p)

Setting Ranges

两种方法设置range:

1.可以通过从bokeh.models中导入Range1d(x,y)对象来实现:

By default, Bokeh will attempt to automatically set the data bounds of plots to fit snugly around the data. Sometimes you may need to set a plot’s range explicitly. This can be accomplished by setting the x_range or y_range properties using a Range1dobject that gives the start and end points of the range you want:

p.x_range = Range1d(0, 100)

2.在figure()里直接调用x_range()和y_range():

As a convenience, the figure() function can also accept tuples of (start, end) as values for the x_range or y_range parameters.

看一个例子:

from bokeh.plotting import figure, output_file, show
from bokeh.models import Range1d

output_file("title.html")

# create a new plot with a range set with a tuple
p = figure(plot_width=400, plot_height=400, x_range=(0, 20))

# set a range using a Range1d
p.y_range = Range1d(0, 15)

p.circle([1, 2, 3, 4, 5], [2, 5, 8, 2, 7], size=10)

show(p)

Specifying Axis Types

Categorical Axes

上面的所有例子中,x和y轴都是数字,有些时候希望坐标轴显示的是字符,可以使用如下方法:

from bokeh.plotting import figure, output_file, show

factors = ["a", "b", "c", "d", "e", "f", "g", "h"]
x = [50, 40, 65, 10, 25, 37, 80, 60]

output_file("categorical.html")

p = figure(y_range=factors)

p.circle(x, factors, size=15, fill_color="orange", line_color="green", line_width=3)

show(p)

此时,y轴是factors:


Log Scale Axes
from bokeh.plotting import figure, output_file, show

x = [0.1, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0]
y = [10**xx for xx in x]

output_file("log.html")

# create a new plot with a log axis type
p = figure(plot_width=400, plot_height=400, y_axis_type="log")

p.line(x, y, line_width=2)
p.circle(x, y, fill_color="white", size=8)

show(p)

Twin Axes

from numpy import pi, arange, sin, linspace

from bokeh.plotting import output_file, figure, show
from bokeh.models import LinearAxis, Range1d

x = arange(-2*pi, 2*pi, 0.1)
y = sin(x)
y2 = linspace(0, 100, len(y))

output_file("twin_axis.html")

p = figure(x_range=(-6.5, 6.5), y_range=(-1.1, 1.1))

p.circle(x, y, color="red")

p.extra_y_ranges = {"foo": Range1d(start=0, end=100)}
p.circle(x, y2, color="blue", y_range_name="foo")
p.add_layout(LinearAxis(y_range_name="foo"), 'left')

show(p)

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

[python]bokeh学习总结——QuickStart 的相关文章

  • Docker 进程被神秘的“Killed”消息杀死

    在 docker 容器中运行 python 脚本 一切似乎都运行顺利 看到一些 STDOUT 消息 大约 5 分钟后我得到了Killed消息 没有进一步的解释 并且该过程停止 查询数据库可能是磁盘空间问题 也可能是 OOM 问题 我不确定
  • 在 python + openCV 中使用网络摄像头的问题

    我正在使用以下代码使用 openCV python 访问我的网络摄像头 import cv cv NamedWindow webcam feed cv CV WINDOW AUTOSIZE cam cv CaptureFromCAM 1 然
  • 关于使用Python启动SSH隧道的问题

    我在从用 Python 编写的 HTTP RPC 服务器启动 SSH 隧道时遇到了麻烦 基于Python的BaseHTTPServer 有一个用Python编写的简单的HTTP RPC服务器 作为其中一项服务的一部分 我想启动从 RPC 服
  • Python:多处理和请求

    以下是我正在运行的使用多处理并行触发 HTTP 请求的代码片段 在控制台上运行后 它挂在 requests get url 处 既不继续前进也不抛出错误 def echo 100 q print before r requests get
  • 按 ListProperty (NDB) 对查询进行排序

    如何按 ListProperty 对查询进行排序 该模型 class Chapter ndb Model title ndb StringProperty required True version ndb IntegerProperty
  • 使用 GeoDjango 在坐标系之间进行转换

    我正在尝试将坐标信息添加到我的数据库中 添加django contrib gis支持我的应用程序 我正在写一个south数据迁移 从数据库中获取地址 并向 Google 询问坐标 到目前为止 我认为我最好的选择是使用geopy为了这 接下来
  • 同情因子简单关系

    我在 sympy 中有一个简单的因式分解问题 无法解决 我在 sympy 处理相当复杂的积分方面取得了巨大成功 但我对一些简单的事情感到困惑 如何得到 phi 2 2 phi phi 0 phi 0 2 8 因式分解 phi phi 0 2
  • Python - 为什么这段代码被视为生成器?

    我有一个名为 mb 的列表 其格式为 Company Name Rep Mth 1 Calls Mth 1 Inv Totals Mth 1 Inv Vol Mth 2 等等 在下面的代码中 我只是添加了一个包含 38 个 0 的新列表 这
  • Python 中的二进制相移键控

    我目前正在编写一些代码 以使用音频转换通过激光传输消息 文件 和其他数据 我当前的代码使用 python 中 binascii 模块中的 hexlify 函数将数据转换为二进制 然后为 1 发出一个音调 为 0 发出不同的音调 这在理论上是
  • 代理阻止网络套接字?如何绕行

    我有一个用 Python 编写的正在运行的 websocket 服务器 来自https github com opiate SimpleWebSocketServer https github com opiate SimpleWebSoc
  • 在 C# 中实例化 python 类

    我已经用 python 编写了一个类 我想通过 IronPython 将其包装到 net 程序集中 并在 C 应用程序中实例化 我已将该类迁移到 IronPython 创建了一个库程序集并引用了它 现在 我如何真正获得该类的实例 该类看起来
  • Python:如何重构循环导入

    我有件事可以帮你做engine setState
  • 出现意外的关键字参数“timeout”(Python 中的 google-cloud-storage)

    使用 google cloud storage 的 Python 项目在本地运行良好 但是当它从 App Engine 运行时 会显示错误 Traceback most recent call last File opt python3 7
  • 如何在 Numpy 中实现垃圾收集

    我有一个名为main py 它引用另一个文件Optimisers py它仅具有功能并用于for循环进入main py 这些函数都有不同的优化功能 This Optimisers py然后引用另外两个类似的文件 其中也只有函数 它们位于whi
  • 将 ASCII 字符转换为“”unicode 表示法的脚本

    我正在对 Linux 区域设置文件进行一些更改 usr share i18n locales like pt BR 并且需要格式化字符串 例如 d m Y H M 必须以 Unicode 指定 其中每个 在本例中为 ASCII 字符表示为
  • 如何在 Tkinter 的 Button 小部件中创建多个标签?

    我想知道如何在 Tkinter 中创建具有多个标签的按钮小部件 如下图所示 带有子标签的按钮 https i stack imgur com jOZRw jpg正如您所看到的 在某些按钮中有一个子标签 例如按钮 X 有另一个小标签 A 我试
  • 通过套接字发送字符串(python)

    我有两个脚本 Server py 和 Client py 我心中有两个目标 能够从客户端一次又一次地向服务器发送数据 能够将数据从服务器发送到客户端 这是我的 Server py import socket serversocket soc
  • 如何在 Python 中解析损坏的 XML?

    我无法影响的服务器发送的 XML 非常损坏 具体来说 Unicode WHITE STAR 将被编码为 UTF 8 E2 98 86 然后使用 Latin 1 转换为 HTML 实体表 我得到的是 acirc 98 86 9 个字节 位于声
  • 在 Gensim 中通过 ID 检索文档的字符串版本

    我正在使用 Gensim 进行一些主题建模 并且已经达到使用 LSI 和 tf idf 模型进行相似性查询的程度 我取回 ID 集和相似点 例如 299501 0 64505910873413086 如何获取与 ID 在本例中为 29950
  • 在 pip 中为 Flask 应用程序构建 docker 映像失败

    from alpine latest RUN apk add no cache python3 dev pip3 install upgrade pip WORKDIR backend COPY backend RUN pip no cac

随机推荐

  • No grammar constraints (DTD or XML schema) detected for the document

    No grammar constraints DTD or XML schema detected for the document
  • ESP8266与手机App通信(STM32)

    认识模块 ESP8266是一种低成本的Wi Fi模块 可用于连接物联网设备 控制器和传感器等 它具有小巧 高度集成和低功耗的特点 因此在物联网应用中被广泛使用 ESP8266模块由Espressif Systems开发 具有单芯片的封装和多
  • case when 作为条件_sqlserver条件分支case when使用教程

    在sqlserver的条件分支case when有两种写法 1 case 字段 when 值 then 返回值 when 值2 then 返回值2 end 2 case when 条件1 then 返回值1 when 条件2 then 返回
  • 【翻译】 zswap 压缩交换缓存

    您知道吗 LWN net 是一份由订阅者支持的出版物 我们依靠订阅者来维持整个运作 请通过订阅来帮助我们 让 LWN 继续在网络上运行 2013年2月12日 本文由 Seth Jennings 投稿 交换是性能的最大威胁之一 即使在快速固态
  • mysql中的default_详解MySQL中default的使用

    详解MySQL中default的使用 发布时间 2020 10 03 17 50 29 来源 脚本之家 阅读 60 作者 子不语 wj NULL 和 NOT NULL 修饰符 DEFAULT 修饰符 AUTO INCREMENT 修饰符 N
  • unity的LOD组件

    本文转载自http blog csdn net huutu article details 52106468 LOD是Level Of Detais 的简称 多细节层次 在游戏场景中 根据摄像机与模型的距离 来决定显示哪一个模型 一般距离近
  • 电脑开机时按F几重装系统

    常使用电脑的朋友都清楚 电脑系统有时候会出现故障 如果是出现不能开机的情况就需重我们装系统 那么如果 重装系统f几进入呢 下面小编现在来为大家详细的介绍一下电脑重装系统开机按F几 一起往下看 工具 原料 系统版本 win7系统 品牌型号 联
  • linux内核学习(7)粗略走走kbuild Makefile编译流程

    今天看Makefile文件 我头大了 此Makefile非彼Makefile 里面多了很多内置命令 比如origin patsubst等等啦 这些都没听说过 更可恶的是 连网上都没有 可见 这是一件多么伤人的事情 分析这样的 真是让人折寿啊
  • Toad常用快捷键和缩写替换

    Toad常用快捷键 F8 调出以前执行的sql命令 F9 执行全部sql Ctrl T 补全table name 或者显示字段 alt 箭头上下 看sql history Ctrl Enter 直接执行当前选中的sql Ctrl Shift
  • 文件服务器恢复测试,基于文件传输中文件损坏检测和恢复办法.doc

    基于文件传输中文件损坏检测和恢复办法 基于文件传输中文件损坏检测和恢复办法 摘 要 在网络上文件传输是一种常见的应用 讨论在文件传输完成后检测错误和恢复数据的办法 关键词 文件传输 文件校验 恢复 中图分类号 TP3 文献标识码 A 文章编
  • Python3学习笔记之-第三方模块(Pillow)

    目录 前言 一 安装Pillow 二 操作图像 前言 在 pillow之前处理图形的库莫过于PIL 但是它支持到python2 7 年久失修 于是一群志愿者在PIL的基础上常见了pillow 支持python3 又丰富和功能特性 一 安装P
  • 百度会员租赁地址

    http xinjipin com 转载于 https www cnblogs com byfboke p 11602017 html
  • 10:00面试,10:04就出来了 ,问的实在是太...

    从外包出来 没想到竟然死在了另一家厂子 自从加入这家公司 每天都在加班 钱倒是给的不少 所以我也就忍了 没想到12月一纸通知 所有人都不许加班 薪资直降30 顿时有吃不起饭的赶脚 好在有个兄弟内推我去了一家互联网公司 兴冲冲见面试官 没想到
  • Maven搭建私有仓库(私服)

    Nexus简介 作为一个非常优秀且我找不到合适的替代品的二进制包储存库 功能也是非常强大 不单纯只能设置Maven私有仓库 包括我们常见的Yum Docker npm NuGel等等 专业版需要付费 个人用免费版就可以 专业版更加强大 专业
  • Communications link failure官网解释

    官网给的解释 https dev mysql com doc connector j 8 0 en connector j usagenotes troubleshooting html qandaitem 15 1 8 15 8 What
  • Ubuntu下QT程序打包(直接拷贝动态库和可执行文件)

    系统为Ubuntu16 04LTS QT版本为5 12 9 QT默认为动态编译 生成的可执行文件需要有依赖库才能运行 因此在打包的时候需要把程序的依赖库一块打包 这样子做会导致打包的程序非常大 因为依赖库也都一块拷贝了 这种方法好处是快捷
  • TS的类型转换

    TS的类型转换 元组类型转联合类型 元组类型转联合类型2 联合类型转交叉类型 将这个方法拆成两部分来看 U extends any k U gt void never 是第一部分 extends k infer I gt void I ne
  • 数据库——数据库备份与恢复

    目录 原因 数据库的备份与恢复 1 使用MySQLdump命令备份 2 恢复数据库 表的导入和导出 1 表的导出 2 表的导入 原因 尽管采取了一些管理措施来保证数据库的安全 但是不确定的意外情况总是有可能造成数据的损失 例 如意外的停电
  • GooglePlay提审警告(com.google.android.gms:play-services-safetynet:17.0.0)

    1 Goole在今年6月份出的新政策 不在使用safetynet 而使用Play Integrity API 2 项目本身没有使用过safetynet 3 使用了firebase 查阅资料 解决方案如下 implementation pla
  • [python]bokeh学习总结——QuickStart

    bokeh是python中一款基于网页的画图工具库 画出的图像以html格式保存 一个简单的例子 from bokeh plotting import figure output file show output file patch ht