Skip to content

tech.

How to Create programs, Fix, Find and Configure them

  • Tips&Tricks
  • How to fix
  • For Beginners
  • English
    • Español
    • Deutsch
    • Français
    • 简体中文

Tag: Python

Tips&Tricks

Python 3 performance profiling – easiest way

Gosh On June 15, 2019June 15, 2019
Python 3 performance profiling – easiest way

Just add cProfile module to the running command: python3 -m cProfile test.py For example: $ python3 -m cProfile test.py 14 function calls in 0.000 seconds Ordered by: standard name ncalls tottime percall cumtime percall filename:lineno(function) 1 0.000 0.000 0.000 0.000 test.py:1() 10 0.000 0.000 0.000 0.000 test.py:1(func) 1 0.000 0.000 0.000 0.000 test.py:4() 1 0.000 0.000 0.000Continue Reading


Tips&Tricks

What’s new in Python 3.8: the Walrus Operator

Gosh On June 15, 2019June 15, 2019
What’s new in Python 3.8: the Walrus Operator

The new operator will be available in the new version of Python. It’s called “walrus operator” because it’s like someone cosplayed a walrus: “:=”. This is similar to the normal ” =” assignment, but returns the value of the statement. So this is a C-like assignment. For eaxmple, we can use it for a one-lineContinue Reading


Recent Posts

  • How to use/add a self-signed certificate to Mac OS
  • How to delete all Docker images and containers
  • How to change permissions for file / directory recursively in Linux
  • How to install non-free video / audio codecs in Ubuntu
  • Python 3 performance profiling – easiest way

Archives

  • February 2020
  • June 2019
  • January 2019

Categories

  • For Beginners
  • How to fix
  • Tips&Tricks