Celery framework learning notes

Producer consumer mode In the actual software development process, we often encounter the following scenarios: one module is responsible for generating data, which is handled by another module (here the module is generalized, can be classes, functions, threads, processes, etc.). The module that produces data is known as the producer in an image; and the module that processes the data.Chunks are called consumers. The only way to abstract producers and consumers is not enough to be a producer consumer model. The model also needs a buffer between producers and consumers as an intermediary. The p...

Linux lists the top 10 of memory /cpu usage.

MemoryThe first 10 lines of usage # ps aux | head -1;ps aux | grep -v PID | sort -rn -k +4 | head CPUThe first 10 lines of usage # ps aux | head -1;ps aux | grep -v PID | sort -rn -k +3 | head ps aux | head -1 The name of a field is displayed first. grep -v PID Remove field names sort -rn -k +4Sorting according to fourth columns head Acquiescence the first 10 rows.  

Low pass filtering

Low-pass filter is a kind of filtering method, the rule is that the low-frequency signal can pass through normally, and the high-frequency signal beyond the set threshold is blocked and weakened. But the amplitude of blocking and weakening will vary according to different frequencies and different filtering programs (purposes).It is sometimes called high-cut filter or treble-cut filter. Low pass filtering is the opposite of high pass filtering.   Chinese name Low pass filtering Foreign language name low pass filtering Opposite side High pass filtration Class type A filtering method ...

High frequency filter circuit

In the circuit, a large capacity electrolytic UNL2003ADR capacitance Cl is connected in parallel with a small capacitance C2. Cl is a large capacity filter capacitor of lOOOyF, C2 is a small capacitor of only O. OlyF, which is a high frequency filter capacitor for filtering high frequency components.This large and small capacitance parallel circuit is very common in the power supply circuit. Editor’s summary Catalog 1circuit analysis 2fault analysis   circuit analysis/High frequency filter circuit editing high frequency filter circuitAtlas [1] (1)The power circuit recti...

Pop-up window Session is lost and duplicated submission form is prevented.

First, pop-up window Session lost. Popup window Session lostUsing window.showModalDialog to prompt information is quite convenient and easy to control appearance and layout. But there is a serious problem, that is, Session is missing. When showModalDialog is performed on the A page, the ejected moduleWhen the state window opens a new page or new dialog (), it gets no Session in the A page, which severely limits its scope of use.Further use of the mode window shows that the loss of session always follows the refresh of the page.1.All page sessions in the process are lost when a mode window pop...

Redis source code reading – link establishment

In production environments where concurrent requests are high, a single Redis cannot meet performance requirements, and usually a Redis cluster is configured to improve service performance. Redis supported cluster mode after 3.   RedisThe officially provided cluster functionality is centralized, and command requests can be sent to any Redis node. If the key of the request is not handled by that node, it is returned to the client MOVED error, prompting the client to switch to the corresponding processing node for that key. Support cluster modeThe redis client will turn automatically, while...

BZOJ1835 [ZJOI2010] base station location [dynamic programming] [line tree]

Title Analysis: First, consider a DP equation, Let f [m] [n] denote that M base stations are currently selected in the first n villages, and the M base station is placed at the minimum value of n. Transfer can enumerate the last base station village, and then calculate the cost between the two villages. If you think about the cost of a village between two base stations, you’ll find that for a village, it has to pay if and only if the previous base station can’t control it, and the next base station can’t control it, so you can calculate the base station interval that makes i...