Python automated office

1. Basic operation Get the current py file name import os file = 'test.py' fname = os.path.basename(file) print(fname) #Through the basename() method, we can remove the path and get only the file name #If the path fails to recognize the error (the problem of escape), add r before the path. (file = r'C:\Users\15205\PycharmProjects\pachon ...

Added by djg_uk on Wed, 26 Jan 2022 05:57:12 +0200

week10_task_ Joint search set diagram

10, Joint search set source Geek time 2021 algorithm training camp Author: Li Yudong 1. Merge query set Join query set is a tree data structure, which is used to deal with the merging and query of some disjoint sets. The idea of parallel search set is to use an array to represent the whole forest (parent). The root node of t ...

Added by big_al on Wed, 26 Jan 2022 03:42:41 +0200

GNN-4-dataset class and practice of node prediction and edge prediction tasks

Reference open source learning address: datawhale 1. Introduction to inmemorydataset base class In PyG, we inherit InMemoryDataset Class to customize a dataset class that can store all data in memory. class InMemoryDataset(root: Optional[str] = None, transform: Optional[Callable] = None, pre_transform: Optional[Callable] = None, pre_filter: ...

Added by djcritch on Wed, 26 Jan 2022 03:33:19 +0200

python - piecemeal learning - flash - Introduction to making web pages 1

1. Introduction to flash Flash can be used for web development Install as pip install flask 2. Brief description of flash 1. Print helloworld on the page app=Flask is in fixed mode @app. The route ('/') decorator generates the main web page and executes the following functions of the decorator app.run() runs and starts the service fr ...

Added by kdoggy on Wed, 26 Jan 2022 02:16:17 +0200

Sample code for Python manipulating Excel workbooks (.xlsx)

Preface As a popular personal computer data processing software, Excel is mixed up in all fields, and is often processed by programmers here. It can handle Python of Excel format files. There are many libraries, such as xlrd, xlwt, xlutils, openpyxl, xlwings, and so on, but each library handles Excel Different ways, some libraries have limitat ...

Added by telvitajoel on Wed, 26 Jan 2022 01:25:16 +0200

Python + Baidu map API + semi positive vector formula = map visualization

Recently, the author learned some common sense related to "driving" and found that if the driver's driver's license expires, he must submit physical examination information before applying for license renewal, which requires the driver to go to a nearby hospital for physical examination. Considering that not all hospitals support dri ...

Added by andreasb on Tue, 25 Jan 2022 20:11:57 +0200

Python learning notes - advanced features

section Taking some elements of a list or tuple is a very common operation >>> L = ['Michael', 'Sarah', 'Tracy', 'Bob', 'Jack'] ['Michael', 'Sarah', 'Tracy'] L[0:3] indicates that it starts from index 0 to index 3, but does not include index 3. That is, the indexes 0, 1 and 2 are exactly three elements. Do not write anything, ju ...

Added by AngelicS on Tue, 25 Jan 2022 20:08:37 +0200

python student management system

In the student information management system, firstly, the administrator will add, delete, modify, search and import teacher information, and then the teacher interface will log in to different teacher categories. The counselor teacher is responsible for adding, deleting and searching the relevant information of students, the educational adm ...

Added by vdubdriver on Tue, 25 Jan 2022 20:02:21 +0200

The third part of self driving car using Carla and Python -- reinforcement learning environment

Welcome to use the Python programming tutorial to learn the third parts of Carla automatic driving / self driving car. In this tutorial, we will use our knowledge of the Carla API and try to turn this problem into a reinforcement learning problem. After OpenAI took the lead in developing the open source of reinforcement learning environment an ...

Added by vcv on Tue, 25 Jan 2022 19:46:51 +0200

Rendering IPsec configuration with python

preface IPsec has many configuration dependencies. If you don't pay attention to it, it is easy to make a configuration error. As long as the configuration error is wrong, it is easy to cause IPsec to fail; So I hope to use some means to simplify these complex configurations; So I use python language, which is not difficult to learn but ...

Added by ShaileshD on Tue, 25 Jan 2022 18:07:55 +0200