mirror of
https://github.com/m-lamonaca/dev-notes.git
synced 2025-06-09 03:07:13 +00:00
show line numbers in conde snippets
This commit is contained in:
parent
cd1df0e376
commit
255a68d673
82 changed files with 1249 additions and 1251 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
## Time
|
||||
|
||||
```py
|
||||
```py linenums="1"
|
||||
# epoch: elapsed time in seconds (in UNIX starts from 01-010-1970)
|
||||
import time # UNIX time
|
||||
variable = time.time () # returns the time (in seconds) elapsed since 01-01-1970
|
||||
|
@ -42,7 +42,7 @@ var = time.perf_counter () # returns the current running time
|
|||
|
||||
## Datetime
|
||||
|
||||
```py
|
||||
```py linenums="1"
|
||||
import datetime
|
||||
today = datetime.date.today () # returns current date
|
||||
today = datetime.datetime.today () # returns the current date and time
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue