Programming Leftovers
-
Upgrading my Chumby 8 kernel part 5: graphics
At this point in my Chumby kernel upgrade project (parts 1, 2, 3, and 4 here), I had made a ton of progress but there wasn't really much to show for it because I didn't have the LCD working.
-
Dave Patrick Caberto: GSoC 2023: Rust and GTK 4 Bustle Rewrite (Week 1 & 2)
Before the GSoC coding period started, I started implementing the diagram used to display DBus activity with the help of the template repository made by my mentor, Maximiliano. One of the first challenges is figuring out how to load the PCAP files, which is the format Bustle uses to store the DBus messages. Without implementing that first, it would be difficult to test how the diagram will look like.
The Rust pcap library was used to load the packets from the PCAP file, which contains the bytes of a DBus Message. It is nice to use, though it is missing an async API for loading files. That could be fixed in the future, but this week mainly focused on a basic diagram implementation. The bytes can then be parsed through GDBus into a GDbusMessage, which contains the information to implement the diagram.
Through the parsed message, the diagram can be implemented. It uses ListView to display the rows as, aside from having a nice separation of view and model, it is more efficient because it recycles widgets, especially since PCAP files could possibly contain thousands of messages. Each row contains the elapsed time, path, destination, interface, and member of the message.
-
Dirk Eddelbuettel: sanitizers 0.1.1 on CRAN: Updated and Expanded
The second release of the sanitizers package is now on CRAN. sanitizers provides ‘true positives’ for programming errors detected by Address Sanitizers and friends. This permits validation of the setup when chasing such bug reports: it allows us to ascertain that the compiler (and instrumented R version) are correctly set up and the errors we expect to be reported are in fact reported.
-
Week 2 report on porting Gentoo packages to modern C
This is my week 2 report for my SoC 2023 project “Modern C porting of
– I’ve stuck to my proposal and mainly worked on the
Gentoo packages” at Gentoo Linux.
“Wincompatible-function-pointer-types” bugs. Honestly, nothing much
interesting did happen.
– I was not able to work for 2 days, due to some personal health issues, I
plan on making up for them in the following weeks/days.
– MUSL testing environment (chroot) is set up and bugs are being tested
against it. There are some bugs that still need improvements/fixes on
musl
– Got more of my bugs reviewed by my mentor/s, while I do need to work
on those updates. -
Python Append to string
The “+=” operator, “join()” method, “f-String” method, “string.format()” method, and “Concatenation Operator +” are used to append one string to another.
-
IndexError List Assignment Index Out of Range Solved
When a new value is assigned to an index that does not exist in the list, Python raises the “list assignment index out of range” error.
-
What is R String in Python?
A “Raw String” provides a convenient way to work with strings containing special characters in Python. It is created by prefixing the string literals with "r".
-
Seaborn Violin Plot
In Python, to display the distribution of quantitative data across different levels of one or multiple categorical variables, “seaborn.violin()” method is used.
-
Python U Before String Meaning
Python “2.x” used the symbol "u" before the string notation in order to handle Unicode strings, but Python “3.x” uses Unicode by default.
-
Scipy Nquad
The "scipy.integrate.nquad()" function of the “Scipy” library is used to determine the numerical integration of functions of any dimension.
-
Converting Python String to Date
The “datetime.strptime()” method, the “dateutil” module, or the “pandas.to_datetime()” method is used to convert a Python string to a datetime object.
-
Acos Python
The “math.acos()” function of the “math” library is used to determine the inverse cosine of the specified numbers in radians.
-
How to Check If a List Is Empty in Python
The “if/else”, “bool()” and “len()” functions, “not” operators, “NumPy” module, or comparison with an empty list is used to check if a list is empty in Python.