<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Posts on Ethan's Blog</title><link>https://blog.ethanlyu.top/posts/</link><description>Recent content in Posts on Ethan's Blog</description><image><title>Ethan's Blog</title><url>https://blog.ethanlyu.top/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E</url><link>https://blog.ethanlyu.top/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E</link></image><generator>Hugo -- 0.152.2</generator><language>en</language><lastBuildDate>Tue, 21 Oct 2025 00:00:00 +0000</lastBuildDate><atom:link href="https://blog.ethanlyu.top/posts/index.xml" rel="self" type="application/rss+xml"/><item><title>Deep Generative Model I</title><link>https://blog.ethanlyu.top/posts/deep-generative-model-i/</link><pubDate>Tue, 21 Oct 2025 00:00:00 +0000</pubDate><guid>https://blog.ethanlyu.top/posts/deep-generative-model-i/</guid><description>&lt;p&gt;The rise of large models has advanced the way of how we move towards to the intelligence. In the past decades, people worked on &amp;ldquo;discriminative&amp;rdquo; intelligence, that is, we predict a dog image as a &amp;ldquo;dog&amp;rdquo;. To do so, we train on a batch of dataset containing different categories with labels, and train with the goal that every output matches the corresponding classes. The great success of LLM has brought us into a new era: GenAI. Unlike the discriminative model, we generate the image &amp;ldquo;dog&amp;rdquo; given the input prompt (text, image, &amp;hellip;). This is called &lt;em&gt;generative model&lt;/em&gt;.
&lt;img loading="lazy" src="https://blog.ethanlyu.top/attachment/40665896e722d64746aa9972abd6199d.png"&gt;&lt;/p&gt;</description></item><item><title>Restore the access to remote server via mounted driver</title><link>https://blog.ethanlyu.top/posts/restore-the-access-to-remote-server-via-mounted-driver/</link><pubDate>Mon, 17 Feb 2025 00:00:00 +0000</pubDate><guid>https://blog.ethanlyu.top/posts/restore-the-access-to-remote-server-via-mounted-driver/</guid><description>&lt;p&gt;Initially I want to deploy a openai-web on my remote server (Free Oracle Server) to use the DeepSeek API. To protect the service, I can establish a Wireguard connection.
So I ask Qwen to generate a template for me. However, the Qwen guides me to modify &lt;code&gt;AllowdIPs=0.0.0.0/0, ::/0&lt;/code&gt; within the &lt;code&gt;wg0.conf&lt;/code&gt;. And that leads to my fix to the server the whole afternoon.&lt;/p&gt;
&lt;p&gt;I lose my connection to the remote server immediately when I apply the above settings. The reason is, all the traffic (including IPv4 and IPv6) is routed through the WireGuard tunnel. This also includes my traffic to the server&amp;rsquo;s public IP. As a result, when the VPN is activated, the connection to the server breaks because the return traffic is routed through the tunnel instead of directly back to the client. If the server does not have proper routing rules or NAT configured, the return traffic from the server will be sent back through the WireGuard interface instead of the original public interface. This creates a loop or breaks the connection.&lt;/p&gt;</description></item><item><title>Automatically Login to HKU-VPN in shell</title><link>https://blog.ethanlyu.top/posts/automatically-login-to-hku-vpn-in-shell/</link><pubDate>Thu, 16 Jan 2025 00:00:00 +0000</pubDate><guid>https://blog.ethanlyu.top/posts/automatically-login-to-hku-vpn-in-shell/</guid><description>&lt;p&gt;HKU uses Cisco AnyConnect protocol and should use the Cisco software to connect the VPN. This post tries to use the &lt;code&gt;openconnect&lt;/code&gt; to do the same thing in the command shell and make it all automatic.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.infradead.org/openconnect/"&gt;OpenConnect&lt;/a&gt; is a cross-platform multi-protocol SSL VPN client which supports a number of VPN protocols, including Cisco AnyConnect, Juniper SSL, Palo Alto, etc. We can install &lt;code&gt;openconnect&lt;/code&gt; on MacOS,&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;brew install openconnect
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;(I believe you know when it is Linux / Windows). Then we have to configure the connection. The basic usage is&lt;/p&gt;</description></item><item><title>[iOS] Send SMS to TG</title><link>https://blog.ethanlyu.top/posts/send-sms-to-tg-ios/</link><pubDate>Mon, 13 Jan 2025 00:00:00 +0000</pubDate><guid>https://blog.ethanlyu.top/posts/send-sms-to-tg-ios/</guid><description>&lt;p&gt;Recently I&amp;rsquo;ve moved to Shenzhen, and I am working on establishing an atmosphere for study lol. And keeping myself away from phone is crucial. However, most of the existing logins require my verification code. This post shares the experience of how to automatically forward the SMS message containing &amp;ldquo;code&amp;rdquo; to telegram using the shortcut and automation in iOS system.&lt;/p&gt;
&lt;p&gt;Before you read, you should be aware that&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;iOS system: If you work on Android, you can develop an app very fast. We discuss iOS devices with automation and shortcut only&lt;/li&gt;
&lt;li&gt;Telegram: I assume you have the access to Telegram.&lt;/li&gt;
&lt;li&gt;You should be aware of the security of your actions. Do not spread it over the devices that you do not trust, as we will input the token directly.&lt;/li&gt;
&lt;li&gt;The methods cannot be used in any production environment, where the author of this post (me ofc) will not consume any responsibility for any costs and troubles.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="step-1-create-a-telegram-bot"&gt;Step 1: Create a Telegram bot&lt;/h2&gt;
&lt;p&gt;Search the &lt;code&gt;@botfather&lt;/code&gt; in your TG and create a bot by entering &lt;code&gt;/newbot&lt;/code&gt;.
Type in the bot name and user name.
You will receive the token. Keep it secret.&lt;/p&gt;</description></item><item><title>CUDA Programming Model II</title><link>https://blog.ethanlyu.top/posts/day-2-programming-model-ii/</link><pubDate>Mon, 25 Nov 2024 00:00:00 +0000</pubDate><guid>https://blog.ethanlyu.top/posts/day-2-programming-model-ii/</guid><description>&lt;p&gt;Previously, we discuss the basic programming model of CUDA: memory and thread. In this note, we will dive into the hardware implementation. By doing this, we can better understand the philosophy of CUDA programming, so as to accelerate the computation.&lt;/p&gt;
&lt;p&gt;The GPU architecture is built around a scalable array of multi-threaded Streaming Multiprocessors (SMs). There are usually numerous SMs in every GPU. And every SM can host hundreds of threads. When a CUDA program on the host GPU invokes a kernel grid, the blocks of the grid are enumerated and distributed to multiprocessors with available and distributed to SMs with available execution capacity.&lt;/p&gt;</description></item><item><title>Using `rclone` instead of `rsync`</title><link>https://blog.ethanlyu.top/posts/using-rclone-instead-of-rsync/</link><pubDate>Mon, 25 Nov 2024 00:00:00 +0000</pubDate><guid>https://blog.ethanlyu.top/posts/using-rclone-instead-of-rsync/</guid><description>&lt;p&gt;&lt;code&gt;rclone&lt;/code&gt; is an alternative of &lt;code&gt;rsync&lt;/code&gt; for cloud storage. It can be applied to remote servers, OneDrive, Google Drive, Box, &amp;hellip; (almost all existing cloud storage). The supported protocols:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt; 1 / 1Fichier
   \ (fichier)
 2 / Akamai NetStorage
   \ (netstorage)
 3 / Alias for an existing remote
   \ (alias)
 4 / Amazon S3 Compliant Storage Providers including AWS, Alibaba, ArvanCloud, Ceph, ChinaMobile, Cloudflare, DigitalOcean, Dreamhost, GCS, HuaweiOBS, IBMCOS, IDrive, IONOS, LyveCloud, Leviia, Liara, Linode, Magalu, Minio, Netease, Petabox, RackCorp, Rclone, Scaleway, SeaweedFS, StackPath, Storj, Synology, TencentCOS, Wasabi, Qiniu and others
   \ (s3)
 5 / Backblaze B2
   \ (b2)
 6 / Better checksums for other remotes
   \ (hasher)
 7 / Box
   \ (box)
 8 / Cache a remote
   \ (cache)
 9 / Citrix Sharefile
   \ (sharefile)
10 / Combine several remotes into one
   \ (combine)
11 / Compress a remote
   \ (compress)
12 / Dropbox
   \ (dropbox)
13 / Encrypt/Decrypt a remote
   \ (crypt)
14 / Enterprise File Fabric
   \ (filefabric)
15 / FTP
   \ (ftp)
16 / Google Cloud Storage (this is not Google Drive)
   \ (google cloud storage)
17 / Google Drive
   \ (drive)
18 / Google Photos
   \ (google photos)
19 / HTTP
   \ (http)
20 / Hadoop distributed file system
   \ (hdfs)
21 / HiDrive
   \ (hidrive)
22 / ImageKit.io
   \ (imagekit)
23 / In memory object storage system.
   \ (memory)
24 / Internet Archive
   \ (internetarchive)
25 / Jottacloud
   \ (jottacloud)
26 / Koofr, Digi Storage and other Koofr-compatible storage providers
   \ (koofr)
27 / Linkbox
   \ (linkbox)
28 / Local Disk
   \ (local)
29 / Mail.ru Cloud
   \ (mailru)
30 / Mega
   \ (mega)
31 / Microsoft Azure Blob Storage
   \ (azureblob)
32 / Microsoft Azure Files
   \ (azurefiles)
33 / Microsoft OneDrive
   \ (onedrive)
34 / OpenDrive
   \ (opendrive)
35 / OpenStack Swift (Rackspace Cloud Files, Blomp Cloud Storage, Memset Memstore, OVH)
   \ (swift)
36 / Oracle Cloud Infrastructure Object Storage
   \ (oracleobjectstorage)
37 / Pcloud
   \ (pcloud)
38 / PikPak
   \ (pikpak)
39 / Proton Drive
   \ (protondrive)
40 / Put.io
   \ (putio)
41 / QingCloud Object Storage
   \ (qingstor)
42 / Quatrix by Maytech
   \ (quatrix)
43 / SMB / CIFS
   \ (smb)
44 / SSH/SFTP
   \ (sftp)
45 / Sia Decentralized Cloud
   \ (sia)
46 / Storj Decentralized Cloud Storage
   \ (storj)
47 / Sugarsync
   \ (sugarsync)
48 / Transparently chunk/split large files
   \ (chunker)
49 / Uloz.to
   \ (ulozto)
50 / Union merges the contents of several upstream fs
   \ (union)
51 / Uptobox
   \ (uptobox)
52 / WebDAV
   \ (webdav)
53 / Yandex Disk
   \ (yandex)
54 / Zoho
   \ (zoho)
55 / premiumize.me
   \ (premiumizeme)
56 / seafile
   \ (seafile)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I&amp;rsquo;ve used this to rsync data files between my Azure (in Microsoft Intranet) and my School Server (in school intranet that requires VPN) using OneDrive as the exchange. I&amp;rsquo;ll use another blog to talk about this.&lt;/p&gt;</description></item><item><title>CUDA Programming Model I</title><link>https://blog.ethanlyu.top/posts/day-1-programming-model-i/</link><pubDate>Sun, 24 Nov 2024 00:00:00 +0000</pubDate><guid>https://blog.ethanlyu.top/posts/day-1-programming-model-i/</guid><description>&lt;p&gt;The programming model gives us a high level idea of how to write CUDA programs. Also, we need to know how to debug the program using the toolchains.&lt;/p&gt;
&lt;p&gt;There are several key points that we need to be aware of in the GPU programming:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Kernel Function&lt;/li&gt;
&lt;li&gt;Memory Management&lt;/li&gt;
&lt;li&gt;Thread Management&lt;/li&gt;
&lt;li&gt;Streams&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;A typical environment usually encompasses several CPUs and GPUs. They use PCIe to communicate with each other. &lt;strong&gt;The memory is strictly isolated between CPU and GPU&lt;/strong&gt; (though they share uniform addressing). A complete CUDA program can be executed in the following way:
&lt;img loading="lazy" src="https://blog.ethanlyu.top/attachment/1e2e4a3828300afff6c90c9d4942f57c.png"&gt;
The host code is followed by the parallel code. And it will be returned immediately to the main thread. In other word, when the first parallel code is running, the second host code is likely to run as well simultaneously.&lt;/p&gt;</description></item><item><title>Use `aria2c` instead of `wget`</title><link>https://blog.ethanlyu.top/posts/use-aria2c-instead-of-wget/</link><pubDate>Wed, 20 Nov 2024 00:00:00 +0000</pubDate><guid>https://blog.ethanlyu.top/posts/use-aria2c-instead-of-wget/</guid><description>&lt;p&gt;Recently, I need to download the dataset to my remote servers. Clearly, I do not want to download to my local machine. So initially I choose &lt;code&gt;wget&lt;/code&gt; as I previous did. Soon after I find &lt;code&gt;wget&lt;/code&gt; is too slow. Then I ask ChatGPT. It recommends &lt;code&gt;aria2&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img loading="lazy" src="https://blog.ethanlyu.top/attachment/cf53b5125773f3837262e43be058f99d.png"&gt;
Official Page: &lt;a href="https://aria2.github.io/"&gt;aria2&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The greatest advantage is it can establish parallel connections simultaneously to speed up the download. We can use&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo apt install aria2
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;to install on Ubuntu.&lt;/p&gt;</description></item><item><title>CUDA Programming Intro</title><link>https://blog.ethanlyu.top/posts/day-0-hello-world----cuda/</link><pubDate>Fri, 01 Nov 2024 00:00:00 +0000</pubDate><guid>https://blog.ethanlyu.top/posts/day-0-hello-world----cuda/</guid><description>&lt;p&gt;There are numerous tutorials online to teach how to use CUDA C++ for parallel programming. And we will adopt some of them. The best way to learn is to read the official documents. This tutorial, however, will start from how to write the code at the beginning. We will illustrate the architecture part throughout the code.&lt;/p&gt;
&lt;p&gt;We will take few days to go over the principle of CUDA programming. Afterwards, we will read over the ML code to see how the operations are implemented in CUDA core. There is no strict prerequisite (except basic programming), but it would be better to know OS and CPU (a little bit).&lt;/p&gt;</description></item><item><title>RAK11200 Config</title><link>https://blog.ethanlyu.top/posts/rak11200-config/</link><pubDate>Sat, 07 Jan 2023 00:00:00 +0000</pubDate><guid>https://blog.ethanlyu.top/posts/rak11200-config/</guid><description>&lt;h2 id="arduino"&gt;Arduino&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Download Arduino&lt;/li&gt;
&lt;li&gt;
&lt;ol&gt;
&lt;li&gt;To add board support for RAK11200 on Arduino, start Arduino IDE and open the Preferences window (&lt;strong&gt;File&lt;/strong&gt; &amp;gt; &lt;strong&gt;Preferences&lt;/strong&gt;).&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img loading="lazy" src="https://blog.ethanlyu.top/attachment/be92ce5d1dc170d9a4bf53d96908612a.png"&gt;&lt;/p&gt;
&lt;ol start="3"&gt;
&lt;li&gt;Copy &lt;a href="https://raw.githubusercontent.com/RAKwireless/RAKwireless-Arduino-BSP-Index/main/package_rakwireless_index.json"&gt;https://raw.githubusercontent.com/RAKwireless/RAKwireless-Arduino-BSP-Index/main/package_rakwireless_index.json&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Open board manager, type RAK and choose the corresponding board.
&lt;img loading="lazy" src="https://blog.ethanlyu.top/attachment/5a4567d9b8433d6d81f6108c95e64935.png"&gt;&lt;/li&gt;
&lt;li&gt;Connect Board with USB. You are required to find the port.
&lt;img loading="lazy" src="https://blog.ethanlyu.top/attachment/5d840cbf7a0a9c7881a0895858af34ec.png"&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;To check if it is the right port, plug out and in to see if it disappears/appears.&lt;/p&gt;
&lt;p&gt;Remember to check if the connection of wire is good.
5. Short Boot0 and Ground
&lt;img loading="lazy" src="https://blog.ethanlyu.top/attachment/f44db89371b9f3f1ebfb8b5b1ce9fb9b.png"&gt;
6. When uploading and showing &amp;ldquo;connecting&amp;rdquo;, press the reset for at least 2 seconds.&lt;/p&gt;</description></item><item><title>PAC advance 电机使用指南</title><link>https://blog.ethanlyu.top/posts/pac-advance-%E7%94%B5%E6%9C%BA%E4%BD%BF%E7%94%A8%E6%8C%87%E5%8D%97-1d95caa83a2348f6afa60de0dd298dc3/</link><pubDate>Tue, 27 Dec 2022 00:00:00 +0000</pubDate><guid>https://blog.ethanlyu.top/posts/pac-advance-%E7%94%B5%E6%9C%BA%E4%BD%BF%E7%94%A8%E6%8C%87%E5%8D%97-1d95caa83a2348f6afa60de0dd298dc3/</guid><description>&lt;h1 id="pac-advance-电机使用指南"&gt;PAC advance 电机使用指南&lt;/h1&gt;
&lt;h1 id="整体连接"&gt;整体连接&lt;/h1&gt;
&lt;p&gt;&lt;img alt="IMG_6528.jpeg" loading="lazy" src="https://blog.ethanlyu.top/attachment//IMG_6528.jpeg"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG_6527.jpeg" loading="lazy" src="https://blog.ethanlyu.top/attachment//IMG_6527.jpeg"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG_6529.jpeg" loading="lazy" src="https://blog.ethanlyu.top/attachment//IMG_6529.jpeg"&gt;
&lt;img alt="IMG_6531.jpeg" loading="lazy" src="https://blog.ethanlyu.top/attachment//IMG_6531.jpeg"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG_6560.jpeg" loading="lazy" src="https://blog.ethanlyu.top/attachment//IMG_6560.jpeg"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG_6561.jpeg" loading="lazy" src="https://blog.ethanlyu.top/attachment//IMG_6561.jpeg"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG_6562.jpeg" loading="lazy" src="https://blog.ethanlyu.top/attachment//IMG_6562.jpeg"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG_6559.jpeg" loading="lazy" src="https://blog.ethanlyu.top/attachment//IMG_6559.jpeg"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG_6563.jpeg" loading="lazy" src="https://blog.ethanlyu.top/attachment//IMG_6563.jpeg"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG_6558.jpeg" loading="lazy" src="https://blog.ethanlyu.top/attachment//IMG_6558.jpeg"&gt;&lt;/p&gt;
&lt;h1 id="初始化"&gt;初始化&lt;/h1&gt;
&lt;p&gt;首先要初始化调零（即滑块在初始位置时，显示屏上的坐标也在初始位置）&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG_6557.jpeg" loading="lazy" src="https://blog.ethanlyu.top/attachment//IMG_6557.jpeg"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG_6541.jpeg" loading="lazy" src="https://blog.ethanlyu.top/attachment//IMG_6541.jpeg"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG_6544.jpeg" loading="lazy" src="https://blog.ethanlyu.top/attachment//IMG_6544.jpeg"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG_6548.jpeg" loading="lazy" src="https://blog.ethanlyu.top/attachment//IMG_6548.jpeg"&gt;&lt;/p&gt;
&lt;p&gt;先返回（左下角），进入手动（F2）模式。&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG_6535.jpeg" loading="lazy" src="https://blog.ethanlyu.top/attachment//IMG_6535.jpeg"&gt;&lt;/p&gt;
&lt;p&gt;可以选择高速（F1）或微步（F2）模式。选择相应的坐标轴左右调整（注意正负）。直到滑块到达零点位置。&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG_6538.jpeg" loading="lazy" src="https://blog.ethanlyu.top/attachment//IMG_6538.jpeg"&gt;&lt;/p&gt;
&lt;p&gt;**之后，拔掉数据线。**选择程零（F3），可以看到显示屏上的数字被手动调整为0。&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG_6539.jpeg" loading="lazy" src="https://blog.ethanlyu.top/attachment//IMG_6539.jpeg"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG_6540.jpeg" loading="lazy" src="https://blog.ethanlyu.top/attachment//IMG_6540.jpeg"&gt;&lt;/p&gt;
&lt;p&gt;最后再插上数据线。&lt;/p&gt;
&lt;h1 id="电机编程流程"&gt;电机编程流程&lt;/h1&gt;
&lt;p&gt;整体流程：初始化基准点 → 绝对位置（3.4，设置到终点）→ 延时（3.6）→ 绝对位置（回到起点）→ 设置循环（3.9）&lt;/p&gt;
&lt;aside&gt;
💡 速度的计算
导程(L)：电机转一圈运动的距离 (=72) (mm/cycle)
速度=导程(L) * 每分钟转的圈数 (F) / 60 (mm/s)
&lt;/aside&gt;
&lt;p&gt;$$
v = \frac{L \cdot F}{60}
$$&lt;/p&gt;
&lt;p&gt;如果设置$F=833$，则速度&lt;/p&gt;
&lt;p&gt;$$
v|_{F=834} = \frac{1.2 \times 833}{1000} = 1 : m/s
$$&lt;/p&gt;
&lt;p&gt;返回&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG_6549.jpeg" loading="lazy" src="https://blog.ethanlyu.top/attachment//IMG_6549.jpeg"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG_6550.jpeg" loading="lazy" src="https://blog.ethanlyu.top/attachment//IMG_6550.jpeg"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG_6551.jpeg" loading="lazy" src="https://blog.ethanlyu.top/attachment//IMG_6551.jpeg"&gt; &lt;br&gt;
&lt;img alt="IMG_6552.jpeg" loading="lazy" src="https://blog.ethanlyu.top/attachment//IMG_6552.jpeg"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG_6553.jpeg" loading="lazy" src="https://blog.ethanlyu.top/attachment//IMG_6553.jpeg"&gt;&lt;/p&gt;</description></item><item><title>Install Pyaudio on Mac M1pro</title><link>https://blog.ethanlyu.top/posts/install-pyaudio-on-mac-m1pro-a80001982b3f47048836f40c657650df/</link><pubDate>Fri, 07 Oct 2022 00:00:00 +0000</pubDate><guid>https://blog.ethanlyu.top/posts/install-pyaudio-on-mac-m1pro-a80001982b3f47048836f40c657650df/</guid><description>&lt;h1 id="install-pyaudio-on-mac-m1pro"&gt;Install Pyaudio on Mac M1pro&lt;/h1&gt;
&lt;p&gt;Published: Yes&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;install &lt;code&gt;portaudio&lt;/code&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;brew install portaudio
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Find where &lt;code&gt;portaudio&lt;/code&gt; was installed&lt;/p&gt;
&lt;p&gt;You can choose&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;brew --prefix portaudio
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Or&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;brew info portaudio
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create &lt;code&gt;.pydistutils.cfg&lt;/code&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo vi &lt;span class="nv"&gt;$HOME&lt;/span&gt;/.pydistutils.cfg
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;and Type&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;[&lt;/span&gt;build_ext&lt;span class="o"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;include_dirs&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$brew&lt;/span&gt; --prefix portaudio$/include/
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;library_dirs&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$brew&lt;/span&gt; --prefix portaudio$/lib/
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Install &lt;code&gt;pyaudio&lt;/code&gt; in your &lt;code&gt;conda&lt;/code&gt; environment&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;pip install pyaudio
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;</description></item></channel></rss>