python's job: shopping cart optimization

Read Me: following the implementation of the last simple shopping cart, it has been upgraded and optimized once again, and now it has the following functions: 1. There are customer operation and business operation, to realize that customers can buy things. When the amount is insufficient, press q to exit and print the shopping cart list 2. Busi ...

Posted by edking1 on Tue, 14 Apr 2020 09:46:08 -0700

Understand the difficulties of Python knowledge

1. The essence of ornament The decorator is essentially a closure function, which allows other functions to add additional functions without any code changes. The return value of the decorator is also a function. Closure function 1) It must be a nested function, that is, an inner function is defined in the outer function; 2) The inner functi ...

Posted by new7media on Tue, 14 Apr 2020 00:28:28 -0700

A good technical blog, let you understand Python closure quickly!

Closure of popular understanding Let's see what a closure is first A closure is a function that references a free variable. This referenced free variable will exist with this function, even if it has left the environment in which it was created. So, there is another way of saying that a closure is an entity composed of a function and its assoc ...

Posted by Rhysyngsun on Tue, 14 Apr 2020 00:11:43 -0700

Vue Learning Notes Component

Vue Learning Notes (3) Components component is the core function of Vue. <body> <div id="app"> <my-component :lists="lists"></my-component> </div> <div id="app1"> <my-component :lists="booksName"></my-component> </div> <script src="../vue.js" ...

Posted by WendyLady on Mon, 13 Apr 2020 10:26:09 -0700

Network data analysis of python learning

regular expression Actually, there are four main steps for reptiles: Clear goals (know where you are going to search or where you are going to search) Crawling (crawling all the contents of the website) Take out (get rid of the data that is useless to us) Process data (store and use as we want)Regular expressions, also known as regular expre ...

Posted by DasHaas on Mon, 13 Apr 2020 08:24:20 -0700

How to synchronize Git services

I haven't written a blog for a long time. Although I haven't written a few articles, I'm still active in the Internet industry... Needless to say, it's useless. Let's share how to synchronize Git services.Git service we usually use gitlab rake tool to do regular backup. When there is a problem, we can use backup recovery. Is there a need for a ...

Posted by oliverw92 on Mon, 13 Apr 2020 07:56:26 -0700

A python instance of adding log processing module

The log module is essential in a complete project. When encountering system error in work, it is also the first time to check the error log on the server (ps. even if you can't understand it, you will copy the error part as a bug attachment) Here is an example of using weather interface API to query weather. Let's talk about how to add log mod ...

Posted by carmasha on Mon, 13 Apr 2020 07:07:36 -0700

Crawling epidemic data and previewing with Markdown

Friday is not sleepy. I wrote a Python script with simple functions: get Sina's epidemic data about each country, write it into md file and preview it, get the data regularly, and generate new markdown content at the end of the file if there is new data. 1, Code Because the function and code are very simple, go directly to the code # -*-codin ...

Posted by vornn on Sat, 11 Apr 2020 07:45:44 -0700

Python read write modify exception

Article directory 1. Create write exception for the first time 2. Read excel internal data 3. Modify the existing exception 1. Create write exception for the first time from time import sleep import xlrd from xlutils.copy import copy import xlwt class OperateExcle: def __init__(self): ...

Posted by Aimless on Sat, 11 Apr 2020 07:29:42 -0700

Python solves the slider verification, and the Scarpy framework collects data to the redis database!

Catalog Architecture introduction Installation creation and startup Profile directory introduction Crawling data and parsing Data persistence Save to file Save to redis Action chain, verification code to control sliding   Architecture introduction Scrapy is an open-source and collaborative framework, which was originally designed for page ...

Posted by cigardude on Sat, 11 Apr 2020 00:36:08 -0700