Sign In

Latest Articles

3033 articles · Fresh posts aggregated from independent blogs across the directory.

雨雨浣潇湘雨浣潇湘·Dec 30, 2018

Webpack 长缓存(Long Term Cache)的一些探索

本文基于 Webpack@4.28.3 版本 在现代前端工程中,为了更有效的利用浏览器和 CDN 的缓存,我们通常会给静态资源设置一个比较长的缓存时间(cache-control等),在有内容更新的时候,通过在静态资源路径中加入 hash 的方式来实现。具体可以参考这里: 大公司里怎样开发和部署前端代码?。 但是在 Webpack 中,实现可靠的长期缓存并不容易。在 github 上,关于这个问题的 issue 已经讨论了三年之久。在 Webpack 4 时代,我们终于看到了一点希望。 我们从一个最基础的 Web…

thjiang.comRead article
LLil'LogLil'Log·Dec 27, 2018

Object Detection Part 4: Fast Detection Models

In Part 3, we have reviewed models in the R-CNN family. All of them are region-based object detection algorithms. They can achieve high accuracy but could be too slow for certain applications such as autonomous driving. In Part 4, we only focus on fast object…

lilianweng.github.ioRead article
PPhoenix's islandPhoenix's island·Dec 14, 2018

制作 Arch Linux 内存系统启动盘

之前尝试过 Arch Linux in RAM 完全运行在内存中的轻量业务系统,最近在维护一些物理服务器看到没有安装系统的服务器不断重启,想到了可以制作类似的内存系统启动盘,以高效完成系统测试、安装、远程维护等任务。 这时候就要祭出 mkarchiso 大法了。这是自动化制作最新版 Arch Live 镜像的工具集,当然也可用于制作定制化的 Arch 镜像。 准备 首先安装 archiso 包 1 ~> sudo pacman -Syy archiso 它提供了两种配置方案,一种是只包含基本系统的 base…

phoenixlzx.comRead article
PPhoenix's islandPhoenix's island·Nov 18, 2018

使用 fs.WriteStream 编写超简单的日志流

虽然 console.log 很好用,但是生产环境需要保存日志的时候就比较蛋疼。暴力 fs.appendFile 会消耗大量的 file handler,因此用 writable stream 来复用 file handler 是更好的选择。 大概是个不能再简单的思路了。先创建一个写入流 1 2 3 const fs = require('fs'); let logStream = fs.createWriteStream('./test.log'); 这样便创建了一个文件写入口,需要时直接调用 logStrea…

phoenixlzx.comRead article
LLil'LogLil'Log·Oct 13, 2018

Flow-based Deep Generative Models

So far, I’ve written about two types of generative models, GAN and VAE. Neither of them explicitly learns the probability density function of real data, $p(\mathbf{x})$ (where $\mathbf{x} \in \mathcal{D}$) — because it is really hard! Taking the generative mo…

lilianweng.github.ioRead article
PPhoenix's islandPhoenix's island·Sep 28, 2018

重构 StickerSetBot

关注 Telegraf 有一段时间了。特别是最近 Telegram 上 spammer 猖獗导致 Telegram 对于用户行为限制越来越严格,由此想过写一个简单的 bot 来处理加群请求之类的。 总之原因都是没时间。终于搞定一些事情之后发现之前瞎写的 Telegram 导出贴图 bot 居然备受欢迎…正好 Telegram Bot API 也更新了,来重构吧! 拆分逻辑代码 最头疼的事情首先是当时写这 bot 的时候只顾着考虑各种情况,逻辑像流水一样全部写成一坨。虽然实际不复杂吧但这不是 best practi…

phoenixlzx.comRead article
SSteph AngoSteph Ango·Sep 16, 2018

Solving problem-finding

Methodologies for problem-solving are fairly well established. The scientific method is perhaps the best problem-solving template we have. However, finding good problems to solve is a different skill altogether, one that we don’t teach. Problem-finding is abo…

stephango.comRead article
SSteph AngoSteph Ango·Sep 2, 2018

A little bit every day

When trying to jumpstart a new habit, the only thing that matters is making consistent progress. It’s easy to get in your own way by setting the bar too high. Instead, set the bar as low as possible. Any progress at all is a good thing. What is the smallest u…

stephango.comRead article
LLil'LogLil'Log·Aug 12, 2018

From Autoencoder to Beta-VAE

[Updated on 2019-07-18: add a section on VQ-VAE & VQ-VAE-2.] [Updated on 2019-07-26: add a section on TD-VAE.] Autocoder is invented to reconstruct high-dimensional data using a neural network model with a narrow bottleneck layer in the middle (oops, this…

lilianweng.github.ioRead article
PPhoenix's islandPhoenix's island·Aug 4, 2018

Office Service Router 解决方案:Arch Linux in RAM

一直把自己在办公室的 PC 保持开机用于连回办公区、存取数据工作需求。由于最近办公室所在的写字楼要全馆断电检点,所以诞生了构建一个 Service Router 的想法。 思路 运行在内存里对于 Linux 系统来说是完全可能(而且简单)的事情。 最直接的想法就是使用内核 hook 在启动时复制根分区到内存盘然后挂载内存里的数据作为根分区即可。 设备的话,设置 Power on AC 即可通电自启动。 ramroot 作为一只懒卷,这种简单的事情当然先顺手搜索下啦。然后就发现了几乎完美的解决方案——ramroot…

phoenixlzx.comRead article
PPhoenix's islandPhoenix's island·Aug 3, 2018

通过 SSH 修正安装有 GPU 的 HPE Proliant 服务器

由于越来越多的渲染、压制等需求,托供货商的关系搞来一台带有独立显卡的 HPE 服务器。经过几番折腾(包括特别奇怪的 LS26-C14 电源线)麻烦了帮忙托管的数据中心的大兄弟好几回,终于算是上架可以开机了。 登入 iLO,安装许可证,启动 iLO Remote Console,打开电源,一切都很顺利。但是 Console 里显示 Early Initialization… 完成后,突然画面一黑,完全没了动静。 以为 iLO 出了 bug,冷重启好几次都是一样的结果。百思不得其解。 再重启一次。仔细观察了一番发现虽…

phoenixlzx.comRead article
让你的 Webpack 起飞 —— 网易考拉会员 Webpack4 性能优化实战
雨雨浣潇湘雨浣潇湘·Aug 2, 2018

让你的 Webpack 起飞 —— 网易考拉会员 Webpack4 性能优化实战

最近看到了美团的前端团队的一篇文章,文中提到前端发布仅需10秒,默默的看了一下我们自己的发布时间。。。 先定一个小目标,争取把 Webpack 的打包时间优化到10秒以内吧。 先看一下现在打包一次需要的时间,73013ms,下面开始一步一步见证奇迹: 73013 0. 模块分析 有很多工具提供了可视化的分析,如Webpack-bundle-analyzer、webpack-chart、 webpack-analyse。 以Webpack-bundle-analyzer为例,它提供了一个下图所示的图表,展示了引入的…

thjiang.comRead article
雨雨浣潇湘雨浣潇湘·Jul 15, 2018

npm 备忘录

常用命令 1 $ npm init / install / uninstall / update 1 2 $ npm ls $ npm list -g --depth 0 1 2 npm config set proxy xxx.com npm config list 1 2 3 4 $ npm outdated Package Current Wanted Latest Location @commitlint/cli 7.1.1 7.5.2 7.5.2 test @commitlint/config-angu…

thjiang.comRead article
SSam AltmanSam Altman·Jun 25, 2018

Reinforcement Learning Progress

Today, OpenAI released a new result. We used PPO (Proximal Policy Optimization), a general reinforcement learning algorithm invented by OpenAI, to train a team of 5 agents to play Dota and beat semi-pros. This is the game that to me feels closest to the real…

blog.samaltman.comRead article
LLil'LogLil'Log·Jun 24, 2018

Attention? Attention!

[Updated on 2018-10-28: Add Pointer Network and the link to my implementation of Transformer.] [Updated on 2018-11-06: Add a link to the implementation of Transformer model.] [Updated on 2018-11-18: Add Neural Turing Machines.] [Updated on 2019-07-18: Correct…

lilianweng.github.ioRead article
PPhoenix's islandPhoenix's island·Jun 6, 2018

在线扩展 LVM root 分区

才不是没东西写了呢 遇到一个奇葩的原因导致 root 分区被占满的。而且还是奇葩的 CentOS,root 分区是 LVM,Hypervisor 里扩展磁盘后无法直接用 resize2fs。 既然如此就只能暴力重建分区咯。 重建分区 操作前确保操作的分区和之后新建时 Start 保持一致,修改分区表后不至于分区崩坏。 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36…

phoenixlzx.comRead article

Page 163 of 169 · 3033 articles