mirror of
https://github.com/StevenBlack/hosts.git
synced 2026-07-01 02:36:52 +00:00
252 lines
11 KiB
Mathematica
252 lines
11 KiB
Mathematica
(* Content-type: application/vnd.wolfram.mathematica *)
|
|
|
|
(*** Wolfram Notebook File ***)
|
|
(* http://www.wolfram.com/nb *)
|
|
|
|
(* CreatedBy='WolframDesktop 13.1' *)
|
|
|
|
(*CacheID: 234*)
|
|
(* Internal cache information:
|
|
NotebookFileLineBreakTest
|
|
NotebookFileLineBreakTest
|
|
NotebookDataPosition[ 161, 7]
|
|
NotebookDataLength[ 10883, 243]
|
|
NotebookOptionsPosition[ 10540, 229]
|
|
NotebookOutlinePosition[ 10932, 245]
|
|
CellTagsIndexPosition[ 10889, 242]
|
|
WindowFrame->Normal*)
|
|
|
|
(* Beginning of Notebook Content *)
|
|
Notebook[{
|
|
Cell[BoxData[{
|
|
RowBox[{
|
|
RowBox[{"ClearAll", "[", "\"\<Global`\>\"", "]"}],
|
|
";"}], "\[IndentingNewLine]",
|
|
RowBox[{
|
|
RowBox[{
|
|
RowBox[{"folders", "=",
|
|
RowBox[{"{",
|
|
RowBox[{
|
|
"\"\<alternates/fakenews\>\"", ",",
|
|
"\"\<alternates/fakenews-gambling\>\"", ",",
|
|
"\"\<alternates/fakenews-gambling-only\>\"", ",",
|
|
"\"\<alternates/fakenews-gambling-porn\>\"", ",",
|
|
"\"\<alternates/fakenews-gambling-porn-only\>\"", ",",
|
|
"\"\<alternates/fakenews-gambling-porn-social\>\"", ",",
|
|
"\"\<alternates/fakenews-gambling-porn-social-only\>\"", ",",
|
|
"\"\<alternates/fakenews-gambling-social\>\"", ",",
|
|
"\"\<alternates/fakenews-gambling-social-only\>\"", ",",
|
|
"\"\<alternates/fakenews-only\>\"", ",",
|
|
"\"\<alternates/fakenews-porn\>\"", ",",
|
|
"\"\<alternates/fakenews-porn-only\>\"", ",",
|
|
"\"\<alternates/fakenews-porn-social\>\"", ",",
|
|
"\"\<alternates/fakenews-porn-social-only\>\"", ",",
|
|
"\"\<alternates/fakenews-social\>\"", ",",
|
|
"\"\<alternates/fakenews-social-only\>\"", ",",
|
|
"\"\<alternates/gambling\>\"", ",", "\"\<alternates/gambling-only\>\"",
|
|
",", "\"\<alternates/gambling-porn\>\"", ",",
|
|
"\"\<alternates/gambling-porn-only\>\"", ",",
|
|
"\"\<alternates/gambling-porn-social\>\"", ",",
|
|
"\"\<alternates/gambling-porn-social-only\>\"", ",",
|
|
"\"\<alternates/gambling-social\>\"", ",",
|
|
"\"\<alternates/gambling-social-only\>\"", ",",
|
|
"\"\<alternates/porn\>\"", ",", "\"\<alternates/porn-only\>\"", ",",
|
|
"\"\<alternates/porn-social\>\"", ",",
|
|
"\"\<alternates/porn-social-only\>\"", ",", "\"\<alternates/social\>\"",
|
|
",", "\"\<alternates/social-only\>\"", ",",
|
|
"\"\<data/Badd-Boyz-Hosts\>\"", ",", "\"\<data/KADhosts\>\"", ",",
|
|
"\"\<data/StevenBlack\>\"", ",", "\"\<data/URLHaus\>\"", ",",
|
|
"\"\<data/UncheckyAds\>\"", ",", "\"\<data/adaway.org\>\"", ",",
|
|
"\"\<data/add.2o7Net\>\"", ",", "\"\<data/add.Dead\>\"", ",",
|
|
"\"\<data/add.Risk\>\"", ",", "\"\<data/add.Spam\>\"", ",",
|
|
"\"\<data/hostsVN\>\"", ",", "\"\<data/minecraft-hosts\>\"", ",",
|
|
"\"\<data/mvps.org\>\"", ",", "\"\<data/someonewhocares.org\>\"", ",",
|
|
"\"\<data/tiuxo\>\"", ",", "\"\<data/yoyo.org\>\"", ",",
|
|
"\"\<extensions/fakenews\>\"", ",",
|
|
"\"\<extensions/gambling/bigdargon\>\"", ",",
|
|
"\"\<extensions/gambling/sinfonietta\>\"", ",",
|
|
"\"\<extensions/gambling\>\"", ",", "\"\<extensions/porn/bigdargon\>\"",
|
|
",", "\"\<extensions/porn/brijrajparmar27\>\"", ",",
|
|
"\"\<extensions/porn/clefspeare13\>\"", ",",
|
|
"\"\<extensions/porn/sinfonietta\>\"", ",",
|
|
"\"\<extensions/porn/sinfonietta-snuff\>\"", ",",
|
|
"\"\<extensions/porn\>\"", ",", "\"\<extensions/porn/tiuxo\>\"", ",",
|
|
"\"\<extensions/social/sinfonietta\>\"", ",",
|
|
"\"\<extensions/social\>\"", ",", "\"\<extensions/social/tiuxo\>\""}],
|
|
"}"}]}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]",
|
|
RowBox[{
|
|
RowBox[{
|
|
RowBox[{
|
|
RowBox[{"sourcegraph", "[", "folder_", "]"}], " ", ":=",
|
|
RowBox[{"(", "\[IndentingNewLine]",
|
|
RowBox[{
|
|
RowBox[{"SetDirectory", "[",
|
|
RowBox[{
|
|
RowBox[{"NotebookDirectory", "[", "]"}], "<>", "folder"}], "]"}], ";",
|
|
"\[IndentingNewLine]",
|
|
RowBox[{"datain", "=",
|
|
RowBox[{"Import", "[", "\"\<stats.out\>\"", "]"}]}], ";",
|
|
"\[IndentingNewLine]",
|
|
RowBox[{"data", "=",
|
|
RowBox[{"Select", "[",
|
|
RowBox[{
|
|
RowBox[{"Select", "[",
|
|
RowBox[{"datain", ",",
|
|
RowBox[{
|
|
RowBox[{
|
|
RowBox[{"Length", "[", "#", "]"}], "==", "2"}], "&"}]}], "]"}],
|
|
",",
|
|
RowBox[{
|
|
RowBox[{
|
|
RowBox[{"#", "[",
|
|
RowBox[{"[", "2", "]"}], "]"}], " ", ">", " ", "0"}], "&"}]}],
|
|
"]"}]}], ";", "\[IndentingNewLine]",
|
|
RowBox[{"graphtitle", "=", " ",
|
|
RowBox[{
|
|
RowBox[{"Last", "[",
|
|
RowBox[{"StringSplit", "[",
|
|
RowBox[{"folder", ",", "\"\</\>\""}], "]"}], "]"}], " ", "<>", " ",
|
|
"\"\< domain tally history\>\""}]}], ";", "\[IndentingNewLine]",
|
|
RowBox[{"data", "=",
|
|
RowBox[{
|
|
RowBox[{"(",
|
|
RowBox[{
|
|
RowBox[{"{",
|
|
RowBox[{
|
|
RowBox[{"DateObject", "[",
|
|
RowBox[{
|
|
"#1", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}],
|
|
"]"}], ",",
|
|
RowBox[{
|
|
"#1", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}]}],
|
|
"}"}], "&"}], ")"}], "/@", "data"}]}], ";", "\[IndentingNewLine]",
|
|
|
|
RowBox[{"latest", "=",
|
|
RowBox[{"ToString", "[",
|
|
RowBox[{
|
|
RowBox[{"Last", "[", "data", "]"}], "[",
|
|
RowBox[{"[", "2", "]"}], "]"}], "]"}]}], ";", "\[IndentingNewLine]",
|
|
|
|
RowBox[{"lastitem", "=",
|
|
RowBox[{"Callout", "[",
|
|
RowBox[{
|
|
RowBox[{"Last", "[", "data", "]"}], ",", "latest", ",", "Right", ",",
|
|
" ",
|
|
RowBox[{"LabelStyle", "->", "Small"}], ",", " ",
|
|
RowBox[{"Background", "->", "LightBlue"}]}], "]"}]}], ";",
|
|
"\[IndentingNewLine]",
|
|
RowBox[{
|
|
RowBox[{"data", "[",
|
|
RowBox[{"[",
|
|
RowBox[{"Length", "[", "data", "]"}], "]"}], "]"}], "=",
|
|
"lastitem"}], ";", "\[IndentingNewLine]",
|
|
RowBox[{"graph", "=",
|
|
RowBox[{"DateListPlot", "[",
|
|
RowBox[{"data", "\[IndentingNewLine]", ",",
|
|
RowBox[{"PlotTheme", "\[Rule]", "\"\<Detailed\>\""}],
|
|
"\[IndentingNewLine]", ",",
|
|
RowBox[{"FrameLabel", "\[Rule]",
|
|
RowBox[{"{",
|
|
RowBox[{
|
|
RowBox[{"{",
|
|
RowBox[{
|
|
RowBox[{"HoldForm", "[",
|
|
RowBox[{"Unique", " ", "domains"}], "]"}], ",", "None"}],
|
|
"}"}], ",",
|
|
RowBox[{"{",
|
|
RowBox[{
|
|
RowBox[{"HoldForm", "[", "Year", "]"}], ",", "None"}], "}"}]}],
|
|
"}"}]}], "\[IndentingNewLine]", ",",
|
|
RowBox[{"FrameTicks", "->",
|
|
RowBox[{"{",
|
|
RowBox[{
|
|
RowBox[{"{",
|
|
RowBox[{"All", ",", "All"}], "}"}], ",", "Automatic"}], "}"}]}],
|
|
"\[IndentingNewLine]", ",",
|
|
RowBox[{"ImageMargins", "\[Rule]", "20"}], "\[IndentingNewLine]",
|
|
",",
|
|
RowBox[{"ImageSize", " ", "->", " ", "Large"}],
|
|
"\[IndentingNewLine]", ",",
|
|
RowBox[{"PlotRange", "->", "Full"}], "\[IndentingNewLine]", ",",
|
|
RowBox[{"PlotLabel", " ", "->", " ", "\[IndentingNewLine]",
|
|
RowBox[{"Column", "[", "\[IndentingNewLine]",
|
|
RowBox[{
|
|
RowBox[{"{", "\[IndentingNewLine]",
|
|
RowBox[{
|
|
RowBox[{"Style", "[",
|
|
RowBox[{"graphtitle", ",", "16", ",", "Bold"}], "]"}],
|
|
"\[IndentingNewLine]", ",",
|
|
RowBox[{"Style", "[",
|
|
RowBox[{
|
|
RowBox[{"\"\<updated: \>\"", "<>",
|
|
RowBox[{"DateString", "[",
|
|
RowBox[{"TimeZone", "->", "\"\<Zulu\>\""}], "]"}], " ", "<>",
|
|
" ", "\"\< UTC\>\""}], ",", "12"}], "]"}],
|
|
"\[IndentingNewLine]", ",",
|
|
RowBox[{"Style", "[",
|
|
RowBox[{
|
|
RowBox[{
|
|
"\"\<latest: \>\"", "<>", "latest", " ", "<>", " ",
|
|
"\"\< domains\>\""}], ",", "12"}], "]"}]}],
|
|
"\[IndentingNewLine]", "}"}], "\[IndentingNewLine]", ",",
|
|
"Center"}], "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]",
|
|
",",
|
|
RowBox[{"LabelStyle", "\[Rule]",
|
|
RowBox[{"{",
|
|
RowBox[{"GrayLevel", "[", "0", "]"}], "}"}]}]}],
|
|
"\[IndentingNewLine]", "]"}]}], ";", "\[IndentingNewLine]",
|
|
RowBox[{"Export", "[",
|
|
RowBox[{"\"\<stats.png\>\"", ",", " ", "graph"}], "]"}], ";",
|
|
"\[IndentingNewLine]",
|
|
RowBox[{"SetDirectory", "[",
|
|
RowBox[{"NotebookDirectory", "[", "]"}], "]"}], ";",
|
|
"\[IndentingNewLine]",
|
|
RowBox[{"Return", "[", "graph", "]"}], ";"}], "\[IndentingNewLine]",
|
|
")"}]}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]",
|
|
RowBox[{"sourcegraph", " ", "/@", " ", "folders"}]}], "Input",
|
|
CellChangeTimes->{{3.8671865652072144`*^9, 3.867186567959504*^9}, {
|
|
3.8671866556947737`*^9, 3.867186670522201*^9}, {3.867186775392453*^9,
|
|
3.867186776891725*^9}, 3.867186837903651*^9, {3.867186904930146*^9,
|
|
3.867186940968878*^9}, {3.8671872869760838`*^9, 3.867187304612606*^9}, {
|
|
3.867187379649686*^9, 3.867187384392969*^9}, {3.8671874248081408`*^9,
|
|
3.867187425393301*^9}, {3.8671874629428263`*^9, 3.867187467876066*^9}, {
|
|
3.8671875851202183`*^9, 3.8671875923328257`*^9}, {3.867190421572784*^9,
|
|
3.867190455350173*^9}, {3.867191170483214*^9, 3.867191170658471*^9}, {
|
|
3.8671912032969103`*^9, 3.867191245177144*^9}, {3.867443579626745*^9,
|
|
3.867443615991692*^9}, {3.867445864801002*^9, 3.867445865695055*^9}, {
|
|
3.8675854619929047`*^9, 3.867585470469511*^9}, {3.86813554466776*^9,
|
|
3.868135571241589*^9}, {3.868135635079336*^9, 3.868135635502597*^9}, {
|
|
3.8681356903652143`*^9, 3.868135701390979*^9}, {3.868135775822659*^9,
|
|
3.868135790241622*^9}, {3.868135952641184*^9, 3.868135972101877*^9}, {
|
|
3.8681374541536837`*^9, 3.86813745521286*^9}, {3.8681382973480062`*^9,
|
|
3.868138313234252*^9}, {3.868138346135013*^9, 3.868138346349607*^9}, {
|
|
3.9368001891869*^9, 3.936800211042817*^9}, {3.936800605362091*^9,
|
|
3.9368006336933537`*^9}, {3.936801010176343*^9, 3.936801014675049*^9},
|
|
3.936801153154481*^9, {3.936801305478117*^9, 3.9368013055424643`*^9}, {
|
|
3.936801344055316*^9, 3.9368013514359903`*^9}, {3.936801561566263*^9,
|
|
3.93680156527355*^9}, {3.9368016765330276`*^9, 3.93680175494624*^9}},
|
|
NumberMarks->False,ExpressionUUID->"55c17c4f-14a9-40f1-a01c-ab0b0c9b3309"]
|
|
},
|
|
WindowSize->{1445, 974},
|
|
WindowMargins->{{0, Automatic}, {Automatic, 2}},
|
|
FrontEndVersion->"14.1 for Mac OS X ARM (64-bit) (July 16, 2024)",
|
|
StyleDefinitions->"Default.nb",
|
|
ExpressionUUID->"57e5feaa-054b-435c-828e-c5ab027fe11f"
|
|
]
|
|
(* End of Notebook Content *)
|
|
|
|
(* Internal cache information *)
|
|
(*CellTagsOutline
|
|
CellTagsIndex->{}
|
|
*)
|
|
(*CellTagsIndex
|
|
CellTagsIndex->{}
|
|
*)
|
|
(*NotebookFileOutline
|
|
Notebook[{
|
|
Cell[561, 20, 9975, 207, 968, "Input",ExpressionUUID->"55c17c4f-14a9-40f1-a01c-ab0b0c9b3309"]
|
|
}
|
|
]
|
|
*)
|
|
|