Library Search
结果页Go 并发爬虫 — goroutine + channel 实战
在 技术栈 中找到 8 个匹配结果。
技术栈
技术栈
8 个 Go (Golang) # Go 并发爬虫 — goroutine + channel 实战
## 目标
演示 Go 核心卖点:goroutine 轻量并发 + channel 通信。编写一个并发检查多个 URL 响应状态的工具。
## 完整代码
```go
package main
import (
"fmt"
"net/http"
"sync"
"time"
)
// URLResult 封装单个… 3% RabbitMQ # RabbitMQ Hello World - Python (pika)
## 目标
演示最基本的消息发送(Producer)和接收(Consumer)流程,使用 Direct Exchange + 默认队列。
## 环境准备
```bash
pip install pika
```
## 完整代码
### 发送端(producer.py)
```python
import pika… 3% STM32 HAL/LL /* ══════════════════════════════════════
* 处理 ADC 数据(在 main 中调用)
* ══════════════════════════════════════ */
static void process_adc_data(uint16_t *buf, uint32_t len) {
float sum[ADC_CHANNELS]… 2% Scrapy # Scrapy 爬虫从入门到反爬对抗
## 背景
互联网数据是新时代的石油。Scrapy 让你用几十行 Python 代码就能构建一个工业级爬虫,自动处理请求调度、重试、限速和数据存储。
---
## 第 1 章:Scrapy 架构
```
[Spider] → [Engine] → [Scheduler] → [Downloader] → [Spider] → [Item Pipel… 2% Gin # Gin 毕设实战 — Go Web 开发从入门到上线
## 前言
Gin 是国内 Go 后端开发的事实标准。它性能极高、API 简洁,非常适合毕设中需要高性能接口的场景(如数据处理、实时计算)。
## 第一章:Gin 的 radix tree 路由
Gin 基于 httprouter 的压缩前缀树(radix tree),路由时间复杂度 O(log n):
```
GET /api/u… 2% gRPC # gRPC 例程:Go 语言四种通信模式
## 目标
用 Go 实现 gRPC 的四种通信模式:Unary、Server Streaming、Client Streaming、Bidirectional Streaming。
## Proto 定义
```protobuf
syntax = "proto3";
package calculator;
option go_package =… 1% FastAPI ```
fastapi_project/
├── app/
│ ├── __init__.py
│ ├── main.py # FastAPI 实例创建 + 路由注册
│ ├── core/
│ │ ├── config.py # 配置(Pydantic Settings)
│ │ └── security.py # 认… 1% Celery [Flower 监控]
```
- **Producer**:你的 Django/Flask/FastAPI 应用
- **Broker**:消息中间件,Redis / RabbitMQ
- **Worker**:实际执行任务的进程
- **Result Backend**:存储任务结果(可选)
---
## 第 2 章:任务编排原语
```python
from celery impo… 1%