Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Alpha-VLLM/LLaMA2-Accessory
/ find_free_port
Function
find_free_port
Large-DiT-ImageNet/sample.py:116–121 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
114
115
116
def
find_free_port() -> int:
117
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
118
sock.bind((
""
, 0))
119
port = sock.getsockname()[1]
120
sock.close()
121
return
port
122
123
124
if
__name__ ==
"__main__"
:
Callers
1
sample.py
File · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected