国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
| """ | |
| The most atomic way to train and run inference for a GPT in pure, dependency-free Python. | |
| This file is the complete algorithm. | |
| Everything else is just efficiency. | |
| @karpathy | |
| """ | |
| import os # os.path.exists | |
| import math # math.log, math.exp |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| ;; | |
| ;; 作者: 李继刚 | |
| ;; 日期: 2025-11-12 | |
| ;; 剑名: 圆桌讨论 | |
| ;; 剑意: 构建一个以“求真”为目标的结构化对话框架。该框架由一位极具洞察力的主持人 | |
| ;; 进行引导,邀请代表不同思想的“典型代表人物”进行一场高强度的、即时响应式的 | |
| ;; 深度对话。主持人将在每轮总结时生成视觉化的思考框架(ASCII Chart),通过 | |
| ;; “主动质询” 与“协同共建”,对用户提出的议题进行协同探索,最终生成深刻的、 | |
| ;; 结构化的知识网络。 |
| """ | |
| The most atomic way to train and run inference for a GPT in pure, dependency-free Python. | |
| This file is the complete algorithm. | |
| Everything else is just efficiency. | |
| @karpathy | |
| """ | |
| import os # os.path.exists | |
| import math # math.log, math.exp |
| #!/bin/bash | |
| set -euo pipefail | |
| # Directory setup | |
| APP_DIR="${HOME}/Applications" | |
| ICON_DIR="${HOME}/.local/share/icons" | |
| DESKTOP_DIR="${HOME}/.local/share/applications" | |
| BIN_DIR="${HOME}/.local/bin" |
| # WSL通过Win访问网络,所以WSL的网关指向的是Windows,DNS服务器指向的也是Windows,设置WSL的proxy为win的代理ip+端口即可 | |
| # WSL中的DNS server在/etc/resolv.conf中查看,该文件是由/etc/wsl.conf自动生成的。 | |
| # 如果关闭了wsl.conf中自动生成resolve.conf并自行修改了resolve.conf,DNS nameserver并不是本机win ip | |
| # 需要开启wsl.conf的自动生成,再运行以下命令 | |
| # https://zhuanlan.zhihu.com/p/153124468 | |
| # 添加到环境变量设置中,例如~/.zshrc | |
| export hostip=$(cat /etc/resolv.conf |grep -oP '(?<=nameserver\ ).*') | |
| export https_proxy="http://${hostip}:7890" | |
| export http_proxy="http://${hostip}:7890" |
| cmake_minimum_required(VERSION 3.4.3) | |
| project(sample CXX) | |
| find_package(InferenceEngine REQUIRED) | |
| add_executable(${CMAKE_PROJECT_NAME} main.cpp) | |
| target_compile_features(${CMAKE_PROJECT_NAME} PRIVATE cxx_range_for) | |
| target_link_libraries(${CMAKE_PROJECT_NAME} |
| // Use freely with source code level attribution (a comment in the source code linking to this page is fine) | |
| package foo | |
| import ( | |
| "fmt" | |
| "net" | |
| "os" | |
| "strings" | |
| ) |
国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
| package main | |
| import ( | |
| "strings" | |
| "path/filepath" | |
| ) | |
| func fileNameWithoutExtension(fileName string) string { | |
| return strings.TrimSuffix(fileName, filepath.Ext(fileName)) | |
| } |
or might be easy with gdisk/fdisk ? I'm not sure about this.
------------------------------------------------------------------------
see the reference for more detail, if you want.
https://richardstechnotes.wordpress.com/2015/12/18/setting-up-an-nvme-ssd-on-ubuntu-14-04-lts/
http://takatakamanbou.hatenablog.com/entry/2015/10/25/235600 : Japanese website