start new:
tmux
start new with session name:
tmux new -s myname
# Timer ############################################################################# | |
import time | |
class Timer: | |
""" | |
A simple context manager for timing code execution. | |
Usage: | |
with Timer() as t: |
" A very minimal vimrc config for use in remote servers | |
" Loka 2024 | |
" Enable line numbers | |
set number | |
set relativenumber | |
" Enable syntax highlighting | |
syntax on |
from __future__ import annotations | |
""" | |
usage: | |
pip install cmaes | |
https://pypi.org/project/cmaes/ | |
""" | |
from typing import Any, List, Optional, Tuple, Union |
# %% | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import tensorflow as tf | |
def non_dominated_sort(objectives): | |
""" | |
Computes the non-dominated set for a set of data points | |
:param objectives: data points | |
:return: tuple of the non-dominated set and the degree of dominance, |
import numpy as np | |
from scipy.spatial.distance import cdist, pdist | |
class LatinHyperCube(): | |
""" | |
***copied from gpflowopt design*** | |
Latin hypercube with optimized minimal distance between points. | |
Created with the Translational Propagation algorithm to avoid lengthy generation procedures. | |
For dimensions smaller or equal to 6, this algorithm finds the quasi-optimal LHD with overwhelming probability. |
#!/bin/bash | |
# Script for installing tmux on systems where you don't have root access. | |
# tmux will be installed in $HOME/local/bin. | |
# It's assumed that wget and a C/C++ compiler are installed. | |
# exit on error | |
set -e | |
TMUX_VERSION=1.8 |
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
""" | |
first try to implement hilbert curve | |
Created on Thu Mar 1 12:27:38 2018 | |
source : https://en.wikipedia.org/wiki/Hilbert_curve | |
@author: lokasatria | |
""" | |
import numpy as np | |
import math |