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
<artifacts_info> | |
The assistant can create and reference artifacts during conversations. Artifacts are for substantial, self-contained content that users might modify or reuse, displayed in a separate UI window for clarity. | |
# Good artifacts are... | |
- Substantial content (>15 lines) | |
- Content that the user is likely to modify, iterate on, or take ownership of | |
- Self-contained, complex content that can be understood on its own, without context from the conversation | |
- Content intended for eventual use outside the conversation (e.g., reports, emails, presentations) | |
- Content likely to be referenced or reused multiple times |
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
cd path/to/boost_1_82_0 | |
./bootstrap.sh --help | |
./bootstrap.sh --prefix=path/to/installation/prefix | |
./b2 install |
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
# GCC version must be greater than or equal to 9 | |
# greater than or equal to python3.8 | |
# cuda, cudnn need to be installed | |
curl -L -o onnxruntime-v1.16.3.tar.gz https://github.com/microsoft/onnxruntime/archive/refs/tags/v1.16.3.tar.gz | |
tar -zxvf onnxruntime-v1.16.3.tar.gz | |
cd onnxruntime-v1.16.3 | |
# ./build.sh --use_cuda --cudnn_home /usr/local/cuda-11.8 --cuda_home /usr/local/cuda-11.8 --allow_running_as_root --skip_submodule_sync --parallel | |
# ./build.sh --config Release --use_cuda --cudnn_home /usr/local/cuda-11.8 --cuda_home /usr/local/cuda-11.8 --allow_running_as_root --skip_submodule_sync --parallel |
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
# install bzip2 | |
# sudo yum install -y bzip2 | |
# sudo apt-get install -y bzip2 | |
wget https://gcc.gnu.org/pub/gcc/releases/gcc-14.2.0/gcc-14.2.0.tar.gz | |
tar -zxvf gcc-14.2.0.tar.gz | |
cd gcc-14.2.0 | |
./contrib/download_prerequisites |
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
# CentOS-Base.repo | |
# | |
# The mirror system uses the connecting IP address of the client and the | |
# update status of each mirror to pick mirrors that are updated to and | |
# geographically close to the client. You should use this for CentOS updates | |
# unless you are manually picking other mirrors. | |
# | |
# If the mirrorlist= does not work for you, as a fall back you can try the | |
# remarked out baseurl= line instead. | |
# |
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
cmake_minimum_required(VERSION 3.14 FATAL_ERROR) | |
# 设置项目名称 | |
project(LearnCmake VERSION 1.0 LANGUAGES CXX) | |
# 添加可执行文件 | |
add_library(add STATIC add.cc) | |
add_executable(main main.cc) |
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
wget https://github.com/bminor/glibc/archive/refs/tags/glibc-2.35.tar.gz | |
tar xvf glibc-2.35.tar.gz | |
cd glibc-glibc-2.35 | |
mkdir build | |
cd build | |
../configure --prefix=/path/to/install | |
make -j10 | |
make install |
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
logger = logging.getLogger(__name__) | |
logger.setLevel(level=logging.DEBUG) | |
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') | |
formatter = logging.Formatter('%(asctime)s | %(levelname)s | %(filename)s | %(threadName)s | %(funcName)s | %(lineno)s | %(message)s') | |
fh = logging.FileHandler("log.txt") | |
fh.setLevel(logging.INFO) | |
fh.setFormatter(formatter) | |
logger.addHandler(fh) |
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
class MyBertForSequenceClassification(BertForSequenceClassification): | |
def forward(self, input_ids=None, attention_mask=None, token_type_ids=None): | |
outputs = super().forward( | |
input_ids=input_ids, | |
attention_mask=attention_mask, | |
token_type_ids=token_type_ids, | |
) | |
return outputs.logits | |
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
{ | |
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", | |
"palette": { | |
"white": "#FFFFFF", | |
"tan": "#CC3802", | |
"teal": "#047E84", | |
"plum": "#9A348E", | |
"blush": "#DA627D", | |
"salmon": "#FCA17D", | |
"sky": "#86BBD8", |
NewerOlder