中文圈程序员的碎碎念
509 subscribers
3.52K photos
21 videos
129 files
28.7K links
嘿!你也来看码农又在写啥BUG了吗
Download Telegram
硬件延迟级别

via 蛮荆
LeetCode 刷题必懂位运算

via 蛮荆
网站新增独立下载页

本次全站下载链接更新新增了一个独立的下载页面,页面内提供多渠道下载地址。 暂定提供本站下载、阿里云盘下载,和上 […]

via 柴郡猫
让大模型告诉我DevOps工程师和SRE工程师有什么区别

一、为什么会有这个对比

我最近几年在DevOps团队做一些工作,发现很多人(包括同事)把SRE和DevOps完全混为一谈,我心里知道这两个岗位是不一样的,但是不能描述的很清楚。

自己的直观感受就是:
DevOps工程师比较专注在工具链的建设、推广和维护上,以及会在全公司范围内推动相关的流程建设、优化和自动化。
SRE工程师更加接近项目的运行环境,工作重心是尽量保证线上项目稳定运行。

via 潘智祥
Very good sentences


Yesterday, someone asked me to elaborate on talent picking and why “narrowing the subset” matters. It’s easier to pick the best talent from a subset of 10 versus 100 or 1000. You’d think seeing 1000 candidates would mean you have a greater chance of finding a unicorn genius but it takes longer and gives more choice and opportunities for error in judgment. Scale is one strategy to see the best, but it’s not the only strategy.

The hardest part about a narrow subset is ensuring you attract “the best” 50 candidates while repelling 450 candidates.

This is obvious in theory and hard to execute as a strategy. But the best talent pickers have figured out to repel the mediocre.
That is from Katherine Boyle.

The post Very good sentences appeared first on Marginal REVOLUTION.

Related Stories

My Conversation with the very excellent Masaaki Suzuki
Dwarkesh Patel with Patrick Collison
Nixonian Politics and Student Debt Cancellations

via Marginal Revolution (author: Tyler Cowen)
【译文】让RAG面对海量embedding时提速100倍

via 土猛的员外 (author: yuanwai)
LLM, RAG 和 Groq

最近跟朋友聊起LLM,RAG 究竟有没有用,能不能拿来做成产品或者服务。由于我对AI的了解也很肤浅,所以没太敢下结论。

但是今天突然想起一个趣事,相传 账单·大门 院士有一句名言「640KB ought to be enough for anybody」

这句话是不是他老人家说的不重要了,重要的是 IBM PC 的这个 640KB内存 的梗是绕不过去了。

后来发现 640KB 不够了怎么办?屎山上接着hack呗。于是发明了 EMM386 ,在CONFIG.SYS 里吟唱一句
  DEVICE=C:\DOS\HIMEM.SYS

可以保平安。

如果人人都能用 Gemini 1.5 Pro 那个 1M context tokens, 那么 RAG 技术也没啥用了吧。猜想能用 RAG 卖钱的,估计跟定制 HIMEM.SYSEMM386.EXE 的市场一样。。。。。在 PC 普及的初期是一个神级,但是随着日本政府主导 VLSI产业+三星DRAM的崛起和价格战,一切都成了历史。

----------------------

又想起另外一件事:Groq

也是啥都不懂,翻了些资料,发现比较有意思。CUDA vs Groq 可以看成DRAM vs SRAM。context window不足的问题:
疯石头 2024-02-23 02-21: Context window到100K后,即使batch=1,GPT-3级别的大模型,KV-cache占显存的容量已经比weight要大了。实际部署时batch size至少得64才能用上tensor core。4-bit quant可以降到1/4,GQA group=8时可以再降1/8,不过还是比weight要大。sliding window不可取,遗忘问题会完全丢掉long context的优势。
更详细的讲解:

https://kipp.ly/transformer-inference-arithmetic/#kv-cache

在zhihu上翻到一些资料说,LLM推理主要成本不是矩阵计算,而是 memory access。可惜帖子找不到了。

via est の 输入输出
HarmonyOS的包类型和 ohpm 包管理工具

这是关于 HarmonyOS 的第二篇技术笔记,主要介绍 HarmonyOS 的包类型,以及 ohpm 包管理工具的相关知识。笔记的大部分内容在官方文档都有体现,请以官方文档为准。

via 陈看川的博客
只懂一件事的人不懂任何一件事。事物因比较而被确立与区分。

via 祝融说。
SQL注入恶劣环境之可执行文件上传骚姿势

0# 概述

在前期Web打点成功获得对应权限后,就进入了后渗透(提权、内网渗透、域渗透)的阶段,但是在有些时候,总会出现各种各样奇怪的情况,在此也分享一些经验出来。

最近在打红队外援碰到了一个站点存在SQL注入,于是尝试用SqlMap对网站进行注入,发现注入成功,但由此也引发了一系列问题。

可能你看完本篇文章,会觉得原理其实很简单。但试问你自己,在面对以下情况的时候,能想到通过这样的手法达成你的目的吗?这就是本文的意义

[...]

via AabyssZG's Blog
Ubuntu 上 PPPoE 自動重撥的設定

tl;dr:在設定檔裡面除了 persist 外,還要加上 maxfail 0

中華 HiNet 家用方案有提供固一動七的 IPv4 address 可以用,我自己因為玩 DevOps/SRE 的項目,有個固定 IPv4 address 弄一台便當盒小主機跑個 Ubuntu 系統當 jump server (跳板機) 總是對於防火牆的設定比較友善。

家用方案的固定 IP 在網站上申請完以後,透過 PPPoE 撥號指定另外一組 username 拿到。

我遇到的問題時大多數斷線後會自己重連,但偶而就是不會,這次難得在土城家裡的主機發生,看 log 發現是 pppd 自己 exit 了:(時間是 UTC,大約是 2024/02/22 的早上三點多)
Feb 21 19:09:15 kennel pppd[716]: No response to 4 echo-requests
Feb 21 19:09:15 kennel pppd[716]: Serial link appears to be disconnected.
Feb 21 19:09:15 kennel pppd[716]: Connect time 7434.5 minutes.
Feb 21 19:09:15 kennel pppd[716]: Sent 1240056869 bytes, received 1018762497 bytes.
Feb 21 19:09:21 kennel pppd[716]: Connection terminated.
Feb 21 19:09:21 kennel pppd[716]: Connect time 7434.5 minutes.
Feb 21 19:09:21 kennel pppd[716]: Sent 1240056869 bytes, received 1018762497 bytes.
Feb 21 19:09:21 kennel pppd[716]: Modem hangup
Feb 21 19:10:27 kennel pppd[716]: Timeout waiting for PADO packets
Feb 21 19:10:27 kennel pppd[716]: Unable to complete PPPoE Discovery
Feb 21 19:11:32 kennel pppd[716]: Timeout waiting for PADO packets
Feb 21 19:11:32 kennel pppd[716]: Unable to complete PPPoE Discovery
Feb 21 19:12:37 kennel pppd[716]: Timeout waiting for PADO packets
Feb 21 19:12:37 kennel pppd[716]: Unable to complete PPPoE Discovery
Feb 21 19:13:42 kennel pppd[716]: Timeout waiting for PADO packets
Feb 21 19:13:42 kennel pppd[716]: Unable to complete PPPoE Discovery
Feb 21 19:14:47 kennel pppd[716]: Timeout waiting for PADO packets
Feb 21 19:14:47 kennel pppd[716]: Unable to complete PPPoE Discovery
Feb 21 19:15:52 kennel pppd[716]: Timeout waiting for PADO packets
Feb 21 19:15:52 kennel pppd[716]: Unable to complete PPPoE Discovery
Feb 21 19:16:57 kennel pppd[716]: Timeout waiting for PADO packets
Feb 21 19:16:57 kennel pppd[716]: Unable to complete PPPoE Discovery
Feb 21 19:18:02 kennel pppd[716]: Timeout waiting for PADO packets
Feb 21 19:18:02 kennel pppd[716]: Unable to complete PPPoE Discovery
Feb 21 19:19:07 kennel pppd[716]: Timeout waiting for PADO packets
Feb 21 19:19:07 kennel pppd[716]: Unable to complete PPPoE Discovery
Feb 21 19:20:12 kennel pppd[716]: Timeout waiting for PADO packets
Feb 21 19:20:12 kennel pppd[716]: Unable to complete PPPoE Discovery
Feb 21 19:20:12 kennel pppd[716]: Exit.

這邊算了一下「Unable to complete PPPoE Discovery」出現了十次,這種數字看起來就蠻可疑的,回頭去 pppd 的說明找 10 可以看到這段:
Terminate after n consecutive failed connection attempts. A value of 0 means no limit. The default value is 10.
接著網路上翻,在「How do I set a PPPoE connection to redial?」這邊看到有人也提到了這點:除了 persist 以外,也要記得改 maxfail...

via Gea-Suan Lin's BLOG
就自顾自的活着,哪有那么多小心翼翼

有时我会产生一种不太方便说的自豪感,这种感觉说出来,本应该是完全真实的自我感受和发自内心的喜悦。但有些时候却会被理解成为一种树立在别人平庸之上的优越感?就好像假如我在别人上班工作日的时候,出去看电影,而电影院一个人都没有,有一种我一个人包场的感觉,在这时候我要谨慎小心翼翼的笑,甚至都不应该发朋圈,好像是一种炫耀。
不知道什么时候,我们把生活过得这么小心谨慎,这是我们的悲哀。
我几乎很少去跟别人对比,因为只要你去主动对比,就在没事找事,当你比出的优越感有多强,在发现自己的不足的时候那种失落感会更强。
人跟人的生活本来就不同,看见别好的时候,却没看到别人背后的付出和曲折,我们总会找各种理由来掩盖自己的不足,来轻描淡写的猜测别人的成功是如此容易与巧合。这些原本也并无对错,只要你别把这些话往心里去,单纯的发发牢骚也没啥。
我在菲律宾人身上,看到不少人身上看到了那种纯粹的快乐,他(她)们的那种笑容是发在内心的,那种快乐也几乎很少受到身份地位的影响。
有一次,在楼下取快递,我找不到给我送快递的小哥,就在楼下问了好几个送快递的人,因为那是我第一次收快递,不是很熟悉英语,不是很熟悉如何当面联系。而其中一个送完快递的小哥,跟保安指着我说了一些什么,他们都笑哈哈的。大概应该是说,看这个老外,找不到自己的快递了。
我那手足无措的状态,确实比较好笑。
还有一次,买了一台冰箱,工人来送货,因为沟通不方便,我就一直在二楼电梯入口等工人送冰箱,我还推了一个手推车,为了方便交接。而且我认为既然是送冰箱,肯定是会把车开上来,但对方工人给我打电话,我也听不懂,我就说我在二楼等你。过了好一阵我才看到两个工人,轮流背着一个冰箱晃悠悠的走过来。
看到满头大汗的工人,我内心很是愧疚,但却不知道如何表达,只好说这简单抱歉的话,并表明自己英语有点差。但工人跟我笑嘻嘻的回应,根本没有把我本应该帮忙却没有帮忙的事放在心上。
在这边,你能看到很多菲律宾人,开开心心的样子,让你原本拘束的性格,也变得逐渐开朗,虽然语言不通,但是开心和快的表情,也足够沟通。
也许经济基础不仅仅决定上层建筑,也决定这个国家的普通人应该怎么活,活成什么样。是往死卷,还是谁都不眼馋谁,这很难说,或许是菲律宾这边的贫富差距已经到了极端化,所以就不必要如此的卷。而国内可能卷起来还能有个盼头,所以对自己下手够狠吧。
出国看看挺好的,体验生活,珍惜生活。看样子以后应该是不会那么忙,那就一点点让自己更像菲律宾人那样活着吧。
公众号/微博/X:小吴乐意
博客:https://www.xiaowuleyi.com
RSS:https://www.xiaowuleyi.com/feed

via 小吴乐意blog
python-mini-project: 迷你 Python 项目集合

via HelloGithub - 热门项目 (author: ndleah)

Invalid media: animation
Access to Medical Data Saves Lives


ProPublica: In January, the Biden administration pledged to increase public access to a wide array of Medicare information to improve health care for America’s most sick and vulnerable.

…So researchers across the country were flummoxed this week when the Centers for Medicare and Medicaid Services announced a proposal that will increase fees and diminish access to claims data that has informed thousands of health care studies and influenced major public health reforms.
Using big Medicare databases has never been cheap or easy. Under the current system, researchers could have the data transferred to secure university computers for about $20,000–that’s a lot but once the data was on the university computers it could be accessed by multiple researchers, cutting costs. A PhD student, for example, could write their dissertation under their professor’s data plan. Under the new system it will cost $35,000 for one researcher to  to access the data which will be held on government (CMS) computers. Moreover, it’s unclear how complex statistical analysis will be performed or how congested the CMS systems may become.
Research teams on complex projects can include dozens of people and take years to complete. “The costs will grow exponentially and make access infeasible except for the very best resourced organizations,” said Joshua Gottlieb, a professor at the University of Chicago’s Harris School of Public Policy.
Public data should be open access to researchers, with appropriate anonymization. We know from IP law that barriers to access reduce research and innovation; and in the medical sphere research and innovation saves lives. Open access is also a check on how governments spends taxpayer money and the effectiveness of such spending. I also worry that raising the dollar cost of access is a prelude to other restrictions. The NIH, for example, is restricting access to genetic data if it thinks the researcher will be asking forbidden questions. Even without such explicit restrictions, there is a chilling effect when researchers are beholden for access to the government and indeed to the very agencies they may be researching.

I place a high value on privacy but I get suspicious when governments invoke privacy to block citizen access to government data but not to block government access to citizen data. Medicare databases have always been appropriately anonymized and the dangers of these databases in anyone’s hand, let alone researchers, is far less than anti-money laundering, KYC laws and suspicious transaction reports in banking, automated license plate readers that the police us to scan billions of license plates or mass surveillance of the communications of US citizens under FISA. Sadly, this list could easily be extended. Liberty thrives on the people’s privacy and the government’s transparency.

The post Access to Medical Data Saves Lives appeared first on Marginal REVOLUTION.



Comments

Once the government decides to “negotiate” prices, it's ... by Jason K

Related Stories

Give Innovation a Chance
Avoiding Repugnance
Paragraphs to ponder

via Marginal Revolution (author: Alex Tabarrok)