• Tornado-02, write the first tornado program


    1. Introduction to Tornado tornado is a powerful, extensible web server written in Python. It is robust enough to handle severe web traffic yet lightweight enough to create and write to be used in a wide variety of applications and tools. The installation of tornado is also very simple, just use pip to install it […]

  • 2016Django uses memcached as a cache


    With memcached as a cache, the speed of django is like flying Install sudo apt-get install memcached pip install python-memcached sudo apt-get install python-dev sudo apt-get install libmemcached-dev pip install pylibmc configuration CACHES = { ‘default’: { ‘BACKEND’: ‘django_pylibmc.memcached.PyLibMCCache’, ‘LOCATION’: ‘localhost:11211’, ‘TIMEOUT’: 500, ‘BINARY’: True, ‘OPTIONS’: { # Maps to pylibmc “behaviors” ‘tcp_nodelay’: True, ‘ketama’: […]

  • Some good python IDEs


    1. IDLE When it comes to python ide, I must think of idle first, it is easy and labor-saving, and python comes with it. There is also a stuff called IDLEX, which can be understood as an enhanced version of IDLE, website:http://idlex.sourceforge.net/extensions.html There are also many tutorials on the Internet, so I won’t say more […]

  • Classes and Objects in Python


    Almost all modern programming languages ​​support object-oriented programming, and object-oriented programming is one of the most effective ways to write software. You can use classes and objects to represent any thing and behavior in reality. When you write a class, you define characteristics and behaviors that are common to a class of things. Then create […]

  • fastposter v2.10.0 simple and easy-to-use poster generator


    The fastposter poster generator is a tool for quickly developing posters. Just upload a background image and put the components in the corresponding position (letter、picture、two dimensional、avatar) to generate a poster. clickthe codeDirectly generate calling codes in various languages ​​to facilitate rapid development. Has served many e-commerce projects, many projects have52W+Users, through the test of many […]

  • python operation docker kafka


    this machineIPYes10.30.6.24, the following configuration process needs to be based on your ownIPInformation configuration modification kafkause by default127.0.0.1access configurationcompose.yamlThe file is as follows services: zookeeper: image: zookeeper container_name: demo-zookeeper ports: – “2181:2181” restart: always kafka: image: wurstmeister/kafka container_name: demo-kafka ports: – “9092:9092” ulimits: nofile: soft: 262144 hard: 262144 environment: DOCKER_API_VERSION: 1.41 KAFKA_ADVERTISED_LISTENERS: “PLAINTEXT://” KAFKA_LISTENERS: “PLAINTEXT://” […]

  • Sixteen common error sets in Python, do you know those?


    Various errors will occur when using python. The following are common errors and solutions in Python. 1.ValueError: ‘Conv2d_1a_3×3’ is not a valid scope name This is a problem I just encountered. When LZ typed Inception net by himself, he made an error when trying to assign a name. In fact, this is the problem of […]

  • Input and output of Tornado-03, Tornado


    Input and output of Tornado 1. Input function Create a new folder lesson2 under the tornado folderCreate a new start1.py under lesson2 and write the following code import tornado.httpserver import tornado.ioloop import tornado.options import tornado.web from tornado.options import define, options define(‘port’, default=9000, help=’run port’, type=int) class TestIndexHandler(tornado.web.RequestHandler): def get(self): abc = self.get_argument(‘abc’, ‘no’) self.write(‘hello ‘ […]

  • Recommend 5 Best Intranet Penetration Tools


    During the development process of the official account, the online code is frequently modified, and the development process is relatively cumbersome. At the same time, any mistakes will affect other normal online businesses. Therefore, building a local environment for WeChat official account development can achieve the goal of not affecting online business Debug code. Here […]

  • Go String parsing


    1. String structure definition // src/runtime/string.go:stringStruct type stringStruct struct { str unsafe.Pointer len int } StringType is actually a “descriptor” in the Go language memory model, represented by a 2-byte data structure, which does not actually store string data itself, but only consists of a pointer to the underlying storage and the length of the […]

  • Django gets the current day’s 23:59:59 timestamp


    Yesterday, I used the timestamp of 23:59:59 of the day. I searched a lot on the Internet, and basically 80% of them were pasted and copied. Not only can I not read it, but I can’t use it.Honestly, it’s just rubbish!Waste of time, I really don’t know such a rotten website (a rotten website starting […]

  • Tornado-04, Tornado output and response headers


    Tornado output and response headers 1. Output in the previous article03. Input and output of TornadoHave a preliminary understanding of writeIn this article, let’s take a deeper look at writeFirst, we create a new lesson3 folder under the last tornado folderIn fact, write does not directly return the data to the front end, but writes […]