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 |
|---|---|---|---|---|---|
"""
移动平均线策略
"""
import logging
from datetime import datetime
from typing import Dict, List
import pandas as pd
import numpy as np
from .base import BaseStrategy
logger = logging.getLogger(__name__)
class MovingAverageStrategy(BaseStrategy):
"""移动平均线交叉策略"""
def __init__(self, strategy_id: str, name: str... | 2301_81749185/AutoTrade | backend/app/strategies/moving_average.py | Python | unknown | 10,264 |
"""
波动率突破策略
"""
import logging
from datetime import datetime
from typing import Dict, List
import pandas as pd
import numpy as np
from .base import BaseStrategy
logger = logging.getLogger(__name__)
class VolatilityBreakoutStrategy(BaseStrategy):
"""波动率突破策略"""
def __init__(self, strategy_id: str, name: ... | 2301_81749185/AutoTrade | backend/app/strategies/volatility_breakout.py | Python | unknown | 13,394 |
"""
A股指数期权自动交易系统主程序
"""
import asyncio
import logging
from contextlib import asynccontextmanager
from fastapi import FastAPI, WebSocket, WebSocketDisconnect
from fastapi.middleware.cors import CORSMiddleware
from fastapi.staticfiles import StaticFiles
from fastapi.responses import HTMLResponse
from app.core.config im... | 2301_81749185/AutoTrade | backend/main.py | Python | unknown | 8,903 |
module.exports = {
presets: [
"@vue/cli-plugin-babel/preset",
// ["es2015", { "modules": false }]
],
// "plugins": [
// [
// "component",
// {
// "libraryName": "element-ui",
// "styleLibraryName": "theme-chalk"
// }
// ]
// ]
};
| 2301_80339408/match | babel.config.js | JavaScript | unknown | 288 |
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>logo1.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>... | 2301_80339408/match | public/index.html | HTML | unknown | 609 |
<template>
<div id="app">
<router-view/>
</div>
</template>
<script>
export default {
name: 'App',
components: {
},
created() {
// this.$store.dispatch("initUserInfo");
}
}
</script>
<style>
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
... | 2301_80339408/match | src/App.vue | Vue | unknown | 440 |
import requests from "@/api/requests";
// //登录
export const reqUserLogin = (data) =>
requests("/auth/login", {
method: "post",
headers: {
"Content-Type": "application/json", // 声明 JSON 格式
},
data: JSON.stringify(data), // 数据需转为 JSON 字符串
});
// 登录
// export const reqUserLogin = (data) => reque... | 2301_80339408/match | src/api/index.js | JavaScript | unknown | 5,423 |
import axios from "axios";
import nProgress from "nprogress";
import "nprogress/nprogress.css";
import router from "@/router"; // 导入router
import store from "@/store";
// 创建axios实例
const requests = axios.create({
baseURL: "/api",
timeout: 20000, // 请求超时时间
});
// 添加请求拦截器
requests.interceptors.request.use(
functi... | 2301_80339408/match | src/api/requests.js | JavaScript | unknown | 3,875 |
@font-face {
font-family: "iconfont"; /* Project id 4469301 */
src: url('iconfont.woff2?t=1761482234209') format('woff2'),
url('iconfont.woff?t=1761482234209') format('woff'),
url('iconfont.ttf?t=1761482234209') format('truetype');
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px... | 2301_80339408/match | src/assets/css/iconfont.css | CSS | unknown | 518 |
export const emojis = [
{ symbol: "😀", name: "嘿嘿" },
{ symbol: "😃", name: "哈哈" },
{ symbol: "😄", name: "大笑" },
{ symbol: "😁", name: "嘻嘻" },
{ symbol: "😆", name: "斜眼笑" },
{ symbol: "😅", name: "苦笑" },
{ symbol: "🤣", name: "笑得满地打滚" },
{ symbol: "😂", name: "笑哭了" },
{ symbol: "🙂", name: "... | 2301_80339408/match | src/assets/js/biaoqing.js | JavaScript | unknown | 14,915 |
<template>
<div class="nav-item">
<!-- No children - simple menu item -->
<el-menu-item
:index="resolvePath(basePath)"
v-if="!hasChildren"
class="nav-item__menu-item"
>
<i v-if="item.icon" :class="item.icon"></i>
<span slot="title">{{ item.name }}</span>
</el-me... | 2301_80339408/match | src/components/NavItem.vue | Vue | unknown | 1,830 |
<template>
<div class="chat">
<!--问题-->
<div style="text-align: right">
<div class="el-card chat-right">
{{ msg.question }}
</div>
</div>
<!--AI回答-->
<div style="text-align: left">
<div class="el-card chat-left">
{{ msg.answer }}
</div>
</di... | 2301_80339408/match | src/components/ai/chat.vue | Vue | unknown | 1,296 |
<template>
<div class="breadcrumb">
<el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item v-for="v in lists" :key="v.path">
<router-link :to="v.path">{{ v.meta.title }}</router-link>
</el-breadcrumb-item>
</el-breadcrumb>
</div>
</template>
<script>
export... | 2301_80339408/match | src/components/breadcrumb.vue | Vue | unknown | 1,197 |
<template>
<div v-if="localComments.length > 0">
<!-- 评论列表渲染 -->
<div
class="comments-o"
:class="[cNum > 0 ? 'sub-comment' : 'main-comment']"
v-for="(item, index) in currentPageComments"
:key="item.id"
>
<!-- 用户信息展示 -->
<div class="c-title">
<router-l... | 2301_80339408/match | src/components/competition/comment.vue | Vue | unknown | 18,318 |
<template>
<div class="competition-card">
<div class="competition-item">
<!-- 左侧图片区域 -->
<div class="competition-item-left">
<img :src="item.image || defaultPic" class="competition-pic" alt="比赛图片">
</div>
<!-- 右侧信息区域 -->
<div class="competition-item-right">
... | 2301_80339408/match | src/components/competition/competition.vue | Vue | unknown | 3,865 |
<template>
<el-aside width="200px" class="aside">
<el-menu
:default-active="activePath"
exact
class="el-menu-vertical-demo"
router
background-color="#545c64"
text-color="#fff"
active-text-color="#ffd04b"
>
<div class="logo-container">
<img sr... | 2301_80339408/match | src/components/navMenu.vue | Vue | unknown | 1,788 |
import Vue from "vue";
import App from "./App.vue";
// 引入vuex
import store from "./store";
// 引入路由
import router from "./router";
// 引入基础样式
// import './assets/css/base.css'
import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
// 引入自定义图标字体
// 引入UI组件
Vue.use(ElementUI);
Vue.config.produc... | 2301_80339408/match | src/main.js | JavaScript | unknown | 461 |
<template>
<div class="common-layout">
<el-container style="height: 100%; width: 100%; margin: 0 auto">
<!-- Header -->
<el-header
style="
height: 50px;
width: 100%;
background-color: rgba(0, 102, 255, 0.06);
align-items: center;
line-height: 5... | 2301_80339408/match | src/pages/Home/Ask/index.vue | Vue | unknown | 6,867 |
<template>
<div class="competition-container">
<!-- 搜索表单 -->
<el-card class="search-card">
<el-form :model="searchForm" label-position="right" label-width="100px">
<el-row :gutter="20">
<el-col :md="12" :lg="6">
<el-form-item label="比赛名字">
<el-input
... | 2301_80339408/match | src/pages/Home/Competition/competition/index.vue | Vue | unknown | 6,678 |
<template>
<div id="app" class="container">
<div class="header" v-if="detailContext.competitionName">
<h1>{{ detailContext.competitionName }}</h1>
</div>
<div class="content-section">
<div class="left-column">
<div class="info-item" v-if="detailContext.organizeName">
... | 2301_80339408/match | src/pages/Home/Competition/competitionDetail/index.vue | Vue | unknown | 6,991 |
<template>
<router-view></router-view>
</template>
<script>
export default {
name: "Competition",
}
</script>
<style>
</style> | 2301_80339408/match | src/pages/Home/Competition/index.vue | Vue | unknown | 130 |
<template>
<router-view></router-view>
</template>
<script>
export default {
name:"Player"
}
</script>
<style>
</style> | 2301_80339408/match | src/pages/Home/Competition/player/index.vue | Vue | unknown | 136 |
<template>
<el-card class="box-card">
<div class="title">个人信息</div>
<div class="maincontain">
<!-- 头像区域 -->
<div class="avatar-container">
<el-avatar
shape="square"
:size="150"
fit="fill"
:src="userInfo.avatar"
></el-avatar>
... | 2301_80339408/match | src/pages/Home/Competition/player/player/index.vue | Vue | unknown | 4,723 |
<template>
<div class="chat-container">
<!-- 左侧用户列表 -->
<div class="left-side">
<!-- 搜索框 -->
<div class="search-wrapper">
<el-input
v-model="searchUserName"
placeholder="回车搜索用户"
class="search-input"
@keydown.enter.native="searchUserForForm"... | 2301_80339408/match | src/pages/Home/Competition/player/privateMessage/beifen.vue | Vue | unknown | 14,761 |
<template>
<div class="chat-container">
<!-- 左侧用户列表 -->
<div class="left-side">
<!-- 搜索框 -->
<div class="search-wrapper">
<el-input
v-model="searchUserName"
placeholder="回车搜索用户"
class="search-input"
@keydown.enter.native="searchUserForForm"... | 2301_80339408/match | src/pages/Home/Competition/player/privateMessage/index.vue | Vue | unknown | 31,220 |
<template>
<div>
<el-card
style="width: 99%; height: 100%; margin-left: 10px; margin-top: 10px"
shadow="hover"
>
<!-- 表单标题 -->
<div slot="header" class="card-header">
<div>
<span style="margin-right: 20px">个人资料管理</span>
<el-button
type="text"
... | 2301_80339408/match | src/pages/Home/Person/index.vue | Vue | unknown | 11,860 |
<template>
<div class="home-container">
<div class="home-top">
<div class="home-top-left">
<el-carousel
indicator-position="inside"
ref="carouselRef"
:height="carouselHeight"
>
<el-carousel-item
v-for="item in items"
... | 2301_80339408/match | src/pages/Home/index/index.vue | Vue | unknown | 9,912 |
<template>
<div class="home-container">
<el-container class="home-wrapper">
<!-- 左侧导航菜单 -->
<el-aside width="220px" class="nav-menu-wrapper">
<navMenu :menuItems="menuItems"/>
</el-aside>
<el-container direction="vertical" class="main-container">
<!-- 顶部头部区域 -->
<e... | 2301_80339408/match | src/pages/Home/index.vue | Vue | unknown | 4,070 |
<template>
<div class="body">
<el-form
:rules="rules"
ref="loginForm"
:model="loginForm"
class="loginContainer"
label-width="70px"
>
<h3 class="loginTitle">用户登录</h3>
<el-form-item label="用户名:" prop="username">
<el-input
type="text"
v-model=... | 2301_80339408/match | src/pages/Login/index.vue | Vue | unknown | 7,672 |
<template>
<div class="common-layout">
<el-container style="height: 100%; width: 100%; margin: 0 auto">
<!-- Header -->
<el-header
style="
height: 50px;
width: 100%;
background-color: rgba(0, 102, 255, 0.06);
align-items: center;
line-height: 5... | 2301_80339408/match | src/pages/Manage/Ask/index.vue | Vue | unknown | 6,867 |
<template>
<div class="competition-container">
<!-- 搜索表单 -->
<el-card class="search-card">
<el-form :model="searchForm" label-position="right" label-width="100px">
<el-row :gutter="20">
<el-col :md="12" :lg="6">
<el-form-item label="比赛名字">
<el-input
... | 2301_80339408/match | src/pages/Manage/Competition/competition/index.vue | Vue | unknown | 6,684 |
<template>
<div id="app" class="container">
<div class="header" v-if="detailContext.competitionName">
<h1>{{ detailContext.competitionName }}</h1>
</div>
<div class="content-section">
<div class="left-column">
<div class="info-item" v-if="detailContext.organizeName">
... | 2301_80339408/match | src/pages/Manage/Competition/competitionDetail/index.vue | Vue | unknown | 6,931 |
<template>
<router-view></router-view>
</template>
<script>
export default {
name: "Competition",
}
</script>
<style>
</style> | 2301_80339408/match | src/pages/Manage/Competition/index.vue | Vue | unknown | 130 |
<template>
<router-view></router-view>
</template>
<script>
export default {
name:"managePlayer"
}
</script>
<style>
</style> | 2301_80339408/match | src/pages/Manage/Competition/player/index.vue | Vue | unknown | 142 |
<template>
<el-card class="box-card">
<div class="title">个人信息</div>
<div class="maincontain">
<!-- 头像区域 -->
<div class="avatar-container">
<el-avatar
shape="square"
:size="150"
fit="fill"
:src="userInfo.avatar"
></el-avatar>
... | 2301_80339408/match | src/pages/Manage/Competition/player/player/index.vue | Vue | unknown | 4,665 |
<template>
<div class="chat-container">
<!-- 左侧用户列表 -->
<div class="left-side">
<!-- 搜索框 -->
<div class="search-wrapper">
<el-input
v-model="searchUserName"
placeholder="回车搜索用户"
class="search-input"
@keydown.enter.native="searchUserForForm"... | 2301_80339408/match | src/pages/Manage/Competition/player/privateMessage/index.vue | Vue | unknown | 31,220 |
<template>
<div>
<el-card
style="width: 99%; height: 100%; margin-left: 10px; margin-top: 10px"
shadow="hover"
>
<!-- 表单标题 -->
<div slot="header" class="card-header">
<div>
<span style="margin-right: 20px">个人资料管理</span>
<el-button
type="text"
... | 2301_80339408/match | src/pages/Manage/Person/index.vue | Vue | unknown | 11,857 |
<template>
<div class="home-container">
<div class="home-top">
<div class="home-top-left">
<el-carousel
indicator-position="inside"
ref="carouselRef"
:height="carouselHeight"
>
<el-carousel-item
v-for="item in items"
... | 2301_80339408/match | src/pages/Manage/index/index.vue | Vue | unknown | 9,912 |
<template>
<div class="home-container">
<el-container class="home-wrapper">
<!-- 左侧导航菜单 -->
<el-aside width="220px" class="nav-menu-wrapper">
<navMenu :menuItems="menuItems"/>
</el-aside>
<el-container direction="vertical" class="main-container">
<!-- 顶部头部区域 -->
<e... | 2301_80339408/match | src/pages/Manage/index.vue | Vue | unknown | 4,546 |
<template>
<div class="competitions-container">
<!-- 添加比赛按钮 -->
<div class="add-button">
<el-button type="primary" icon="el-icon-plus" @click="showAddDialog" round
>添加比赛</el-button
>
</div>
<!-- 比赛表格 -->
<el-table
:data="competitionsData"
border
... | 2301_80339408/match | src/pages/Manage/manage/competitions/index.vue | Vue | unknown | 8,958 |
<template>
<router-view></router-view>
</template>
<script>
export default {
name:"manager",
}
</script>
<style>
</style> | 2301_80339408/match | src/pages/Manage/manage/index.vue | Vue | unknown | 142 |
<template>
<div class="competitions-container">
<!-- 用户表格 -->
<el-table
:data="usersData"
border
stripe
style="width: 100%"
:cell-style="{ padding: '8px' }"
>
<el-table-column fixed prop="userId" label="ID" width="100">
</el-table-column>
<el-t... | 2301_80339408/match | src/pages/Manage/manage/user/index.vue | Vue | unknown | 4,515 |
<template>
<div class="register-wrap">
<el-form
class="register-container"
:rules="rules"
ref="registerForm"
:model="registerForm"
label-width="100px"
>
<h1 class="title">用户注册</h1>
<el-form-item label="登录账号:" prop="username">
<el-input
type="text"
... | 2301_80339408/match | src/pages/Register/index.vue | Vue | unknown | 7,575 |
import Vue from "vue";
import VueRouter from "vue-router";
//用户
import Login from "../pages/Login";
import Register from "../pages/Register";
import Home from "../pages/Home";
import Person from "../pages/Home/Person";
import Competition from "../pages/Home/Competition";
import competition from "../pages/Home/Competiti... | 2301_80339408/match | src/router/index.js | JavaScript | unknown | 9,576 |
import Vue from 'vue'
import Vuex from 'vuex'
import userModule from './modules/user'
Vue.use(Vuex)
const state = {
// userInfo: {},
}
const mutations = {
}
const actions = {
}
const getters = {
}
export default new Vuex.Store({
modules: {
user: userModule
},
actions,
mutations,
state,
g... | 2301_80339408/match | src/store/index.js | JavaScript | unknown | 329 |
// store/modules/user.js
import { reqGetUserInfo } from "@/api";
const userModule = {
namespaced: true,
state: {
token: sessionStorage.getItem('token') || '',
userInfo:{},
userForm: {
userId: "",
userType: "",
username: "",
realName: "",
email: "",
major:... | 2301_80339408/match | src/store/modules/user.js | JavaScript | unknown | 1,397 |
* {
padding: 0;
margin: 0;
}
ul,
li {
list-style-type: none;
padding: 0;
margin: 0;
}
html,
body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
border: 0;
} | 2301_80339408/match | src/styles/variables.scss | SCSS | unknown | 223 |
export function getToken() {
return sessionStorage.getItem("token");
}
export function setToken(token) {
sessionStorage.setItem("token", token);
}
export function removeToken() {
sessionStorage.removeItem("token");
sessionStorage.removeItem("userInfo");
}
| 2301_80339408/match | src/utils/auth.js | JavaScript | unknown | 278 |
// Websocket地址
const url = "ws://localhost:8081/api/ws";
// Websocket实例
let ws = null;
// 重连定时器实例
let reconnectTimer = null;
// 当前用户id
let currentUserId = null;
// websocket重连开关
let isReconnecting = false;
// websocket对象
const websocket = {
// websocket建立连接
Init(userId) {
if (!userId) {
... | 2301_80339408/match | src/utils/websocket.js | JavaScript | unknown | 4,695 |
const { defineConfig } = require("@vue/cli-service");
module.exports = defineConfig({
transpileDependencies: true,
// compact: true, // 禁用优化降级
lintOnSave: false,
css: {
loaderOptions: {
scss: {
additionalData: `@use "@/styles/variables.scss";`, // 替换旧版 prependData
},
},
},
//配置代理... | 2301_80339408/match | vue.config.js | JavaScript | unknown | 607 |
import os
import torch
from transformers import LlamaForCausalLM, CodeLlamaTokenizer,AutoTokenizer
from tqdm import tqdm
import json
import zipfile
# 加载配置文件
#TODO
def load_config(config_path="./test_conf.json"):
with open(config_path, 'r', encoding='utf-8') as f:
config = json.load(f)
return config
#... | 2301_81765241/000136 | test/test.py | Python | mit | 2,993 |
import json
from peft import LoraConfig, TaskType
# 从 JSON 文件读取配置
def load_lo_conf(json_path):
with open(json_path, "r") as f:
config = json.load(f)
# 将 JSON 中的配置转换为 LoraConfig 对象
lo_conf = LoraConfig(
r=config["r"],
target_modules=config["target_modules"],
task_type=Ta... | 2301_81765241/000136 | train/lora.py | Python | mit | 626 |
import json
def dump_parser_conf_new():
# 定义动态参数
#TODO
EPOCH = 10
LR = 5e-4
NAME = "mix_cl_a50"
# 读取 JSON 模板
with open("./parser_conf.json", "r") as f:
config = json.load(f)
# 使用动态参数填充占位符
for key, value in config.items():
if isinstance(value, str): # 只对字符串字段进行替换
... | 2301_81765241/000136 | train/parser_make.py | Python | mit | 920 |
accelerate launch --config_file ../config/mach_config.yaml --main_process_port 29507 train.py | 2301_81765241/000136 | train/start.sh | Shell | mit | 94 |
from transformers import AutoModelForCausalLM,TrainingArguments, AutoTokenizer , Trainer,HfArgumentParser
import torch
from peft import get_peft_model
import os
import sys
sys.path.append(".")
from lora import lo_conf
from datasets import load_dataset
# 配置随机种子
torch.manual_seed(2618)
import torch.nn.functional as F... | 2301_81765241/000136 | train/train.py | Python | mit | 3,696 |
import argparse
from dataclasses import dataclass, field
from typing import Optional
from transformers import TrainingArguments,HfArgumentParser
# 定义模型相关的参数:
@dataclass()
class ModelArguments:
pretrained_model_name_or_path: Optional[str] = field(
default="CodeLlama7b_model"
)
# 定义与数据处理相关的参数:
@dataclas... | 2301_81765241/000136 | train/train_parser.py | Python | mit | 2,563 |
import torch
import tqdm
import k_diffusion.sampling
from modules import sd_samplers_common, sd_samplers_kdiffusion, sd_samplers
from tqdm.auto import trange, tqdm
from k_diffusion import utils
from k_diffusion.sampling import to_d
import math
from importlib import import_module
sampling = import_module("k_diffusion.s... | 2301_81996401/sd-webui-tcd-sampler | scripts/tcd-eular-a-sampler.py | Python | unknown | 2,426 |
import torch
import tqdm
import k_diffusion.sampling
from modules import sd_samplers_common, sd_samplers_kdiffusion, sd_samplers
from tqdm.auto import trange, tqdm
from k_diffusion import utils
from k_diffusion.sampling import to_d
import math
from importlib import import_module
sampling = import_module("k_diffusion.s... | 2301_81996401/sd-webui-tcd-sampler | scripts/tcd-sampler.py | Python | unknown | 4,454 |
#!/bin/bash
# 格式化信息输出
ani_echo() {
echo -e "[\033[33m$(date "+%Y-%m-%d %H:%M:%S")\033[0m][\033[36mAni2xcur\033[0m]\033\033[36m::\033[0m $@"
}
# 终端横线显示功能
ani_print_line() {
local shell_width
local input_text
local input_text_length
local input_zh_text_length
local shell_width_info
local tex... | 2301_81996401/ani2xcur | ani2xcur.sh | Shell | agpl-3.0 | 14,832 |
#!/bin/bash
# Python 命令
ani_python() {
# 检测是否在虚拟环境中
if [[ ! -z "${VIRTUAL_ENV}" ]]; then # 当处在虚拟环境时
# 检测使用哪种命令调用 Python
# 调用虚拟环境的python
if [[ ! -z "$(python --version 2> /dev/null)" ]]; then
python "$@" # 加双引号防止运行报错
elif [[ ! -z "$(python3 --version 2> /dev/null)" ]]... | 2301_81996401/ani2xcur | modules/ani_cmd.sh | Shell | agpl-3.0 | 1,125 |
#!/bin/bash
# 为 win2xcur 解析启动参数, 并保存到 WIN2XCUR_ARGS 参数中
# 如果设置 ORIGIN_WIN2XCUR_ARGS 全局变量优先使用该变量中的参数, 否则使用 <Start Path>/win2xcur_args.conf 文件中的参数
parse_win2xcur_args() {
local char
local in_quote
local quote_char
local current
local launch_args_string
local i
unset WIN2XCUR_ARGS
if [[ !... | 2301_81996401/ani2xcur | modules/args_parse.sh | Shell | agpl-3.0 | 4,310 |
#!/bin/bash
# 文件浏览器
file_browser() {
local file_name
local path
while true; do
path=$(pwd)
get_dir_list "${path}" # 获取当前目录的所有文件 / 文件夹, 并返回 LOCAL_DIR_LIST 全局变量
if [[ "${path}" == "/" ]]; then
file_name=$(dialog --erase-on-exit \
--ok-label "确认" --cancel-... | 2301_81996401/ani2xcur | modules/file_browser.sh | Shell | agpl-3.0 | 5,557 |
#!/bin/bash
# 获取当前路径中所有的文件和文件夹
# 使用:
# get_dir_folder_list <路径>
# 执行完成后返回一个全局变量(数组) LOCAL_DIR_LIST
# 使用 ${LOCAL_DIR_LIST[@]} 进行调用
get_dir_list() {
local i
local path
local file_name
local list
local type
unset LOCAL_DIR_LIST
if [[ -z "$@" ]]; then
path="."
else
path=$@
... | 2301_81996401/ani2xcur | modules/get_dir_list.sh | Shell | agpl-3.0 | 1,153 |
#1/bin/bash
# 初始化模块
# 通过 INSTALL_WIN2XCUR 全局变量确认是否进行安装 / 卸载 win2xcur
# 通过 CLI_MODE 全局变量确认启用命令模式 / 图形化模式
init_ani2xcur() {
local i
# 加载模块
ani_echo "加载 Ani2xcur 模块"
for i in "${START_PATH}"/modules/*; do
[[ ! "${i}" == "${START_PATH}/modules/init.sh" ]] && . "${i}"
done
}
init_ani2xcur
| 2301_81996401/ani2xcur | modules/init.sh | Shell | agpl-3.0 | 411 |
#!/bin/bash
# 主界面
mainmenu() {
local dialog_arg
local win2xcur_launch_args
local win2xcur_status
while true; do
cd "${START_PATH}"
if which "${WIN2XCUR_PATH}" &> /dev/null; then
win2xcur_status="已安装"
else
win2xcur_status="未安装"
fi
if [[ ... | 2301_81996401/ani2xcur | modules/mainmenu.sh | Shell | agpl-3.0 | 4,784 |
#!/bin.bash
# 更新 Ani2xcur
update_ani2xcur() {
local commit_hash
local ref
local branch
if fix_ani2xcur_git_file; then
fix_git_point_offset
ani_echo "更新 Ani2xcur 中"
ani_echo "拉取 Ani2xcur 远端内容中"
git fetch
if [[ "$?" == 0 ]]; then
ani_echo "应用 Ani2xcur ... | 2301_81996401/ani2xcur | modules/update.sh | Shell | agpl-3.0 | 1,998 |
#!/bin/bash
# 转换功能
# 使用:
# ani_win2xcur <鼠标指针的 inf 配置文件>
ani_win2xcur_start() {
local cur_name # 鼠标指针名字
local cur_pointer
local cur_help
local cur_work
local cur_busy
local cur_cross
local cur_text
local cur_hand
local cur_unavailiable
local cur_vert
local cur_horz
local... | 2301_81996401/ani2xcur | modules/win2xcur.sh | Shell | agpl-3.0 | 22,744 |
#!/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_81635244/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_81635244/Cangjie-Examples | HTTPServer/index.html | HTML | apache-2.0 | 687 |
#include "head.h"
#define ARRAY_LEN(arr) (sizeof(arr) / sizeof((arr)[0])) // 计算数组长度的宏定义
// 模块1:演示基本数据类型和运算符
int demonstrate_basic_operations(int a, int b)
{
//printf("%d + %d = %d\n", a, b, a + b);
return a + b;
}
// 模块2:演示指针操作
int demonstrate_pointer_operations(int *ptr)
{
int a = 10;
ptr = &a;
//... | 2301_81635244/Cangjie-Examples | cjCLI/src/C/examples.c | C | apache-2.0 | 1,184 |
#ifndef HEAD_H
#define HEAD_H
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#endif | 2301_81635244/Cangjie-Examples | cjCLI/src/C/head.h | C | apache-2.0 | 97 |
#include "head.h"
// 全局变量定义
int STUNUM = 0;
int INDEX = 0;
// 结构体声明
typedef struct {
char name[50];
int age;
float score;
} Student;
Student* createStudent(){
Student* student = (Student*)malloc(sizeof(Student));
return student;
}
// 1.学生信息初始化
void initStudent(Student* s, const char* name, int ... | 2301_81635244/Cangjie-Examples | cjCLI/src/C/struct.c | C | apache-2.0 | 1,741 |
#include "head.h"
#define ARRAY_LEN(arr) (sizeof(arr) / sizeof((arr)[0])) // 计算数组长度的宏定义
// 模块1:演示基本数据类型和运算符
int demonstrate_basic_operations(int a, int b)
{
//printf("%d + %d = %d\n", a, b, a + b);
return a + b;
}
// 模块2:演示指针操作
int demonstrate_pointer_operations(int *ptr)
{
int a = 10;
ptr = &a;
//... | 2301_81635244/Cangjie-Examples | cjCLI_hwm/src/C/examples.c | C | apache-2.0 | 1,184 |
#ifndef HEAD_H
#define HEAD_H
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#endif | 2301_81635244/Cangjie-Examples | cjCLI_hwm/src/C/head.h | C | apache-2.0 | 97 |
#include "head.h"
// 全局变量定义
int STUNUM = 0;
int INDEX = 0;
// 结构体声明
typedef struct {
char name[50];
int age;
float score;
} Student;
Student* createStudent(){
Student* student = (Student*)malloc(sizeof(Student));
return student;
}
// 1.学生信息初始化
void initStudent(Student* s, const char* name, int ... | 2301_81635244/Cangjie-Examples | cjCLI_hwm/src/C/struct.c | C | apache-2.0 | 1,741 |
#include "head.h"
#define ARRAY_LEN(arr) (sizeof(arr) / sizeof((arr)[0])) // 计算数组长度的宏定义
// 模块1:演示基本数据类型和运算符
int demonstrate_basic_operations(int a, int b)
{
//printf("%d + %d = %d\n", a, b, a + b);
return a + b;
}
// 模块2:演示指针操作
int demonstrate_pointer_operations(int *ptr)
{
int a = 10;
ptr = &a;
//... | 2301_81635244/Cangjie-Examples | cjCLI_xzy/src/C/examples.c | C | apache-2.0 | 1,184 |
#ifndef HEAD_H
#define HEAD_H
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#endif | 2301_81635244/Cangjie-Examples | cjCLI_xzy/src/C/head.h | C | apache-2.0 | 97 |
#include "head.h"
// 全局变量定义
int STUNUM = 0;
int INDEX = 0;
// 结构体声明
typedef struct {
char name[50];
int age;
float score;
} Student;
Student* createStudent(){
Student* student = (Student*)malloc(sizeof(Student));
return student;
}
// 1.学生信息初始化
void initStudent(Student* s, const char* name, int ... | 2301_81635244/Cangjie-Examples | cjCLI_xzy/src/C/struct.c | C | apache-2.0 | 1,741 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>互联网 Java 工程师进阶知识完全扫盲 - Doocs 技术社区</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="keywords" content="doc,docs,doocs,documentation,github,gitee,advanced-java,yanglbme" />
<meta name="descript... | 2301_81571068/advanced-java | index.html | HTML | cc-by-sa-4.0 | 3,774 |
const giscusTheme = () =>
localStorage.getItem('DARK_LIGHT_THEME') === 'dark' ? 'noborder_dark' : 'light';
window.$docsify = {
name: 'advanced-java',
repo: 'doocs/advanced-java',
maxLevel: 3,
auto2top: true,
coverpage: true,
coverpage: 'docs/extra-page/cover.md',
loadSidebar: 'summary.m... | 2301_81571068/advanced-java | main.js | JavaScript | cc-by-sa-4.0 | 5,527 |
<script>
export default {
onLaunch: function() {
console.log('App Launch')
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
}
}
</script>
<style>
/*每个页面公共css */
</style>
| 2301_81200836/shop | App.vue | Vue | mit | 254 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<script>
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
CSS.supports('top: constant(a)'))
document.write(
'<meta name="viewport" content="width=device-width... | 2301_81200836/shop | index.html | HTML | mit | 672 |
import App from './App'
// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
...App
})
app.$mount()
// #endif
// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
const app = createSSRApp(App)
... | 2301_81200836/shop | main.js | JavaScript | mit | 352 |
<template>
<view class="home-container">
<view class="welcome">欢迎来到校园宿舍零食小程序!</view>
<swiper class="banner" indicator-dots="true" autoplay="true" interval="3000" duration="500">
<swiper-item>
<image src="/static/banner1.jpg" class="banner-img" mode="aspectFill" />
</swiper-item>
<swi... | 2301_81200836/shop | pages/home/home.vue | Vue | mit | 1,210 |
<template>
<view class="home-container">
<view class="welcome">欢迎来到校园宿舍零食小程序!</view>
<swiper class="banner" indicator-dots="true" autoplay="true" interval="3000" duration="500">
<swiper-item>
<image src="/static/imgs/snacks/laopo_bing.jpg" class="banner-img" mode="aspectFill" />
</swiper-i... | 2301_81200836/shop | pages/mine/mine.vue | Vue | mit | 1,260 |
<template>
<view>
<text>测试内容</text>
<image src="/static/imgs/snacks/laopo_bing.jpg" style="width:200rpx;height:200rpx;" />
</view>
</template>
<script>
export default {
name: 'Product'
}
</script> | 2301_81200836/shop | pages/product/product.vue | Vue | mit | 218 |
uni.addInterceptor({
returnValue (res) {
if (!(!!res && (typeof res === "object" || typeof res === "function") && typeof res.then === "function")) {
return res;
}
return new Promise((resolve, reject) => {
res.then((res) => {
if (!res) return resolve(res)
return res[0] ? reject... | 2301_81200836/shop | uni.promisify.adaptor.js | JavaScript | mit | 373 |
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* ... | 2301_81200836/shop | uni.scss | SCSS | mit | 2,217 |
import streamlit as st
import pandas as pd
import qianfan
import json
import re
import random
import ast
# ==========================================
# 👇【API Key 配置区域】👇
# ==========================================
access_key = "".strip()
secret_key = "".strip()
chat_comp = qianfan.ChatCompletion(access_key=access_k... | 2301_81173397/wenxinxingbian | main.py | Python | unknown | 24,789 |
import pandas as pd
import numpy as np
print("⏳ 正在读取文件...")
# 1. 读取原始数据
df = pd.read_parquet('exercise_contest_train-00000-of-00001.parquet')
# 打印一下真正的列名,确认一下 (调试用)
print("📋 文件包含的列名:", df.columns.tolist())
print("🧹 开始清洗数据...")
# 2. 只需要重命名一下列,把它改成 App 能识别的名字
# 我们创建一个新的干净 DataFrame
final_df = pd.DataFrame()
# 复制案情... | 2301_81173397/wenxinxingbian | qingxi.py | Python | unknown | 1,482 |
package zack.middleware.hystrix;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.Signature;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.aspectj.lang.reflect.MethodSignature;
import org.springframework... | 2301_82000044/my-hystrix-spring-boot-starter | src/main/java/zack/middleware/hystrix/DoHystrixPoint.java | Java | unknown | 1,460 |
package zack.middleware.hystrix.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @author A1793
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface DoHyst... | 2301_82000044/my-hystrix-spring-boot-starter | src/main/java/zack/middleware/hystrix/annotation/DoHystrix.java | Java | unknown | 393 |
package zack.middleware.hystrix.valve;
import org.aspectj.lang.ProceedingJoinPoint;
import zack.middleware.hystrix.annotation.DoHystrix;
import java.lang.reflect.Method;
/**
* @author A1793
*/
public interface IValveService {
public Object access(ProceedingJoinPoint jp, Method method, Object[] args) throws Thr... | 2301_82000044/my-hystrix-spring-boot-starter | src/main/java/zack/middleware/hystrix/valve/IValveService.java | Java | unknown | 330 |
package zack.middleware.hystrix.valve.impl;
import com.alibaba.fastjson.JSON;
import com.netflix.hystrix.*;
import org.aspectj.lang.ProceedingJoinPoint;
import zack.middleware.hystrix.annotation.DoHystrix;
import zack.middleware.hystrix.valve.IValveService;
import java.lang.reflect.Method;
public class HystrixValveI... | 2301_82000044/my-hystrix-spring-boot-starter | src/main/java/zack/middleware/hystrix/valve/impl/HystrixValveImpl.java | Java | unknown | 4,318 |
import torch
import tqdm
import k_diffusion.sampling
from modules import sd_samplers_common, sd_samplers_kdiffusion, sd_samplers
from tqdm.auto import trange, tqdm
from k_diffusion import utils
from k_diffusion.sampling import to_d
import math
from importlib import import_module
sampling = import_module("k_diffusion.s... | 2301_81996401/advanced_euler_sampler_extension | scripts/euler-dy-negative-sampler.py | Python | unknown | 4,894 |
import torch
import tqdm
import k_diffusion.sampling
from modules import sd_samplers_common, sd_samplers_kdiffusion, sd_samplers
from tqdm.auto import trange, tqdm
from k_diffusion import utils
from k_diffusion.sampling import to_d
import math
from importlib import import_module
sampling = import_module("k_diffusion.s... | 2301_81996401/advanced_euler_sampler_extension | scripts/euler-dy-sampler.py | Python | unknown | 4,827 |
import torch
import tqdm
import k_diffusion.sampling
from modules import sd_samplers_common, sd_samplers_kdiffusion, sd_samplers
from tqdm.auto import trange, tqdm
from k_diffusion import utils
import math
NAME = 'Euler_Max'
ALIAS = 'euler_max'
@torch.no_grad()
def sample_euler_max(model, x, sigmas, extra_args=None... | 2301_81996401/advanced_euler_sampler_extension | scripts/euler-max-sampler.py | Python | unknown | 1,852 |
import torch
import tqdm
import k_diffusion.sampling
from modules import sd_samplers_common, sd_samplers_kdiffusion, sd_samplers
from tqdm.auto import trange, tqdm
from k_diffusion import utils
from k_diffusion.sampling import to_d
import math
from importlib import import_module
sampling = import_module("k_diffusion.s... | 2301_81996401/advanced_euler_sampler_extension | scripts/euler-negative-sampler.py | Python | unknown | 4,810 |
import torch
import tqdm
import k_diffusion.sampling
from modules import sd_samplers_common, sd_samplers_kdiffusion, sd_samplers
from tqdm.auto import trange, tqdm
from k_diffusion import utils
from k_diffusion.sampling import to_d
import math
from importlib import import_module
sampling = import_module("k_diffusion.s... | 2301_81996401/advanced_euler_sampler_extension | scripts/euler-smea-dy-sampler.py | Python | unknown | 5,427 |
import torch
import tqdm
import k_diffusion.sampling
from modules import sd_samplers_common, sd_samplers_kdiffusion, sd_samplers
from tqdm.auto import trange, tqdm
from k_diffusion import utils
import math
NAME = 'Euler_Smea'
ALIAS = 'euler_smea'
def overall_sampling_step(x, model, dt, sigma_hat, **extra_args):
... | 2301_81996401/advanced_euler_sampler_extension | scripts/euler-smea-sampler.py | Python | unknown | 3,844 |