def get_machid():
"""Get (mostly) unique machine ID
Returns
-------
ids : array (length 2, int32)
The machine identifier used in MNE.
"""
mac = b('%012x' % uuid.getnode()) # byte conversion for Py3
mac = re.findall(b'..', mac) # split string
mac += [b'00', b'00'] # add two more fields
# Convert to integer in reverse-order (for some reason)
from codecs import encode
mac = b''.join([encode(h, 'hex_codec') for h in mac[::-1]])
ids = np.flipud(np.fromstring(mac, np.int32, count=2))
return ids
write.py 文件源码
python
阅读 25
收藏 0
点赞 0
评论 0
评论列表
文章目录