MCPcopy Create free account
hub / github.com/catboost/catboost / _sysctlbyname_uint

Function _sysctlbyname_uint

library/python/port_manager/__init__.py:266–278  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

264
265
266def _sysctlbyname_uint(name):
267 try:
268 from ctypes import CDLL, c_uint, byref
269 from ctypes.util import find_library
270 except ImportError:
271 return
272
273 libc = CDLL(find_library("c"))
274 size = c_uint(0)
275 res = c_uint(0)
276 libc.sysctlbyname(name, None, byref(size), None, 0)
277 libc.sysctlbyname(name, byref(res), byref(size), None, 0)
278 return res.value
279
280
281def _makedirs(path):

Callers 1

get_ephemeral_rangeFunction · 0.85

Calls 1

find_libraryFunction · 0.85

Tested by

no test coverage detected