This file contains 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
|
This file contains 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
# ref https://stackoverflow.com/questions/18968979/how-to-get-colorized-output-with-cmake | |
if (NOT WIN32) | |
string(ASCII 27 Esc) | |
set(ColourReset "${Esc}[m") | |
set(ColourBold "${Esc}[1m") | |
set(Red "${Esc}[31m") | |
set(Green "${Esc}[32m") | |
set(Yellow "${Esc}[33m") | |
set(Blue "${Esc}[34m") | |
set(Magenta "${Esc}[35m") |
This file contains 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
catkin_log() { | |
pkg_name=$1 | |
cd "$(catkin locate -L)"/"${pkg_name}"/ | |
} | |
# 配置conda命令行补全 | |
CONDA_ROOT="${HOME}/anaconda3" | |
if [[ -r $CONDA_ROOT/etc/profile.d/bash_completion.sh ]]; then | |
source $CONDA_ROOT/etc/profile.d/bash_completion.sh | |
fi |
This file contains 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from scipy.optimize import minimize | |
def test01(): | |
""" | |
优化单一变量 | |
:return: |
This file contains 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
# v2.0 2022.3.31 | |
# >>> 基础镜像 >>> | |
FROM nvidia/cuda:11.1-cudnn8-devel-ubuntu20.04 | |
# >>> 修改源,并安装apt包 >>> | |
# rm /etc/apt/sources.list.d/*: 删除cuda sources,避免无法update | |
RUN sed -i s@/archive.ubuntu.com/@/mirrors.ustc.edu.cn/@g /etc/apt/sources.list \ | |
&& sed -i '37,49d' /etc/apt/sources.list \ | |
&& rm /etc/apt/sources.list.d/* \ | |
&& apt update \ |
This file contains 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 | |
adjust_fan() { | |
pcie_pos=$1 | |
target_state=$2 | |
cur_state=$(sudo racadm get "System.PCIESlotLFM.${pcie_pos}" | grep LFMMode | cut -c 9-) | |
if [ "$target_state" != "$cur_state" ]; then | |
sudo racadm set System.PCIESlotLFM."${pcie_pos}".LFMMode "${target_state}" | |
echo "风扇调整为:${target_state}模式(Custom: off Automatic: on)" | |
fi |
This file contains 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
"latex-workshop.chktex.enabled": true, | |
"latex-workshop.latex.outDir": "%DIR%/build", | |
"latex-workshop.view.pdf.viewer": "tab", | |
"latex-workshop.latex.recipes": [ | |
{ | |
"name": "pdflatex ➞ bibtex ➞ pdflatex × 2", | |
"tools": [ | |
"pdflatex", | |
"bibtex", | |
"pdflatex", |
This file contains 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
auto_activate_base: false | |
channels: | |
- conda-forge | |
- defaults |
NewerOlder