Package manager인 mamba를 Windows 11의 PowerShell에서 사용할 수 있도록 셋업하기
- conda와 사용방법이 거의 동일
- conda보다 빠르다
- conda는 Python으로 구현되어있으나, mamba는 C++로 구현
- 패키지 다운로드시 여러 파일 동시 다운로드
LOG_FILENAME = "mylog.log" | |
LOG_ENCODING = "utf-8" | |
def main(): | |
print("Hello world!") | |
if __name__ == "__main__": | |
import datetime |
from typing import Any | |
from collections.abc import Hashable, Iterable | |
from itertools import combinations | |
def calc_adjacency_dict(hypergraph_dict: dict[Hashable, Iterable[Hashable]]) -> dict[Hashable, set[Hashable]]: | |
key_list = list(hypergraph_dict.keys()) | |
hypergraph_set_dict = {key: set(hypergraph_dict[key]) for key in key_list} | |
return_dict = {key: set() for key in key_list} | |
for key1, key2 in combinations(key_list, 2): | |
if hypergraph_set_dict[key1] & hypergraph_set_dict[key2]: |
import numpy as np | |
set1 = {np.str_("a"), "b"} | |
set2 = frozenset({"a", "b"}) | |
print(set1.issubset(set2)) # True | |
print(set2.issubset(set1)) # True |
r""" | |
Copyright (c) 2024 MSO Lab. | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
$Env:MAMBA_ROOT_PREFIX="C:\Users\$Env:UserName\" | |
.\micromamba.exe shell hook -s powershell | Out-String | Invoke-Expression | |
# command alias micromamba as mamba | |
Set-Alias mamba micromamba |