pyinstaller packages the GUI program written by PySide2 and calls ffmpeg to hide the CMD console solution

1 Problem Description Write a GUI program using PySide2, call ffmpeg command line tool, do simple batch video processing (adjust frame width, frame height, video speed, reduce video bitrate to limit video size), use ffmpeg, ffmpeg-python library; It was easy, but I had a problem: When pyinstaller packages: Without -w or--noconsole, there are ...

Added by Sephiriz on Sun, 05 Jan 2020 22:37:36 +0200

Download songs on cool dog music

After testing, you can download the songs you want to pay to download   Preparation: Python 3.5 + pycharm Libraries used: requests, re, json   Steps: Open the official website of cool dog music, enter the songs you want to search (such as "Tian Tian"), and then press enter to search to get the following page:   Right click to check o ...

Added by ultrus on Sun, 05 Jan 2020 01:21:51 +0200

PyCharm permanent solution

1. Download the crack patch; https://pan.baidu.com/s/1LcXvupL00XTU-HHE1J6ynA Extraction code: 8t1w Download the patch file jetbrains-agent.jar and place it in the \ bin directory of pycharm installation directory ​   2. Click trial first; After entering PyCharm software interface, click "Evaluate for free" in the activation window; ...

Added by noelswanson on Sat, 28 Dec 2019 23:30:02 +0200

Tensorflow multithreaded input data processing framework -- queues and multithreading

Reference books TensorFlow: a practical Google deep learning framework (version 2) For queues, the operations to modify the queue status are Enqueue, EnqueueMany, and Dequeue. The following program shows how to use these functions to operate a queue. #!/usr/bin/env python # -*- coding: UTF-8 -*- # coding=utf-8 """ @author: Li Tian @contact ...

Added by john_nyc on Thu, 05 Dec 2019 07:04:18 +0200

QT program start animation

Sketch Many of the software we use everyday has startup animation, for example, Visual Studio and PyCharm have a process of loading various components before opening the software. Their startup animation tells you that the program is opening and loading components, rather than letting you think the program is not started. ...

Added by Pha on Sun, 01 Dec 2019 01:32:16 +0200

Supplement and iterator of decorator

I. login authentication function user_info = { 'user': None } #Login function authentication def login(): username = input('Please enter the account name:').strip() password = input('Please input a password:').strip() with open(r'a.txt', 'r', encoding='utf-8')as f: for line in f: f.readline() name ...

Added by pratheshshah on Wed, 13 Nov 2019 13:40:47 +0200

Using python to realize long screenshots of elements

I. objectives When browsing a web page, you can capture which element you see as a picture, no matter how long it is   II. Tools used and third party libraries python ,PIL,selenium pycharm III. code part Overall idea of long screenshot: 1. Get element 2. Move, screenshot, move, screenshot to the bottom of the element 3. Cut the screenshot acco ...

Added by curtis_b on Wed, 13 Nov 2019 11:54:06 +0200

Take you to finish the novel sword in Python in 5 minutes (complete code attached)

Train of thought: step 1: request Sword come. Novel site, get two things Novel name -- create a folder with novel name under the same directory of Python program Link address for each chapter of the novel step 1 corresponds to the get uurl() function in the code, which also includes the multithreaded code used to speed up ...

Added by loquaci on Mon, 28 Oct 2019 22:50:49 +0200

After summarizing 11 items, my understanding of Python decorators

As you know, @ symbol is the syntax sugar of decorator, and the function behind @ symbol is the protagonist of our article: decorator. The decorator is placed at the beginning of a function definition, and it's like a hat on the function's head. Bind to this function. When we call this function, the first thing is not to execute this function, ...

Added by noppie on Fri, 25 Oct 2019 16:51:17 +0300

- Function-function II

01. - Function - Return Value (1). Find the sum of any number You can specify the return value of a function by returning def fn(*nums): # Define a variable to hold the result result = 0 # Traversing through tuples and accumulating elements in tuples for n in nums: result ...

Added by Snorkel on Tue, 30 Jul 2019 12:24:17 +0300