- Tailwind CSS Won the War... But We're the Los
- A Primer on Tailwind CSS: Pros, Cons and Real-World Use Cases
- How to Learn Tailwind CSS: A Practical Guide [2026]
- https://tailwindcss.com/
- https://tailwindcss.com/docs/
From: https://www.cnblogs.com/jzssuanfa/p/19491107
分类整理:就是除了 GitHub,国内外还有许多优秀的代码托管和开发者协作平台,各有特色。以下
特点:最强的一体化 DevOps 平台,CI/CD 功能内建且强大,社区版免费且功能齐全。
网址:gitlab.com(云端版)或可自行部署。
特点:Atlassian 旗下,与 Jira、Trello 等项目管理工具深度集成,适合企业团队。
特点:亚马逊 AWS 生态内的托管 Git 仓库,与 AWS 服务无缝集成。
适用:深度使用 AWS 云服务的团队。
特点:历史悠久,早期著名的开源项目托管地,现在也协助 Git。
特点:由 Canonical 运营,主要托管 Ubuntu 相关项目,使用 Bazaar 版本控制系统。
特点:国内最大、最流行的代码托管平台,速度快,符合中国本地化需求,提供企业版。
网址:gitee.com
特点:提供一站式 DevOps、项目管理、持续集成,与腾讯云服务集成。
网址:dev.tencent.com / coding.net(已合并)
特点:阿里云旗下,集成于“云效”DevOps 平台,献出代码管理和智能研发功能。
特点:开源中国社区推出的代码托管服务,与 OSC 社区紧密结合。
网址:gitcode.net
特点:基于点对点网络的去中心化代码协作平台,无需中央服务器。
网址:radicle.xyz
特点:基于 Forgejo(Gitea 分支),在德国运营的非营利性开源托管平台。
网址:codeberg.org
特点:轻量级、可自托管的 Git 服务,许多小规模托管站基于它们搭建。
个人/开源工程:GitHub仍是全球首选,社区最活跃。国内访问考虑Gitee。
企业/私有方案:GitLab(功能强大)、Bitbucket(集成 Jira)、腾讯云 DevOps 或 阿里云云效(国内企业)。
注重隐私与自主权:自建 GitLab、Gitea 或 Forgejo。
深度集成特定云:选择对应厂商的平台(AWS CodeCommit、Azure Repos)。
To install Keras on a Mac, install TensorFlow (which includes Keras) using
pip install tensorflow
or
pip install tensorflow-macos for Apple Silicon (M1/M2/M3) chips.
For best performance on M1/M2/M3 chips, use conda to install tensorflow-deps.
Verify with python -c "import keras; print(keras.__version__)"
== Use PIP (Standard & Apple Silicon)
# Upgrade pip
pip3 install --upgrade pip
# Install TensorFlow (includes Keras)
pip3 install tensorflow Note: TensorFlow works with Python 3.9-2.12. The recommended way to install and manage multiple Python versions on a Mac is by using a version manager like pyenv, which prevents conflicts with the system's default Python installation.
== Use pyenv (Recommended for Developers)
brew install pyenv
You may also want the pyenv-virtualenv plugin for creating isolated project environments:
bash brew install pyenv-virtualenv
Configure your shell: You need to initialize pyenv in your shell (e.g., Zsh, the default for modern macOS). Add the necessary lines to your shell's configuration file (commonly ~/.zshrc or ~/.bashrc) and restart your terminal as per the pyenv documentation instructions.
pyenv install 3.12.0
Switch between versions:
pyenv global 3.12.0
.python-version file:pyenv local 3.12.0
pyenv-virtualenv to create an isolated environment for a project with a specific Python version:pyenv virtualenv 3.12.0 myprojectenv
cd myprojectdir
pyenv local myprojectenv
Create local env:
# Create a virtual environment (e.g., named 'tf-env')
python -m venv tf-env
# Activate it (Linux/macOS)
source tf-env/bin/activate Then install:pip install tensorflow Verify:import tensorflow as tfprint(tf.keras.__version__)print(tf.__version__)
AI Overview
8080 or 81, while the other (e.g., Nginx) uses the default 80 (HTTP) and 443 (HTTPS) ports. Users would access the second server by appending the port number to the URL (e.g., http://yourdomain.com:8080).80 and 443. It serves static files directly and proxies requests for dynamic content (like PHP applications that rely on .htaccess files) to Apache, which is configured to listen on an internal, loopback IP and port (e.g., 127.0.0.1:8080). This setup improves overall performance and resource usage. ports.conf and the default virtual host file) to change the listening ports from 80/443 to an internal port like 8080.80/443.
For dynamic requests, add proxy directives within the Nginx virtual
host configuration to forward traffic to the Apache port (e.g., proxy_pass http://localhost:8080;).mod_rpaf (or mod_remoteip) on Apache:
This module ensures Apache logs the client's real IP address instead of
Nginx's localhost IP, which is useful for statistics and
authentication.
sudo apt updatesudo apt install nodejs npmnode -v and npm -vnpm run build. This creates a production-optimized build directory. Transfer the contents of this build directory to your Ubuntu server using tools like scp, rsync, or by cloning your repository from GitHub on the server itself.sudo apt install nginxsudo systemctl start nginx and sudo systemctl enable nginx/etc/nginx/sites-available/ directory. You can use a text editor like nano (e.g., sudo nano /etc/nginx/sites-available/your_domain):server {
listen 80;
server_name your_domain www.your_domain;
root /var/www/your_domain/html;
index index.html index.htm;
location / {
try_files $uri $uri/ /index.html;
}
}
your_domain with your actual domain name and adjust the root path to where you placed your build files, for example, /var/www/your_domain/html).sites-available to the sites-enabled directory:sudo ln -s /etc/nginx/sites-available/your_domain /etc/nginx/sites-enabled/sudo nginx -tsudo systemctl restart nginx
.htaccess file. npm run build
build (or dist if using Vite) folder containing your static assets. yourwebsite.com with your domain or desired folder name):sudo mkdir -p /var/www/yourwebsite.com
sudo chown -R $USER:$USER /var/www/yourwebsite.com
build folder to the server's directory (e.g., /var/www/yourwebsite.com) using an FTP client like FileZilla or scp. ://yourwebsite.com) will result in a 404 error without proper server configuration. Apache needs to be instructed to redirect all requests to the index.html file. mod_rewrite module:sudo a2enmod rewrite
.htaccess file: Inside your application's root directory on the server (e.g., /var/www/yourwebsite.com), create a file named .htaccess and add the following snippet:Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.html [QSA,L]
index.html.AllowOverride All is set: You might need to edit your Apache configuration to allow .htaccess files to override settings.apache2.conf file (e.g., /etc/apache2/sites-available/000-default.conf or /etc/apache2/apache2.conf).<Directory /var/www/html> block (or your custom directory block) and ensure AllowOverride is set to All:<Directory /var/www/yourwebsite.com>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
sudo systemctl restart apache2
.env files for securely managing sensitive information (secrets). venv).venv (a common convention):python -m venv .venv
source .venv/bin/activate
.venv\Scripts\activate
(.venv) YourName: ).deactivate
.venv) to your .gitignore
file to prevent accidentally committing it to source control. The
environment is considered disposable and can be recreated from a requirements.txt file at any time.venv. .env Files.env file. .env file: In your project's root directory, create a file named .env. Inside this file, store key-value pairs (e.g., API_KEY=your_secret_key)..env file to your .gitignore file immediately to prevent it from being committed to source control.python-dotenv: Install the required package using pip within your activated virtual environment:pip install python-dotenv
app.py), use the load_dotenv function to read the variables, and access them using the standard os module.import os
from dotenv import load_dotenv
# Load environment variables from .env file
load_dotenv()
# Access the variables
api_key = os.getenv("API_KEY")
database_url = os.getenv("DATABASE_URL")
print(f"Key: {api_key}")