小编Chi*_*Das的帖子

如何在python中突出显示时间序列线图的周末

我正在尝试对共享单车数据集进行分析。部分分析包括以日期图显示周末的需求。我在熊猫中最后 5 行的数据框看起来像这样。

在此处输入图片说明

这是我的日期与总骑行图的代码。

import seaborn as sns 
sns.set_style("darkgrid")
plt.plot(d17_day_count)
plt.show()
Run Code Online (Sandbox Code Playgroud)

在此处输入图片说明

. 我想在情节中突出周末。这样它就可以看起来类似于这个情节。 在此处输入图片说明

我正在使用带有 matplotlib 和 seaborn 库的 Python。

python visualization matplotlib timeserieschart

5
推荐指数
2
解决办法
4550
查看次数

数字签名验证在Python中使用SHA256withRSA失败

我正在尝试使用给定的证书文件验证离线aadhaar KYC验证应用程序的数字签名.

该指令在验证文档中给出.

  1. 读取整个XML并从中分离s ="xxxx"标记.

  2. 使用基于"SHA256withRSA"的散列和加密技术的签名验证算法

  3. 存在于"s"标签中的签名值,剩余的XML(没有"s"标签)和UIDAI公钥(此处可用)将被馈送到算法以验证数字签名.

组织提供的示例C#代码段.(PS:哪个也行不通)

using System;
using System.Security.Cryptography.X509Certificates;
using System.Xml;

namespace test
{
class MainClass
{
    public static void Main(string[] args)
    {
        // link -> https://drive.google.com/file/d/1aSv3HJUFf5_42Z-FqpdVHEk5b3VA3T3D/view


        string XMLFilePath = "offlineaadhaar.xml"; //Get the XML file

// link -> https://drive.google.com/file/d/1FW4ciIhZqJuelOcGF2x6VaBCSDO9J-gM/view


string KeyFilePath = "okyc-publickey.cer"; //Get the public key certificate file

        XmlDocument ObjXmlDocument = new XmlDocument();
        ObjXmlDocument.Load(XMLFilePath); //Load the XML
        XmlAttributeCollection SignatureElement = ObjXmlDocument.DocumentElement.Attributes; //Get the all XML attribute
        string SignatureValue = SignatureElement.GetNamedItem("s").InnerXml; // Get Signature value

        SignatureElement.RemoveNamedItem("s");//Remove …
Run Code Online (Sandbox Code Playgroud)

encryption rsa public-key

3
推荐指数
1
解决办法
634
查看次数