AutonomousVehicleControlBeginnersGuide
关于自动驾驶车辆控制算法的 Python 示例代码与文档。本项目可作为技术指南书,供初学者学习这些算法与软件架构。
AI 翻译
Hexlet SICP is a service for those studying the book Structure and Interpretation of Computer Programs. Track your progress and match yourself against others on the global leaderboard.
翻译准备中
教育PHP · BladeGitHub @hexlet-volunteers在线运营者未确认
试用过了吗? 点一下就好,无需登录。
尚未检测到更新。GitHub 发布版本后会显示在这里。
制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗Read this in another language: Русский
Hexlet SICP is a service for those studying the book Structure and Interpretation of Computer Programs. Track your progress and match yourself against others on the global leaderboard.
How to study Structure and Interpretation of Computer Programs (SICP)
Q: I get this error Illuminate\Session\TokenMismatchException: CSRF token mismatch.
A: Reset your config cache php artisan config:clear
Run composer check-platform-reqs to check PHP deps:
corepack enable pnpm — version is pinned in package.json)docker compose, see below)The app runs on PostgreSQL everywhere: locally, in tests, on stage and in production.
The simplest way to get a database is the container from docker compose — it listens
on 127.0.0.1:54320 and creates both databases, the application one and the test one.
make compose-start-database # start PostgreSQL in a container
make setup # set up the project
make start # start server at http://127.0.0.1:8000/
make test # run tests
Connection settings are taken from .env, which make setup copies from .env.example.
Their defaults match the container above, so nothing has to be edited.
To use your own PostgreSQL instead of the container, change DB_* and TEST_DB_* in .env
(the default port is 5432) and create both databases by hand:
createdb hexlet_sicp
createdb hexlet_sicp_test
Tests recreate the schema on every run, so they use a separate database — never point
TEST_DB_DATABASE at the one you develop against.
make compose-setup # build project
make compose-start # start server at http://127.0.0.1:8000/
make compose-bash # start bash session inside docker container
make test # run tests inside docker container
Inside the containers the database host is set by docker-compose.yml, so the DB_HOST
and DB_PORT values from .env are not used there.
Stage environment uses Docker Compose to deploy a production-like setup on a single server.
Architecture:
app - Laravel application container (serves HTTP on port 80)queue - background queue workerdb - PostgreSQL databaseInitial setup (first time only):
Prepare the .env file on the server
cp .env.example .env
nano .env
Configure environment variables (see docker-compose.stage.yml)
APP_ENV=production
APP_DEBUG=false
APP_URL=https://your-domain.com
PRODUCTION_URL=https://your-domain.com
DB_CONNECTION=pgsql
DB_HOST=db
DB_PORT=5432
DB_DATABASE=hexlet_sicp
DB_USERNAME=sicp_user
DB_PASSWORD=your_secure_password
QUEUE_CONNECTION=database
SESSION_DRIVER=cookie
Run initial setup
make stage-setup
This will:
Deploying updates:
make stage-deploy
This will:
Deploying a specific branch:
make stage-deploy-branch BRANCH=feature/my-feature
This will:
Other commands:
make stage-start # Start containers
make stage-stop # Stop containers
make stage-restart # Restart containers
make stage-logs # View logs
make stage-bash # Open bash in app container
make stage-down # Stop and remove containers
make stage-reset # Complete rebuild: stop, remove volumes, rebuild, and reinitialize
HTTPS setup:
The stage app listens on HTTP (port 80) only. For HTTPS, use an external reverse proxy (Caddy, Traefik, or host-level nginx) for TLS termination.
以上为 README 的开头部分。其余内容请阅读原文。 查看完整 README ↗