Tux Machines

Programming Leftovers

Posted by Roy Schestowitz on May 14, 2023

=> today's leftovers | SBC boasts i.MX 8M Plus processor for machine learning

Matplotlib Plot Multiple Lines

=> ↺ Matplotlib Plot Multiple Lines

“Matplotlib” provides functions such as “plt.plot()” to plot multiple lines on same plot. These lines can also be plotted via different line styles and colors.

Python Find First Occurrence in String

=> ↺ Python Find First Occurrence in String

The “find()” method, “index()” method, and “rfind()” and “rindex()” functions are used to find the first occurrence in a string in Python.

How to Use Not Equal Operator in PHP with Examples

=> ↺ How to Use Not Equal Operator in PHP with Examples

The not equal operator is a comparison operator that returns a boolean value of true if the two values being compared are not equal and false otherwise.

Sergio Durigan Junior: Ubuntu debuginfod and source code indexing

=> ↺ Sergio Durigan Junior: Ubuntu debuginfod and source code indexing

You might remember that in my last post about the Ubuntu debuginfod service I talked about wanting to extend it and make it index and serve source code from packages. I’m excited to announce that this is now a reality since the Ubuntu Lunar (23.04) release.

=> ↺ last post | ↺ Ubuntu debuginfod service

The feature should work for a lot of packages from the archive, but not all of them. Keep reading to better understand why.
While debugging a package in Ubuntu, one of the first steps you need to take is to install its source code.

=> ↺ last post | ↺ Ubuntu debuginfod service

Woodpecker CI with automatic runner creation

=> ↺ Woodpecker CI with automatic runner creation

I’ve been happily using Woodpecker CI to get CI for my repositories on Codeberg. Codeberg is a non-profit community-driven git repository hosting platform, so they can’t provide free CI to everyone.
Since I run lots of stuff on small arm boards (for example this website), I need my CI jobs to create arm executables. The easiest way to get that done is to just compile on arm devices, so I was happy to see that Hetzner is now offering arm nodes in their cloud offering.

C.J. Collier: Early Access: Inserting JSON data to BigQuery from Spark on Dataproc

=> ↺ C.J. Collier: Early Access: Inserting JSON data to BigQuery from Spark on Dataproc

Hello folks!
We recently received a case letting us know that Dataproc 2.1.1 was unable to write to a BigQuery table with a column of type JSON. Although the BigQuery connector for Spark has had support for JSON columns since 0.28.0, the Dataproc images on the 2.1 line still cannot create tables with JSON columns or write to existing tables with JSON columns.
The customer has graciously granted permission to share the code we developed to allow this operation. So if you are interested in working with JSON column tables on Dataproc 2.1 please continue reading!
Use the following gcloud command to create your single-node dataproc cluster: [...]

Python Removes Newline From a String

=> ↺ Python Removes Newline From a String

To remove newline from a string in Python, “strip()” method, “replace()” method, “List Comprehension” with “join()” method, or “re.sub()” function can be used.

SciPy Cosine Similarity

=> ↺ SciPy Cosine Similarity

“Cosine similarity” is a useful metric for comparing the similarity of two vectors in high-dimensional space and can be calculated via Python's “scipy” library.

Python Networking

=> ↺ Python Networking

“Python Networking” allows developers to create server and client applications, send and receive data over network, and manage network protocols effortlessly.

Python Urlparse()

=> ↺ Python Urlparse()

In Python, the “urlparse()” function is used to parse URLs and extract specific parts of the URL such as the scheme, network location, path, etc.

=> gemini.tuxmachines.org

Proxy Information
Original URL
gemini://gemini.tuxmachines.org/n/2023/05/14/Programming_Leftovers.1.gmi
Status Code
Success (20)
Meta
text/gemini;lang=en-GB
Capsule Response Time
139.790439 milliseconds
Gemini-to-HTML Time
1.98557 milliseconds

This content has been proxied by September (ba2dc).