port

Connect python app container, postgres container, and persistent database on external harddrive with docker compose

Connect python app container, postgres container, and persistent database on external harddrive with docker compose Question: Using docker-compose, I am running a postgres container (db). The data itself is persistently stored on my Windows machine. And this works. I am unable to get another container running a python application to access the database. My docker-compose …

Total answers: 2

Can you read from serial buffer without knowing baudrate?

Can you read from serial buffer without knowing baudrate? Question: I’m just wondering why it’s necessary to know the baud rate when reading serial data from the buffer with PySerial. Shouldn’t the byte data in the buffer be the same regardless of 9600 or 38400 baud rate, with the exception that the latter fills faster? …

Total answers: 1

I would like to check physical ports redunducy check with python

I would like to check physical ports redunducy check with python Question: would like to check physical network ports with python scripts ports information as following, Python scripts can check if ServerID has 2 or more physical network lines to differents network devices. ServerID,NetworkID,Port name Server_1,NW_1,ge-0/0/8 Server_2,NW_2,ge-0/0/5 Server_3,NW_3,Ethernet7/15 Server_4,NW4,ae4 Server_4,NW4,ge-2/2/0 Server_4,NW4,ge-2/2/1 Server_4,NW4,ge-2/2/2 Server_4,NW4,ge-2/3/0 Server_4,NW4,ge-2/3/1 Server_10,NW5,ae4 …

Total answers: 2

Control the power of a usb port in Python

Control the power of a usb port in Python Question: I was wondering if it could be possible to control the power of usb ports in Python, using vendor ids and product ids. It should be controlling powers instead of just enabling and disabling the ports. It would be appreciated if you could provide some …

Total answers: 2

How to get a free/open local port on Win10 / powerhsell for ssh forwarding

How to get a free/open local port on Win10 / powerhsell for ssh forwarding Question: I come from a Unix world and want to do ssh port forwarding ssh -L on a Windows 10 machine. I have a working solution with a python one-liner. Now I wanted to ask the Powershell-users how to elegantly do …

Total answers: 1

Error "Unable to open Jupyter Notebook: Port 8888 is already in use"

Error "Unable to open Jupyter Notebook: Port 8888 is already in use" Question: I am getting following error when I run Jupyter Notebook: (base) C:Usersramne>jupyter notebook [I 01:19:00.648 NotebookApp] The port 8888 is already in use, trying another port. And when I do netstat -ano | find Str “8888” , I get the following: C:Usersramne>netstat …

Total answers: 7

Making a Fast Port Scanner

Making a Fast Port Scanner Question: So I’m making a port scanner in python… import socket ip = “External IP” s = socket.socket(2, 1) #socket.AF_INET, socket.SOCK_STREAM def porttry(ip, port): try: s.connect((ip, port)) return True except: return None for port in range(0, 10000): value = porttry(ip, port) if value == None: print(“Port not opened on %d” …

Total answers: 10

Get Request Host Name Without Port in Flask

Get Request Host Name Without Port in Flask Question: I’ve just managed to get my app server hostname in Flask using request.host and request.url_root, but both field return the request hostname with its port. I want to use field/method that returns only the request hostname without having to do string replace, if any. Asked By: …

Total answers: 5

How do I get Flask to run on port 80?

How do I get Flask to run on port 80? Question: I have a Flask server running through port 5000, and it’s fine. I can access it at http://example.com:5000 But is it possible to simply access it at http://example.com? I’m assuming that means I have to change the port from 5000 to 80. But when …

Total answers: 15