Programming Leftovers
posted by Roy Schestowitz on Mar 28, 2023
-
Anton Antonov published an introduction to their new DSL::FiniteStateMachines module, a work in progress since at least 2022! It also facilitates the conversion to Mathematica / Wolfram Language and Mermaid JS.
-
Optimizing compilers seek try to push as much of the computation as possible at compile time. In modern C++, you can declare a function as ‘constexpr’, meaning that you state explicitly that the function may be executed at compile time.
-
Itâs no secret that Tech has faced some setbacks lately, namely on the headcount front. Despite these uncertainties, Collabora has had the privilege of increasing our roster with new teammates.
-
To perform Element Wise Multiplication in Numpy, use the multiply() method and pass in the arrays to be multiplied. Alternatively, use the â*â operator.
-
Use the isnumeric() method or the isdigit() method to check if the string is a number or not. Alternatively, use type conversion inside exception handling.
-
The json.dumps() is used to convert a Python List into a JSON string. The List variable can contain integers, strings, dictionaries, or even lists.
-
To check if the provided number is prime, the âsympy.isprime()â method, the âwhileâ loop, and the user-defined function can be used.
-
The where() method of the Numpy library package is used to apply a condition on every list item and then perform an action depending upon the result.