diff options
Diffstat (limited to 'code/sunlab/environment/base')
-rw-r--r-- | code/sunlab/environment/base/__init__.py | 8 | ||||
-rw-r--r-- | code/sunlab/environment/base/cpu.py | 4 | ||||
-rw-r--r-- | code/sunlab/environment/base/cuda.py | 4 | ||||
-rw-r--r-- | code/sunlab/environment/base/extras.py | 7 | ||||
-rw-r--r-- | code/sunlab/environment/base/fortran.py | 8 |
5 files changed, 31 insertions, 0 deletions
diff --git a/code/sunlab/environment/base/__init__.py b/code/sunlab/environment/base/__init__.py new file mode 100644 index 0000000..5fc27c1 --- /dev/null +++ b/code/sunlab/environment/base/__init__.py @@ -0,0 +1,8 @@ +import numpy as np +import pandas as pd +from matplotlib import pyplot as plt +from copy import deepcopy as dc +import glob +from tqdm.notebook import tqdm +from sunlab.common.mathlib.base import * +from .fortran import * diff --git a/code/sunlab/environment/base/cpu.py b/code/sunlab/environment/base/cpu.py new file mode 100644 index 0000000..d969bd1 --- /dev/null +++ b/code/sunlab/environment/base/cpu.py @@ -0,0 +1,4 @@ +import os + +os.environ["CUDA_VISIBLE_DEVICES"] = "-1" +from . import * diff --git a/code/sunlab/environment/base/cuda.py b/code/sunlab/environment/base/cuda.py new file mode 100644 index 0000000..a5c813e --- /dev/null +++ b/code/sunlab/environment/base/cuda.py @@ -0,0 +1,4 @@ +import os + +os.environ["CUDA_VISIBLE_DEVICES"] = "1" +from . import * diff --git a/code/sunlab/environment/base/extras.py b/code/sunlab/environment/base/extras.py new file mode 100644 index 0000000..b6ddc88 --- /dev/null +++ b/code/sunlab/environment/base/extras.py @@ -0,0 +1,7 @@ +from scipy.spatial import KDTree +from scipy.spatial import ConvexHull +from scipy.stats import linregress +from sklearn.manifold import TSNE +from sklearn.decomposition import PCA, KernelPCA +from sklearn.cluster import KMeans +from scipy.optimize import curve_fit diff --git a/code/sunlab/environment/base/fortran.py b/code/sunlab/environment/base/fortran.py new file mode 100644 index 0000000..973d09a --- /dev/null +++ b/code/sunlab/environment/base/fortran.py @@ -0,0 +1,8 @@ +try: + from ...fortran_src.aae_flib_mamba import * +except Exception: + ... +try: + from ...fortran_src.aae_flib_tfnb import * +except Exception: + ... |