Python
文章平均质量分 83
EverNoob
simply bumping around
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Trailing Comma “Feature“ in Python
【代码】Trailing Comma “Feature“ in Python。转载 2023-11-25 17:44:43 · 226 阅读 · 0 评论 -
C vs. Python Operator Precedence: Beware of (Bitwise) Logical Op.
comparison operators in python and C have different precedence compared to bitwise and logical operators, beware.转载 2022-10-13 10:16:12 · 326 阅读 · 0 评论 -
Python: Function Annotation and “inspect“ module
https://peps.python.org/pep-3107/This PEP introduces a syntax for adding arbitrary metadata annotations to Python functions [1].Because Python’s 2.x series lacks a standard way of annotating a function’s parameters and return values, a variety of tools and转载 2022-09-14 18:48:53 · 313 阅读 · 0 评论 -
“context“ in C and Python
if”)..转载 2022-09-14 14:52:05 · 241 阅读 · 0 评论 -
Python Multi-level Import with ‘.‘
【代码】Python Multi-level Import。转载 2022-09-14 13:54:36 · 263 阅读 · 0 评论 -
Python Multiprocessing
official documentation: multiprocessing — Process-based parallelism — Python 3.10.4 documentation breakdown of the API: Python multiprocessing - process-based parallelism in Python Multiprocessing vs. Threading in Python: What you need to know. What.原创 2022-04-25 18:29:53 · 1006 阅读 · 0 评论 -
TensorFlow .pb: Save and Display Models
What is the use of a *.pb file in TensorFlow and how does it work? - Stack Overflow Basics pbstands for protobuf. In TensorFlow, the protbuf file contains the graph definition as well as the weights of the model. Thus, apbfile is all you need to be a...原创 2022-03-25 10:55:49 · 2349 阅读 · 0 评论 -
Evaluating Object Detection Models Using Mean Average Precision (mAP)
ByAhmed Fawzy Gad To evaluate object detection models like R-CNN andYOLO, themean average precision (mAP)is used. The mAP compares the ground-truth bounding box to the detected box and returns a score. The higher the score, the more accurate the model...转载 2022-03-22 13:23:32 · 403 阅读 · 0 评论 -
Numpy and SIMD
Numpy is by its design a SIMD structure, which is best examplified by the list indexing feature: python - How to filter numpy array by list of indices? - Stack Overflow filter_indices = [1,3,5] np.array([11,13,155,22,0xff,32,56,88])[filter_indices]原创 2022-02-17 11:02:35 · 1673 阅读 · 0 评论 -
Python Single Line Multiple Assignment
Multiple assignment in Python: Assign multiple values or the same value to multiple variables | note.nkmk.meIn Python, use the = operator to assign values to variables.You can assign values to multiple variables on one line.This article describes the follo转载 2022-02-16 17:14:16 · 424 阅读 · 0 评论 -
Python Environment Variable Access
How to Set and Get Environment Variables in Python To set and get environment variables in Python you can just use theosmodule: import os # Set environment variables os.environ['API_USER'] = 'username' os.environ['API_PASSWORD'] = 'secret' # Get env..转载 2022-02-14 19:12:58 · 350 阅读 · 0 评论 -
Python: Numpy Byte Order
1. get native endianess python - How to get endianness of numpy dtype - Stack Overflow 2. numpy dtype byte order formatting: byteorder numpy.dtype.byteorder — NumPy v1.21 Manual 3. array byte ordering Byte-swapping — NumPy v1.21 Manual原创 2021-12-25 17:20:27 · 637 阅读 · 0 评论 -
Python Class
official doc: quick tutorial from:Python Classes and Objects - GeeksforGeeks Python Classes and Objects Difficulty Level :Easy Last Updated :10 Jun, 2021 A class is a user-defined blueprint or prototype from which objects are created. Classes provid...转载 2021-12-24 16:48:28 · 337 阅读 · 0 评论 -
Python Datatype Conversions
Bytes & Float Bytes to Float python - Convert Bytes to Floating Point Numbers? - Stack Overflow ==> struct Python struct pack, unpack - JournalDev official doc:struct — Interpret bytes as packed binary data — Python 3.7.12 documentation .原创 2021-12-15 11:31:41 · 847 阅读 · 0 评论 -
Python: pass by object-reference
from:Is Python pass-by-reference or pass-by-value? | Robert Heaton “Suppose I say to Fat, or Kevin says to Fat, “You did not experience God. You merely experienced something with the qualities and aspects and nature and powers and wisdom and goodness o..转载 2021-11-27 11:31:28 · 536 阅读 · 0 评论 -
Python: Console Arguments
Parse Input Arguments Python - Command Line Arguments $ python test.py arg1 arg2 arg3 ==> use sys module ==> sys.argv give all input arguments in a list Parse Input Options argparse — Parser for command-line options, arguments and sub-comman原创 2021-11-26 15:49:18 · 525 阅读 · 0 评论 -
Python: Local and Public Packages
Official tutorial for making a publicly available package:Packaging Python Projects — Python Packaging User Guide Methods to import local python file/module/packages (for difference between module and package, see What's the difference between a Python ..转载 2021-11-26 11:30:15 · 184 阅读 · 0 评论 -
TOML and Python
TOML official site:TOML: Tom's Obvious Minimal Language official site for language packages:Home · toml-lang/toml Wiki · GitHub Intro.:https://en.wikipedia.org/wiki/TOML TOMLis afile formatforconfiguration files. It is intended to be easy to r...原创 2021-11-25 18:30:04 · 940 阅读 · 0 评论 -
Numpy Array References
1. Basic Operations 1.4.2. Numerical operations on arrays — Scipy lecture notes 2. Manipulation Array manipulation routines — NumPy v1.21 Manual原创 2021-11-05 17:24:13 · 148 阅读 · 0 评论 -
Python Long String
from:formatting - How can I break up this long line in Python? - Stack Overflow How would you go about formatting a long line such as this? I'd like to get it to no more than 80 characters wide: logger.info("Skipping {0} because its thumbnail was alrea.转载 2021-11-04 21:47:37 · 201 阅读 · 0 评论 -
Python File I/O
1. regular open() read(), write(), readlline() close() Python File I/O: Read and Write Files in Python==> primary ref. Python - Files I/O 7. Input and Output — Python 3.10.0 documentation(7.2) ==> definitive ref. 2. Json load() dump() ...原创 2021-10-28 18:41:29 · 177 阅读 · 0 评论 -
Python Tutorial Overview
Learn Python - Free Interactive Python Tutorialfast overview Python Tutorialmore detailed Python - Files I/Ofile i/o JSON formatJSON python official documentationjson — JSON encoder and decoder — Python 3.10.0 documentation tutorial shortPytho...原创 2021-10-18 10:23:46 · 175 阅读 · 0 评论 -
Python Learning Notes: Basics I, Intro
unless specified otherwise, all materials are from the tutorial provided by w3school:PythonTutorial 目录 Syntax Indentation Comment Variable Assigning Values Example mul to mul Example one to mul Unpack a Collection Example Output Variables Ex...原创 2021-08-14 19:50:04 · 294 阅读 · 0 评论 -
Python与C/C++相互调用(转+注)
一、问题 Python模块和C/C++的动态库间相互调用在实际的应用中会有所涉及,在此作一总结。 二、Python调用C/C++ 1、Python调用C动态链接库 Python调用C库比较简单,不经过任何封装打包成so,再使用python的ctypes调用即可。 (1)C语言文件:pycall.c /***gcc -o libpycall.so -shared -fPIC pycall.c*/ #include <stdio.h> ...转载 2021-06-16 10:06:00 · 751 阅读 · 0 评论
分享