FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
feast/sdk/python/tests/utils/http_server.py at apply-progress · feast-dev/feast · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
feast-dev
/
feast
Public
Notifications
You must be signed in to change notification settings
Fork
1.4k
Star
7.2k
Code
Issues
218
Pull requests
190
Discussions
Actions
Security and quality
1
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
feast
/
sdk
/
python
/
tests
/
utils
/
http_server.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
13 lines (9 loc) · 375 Bytes
Breadcrumbs
feast
/
sdk
/
python
/
tests
/
utils
/
http_server.py
Copy path
File metadata and controls
13 lines (9 loc) · 375 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
import
socket
from
contextlib
import
closing
def
free_port
():
with
closing
(
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
))
as
sock
:
sock
.
bind
((
""
,
0
))
return
sock
.
getsockname
()[
1
]
def
check_port_open
(
host
,
port
)
->
bool
:
with
closing
(
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
))
as
sock
:
return
sock
.
connect_ex
((
host
,
port
))
==
0
Back
|
FazBrowse Home
|
New Git URL