Python

>>> type([]) is list
True
>>> type({}) is dict
True
>>> type('') is str
True
>>> type(0) is int
True
>>> type({})
<type 'dict'>
>>> type([])
<type 'list'>


---

Jména z DNS

>>> import socket
>>> socket.gethostbyaddr("192.168.74.183")
('desk2.home.doma.net', [], ['192.168.74.183'])

FluxDB


pip install influxdb

https://www.influxdata.com/blog/getting-started-python-influxdb/

pip

proto abychom věděli pro kterou verzi pythonu pip spouštíme použijeme tuto syntaxi
python3 -m pip install influxdb

Python2
pip install influxdb

from influxdb import InfluxDBClient

client = InfluxDBClient(host='docker', port=8086)

client.get_list_database()
[{u'name': u'_internal'}, {u'name': u'microcountWalli'}, {u'name': u'microcountWalli2'}]
>>> client.create_database('pyexample')
>>> client.get_list_database()
[{u'name': u'_internal'}, {u'name': u'microcountWalli'}, {u'name': u'microcountWalli2'}, {u'name': u'pyexample'}]

>>> client.switch_database('pyexample')

Na Mac pro VS Code
python3 -m pip install dnspython


Žádné komentáře:

Okomentovat

Server Side Rendering - Next

The Benefits of Server Side Rendering Over Client Side Rendering