<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Technology on 春江暮客</title>
    <link>https://www.bobobk.com/en/categories/technology/</link>
    <description>Recent content in Technology on 春江暮客</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Fri, 24 Apr 2026 11:07:45 +0800</lastBuildDate>
    <atom:link href="https://www.bobobk.com/en/categories/technology/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Build Your Own TRON Wallet Toolkit (Batch Address Generation / USDT Transfer / Staking &amp; Voting)</title>
      <link>https://www.bobobk.com/en/build_own_tron_wallet.html</link>
      <pubDate>Fri, 24 Apr 2026 11:07:45 +0800</pubDate>
      <guid>https://www.bobobk.com/en/build_own_tron_wallet.html</guid>
      <description>Three Python scripts covering the TRON wallet core loop: batch address generation, USDT/TRX transfer, staking/unstaking/voting, and energy delegation.</description>
    </item>
    <item>
      <title>M3U8 to MP4 Tutorial: Download and Convert M3U8 Videos Using Python or Static HTML</title>
      <link>https://www.bobobk.com/en/how_to_generate_mp4_from_m3u8.html</link>
      <pubDate>Tue, 27 Jan 2026 13:40:31 +0800</pubDate>
      <guid>https://www.bobobk.com/en/how_to_generate_mp4_from_m3u8.html</guid>
      <description>&lt;p&gt;Sometimes you may want to &lt;strong&gt;download an M3U8 (HLS) video stream and convert it into an MP4 file&lt;/strong&gt; for offline viewing or local storage, without relying on complex server-side solutions or paid software.&lt;/p&gt;&#xA;&lt;p&gt;In this article, I will introduce &lt;strong&gt;two practical and commonly used methods&lt;/strong&gt; to convert M3U8 to MP4:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;strong&gt;Using Python with the &lt;code&gt;downloadm3u8&lt;/code&gt; package&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Using static HTML with browser-side FFmpeg (FFmpeg.wasm)&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;method-1-convert-m3u8-to-mp4-using-python-downloadm3u8&#34;&gt;Method 1: Convert M3U8 to MP4 Using Python downloadm3u8&lt;/h2&gt;&#xA;&lt;p&gt;This method is suitable for &lt;strong&gt;local machines or servers&lt;/strong&gt;, requires installing dependencies, and is very stable.&lt;br&gt;&#xA;It is recommended for &lt;strong&gt;large video files&lt;/strong&gt; or batch downloads.&lt;/p&gt;&#xA;&lt;h3 id=&#34;1-install-dependencies&#34;&gt;1. Install Dependencies&lt;/h3&gt;&#xA;&lt;p&gt;First, install &lt;code&gt;ffmpeg&lt;/code&gt; (used for video merging) and the &lt;code&gt;downloadm3u8&lt;/code&gt; Python package:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;apt install ffmpeg -y&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;pip install downloadm3u8&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;2-view-help-information&#34;&gt;2. View Help Information&lt;/h3&gt;&#xA;&lt;p&gt;After installation, check the available options:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;downloadm3u8 -h&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Example output:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;usage: m3u8downloader [-h] [--user-agent USER_AGENT] [--origin ORIGIN]&#xA;                      [--version] [--debug] --output OUTPUT&#xA;                      [--tempdir TEMPDIR] [--keep]&#xA;                      [--concurrency N]&#xA;                      URL&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;3-download-example&#34;&gt;3. Download Example&lt;/h3&gt;&#xA;&lt;p&gt;Assume your M3U8 URL is:&#xA;&lt;a href=&#34;https://chatgpt.com/wp-content/uploads/2026/01/test.m3u8&#34;&gt;bobobk test m3u8&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Using Matplotlib&#39;s fill_between for Area Filling in Python</title>
      <link>https://www.bobobk.com/en/748.html</link>
      <pubDate>Wed, 29 Dec 2021 08:47:31 +0800</pubDate>
      <guid>https://www.bobobk.com/en/748.html</guid>
      <description>When plotting with matplotlib in Python, sometimes to enhance the aesthetics of the graph, it&amp;rsquo;s necessary to fill with color above or below the plot. The &amp;lsquo;fill_between&amp;rsquo; function is used for this, where the &amp;lsquo;y2&amp;rsquo; parameter determines the second line, indicating whether to fill upwards or downwards.</description>
    </item>
    <item>
      <title>Foundations of Data Science: Common Probability Distributions and Their Explanations</title>
      <link>https://www.bobobk.com/en/712.html</link>
      <pubDate>Thu, 09 Jan 2020 11:11:12 +0800</pubDate>
      <guid>https://www.bobobk.com/en/712.html</guid>
      <description>Probability distributions are as fundamental to statistics as data structures are to computer science. If you want to be a competent data scientist, understanding them is foundational.</description>
    </item>
    <item>
      <title>How to Convert Between YAML and JSON (Complete Python/JavaScript Guide)</title>
      <link>https://www.bobobk.com/en/convert-yaml-to-json.html</link>
      <pubDate>Sat, 17 May 2025 08:53:04 +0800</pubDate>
      <guid>https://www.bobobk.com/en/convert-yaml-to-json.html</guid>
      <description>A comprehensive guide to mastering YAML and JSON conversion using Python and JavaScript, including handling complex structures, cross-language solutions, and performance optimization tips.</description>
    </item>
    <item>
      <title>How to Improve Website Indexing Speed with IndexNow</title>
      <link>https://www.bobobk.com/en/how-to-improve-index-speed-by-indexnow.html</link>
      <pubDate>Wed, 07 May 2025 10:26:16 +0800</pubDate>
      <guid>https://www.bobobk.com/en/how-to-improve-index-speed-by-indexnow.html</guid>
      <description>In current SEO practices, rapid indexing of pages by search engines is a key concern for webmasters. Traditional search engines rely on crawlers to periodically fetch website content, resulting in low indexing efficiency. IndexNow is a proactive submission protocol that allows websites to notify search engines of content updates in real-time, significantly improving indexing speed. This article will explain how to use IndexNow for efficient indexing.</description>
    </item>
    <item>
      <title>Automatically Publishing Articles to WordPress Using a Python Script: A Complete Workflow Analysis</title>
      <link>https://www.bobobk.com/en/python-wordpress-workflow.html</link>
      <pubDate>Mon, 21 Apr 2025 08:25:00 +0800</pubDate>
      <guid>https://www.bobobk.com/en/python-wordpress-workflow.html</guid>
      <description>When building content sites or AI content distribution projects, how can you efficiently batch publish generated content to WordPress? This article will share how I used a Python script to build an automated content publishing process that does not rely on the WordPress backend, does not require XML import, and directly connects to the database for maximum efficiency.</description>
    </item>
    <item>
      <title>Python: Creating Beautiful Lollipop Charts</title>
      <link>https://www.bobobk.com/en/955.html</link>
      <pubDate>Fri, 31 May 2024 10:03:32 +0800</pubDate>
      <guid>https://www.bobobk.com/en/955.html</guid>
      <description>The lollipop chart, as a variant of bar charts and dot plots, is increasingly popular in scientific research due to its simplicity and clarity. This chart cleverly combines the advantages of bar charts and scatter plots, offering a visually more attractive way to represent data.</description>
    </item>
    <item>
      <title>Downloading m3u8 Streaming Media Using Python and Embedding into AMP Webpages</title>
      <link>https://www.bobobk.com/en/892.html</link>
      <pubDate>Tue, 01 Aug 2023 09:02:57 +0800</pubDate>
      <guid>https://www.bobobk.com/en/892.html</guid>
      <description>In the era of short videos and live streaming, video formats are often no longer traditional ones like mp4 or mkv, but streaming formats such as m3u8. If you want to download your favorite videos, special handling is needed. This article provides a detailed example of how to download m3u8 streaming data using Python and embed it into an AMP webpage for playback. Let’s dive into the full process.</description>
    </item>
    <item>
      <title>Managing Long-Running Tasks on Unix-like Systems</title>
      <link>https://www.bobobk.com/en/861.html</link>
      <pubDate>Fri, 21 Jul 2023 14:47:07 +0800</pubDate>
      <guid>https://www.bobobk.com/en/861.html</guid>
      <description>Due to daily work all using Linux systems, generally for commands known to run for a long time, nohup, screen, or tmux are used to run the command. However, sometimes after starting a command, you suddenly realize it runs very long. Is there a way to continue working in the current shell and keep the command running after logout until the task finishes?</description>
    </item>
    <item>
      <title>ChatGPT Automatically Generates Web Pages</title>
      <link>https://www.bobobk.com/en/762.html</link>
      <pubDate>Thu, 16 Feb 2023 16:57:33 +0800</pubDate>
      <guid>https://www.bobobk.com/en/762.html</guid>
      <description>This time, I used the viral ChatGPT to generate a web page that counts words. I asked it to create a web page to count the number of words in a text area using HTML, CSS, and JavaScript.</description>
    </item>
    <item>
      <title>Using Postfix, Dovecot, MySQL, and roundcube to build a mail server under Debian</title>
      <link>https://www.bobobk.com/en/675.html</link>
      <pubDate>Sat, 18 Jun 2022 19:41:47 +0800</pubDate>
      <guid>https://www.bobobk.com/en/675.html</guid>
      <description>There are many articles on the Internet about using Postfix to build a mail server, but none of them can be built successfully. After many destructions and reconstructions, the mail system was finally completed and can send and receive mails smoothly. This article will introduce how to use Postfix+Dovecot+MySQL+roundcube to build a mail server in Debian system</description>
    </item>
    <item>
      <title>Using SomaticSignatures to Identify Mutation Signatures from Mutation Data</title>
      <link>https://www.bobobk.com/en/871.html</link>
      <pubDate>Sat, 09 Apr 2022 11:41:37 +0800</pubDate>
      <guid>https://www.bobobk.com/en/871.html</guid>
      <description>The SomaticSignatures package was published in 2015 in the bioinformatics journal, a professional bioinformatics journal. This package aims to analyze tumor single-nucleotide variants (SNP) data to discover tumor development and evolution mechanisms. This article introduces how to analyze snv data to obtain tumor-specific SNP signatures.</description>
    </item>
    <item>
      <title>Designing Baidu SEO Click Software with GUI using PyQt6</title>
      <link>https://www.bobobk.com/en/763.html</link>
      <pubDate>Wed, 30 Mar 2022 08:39:43 +0800</pubDate>
      <guid>https://www.bobobk.com/en/763.html</guid>
      <description>For webmasters, improving search engine rankings through website SEO and attracting more organic users is crucial for continuously increasing website traffic. In addition to improving the quality of their own website content, simulating searches and clicks on search engines is a complementary method. After comparing various existing Baidu and Sogou click software, designing a customizable SEO click software of one&amp;rsquo;s own seems very challenging and meaningful. Recently, I&amp;rsquo;ve also been learning PyQt6 as a GUI programming package, which is perfect for this task.</description>
    </item>
    <item>
      <title>How to Install Old Version R Packages in R</title>
      <link>https://www.bobobk.com/en/326.html</link>
      <pubDate>Tue, 15 Mar 2022 09:01:38 +0800</pubDate>
      <guid>https://www.bobobk.com/en/326.html</guid>
      <description>To leverage the efficiency improvements and bug fixes of R version updates, I upgraded R on my server to the latest version (currently 4.1). However, when using some packages, I encountered errors.</description>
    </item>
    <item>
      <title>Drawing Raincloud Plots with Python</title>
      <link>https://www.bobobk.com/en/791.html</link>
      <pubDate>Tue, 11 Jan 2022 15:56:31 +0800</pubDate>
      <guid>https://www.bobobk.com/en/791.html</guid>
      <description>When performing exploratory analysis, bar charts and box plots are excellent methods that can effectively display the general data structure and distribution. Recently, I saw someone using raincloud plots to display data, and the graphics looked beautiful and interesting. Therefore, I have organized this information and implemented the drawing of raincloud plots using Python.</description>
    </item>
    <item>
      <title>Introduction to Canonical Correlation Analysis and Python Implementation</title>
      <link>https://www.bobobk.com/en/581.html</link>
      <pubDate>Wed, 29 Dec 2021 14:01:33 +0800</pubDate>
      <guid>https://www.bobobk.com/en/581.html</guid>
      <description>When handling high-dimensional data, we can use LDA, PCA, etc., for dimensionality reduction. But what if two datasets come from the same samples but differ in data types and scales? This is where Canonical Correlation Analysis (CCA) becomes useful.</description>
    </item>
    <item>
      <title>Calculating Confidence Intervals Using Bootstrapping</title>
      <link>https://www.bobobk.com/en/838.html</link>
      <pubDate>Tue, 28 Dec 2021 10:19:45 +0800</pubDate>
      <guid>https://www.bobobk.com/en/838.html</guid>
      <description>Confidence interval (CI) is the range within which the population parameter lies with a certain confidence level. It is estimated based on the original observed sample and is usually defined as 95%, commonly referred to as the 95% confidence interval.</description>
    </item>
    <item>
      <title>Choice of Preprocessing Methods: Scale, Standardize, Normalize</title>
      <link>https://www.bobobk.com/en/981.html</link>
      <pubDate>Sun, 26 Dec 2021 15:43:24 +0800</pubDate>
      <guid>https://www.bobobk.com/en/981.html</guid>
      <description>Many machine learning methods require data to be approximately normally distributed and as close as possible to normality. In Python, sklearn is the popular package for machine learning, providing functions including MinMaxScaler, RobustScaler, StandardScaler, and Normalizer for preprocessing.</description>
    </item>
    <item>
      <title>The c-index and Its Application in Survival Analysis</title>
      <link>https://www.bobobk.com/en/592.html</link>
      <pubDate>Thu, 23 Dec 2021 17:06:46 +0800</pubDate>
      <guid>https://www.bobobk.com/en/592.html</guid>
      <description>The concordance index (c-index) is a metric used to evaluate the performance of predictive models, particularly in survival analysis. It is defined as the proportion of concordant pairs at all time points.</description>
    </item>
    <item>
      <title>Python Native Lists vs. NumPy Arrays</title>
      <link>https://www.bobobk.com/en/321.html</link>
      <pubDate>Wed, 22 Dec 2021 09:49:00 +0800</pubDate>
      <guid>https://www.bobobk.com/en/321.html</guid>
      <description>In Python, you can choose from various native data types to store collection data, including list, array, tuple, and dictionary. Among these, the list is highly flexible, can store any content, and is mutable, making it widely applicable. However, for scientific computing and storing purely numerical data, NumPy is widely used and has practically replaced lists. So, what are the differences between them, how significant are these differences, and how should they be applied in practice?</description>
    </item>
    <item>
      <title>K-Means Clustering and Implementation with sklearn</title>
      <link>https://www.bobobk.com/en/902.html</link>
      <pubDate>Mon, 20 Dec 2021 08:19:34 +0800</pubDate>
      <guid>https://www.bobobk.com/en/902.html</guid>
      <description>Cluster analysis allows us to find groups of similar samples or features, with stronger correlations among these objects. Common uses include grouping samples by different gene expression profiles or grouping genes by classifications of different samples.</description>
    </item>
    <item>
      <title>Four Plotting Tips in Python</title>
      <link>https://www.bobobk.com/en/469843.html</link>
      <pubDate>Mon, 13 Dec 2021 18:25:17 +0800</pubDate>
      <guid>https://www.bobobk.com/en/469843.html</guid>
      <description>When visualizing data, it&amp;rsquo;s common to plot multiple charts in a single figure. For example, visualizing the same variable from different perspectives like side-by-side histograms and boxplots for numerical variables is useful.</description>
    </item>
    <item>
      <title>Using Docker to Render JavaScript Web Pages via Browser from Command Line</title>
      <link>https://www.bobobk.com/en/525.html</link>
      <pubDate>Wed, 08 Dec 2021 08:58:40 +0800</pubDate>
      <guid>https://www.bobobk.com/en/525.html</guid>
      <description>When using scrapy to crawl web pages, many websites render content with JavaScript, so directly fetching the source code will not get the needed content. In this case, using selenium to drive a browser to get the rendered content is very suitable.</description>
    </item>
    <item>
      <title>Accelerating pip and anaconda in China</title>
      <link>https://www.bobobk.com/en/833.html</link>
      <pubDate>Mon, 06 Dec 2021 09:23:35 +0800</pubDate>
      <guid>https://www.bobobk.com/en/833.html</guid>
      <description>Since the default addresses for pip and anaconda are very slow to access in China, adding domestic mirrors for acceleration is necessary.</description>
    </item>
    <item>
      <title>Hands-on Implementation of Random Forest Algorithm with Python</title>
      <link>https://www.bobobk.com/en/621.html</link>
      <pubDate>Mon, 28 Dec 2020 14:04:47 +0800</pubDate>
      <guid>https://www.bobobk.com/en/621.html</guid>
      <description>This article will guide you through a hands-on implementation of a powerful random forest machine learning model. It aims to complement my conceptual explanation of random forests, but as long as you have a basic understanding of decision trees and random forests, you can fully read it. Later, we will discuss how to improve the model built here.</description>
    </item>
    <item>
      <title>Summary of various string segmentation methods in Python</title>
      <link>https://www.bobobk.com/en/852.html</link>
      <pubDate>Mon, 09 Nov 2020 10:46:15 +0800</pubDate>
      <guid>https://www.bobobk.com/en/852.html</guid>
      <description>Today I will introduce to you various string segmentation methods that can be used in Python. They are</description>
    </item>
    <item>
      <title>Python Script to Snatch Recently Expired Domains</title>
      <link>https://www.bobobk.com/en/731.html</link>
      <pubDate>Tue, 22 Sep 2020 12:02:10 +0800</pubDate>
      <guid>https://www.bobobk.com/en/731.html</guid>
      <description>&amp;lsquo;Many domain enthusiasts scour forums and websites frantically searching for and snatching up suitable domains, even spending heavily to buy desired domains from their owners. International domain management bodies adopt a &amp;ldquo;first-to-apply, first-to-register, first-to-use&amp;rdquo; policy. Since domains only require a small annual registration fee, continuous registration grants you the right to use the domain. Because of this, many domain resellers (commonly known as &amp;ldquo;domaining pros&amp;rdquo;) often spend heavily on short, easy-to-remember domains. I used to think about buying shorter domains for building scraping sites, but unfortunately, both snatching and buying from others were very expensive. Since it&amp;quot;s first-come, first-served, we can also acquire good domains by registering them before the current owner forgets to renew.&amp;rsquo;</description>
    </item>
    <item>
      <title>python3 solution to LeeCode medium problem</title>
      <link>https://www.bobobk.com/en/671.html</link>
      <pubDate>Wed, 29 Jul 2020 09:54:36 +0800</pubDate>
      <guid>https://www.bobobk.com/en/671.html</guid>
      <description>This is an article analyzing a problem from the coding practice site LeeCode.</description>
    </item>
    <item>
      <title>How to Properly Make Venn Diagrams Using Python Packages</title>
      <link>https://www.bobobk.com/en/523.html</link>
      <pubDate>Wed, 08 Jul 2020 10:06:56 +0800</pubDate>
      <guid>https://www.bobobk.com/en/523.html</guid>
      <description>In Venn diagrams of two sets, there can be two (or more) overlapping circles representing sets of different sizes, but the circles are the same size. Actually, the circles should be proportional to the size of the sets, and the overlapping area should also be proportional to the data overlap.</description>
    </item>
    <item>
      <title>Calculating the Gini Coefficient and Plotting the Lorenz Curve with matplotlib</title>
      <link>https://www.bobobk.com/en/521.html</link>
      <pubDate>Sun, 31 May 2020 19:22:50 +0800</pubDate>
      <guid>https://www.bobobk.com/en/521.html</guid>
      <description>The Gini coefficient and Lorenz curve are widely used to represent data inequality, especially wealth inequality. However, currently in Python, there isn&amp;rsquo;t a very good function to directly plot the Lorenz curve. Since the current project requires it, this article records how to use numpy, pandas, matplotlib, and other packages to calculate the Gini coefficient and plot the Lorenz curve for practical use.</description>
    </item>
    <item>
      <title>Bayesian Theory and Practical Python Applications</title>
      <link>https://www.bobobk.com/en/823.html</link>
      <pubDate>Sun, 31 May 2020 11:58:57 +0800</pubDate>
      <guid>https://www.bobobk.com/en/823.html</guid>
      <description>Bayesian theory provides a principled method for calculating conditional probabilities. With it, we can easily compute conditional probabilities for events where intuition often fails.</description>
    </item>
    <item>
      <title>Fetching Stock Data Using Python&#39;s yfinance Package</title>
      <link>https://www.bobobk.com/en/512.html</link>
      <pubDate>Sat, 09 May 2020 08:54:26 +0800</pubDate>
      <guid>https://www.bobobk.com/en/512.html</guid>
      <description>Historical stock data is a very important kind of time series data, playing a significant role in data science. Let&amp;rsquo;s start learning how to handle time series data, preparing for future stock prediction and analysis.</description>
    </item>
    <item>
      <title>Using folium to Draw a COVID-19 Pandemic Map</title>
      <link>https://www.bobobk.com/en/624.html</link>
      <pubDate>Sun, 03 May 2020 08:28:47 +0800</pubDate>
      <guid>https://www.bobobk.com/en/624.html</guid>
      <description>After being contained in China, the COVID-19 pandemic became increasingly severe worldwide. Countries and regions publish daily new infection and death data to help fight the pandemic globally.</description>
    </item>
    <item>
      <title>Mounting Oracle Object Storage using s3fs-fuse</title>
      <link>https://www.bobobk.com/en/724.html</link>
      <pubDate>Fri, 01 May 2020 08:51:28 +0800</pubDate>
      <guid>https://www.bobobk.com/en/724.html</guid>
      <description>My previous article, &amp;ldquo;Getting Free Oracle Cloud Servers and Automating Deployment with Scripts,&amp;rdquo; explained how to use the CLI to acquire free Oracle machines. Oracle&amp;rsquo;s free tier offers a total of 100GB of disk space, but you can also mount an additional 20GB of object storage as a local file system. This is especially convenient for data migration, as the data can be easily mounted to another instance. This article will show you how to enable free Oracle Object Storage and mount it as a local drive on a Linux system.</description>
    </item>
    <item>
      <title>Efficient Ways to Check If a List or Tuple Is Empty in Python</title>
      <link>https://www.bobobk.com/en/814.html</link>
      <pubDate>Tue, 28 Apr 2020 07:26:37 +0800</pubDate>
      <guid>https://www.bobobk.com/en/814.html</guid>
      <description>In Python, to check whether an array or tuple is empty, there are three methods: comparing with an empty list, checking the length, and using an if statement.</description>
    </item>
    <item>
      <title>Deploying a Flask Docker App Using Okteto’s Free Container</title>
      <link>https://www.bobobk.com/en/810.html</link>
      <pubDate>Mon, 27 Apr 2020 10:04:37 +0800</pubDate>
      <guid>https://www.bobobk.com/en/810.html</guid>
      <description>I just saw a post on the forum about Okteto&amp;rsquo;s free containers, and since I hadn&amp;rsquo;t registered before, I decided to deploy my site&amp;rsquo;s Flask app using Okteto&amp;rsquo;s free container. Okteto&amp;rsquo;s free Kubernetes plan offers generous resources: 4-core CPU, 8GB RAM, 10GB SSD — basically a great VPS for free. Here&amp;rsquo;s how to deploy using Okteto.</description>
    </item>
    <item>
      <title>Detailed Explanation of Confusion Matrix in Machine Learning</title>
      <link>https://www.bobobk.com/en/932.html</link>
      <pubDate>Sun, 26 Apr 2020 20:30:36 +0800</pubDate>
      <guid>https://www.bobobk.com/en/932.html</guid>
      <description>In machine learning, after collecting, cleaning data, and designing preprocessing algorithms, how do we know the effectiveness of the algorithm? How to evaluate if the predictive model can classify effectively and how accurate the classification is? This involves the confusion matrix, which is widely used to evaluate classification problems in machine learning.</description>
    </item>
    <item>
      <title>Compiling Custom LEDE Firmware for K2 Router Using GitHub Actions</title>
      <link>https://www.bobobk.com/en/562.html</link>
      <pubDate>Mon, 16 Mar 2020 13:37:38 +0800</pubDate>
      <guid>https://www.bobobk.com/en/562.html</guid>
      <description>I’ve been using LEDE OpenWRT firmware as my router’s firmware. Due to version updates, some software is missing in older versions, so I decided to compile a custom firmware containing only the needed software for my Phicomm K2 router.</description>
    </item>
    <item>
      <title>Use Python to set image background color to transparent</title>
      <link>https://www.bobobk.com/en/421.html</link>
      <pubDate>Sun, 12 Jan 2020 16:10:01 +0800</pubDate>
      <guid>https://www.bobobk.com/en/421.html</guid>
      <description>Since the original logo has a white background, and we need to change the white background to transparent, here we use the versatile Python tool for image conversion, specifically the pillow package’s Image.</description>
    </item>
    <item>
      <title>Application of Python Implementation of Gradient Descent in Practice</title>
      <link>https://www.bobobk.com/en/648.html</link>
      <pubDate>Wed, 08 Jan 2020 14:04:06 +0800</pubDate>
      <guid>https://www.bobobk.com/en/648.html</guid>
      <description>Gradient descent is a first-order optimization algorithm, commonly called the steepest descent method. To find a local minimum of a function using gradient descent, one must iteratively move from the current point in the opposite direction of the gradient (or approximate gradient) by a specified step size.</description>
    </item>
    <item>
      <title>Mining Monero on MinerGate Pool Using CPUMiner-Multi on CentOS7</title>
      <link>https://www.bobobk.com/en/973.html</link>
      <pubDate>Tue, 07 Jan 2020 11:22:10 +0800</pubDate>
      <guid>https://www.bobobk.com/en/973.html</guid>
      <description>Too many idle servers collecting dust. Here is an option to make use of idle VPS. Today I will teach you how to use CPUMiner-Multi on CentOS for mining and earn some cryptocurrency. Monero is currently the most profitable cryptocurrency, so we choose Monero.</description>
    </item>
    <item>
      <title>git push update rejected because the remote repository contains commits not present locally</title>
      <link>https://www.bobobk.com/en/937.html</link>
      <pubDate>Mon, 06 Jan 2020 15:58:15 +0800</pubDate>
      <guid>https://www.bobobk.com/en/937.html</guid>
      <description>After improving a Hugo theme used by this blog, an error occurred when pushing to the git repository.</description>
    </item>
    <item>
      <title>Decision Trees in Machine Learning and Python Examples</title>
      <link>https://www.bobobk.com/en/912.html</link>
      <pubDate>Sat, 04 Jan 2020 10:49:02 +0800</pubDate>
      <guid>https://www.bobobk.com/en/912.html</guid>
      <description>A tree in real life has many branches and leaves. In fact, the concept of trees is widely used in machine learning, covering classification and regression. In decision analysis, decision trees are used to visually represent and make decisions. As the name implies, a decision tree is a tree-shaped decision model.</description>
    </item>
    <item>
      <title>The Mathematical Principles Behind PCA and Python Example Demonstration</title>
      <link>https://www.bobobk.com/en/811.html</link>
      <pubDate>Fri, 03 Jan 2020 14:35:46 +0800</pubDate>
      <guid>https://www.bobobk.com/en/811.html</guid>
      <description>This article introduces a very important dimensionality reduction method in machine learning—Principal Component Analysis.</description>
    </item>
    <item>
      <title>Explanation of bit, byte, Bps, bps, kbps, Bps, Gbps, pps and other bit/byte network speed units</title>
      <link>https://www.bobobk.com/en/653.html</link>
      <pubDate>Thu, 02 Jan 2020 15:01:36 +0800</pubDate>
      <guid>https://www.bobobk.com/en/653.html</guid>
      <description>It is always known that bit and byte are two concepts, one is binary digit, and the other is a byte unit consisting of 8 bits. However, in practical situations, people still confuse bit and byte in various network speed abbreviations. This article summarizes the knowledge I found.</description>
    </item>
    <item>
      <title>Statistical Skew Distributions Reveal Statistical Traps in Life</title>
      <link>https://www.bobobk.com/en/638.html</link>
      <pubDate>Fri, 27 Dec 2019 16:06:04 +0800</pubDate>
      <guid>https://www.bobobk.com/en/638.html</guid>
      <description>90% of drivers believe their driving skills are above average, 90% think their IQ is above the average IQ of the population, and the key is this can actually be consistent with real data — it&amp;rsquo;s true and not fabricated.</description>
    </item>
    <item>
      <title>Command-line UI tool for monitoring computer CPU: s-tui</title>
      <link>https://www.bobobk.com/en/615.html</link>
      <pubDate>Mon, 23 Dec 2019 14:26:01 +0800</pubDate>
      <guid>https://www.bobobk.com/en/615.html</guid>
      <description>s-tui is a free and open-source command-line UI tool for monitoring computer CPU. It can monitor CPU temperature, frequency, etc. in real-time and display it graphically. This is a Python tool that can be installed via pip, but requires root permissions. It can be used via SSH login to monitor CPU status graphically.</description>
    </item>
    <item>
      <title>Installing ffmpeg on CentOS 7 and Streaming Movies on Douyu</title>
      <link>https://www.bobobk.com/en/557.html</link>
      <pubDate>Mon, 09 Dec 2019 17:39:34 +0800</pubDate>
      <guid>https://www.bobobk.com/en/557.html</guid>
      <description>Getting back on track, today&amp;rsquo;s tutorial by Chunjiang Muker shows how to automatically stream Douyu live on CentOS 7 to achieve 24/7 uninterrupted streaming.</description>
    </item>
    <item>
      <title>How to Use Tongji University Public Mirror for CentOS</title>
      <link>https://www.bobobk.com/en/556.html</link>
      <pubDate>Sun, 08 Dec 2019 20:21:22 +0800</pubDate>
      <guid>https://www.bobobk.com/en/556.html</guid>
      <description>A few days ago on WeChat, I discovered that Tongji University actually has its own open source software mirror site. Our lab servers are still using Alibaba Cloud&amp;rsquo;s CentOS 7 mirror. Wouldn&amp;rsquo;t it be much faster if we switched to the university&amp;rsquo;s mirror? So how to change CentOS 7 public repo to Tongji University&amp;rsquo;s mirror?</description>
    </item>
    <item>
      <title>Predicting Virmach Black Friday VPS Prices Using sklearn Linear Regression and Alerts</title>
      <link>https://www.bobobk.com/en/480.html</link>
      <pubDate>Wed, 04 Dec 2019 20:14:26 +0800</pubDate>
      <guid>https://www.bobobk.com/en/480.html</guid>
      <description>Virmach&amp;rsquo;s Black Friday machines appear and disappear rapidly. For hosting enthusiasts, constantly checking current VPS prices and deciding whether to buy is troublesome. This article lists Black Friday machine configurations using sklearn and predicts VPS prices with machine learning to alert users if prices are cheap.</description>
    </item>
    <item>
      <title>VPS Performance and Network One-Click Test Script</title>
      <link>https://www.bobobk.com/en/466.html</link>
      <pubDate>Mon, 02 Dec 2019 09:04:01 +0800</pubDate>
      <guid>https://www.bobobk.com/en/466.html</guid>
      <description>During the recent Black Friday sales, I grabbed a special machine from Virmach, so I thought of testing its performance by running some VPS performance and network tests since the machine looks pretty good.</description>
    </item>
    <item>
      <title>Using find and sed to Batch Replace Strings in Text</title>
      <link>https://www.bobobk.com/en/458.html</link>
      <pubDate>Sun, 24 Nov 2019 16:11:25 +0000</pubDate>
      <guid>https://www.bobobk.com/en/458.html</guid>
      <description>How to batch replace strings in Linux? At first, I thought about using sed with -r or some iterative method, but found sed doesn&amp;rsquo;t support iteration parameters. So, I use find to get files and sed to replace strings.</description>
    </item>
    <item>
      <title>Manually Create Custom System Service on CentOS7</title>
      <link>https://www.bobobk.com/en/457.html</link>
      <pubDate>Sun, 17 Nov 2019 16:11:25 +0000</pubDate>
      <guid>https://www.bobobk.com/en/457.html</guid>
      <description>During Linux system development, sometimes your program might crash or be stopped. To keep it running continuously, adding the program to the service list is a very good practice.</description>
    </item>
    <item>
      <title>Solving Expert-Level Sudoku Puzzles Quickly Using Python&#39;s Backtracking Algorithm</title>
      <link>https://www.bobobk.com/en/756.html</link>
      <pubDate>Mon, 11 Nov 2019 16:11:25 +0000</pubDate>
      <guid>https://www.bobobk.com/en/756.html</guid>
      <description>I often play Sudoku in my leisure time as a form of relaxation. My usual method involves eliminating duplicates and filling in unique numbers first, then proceeding step by step. However, it&amp;rsquo;s inevitable to guess numbers and adjust based on feedback. So, is there a better algorithm to solve Sudoku puzzles? Here, I will use the backtracking method in Python to solve 9x9 expert-level Sudoku puzzles.</description>
    </item>
    <item>
      <title>Reducing /home partition size and increasing /root space in CentOS 8</title>
      <link>https://www.bobobk.com/en/745.html</link>
      <pubDate>Sat, 02 Nov 2019 16:11:25 +0000</pubDate>
      <guid>https://www.bobobk.com/en/745.html</guid>
      <description>I recently set up a CentOS 8 virtual machine to experience the latest CentOS system, allocating 127GB of space. Due to actual needs, I found that the /home partition had tens of gigabytes of space.</description>
    </item>
    <item>
      <title>Configuring IPv6 Passthrough for Padavan Router to Enable IPv6 for All Internal Hosts</title>
      <link>https://www.bobobk.com/en/743.html</link>
      <pubDate>Fri, 01 Nov 2019 00:00:00 +0000</pubDate>
      <guid>https://www.bobobk.com/en/743.html</guid>
      <description>Both China Telecom and CERNET support IPv6, but router configurations often go wrong. This article explains how to set up a K2 router with Padavan firmware to ensure all hosts under the router have IPv6.</description>
    </item>
    <item>
      <title>Using requests and multiprocessing for multi-threaded brute-force cracking of default lnmp mysql password</title>
      <link>https://www.bobobk.com/en/739.html</link>
      <pubDate>Wed, 23 Oct 2019 00:00:00 +0000</pubDate>
      <guid>https://www.bobobk.com/en/739.html</guid>
      <description>My blog used the lnmp program to build the web environment, but when I needed to use mysql, I found that the lnmp installation log file was missing and the mysql root password was forgotten. I remember that the lnmp was installed by pressing Enter all the way, and the default lnmp password is lnmp.org# plus 5 random numbers, with only 100,000 possibilities. In this case, brute-forcing 100,000 times will definitely find the password.</description>
    </item>
    <item>
      <title>Deploying an SSH Honeypot with Docker to Record SSH Login Passwords</title>
      <link>https://www.bobobk.com/en/613.html</link>
      <pubDate>Mon, 21 Oct 2019 16:11:25 +0000</pubDate>
      <guid>https://www.bobobk.com/en/613.html</guid>
      <description>Today I logged into the server and found records of SSH brute force attacks, so I thought I might as well record the hacker&amp;rsquo;s passwords and try logging into his server in reverse.</description>
    </item>
    <item>
      <title>10 Tips to Improve Your Python Data Analysis Skills</title>
      <link>https://www.bobobk.com/en/385.html</link>
      <pubDate>Mon, 08 Jul 2019 04:34:47 +0000</pubDate>
      <guid>https://www.bobobk.com/en/385.html</guid>
      <description>&lt;p&gt;In programming, even small tips or tools can make a big difference.&lt;br&gt;&#xA;For example, a shortcut key or a helpful package might simplify a lot of work and double your efficiency.&lt;br&gt;&#xA;Here I’ll share a few small tricks I often use.&lt;/p&gt;&#xA;&lt;h1 id=&#34;1-use-pandas_profiling-to-inspect-dataframes&#34;&gt;1. Use &lt;code&gt;pandas_profiling&lt;/code&gt; to Inspect DataFrames&lt;/h1&gt;&#xA;&lt;p&gt;Understanding your data is essential before doing any analysis.&lt;br&gt;&#xA;Although &lt;code&gt;df.describe()&lt;/code&gt; and &lt;code&gt;df.info()&lt;/code&gt; provide basic summaries, they’re limited with large or complex datasets.&lt;br&gt;&#xA;The &lt;code&gt;pandas_profiling&lt;/code&gt; library offers detailed profiling through &lt;code&gt;profile_report()&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://www.bobobk.com/wp-content/uploads/2019/07/pandas_profile.webp&#34; alt=&#34;pandas_profile&#34;&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;installation&#34;&gt;Installation&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;pip install pandas-profiling&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# or&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;conda install -c anaconda pandas-profiling&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;&#xA;&lt;p&gt;It’s very easy to use:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; pandas &lt;span style=&#34;color:#66d9ef&#34;&gt;as&lt;/span&gt; pd&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; pandas_profiling&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;df &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; pd&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;read_csv(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;train.csv&amp;#34;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;df&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;profile_report()&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;img src=&#34;https://www.bobobk.com/wp-content/uploads/2019/07/titanic.gif&#34; alt=&#34;titanic&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;You can also export the report to HTML:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;html &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; df&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;profile_report(title&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;Titanic Profiling Report&amp;#39;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;html&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;to_file(outputfile&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;titanic_Profiling_Report.html&amp;#34;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;img src=&#34;https://www.bobobk.com/wp-content/uploads/2019/07/titanic_html.gif&#34; alt=&#34;titanic_html&#34;&gt;&lt;/p&gt;&#xA;&lt;h1 id=&#34;2-interactive-plotting-with-cufflinks&#34;&gt;2. Interactive Plotting with &lt;code&gt;cufflinks&lt;/code&gt;&lt;/h1&gt;&#xA;&lt;p&gt;Pandas has built-in plotting via &lt;code&gt;.plot()&lt;/code&gt;, but it’s not interactive.&lt;br&gt;&#xA;If you want interactivity, try the &lt;code&gt;cufflinks&lt;/code&gt; package.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Serialization and Deserialization in Python</title>
      <link>https://www.bobobk.com/en/361.html</link>
      <pubDate>Mon, 01 Jul 2019 10:36:01 +0000</pubDate>
      <guid>https://www.bobobk.com/en/361.html</guid>
      <description>Sometimes you may need to temporarily store data so that it can be called directly the next time the program runs, or exchanged between different threads. Serialization is a way to store data in this way, and here we explain Python&amp;rsquo;s serialization and deserialization using the pickle package.</description>
    </item>
    <item>
      <title>Python Data Visualization - The Post-2000 Gaokao Generation</title>
      <link>https://www.bobobk.com/en/320.html</link>
      <pubDate>Sat, 01 Jun 2019 17:50:52 +0000</pubDate>
      <guid>https://www.bobobk.com/en/320.html</guid>
      <description>&lt;p&gt;The post-2000 generation has finished their &lt;strong&gt;Gaokao (National College Entrance Examination)&lt;/strong&gt;, and there&amp;rsquo;s been extensive media coverage (they are the &amp;ldquo;fresh meat&amp;rdquo; generation, after all!). Many reports focused on this year&amp;rsquo;s examinee data, presenting it with stunning charts. Feeling a bit jealous about how beautiful those charts are? Do you want to try making one yourself? These charts are actually products of &lt;strong&gt;data visualization&lt;/strong&gt; created with &lt;strong&gt;Python&lt;/strong&gt;, so yes, you can definitely make them yourself!&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;preparation&#34;&gt;Preparation&lt;/h2&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;strong&gt;Libraries&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;charts&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;pyecharts&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;strong&gt;Data&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Collected directly from Baidu.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;common-chart-types&#34;&gt;Common Chart Types&lt;/h2&gt;&#xA;&lt;p&gt;&lt;strong&gt;Bar charts&lt;/strong&gt; and &lt;strong&gt;line charts&lt;/strong&gt; are frequently seen and used, so let&amp;rsquo;s start with the basics.&lt;/p&gt;&#xA;&lt;h3 id=&#34;1-bar-chart&#34;&gt;1. Bar Chart&lt;/h3&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Number of Gaokao examinees&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;gaokao_num &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; [&lt;span style=&#34;color:#ae81ff&#34;&gt;940&lt;/span&gt;,&lt;span style=&#34;color:#ae81ff&#34;&gt;940&lt;/span&gt;,&lt;span style=&#34;color:#f92672&#34;&gt;...&lt;/span&gt;,&lt;span style=&#34;color:#ae81ff&#34;&gt;375&lt;/span&gt;]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;gaokao_num&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;reverse()&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Number of admitted students&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;luqu_num &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; [&lt;span style=&#34;color:#ae81ff&#34;&gt;700&lt;/span&gt;,&lt;span style=&#34;color:#ae81ff&#34;&gt;705&lt;/span&gt;,&lt;span style=&#34;color:#f92672&#34;&gt;...&lt;/span&gt;,&lt;span style=&#34;color:#ae81ff&#34;&gt;221&lt;/span&gt;]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;luqu_num&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;reverse()&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Admission rate&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;luqu_lev&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; [&lt;span style=&#34;color:#ae81ff&#34;&gt;74.46&lt;/span&gt;,&lt;span style=&#34;color:#ae81ff&#34;&gt;75&lt;/span&gt;,&lt;span style=&#34;color:#f92672&#34;&gt;...&lt;/span&gt;,&lt;span style=&#34;color:#ae81ff&#34;&gt;59&lt;/span&gt;]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;luqu_lev&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;reverse()&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; charts&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;options &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;chart&amp;#39;&lt;/span&gt;   : {&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;zoomType&amp;#39;&lt;/span&gt;:&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;xy&amp;#39;&lt;/span&gt;},&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#75715e&#34;&gt;# Title&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;title&amp;#39;&lt;/span&gt;   : {&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;text&amp;#39;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;2000-2017 Gaokao Data&amp;#39;&lt;/span&gt;},&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#75715e&#34;&gt;# Subtitle&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;subtitle&amp;#39;&lt;/span&gt;: {&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;text&amp;#39;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;Source: edu.sina.com.cn&amp;#39;&lt;/span&gt;},&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#75715e&#34;&gt;# X-axis&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;xAxis&amp;#39;&lt;/span&gt;   : {&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;categories&amp;#39;&lt;/span&gt;: [&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;2000&amp;#39;&lt;/span&gt;,&lt;span style=&#34;color:#f92672&#34;&gt;...&lt;/span&gt;,&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;2017&amp;#39;&lt;/span&gt;]},&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#75715e&#34;&gt;# Y-axis&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;yAxis&amp;#39;&lt;/span&gt;   : {&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;title&amp;#39;&lt;/span&gt;: {&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;text&amp;#39;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;Million people/year&amp;#39;&lt;/span&gt;}},&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;series &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;  [{&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;type&amp;#39;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;column&amp;#39;&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;name&amp;#39;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;Number of Gaokao Examinees&amp;#39;&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;data&amp;#39;&lt;/span&gt;: gaokao_num&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;},{&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;type&amp;#39;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;column&amp;#39;&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;name&amp;#39;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;Number of Admitted Students&amp;#39;&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;data&amp;#39;&lt;/span&gt;: luqu_num&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;charts&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;plot(series, options&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;options, show&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;inline&amp;#39;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Due to a minor issue with my &lt;code&gt;pyecharts&lt;/code&gt; setup, I used the &lt;code&gt;charts&lt;/code&gt; library. Using &lt;code&gt;pyecharts&lt;/code&gt; is even simpler, but I won&amp;rsquo;t repeat it here. You can check the source code if needed.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Parallelism in One Line of Python Code</title>
      <link>https://www.bobobk.com/en/318.html</link>
      <pubDate>Sat, 01 Jun 2019 17:47:59 +0000</pubDate>
      <guid>https://www.bobobk.com/en/318.html</guid>
      <description>Python has a somewhat notorious reputation when it comes to program parallelization. Technical issues aside, such as thread implementation and the GIL, I believe incorrect teaching guidance is the main problem. Common classic Python multithreading and multiprocessing tutorials often seem &amp;ldquo;heavy&amp;rdquo; and tend to scratch the surface without deeply exploring the most useful content for daily work.</description>
    </item>
    <item>
      <title>Longest Palindromic Substring Algorithm - Manacher</title>
      <link>https://www.bobobk.com/en/291.html</link>
      <pubDate>Thu, 28 Mar 2019 07:17:29 +0000</pubDate>
      <guid>https://www.bobobk.com/en/291.html</guid>
      <description>While solving LeetCode problems, I encountered a question about finding the longest palindromic substring.</description>
    </item>
    <item>
      <title>Finding Common Values in Two Python Lists</title>
      <link>https://www.bobobk.com/en/289.html</link>
      <pubDate>Fri, 08 Mar 2019 08:23:32 +0000</pubDate>
      <guid>https://www.bobobk.com/en/289.html</guid>
      <description>In daily life, we often encounter the need to find common values between two arrays. This article provides several simple and practical methods on how to elegantly get common values between two arrays in Python.</description>
    </item>
    <item>
      <title>Python Implementation of Classic Sorting Algorithms (1)</title>
      <link>https://www.bobobk.com/en/275.html</link>
      <pubDate>Tue, 29 Jan 2019 07:29:52 +0000</pubDate>
      <guid>https://www.bobobk.com/en/275.html</guid>
      <description>&lt;p&gt;In computer science, a &lt;strong&gt;sorting algorithm&lt;/strong&gt; is an algorithm that arranges a list of data in a specific order. The most commonly used sorting methods are numerical order and lexicographical (dictionary) order. Efficient sorting algorithms are crucial in various other algorithms. Sorting algorithms are also used in processing text data and generating human-readable output.&lt;/p&gt;&#xA;&lt;p&gt;Basically, the output of a sorting algorithm must adhere to the following two principles:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;The output result is an &lt;strong&gt;increasing sequence&lt;/strong&gt; (increasing refers to the desired sort order).&lt;/li&gt;&#xA;&lt;li&gt;The output result is a &lt;strong&gt;permutation&lt;/strong&gt; or rearrangement of the original input.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;The 10 classic sorting algorithms can be divided into two main categories:&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Non-linear time comparison-based sorting&lt;/strong&gt;: These algorithms determine the relative order of elements by comparing them. Since their time complexity cannot break through $O(n log n)$, they are called non-linear time comparison-based sorting algorithms.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Linear time non-comparison-based sorting&lt;/strong&gt;: These algorithms do not determine the relative order of elements by comparison. They can break through the lower bound of comparison-based sorting and run in linear time, hence they are called linear time non-comparison-based sorting algorithms.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Faceswap Training Resource Acquisition and Processing</title>
      <link>https://www.bobobk.com/en/271.html</link>
      <pubDate>Wed, 23 Jan 2019 14:19:38 +0000</pubDate>
      <guid>https://www.bobobk.com/en/271.html</guid>
      <description>Following the previous article, &amp;ldquo;Faceswap Deep Learning AI for Video Face Swapping Explained,&amp;rdquo; everyone has learned how to perform face replacement in videos using AI through model training.</description>
    </item>
    <item>
      <title>Detailed Examples of Seaborn Plotting Kernel Density Curves</title>
      <link>https://www.bobobk.com/en/263.html</link>
      <pubDate>Sun, 20 Jan 2019 11:41:58 +0000</pubDate>
      <guid>https://www.bobobk.com/en/263.html</guid>
      <description>&lt;p&gt;In a frequency distribution histogram, when the sample size is sufficiently enlarged to its limit, and the bin width is infinitely shortened, the step-like broken line in the frequency histogram will evolve into a smooth curve. This curve is called the density distribution curve of the population.&lt;/p&gt;&#xA;&lt;p&gt;In this article, Chunjing Muke will detail how to use the Python plotting library Seaborn and the Iris flower dataset from Pandas to plot various cool density curves.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;1-basic-density-curve&#34;&gt;1. Basic Density Curve&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; seaborn &lt;span style=&#34;color:#66d9ef&#34;&gt;as&lt;/span&gt; sns&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    sns&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;set(color_codes&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;True&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    sns&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;set_style(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;white&amp;#34;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    df &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; pd&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;read_csv(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;iris.csv&amp;#39;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    sns&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;kdeplot(df[&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;sepal_width&amp;#39;&lt;/span&gt;])&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;img src=&#34;https://www.bobobk.com/wp-content/uploads/2019/01/basic_kdeplot.webp&#34; alt=&#34;‘Detailed Examples of Seaborn Plotting Kernel Density Curves’&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;To plot a kernel density curve using Seaborn, you only need to use &lt;code&gt;kdeplot&lt;/code&gt;. Note that a density curve only requires one variable; here we choose the &lt;code&gt;sepal_width&lt;/code&gt; column.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;2-density-curve-with-shading&#34;&gt;2. Density Curve with Shading&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; seaborn &lt;span style=&#34;color:#66d9ef&#34;&gt;as&lt;/span&gt; sns&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    sns&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;set(color_codes&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;True&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    sns&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;set_style(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;white&amp;#34;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    df &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; pd&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;read_csv(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;iris.csv&amp;#39;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    sns&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;kdeplot(df[&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;sepal_width&amp;#39;&lt;/span&gt;],shade&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;True&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;img src=&#34;https://www.bobobk.com/wp-content/uploads/2019/01/shadow_kdeplot.webp&#34; alt=&#34;‘Detailed Examples of Seaborn Plotting Kernel Density Curves’&#34;&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Detailed Explanation of Faceswap Deep Learning AI for Video Face Swapping</title>
      <link>https://www.bobobk.com/en/258.html</link>
      <pubDate>Fri, 18 Jan 2019 09:29:15 +0000</pubDate>
      <guid>https://www.bobobk.com/en/258.html</guid>
      <description>Chunjing Muke will introduce the super popular black technology application deepfake, an app that achieves face swapping in images and videos.</description>
    </item>
    <item>
      <title>Drawing a Stunning &#34;Dream of the Red Chamber&#34; Word Cloud with Python 3</title>
      <link>https://www.bobobk.com/en/252.html</link>
      <pubDate>Thu, 17 Jan 2019 03:21:06 +0000</pubDate>
      <guid>https://www.bobobk.com/en/252.html</guid>
      <description>&lt;p&gt;Word clouds, which I&amp;rsquo;m sure you&amp;rsquo;ve all seen, are created using &lt;strong&gt;wordcloud&lt;/strong&gt;, a famous Python library. This article will detail how to use &lt;strong&gt;wordcloud&lt;/strong&gt; to create a word cloud for &amp;ldquo;Dream of the Red Chamber,&amp;rdquo; one of China&amp;rsquo;s Four Great Classical Novels.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h1 id=&#34;1-preparation&#34;&gt;1. Preparation&lt;/h1&gt;&#xA;&lt;p&gt;This involves three parts:&lt;/p&gt;&#xA;&lt;h4 id=&#34;2-the-wordcloud-and-jieba-libraries-which-can-be-installed-using-pip-install-wordcloud-and-pip-install-jieba&#34;&gt;2. The &lt;strong&gt;wordcloud&lt;/strong&gt; and &lt;strong&gt;jieba&lt;/strong&gt; libraries, which can be installed using &lt;code&gt;pip install wordcloud&lt;/code&gt; and &lt;code&gt;pip install jieba&lt;/code&gt;.&lt;/h4&gt;&#xA;&lt;h4 id=&#34;3-preparing-a-chinese-font-file&#34;&gt;3. Preparing a Chinese font file.&lt;/h4&gt;&#xA;&lt;h4 id=&#34;the-txt-text-file-and-font-file-are-bundled-together-for-your-convenience-to-replicate-this-tutorials-example&#34;&gt;The &lt;code&gt;.txt&lt;/code&gt; text file and font file are bundled together for your convenience to replicate this tutorial&amp;rsquo;s example.&lt;/h4&gt;&#xA;&lt;hr&gt;&#xA;&lt;h1 id=&#34;2-drawing-the-dream-of-the-red-chamber-word-cloud&#34;&gt;2. Drawing the &amp;ldquo;Dream of the Red Chamber&amp;rdquo; Word Cloud&lt;/h1&gt;&#xA;&lt;p&gt;Here&amp;rsquo;s the code directly:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#f92672&#34;&gt;from&lt;/span&gt; wordcloud &lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; WordCloud&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; jieba&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    text &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;join(jieba&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;cut(open(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;红楼梦.txt&amp;#34;&lt;/span&gt;)&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;read()))&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    wordcloud &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; WordCloud(font_path&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;kaibold.ttf&amp;#34;&lt;/span&gt;)&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;generate(text)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#75715e&#34;&gt;# Display the generated image:&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    plt&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;imshow(wordcloud, interpolation&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;bilinear&amp;#39;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    plt&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;axis(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;off&amp;#34;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    plt&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;margins(x&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;, y&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    plt&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;show()&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;img src=&#34;https://www.bobobk.com/wp-content/uploads/2019/01/wordcloud_raw.webp&#34; alt=&#34;《Drawing a Stunning “Dream of the Red Chamber” Word Cloud with Python 3》&#34;&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>TypeError: ufunc &#39;isnan&#39; not supported for the input types - Solution</title>
      <link>https://www.bobobk.com/en/245.html</link>
      <pubDate>Mon, 14 Jan 2019 12:42:00 +0000</pubDate>
      <guid>https://www.bobobk.com/en/245.html</guid>
      <description>&lt;p&gt;Today, while using Python&amp;rsquo;s &lt;strong&gt;Seaborn&lt;/strong&gt; to plot a heatmap (clustermap), I kept encountering this error. My data seemed perfectly fine, and a Google search didn&amp;rsquo;t yield any good solutions. After some exploration, I&amp;rsquo;m sharing the final solution here.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;1-generating-the-dataframe&#34;&gt;1. Generating the DataFrame&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; pandas &lt;span style=&#34;color:#66d9ef&#34;&gt;as&lt;/span&gt; pd&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; numpy &lt;span style=&#34;color:#66d9ef&#34;&gt;as&lt;/span&gt; np&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; matplotlib.pyplot &lt;span style=&#34;color:#66d9ef&#34;&gt;as&lt;/span&gt; plt&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#f92672&#34;&gt;from&lt;/span&gt; seaborn &lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; clustermap&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; seaborn &lt;span style=&#34;color:#66d9ef&#34;&gt;as&lt;/span&gt; sns; sns&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;set(color_codes&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;True&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    df &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; pd&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;DataFrame([[&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;a&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;b&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;c&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;d&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;e&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;f&amp;#34;&lt;/span&gt;],[&lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;,&lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt;,&lt;span style=&#34;color:#ae81ff&#34;&gt;3&lt;/span&gt;,&lt;span style=&#34;color:#ae81ff&#34;&gt;4&lt;/span&gt;,&lt;span style=&#34;color:#ae81ff&#34;&gt;5&lt;/span&gt;,&lt;span style=&#34;color:#ae81ff&#34;&gt;6&lt;/span&gt;],[&lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt;,&lt;span style=&#34;color:#ae81ff&#34;&gt;3&lt;/span&gt;,&lt;span style=&#34;color:#ae81ff&#34;&gt;4&lt;/span&gt;,&lt;span style=&#34;color:#ae81ff&#34;&gt;5&lt;/span&gt;,&lt;span style=&#34;color:#ae81ff&#34;&gt;6&lt;/span&gt;,&lt;span style=&#34;color:#ae81ff&#34;&gt;7&lt;/span&gt;],[&lt;span style=&#34;color:#ae81ff&#34;&gt;3&lt;/span&gt;,&lt;span style=&#34;color:#ae81ff&#34;&gt;4&lt;/span&gt;,&lt;span style=&#34;color:#ae81ff&#34;&gt;5&lt;/span&gt;,&lt;span style=&#34;color:#ae81ff&#34;&gt;6&lt;/span&gt;,&lt;span style=&#34;color:#ae81ff&#34;&gt;7&lt;/span&gt;,&lt;span style=&#34;color:#ae81ff&#34;&gt;8&lt;/span&gt;]],  columns&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;list(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;ABCDEF&amp;#39;&lt;/span&gt;))&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;T&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    df&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    g &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; sns&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;clustermap(df&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;iloc[:,&lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;:],cmap&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;PiYG&amp;#34;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;After generating and transposing the &lt;strong&gt;DataFrame&lt;/strong&gt;, a &lt;code&gt;TypeError&lt;/code&gt; occurs: &lt;code&gt;TypeError: ufunc &#39;isnan&#39; not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule &amp;quot;safe&amp;quot;&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://www.bobobk.com/wp-content/uploads/2019/01/isnan_error.webp&#34; alt=&#34;《TypeError: ufunc ‘isnan’ not supported for the input types solution》&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;2-cause-of-the-error&#34;&gt;2. Cause of the Error&lt;/h2&gt;&#xA;&lt;p&gt;This type of error arises because the &lt;strong&gt;DataFrame&lt;/strong&gt; has been transposed, and the original &lt;strong&gt;DataFrame&lt;/strong&gt; contained string columns. Just like in the example above, the first column contains strings (values &amp;lsquo;abcdef&amp;rsquo;). When transposed, all numerical values in the &lt;strong&gt;DataFrame&lt;/strong&gt; are also converted to &lt;code&gt;object&lt;/code&gt; types instead of &lt;code&gt;float&lt;/code&gt; or &lt;code&gt;int&lt;/code&gt; numerical types. Therefore, trying to plot a heatmap with character types naturally leads to an error.&lt;/p&gt;</description>
    </item>
    <item>
      <title>TypeError: ufunc &#39;isnan&#39; not supported for the input types - Solution</title>
      <link>https://www.bobobk.com/en/245.html</link>
      <pubDate>Mon, 14 Jan 2019 12:42:00 +0000</pubDate>
      <guid>https://www.bobobk.com/en/245.html</guid>
      <description>&lt;p&gt;After generating and transposing the DataFrame, a TypeError occurred: TypeError: ufunc &amp;lsquo;isnan&amp;rsquo; not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule &amp;ldquo;safe&amp;rdquo;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://www.bobobk.com/wp-content/uploads/2019/01/isnan_error.webp&#34; alt=&#34;《TypeError: ufunc ‘isnan’ not supported for the input types - Solution》&#34;&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;2-cause-of-the-error&#34;&gt;2. Cause of the Error&lt;/h2&gt;&#xA;&lt;p&gt;This type of error occurs because the DataFrame has been transposed, and the original DataFrame contains a column with strings. Just like in the example above, the first column contains string values &amp;ldquo;abcdef&amp;rdquo;. After transposition, all numbers in the DataFrame also become &amp;ldquo;object&amp;rdquo; type instead of &amp;ldquo;float&amp;rdquo; or &amp;ldquo;int&amp;rdquo; numeric types. Therefore, when we try to plot a heatmap with character types, an error naturally occurs.&lt;/p&gt;&#xA;&lt;p&gt;If the DataFrame originally contained only numeric types, there would be no issue here.&lt;/p&gt;&#xA;&lt;h2 id=&#34;3-solution&#34;&gt;3. Solution&lt;/h2&gt;&#xA;&lt;p&gt;Knowing the cause, the solution is simple: convert the corresponding numeric columns in the transposed DataFrame to numeric types. Here&amp;rsquo;s the code:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Python Implementation for Kugou Music MP3 Download</title>
      <link>https://www.bobobk.com/en/234.html</link>
      <pubDate>Sun, 13 Jan 2019 14:45:59 +0000</pubDate>
      <guid>https://www.bobobk.com/en/234.html</guid>
      <description>&lt;p&gt;After implementing &lt;a href=&#34;https://www.bobobk.com/216.html&#34;&gt;python for Qianqian Music mp3 download&lt;/a&gt;, some users found that many songs couldn&amp;rsquo;t be searched on Qianqian Music. So today, Chunjian Muke extended the download functionality to Kugou Music, with source code provided.&lt;/p&gt;&#xA;&lt;p&gt;Using the same approach, first search for a song directly on the Kugou official website. Then, open the network monitor in Google Chrome and search for the same keyword again. You&amp;rsquo;ll then be able to find the API information (Note: It&amp;rsquo;s best to view the network requests during the second search to filter out unnecessary information).&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;1-analyzing-search-api-information&#34;&gt;1. Analyzing Search API Information&lt;/h2&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://www.bobobk.com/wp-content/uploads/2019/01/kugou_search.webp&#34; alt=&#34;《Python Implementation for Kugou Music MP3 Download》&#34;&gt;&#xA;With only 4 network requests, it&amp;rsquo;s easy to identify that the first request genuinely returns song information, so we can construct this request.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://www.bobobk.com/wp-content/uploads/2019/01/kugou_search_response.webp&#34; alt=&#34;《Python Implementation for Kugou Music MP3 Download》&#34;&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Drawing NetworkX Network Graphs in python3</title>
      <link>https://www.bobobk.com/en/229.html</link>
      <pubDate>Sat, 12 Jan 2019 01:58:34 +0000</pubDate>
      <guid>https://www.bobobk.com/en/229.html</guid>
      <description>&lt;p&gt;NetworkX is a Python library for studying graphs and networks. NetworkX is free software released under the BSD-new license. It can be used to create and manipulate complex networks, and to study the structure and function of complex networks.&lt;/p&gt;&#xA;&lt;p&gt;With NetworkX, you can load or store networks in standard or non-standard data formats. It can generate many types of random or classic networks, analyze network structure, build network models, design new network algorithms, and draw networks.&lt;/p&gt;&#xA;&lt;p&gt;Of course, NetworkX alone cannot be powerful. Here, Chunjian Muke will use other widely used common Python libraries to draw various basic network graphs.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;1-drawing-the-most-basic-network-graph&#34;&gt;1. Drawing the Most Basic Network Graph&lt;/h2&gt;&#xA;&lt;p&gt;A network graph consists of nodes and edges. In NetworkX, each row of a pandas DataFrame represents the points in a connection, and a connection is generated at the corresponding position. In the example, a connection is generated between each corresponding position of &amp;lsquo;from&amp;rsquo; and &amp;rsquo;to&amp;rsquo;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Drawing Violin Plots with Seaborn</title>
      <link>https://www.bobobk.com/en/206.html</link>
      <pubDate>Fri, 04 Jan 2019 12:02:11 +0000</pubDate>
      <guid>https://www.bobobk.com/en/206.html</guid>
      <description>&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;&#xA;&lt;p&gt;A violin plot is used to display the distribution and probability density of multiple data groups. Similar to a box plot, it offers a better representation of data density. Violin plots are particularly useful when dealing with very large datasets that are difficult to display individually. Python&amp;rsquo;s Seaborn package makes it very convenient to create violin plots.&lt;/p&gt;&#xA;&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://www.bobobk.com/wp-content/uploads/2019/01/violin.webp&#34; alt=&#34;Drawing Violin Plots with Seaborn&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;The parameters corresponding to each position in a violin plot are shown above. The middle line represents the box plot data, specifically the 25th, 50th (median), and 75th percentiles. The thin lines indicate the 95% confidence interval.&lt;/p&gt;&#xA;&lt;h2 id=&#34;drawing-violin-plots-with-seaborn&#34;&gt;Drawing Violin Plots with Seaborn&lt;/h2&gt;&#xA;&lt;h3 id=&#34;single-variable-data&#34;&gt;Single Variable Data&lt;/h3&gt;&#xA;&lt;p&gt;While a box plot would suffice for a single variable, a violin plot can certainly be used as well:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; seaborn &lt;span style=&#34;color:#66d9ef&#34;&gt;as&lt;/span&gt; sns&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    sns&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;set(color_codes&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;True&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    sns&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;set_style(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;white&amp;#34;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    df &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; sns&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;load_dataset(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;iris&amp;#39;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    sns&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;violinplot( y&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;df[&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;sepal_length&amp;#34;&lt;/span&gt;] )&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;img src=&#34;https://www.bobobk.com/wp-content/uploads/2019/01/oned.webp&#34; alt=&#34;Drawing Violin Plots with Seaborn&#34;&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>The difference between shadowcopy and deepcopy in python</title>
      <link>https://www.bobobk.com/en/200.html</link>
      <pubDate>Sat, 29 Dec 2018 02:22:22 +0000</pubDate>
      <guid>https://www.bobobk.com/en/200.html</guid>
      <description>&lt;p&gt;In python, it is common to need to copy specific objects, and you might encounter various bugs because understanding the difference between these three operations is key: assignment, shallow copy, and deep copy.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://www.bobobk.com/wp-content/uploads/2018/12/ctr_v.webp&#34; alt=&#34;“The difference between shadowcopy and deepcopy in python”&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Assignment (=), shallow copy (copy), and deep copy (deepcopy) are relatively easy to distinguish regarding assignment vs. copying, but shallow copy and deep copy are harder to differentiate.&lt;/p&gt;&#xA;&lt;p&gt;The assignment statement does not copy the object; it simply binds the variable to the object. Any change to one object will affect the other. Copying allows you to change one object without affecting the other.&lt;/p&gt;&#xA;&lt;p&gt;The difference between shallow and deep copy is that shallow copy does not affect the other object when values change, but adding or deleting elements can affect it. Deep copy creates a completely independent object, and changes to one will not affect the other.&lt;/p&gt;</description>
    </item>
    <item>
      <title>python3 requests module usage examples</title>
      <link>https://www.bobobk.com/en/198.html</link>
      <pubDate>Fri, 28 Dec 2018 04:57:52 +0000</pubDate>
      <guid>https://www.bobobk.com/en/198.html</guid>
      <description>The network module in python3 is much more convenient compared to python2. The requests package combines several python2 packages. This article explains the usage of requests with examples, serving as a review and future reference.</description>
    </item>
    <item>
      <title>Kaggle Local Dog Breed Recognition</title>
      <link>https://www.bobobk.com/en/127.html</link>
      <pubDate>Sat, 15 Dec 2018 10:36:29 +0000</pubDate>
      <guid>https://www.bobobk.com/en/127.html</guid>
      <description>After setting up the deep learning environment, the first thing is to try if it works. The simplest way is to use a pretrained model to predict new samples.</description>
    </item>
    <item>
      <title>Introduction to Artificial Neural Networks</title>
      <link>https://www.bobobk.com/en/90.html</link>
      <pubDate>Mon, 10 Dec 2018 05:27:33 +0000</pubDate>
      <guid>https://www.bobobk.com/en/90.html</guid>
      <description>Artificial Neural Network (ANN), also called Neural Network (NN) or neural-like network, is a mathematical model that mimics the structure and function of biological neural networks. It consists of a large number of neurons connected for computation. In most cases, artificial neural networks can change their internal structure based on external information, making them adaptive systems, simply put, they have learning capabilities.</description>
    </item>
    <item>
      <title>Recursively download files python</title>
      <link>https://www.bobobk.com/en/85.html</link>
      <pubDate>Sat, 08 Dec 2018 06:42:32 +0000</pubDate>
      <guid>https://www.bobobk.com/en/85.html</guid>
      <description>I want to back up my website recently, but the size of the file downloaded by PHP is limited, and I am too lazy to install FTP to download it. So I thought of temporarily setting up a secondary domain name site, and then using python (python3)&amp;rsquo;s requests library to directly download all the files and folders in the root directory of the website to achieve the purpose of backup.</description>
    </item>
    <item>
      <title>Python Converts All Site Images to WebP Format</title>
      <link>https://www.bobobk.com/en/78.html</link>
      <pubDate>Tue, 04 Dec 2018 15:32:34 +0000</pubDate>
      <guid>https://www.bobobk.com/en/78.html</guid>
      <description>WebP is an image file format developed by Google that provides both lossy and lossless compression. The WebP image format can significantly reduce file size while achieving the same image quality as the JPEG format, thereby significantly reducing the time it takes for image files to be sent over the network.</description>
    </item>
    <item>
      <title>scrapy crawl subtitle group today&#39;s updated movies - with source code</title>
      <link>https://www.bobobk.com/en/43.html</link>
      <pubDate>Wed, 21 Nov 2018 04:23:53 +0000</pubDate>
      <guid>https://www.bobobk.com/en/43.html</guid>
      <description>Because I like watching American TV shows, and the subtitle group&amp;rsquo;s resources update very quickly, and I have written many scrapy spiders, and I also maintain a small movie site for friends to download, I wondered if I could use a script to realize daily updates and crawling of subtitle group movie resources.</description>
    </item>
    <item>
      <title>Drawing a Circle with Squares Using Turtle</title>
      <link>https://www.bobobk.com/en/39.html</link>
      <pubDate>Mon, 19 Nov 2018 04:38:15 +0000</pubDate>
      <guid>https://www.bobobk.com/en/39.html</guid>
      <description>I recently discovered a very interesting Python drawing library called Turtle. Here, I&amp;rsquo;ll briefly explain the idea behind using the Turtle library to draw a circle with squares.</description>
    </item>
    <item>
      <title>Drawing the Butterfly Curve with Python</title>
      <link>https://www.bobobk.com/en/24.html</link>
      <pubDate>Wed, 07 Nov 2018 08:03:32 +0000</pubDate>
      <guid>https://www.bobobk.com/en/24.html</guid>
      <description>&lt;p&gt;The butterfly curve, discovered by Temple H. Fay, is a beautiful curve that can be expressed using a polar coordinate function. Because of its elegance, I wanted to use it as my blog&amp;rsquo;s favicon.ico. Here, I&amp;rsquo;ll use Python&amp;rsquo;s &lt;strong&gt;matplotlib.pyplot&lt;/strong&gt; package to draw the desired butterfly curve. First, let&amp;rsquo;s admire the beautiful butterfly curve.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://www.bobobk.com/wp-content/uploads/2018/11/butter.webp&#34; alt=&#34;butter&#34;&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;1-first-we-need-to-define-the-mathematical-expression-of-the-butterfly-curve&#34;&gt;1. First, We Need to Define the Mathematical Expression of the Butterfly Curve&lt;/h2&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://wikimedia.org/api/rest_v1/media/math/render/svg/92e1ec07900777c282b5c379b0877906f4594727&#34; alt=&#34;math&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://wikimedia.org/api/rest_v1/media/math/render/svg/3c9b54f7112ec2abd4125ef9b52aa55a9b8470ea&#34; alt=&#34;math2&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;It can also be expressed using spherical coordinates:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://wikimedia.org/api/rest_v1/media/math/render/svg/5b9bff8d319e4fd55de4eb7685d9aa06b40fcfa9&#34; alt=&#34;math3&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;2-choosing-matplotlibpyplot-as-the-plotting-tool-in-python&#34;&gt;2. Choosing &lt;code&gt;matplotlib.pyplot&lt;/code&gt; as the Plotting Tool in Python&lt;/h2&gt;&#xA;&lt;h3 id=&#34;1-first-import-the-necessary-python-packages&#34;&gt;1. First, import the necessary Python packages&lt;/h3&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; numpy &lt;span style=&#34;color:#66d9ef&#34;&gt;as&lt;/span&gt; np&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; matplotlib.pyplot &lt;span style=&#34;color:#66d9ef&#34;&gt;as&lt;/span&gt; plt&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;2-set-the-parameter-values&#34;&gt;2. Set the parameter values&lt;/h3&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;t &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; np&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;arange(&lt;span style=&#34;color:#ae81ff&#34;&gt;0.0&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;12&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;np&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;pi, &lt;span style=&#34;color:#ae81ff&#34;&gt;0.01&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;x &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; np&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;sin(t)&lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;(np&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;e&lt;span style=&#34;color:#f92672&#34;&gt;**&lt;/span&gt;np&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;cos(t) &lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;np&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;cos(&lt;span style=&#34;color:#ae81ff&#34;&gt;4&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;t)&lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt;np&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;sin(t&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;12&lt;/span&gt;)&lt;span style=&#34;color:#f92672&#34;&gt;**&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;5&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;y &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; np&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;cos(t)&lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;(np&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;e&lt;span style=&#34;color:#f92672&#34;&gt;**&lt;/span&gt;np&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;cos(t) &lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;np&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;cos(&lt;span style=&#34;color:#ae81ff&#34;&gt;4&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;t)&lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt;np&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;sin(t&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;12&lt;/span&gt;)&lt;span style=&#34;color:#f92672&#34;&gt;**&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;5&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;3-according-to-the-formula-use-numpy-functions-with-plt-to-draw-the-required-image&#34;&gt;3. According to the formula, use &lt;code&gt;numpy&lt;/code&gt; functions with &lt;code&gt;plt&lt;/code&gt; to draw the required image&lt;/h3&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;plt&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;figure(figsize&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;(&lt;span style=&#34;color:#ae81ff&#34;&gt;8&lt;/span&gt;,&lt;span style=&#34;color:#ae81ff&#34;&gt;6&lt;/span&gt;))&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;plt&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;axis(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;off&amp;#39;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;plt&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;plot(x,y,color&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;blue&amp;#39;&lt;/span&gt;,linewidth &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;2&amp;#39;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#plt.show()&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;plt&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;savefig(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;butter.jpg&amp;#34;&lt;/span&gt;,dpi&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;400&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;img src=&#34;https://www.bobobk.com/wp-content/uploads/2018/12/image-1.webp&#34; alt=&#34;butter_fly&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;4-use-pillow-to-resize-the-image-to-an-appropriate-size-for-a-favicon&#34;&gt;4. Use &lt;code&gt;Pillow&lt;/code&gt; to resize the image to an appropriate size for a favicon&lt;/h3&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;from&lt;/span&gt; PIL &lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; Image&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;im &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; Image&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;open(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;butter.jpg&amp;#34;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;favicon &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; im&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;resize((&lt;span style=&#34;color:#ae81ff&#34;&gt;50&lt;/span&gt;,&lt;span style=&#34;color:#ae81ff&#34;&gt;50&lt;/span&gt;))&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;favicon&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;save(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;favicon.ico&amp;#34;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;img src=&#34;https://www.bobobk.com/wp-content/uploads/2018/12/image.webp&#34; alt=&#34;image_ico&#34;&gt;&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
