JackieLin0123/SciTikZ-Bench huggingface dataset:
\documentclass[tikz,border=10pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{angles,quotes}

\makeatletter
\tikzset{
  pics/squared angle/.style = {
    setup code  = \tikz@lib@angle@parse#1\pgf@stop,
    background code = \tikz@lib@angle@background#1\pgf@stop,
    foreground code = \tikz@lib@squaredangle@foreground#1\pgf@stop,  
  },
  pics/squared angle/.default=A--B--C,
  angle eccentricity/.initial=.6,
  angle radius/.initial=5mm
}

\def\tikz@lib@squaredangle@foreground#1--#2--#3\pgf@stop{%
  \path [name prefix ..] [pic actions]
  ([shift={(\tikz@start@angle@temp:\tikz@lib@angle@rad pt)}]#2.center)
    |-
  ([shift={(\tikz@end@angle@temp:\tikz@lib@angle@rad pt)}]#2.center);
  \ifx\tikzpictext\relax\else%
    \def\pgf@temp{\node()[name prefix
      ..,at={([shift={({.5*\tikz@start@angle@temp+.5*\tikz@end@angle@temp}:\pgfkeysvalueof{/tikz/angle
            eccentricity}*\tikz@lib@angle@rad pt)}]#2.center)}]}
    \expandafter\pgf@temp\expandafter[\tikzpictextoptions]{\tikzpictext};%
  \fi
}
\makeatother

\begin{document}
\begin{tikzpicture}
\draw (0,0) coordinate (A) 
    -- (4,0) coordinate (C) 
    -- (0,3) coordinate (B) 
    -- cycle
    pic [draw,fill=red,angle radius=0.5cm,angle eccentricity=2,
    "$90^\circ$" {black,font=\footnotesize}] {squared angle = C--A--B};
\end{tikzpicture}
\end{document}
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{math}
\begin{document}
\begin{tikzpicture}
\newdimen\radius
\tikzmath{
    \angle  = 90;
    \radius = 1cm;
}
\draw (canvas polar cs: radius = \radius, angle = \angle)
      arc [radius = \radius, start angle = \angle, end angle = 4*\angle];
\node[circle,fill] {};
\end{tikzpicture}
\end{document}
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{through}

\begin{document}
\begin{tikzpicture}
\coordinate[label=left:A] (A) at (0,0);
\coordinate[label=right:B] (B) at (1,0);
\draw (A) -- (B);
\node[draw,circle through=(B)] at (A) {};
\node[draw,circle through=(A)] at (B) {};

\begin{scope}[xshift=3cm, scale=.75, every label/.style={transform shape}]
\coordinate[label=left:A] (A) at (0,0);
\coordinate[label=right:B] (B) at (1,0);
\draw (A) -- (B);
\node[draw,circle through=(B)] at (A) {};
\node[draw,circle through=(A)] at (B) {};
\end{scope}
\end{tikzpicture}
\end{document}
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{decorations.text}

\begin{document}
\begin{tikzpicture}
    \newcommand{\radius}{2}
    \coordinate (cs-center);

    \draw (cs-center) circle (\radius);
    \draw (cs-center) -- ++(0 + 180 : \radius);
    \draw (cs-center) -- ++(120 + 180 : \radius);
    \draw (cs-center) -- ++(240 + 180 : \radius);

    \newcommand{\labelraise}{1pt}
    \path[decorate, decoration={text effects along path, text={label a}, 
        raise=\labelraise, text align=center,
        text effects/every character/.style={text along path, inner xsep=0.1pt}}]
        (cs-center) ++(180 : \radius) arc (180 : 300 : \radius);

    \pgfmathsetmacro{\labelheight}{height("l")}
    \path[decorate, decoration={text effects along path, text={label b}, 
        raise=-\labelraise-\labelheight, text align=center,
        text effects/every character/.style={text along path, inner xsep=0.3pt}}]
        (cs-center) ++(180 : \radius) arc (180 : 60 : \radius);
\end{tikzpicture}
\end{document}
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{quotes,angles}
\newcommand{\comangle}[1]{%
\begin{tikzpicture}
    \draw coordinate (a) at (0.3,0);
    \draw coordinate (b) at (0,0);
    \draw coordinate (c) at (.2,0.25);
    \draw (a) -- (b) -- (c) pic [draw=black,fill=gray!50,angle radius=.2cm] {angle=a--b--c};
\end{tikzpicture}%
}
\begin{document}
\comangle{} your new symbol.
\end{document}
\documentclass[tikz,margin=2mm]{standalone}

\begin{document}
    \begin{tikzpicture}
        \def\myPath{(-4,5)--(-4,-1)--(-2,-1)--(-2,-3)--(2,-3)--(2,-4)--(5,-4)}
        \fill[red!20] \myPath |- cycle;
        \draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
        \draw[->,ultra thick] (-5,0)--(5,0) node[right]{$j$};
        \draw[->,ultra thick] (0,-5)--(0,5) node[above]{$i$};
        \draw \myPath;
    \end{tikzpicture}
\end{document}
\documentclass[tikz,border=3.14mm]{standalone}
\usetikzlibrary{backgrounds,decorations.markings}

\begin{document}
\begin{tikzpicture}[cm mark/.style args={#1 with labels #2}{
    postaction=decorate,
    decoration={
        markings,
        mark=between positions 0 and 1 step 1cm with {
            \pgfmathtruncatemacro{\mydist}{\pgfkeysvalueof{/pgf/decoration/mark info/sequence number}-1}
            \draw[#1] (0pt,-2pt) -- (0pt,2pt);
            \coordinate (Xmark) at (0,0);
            \pgftransformreset
            \path (Xmark) node[#1,outer sep=3pt,#2] {$\mydist$cm};
        }
    }
}]
    \node[rectangle, draw, gray, line width=.5mm, minimum width=2.2cm, minimum height=1.6cm, inner sep=0.2mm] (box) {Table};

    \draw[line width=.5mm, dash pattern=on 1cm off 0.01cm on 1cm, xshift=5mm, yshift=.25mm, cm mark={{blue,thin} with labels above}] (box.north west) -- (box.north east);
    \draw[line width=.5mm, dash pattern=on 1cm off 0.01cm on 1cm, xshift=5mm, yshift=.25mm, cm mark={{line width=0.4pt,green!60!black} with labels left}] (box.north west) -- (box.south west);
    \draw[line width=.5mm, dash pattern=on 1cm off 0.01cm on 1cm, xshift=5mm, yshift=.25mm, cm mark={{line width=0.4pt,red} with labels below}] (box.south east) -- (box.south west);
    \draw[line width=.5mm, dash pattern=on 1cm off 0.01cm on 1cm, xshift=5mm, yshift=.25mm] (box.south east) -- (box.north east);

    \begin{scope}[on background layer]
        \node[circle,draw=black,fill=darkgray,minimum size=0.25cm] at (box.north east) {};
        \draw[gray] (box.north east) -- (box.south west);
        \draw[gray] (box.north west) -- (box.south east);
    \end{scope}
\end{tikzpicture}
\end{document}
\documentclass[border=10pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}[auto,node distance=2cm,thick,main node/.style={circle,fill=blue!20,draw,font=\sffamily\Large\bfseries}, scale=2]
\foreach \X/\Z [count=\Y,evaluate=\Y as \angle using {90-72+72*\Y}] in {B/\infty,A/0,C/\infty,D/\infty,E/\infty}
{\node[main node,label={\angle:$\Z$}] (\X) at (\angle:2) {\X};}

\path [->] (A) edge node {$-1$} (B);
\path [->] (B) edge node {$2$} (E);
\path [->] (A) edge node {$4$} (C);
\path [->] (B) edge node {$3$} (C);
\path [->] let \p1=($(D)-(B)$),\n1={atan2(\y1,\x1)},\n2={180+\n1} in
 ($ (B.\n1)!2pt!90:(D.\n2) $) edge node {$2$} ($ (D.\n2)!2pt!-90:(B.\n1) $);
\path [->] let \p1=($(B)-(D)$),\n1={atan2(\y1,\x1)},\n2={180+\n1} in
 ($ (D.\n1)!2pt!90:(B.\n2) $) edge node {$-2$} ($ (B.\n2)!2pt!-90:(D.\n1) $);
\path [->,bend left=10] (D) edge node {$5$} (C);
\path [->,bend left=10] (C) edge node {$-5$} (D);
\path [->] (E) edge node {$-3$} (D);
\end{tikzpicture}
\end{document}
\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}
\draw (0,0) rectangle (1,1) (1,1) rectangle (2,2) (0,1) rectangle (1,2) (0,2) rectangle (1,3) (1,0) rectangle (2,1) (2,0) rectangle (3,1);
\draw (3.6,1.6)--(3.6,.6)--(3,0)--(3,1)--cycle--(3.6,2.6)--(2.6,2.6)--(2.6,3.6)--(.6,3.6)--(0,3);
\draw (2,1)--(2.4,1.4) (2,2)--(2.6,2.6) (1,2)--(1.4,2.4) (1,3)--(1.6,3.6) (2.4,3.4)--(2.6,3.6) (3.4,2.4)--(3.6,2.6); 
\draw (2.4,1.4) rectangle (3.4,2.4) (1.4,2.4) rectangle (2.4,3.4);
\draw (.4,3.4)--(1.4,3.4) (3.4,1.4)--(3.4,.4) (.2,3.2)--(1.2,3.2)--(1.2,2.2)--(2.2,2.2)--(2.2,1.2)--(3.2,1.2)--(3.2,.2);
\end{tikzpicture}
\end{document}
\documentclass[tikz]{standalone}
\usepackage{amssymb}
\usetikzlibrary{shapes.multipart,positioning,arrows,calc}
\tikzset{
    listnode/.style={
        rectangle split,rectangle split parts=2,draw,rectangle split horizontal,fill=blue!20
    },
    startnode/.style={
        draw,minimum width=1.5cm,minimum height=.75cm
    }
}
\begin{document}
\begin{tikzpicture}[scale=.2, >=stealth]
\node[startnode] (t0) {$T[0]$};
\node[startnode,below=0pt of t0] (t1) {$T[1]$};
\node[startnode,below=0pt of t1] (t2) {$T[2]$};
\node[listnode,right=of t0] (3) {3};
\node[listnode,right=of t1] (1) {1};
\node[listnode,right=.5cm of 1] (7) {7};
\node[listnode,right=of t2] (2) {2};
\node[listnode,right=.5cm of 2] (5) {5};
\node[listnode,right=.5cm of 5] (8) {8};
\node[right=.5cm of 3] (3x) {$\varnothing$};
\node[right=.5cm of 7] (7x) {$\varnothing$};
\node[right=.5cm of 8] (8x) {$\varnothing$};
\draw[*->] let \p1 = (3.two), \p2 = (3.center) in (\x1,\y2) -- (3x);
\draw[*->] let \p1 = (1.two), \p2 = (1.center) in (\x1,\y2) -- (7);
\draw[*->] let \p1 = (7.two), \p2 = (7.center) in (\x1,\y2) -- (7x);
\draw[*->] let \p1 = (2.two), \p2 = (2.center) in (\x1,\y2) -- (5);
\draw[*->] let \p1 = (5.two), \p2 = (5.center) in (\x1,\y2) -- (8);
\draw[*->] let \p1 = (8.two), \p2 = (8.center) in (\x1,\y2) -- (8x);
\draw[->] (t0) edge (3) (t1) edge (1) (t2) edge (2);
\end{tikzpicture}
\end{document}
\documentclass[border=5pt]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw[thick, blue] (1,0) -- (0,0) -- (0,1) -- cycle;
\end{tikzpicture}
\end{document}
\documentclass[tikz,border=3.14mm]{standalone}
\usetikzlibrary{calc,through,angles,backgrounds}
\tikzset{circle through 3 points/.style n args={3}{%
insert path={let    \p1=($(#1)!0.5!(#2)$),
                    \p2=($(#1)!0.5!(#3)$),
                    \p3=($(#1)!0.5!(#2)!1!-90:(#2)$),
                    \p4=($(#1)!0.5!(#3)!1!90:(#3)$),
                    \p5=(intersection of \p1--\p3 and \p2--\p4)
                    in },
at={(\p5)},
circle through= {(#1)}
}}
\xdef\MyColors{%
"red",
"red!25",
"magenta",
"magenta!25",
"olive",
"olive!25",
"brown",
"brown!10",
"violet",
"violet!25",
"gray",
"purple",
"yellow",
"orange",
"orange!25",
"cyan",
"green"}%
\newcounter{col}
\begin{document}
\begin{tikzpicture}[every label/.append style={text=black}]
 \draw[green!80!black] 
 (5,3)  coordinate[label=right:$A$] (A)
 -- (1,6) coordinate[label=above left:$B$] (B) 
 -- (0,0) coordinate[label=below left:$C$] (C)   --cycle;
 \draw[purple,thick] foreach \X/\Y [remember=\X as \Z (initially C)] in {A/B,B/C,C/A}
 {(\Y) -- ($(\X)!(\Y)!(\Z)$) coordinate (H\Y) node[pos=1.1] {$H_{\Y}$}};
 \path  (intersection cs:first line={(HC)--(C)}, second line={(HA)--(A)})
 coordinate[label={[text=yellow]above:$H$}] (H);
 \begin{scope}[on background layer]
  \draw[green!80!black,fill=green] (HA) -- (HB) -- (HC) -- cycle;
 \path foreach \X/\Y [remember=\X as \Z (initially C)] in {A/B,B/C,C/A}
 {node[draw=cyan,circle through 3 points={H\X}{H\Y}{\Z}](sc\Z){} 
  node[draw=cyan,circle through 3 points={H\X}{\Y}{\X}](bc\X){}
 [/utils/exec=\stepcounter{col}\pgfmathsetmacro{\mycolor}{{\MyColors}[\number\value{col}]}]
  pic[fill=\mycolor] {angle = H\X--\Y--\X}
 [/utils/exec=\stepcounter{col}\pgfmathsetmacro{\mycolor}{{\MyColors}[\number\value{col}]}]
  pic[fill=\mycolor] {angle = H\X--H\Y--\Z}
  pic[fill=\mycolor] {angle = \X--H\Y--H\Z}
  [/utils/exec=\stepcounter{col}\pgfmathsetmacro{\mycolor}{{\MyColors}[\number\value{col}]}]
  pic[fill=\mycolor] {angle = H\Z--H\Y--H\X}   
  [/utils/exec=\stepcounter{col}\pgfmathsetmacro{\mycolor}{{\MyColors}[\number\value{col}]}]
  pic[fill=\mycolor] {angle = H\Y--H--\X}
  pic[fill=\mycolor] {angle = \Y--H--H\X}
    };
 \end{scope}
\end{tikzpicture}
\end{document}
\documentclass[tikz,border=3.14mm]{standalone}
\usetikzlibrary{fit}
\begin{document}
\begin{tikzpicture}[bullet/.style={circle,fill,inner sep=1.5pt},
 cfit/.style={circle,draw,label=below right:#1}]
 \draw (0,0) node [bullet,label={[name=l0]below:{$z_0=w_0$}},alias=w0] {}
  to[bend left=20] 
  node[pos=0.2,bullet,label=120:$z_1$] (z1){} 
  node[pos=0.4,bullet,label=-20:$z_2$] (z2){} 
  node[pos=0.6,bullet,label=-20:$z_3$] (z3){} 
  node[pos=0.8,bullet,label=-90:$z_4$] (z4){} 
  (5,4) node [bullet,label={[name=l5]above:{$z_5=w_5$}},alias=w5] (z5){} ;
 \draw (w0) to[bend right=20] 
 node[pos=0.2,bullet,label=90:$w_1$] (w1){} 
  node[pos=0.4,bullet,label=90:$w_2$] (w2){} 
  node[pos=0.6,bullet,label=90:$w_3$] (w3){} 
  node[pos=0.8,bullet,label=90:$w_4$] (w4){} (w5);
 \node[cfit=$D_0$,fit=(l0) (z1) (w1)]{};
 \node[cfit=$D_1$,fit=(z2) (w2) (z1) (w1)]{};
 \node[cfit=$D_2$,fit=(z2) (w2) (z3) (w3)]{};
 \node[cfit=$D_3$,fit=(z4) (w4) (z3) (w3)]{};
 \node[cfit=$D_4$,fit=(z4) (w4) (l5)]{};
\end{tikzpicture}
\end{document}
\documentclass[border=5pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning, backgrounds, fit}

\tikzset{
    base/.style = {draw=black, minimum height=2cm},
    fit label/.style={
        yshift={(height("#1")+4pt)/2},
        inner ysep={(height("#1")+8pt)/2},
        label={[anchor=north,font=\itshape]north:#1}
    }
}

\begin{document}
\begin{tikzpicture}
  \node (Foo)[base] {Foo};
  \node (Bar)[base, right=of Foo] {Bar};

  \begin{scope}[on background layer]
    \node [draw=black!50, fit=(Foo) (Bar), fit label=Long Text] (Virtual) {};
  \end{scope}

  \draw[->](Foo) -- (Bar);
\end{tikzpicture}
\end{document}
\documentclass[tikz,border=2mm]{standalone}

\begin{document}

\begin{tikzpicture}[
    cnode/.style={draw=black,fill=#1,minimum width=3mm,circle},
]

    \node[cnode=blue,label=180:$x$] (x) at (0,0) {};
    \node[cnode=gray,label=110:$x^{(1)}$] (h) at (0,2) {};
    \draw [->] (x) -- node[right,pos=0.45] {$\omega$} (h);
    \draw [->] (h) to [out=30,in=330,looseness=15] node[right] {$\nu$} (h);

\end{tikzpicture}

\end{document}
\documentclass[tikz,border=3mm]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.16}
\begin{document}
\begin{tikzpicture}
\begin{axis}
\addplot[domain=-10:10,samples=101,smooth] {pi/2+exp(-0.2*x*x)-(pi/2+1)*exp(-x*x)};
\end{axis}
\end{tikzpicture}
\end{document}
\documentclass{standalone}
\usepackage{pgfplots}
\usepgfplotslibrary{dateplot}
\pgfplotsset{compat=1.8}

\begin{document}
\begin{tikzpicture}
\begin{axis}[
    axis x line* = top,
    axis y line* = left,
    date coordinates in = x,
    xtick = {2018-11-15,2018-12-15,2019-01-15,2019-02-15,2019-03-15,2019-04-15,2019-05-15},
    xticklabels = {Nov,Dec,Jan,Feb,March,Apr,May},
    date ZERO = 2018-11-01,
    xmin = 2018-11-01,
    xmax = 2019-05-01
]
\addplot [mark=none] coordinates {(2019-1-1,0)};
\end{axis}
\begin{axis}[
    axis x line* = bottom,
    axis y line* = right,
    date coordinates in = x,
    xtick = {2018-11-01,2018-12-01,2019-01-01,2019-02-01,2019-03-01,2019-04-01,2019-05-01},
    xticklabels = {Nov,Dec,Jan,Feb,March,Apr,May},
    date ZERO = 2018-11-01,
    xmin = 2018-11-01,
    xmax = 2019-05-01
]
\addplot [mark=none] coordinates {(2019-1-1,0)};
\end{axis}
\end{tikzpicture}
\end{document}
\documentclass[border=5pt]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.16}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
    trig format plots=rad,
    axis lines=middle,
    axis equal]
\addplot[stealth-stealth, ultra thick, dashed, draw=blue,fill=blue!30]  
  coordinates {(2,0) (0,0) ({3*cos(pi/5)},{3*sin(pi/5)})};
\addplot [smooth,domain=0:pi, samples=150, red]
         ({2*sin(5*x)*cos(x)}, {2*sin(5*x)*sin(x)});
\end{axis}
\end{tikzpicture}
\end{document}
\documentclass[tikz,border=5mm]{standalone}
\usepackage{amsmath}
\usepackage{pgfplots}
\pgfplotsset{compat=1.16}
\usepgfplotslibrary{groupplots,fillbetween}
\DeclareMathOperator{\CDF}{cdf}
\DeclareMathOperator{\PDF}{pdf}
\begin{document}
\begin{tikzpicture}[declare function={%
    normcdf(\x,\m,\s)=1/(1 + exp(-0.07056*((\x-\m)/\s)^3 - 1.5976*(\x-\m)/\s));
    gauss(\x,\u,\v)=1/(\v*sqrt(2*pi))*exp(-((\x-\u)^2)/(2*\v^2));
}]
\pgfmathtruncatemacro{\mysign}{sign(2)}
\begin{groupplot}[group style={group size=1 by 2},
    xmin=-3,xmax=3,ymin=0,
    domain=-3:3,xlabel=$x$,axis lines=middle,axis on top]
\nextgroupplot[ylabel=$\CDF(x)$,ymax=1.19]
  \addplot[smooth, black,thick] {normcdf(x,0,1)};
  \draw[cyan!30,very thick,stealth-stealth]
   (2,0) coordinate (t) -- (2,{normcdf(2,0,1)});
  \draw[thick,dashed]  (2,{normcdf(2,0,1)}) -- (0,{normcdf(2,0,1)});
  \ifnum\mysign>0
    \draw[thick,stealth-]  (0,{normcdf(2,0,1)}) -- (-1,{normcdf(2,0,1)}) 
    node[circle,fill,inner sep=1.5pt,label=left:{$P$}]{};
  \else
    \draw[thick,stealth-]  (0,{normcdf(2,0,1)}) -- (1,{normcdf(2,0,1)}) 
    node[circle,fill,inner sep=1.5pt,label=right:{$P$}]{};
  \fi
\nextgroupplot[ylabel={},ytick=\empty,ymax=0.6]
  \addplot[smooth, black,thick,name path=gauss] {gauss(x,0,1)};
  \path[name path=B] (\pgfkeysvalueof{/pgfplots/xmin},0) -- (\pgfkeysvalueof{/pgfplots/xmax},0);
  \addplot [cyan!30] fill between [
      of=gauss and B,soft clip={domain=\pgfkeysvalueof{/pgfplots/xmin}:2},
  ];
  \ifnum\mysign>0
    \draw[thick,stealth-]  ({-1.5+2/2},{0.5*gauss(-1.5+2/2,0,1)}) 
    -- (-2,0.4) 
    node[circle,fill,inner sep=1.5pt,label=left:{$P$}]{};
  \else
    \draw[thick,stealth-]  ({-1.5+2/2},{0.5*gauss(-1.5+2/2,0,1)}) 
    -- (2,0.4) 
    node[circle,fill,inner sep=1.5pt,label=left:{$P$}]{};
  \fi
  \path (2,0) coordinate (b);
\end{groupplot}
\draw[thick,dashed] (t) -- (b);
\end{tikzpicture}
\end{document}
\documentclass[border=5pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows.meta, positioning}

\begin{document}
\begin{tikzpicture}[>={Classical TikZ Rightarrow[]}]
  \node[draw, rectangle, minimum size=2cm] (a) {A};
  \node[draw, rectangle, minimum size=2cm, left=3cm of a] (b) {B};
  \node[draw, rectangle, minimum size=2cm, left=3cm of b] (c) {C};

  \draw[<->, line width=1pt, double, double distance=5pt] (a.west) -- (b.east);
  \draw[<->, line width=1pt] (b.west) -- (c.east);
\end{tikzpicture}
\end{document}
\documentclass{standalone}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}
\draw (0,0) -- node[circle,minimum size=10pt,inner sep=0pt,fill=white,draw]{a} (3,0);
\end{tikzpicture}
\end{document}
\documentclass[tikz, border=1pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning, arrows, math, calc}

\definecolor{MyColor1}{rgb}{0.24, 0.59, 0.32}
\definecolor{MyColor2}{rgb}{0.85, 0.49, 0.19}
\definecolor{MyColor3}{rgb}{0.22, 0.42, 0.69}

\begin{document}
\begin{tikzpicture}
    \foreach \x in {0,1,2}{
        \draw[fill=MyColor1] (\x, 0) circle (2pt) node[anchor=south] (\x) {$V_{\x}$};   
    }
    \draw[fill=MyColor1] (3, 0) circle (2pt) node[anchor=south] (3) {$V_{n-1}$};
    \draw[fill=MyColor1] (4, 0) circle (2pt) node[anchor=south] (4) {$V_n$};

    \foreach \x in {-1,5}{
        \node at (\x,0) (\x) {$0$};
    }   
    \node at (2.5,0) {$\dots$};

    \draw[->, MyColor3] (0) to [out=75, in=105] (1) node at (0.5,0.95) {$e$};
    \draw[->, MyColor3] (1) to [out=75, in=105] (2) node at (1.5,0.95) {$e$};
    \draw[->, MyColor3] (3) to [out=75, in=105] (4) node at (3.5,0.95) {$e$};

    \node (tmp) at (-0.05,-0.35) {};
    \node (tmp2) at (0.05,-0.35) {};    

    \draw[->, MyColor2] ($(1)+ (tmp)$) to [out=-105, in=-75] ($(0)+(tmp2)$) node at (0.5,-0.6) {$f$};
    \draw[->, MyColor2] ($(2)+ (tmp)$) to [out=-105, in=-75] ($(1)+(tmp2)$) node at (1.5,-0.6) {$f$};
    \draw[->, MyColor2] ($(4)+ (tmp)$) to [out=-105, in=-75] ($(3)+(tmp2)$) node at (3.5,-0.6) {$f$};   

    \draw[->, MyColor2] ($(0)+ (-0.05,-0.35)$) to [out=-105, in=-75] ($(-1)+ (0.05,-0.15)$) node at (-0.5,-0.6) {$f$};
    \draw[->, MyColor3] (4) to [out=75, in=105] ($(5)+ (-0.05,0.53)$) node at (4.5,0.95) {$e$}; 

    \foreach \x in {0,1,2,3,4}{
        \path[->, MyColor1] (\x) edge [loop above, out=120, in=60, looseness=16]
        node {$h$} (\x);
    }
\end{tikzpicture}
\end{document}
\documentclass[tikz, border=2mm]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.16}

\begin{document}

\begin{tikzpicture}
\begin{semilogyaxis}[
  log number format code/.code={%
    \pgfmathparse{exp(#1)}%
    \pgfmathprintnumber{\pgfmathresult}%
  },
  xmin=0, xmax=400,
  ymin=1E-5, ymax=1E4,
  ytick={1E-5,6.1E-3,1.013,221,1E4},
  ]
\end{semilogyaxis}
\end{tikzpicture}

\end{document}
\documentclass[tikz, margin=3mm]{standalone}
\usetikzlibrary{arrows.meta,bending,chains}

\begin{document}
\begin{tikzpicture}[node distance = 2mm and 5mm,
     box/.style = {draw, align=center,rounded corners,
        text width={width("Target variable $y$")+4pt},minimum height=3em,
        node font=\sffamily,fill=#1},
      arw/.style = {-stealth,semithick}]
 \begin{scope}[start chain=A going right,nodes={on chain,join=by arw,alias=last}]
  \node[box=gray!20] {Unobserved factors};
  \node[box=yellow!20] {Unknown mixing};
  \node[box=blue!20] {Operation $x$};
  \node[box=purple!20] {Representation $r(x)$};
  \node[box=orange!20] {Prediction $\widehat{y}$};
 \end{scope}
 \node[box=green!20,above=of A-1] (T) {Target variable $y$};
 \node[box=red!20,below=of A-1] (B) {Sensitivity variable $s$};
 \draw[arw] (T) -- (A-2);
 \draw[arw] (B) -- (A-2);
 \draw[line width=3pt,green!60!black,-{Latex[bend]},shorten <=0.5pt] (last) 
  to[bend right] node[below=2em,black,font=\Large\bfseries]{Accurate} (T);
 \draw[line width=3pt,red,-{Latex[bend]},shorten <=1.5pt,
    dash pattern=on 9pt off 6pt] (B) to[bend right] 
 node[above=2em,black,font=\Large\bfseries]{While being fair}(last);
\end{tikzpicture}
\end{document}
\documentclass[tikz]{standalone}
\usepackage{pgf-pie}
\begin{document}
    \begin{tikzpicture}
    \pie[text=legend,sum=100,rotate=40,radius=2.5,
         before number=\phantom,after number=,
        ] {
        12/{5am -- 11am},
        45/{11am -- 5pm},
        36/{5pm -- 11pm},
        6/{11pm -- 5am}
        }
    \path[fill=white,draw=black,thick] (0,0) circle (1.5);
    \end{tikzpicture}
\end{document}
\documentclass{standalone}
\usepackage{pgfplots}

\begin{document}
\begin{tikzpicture}
    \begin{axis}[
        title = {sigmoid function},
        axis on top = true,
        axis x line = bottom,
        axis y line = left,
        grid = major,
        xlabel = $Z$
    ]
        \addplot[
            blue,
            domain = -5:5,
            samples = 100
        ]
            {1/(1+exp(-x))};
    \end{axis}
\end{tikzpicture}
\end{document}
\documentclass[border=5pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows}

\begin{document}
\definecolor{wrwrwr}{rgb}{0.3803921568627451,0.3803921568627451,0.3803921568627451}
\definecolor{rvwvcq}{rgb}{0.08235294117647059,0.396078431372549,0.7529411764705882}

\begin{tikzpicture}[scale=0.8, line cap=round, line join=round, >=triangle 45, x=1.0cm, y=1.0cm]
\fill[line width=2.pt, color=rvwvcq, fill=rvwvcq, fill opacity=0.1] (-1.16,2.85) -- (-3.82,-1.57) -- (3.56,-1.55) -- cycle;
\draw [line width=2.pt, color=rvwvcq] (-1.16,2.85) -- (-3.82,-1.57);
\draw [line width=2.pt, color=rvwvcq] (-3.82,-1.57) -- (3.56,-1.55);
\draw [line width=2.pt, color=rvwvcq] (3.56,-1.55) -- (-1.16,2.85);
\draw [line width=2.pt, color=wrwrwr] (-1.16,2.85) -- (-2.7200080786122416,-1.56701899208296);
\draw [line width=2.pt, color=wrwrwr] (-1.16,2.85) -- (-0.9600210043918271,-1.562249379415696);
\draw [line width=2.pt, color=wrwrwr] (-1.16,2.85) -- (1.1000722668585952,-1.5566664708215214);
\draw [line width=2.pt, color=wrwrwr] (-1.16,2.85) -- (2.4001169195517105,-1.5531433145811606);
\draw [line width=2.pt, color=wrwrwr] (-3.82,-1.57) -- (0.2994927758991701,1.4894558868736556);
\draw [line width=2.pt, color=wrwrwr] (-3.82,-1.57) -- (1.60355056870581,0.27380879188441476);

\begin{scriptsize}
\draw [fill=rvwvcq] (-1.16,2.85) circle (2.5pt);
\draw [fill=rvwvcq] (-3.82,-1.57) circle (2.5pt);
\draw [fill=rvwvcq] (3.56,-1.55) circle (2.5pt);
\draw [fill=rvwvcq] (-2.7200080786122416,-1.56701899208296) circle (2.5pt);
\draw [fill=rvwvcq] (-0.9600210043918271,-1.562249379415696) circle (2.5pt);
\draw [fill=rvwvcq] (1.1000722668585952,-1.5566664708215214) circle (2.5pt);
\draw [fill=rvwvcq] (2.4001169195517105,-1.5531433145811606) circle (2.5pt);
\draw [fill=rvwvcq] (0.2994927758991701,1.4894558868736556) circle (2.5pt);
\draw [fill=rvwvcq] (1.60355056870581,0.27380879188441476) circle (2.5pt);
\end{scriptsize}
\end{tikzpicture}
\end{document}
\documentclass[tikz, border=0.5cm]{standalone}
\usetikzlibrary{angles}

\newcommand\dangle[3]{%
    \pic[draw, angle radius=6mm] {angle = #1--#2--#3};
    \pic[draw, angle radius=7mm] {angle = #1--#2--#3};
}

\begin{document}
\begin{tikzpicture}
    \coordinate[label=right:A] (A) at (5,0);
    \coordinate[label=left:B] (B) at (0,0);
    \coordinate[label=above:C] (C) at (2,3);
    %
    \dangle{A}{B}{C};
    \draw[thick] (A) -- (B) -- (C);
\end{tikzpicture}
\end{document}