摘要: #### 1. 安装系统 ```txt - 这里推荐安装Desktop比较省事 link: https://ubuntu.com/desktop - 在windows系统(双系统先安装win)中搜索磁盘管理,对你要安装的位置执行清除卷 - 将制作的盘插入电脑,重启,bias选优先级,然后安装盘启动, 阅读全文
posted @ 2023-08-22 15:02 xytpai 阅读(33) 评论(0) 推荐(0) 编辑
摘要: Ubuntu 22.04 Server 机器学习环境安装——保姆级教程 1. 安装操作系统 https://ubuntu.com/download/server 下载,写盘重启,最好备整张固态 一路默认,连接主wifi,由于我是双系统不要覆盖已有系统盘 直到 [] Set up this disk 阅读全文
posted @ 2023-04-19 02:30 xytpai 阅读(294) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2023-03-11 12:45 xytpai 阅读(1) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2023-01-13 23:43 xytpai 阅读(0) 评论(0) 推荐(0) 编辑
摘要: Pub-IP Server # git clone https://github.com.cnpmjs.org/fatedier/frp wget https://github.com/fatedier/frp/releases/download/v0.37.0/frp_0.37.0_linux_a 阅读全文
posted @ 2021-08-02 00:37 xytpai 阅读(137) 评论(0) 推荐(0) 编辑
摘要: import sys filename = sys.argv[1] with open(filename, 'r') as f: lines = f.readlines() def extract_info(line): line = line.split() name = line[0].stri 阅读全文
posted @ 2023-12-15 10:05 xytpai 阅读(3) 评论(0) 推荐(0) 编辑
摘要: Code Object # 每一个函数只会生成一个code object import dis def func(a, b): return a * b code = func.__code__ print(dis.dis(func)) # for dis doc: https://docs.pyt 阅读全文
posted @ 2023-11-18 00:59 xytpai 阅读(4) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2023-10-18 13:13 xytpai 阅读(5) 评论(0) 推荐(0) 编辑
摘要: ## 1. 路径选择 #### 1.1. House Robber ```txt 给一个自然数数组,在不允许相邻取的情况下,求可取的最大和 Input: [1,2,3,1] Output: 4 取1,3和为4 方法:设定状态dp[n]表示前n项在不能相邻取情况下最大和取法的最大和(结果),要用前面信 阅读全文
posted @ 2023-08-03 19:39 xytpai 阅读(11) 评论(0) 推荐(0) 编辑
摘要: #### 1. 斐波那契数列的第n项 ```python def Fibonacci(self, n): if n==0: return 0 if n==1: return 1 a, b, c = 0, 1, -1 for i in range(2, n + 1): c = a + b a = b 阅读全文
posted @ 2023-08-03 19:17 xytpai 阅读(13) 评论(0) 推荐(0) 编辑
摘要: ### 1. 桌球问题 ```txt 矩形球桌四个角有洞 yx 坐标在 (0, 0) (m, 0) (m, n) (0, n) 球从 (0,0) 沿 45 度方向无限大力发射,求mn满足啥条件能落袋 解法: 这种桌球问题只要无限延伸方块就行,相当于解 y=x 有没有 (am, bn) 解,其中 a 阅读全文
posted @ 2023-07-29 22:06 xytpai 阅读(3) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2023-05-28 22:10 xytpai 阅读(2) 评论(0) 推荐(0) 编辑
摘要: import torch import torch.nn.functional as F import math def fmha(q, k, v, is_causal=True): return F.scaled_dot_product_attention(q, k, v, attn_mask=N 阅读全文
posted @ 2023-05-18 13:44 xytpai 阅读(23) 评论(0) 推荐(0) 编辑