This repository contain both original and non-original code. Its main purpose is to facilitate my personal learning. So, please ignore this repository and consider it as a private one.
Run(.py) compute_parallel > draw_auto
The folder analysis
, connection
, and model_file
are edited from the beta version of Distributed_and_dynamical_communication from Shencong-Ni
conda create --prefix "X:\path\.venv" python=3.11.7
conda activate "X:\path\.venv"
In the vary folder:
python.exe -m pip install -r packages.txt
python.exe -m pip install -r requirements.txt
- Open system property > advanced > environment variable;
- Find or establish "PYTHONPATH" in system variable;
- Add "X:\path\analysis;X:\path\connection;X:\path\model_file" to value, multiple path separated by ";";
- Open Microsoft C++ Build Tools page(Microsoft C++ Build Tools)
- Download and run installer(
Visual Studio Installer
), select following option (or just selectDesktop development with C++
):C++ Build Tools work
load;- (
Windows 10 SDK
andMSVC v142/v143
).
- Restart PC after installed above tools.
See (https://blog.csdn.net/qq_45956730/article/details/125272407).
- requirements: ipywidgets
- Jupyter support:
- Run in Jupyter Notebook need enable
widgets
:
jupyter nbextension enable --py widgetsnbextension
- Run in Jupyter Notebook need enable
See (https://zhuanlan.zhihu.com/p/166523064).
pip freeze > requirements.txt
pip list --format=freeze > packages.txt
The command to use:
git config --global http.proxy http://proxyuser:proxypwd@proxy.server.com:8080
- change
proxyuser
to your proxy user - change
proxypwd
to your proxy password - change
proxy.server.com
to the URL of your proxy server
For example:
git config --global http.proxy http://127.0.0.1:4780
git config --global https.proxy https://127.0.0.1:4780
# may be unnecessary
git config --global http.proxy socks5://127.0.0.1:4780
Here's a successful .gitconfig
:
# This is Git's per-user configuration file.
[user]
name = your_name
email = your_email@example.example
# Please adapt and uncomment the following lines:
# name = unknown
# email = work@DESKTOP-2U2AG9K.(none)
[http]
proxy = http://127.0.0.1:4780
[https]
proxy = https://127.0.0.1:4780
SSH in iPad need no extra setting, following the tutorial of Cpolar will be enough. If something wrong, try to run as administrator while operating OS in the server.
Tutorial
C:\User\.ssh\config
in PC:
Host server_user
HostName 10.181.252.21(Intranet IP of your server)
User server_user
Not clear now, but following sshd_config works:
Port 22
ListenAddress 0.0.0.0
PasswordAuthentication yes
PermitRootLogin yes
Subsystem sftp sftp-server.exe
Match User work
ChrootDirectory X:\your_path
ForceCommand none
PermitTTY yes
X11Forwarding no
AllowTcpForwarding no
PermitTunnel no
Subsystem sftp internal-sftp -u 0002
If server's sshd_config has been modified by your fellow, possibly cause folder empty, or even cannot connect. As I know, sshd_config is all you need about SSH.
- User
your_account
should full controlX:\your_path
and its sub-content - System account
sshd
need Read/Execute permission
Configuration
# Grant the your_account user full control privileges
icacls "X:\your_path" /grant "your_account:(OI)(CI)(F)" /T
# Grant the sshd service account read access permission
icacls "X:\your_path" /grant "NT SERVICE\sshd:(RX)"
Verify permissions
icacls "X:\your_path"
Output should contain:
your_account:(OI)(CI)(F)
NT SERVICE\sshd:(RX)
If something wrong, try rigth-click your path in folder > property > Security, manually add accounts and permissions.
Chroot specially require:
X:\your_path
has to be a genuine directory (non-symlink/mount point)- The permissions of the directory and all its parent directories (up to the root directory)
Administrators
andSYSTEM
must have full control- Other users need at least the permission to traverse
Repair command
# set permission of parent directories
icacls "F:\" /grant "your_account:(RX)"
icacls "F:\" /grant "Administrators:(OI)(CI)(F)"
icacls "F:\" /grant "SYSTEM:(OI)(CI)(F)"
If something wrong, try rigth-click your path in folder > property > Security, manually add accounts and permissions.
Tutorial
Cpolar official website
Cpolar local host
C:\Users\.cpolar\cpolar.yml
in server:
authtoken: CpolarAuthtokenExample
tunnels:
code1:
id: your-id-example
proto: tcp
addr: "22"
inspect: "false"
bind_tls: both
region: cn_top
disable_keep_alives: "false"
redirect_https: "false"
start_type: enable
email: your_email@example.example