Skip to main content
Data Science Wizardry Blog by Attila Vajda

Miscellaneous ideas.

| **List of Nouns** | **List of Appositives** |
|------------------|-------------------------|
| Module           | Computational toolkit   |
| Index            | Predictive system       |
| DataFrame        | Ordered array           |
| Plot             | Mathematical subroutine |
| Equation         | Graphical representation |
| Array            | Positional identifier   |
| Symbol           | Software component      |
| Algorithm        | Distinct characteristic |
| Visualization    | Multidimensional structure |
| Vector           | Algebraic representation |

Unless I revisit jot down ideas that accumulated over the years, those ideas are at risk of being consigned to oblivion.

| **Nouns**           | **Appositives**                            |
|----------------------|--------------------------------------------|
| Command              | *Enhanced algorithmic efficiency*            |
| Redirection          | *Input stream redirection*                   |
| Feature Engineering  | *Advanced model evaluation technique*        |
| Pipeline             | *Symbolic representation of data*           |
| Grid Search          | Streamlining predictive modeling           |
| Classifier           | Iterative optimization process             |
| Hyperparameter       | Streamlined decision-making framework     |
| *Cross-Validation*    | Adaptive hyperparameter tuning             |
| Training Set         | Fine-tuning predictive models              |
| Decision Tree        | *Intelligent feature manipulation*          |

Even though these appositives might not be correct matches for the nouns, my brain works hard at interpreting and making connections of these concepts.

$\begin{aligned} \documentclass{article} \usepackage{amsmath} \end{aligned}$

Echoing an input can be achieved with process substitution:

$ echo $(seq -s ' ' 2 2 10)
2 4 6 8 10

What is the difference of process and command substitutions? What is a tee, and what is a subshell?

$ echo $(seq 2 2 10)
2 4 6 8 10

# What does <<< mean?

It starts to make sense:

$ $(echo)
$ $(echo "hellow world")
-bash: hellow: command not found
$ $(echo "hello world")
-bash: hello: command not found
$ $(echo seq)
usage: seq [-w] [-f format] [-s string] [-t string] [first [incr]] last
$ $(echo seq 2 2 10)
2
4
6
8
10

echo inside the command substitution $(command) must return a command:

$ $(echo echo "hello world")
hello world
$ tr -s '[:space:]' '\n' < mse_issue.c | grep -v '^$' | sort | uniq -c | sort -nr | head -n 10
  14 =
   7 cdef
   5 SIZE_t
   4 y_ik
   4 w_y_ik
   4 w
   3 const
   3 DOUBLE_t
   3 +=
   3 *
$ grep -E "\b\w+\b" .
grep: .: Is a directory

In Python One-Liners there is an exercise, I paraphrased it using a dictionary from Sympy:

>>> assumptions = {"finite": True, "infinite": False, "commutative": True, "positive": None}
>>> print(assumptions.items())
dict_items([('finite', True), ('infinite', False), ('commutative', True), ('positive', None)])
>>> true_assumptions = [(k, v) for k, v in assumptions.items() if v]
>>> print(true_assumptions)
[('finite', True), ('commutative', True)]