Category:Python

  • Sequence cipher and block cipher

    Time:2021-1-21

    Sequence cipher The sequence cipher encrypts each bit individually. It is realized by adding each bit in the key sequence to each plaintext bit. The key sequence of synchronous sequence cipher only depends on the key, while the key sequence of asynchronous sequence cipher depends on the key and ciphertext. Most of the sequence ciphers […]

  • 5. Transform and process time series data

    Time:2021-1-21

    Take this as an example Function table Class name explain Timestamp Basic data class, representing the time point. Period Single time span, e.g. 1 day / 1 month Timedelta The time of different units is 1D, 1H, 1mm, etc., not specific time period Datetimelndex The index composed of timestamp can be used as the index […]

  • Detailed explanation of Python using py2neo operation diagram database neo4j

    Time:2021-1-21

    This article describes the method of Python using py2neo operation diagram database neo4j. The details are as follows: 1. Concept Graph: a graph in a data structure consists of nodes and edges between them. A node represents an entity, and an edge represents the relationship between entities. Graph database: a database that stores management data […]

  • How to write multiplication sign, identity sign and curly bracket in latex

    Time:2021-1-20

    multiplication sign The use of multiply sign in latex\timesAs shown in the figure below: a\times b ###The use of identity in latex\equivAs shown in the figure below: a\equiv b Curly bracket In latex, curly brackets are used\left\{\right\}As shown in the figure below: \left\{b\right\} Mathematical symbols This work adoptsCC agreementReprint must indicate the author and the […]

  • Getting started with Python data analysis

    Time:2021-1-20

    1、 Environmental preparation Anaconda Download https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/ All operations are in jupyter notebook 2、 Numpy learning 1. Recognize numpy’s array 2. Master numpy array 3. Learn the matrix of numyp 3、 Pandas learning 1. Panda reading and writing Pandas provides a variety of IO operations 1. MySQL reading and writing 2. Panda common read 2. Panda […]

  • Several operation code examples of join() function in Python

    Time:2021-1-20

    This article mainly introduces a variety of Python join() function operation code examples, the article through the example code is very detailed, for everyone’s study or work has a certain reference learning value, need friends can refer to There are. Join() and. Join() in Python os.path.join () two functions, the specific functions are as follows: […]

  • Affine cipher

    Time:2021-1-19

    Affine cipher The idea of affine cryptography is to multiply the plaintext by a part of the key, and then add the rest of the key. Suppose x, y, a, B, Z_ {26}\\ Decryption can be easily derived from encryption functions a·x+b\equiv y\ mod\ 26\\ a·x\equiv (y-b)\ mod \ 26\\ x\equiv a^{-1}·(y-b)\ mod\ 26 The […]

  • Python string splicing

    Time:2021-1-19

    Splicing (connecting) strings in Python is very simple. You can directly write two strings close together. The specific format is as follows: strname = “str1” “str2” Strname represents the string variable name after splicing, and STR1 and STR2 are the string contents to be spliced. With this approach, python will automatically splice two strings together. […]

  • Manual installation of Python 3.6 operation process detailed explanation

    Time:2021-1-19

    To install python3.6 manually, you only need to add its PPA source to the apt warehouse list, but it is a commonly used source recently ppa:jonathonf/python-3.6 All of a sudden, 403 refused to visit, and worked hard to find another available source Here is a direct introduction to the installation steps. Just copy them in […]

  • Shift Cipher

    Time:2021-1-18

    Shift Cipher The Shift Cipher itself is very simple, that is, each letter in plaintext moves a fixed length position in the alphabet. Suppose x, y, K, Z_ If {26}, then\\ From the previous discussion on replacement ciphers, it is not difficult to come to the conclusion that shift ciphers are not secure at all. […]

  • How to filter string list in Python

    Time:2021-1-18

    Python uses the list data type to store multiple data in a sequential index. It works like arrays of numbers in other programming languages. The filter () method is a very useful method in Python. You can use the filter () method to filter one or more values from any string, list, or dictionary in […]

  • Example of retaining 16 bit encoding format when reading TIF image by Python

    Time:2021-1-18

    The encoding format of TIF image is generally 16bit. When using Python OpenCV to read TIF file, in order to keep its encoding format, we need to use the following methods: import numpy as np import cv2 img = cv2.imread(‘demo.tif’, -1) print(img.dtype) The output result is: uint16 For the imread function in opencv, the final […]