code stringlengths 1 1.05M | repo_name stringlengths 6 83 | path stringlengths 3 242 | language stringclasses 222
values | license stringclasses 20
values | size int64 1 1.05M |
|---|---|---|---|---|---|
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
市场数据爬虫 - 负责从农业部网站爬取真实市场价格数据
基于market_crawler.py实现
"""
import requests
import json
import time
import threading
from datetime import datetime, timedelta
from typing import Dict, List, Optional, Any
import logging
import urllib3
from .config import config
from .data_ma... | 2301_78526554/agricultural-platform | core/crawler.py | Python | unknown | 15,837 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
数据管理器 - 负责CSV数据的存储、查询和管理
"""
import os
import pandas as pd
import json
from datetime import datetime, timedelta
from typing import Dict, List, Optional, Any
from pathlib import Path
import logging
# 配置日志
logging.basicConfig(level=logging.INFO)
logger = logging.getLog... | 2301_78526554/agricultural-platform | core/data_manager.py | Python | unknown | 14,273 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
报告数据分析器 - 从报告中提取关键数据指标
"""
import pandas as pd
import re
import json
from datetime import datetime
from typing import Dict, List, Optional, Any
import logging
logger = logging.getLogger(__name__)
class ReportAnalyzer:
"""报告数据分析器"""
def __init__(self, da... | 2301_78526554/agricultural-platform | core/report_analyzer.py | Python | unknown | 13,169 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
农业部分析报告爬虫 - 负责从农业部网站爬取分析报告数据
基于 https://pfsc.agri.cn/#/analysisReport
"""
import requests
import json
import time
import threading
from datetime import datetime, timedelta
from typing import Dict, List, Optional, Any
import logging
import urllib3
from bs4 import Beaut... | 2301_78526554/agricultural-platform | core/report_crawler.py | Python | unknown | 23,475 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
任务调度器 - 负责定时任务的管理和执行
"""
import schedule
import threading
import time
from datetime import datetime, timedelta
from typing import Dict, Any
import logging
from .config import config
from .data_manager import get_data_manager
from .crawler import get_crawler
# 配置日志
l... | 2301_78526554/agricultural-platform | core/scheduler.py | Python | unknown | 6,722 |
#!/bin/bash
# 华为云服务器部署脚本 - 农产品市场价格系统 + Odoo ERP
# Huawei Cloud Server Deployment Script
set -e # 遇到错误立即退出
echo "=== 华为云服务器部署开始 ==="
echo "系统信息: $(uname -a)"
echo "当前用户: $(whoami)"
echo "当前目录: $(pwd)"
echo "开始时间: $(date)"
# 颜色定义
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m' #... | 2301_78526554/agricultural-platform | huawei_cloud_deploy.sh | Shell | unknown | 11,720 |
# **************************************************************************
# * *
# * 农产品市场数据爬虫 *
# * *
# * ... | 2301_78526554/agricultural-platform | market_crawler.py | Python | unknown | 41,071 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Odoo数据库迁移脚本 - 农产品市场价格系统
Odoo Database Migration Script for Agricultural Market Price System
"""
import os
import json
import logging
import pandas as pd
import xmlrpc.client
from datetime import datetime, timedelta
import sys
# 配置日志
logging.basicConfig(
level=log... | 2301_78526554/agricultural-platform | odoo_database_migration.py | Python | unknown | 13,196 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
农产品市场价格数据迁移到Odoo ERP系统
Migration script for Agricultural Market Price data to Odoo ERP
"""
import pandas as pd
import xmlrpc.client
import json
import logging
import sys
from datetime import datetime
import os
# 配置日志
logging.basicConfig(
level=logging.INFO,
f... | 2301_78526554/agricultural-platform | odoo_migration.py | Python | unknown | 10,477 |
# -*- coding: utf-8 -*-
"""
农产品市场价格Odoo模型文件
Agricultural Market Price Odoo Models
"""
# models/market_price.py
MARKET_PRICE_MODEL = '''# -*- coding: utf-8 -*-
from odoo import models, fields, api
from datetime import datetime, timedelta
class MarketPrice(models.Model):
_name = 'agricultural.market.price'
_des... | 2301_78526554/agricultural-platform | odoo_models.py | Python | unknown | 12,286 |
#!/bin/bash
# Odoo ERP 部署脚本
# Agricultural Market Price System Migration to Odoo
echo "=== 农产品市场价格系统迁移到Odoo ERP ==="
# 检查Docker是否安装
if ! command -v docker &> /dev/null; then
echo "Docker未安装,正在安装..."
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker $USER
... | 2301_78526554/agricultural-platform | odoo_setup.sh | Shell | unknown | 3,863 |
#!/bin/bash
# 农产品市场价格系统完整迁移脚本
# Complete Migration Script for Agricultural Market Price System
echo "=== 农产品市场价格系统迁移到Odoo ERP ==="
echo "开始时间: $(date)"
# 检查Python环境
if ! command -v python3 &> /dev/null; then
echo "Python3未安装,请先安装Python3"
exit 1
fi
# 安装Python依赖
echo "安装Python依赖包..."
pip3 install -r requiremen... | 2301_78526554/agricultural-platform | run_migration.sh | Shell | unknown | 1,897 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
农产品市场价格管理平台启动脚本
"""
import uvicorn
import sys
import os
from pathlib import Path
# 添加项目根目录到Python路径
project_root = Path(__file__).parent
sys.path.insert(0, str(project_root))
def main():
"""主函数"""
print("🚀 启动农产品市场价格管理平台...")
print("=" * 50)
# 确... | 2301_78526554/agricultural-platform | start.py | Python | unknown | 1,187 |
/* 全局样式 */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
background: #f5f7fa;
min-height: 100vh;
color: #333;
line-height: 1.6;
margin: 0;
overflow-x: hidden;
}... | 2301_78526554/agricultural-platform | static/css/style.css | CSS | unknown | 37,254 |
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>数据仪表盘 - 农产品市场价格管理平台</title>
<link rel="stylesheet" href="/static/css/style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-aw... | 2301_78526554/agricultural-platform | static/dashboard.html | HTML | unknown | 9,263 |
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>农产品市场价格管理平台</title>
<link rel="stylesheet" href="/static/css/style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.... | 2301_78526554/agricultural-platform | static/index.html | HTML | unknown | 34,469 |
// 农产品市场价格管理平台 - 前端JavaScript
class MarketPlatform {
constructor() {
this.apiBase = '/api';
this.currentData = [];
this.currentReports = [];
this.currentSection = 'dashboard';
this.currentReportData = null;
this.charts = {};
this.currentTimeRange = 30; // 默认3... | 2301_78526554/agricultural-platform | static/js/app.js | JavaScript | unknown | 51,195 |
/**
* 农产品市场价格管理平台 - 仪表盘
*/
class Dashboard {
constructor() {
this.apiBase = '/api';
this.charts = {};
this.dashboardData = null;
this.init();
}
async init() {
try {
this.showLoading(true);
await this.loadDashboardData();
this.in... | 2301_78526554/agricultural-platform | static/js/dashboard.js | JavaScript | unknown | 23,586 |
from setuptools import setup, find_packages
setup(
name="compression_tool",
version="0.1",
packages=find_packages(),
install_requires=[
"tqdm",
],
entry_points={
'console_scripts': [
'my_tool = src.__main__:main',
],
},
) | 2301_79074651/Huffman | setup.py | Python | mit | 286 |
from .huffman import HuffmanTree as Huffman
from .huffman_extractor import HuffmanExtractor as Extractor
from .huffman_compressor import HuffmanCompressor as Compressor
__all__ = ["Huffman", "Extractor", "Compressor"] | 2301_79074651/Huffman | src/__init__.py | Python | mit | 218 |
import argparse
from tqdm import tqdm
from typing import List
from pathlib import Path
from src.huffman_extractor import HuffmanExtractor as Extractor
from src.huffman_compressor import HuffmanCompressor as Compressor
class CompressionTool:
def __init__(self, input_files: List[Path], output_dir: Path, action: str,... | 2301_79074651/Huffman | src/__main__.py | Python | mit | 6,297 |
import heapq
from typing import Dict, Optional
class HuffmanNode:
"""哈夫曼树的节点"""
def __init__(self, char: Optional[str], freq: int):
self.char = char
self.freq = freq
self.left = None
self.right = None
def __lt__(self, other):
"""用于优先队列比较,频率小的优先"""
return se... | 2301_79074651/Huffman | src/huffman.py | Python | mit | 2,238 |
import json
from typing import Dict
from pathlib import Path
from src.huffman import HuffmanTree
class HuffmanCompressor:
def __init__(self, input_path: Path, output_path: Path):
"""哈夫曼树解压器初始化函数
Args:
input_path (Path): 输入文件
output_path (Path): 输出文件
"""
self... | 2301_79074651/Huffman | src/huffman_compressor.py | Python | mit | 2,362 |
import json
from typing import Dict
from pathlib import Path
from src.huffman import HuffmanTree
class HuffmanExtractor:
def __init__(self, input_path: Path, output_path: Path):
"""哈夫曼树解压器初始化函数
Args:
input_path (Path): 输入文件
output_path (Path): 输出文件
"""
self.... | 2301_79074651/Huffman | src/huffman_extractor.py | Python | mit | 2,843 |
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main()
{
printf("Hello World!!!");
return 0;
} | 2301_77966824/first-meeting | 09/09_18/09_18_01/09_18_01.c | C | unknown | 104 |
#include <stdio.h>
#include <stdbool.h>
int main()
{
scanf();
printf("%zd\n", sizeof(char));
printf("%zd\n", sizeof(short));
printf("%zd\n", sizeof(int));
printf("%zd\n", sizeof(long));
printf("%zd\n", sizeof(long long));
printf("%zd\n", sizeof(float));
printf("%zd\n", sizeof(double));
printf("%zd\n", sizeof... | 2301_77966824/first-meeting | 10/10_20/10_20_01/10_18_01.c | C | unknown | 380 |
#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main()
{
int i, j, k;
scanf("%d %d %d", &i, &j, &k);
if (i >= j)
{
if (k>=i)
{
printf("%d %d %d ", k, i, j);
}
else
{
if (k >= j)
{
printf("%d %d %d ", i, k, j);
}
else
{
printf("%d %d %d ", i, j, k);
}
}
}
els... | 2301_77966824/first-meeting | 10/10_23/10_23_01/10_23_01.c | C | unknown | 724 |
#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
/*int sum = 0;
for (int i = 3; i <= 100; i+=3)
{
sum += i;
}
printf("%d", sum);
return 0;*/
/*int i = 1;
do
{
printf("%d ", i);
i++;
}
while (i<=10);*/
/*int i, j = 0;
scanf("%d", &i);
if (i == 0)
{
j++;
}
else
{
whi... | 2301_77966824/first-meeting | 10/10_24/10_24_01/10_24_01.c | C | unknown | 472 |
#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main()
{
int i, j, k;
scanf("%d %d %d", &i, &j, &k);
if (i >= j){
if (k >= i) {
printf("%d %d %d ", k, i, j);
}
else{
if (k >= j){
printf("%d %d %d ", i, k, j);
}
else{
printf("%d %d %d ", i, j, k);
}
}
}
else if (j >= k)... | 2301_77966824/first-meeting | 10/10_24/10_24_02/10_24_02.c | C | unknown | 682 |
#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
long double num=1.0;
long double temp;
long double sum1 = 0.0;
long double sum2 = 0.0;
for (int i = 1; i <= 100; i+=2)
{
temp = num / i;
sum1 = sum1 + temp;
}
for (int i = 0 ; i <= 100; i += 2)
{
if (i == 0)
{
continue;
}
temp = ... | 2301_77966824/first-meeting | 10/10_24/10_24_03/10_24_03.c | C | unknown | 395 |
#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
int count = 0;
for (int i = 1; i <= 100; i++)
{
if (i % 10 == 9)
{
count++;
}
if ((i / 10) % 10 == 9)
{
count++;
}
}
printf("%d", count);
return 0;
} | 2301_77966824/first-meeting | 10/10_24/10_24_04/10_24_04.c | C | unknown | 240 |
#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
int count = 0;
for (int i = 1000; i <= 2000; i++)
{
if ((i % 100 == 0) && (i % 400 == 0))
{
count++;
}
else if ((i % 100 != 0) && (i % 4 == 0))
{
count++;
}
}
printf("%d",count);
return 0;
} | 2301_77966824/first-meeting | 10/10_24/10_24_05/10_24_05.c | C | unknown | 281 |
#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
int a, b, c, d, e, f, g, h, i, j;
scanf("%d %d %d %d %d %d %d %d %d %d ", &a, &b, &c, &d, &e, &f, &g, &h, &i, &j);
int num1 = a >= b ? a : b;
int num2 = c >= d ? c : d;
int num3 = e >= f ? e : f;
int num4 = g >= h ? g : h;
int num5 = i >= j ? i :... | 2301_77966824/first-meeting | 10/10_24/10_24_06/10_24_06.c | C | unknown | 512 |
#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<stdlib.h>
int main()
{
int arr[10] = { 1,2,3,4,5,6,7,8,9,10 };
int i = 0;
for (i; i < 10; i++)
{
printf("%d\n", arr[i]);
}
printf("\n");
int k = 0;
int num = 0;
for (k; k < 10;k++)
{
scanf("%d", &num);
arr[k ] = num;
}
int j = 0;
while (... | 2301_77966824/first-meeting | 10/10_26/10_26_04/10_26_04.c | C | unknown | 394 |
#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
for (int i = 0; i < 10; i++)
{
for (int j = 1; j <= i; j++)
{
int k = i * j;
printf("%d * %d = %d\t", i, j, k);
}
printf("\n");
}
return 0;
} | 2301_77966824/first-meeting | 10/10_27/10_27_02/10_27_02.c | C | unknown | 226 |
#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
for (int i = 100; i <= 200; i++)
{
int count = 0;
for (int num = 2; num * num < i; num++)
{
if (i % num == 0)
{
count++;
break;
}
}
if (count == 0)
{
printf("%d\n", i);
}
}
return 0;
} | 2301_77966824/first-meeting | 10/10_27/10_27_03/10_27_03.c | C | unknown | 290 |
#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
int arr[10] = { 0 };
int len = sizeof(arr) / sizeof(int);
int a = 0;
for (int i = 0; i < len; i++)
{
scanf("%d",&a);
arr[i] = a;
}
for (int j = len - 1; j >= 0; j--)
{
printf("%d ", arr[j]);
}
return 0;
} | 2301_77966824/first-meeting | 10/10_27/10_27_04,c/10_27_04.c | C | unknown | 287 |
#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<stdlib.h>
int main()
{
char arr1[] = {"hello world"};
char arr2[] = {"***********"};
int right = sizeof(arr1) / sizeof(char) - 1;
int left = 0;
while (left <= right)
{
arr2[left] = arr1[left];
arr2[right] = arr1[right];
left++;
right--;
prin... | 2301_77966824/first-meeting | 10/10_29/10_29_01/10_29_01.c | C | unknown | 354 |
#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
int arr1[2][3] = { 0 };
int arr2[3][2] = { 0 };
for (int i = 0; i < 2;i++)
{
for (int j = 0; j < 3; j++)
{
scanf("%d", &arr1[i][j]);
}
}
for (int i = 0; i < 2; i++)
{
for (int j = 0; j < 3; j++)
{
printf("%d ", arr1[i][j]);
}
... | 2301_77966824/first-meeting | 10/10_29/10_29_02/10_29_02.c | C | unknown | 593 |
#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
int arr1[] = { 0,1,2,3,4,5,6,7,8,9 };
int len1 = sizeof(arr1) / sizeof(int);
int arr2[] = { 10,11,12,13,14,15,16,17,18,19 };
int len2 = sizeof(arr1) / sizeof(int);
int temp = 0;
for (int i = 0; i < len1; i++)
{
temp = arr1[i];
arr1[i] = arr2... | 2301_77966824/first-meeting | 10/10_29/10_29_03/10_29_03.c | C | unknown | 454 |
#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
double sum = 0;
double arr1[10] = { 0 };
int len = sizeof(arr1) / sizeof(double);
for (int i = 0; i < len; i++)
{
scanf("%lf", &arr1[i]);
sum += arr1[i];
}
double vue = sum / len;
printf("%lf ", vue);
} | 2301_77966824/first-meeting | 10/10_29/10_29_04/10_29_04.c | C | unknown | 281 |
#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
int a;
while (scanf("%d", &a) != EOF)
{
for (int i = 0; i < a; i++)
{
for (int j = 0; j < a; j++)
{
if (i == 0 || j == 0 || j == a-1 || i == a-1)
{
p... | 2301_77966824/first-meeting | 10/10_30/10_30_01/10_30_01.c | C | unknown | 510 |
#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
int num;
while (scanf("%d", &num) != EOF)
{
for (int i = 0; i < num; i++)
{
for (int j = 0; j < num; j++)
{
if (i == j || (i + j) == num - 1)
{
printf("*");
}
else
{
printf(" ");
}
}
printf("\n");
}... | 2301_77966824/first-meeting | 10/10_30/10_30_02/10_30_02.c | C | unknown | 336 |
#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
int n, m;
while (scanf("%d%d", &n, &m) != EOF)
{
int arr1[n];
int arr2[m];
for (int i = 0; i < n; i++)
{
scanf("%d", &arr1[i]);
}
for (int i = 0; i < m; i++)
{
scanf("%d", &arr2[i]);
}
int i = 0;
int j = 0;
while (i < n &... | 2301_77966824/first-meeting | 10/10_30/10_30_03/10_30_03.c | C | unknown | 595 |
#include <stdio.h>
int main()
{
printf("Hello World!!!");
return 0;
}
| 2301_77966824/first-meeting | 10/10_31/10_31_01/10_31_01.c | C | unknown | 72 |
int Add(int a,int b)
{
int c=0;
c=a+b;
return c;
}
| 2301_77966824/first-meeting | 10/10_31/10_31_02/Add.c | C | unknown | 55 |
#!/bin/bash
# 定义下载地址和文件名
DOWNLOAD_URL="https://cangjie-lang.cn/v1/files/auth/downLoad?nsId=142267&fileName=Cangjie-0.53.13-linux_x64.tar.gz&objectKey=6719f1eb3af6947e3c6af327"
FILE_NAME="Cangjie-0.53.13-linux_x64.tar.gz"
# 检查 cangjie 工具链是否已安装
echo "确保 cangjie 工具链已安装..."
if ! command -v cjc -v &> /de... | 2301_76844282/Cangjie-Examples | FTP/run-ftp.sh | Shell | apache-2.0 | 1,967 |
<!DOCTYPE html>
<html lang="cn">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div>Hello Cangjie!</div>
<p></p>
<script>
let xhr = new XMLHttpRequest()
xhr.open("POST", "/Hello", true)
... | 2301_76844282/Cangjie-Examples | HTTPServer/index.html | HTML | apache-2.0 | 687 |
# 基础镜像,可以先执行 docker pull openjdk:17-jdk-slim
FROM openjdk:17-jdk-slim
# 作者
MAINTAINER suke
# 配置
ENV PARAMS=""
# 时区
ENV TZ=PRC
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# 添加应用
ADD target/ai-mcp-knowledge-app.jar /ai-mcp-knowledge-app.jar
ENTRYPOINT ["sh","-c","java -jar $JAVA_OP... | 2301_78711048/ai-mcp-knowledge | ai-mcp-knowledge-app/Dockerfile | Dockerfile | unknown | 398 |
# 普通镜像构建,随系统版本构建 amd/arm
docker build -t sudonghao/ai-mcp-knowledge-app:2.4 -f ./Dockerfile .
# 兼容 amd、arm 构建镜像
# docker buildx build --load --platform liunx/amd64,linux/arm64 -t fuzhengwei/ai-mcp-knowledge-app:1.0 -f ./Dockerfile . --push | 2301_78711048/ai-mcp-knowledge | ai-mcp-knowledge-app/build.sh | Shell | unknown | 282 |
#!/bin/bash
# https://cr.console.aliyun.com/cn-hangzhou/instance/credentials
# Ensure the script exits if any command fails
set -e
# Define variables for the registry and image
ALIYUN_REGISTRY="registry.cn-hangzhou.aliyuncs.com"
NAMESPACE="fuzhengwei"
IMAGE_NAME="ai-mcp-knowledge-app"
IMAGE_TAG="2.4"
# 读取本地配置文件
if ... | 2301_78711048/ai-mcp-knowledge | ai-mcp-knowledge-app/push.sh | Shell | unknown | 1,384 |
package cn.bugstack.knowledge;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
| 2301_78711048/ai-mcp-knowledge | ai-mcp-knowledge-app/src/main/java/cn/bugstack/knowledge/Application.java | Java | unknown | 314 |
package cn.bugstack.knowledge.config;
import org.springframework.ai.ollama.OllamaEmbeddingModel;
import org.springframework.ai.ollama.api.OllamaApi;
import org.springframework.ai.ollama.api.OllamaOptions;
import org.springframework.ai.vectorstore.SimpleVectorStore;
import org.springframework.ai.vectorstore.pgvector.Pg... | 2301_78711048/ai-mcp-knowledge | ai-mcp-knowledge-app/src/main/java/cn/bugstack/knowledge/config/OllamaConfig.java | Java | unknown | 1,963 |
package cn.bugstack.knowledge.config;
import io.micrometer.observation.ObservationRegistry;
import org.springframework.ai.chat.client.ChatClient;
import org.springframework.ai.chat.client.DefaultChatClientBuilder;
import org.springframework.ai.chat.client.advisor.PromptChatMemoryAdvisor;
import org.springframework.ai.... | 2301_78711048/ai-mcp-knowledge | ai-mcp-knowledge-app/src/main/java/cn/bugstack/knowledge/config/OpenAIConfig.java | Java | unknown | 3,438 |
package cn.bugstack.knowledge.trigger.job;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.ai.chat.client.ChatClient;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
@Slf4j
@Service
public class MCPServerCSDNJo... | 2301_78711048/ai-mcp-knowledge | ai-mcp-knowledge-trigger/src/main/java/cn/bugstack/knowledge/trigger/job/MCPServerCSDNJob.java | Java | unknown | 5,308 |
curl http://117.72.115.188:11434/api/generate \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-r1:1.5b",
"prompt": "1+1",
"stream": false
}' | 2301_78711048/ai-mcp-knowledge | docs/dev-ops/api/curl_local.sh | Shell | unknown | 190 |
curl http://58a39caa684c41bf9bed-deepseek-r1-llm-api.gcs-xy1a.jdcloud.com/api/generate \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-r1:1.5b",
"prompt": "1+1",
"stream": false
}' | 2301_78711048/ai-mcp-knowledge | docs/dev-ops/api/curl_yun.sh | Shell | unknown | 231 |
.chat-item {
@apply flex items-center gap-2 p-2 hover:bg-gray-100 rounded cursor-pointer transition-colors;
}
.chat-item.selected {
@apply bg-blue-50; /* 或使用深色背景如bg-gray-200 */
}
.chat-item-content {
@apply flex-1 truncate;
}
.chat-actions {
@apply flex items-center justify-end opacity-0 ... | 2301_78711048/ai-mcp-knowledge | docs/dev-ops/nginx/html/css/index.css | CSS | unknown | 2,351 |
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>解析仓库</title>
<style>
body {
font-family: 'Microsoft YaHei', '微软雅黑', sans-serif;
background-color: #f0f0f0;
display: ... | 2301_78711048/ai-mcp-knowledge | docs/dev-ops/nginx/html/git.html | HTML | unknown | 4,562 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AiRagKnowledge - By 小傅哥</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
... | 2301_78711048/ai-mcp-knowledge | docs/dev-ops/nginx/html/index.html | HTML | unknown | 5,824 |
const chatArea = document.getElementById('chatArea');
const messageInput = document.getElementById('messageInput');
const submitBtn = document.getElementById('submitBtn');
const newChatBtn = document.getElementById('newChatBtn');
const chatList = document.getElementById('chatList');
const welcomeMessage = document.getE... | 2301_78711048/ai-mcp-knowledge | docs/dev-ops/nginx/html/js/index.js | JavaScript | unknown | 14,751 |
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>文件上传</title>
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
<script src="https://cdn.tailwindcss.com"></script>
<style>
... | 2301_78711048/ai-mcp-knowledge | docs/dev-ops/nginx/html/upload.html | HTML | unknown | 6,434 |
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AI Chat</title>
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body class="bg-gray-100 h-screen">
<div class="container mx-auto max-w-3xl h-screen... | 2301_78711048/ai-mcp-knowledge | docs/dev-ops/nginx/html/第4节:ai-case-04.html | HTML | unknown | 4,288 |
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AI Chat Interface</title>
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body class="bg-gray-50">
<div class="flex h-screen">
<!-- Sidebar -->
... | 2301_78711048/ai-mcp-knowledge | docs/dev-ops/nginx/html/第7节:ai-case-01.html | HTML | unknown | 11,283 |
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>知识库上传</title>
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body class="bg-gray-100 min-h-screen p-8">
<div class="max-w-2xl mx-auto bg-white rou... | 2301_78711048/ai-mcp-knowledge | docs/dev-ops/nginx/html/第7节:ai-case-02.html | HTML | unknown | 6,417 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AI Chat Interface</title>
<script src="https://cdn.tailwindcss.com"></script>
<script>
// Simple utility to handle sending messages and receiving data ... | 2301_78711048/ai-mcp-knowledge | docs/dev-ops/nginx/html/第7节:ai-case-03.html | HTML | unknown | 4,815 |
cmake_minimum_required(VERSION 3.14)
project(ukui-mstm)
set(VERSION_MAJOR 1)
set(VERSION_MINOR 0)
set(VERSION_MICRO 0)
set(UKUI_STMS_VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_MICRO})
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_packa... | 2301_79280419/UKUI-quick | CMakeLists.txt | CMake | unknown | 1,505 |
#include "mstm.h"
STMS::STMS(QObject *parent) : QObject(parent)
{
}
| 2301_79280419/UKUI-quick | plugin/mstm.cpp | C++ | unknown | 70 |
#ifndef MTS_H
#define MTS_H
#include <QObject>
#include <QTimer>
#include <QString>
class STMS : public QObject
{
Q_OBJECT
public:
explicit STMS(QObject *parent = nullptr);
};
#endif // MTS_H
| 2301_79280419/UKUI-quick | plugin/mstm.h | C++ | unknown | 205 |
#include "ukui-mstm-plugin.h"
#include "mstm.h"
#include <QQmlEngine>
void UkuiStmsPlugin::registerTypes(const char* uri)
{
Q_ASSERT(QString(uri) == QLatin1String("org.ukui.mstm"));
qmlRegisterModule(uri, 1, 0);
qmlRegisterType<STMS>(uri, 1, 0, "MSTM");
Q_INIT_RESOURCE(res);
}
| 2301_79280419/UKUI-quick | plugin/ukui-mstm-plugin.cpp | C++ | unknown | 295 |
#ifndef UKUI_MTS_PLUGIN_H
#define UKUI_MTS_PLUGIN_H
#include <QQmlExtensionPlugin>
class UkuiStmsPlugin : public QQmlExtensionPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
public:
void registerTypes(const char *uri) override;
};
#endif
| 2301_79280419/UKUI-quick | plugin/ukui-mstm-plugin.h | C++ | unknown | 273 |
import QtQuick 2.15
import QtQuick.Layouts 1.15
import org.ukui.quick.widgets 1.0
import org.ukui.quick.items 1.0
import QtQuick.Controls 2.15
import QtQuick.Controls 2.15 as Controls
WidgetItem {
id: rootWidget
Layout.preferredWidth: 450
Layout.fillHeight: true
clip: false
RowLayout {
anc... | 2301_79280419/UKUI-quick | widget/ui/main.qml | QML | unknown | 1,081 |
import numpy as np
import random
import math as mt
class Linear:
def __init__(self,w,b,size):
self.m=size
self.alpha=0.001 #学习率
self.beta1=0.9
self.beta1t=1 #beta1的t次方
self.beta2=0.999
self.beta2t=1
self.mt=np.zeros(2)
self.vt=np.zeros(2)... | 2301_79348834/linear_reg | 线性回归.py | Python | apache-2.0 | 2,779 |
let searcheText = "皮皮虾" // 搜索关键字,用于在抖音搜索指定用户
let inputText = "你好,我看了你的作品觉得非常喜欢,可以交个朋友吗" // 私信发送的文本内容
// 定义一个查找文本的函数,用于判断指定文本的 TextView 是否存在
function findText(text) {
// 等待并找到所有符合条件的 TextView
var textView
var textViews = className("android.widget.TextView").find()
// 遍历找到的 TextView
for (v... | 2301_78992106/oneChat | index.js | JavaScript | unknown | 3,092 |
/**
* @file: selfCloseInputTag.js
* @desc: 遍历指定目录下 .ux 文件,将其中 input 标签由 <input **></input> 转换为 <input ** />
* @date: 2019-01-23
*/
const fs = require('fs')
const path = require('path')
const quickappCodePath = './src/'
const main = codePath => {
const traversing = cpath => {
const files = fs.readdirSync(cp... | 2301_79280419/ai-drive-tool | scripts/selfCloseInputTag.js | JavaScript | unknown | 968 |
.flex-box-mixins (@column, @justify, @align) {
flex-direction: @column;
justify-content: @justify;
align-items: @align;
} | 2301_79280419/ai-drive-tool | src/assets/styles/mixins.less | Less | unknown | 127 |
@import './variables.less';
@import './mixins.less';
| 2301_79280419/ai-drive-tool | src/assets/styles/style.less | Less | unknown | 53 |
@brand: #09ba07;
@white: #ffffff;
@black: #000000;
@grey: #9393aa;
@red: #fa0101;
@green: #ffff00;
@size-factor: 5px;
| 2301_79280419/ai-drive-tool | src/assets/styles/variables.less | Less | unknown | 120 |
/**
* 封装了一些网络请求方法,方便通过 Promise 的形式请求接口
*/
import $fetch from '@system.fetch'
import { queryString } from './utils'
const TIMEOUT = 300000
Promise.prototype.finally = function(callback) {
const P = this.constructor
return this.then(
value => P.resolve(callback()).then(() => value),
reason =>
P.resol... | 2301_79280419/ai-drive-tool | src/helper/ajax.js | JavaScript | unknown | 2,271 |
import $ajax from '../ajax'
/**
* @desc 在实际开发中,您可以将 baseUrl 替换为您的请求地址前缀;
* 备注:如果您不需要发起请求,删除 apis 目录,以及 app.ux 中引用即可;
*/
const baseUrl ="http://csreu8fhri0c73d83hjg-3008.agent.damodel.com"
//ai接口
export function getTranslate(data){
return $ajax.post(baseUrl+'/translate',data)
}
| 2301_79280419/ai-drive-tool | src/helper/apis/example.js | JavaScript | unknown | 392 |
/**
* 您可以将常用的方法、或系统 API,统一封装,暴露全局,以便各页面、组件调用,而无需 require / import.
*/
import prompt from '@system.prompt';
/**
* 拼接 url 和参数
*/
export function queryString(url, query) {
let str = [];
for (let key in query) {
str.push(key + '=' + query[key]);
}
let paramStr = str.join('&');
return paramStr ... | 2301_79280419/ai-drive-tool | src/helper/utils.js | JavaScript | unknown | 591 |
/**
* @file: selfCloseInputTag.js
* @desc: 遍历指定目录下 .ux 文件,将其中 input 标签由 <input **></input> 转换为 <input ** />
* @date: 2019-01-23
*/
const fs = require('fs')
const path = require('path')
const quickappCodePath = './src/'
const main = codePath => {
const traversing = cpath => {
const files = fs.readdirSync(cp... | 2301_79280419/ai-food-plan | scripts/selfCloseInputTag.js | JavaScript | unknown | 968 |
.flex-box-mixins (@column, @justify, @align) {
flex-direction: @column;
justify-content: @justify;
align-items: @align;
} | 2301_79280419/ai-food-plan | src/assets/styles/mixins.less | Less | unknown | 127 |
@import './variables.less';
@import './mixins.less';
| 2301_79280419/ai-food-plan | src/assets/styles/style.less | Less | unknown | 53 |
@brand: #09ba07;
@white: #ffffff;
@black: #000000;
@grey: #9393aa;
@red: #fa0101;
@green: #ffff00;
@size-factor: 5px;
| 2301_79280419/ai-food-plan | src/assets/styles/variables.less | Less | unknown | 120 |
/**
* 封装了一些网络请求方法,方便通过 Promise 的形式请求接口
*/
import $fetch from '@system.fetch'
import { queryString } from './utils'
const TIMEOUT = 300000
Promise.prototype.finally = function(callback) {
const P = this.constructor
return this.then(
value => P.resolve(callback()).then(() => value),
reason =>
P.resol... | 2301_79280419/ai-food-plan | src/helper/ajax.js | JavaScript | unknown | 2,271 |
import $ajax from '../ajax'
/**
* @desc 在实际开发中,您可以将 baseUrl 替换为您的请求地址前缀;
* 备注:如果您不需要发起请求,删除 apis 目录,以及 app.ux 中引用即可;
*/
const baseUrl ="http://csreu8fhri0c73d83hjg-3008.agent.damodel.com"
//ai
export function getTranslate(data){
return $ajax.post(baseUrl+'/translate',data)
}
| 2301_79280419/ai-food-plan | src/helper/apis/example.js | JavaScript | unknown | 386 |
/**
* 您可以将常用的方法、或系统 API,统一封装,暴露全局,以便各页面、组件调用,而无需 require / import.
*/
import prompt from '@system.prompt';
/**
* 拼接 url 和参数
*/
export function queryString(url, query) {
let str = [];
for (let key in query) {
str.push(key + '=' + query[key]);
}
let paramStr = str.join('&');
return paramStr ... | 2301_79280419/ai-food-plan | src/helper/utils.js | JavaScript | unknown | 591 |
"""
音频格式转换工具
支持将.m4a格式转换为.wav格式
"""
import os
import subprocess
import tempfile
from pathlib import Path
from typing import Optional, Tuple
import logging
# 配置日志
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
class AudioConverter:
"""音频格式转换器"""
def __init__(self):
"... | 2301_79424223/GitCode | audio_converter.py | Python | unknown | 11,108 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
音频录制模块
提供录音功能的核心类
"""
import sounddevice as sd
import numpy as np
import wave
import threading
import time
from datetime import datetime
import os
class AudioRecorder:
def __init__(self, sample_rate=16000, channels=1, dtype=np.float32):
"""
初始化录音器... | 2301_79424223/GitCode | audio_recorder.py | Python | unknown | 5,193 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
全自动化工作流程模块
实现录音→转文本→生成摘要→推送飞书的完整自动化流程
"""
import os
import json
import time
import subprocess
from datetime import datetime
from pathlib import Path
from config import get_config
from speech_recognition import SpeechRecognizer
from llm_processor import LLMProcessor
... | 2301_79424223/GitCode | automation_workflow.py | Python | unknown | 14,335 |
const client = require("./client");
const spinner = require("./spinner");
const lark = require('@larksuiteoapi/node-sdk');
const addTable = async (app_token, table) => {
const execSpinner = spinner("创建中");
try {
const options = {};
if (client.userAccessToken) {
Object.assign(options, lark.withUserAcc... | 2301_79424223/GitCode | bitable/addTable.js | JavaScript | unknown | 688 |
const client = require("./client");
const spinner = require("./spinner");
const lark = require('@larksuiteoapi/node-sdk');
const addTableRecord = async (app_token, table_id, records) => {
const execSpinner = spinner("添加中");
try {
const options = {};
if (client.userAccessToken) {
Object.assign(options... | 2301_79424223/GitCode | bitable/addTableRecord.js | JavaScript | unknown | 755 |
const lark = require("@larksuiteoapi/node-sdk");
// 示例配置文件
// 请复制此文件为 client.js 并填入真实的凭证信息
const client = new lark.Client({
appId: "cli_xxxxxxxxxxxxxxxxx", // 替换为你的App ID
appSecret: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", // 替换为你的App Secret
appType: lark.AppType.SelfBuild,
domain: lark.Domain.Feishu
});
// 可选:配置... | 2301_79424223/GitCode | bitable/client.example.js | JavaScript | unknown | 1,224 |
const lark = require("@larksuiteoapi/node-sdk");
const fs = require('fs');
const path = require('path');
// 读取.env文件
function loadEnvConfig() {
try {
const envPath = path.join(__dirname, '../.env');
const envContent = fs.readFileSync(envPath, 'utf8');
const envVars = {};
envContent.split('\n').f... | 2301_79424223/GitCode | bitable/client.js | JavaScript | unknown | 1,217 |
const client = require("./client");
const spinner = require("./spinner");
const lark = require("@larksuiteoapi/node-sdk");
const createTable = async (body) => {
const execSpinner = spinner("创建中");
try {
const requestOptions = {};
if (client.userAccessToken) {
Object.assign(requestOptions, lark.withU... | 2301_79424223/GitCode | bitable/createTable.js | JavaScript | unknown | 643 |
const client = require("./client");
const spinner = require("./spinner");
const lark = require('@larksuiteoapi/node-sdk');
const deleteTable = async (app_token, table_id, records) => {
const execSpinner = spinner("删除中");
try {
const options = {};
if (client.userAccessToken) {
Object.assign(options, l... | 2301_79424223/GitCode | bitable/deleteTable.js | JavaScript | unknown | 749 |
const client = require("./client");
const spinner = require("./spinner");
const lark = require('@larksuiteoapi/node-sdk');
const exportTable = async (app_token, table_id) => {
const execSpinner = spinner("导出中");
try {
const options = {};
if (client.userAccessToken) {
Object.assign(options, lark.withU... | 2301_79424223/GitCode | bitable/exportTable.js | JavaScript | unknown | 727 |
const inquirer = require("inquirer");
const createTable = require("./createTable");
const addTable = require("./addTable");
const addTableRecord = require("./addTableRecord");
const deleteTable = require("./deleteTable");
const exportTable = require("./exportTable");
const { pushSummarizationToBitable } = require("./pu... | 2301_79424223/GitCode | bitable/index.js | JavaScript | unknown | 3,417 |
const client = require("./client");
const spinner = require("./spinner");
const lark = require('@larksuiteoapi/node-sdk');
const fs = require('fs');
const path = require('path');
// 配置文件路径
const CONFIG_FILE = path.join(__dirname, 'bitable_config.json');
// 读取或创建配置文件
const readConfig = () => {
try {
if (fs.exist... | 2301_79424223/GitCode | bitable/pushSummarization.js | JavaScript | unknown | 9,182 |