WebAssembly is a low-level, assembly-like language that brings near-native performance to browsers. WebAssembly allows developers to code in their familiar programming languages such as C/C++, Rust, Go, Python, and so on. The code is then compiled into the wasm binary format and can be executed in browsers .
Continue reading Basic example of running WebAssembly with Go
mmap – an effective way of reading/writing large files
When operating with files in programming, we often read entire file content into physical memory. While writing the code doesn’t take much time, what happens behind the scenes is far more complex. During the process, your program has to invoke multiple system calls between buffers in kernel and user spaces back and forth which is considered inefficient. When reading a large file, mmap(memory-mapped file) is preferred in the terms of performance.
Continue reading mmap – an effective way of reading/writing large files
Build a speech transcription demo with OpenAI’s Whisper model in-browser using Transformers.js
Transformers.js
Transformers.js is a Javascript implementation of the Python library transformers, which was developed by HuggingFace. Transformers.js uses ONNX Runtime to run pre-trained AI models with JavaScript. Long story short, ONNX Runtime allows developers to share neural network models interchangeably among frameworks and support a wide range hardwares.
Common tasks supported by Transformers.js:
- Natural Language Processing: text classification, named entity recognition, question answering, language modelling, summarization, translation, multiple choice, and text generation.
- Computer Vision: image classification, object detection, segmentation, and depth estimation.
- Audio: automatic speech recognition, audio classification, and text-to-speech.
- Multimodal: embeddings, zero-shot audio classification, zero-shot image classification, and zero-shot object detection
Continue reading Build a speech transcription demo with OpenAI’s Whisper model in-browser using Transformers.js
Deploy Grafana & Prometheus metrcs tracking system for your Go program
[转载] 幼园摇号记
教办幼儿园摇号未录取。公益性幼儿园摇号未录取。
成都市公益性幼儿园新生名单张榜公示,我们现居地附近公益幼园还有空余学位。补录是最后一丝希望。
妻子打电话催促我马上回家登记。
Continue reading [转载] 幼园摇号记
Set up your Secondary Network Interface for Ubuntu 18.04
if you are trying to attache the new network interface for your Ubuntu 18.04 EC2 instance, this post might help you to figure out.
Continue reading Set up your Secondary Network Interface for Ubuntu 18.04
Use Azure Devops Pipeline to build && deploy your project
this post will teach you how to deploy your own Docker registry and how to use Microsoft Azure Devops to automatically building your Github Go project, and deploy to your Docker Swarm Server
How it works
- Pipeline download your github project
- Build your code by Dockerfile, make docker image then push to your own Docker registry
- Execute Bash command in Pipeline, pull off latest image of your project then update Docker swarm service
Continue reading Use Azure Devops Pipeline to build && deploy your project
Note of MongoDB
Concept
Structure:
Database -> Collection -> Documents
Compare to Mysql:
- Collection VS. Table
- Document VS. Row
- Field VS. Column
Collection is not strict about what goes in it
Deploy Golang function on Openfaas
this post will show you how to deploy a Sendtweet golang function in a OpenFaas Plaform.
Concept of Serverless && Faas
i’ve been learning about serverless almost two week, that I want to write a post to talk about what I’ve thinking about at those two weeks.
Note of GoRoutines
Goroutines explain
in Go, each concurrently executing activity called a groutine
when a program starts, it has a groutine that calls the Main function
, we call it _Main groutine_
.
Goroutines have no notion of identity that is accessible to the programmer
CentOS 7 Kubernetes Master-Node installation guide
this post will teach you how to deploy Kubernetes in multiple nodes mode based on Docker
Continue reading CentOS 7 Kubernetes Master-Node installation guide
Write a Microservice via Go-Micro
I’ve learning Go-Micro around a month, that I wanna write an article to record what I have learnt. In case I forgot it, I can still pick it up by reading this article. What I have wrote about might be inaccurate, I’m very glad that you can correct it.
Architecture
my design about Microservices architecture
Microservices for beginner
summary
Microservices is a concept that use to building a large ecosystem for your application. which means it includes many part like storage, services discovery, services, gateway, tracing etc…
小时候看不懂的鲁迅
鲁迅的文章,中小学生都是不大爱读的,毕竟鲁迅的思想距年轻人太远。至于大学生,除了学中国文学的,恐怕也不会有什么人主动去找鲁迅的书看。
只有成年人,在社会太久并自以为得的时候,再来读读鲁迅,也许才能明白。
Continue reading 小时候看不懂的鲁迅