Stay Hungry,Stay Foolish!

上一页 1 2 3 4 5 6 7 8 9 10 ··· 21 下一页
摘要: 泛型(Generics) https://www.geeksforgeeks.org/generics-in-java/ 一般类的定义,其引用类是要在其代码中明确指定的 但是对于一些上层公共逻辑,其期望可以应用到若干引用类中 则定义泛型类, 可以满足这种需求。 泛型类在使用的使用, 才绑定具体的引用 阅读全文
posted @ 2022-11-08 10:50 lightsong 阅读(228) 评论(0) 推荐(0) 编辑
摘要: FastAPI CRUD Router https://github.com/awtkns/fastapi-crudrouter fastapi提供基础的制作API能力 对于简单的业务来说,对于表仅仅需要 CRUD 接口,不需要其他额外的数据逻辑, 对于这种情况,我们希望能够快速提供对指定表格的 C 阅读全文
posted @ 2022-11-02 22:29 lightsong 阅读(256) 评论(0) 推荐(0) 编辑
摘要: dataset https://dataset.readthedocs.io/en/latest/index.html https://github.com/pudo/dataset 让开发者像操作JSON一样,操作DB dataset提供了一个简单的抽象层,开发者使用最简单的方法执行CRUD. A 阅读全文
posted @ 2022-11-01 18:25 lightsong 阅读(27) 评论(0) 推荐(0) 编辑
摘要: D - Yet Another Recursive Function https://atcoder.jp/contests/abc275/tasks/abc275_d 思路 动态规划问题。 第一印象使用函数递归调用实现, 但刚开始担心会爆栈,因为n很大会产生很多次递归调用层数, 所以,最开始考虑使 阅读全文
posted @ 2022-10-31 22:46 lightsong 阅读(40) 评论(0) 推荐(0) 编辑
摘要: C - Counting Squares https://atcoder.jp/contests/abc275/tasks/abc275_c 参考: https://atcoder.jp/contests/abc275/submissions/36103954 思路 首先不能使用暴力穷举法,任意四个 阅读全文
posted @ 2022-10-31 12:20 lightsong 阅读(108) 评论(0) 推荐(0) 编辑
摘要: load balance https://zhuanlan.zhihu.com/p/64777456 四层负载均衡(tcp) 在三层负载均衡的基础上,用 ip+port 接收请求,再转发到对应的机器。 七层负载均衡(http) 根据虚拟的 url 或 IP,主机名接收请求,再转向相应的处理服务器。 阅读全文
posted @ 2022-10-30 22:30 lightsong 阅读(108) 评论(0) 推荐(0) 编辑
摘要: Argparse https://www.geeksforgeeks.org/argparse-vs-docopt-vs-click-comparing-python-command-line-parsing-libraries/ python内置库。 使用代码形式定义CLI. Argparse i 阅读全文
posted @ 2022-10-29 18:51 lightsong 阅读(8) 评论(0) 推荐(0) 编辑
摘要: 背景 pytest属于单元测试, 测试对象为模块函数, 对于argparse应用,需要带有参数进行测试的情况, 是否也可以将其对待为函数,带有测试的参数? 答案是可以的。 Example https://github.com/simonw/stream-delay/tree/0.1 例如, 此pac 阅读全文
posted @ 2022-10-28 23:59 lightsong 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 问题 数据类型一般都提供 kw初始化,和 position 初始化。 例如 class DATA(): m: int n: int kw 初始化: d = DATA(m=1, n=1) position初始化 d = DATA(1, 1) 因为对于相对大的数据集合,postion初始化容易对错位置。 阅读全文
posted @ 2022-10-27 11:15 lightsong 阅读(22) 评论(0) 推荐(0) 编辑
摘要: D - Div Game https://atcoder.jp/contests/abc169/tasks/abc169_d 参考: https://blog.csdn.net/justidle/article/details/106474626 思路 计算n中所有质数的幂, Note: 此处不需要 阅读全文
posted @ 2022-10-26 20:43 lightsong 阅读(30) 评论(0) 推荐(0) 编辑
摘要: D - LRUD Instructions https://atcoder.jp/contests/abc273/tasks/abc273_d 分析 横坐标和纵坐标很大,不能采用二维数组形式,否则内存干爆, 目标对象移动,按照指令进行移动, 每次沿垂直或者水平方向, 那么这里对每一个墙, 都记录两点 阅读全文
posted @ 2022-10-26 08:51 lightsong 阅读(63) 评论(0) 推荐(0) 编辑
摘要: D - Not Divisible https://atcoder.jp/contests/abc170/tasks/abc170_d 思路 输入过程记录每个数字出现的次数, 遍历所有数字ai, 对于每一个数字,在1 .. sqrt(ai) 之间找此数的因子, 如果因子f出现过,则此数不是 not 阅读全文
posted @ 2022-10-25 09:25 lightsong 阅读(20) 评论(0) 推荐(0) 编辑
摘要: D - Longest X https://atcoder.jp/contests/abc229/tasks/abc229_d 参考: https://zhuanlan.zhihu.com/p/441875505 思路 使用acc累计数组,统计每个位置之前的.的数目 设置滑动窗口最大化字串长度,使得 阅读全文
posted @ 2022-10-25 09:18 lightsong 阅读(32) 评论(0) 推荐(0) 编辑
摘要: C - Ameba https://atcoder.jp/contests/abc274/tasks/abc274_c 题目分析 Code https://atcoder.jp/contests/abc274/submissions/35890782 int n; int a; map<int, i 阅读全文
posted @ 2022-10-24 09:56 lightsong 阅读(35) 评论(0) 推荐(0) 编辑
摘要: D - Robot Arms 2 题目 : https://atcoder.jp/contests/abc274/tasks/abc274_d 参考: https://zhuanlan.zhihu.com/p/576281206 分析 dfs或者bfs最大复杂度 2^1000, 超时必然的。 采用内 阅读全文
posted @ 2022-10-24 09:49 lightsong 阅读(42) 评论(0) 推荐(0) 编辑
摘要: lower_bound https://www.geeksforgeeks.org/lower_bound-in-cpp/ 在有序数组中,找到大于或等于目标值的数据集合中值最小的位置。 The lower_bound() method in C++ is used to return an iter 阅读全文
posted @ 2022-10-24 09:37 lightsong 阅读(44) 评论(0) 推荐(0) 编辑
摘要: The Twelve-Factor App https://12factor.net/ Introduction In the modern era, software is commonly delivered as a service: called web apps, or software- 阅读全文
posted @ 2022-09-30 23:58 lightsong 阅读(42) 评论(0) 推荐(0) 编辑
摘要: pytest https://docs.pytest.org/en/7.1.x/contents.html # content of test_sample.py def func(x): return x + 1 def test_answer(): assert func(3) == 5 A h 阅读全文
posted @ 2022-09-30 22:45 lightsong 阅读(26) 评论(0) 推荐(0) 编辑
摘要: loguru https://loguru.readthedocs.io/en/stable/index.html 开箱即用,简化用户配置。 Loguru is a library which aims to bring enjoyable logging in Python. Did you ev 阅读全文
posted @ 2022-09-30 16:47 lightsong 阅读(93) 评论(0) 推荐(0) 编辑
摘要: DI https://www.professionalqa.com/dependency-injection What is Dependency Injection? A software design pattern that implements inversion of control fo 阅读全文
posted @ 2022-09-28 23:53 lightsong 阅读(123) 评论(0) 推荐(0) 编辑
摘要: mkdocs https://www.mkdocs.org/ MkDocs is a fast, simple and downright gorgeous static site generator that's geared towards building project documentat 阅读全文
posted @ 2022-09-22 23:44 lightsong 阅读(56) 评论(0) 推荐(0) 编辑
摘要: LDAP https://www.onelogin.com/learn/what-is-ldap LDAP是一种软件协议, 用于查询一个网络内的信息和设备。 提供服务: 组织内的用户认证 简化访问内部服务器。 The Lightweight Directory Access Protocol (LD 阅读全文
posted @ 2022-09-22 11:28 lightsong 阅读(105) 评论(0) 推荐(0) 编辑
摘要: oso https://github.com/osohq/oso Oso is a batteries-included framework for building authorization in your application. OSO是一款功能齐全的框架, 可以在应用中使用这个工具构建授权 阅读全文
posted @ 2022-09-22 11:00 lightsong 阅读(123) 评论(0) 推荐(0) 编辑
摘要: JWT https://jwt.io/introduction 是一套开放的标准,定义了在两者之前安全传输信息的方法,信息的内容为JSON格式。 What is JSON Web Token? JSON Web Token (JWT) is an open standard (RFC 7519) t 阅读全文
posted @ 2022-09-15 10:00 lightsong 阅读(54) 评论(0) 推荐(0) 编辑
摘要: ROUTER OF APP https://fastapi.tiangolo.com/tutorial/first-steps/ 如果应用比较简单,可以把所有的路径定义在app上。 如果应用非常庞大,有很多的逻辑,按照业务分为产生数十以上的路径,则需要用模块的方式拆分应用 路径也需要对应拆分,不能把 阅读全文
posted @ 2022-09-05 16:27 lightsong 阅读(94) 评论(0) 推荐(0) 编辑
摘要: DI (Dependency Injection) https://www.freecodecamp.org/news/a-quick-intro-to-dependency-injection-what-it-is-and-when-to-use-it-7578c84fa88f/ 依赖注入 当一个 阅读全文
posted @ 2022-09-04 22:22 lightsong 阅读(77) 评论(0) 推荐(0) 编辑
摘要: tox https://github.com/tox-dev/tox Command line driven CI frontend and development task automation tool. 功能特性: 子任务环境隔离 自动化任务执行 构建 测试 发布 At its core to 阅读全文
posted @ 2022-08-12 14:34 lightsong 阅读(87) 评论(0) 推荐(0) 编辑
摘要: FastAPI Project Template https://github.com/rochacbruno/fastapi-project-template fastapi框架的脚手架, 集成的技术都是fastapi作者推荐的: SQLModel -- sqlachemy 和 pydantic的 阅读全文
posted @ 2022-08-02 00:24 lightsong 阅读(254) 评论(0) 推荐(0) 编辑
摘要: amis https://gitee.com/baidu/amis 前端低代码框架,通过 JSON 配置就能生成各种后台页面,极大减少开发成本,甚至可以不需要了解前端。 https://aisuda.bce.baidu.com/amis/zh-CN/docs/index amis 的其它亮点 提供完 阅读全文
posted @ 2022-07-31 16:31 lightsong 阅读(2565) 评论(0) 推荐(0) 编辑
摘要: Machine learning model serving in Python using FastAPI and streamlit https://davidefiocco.github.io/streamlit-fastapi-ml-serving/ 背景描述 ML工程师需要面向做出快速原型 阅读全文
posted @ 2022-07-30 10:27 lightsong 阅读(239) 评论(0) 推荐(0) 编辑
摘要: eel https://github.com/ChrisKnott/Eel#intro electron是一种实现GUI单体应用的框架, GUI部分使用web前端技术, 后台运行在nodejs上。 虽然在同一个机器上,实际上实现了前后台分离。 nodejs属于web领域发展形成的后端平台, 对于py 阅读全文
posted @ 2022-07-29 00:11 lightsong 阅读(409) 评论(0) 推荐(0) 编辑
摘要: 引子 对于python开发者不用学习前端的知识,也希望能够做前后端一体的web应用。 优点: 提高开发效率; 减少用人成本。 发展道路, 从简到繁。 dominate -- 后端静态HTML https://github.com/Knio/dominate 纯粹产生前端HTML CSS代码. Dom 阅读全文
posted @ 2022-07-24 23:54 lightsong 阅读(133) 评论(0) 推荐(0) 编辑
摘要: strapi https://github.com/strapi/strapi 无头CMS, 支持非常简单地、快速地创建安全API。 优点: 获得对自己数据的控制权 相对blog网站来说 自助选择服务器 数据库独立性 可定制 API creation made simple, secure and 阅读全文
posted @ 2022-07-24 17:42 lightsong 阅读(190) 评论(0) 推荐(0) 编辑
摘要: gatsby https://www.gatsbyjs.com gatsby是前后端分离框架中, 负责前端显示的框架。 其通过 CMS API 和 数据库, 获取数据,并生成静态网页。有利于SEO. Maybe it's time your CMS had a faster frontend Gat 阅读全文
posted @ 2022-07-18 16:37 lightsong 阅读(174) 评论(0) 推荐(0) 编辑
摘要: sqlachemy https://www.sqlalchemy.org/ 面向数据库的ORM工具,其仅仅做ORM工作,不做校验工作。 SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that gives appli 阅读全文
posted @ 2022-07-12 23:19 lightsong 阅读(774) 评论(0) 推荐(0) 编辑
摘要: class -- 普通数据聚合 https://python.land/objects-and-classes#What_is_a_Python_object 类可以用来管理聚合数据,但是本身类病是不是为数据管理设计。 class Car: speed = 0 started = False def 阅读全文
posted @ 2022-07-08 23:03 lightsong 阅读(87) 评论(0) 推荐(0) 编辑
摘要: Background 对于一些场景, 我们要求词典对于不存在的key,不报错,返回默认值。 dict有处理方法, get 方法 或者 setdefault方法。 但是过于繁琐。 Handling Missing Keys in Dictionaries https://realpython.com/ 阅读全文
posted @ 2022-07-07 22:34 lightsong 阅读(35) 评论(0) 推荐(0) 编辑
摘要: MST -- Minumum Spinning Tree https://www.geeksforgeeks.org/kruskals-minimum-spanning-tree-algorithm-greedy-algo-2/?ref=leftbar-rightbar 简化一个图, 在保证所有节点 阅读全文
posted @ 2022-06-21 23:45 lightsong 阅读(43) 评论(0) 推荐(0) 编辑
摘要: A Knight’s Tour https://www.tutorialspoint.com/The-Knight-s-tour-problem In chess, we know that the knight can jump in a special manner. It can move e 阅读全文
posted @ 2022-06-20 13:23 lightsong 阅读(37) 评论(0) 推荐(0) 编辑
摘要: B - Unbalanced Squares https://atcoder.jp/contests/arc142/tasks/arc142_b 思路 按照第一行,第二行, ......, 第n行的顺序,将所有元素排成一行 X11, X12, ...., X1N, X21, X22, ...., X 阅读全文
posted @ 2022-06-20 12:00 lightsong 阅读(29) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 21 下一页
Life Is Short, We Need Ship To Travel