args and **kwargs in Python

http://book.pythontips.com/en/latest/args_and_kwargs.html https://stackoverflow.com/questions/3394835/use-of-args-and-kwargs Many new Python users will be confused about the source code of github and python standard library as well as various * args and **kwargs in the online examples. Here's an explanation. First of all: *Args and * * kwar ...

Added by sobbayi on Wed, 23 Oct 2019 05:42:04 +0300

python basic knowledge test -- 01 string

python basic knowledge test In the process of using python, many basic knowledge does not need to be gradually unfamiliar. In order to enhance the familiarity, we do corresponding tests for each basic knowledge point of python, and constantly summarize and review.Knowledge points: Character string lis ...

Added by shu on Tue, 22 Oct 2019 22:34:19 +0300

Comparison and Reflection on the solutions to the silly questions of python

1. topic: The bonus paid by the enterprise is based on the profit commission. If the profit (I) is less than or equal to 100000 yuan, the bonus can be increased by 10%. If the profit is higher than RMB 100000 and lower than RMB 200000, the part lower than RMB 100000 will be charged at 10%, and the part higher than RMB 100000 will be charged a ...

Added by Gump on Tue, 22 Oct 2019 20:16:04 +0300

Implementation of automatic comment on csdn blog post

text Let's use java code to crawl the csdn blog site, and then automatically comment. This wave of operation can be said to be quite coquettish. Let's go to the code. The first step is the login code, which is a large part of the Internet. The code uses the JSP dependency package to parse html to get the corresponding elements, which is equival ...

Added by betman_kizo on Mon, 21 Oct 2019 12:11:57 +0300

Class decorator

In python, everything is an object, function and class are an object, so decorators can be applied to functions, and they should also be applied to classes. #Function decorator example def deco(func): print("====,Decorator operation") return func @deco # Foo = deco(test) def test(): print ...

Added by techwiz on Sun, 20 Oct 2019 23:18:05 +0300

oracle releases table space to OS (resize)

1. View the objects in the tablespace SELECT OWNER AS OWNER, SEGMENT_NAME AS SEGMENT_NAME, SEGMENT_TYPE AS SEGMENT_TYPE, SUM (BYTES) / 1024 / 1024 AS SEGMENT_SIZE FROM DBA_SEGMENTS WHERE TABLESPACE_NAME = 'TBS' GROUP BY OWNER, SEGMENT_NAME, SEGMENT_TYPE; 2. move the ordinary ...

Added by FlashHeart on Sat, 19 Oct 2019 22:09:59 +0300

Homework of Baidu front end college on days 17 to 18 and 16

Finally learn JavaScript! Array related parameters Array shift deletes the first element, pop deletes the last element, and all returned elements are deleted. unshift adds an element at the beginning, push adds an element at the end, splice is used for deletion and modification, slice is used for slicing. *** Data type conversion The + operator ...

Added by delphi123 on Sat, 19 Oct 2019 00:30:31 +0300

LeetCode 234: Palindrome Linked List

​ Please judge whether a linked list is palindrome linked list. Given a singly linked list, determine if it is a palindrome. Example 1: Input: 1->2 Output: false Example 2: Input: 1 - > 2 - > 2 - > 1 Output: true Advance: Can you use O(n) time complexity and O(1) space complexity to solve this problem? Follow up: Could you do it ...

Added by stenk on Fri, 18 Oct 2019 00:21:35 +0300

Summary of crawler's latest library requests HTML Library

Requests html is a relatively new crawler library. The author and requests are the same author. I. installation dependency pip install requests-html When installing, we can see that lxml,reuqests,bs4 are installed... Our common parsing and crawling libraries are installed in him separately. II. Request initiation from requests_html import HTMLS ...

Added by kwilder on Thu, 17 Oct 2019 12:58:13 +0300

Django template Language-2: simple_tag and filter

Simple tab: Label: use {%%} tags in HTML Common system tags: load, for, if, with, csrf_token, verbatim, Block endblock \ extends \ comment endcomment \ cycle (silent) \ custom label     1,with: Assign values to variables in html {% with name=obj.group.name%}        #For long variable assignment {{name}}                           #Call IP dir ...

Added by hypertech on Wed, 16 Oct 2019 11:14:16 +0300