Programming Leftovers
-
Why isn’t there more training on the edge?
One of the most frequent questions I get asked from people exploring machine learning beyond cloud and desktop machines is “What about training?”. If you look around at the popular frameworks and use cases of edge ML, most of them seem focused on inference. It isn’t obvious why this is the case though, so I decided to collect my notes in a post here, so I can have something to refer to when this comes up (and organize my own thoughts too!).
-
Safety And Liveness Properties
Each system has a set of behaviors, each behavior being a possible timeline of events and states. The system also has properties we want to be true. A correct system, then, is one where every behavior preserves every property.
-
Who is the author "JC Shakespeare"?
Knowledge graphs are tricky beasts to create. Trying to extract semantic metadata from documents is a gargantuan task. Mix them together and you have a recipe for disaster.
While yak-shaving for my MSc, I found an interesting looking research paper authored by one JC Shakespeare.
-
Redis GEODIST
Redis starts supporting geospatial data types from version 3.2.0. This is one of the unique features that Redis offers over the other data stores. The geospatial data structure can hold coordinates of a given location. With the rich set of operations, it is possible to query locations and their coordinates based on different criteria.
-
Scala Boolean
Boolean expressions are very well-known and widely used in different programming languages to perform different comparisons among different values. A Boolean expression can have only two values, i.e., true or false. You can modify your output messages or result according to their two values. Within the Scala programming language, you can use Boolean expressions in different statements with different inputs to check for certain comparisons. This guide will explain how to use Boolean expressions in Scala programming.
-
Scala Partial Function
The partial function is a very rare type of function. This is described as the function that could not return a value for each parameter specified to it. It provides values for only a certain set of inputs, not all of them. In simple words, we can say that the partial function only returned the value for the dataset defined in scala. The partial function uses case statements that have been encapsulated inside the curly braces. The scala partial function is preferable while doing the logical conditions. Moreover, the partial function provides many other functions which are explained and executed in the specified scala files.
-
C++/ObjC++: switch to gnu++17 as the default standard
rG36bb6d5d4673 (2017-12) switched Clang’s default C++ dialect from gnu++98 to gnu++14. I think it is perhaps time to switch to gnu++17 now. This will match GCC, which from 11 onward defaults to gnu++17.
I have noticed that Apple’s DriverKit (⚙ D121911 [Clang] Add DriverKit support) has defaulted to C++17. If we land it, the next major release 16.0.0 will have the change.
-
Hello, Ruler
Hey, look what’s been open-sourced: AWS Event Ruler! Check out the announcement blog. I built v1.0 of this Java library while I was at AWS, and wrote about it in Filtering Lessons. Tl;dr: It offers APIs for declaring pattern-matching Rules, as many as you like, then for presenting data records called Events and finding out which Rules each Event matches, very quickly. It’s in production in multiple Amazon (not just AWS) services, notably EventBridge. Also see: Content-based Filtering.
-
How Classes and Objects Work in Python
Procedural programming works fine for simple and smaller projects. But as you start working on larger applications, it’s important to organize code better. Object-oriented programming lets you group related data and functions logically. It also facilitates code reuse and lets you add functionality on top of existing code.
-
Pandas Not In
The “pandas” is the library of “Python”. We can create a DataFrame in “pandas”. After creating a DataFrame in “pandas”, we then apply some functions to this DataFrame for doing the work which we want to do. We can also check some data in the DataFrame whether the data is present in the DataFrame or not. For checking the data in a DataFrame, we can utilize the “Not In” filter in “pandas”. This will check that specific data in the DataFrame which we have mentioned in the code and return the result. In this guide, we will discuss how to apply the “Not In” filter on a single column as well as on multiple columns in the “pandas” DataFrame. We now move to the codes of “pandas” where we will check some values in different columns of the DataFrame.
-
Pandas Melt()
A panda is a Python-appropriated statistical framework. Before the invention of pandas, the bulk of researchers used Python for information mugging and preparation before switching to a more special dialect, such as “R”, for the balance of their process. Pandas offered Series, which provide a ranking layout, and dataframes, which has a tabulated layout. These two new types of objects are for storing information that facilitates analytical operations and eliminates the need to transfer tools. Pandas “melt()” function is used to describe a dataframe object that is produced in a specific manner with one or more columns acting as identifiers change in Dataset format from extensive to lengthy. Merely two columns are configurable and values, while the other columns are all regarded as values and unpivoted to the row axis. When Python supports explanatory data, you use this function.
The dataframe’s columns, each of which can contain an integer, a floating-point number, or a string, are represented at the column level because it contains numerous indices, it, therefore, defaults to considering the nonvalue. Consequently, we melt the information using this column level. The variable name is a representation of the specific variable name that is used to melt columns. This adaptable typically comprises a scalar value and has the default value of non because it uses the variable used in that specific column to melt the dataframe.
-
Pandas Groupby Apply
The most popular python library for data manipulation and analysis is pandas. Data analysis frequently requires the data to be divided into groups to execute different operations on each group. The split-apply-combine strategy is used by the GroupBy function in Pandas. This involves separating an object, using functions on the object, and combining the results. In this post to manipulate grouped data in a variety of ways, the groupby function will be used. One of the commonly used methods used for data preprocessing is the apply() method. Applying a function to every item in a Series of pandas, and to every dataframe’s column or row in pandas, is made simpler. The apply() method in pandas will be covered in this article along with the groupby() function.
-
Pandas Get Index Values
Rows’ indexes are known as dataframe indexes, whereas columns’ indexes are known as general column names. Indexes are mostly used to retrieve the data or store the data inside the dataframe. However, we can also retrieve the index itself by using the .index property. In this tutorial, we will teach you how to get an index as a list object, how you can convert the index into a dataframe column to retrieve it, and how you can get the index by using multiple conditions and the index property of pandas.
-
Flask App Builder Is an Open Source Rapid Application Development for Flask Developers
Flask is a strong lightweight yet simple Python framework for building fast web apps. Since it does not come stacked with full-stack options, many developers prefer Django and other framework for building their apps.
But this is about to change with this Flask RAD framework: Flask App Builder, that speed up your project production by offering dozens of ready tools and features for building enterprise apps.
Flask App Builder is a simple and rapid application development framework, built on top of Flask. It includes detailed security, auto CRUD generation for your models, google charts and much more.
-
How to use modern Python packaging and setuptools plugins together
Python packaging has evolved a lot. The latest ("beta") uses one file, pyproject.toml, to control the package.
A minimal pyproject.toml might look like this...
-
This Week in Rust 459