Giter Site home page Giter Site logo

pyjie-internet's Introduction

Surveyed Topic

socket & keep-alive

  • What is Socket? Link
  • What does Web Socket works? Link
  • The difference between socket and Keep-Alive?
  • TCP / IP Link

Http Request Congestion

  • What is http request congestion?

    Network congestion in data networking and queueing theory is the reduced quality of service that occurs when a network node or link is carrying more data than it can handle. Typical effects include queueing delay, packet loss or the blocking of new connections. A consequence of congestion is that an incremental increase in offered load leads either only to a small increase or even a decrease in network throughput.

  • The solution of HTTP request congestion? LInk

worker (gunicorn)

  • The variations of performance between the numbers of workers. Link1Link2
  • Implementation

Post Form

  • A simple demo of transmit data via POST. Link1Link2

gil x 線程安全 x 原子操作

  • 什麼是線程安全? 怎樣不安全? link

  • 什麼是原子操作? link

  • 為什麼會有GIL? Link1Link2

  • Python 的 GIL 能保證執行緒安全嗎?LInk

  • Python GIL 對執行緒併發性能的影響?

  • Python GIL適用的時機? 有gil和沒有gil的差別? Link

gevent檔案操作 x IO阻塞 x 判斷切換 x gevent.sleep()

  • In what condition makes I/O congestion? Link

  • What is the relationship between gevent and GIL? Link

  • Pros and Cons Link

  • Python中gevent.sleep()和time.sleep()之間的區別➡️ 連結

  • gevent協程切換➡️ 連結

  • 對文件讀寫的gevent實作 Link1

Implementation

This is an Simple Python Application demonstrates how to use send and receive the POST request.

Usage

Please install pipenv at first, and install the packages mentioned in requirements.txt

$ pip install pipenv
$ python -m pipenv install -r requirements.txt

What if python could find pip

$ pip install pipenv                                                                  1 ↵
zsh: command not found: pip

Or execute the following command if Pipfile exist

$ python -m pipenv install --dev

Execute the following script to kickoff a new process.

$ python -m pipenv run python main.py

Use shell in virtual environment, and you are in the virtual environment. You don't need to add prefix python -m pipenv run anymore.

$ python -m pipenv shell
C:\path\to\your\project (main -> origin)
(yourenv-name-saqu7Akm) $

Python2

In my macbook. I install pipenv beforehand

brew install pipenv

After install the pipenv, your python version is also python2

$ python --version                                                                 
Python 2.7.16

Run your python

$ pipenv install -r requirements.txt 
$ pipenv shell                                                                 
Launching subshell in virtual environment...
 . /Users/chenhanting/.local/share/virtualenvs/pyjie-internet-k9c1cwxU/bin/activate

Production

You can distribute an exe file via pyinstaller

$ python -m pipenv run pyinstaller main.py 

or you can distribute the file via your .spec file

$ python -m pipenv run pyinstaller --clean .\selenium-automation.spec 

Prerequisite

  • You should have python-3.10 in your project.
  • This project is windows friendly environment. I'm not sure whether Chromedrive can work fine in MacOS system.
  • Chromedriver is included in this project. The version of chromedriver is Chrome version 102. If there is a flashback problem, you need to check your chrome version, and install a correct version of chromedriver.exe in /driver.

pyjie-internet's People

Contributors

chenhanting-ibuypower avatar

Watchers

 avatar

Forkers

chenhanting

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.