摘要:
Setup SSL using .PFX file on nginx/apache2 https://xy2z.io/posts/2020-pfx-certificates-nginx-apache2/ A complete guide to using a PFX certificate on y
阅读全文
posted @ 2024-06-25 23:29
lightsong
阅读(202)
推荐(0)
摘要:
microservices-with-fastapi https://github.com/fanqingsong/microservices-with-fastapi Microservices, API Gateway, Authentication with FastAPI, non-bloc
阅读全文
posted @ 2024-06-24 21:45
lightsong
阅读(138)
推荐(0)
摘要:
问题 使用docker compose启动的容器组,容器间不能通信。 LLM问答解决 使用docker-compose启动的一组应用,但是容器间网络ping不通,为啥? 答 当使用docker-compose启动的一组应用出现容器间网络ping不通的情况时,可能的原因和解决方法可以归纳如下: 网络配
阅读全文
posted @ 2024-06-24 08:51
lightsong
阅读(55)
推荐(0)
摘要:
C - Tile Distance 2 https://atcoder.jp/contests/abc359/tasks/abc359_c 思路 在x方向上,让s<t 然后 如果s在tile的左边,移动到右边, 如果t在tile的右边,移动到左边, 计算x 和 y方便的必走的steps, y方向上容
阅读全文
posted @ 2024-06-23 22:50
lightsong
阅读(50)
推荐(0)
摘要:
还能使用的 https://segmentfault.com/q/1010000044951309 发现一些还能用的 sudo vim /etc/docker/daemon.json 写入 { "registry-mirrors": [ "https://ustc-edu-cn.mirror.ali
阅读全文
posted @ 2024-06-22 23:32
lightsong
阅读(226)
推荐(0)
摘要:
docker-fastapi-celery https://github.com/fanqingsong/docker-fastapi-celery 设置了https证书,可以运行查看效果。 Run on local machine Install docker and docker-compose
阅读全文
posted @ 2024-06-18 23:34
lightsong
阅读(185)
推荐(0)
摘要:
E - Alphabet Tiles https://atcoder.jp/contests/abc358/tasks/abc358_e 思路 dp[i][j] 前i项组成j长度字符串的 方案总数。 状态转移为: dp[i-1][j] * combination[j+l][l] > dp[i][j+
阅读全文
posted @ 2024-06-17 23:40
lightsong
阅读(31)
推荐(0)
摘要:
D - Souvenirs https://atcoder.jp/contests/abc358/tasks/abc358_d 思路 贪心算法。 把a数组和b数组从小到大排序。 遍历b数组的每一个元素bi, 在a数组中找到第一个大于等于bi元素,累加值。 Code https://atcoder.j
阅读全文
posted @ 2024-06-17 13:27
lightsong
阅读(24)
推荐(0)
摘要:
B - Ticket Counter https://atcoder.jp/contests/abc358/tasks/abc358_b 思路 第i个完成的时刻,done[i] 跟第i-1完成时间done[i-1]有关系, 第i个的开始时刻t[i] 大于 done[i-1], done[i] = t
阅读全文
posted @ 2024-06-16 22:51
lightsong
阅读(37)
推荐(0)
摘要:
C - Popcorn https://atcoder.jp/contests/abc358/tasks/abc358_c 思路1 -- 枚举法 遍历stands的所有组合, 对于每一种组合,判断是否满足全部的flavors, 满足则更新最小stands记录, stands所有组合: 0 s1 s2
阅读全文
posted @ 2024-06-16 11:50
lightsong
阅读(107)
推荐(0)
摘要:
Podman https://podman.io/ The best free & open source container tools Manage containers, pods, and images with Podman. Seamlessly work with containers
阅读全文
posted @ 2024-06-14 22:40
lightsong
阅读(49)
推荐(0)
摘要:
Open WebUI https://docs.openwebui.com/ ollama UI的独立演进版本。 不负责模型的部署。 可以对接 ollama后台 和 openai 接口。 Open WebUI is an extensible, feature-rich, and user-frie
阅读全文
posted @ 2024-06-13 08:51
lightsong
阅读(352)
推荐(0)
摘要:
E - Reachability in Functional Graph https://atcoder.jp/contests/abc357/tasks/abc357_e 思路 概念: 基环树-内生树。 https://www.cnblogs.com/Dfkuaid-210/p/14696378.
阅读全文
posted @ 2024-06-11 10:05
lightsong
阅读(94)
推荐(0)
摘要:
A successful Git branching model https://nvie.com/posts/a-successful-git-branching-model/ The main branches Supporting branches Feature branches Relea
阅读全文
posted @ 2024-06-09 23:45
lightsong
阅读(18)
推荐(0)
摘要:
D - Masked Popcount https://atcoder.jp/contests/abc356/tasks/abc356_d 思路 对于m的所有为1的bit位置,统计 0 ~ n 中所有对应对bit位置中1的个数, 如何统计呢? 观察如下bit位表: 从右向左第一位 循环节为 0 1
阅读全文
posted @ 2024-06-09 14:16
lightsong
阅读(32)
推荐(0)
摘要:
D - 88888888 https://atcoder.jp/contests/abc357/tasks/abc357_d 思路 Code https://atcoder.jp/contests/abc357/submissions/54384091 LL n; LL base = 9982443
阅读全文
posted @ 2024-06-08 23:04
lightsong
阅读(105)
推荐(0)
摘要:
C - Sierpinski carpet https://atcoder.jp/contests/abc357/tasks/abc357_c 思路 开辟cells作为标记结果, dfs递归调用对#进行标记。 Code https://atcoder.jp/contests/abc357/submi
阅读全文
posted @ 2024-06-08 22:56
lightsong
阅读(74)
推荐(0)
摘要:
C - Keys https://atcoder.jp/contests/abc356/tasks/abc356_c 思路 对于样例1中的两种情况,可以推知如下推论: (1)1 2为real keys (2)1 3 为real keys, (3)上面两个不能同为真。 所以,上述可能得真钥匙组合为(1
阅读全文
posted @ 2024-06-06 00:28
lightsong
阅读(47)
推荐(0)
摘要:
D - Intersecting Intervals 思路 对于区间重合问题, 经典做法 对 left 进行排序, 然后进行统计计数。 写了一版TLE,反思有冗余计数问题。 计算每一个区间的覆盖数目, 不需要TLE版本逐个往后数, 只需要使用lower_bound找出第一个大于等于 ri + 1 的
阅读全文
posted @ 2024-05-25 23:04
lightsong
阅读(117)
推荐(0)
摘要:
C - Bingo 2 https://atcoder.jp/contests/abc355/tasks/abc355_c 思路 统计每行元素个数 统计每列元素个数 统计两个对角线的元素个数 任意一个达到n,则满足条件 Code https://atcoder.jp/contests/abc355/
阅读全文
posted @ 2024-05-25 22:55
lightsong
阅读(54)
推荐(0)
摘要:
https://blog.csdn.net/songpeiying/article/details/131374638 command 2>&1 | tee -a file.txt https://www.cnblogs.com/amoyzhu/p/9182587.html nohup node b
阅读全文
posted @ 2024-05-22 21:52
lightsong
阅读(31)
推荐(0)
摘要:
Why the Pipe Character “|” Works in LangChain’s LCEL http://cncc.bingj.com/cache.aspx?q=python+pipe+operator&d=4965480815663428&mkt=en-US&setlang=en-U
阅读全文
posted @ 2024-05-22 09:43
lightsong
阅读(70)
推荐(0)
摘要:
neo4j https://neo4j.com/ GenAI apps, grounded in your data Power your applications with knowledge graphs. Backed by the only graph database with vecto
阅读全文
posted @ 2024-05-21 22:12
lightsong
阅读(47)
推荐(0)
摘要:
C - AtCoder Magics https://atcoder.jp/contests/abc354/tasks/abc354_c 思路 首先按照a属性对数列进行排序,大的在前,小的在后, 完成后, 则数列在a参数上是非递增的。 如下图中x轴对应 a 参数, y轴对应c参数, discard条
阅读全文
posted @ 2024-05-19 22:57
lightsong
阅读(48)
推荐(0)
摘要:
Azure 控制平面和数据平面 https://learn.microsoft.com/zh-cn/azure/azure-resource-manager/management/control-plane-and-data-plane Azure 操作可以分为两个类别 - 控制平面和数据平面。 本
阅读全文
posted @ 2024-05-17 10:19
lightsong
阅读(139)
推荐(0)
摘要:
RAG Project with Ollama and LangChain via Gradio Interface https://github.com/fanqingsong/rag-ollama-langchain This repository hosts the implementatio
阅读全文
posted @ 2024-05-16 23:16
lightsong
阅读(216)
推荐(0)
摘要:
D - Another Sigma Problem https://atcoder.jp/contests/abc353/tasks/abc353_d 思路 前缀和 + 快速幂 https://zhuanlan.zhihu.com/p/697255076 Code https://atcoder.j
阅读全文
posted @ 2024-05-16 20:30
lightsong
阅读(27)
推荐(0)
摘要:
C - Sigma Problem https://atcoder.jp/contests/abc353/tasks/abc353_c 思路 暴力TLE 观察 a1 a2 ... an 序列 计算目标是, 两两结合并并求 模 sum = sigma (ai + aj)%1e8 ai , aj <=
阅读全文
posted @ 2024-05-12 10:44
lightsong
阅读(124)
推荐(0)
摘要:
.netrc https://www.gnu.org/software/inetutils/manual/html_node/The-_002enetrc-file.html The.netrcfile contains login and initialization information us
阅读全文
posted @ 2024-05-09 09:33
lightsong
阅读(123)
推荐(0)
摘要:
23. 合并 K 个升序链表 https://leetcode.cn/problems/merge-k-sorted-lists/?envType=study-plan-v2&envId=top-interview-150 思路 K个升序链表,依据显然的规则: 当前最小的值,肯定出自于K个升序链表的
阅读全文
posted @ 2024-05-08 19:59
lightsong
阅读(28)
推荐(0)
摘要:
ollama + ollama web + fastapi app (langchain) demo https://github.com/fanqingsong/ollama-docker Welcome to the Ollama Docker Compose Setup! This proje
阅读全文
posted @ 2024-05-04 23:28
lightsong
阅读(525)
推荐(0)
摘要:
Code Llama https://about.fb.com/news/2023/08/code-llama-ai-for-coding/ Takeaways Code Llama is an AI model built on top of Llama 2, fine-tuned for gen
阅读全文
posted @ 2024-05-01 19:44
lightsong
阅读(43)
推荐(0)
摘要:
6 Ways For Running A Local LLM https://semaphoreci.com/blog/local-llm 1. Hugging Face and Transformers from transformers import AutoModelForCausalLM,
阅读全文
posted @ 2024-05-01 19:15
lightsong
阅读(49)
推荐(0)
摘要:
FastChat https://github.com/lm-sys/FastChat 为服务基于大模型的chat应用, FastChat提供框架。 提供三个功能 training, serving, and evaluating 有评价功能、训练功能(fine tuning) 主要的还是 serv
阅读全文
posted @ 2024-05-01 19:07
lightsong
阅读(235)
推荐(0)
摘要:
ollama https://ollama.com/ llama是meta发布的大语言模型, 自然意义是美洲鸵 这个平台软件 以 o 开头,类似召唤 美洲鸵的意思。 对应大语言模型,就是提供运行大模型的支撑。 Get up and running with large language models
阅读全文
posted @ 2024-05-01 11:04
lightsong
阅读(253)
推荐(0)
摘要:
D - Grid and Magnet https://atcoder.jp/contests/abc351/tasks/abc351_d 思路 定义输入矩阵元素值 s matrix each cell can have three possible values: 0 - emtpy and no
阅读全文
posted @ 2024-04-28 21:57
lightsong
阅读(79)
推荐(0)
摘要:
C - Merge the balls https://atcoder.jp/contests/abc351/tasks/abc351_c 思路 使用stack 记录 序列路径 对栈顶两个元素 尝试做缩减处理。 Code https://atcoder.jp/contests/abc351/subm
阅读全文
posted @ 2024-04-28 21:50
lightsong
阅读(39)
推荐(0)
摘要:
mysqlalchemy audit extension https://sqlalchemy-declarative-extensions.readthedocs.io/en/stable/audit_tables.html from sqlalchemy import Column, types
阅读全文
posted @ 2024-04-28 13:54
lightsong
阅读(40)
推荐(0)
摘要:
what https://zhuanlan.zhihu.com/p/137896709 Tutorial https://www.runoob.com/w3cnote/mysql-stored-procedure.html DEMO[create procedure + call from pyth
阅读全文
posted @ 2024-04-28 13:41
lightsong
阅读(19)
推荐(0)
摘要:
记录指定参数变化 https://zhuanlan.zhihu.com/p/439273702 DELIMITER // CREATE TRIGGER log_sales_updates AFTER UPDATE ON sales FOR EACH ROW Insert into audit_log
阅读全文
posted @ 2024-04-28 13:07
lightsong
阅读(24)
推荐(0)