This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### | |
# install maas | |
### | |
sudo snap install maas | |
sudo snap install maas-test-db | |
maas init region+rack --database-uri maas-test-db:/// | |
maas createadmin --username admin --password admin --email admin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# list all hosts | |
maas admin machines read | grep hostname | |
# find hosts by status | |
maas admin machines read status=new | grep hostname | |
# (new, commissioning, ready) | |
# find machine |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import Any | |
from dynaconf import Dynaconf | |
from pydantic import BaseModel, Field | |
# XXX: no promises that these are complete or correct... | |
class DynaconfConfig(BaseModel): | |
ENVVAR_PREFIX_FOR_DYNACONF: str | None | |
SETTINGS_FILE_FOR_DYNACONF: bool | list[str] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<title>Babylon Template</title> | |
<style> | |
html, | |
body { |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import Any | |
import numpy as np | |
from cuda import cuda, cudart, nvrtc | |
cuda_code = """ | |
extern "C" __global__ void simple() { | |
printf("this is a test\\n"); | |
} | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# type: ignore | |
import numpy as np | |
from cuda import cuda, nvrtc | |
def _cudaGetErrorEnum(error): | |
if isinstance(error, cuda.CUresult): | |
err, name = cuda.cuGetErrorName(error) | |
return name if err == cuda.CUresult.CUDA_SUCCESS else "<unknown>" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ctypes | |
from typing import Any | |
import numpy as np | |
from cuda import cuda, cudart, nvrtc | |
cuda_code = """ | |
extern "C" __global__ void simple(char *str) { | |
printf("this is a test\\n"); | |
printf("passed argument was: %s\\n", str); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import Any | |
import numpy as np | |
from cuda import cuda, cudart, nvrtc | |
cuda_code = """ | |
extern "C" __global__ void simple() { | |
printf("this is a test\\n"); | |
} | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ctypes | |
from typing import Any | |
import numpy as np | |
from cuda import cuda, cudart, nvrtc | |
cuda_code = """ | |
extern "C" __global__ void simple(char *str) { | |
printf("this is a test\\n"); | |
printf("passed argument was: %s\\n", str); |