Skip to content

Instantly share code, notes, and snippets.

View markusbuchholz's full-sized avatar

Markus Buchholz markusbuchholz

View GitHub Profile

POSIX commands Cheatsheat

  • admin - create and administer SCCS files (DEVELOPMENT)
  • alias - define or display aliases
  • ar - create and maintain library archives
  • asa - interpret carriage-control characters
  • at - execute commands at a later time
  • awk - pattern scanning and processing language
  • basename - return non-directory portion of a pathname
  • batch - schedule commands to be executed in a batch queue
// g++ digital_filter_design.cpp -o t -I/usr/include/python3.8 -lpython3.8
#include <iostream>
#include <vector>
#include <tuple>
#include <complex>
#include "matplotlibcpp.h"
##############
$$\large B(t) = \sum_{i=0}^{n} \binom{n}{i}(1-t)^{n-i}t^{i}P_{i} $$
$$\large \text {where, parameter t:}$$
$$\large 0\leq t\leq 1 $$
#############
$$\large \binom{n}{k} = \frac{n!}{k!(n-k)!} = \prod_{i=1}^{k}\frac{n+1-i}{i} $$
#############
$$\large B(t) = (1-t)^3P_{0} + 3(1-t)^2tP_{1} + 3(1-t)^2t^2P_{2} + t^3P_{3} $$
//// g++ bezier_curve.cpp -o t -I/usr/include/python3.8 -lpython3.8
#include <iostream>
#include <vector>
#include <tuple>
#include <math.h>
#include "matplotlibcpp.h"
namespace plt = matplotlibcpp;
double computeBinominal(int n, int k)
{
double value = 1.0;
for (int i = 1; i <= k; i++)
{
value = value * ((n + 1 - i) / i);
}
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
1 144.4
2 124.2
3 113.8
4 133.8
5 104.4
6 95
7 135.2
8 49.2
9 75.2
10 71.2

68–95–99.7 rule

$$\large P_{r}(\mu - 1\sigma \leq \mu + 1\sigma ) \approx 68.27%$$ $$\large P_{r}(\mu - 2\sigma \leq \mu + 3\sigma ) \approx 95.45%$$ $$\large P_{r}(\mu - 3\sigma \leq \mu + 3\sigma ) \approx 99.73%$$

Normal distribution

//g++ standard_deviation.cpp -I/usr/include/python3.8 -lpython3.8
#include <iostream>
#include <tuple>
#include <vector>
#include <math.h>
#include "matplotlibcpp.h"
namespace plt = matplotlibcpp;
//g++ cpp_smoothing.cpp -I/usr/include/python3.8 -lpython3.8
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <algorithm> //for replace
#include <vector>
#include <tuple>
#include <math.h>
#include <list>

eq1--------------------------------------------

$$\large \frac{d^2}{dt^2}I(t) + \frac{R}{L}\frac{d}{dt}I(t)+ \frac{1}{LC}I(t)=0 $$

eq2--------------------------------------------

$$\large F\Bigg(t, x(t),\frac{dx(t)}{dt}, \frac{d^2x(t)}{dt^2}, \frac{d^nx(t)}{dt^n} \Bigg)=0 $$

eq3--------------------------------------------