例如,conda env 名字是 py313
conda activate py313
python -m pip install -U numpy matplotlib jupyter ipykernel
python -m ipykernel install --user --name py313 --display-name "Python (py313)"
例如,conda env 名字是 py313
conda activate py313
python -m pip install -U numpy matplotlib jupyter ipykernel
python -m ipykernel install --user --name py313 --display-name "Python (py313)"
package.json with pluginFrom the root of your Quarto project (the same directory as netlify.toml):
If you do not have package.json yet, create it with:
npm init -y
Install the Quarto Netlify plugin as a dependency:
npm install --save-dev @quarto/netlify-plugin-quarto
# or equivalently:
# npm install -D @quarto/netlify-plugin-quarto
This will add something like:
{
"devDependencies": {
"@quarto/netlify-plugin-quarto": "^0.0.5"
}
}
to package.json.[2][5][1]
Ensure your netlify.toml in the repo root contains at least:
[[plugins]]
package = "@quarto/netlify-plugin-quarto"
[build]
command = "quarto render"
publish = "_site"
Commit package.json, package-lock.json (or pnpm-lock.yaml/yarn.lock), and netlify.toml, push to GitHub, and trigger a new deploy.[2][3]
github 初始
https://chatgpt.com/share/694c86c7-1788-800e-97de-5c492ec415e5
在 ubuntu 下用 ssh,可先用此指令設定
git remote set-url origin git@github.com:usrname/reponame.git
快速 push
git add . && git commit -m "update something" && git push -u origin main
讓 jupyter notebook 跑 sage 時都顯示漂亮數學式的方法
edit:
~/.ipython/profile_default/startup/00-sage-display.py
加入:
try:
get_ipython().run_line_magic("display", "latex")
except Exception:
pass
\documentclass[12pt]{article}
\usepackage{luatexja}
\usepackage{luatexja-fontspec}
% 英文
\setmainfont{TeX Gyre Termes}
% 中文
\setmainjfont{cwTeX Q Ming Medium}
\begin{document}
Hello,
這是一個 LuaLaTeX 的測試文件。
中文(台灣繁體)測試:
台灣、繁體中文、注音符號
我打江南走過,那等在季節裡的容顏。
數學測試:
\[
E = mc^2
\]
\end{document}
$ conda create -n jlab python=3.11
$ conda activate jlab
$ conda install -c conda-forge jupyterlab
$ jupyter lab
update
$ conda update -c conda-forge jupyterlab
1. 下載原始碼
wget https://github.com/wxMaxima-developers/wxmaxima/archive/refs/tags/Version-24.02.2.tar.gz -O wxmaxima-24.02.2.tar.gz
2. 解壓縮
tar xzf wxmaxima-24.02.2.tar.gz
cd wxmaxima-Version-24.02.2
3. 依此安裝
mkdir -p build
cd build
以下這一步是關鍵
cmake -S . -B ../build-wxm -DWXM_DISABLE_WEBVIEW=on ..
進入目錄
cd ../build-wxm
開始編譯程式
cmake --build .
測試
./wxmaxima-local
若成功,可以安裝:
sudo cmake --build . -- install
參考:
https://chatgpt.com/share/68f70a75-b748-800e-96a2-39b957d0fe9b
備註:
1. 在 Netlify 上 Build command 留空白就好,不要打 quarto render
2. 在 ubuntu 下用 ssh,可先用此指令設定
git remote set-url origin git@github.com:usrname/reponame.git
3. 快速 push
git add . && git commit -m "init quarto site" && git push -u origin main
| 軟體 | 功能 | 安裝方式 |
|---|---|---|
| Xournal++ | 免費筆記軟體,支援手寫、PDF 匯入註解 | sudo apt install xournalpp |
| Krita | 強大繪圖軟體,可繪製幾何圖、滑順筆觸 | sudo apt install krita |
| OpenBoard | 教學專用白板,可錄影與備課 | 官方網站下載 .deb 安裝包 |
| GIMP | 圖像處理,也可做簡單圖形教學 | sudo apt install gimp |
利用 iframe 這個 html 的 tag,就可以在網頁中顯示其它網頁的內容
<iframe src="https://yourhost.com/path/to/notebook.html" width="100%" height="600px"></iframe>
To deploy a Quarto website to GitHub using the usethis package in RStudio on Ubuntu 20.04, follow these steps:
Install Required Packages:
Ensure you have the usethis, quarto, and gitcreds packages installed. You can install them using the following commands in RStudio:
install.packages("usethis")
install.packages("quarto")
install.packages("gitcreds")
Create a New Quarto Project:
Create a new Quarto project in RStudio. You can do this by navigating to File > New Project > New Directory > Quarto Website.
Set git username and password (token) if you first use git:
usethis::use_git_config(user.name = "Your Name", user.email = "your.email@example.com")
Set git token (password), you have to get the token from github.com before use:
gitcreds::gitcreds_set()
Configure Quarto for GitHub Pages:
Modify your _quarto.yml file to specify the output directory as docs:
project:
type: website
output-dir: docs
Build the website files:
system("quarto render")
Initialize Git: Initialize a Git repository in your project directory:
usethis::use_git()
Create a GitHub Repository:
Use usethis to create a GitHub repository and link it to your local project:
usethis::use_github()
Configure GitHub Pages:
Go to your GitHub repository settings and configure GitHub Pages to publish from the docs directory of the main branch.
To deploy a Quarto website to GitHub using the usethis package in RStudio on Ubuntu 20.04, follow these steps:
Install Required Packages:
Ensure you have the usethis and quarto packages installed. You can install them using the following commands in RStudio:
install.packages("usethis")
install.packages("quarto")
Create a New Quarto Project:
Create a new Quarto project in RStudio. You can do this by navigating to File > New Project > New Directory > Quarto Website.
Initialize Git: Initialize a Git repository in your project directory:
usethis::use_git()
Create a GitHub Repository:
Use usethis to create a GitHub repository and link it to your local project:
usethis::use_github()
Configure Quarto for GitHub Pages:
Modify your _quarto.yml file to specify the output directory as docs:
project:
type: website
output-dir: docs
Add .nojekyll File:
Add a .nojekyll file to the root of your repository to prevent GitHub Pages from processing your site with Jekyll:
touch .nojekyll
Render and Deploy Your Site: Render your Quarto site and push the changes to GitHub:
quarto render
git add docs
git commit -m "Publish site to docs/"
git push
Configure GitHub Pages:
Go to your GitHub repository settings and configure GitHub Pages to publish from the docs directory of the main branch.
import sqlite3
# Connect to your SQLite3 database
conn = sqlite3.connect('your_database_file.db')
cursor = conn.cursor()
# Execute the VACUUM command
cursor.execute('VACUUM')
# Close the connection
conn.close()
gnuplot 安裝後若需要 png 類型的輸出,可以依以下步驟安裝:
sudo apt-get update
sudo apt-get install build-essential
sudo apt-get build-dep gnuplot
sudo apt-get install libgd-dev libpng-dev
wget https://sourceforge.net/projects/gnuplot/files/gnuplot/5.2.8/gnuplot-5.2.8.tar.gz
tar -xzf gnuplot-5.2.8.tar.gz
cd gnuplot-5.2.8
./configure --with-gd --with-png
make
mack check
sudo make install
$ conda config --set auto_activate_base false
Ubuntu 24.04 中,Firefox 預設是從 snap 安裝,然而,從 snap 安裝的版本不能使用 gcin 中文輸入法。為了解決這個問題,我參考以下網頁,依照以下方法,成功安裝 Mozilla Builds Firefox,且可使用中文輸入法。
首先移除已安裝的 firefox:
$ sudo snap remove firefox
$ sudo apt remove firefox
然後參考:
Install Firefox from Mozilla builds
1. 從 Mozilla 官網下載 Firefox Linux 64-bit 版本,例如 firefox-127.0.1.tar.bz2
2. 按照以下步驟
$ tar xjf firefox-*.tar.bz2
$ sudo mv firefox /opt
$ sudo ln -s /opt/firefox/firefox /usr/local/bin/firefox
$ sudo wget https://raw.githubusercontent.com/mozilla/sumo-kb/main/install-firefox-linux/firefox.desktop -P /usr/local/share/applications
3. 在終端機執行
$ firefox
即可啟動,而且 gcin 可以正常使用。