1
0

remove crud

This commit is contained in:
Deven Blake 2021-05-04 18:47:53 -04:00
parent 05c2260f33
commit eeb63e694e
6 changed files with 61 additions and 312 deletions

View File

@ -1,6 +0,0 @@
------------------
| WWW.TRINITY.MOE |
| ^ VISIT NOW |
| firefox 4+ recc. |
| HTTP ON PORT 80! |
------------------

View File

@ -106,10 +106,14 @@ Oh well.
<LI><A HREF="https://www.istartedsomething.com/20061029/royale-noir/">Royale Noir</A></LI> <LI><A HREF="https://www.istartedsomething.com/20061029/royale-noir/">Royale Noir</A></LI>
<LI><A HREF="https://i.kym-cdn.com/photos/images/original/000/030/662/rules.jpg.jpg">Rules of the internet.</A></LI> <LI><A HREF="https://i.kym-cdn.com/photos/images/original/000/030/662/rules.jpg.jpg">Rules of the internet.</A></LI>
<LI>Search engines</LI><UL> <LI>Search engines</LI><UL>
<LI><A HREF="https://www.baidu.com/">Baidu</A></LI>
<LI><A HREF="https://www.bing.com/">Bing</A></LI>
<LI><A HREF="https://duckduckgo.com/">DuckDuckGo</A> (<A HREF="https://3g2upl4pq6kufc4m.onion/">Onion link</A>)</LI> <LI><A HREF="https://duckduckgo.com/">DuckDuckGo</A> (<A HREF="https://3g2upl4pq6kufc4m.onion/">Onion link</A>)</LI>
<LI><A HREF="https://www.filechef.com/">FileChef</A></LI> <LI><A HREF="https://www.filechef.com/">FileChef</A></LI>
<LI><A HREF="http://frogfind.com/">FrogFind!</A></LI> <LI><A HREF="http://frogfind.com/">FrogFind!</A></LI>
<LI><A HREF="https://google.com/">Google</A></LI>
<LI>TORCH (<A HREF="http://xmh57jrknzkhv6y3ls3ubitzfqnkrwxhopf5aygthi7d6rplyvk3noyd.onion/">Onion link</A>)</LI> <LI>TORCH (<A HREF="http://xmh57jrknzkhv6y3ls3ubitzfqnkrwxhopf5aygthi7d6rplyvk3noyd.onion/">Onion link</A>)</LI>
<LI><A HREF="https://www.yahoo.com/">Yahoo!</A></LI>
</UL> </UL>
<LI><A HREF="http://www.pbm.com/">Shadow Island Games</A></LI> <LI><A HREF="http://www.pbm.com/">Shadow Island Games</A></LI>
<LI><A HREF="https://ftrv.se/">Sigrid</A></LI> <LI><A HREF="https://ftrv.se/">Sigrid</A></LI>
@ -287,6 +291,7 @@ Oh well.
<LI><A HREF="https://www.govdeals.com/">Government Deals</A></LI> <LI><A HREF="https://www.govdeals.com/">Government Deals</A></LI>
<LI><A HREF="https://gsaauctions.gov/gsaauctions/aucindx/">GSA Auctions</A></LI> <LI><A HREF="https://gsaauctions.gov/gsaauctions/aucindx/">GSA Auctions</A></LI>
<LI><A HREF="https://www.humblebundle.com/">HumbleBundle</A></LI> <LI><A HREF="https://www.humblebundle.com/">HumbleBundle</A></LI>
<LI><A HREF="https://taobao.com/">Taobao</A></LI>
<LI><A HREF="https://venmo.com/">Venmo</A></LI> <LI><A HREF="https://venmo.com/">Venmo</A></LI>
</UL> </UL>
<LI>Media</LI><UL> <LI>Media</LI><UL>
@ -903,6 +908,7 @@ Oh well.
<LI><A HREF="https://dyno.gg/">Dyno</A> <LI><A HREF="https://dyno.gg/">Dyno</A>
<LI><A HREF="https://roleypoly.com">Roleypoly</LI> <LI><A HREF="https://roleypoly.com">Roleypoly</LI>
</UL> </UL>
<LI><A HREF="https://www.facebook.com/">Facebook</A></LI>
<LI><A HREF="https://fchan.xyz/">FChan</A></LI> <LI><A HREF="https://fchan.xyz/">FChan</A></LI>
<LI><A HREF="https://www.friendproject.net/home.php">FriendProject</A> <LI><A HREF="https://www.friendproject.net/home.php">FriendProject</A>
<LI><A HREF="https://github.com/">GitHub</A> <LI><A HREF="https://github.com/">GitHub</A>
@ -910,7 +916,7 @@ Oh well.
<LI><A HREF="https://www.goodreads.com/">Goodreads</A></LI> <LI><A HREF="https://www.goodreads.com/">Goodreads</A></LI>
<LI><A HREF="https://news.ycombinator.com/">Hacker News</A></LI> <LI><A HREF="https://news.ycombinator.com/">Hacker News</A></LI>
<LI><A HREF="https://ieddit.com/">ieddit</A></LI> <LI><A HREF="https://ieddit.com/">ieddit</A></LI>
<LI><A HREF="https://www.instagram.com/">Instagram</A></LI> <LI><A HREF="https://www.instagram.com/">Facebook Instagram</A></LI>
<LI><A HREF="https://iro2.net/">Iro</A></LI> <LI><A HREF="https://iro2.net/">Iro</A></LI>
<LI><A HREF="https://lainchan.org/">Lainchan</A></LI> <LI><A HREF="https://lainchan.org/">Lainchan</A></LI>
<LI><A HREF="https://www.last.fm/">Last.fm</A></LI><UL> <LI><A HREF="https://www.last.fm/">Last.fm</A></LI><UL>
@ -925,6 +931,7 @@ Oh well.
<LI><A HREF="https://www.planetminecraft.com/">Planet Minecraft</A></LI> <LI><A HREF="https://www.planetminecraft.com/">Planet Minecraft</A></LI>
<LI><A HREF="https://www.pouet.net/">pouët</A></LI> <LI><A HREF="https://www.pouet.net/">pouët</A></LI>
<LI><A HREF="https://protonmail.com/">Protonmail</A></LI> <LI><A HREF="https://protonmail.com/">Protonmail</A></LI>
<LI><A HREF="https://www.qq.com/">QQ</A></LI>
<LI><A HREF="https://old.reddit.com/">Reddit</A></LI> <LI><A HREF="https://old.reddit.com/">Reddit</A></LI>
<LI>Riverchat (<A HREF="https://riverscuomo.com/riverchat">2020 link</A>) (<A HREF="https://riverscuomo.com/chat">2021 revival</A>)</LI> <LI>Riverchat (<A HREF="https://riverscuomo.com/riverchat">2020 link</A>) (<A HREF="https://riverscuomo.com/chat">2021 revival</A>)</LI>
<LI><A HREF="https://www.roblox.com/">Roblox</A></LI> <LI><A HREF="https://www.roblox.com/">Roblox</A></LI>
@ -936,9 +943,11 @@ Oh well.
<LI><A HREF="https://subreply.com/">Subreply</A></LI> <LI><A HREF="https://subreply.com/">Subreply</A></LI>
<LI><A HREF="http://tanasinn.org/">tanasinn</A></LI> <LI><A HREF="http://tanasinn.org/">tanasinn</A></LI>
<LI><A HREF="https://tutanota.com/">Tutanota</A></LI> <LI><A HREF="https://tutanota.com/">Tutanota</A></LI>
<LI><A HREF="https://www.twitch.tv">Amazon Twitch</A></LI>
<LI><A HREF="https://twitter.com/">Twitter</A></LI> <LI><A HREF="https://twitter.com/">Twitter</A></LI>
<LI><A HREF="https://wirechan.org/">wirechan</A></LI> <LI><A HREF="https://wirechan.org/">wirechan</A></LI>
<LI><A HREF="https://zikdo.com/">Zikdo</A> (Defunct)</LI> <LI><A HREF="https://zikdo.com/">Zikdo</A> (Defunct)</LI>
<LI><A HREF="https://zoom.us/">Zoom</A></LI>
</UL> </UL>
<LI>Software</LI><UL> <LI>Software</LI><UL>
<LI>Android</LI><UL> <LI>Android</LI><UL>

View File

@ -1,71 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>deven's stuff</title>
<meta charset="US-ASCII" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style>
.column-left .column-right { padding: 20px; }
.column-left { float: left; }
.column-right { float: right; }
h1, h2 {
font-size: 1em;
font-weight: normal;
}
hr {
margin-left: 0;
text-align: left;
width: 50%;
}
</style>
</head>
<body>
<h1>Welcome to Deven's browser landing page!</h1>
<p>This is a page I made with some useful links to kickstart your World Wide Web experience.</p>
<p>I've <b>bolded</b> my favorite sites (ones that impress me via privacy, security, or ease of use).</p>
<p>Sections that have bolded Roman numerals (<a href="https://www.wikihow.com/Read-Roman-Numerals">"How do I read Roman numerals?"</a>) are services that are particularly important (in my opinion) for a web-goer to be aware of, with <b>I</b> indicating the most important category and <b>II</b> indicating the second-most important category (and onward).</p>
<p>Sections that have a bolded <b>!P</b> are categories of sites that tend to prey on users, like social media.</p>
<p>
Sections that have a bolded <b>!V</b> tend to contain malware that can break your computer.
If you're one of those magical tech wizards you can safely ignore this warning.
</p>
<p>Sites are ordered alphabetically.</p>
<h2 id="engines"><b>I</b> Search engines:</h2>
<p><a href="https://www.baidu.com/">Baidu</a></p>
<p><a href="https://www.bing.com/">Bing</a> (owned by Microsoft)</p>
<p><b><a href="https://duckduckgo.com/">DuckDuckGo</a></b></p>
<p><a href="https://google.com/">Google</a></p>
<p><a href="https://www.yahoo.com/">Yahoo!</a></p>
<hr />
<h2 id="references"><b>II</b> References:</h2>
<p><a href="https://www.wikipedia.org/">Wikipedia</a></p>
<hr />
<h2 id="shopping"><b>!P</b> Shopping on the World Wide Web:</h2>
<p><a href="https://www.aliexpress.com/">AliExpress</a></p>
<p><a href="https://www.amazon.com/">Amazon</a></p>
<p><a href="https://taobao.com/">Taobao</a></p>
<hr />
<h2 id="social"><b>!P</b> Social media:</h2>
<p><a href="https://www.facebook.com/">Facebook</a></p>
<p><a href="https://www.instagram.com/">Instagram</a> (owned by Facebook)</p>
<p><a href="https://www.qq.com/">QQ</a></p>
<p><a href="https://www.reddit.com/">Reddit</a>
(here's the <a href="https://old.reddit.com/">old version</a>)</p>
<p><a href="https://www.twitch.tv">Twitch</a> (owned by Amazon)</p>
<p><a href="https://www.youtube.com/">YouTube</a> (owned by Google)</p>
<p><a href="https://zoom.us/">Zoom</a></p>
</TD> <TD valign="top" width="50%">
<img src="https://ia801904.us.archive.org/33/items/dblake-avatars/2020-05-17.png" alt="Deven Blake profile picture" style="width: 100px; margin-right: 10px;" />
<p><small>I'm Deven Blake, the person who made this little landing page.
I hope you enjoy it! It's 100% hand-typed HTML, feel free to snoop around.
<br /><a href="http://www.trinity.moe/">Visit my website.</a>
<br />Email me using the address on my site if you'd like me to add anything.
Don't be shy!
</small></p>
<p>I consider web <a href="#shopping">shopping</a> predatory due to the frequency of misleading and fraudulent ads on the platforms.</p>
<p>I consider <a href="#social">social media</a> predatory due to most services' lack of moderation and frequency of dangerous and illegal content.</p>
<p>This webpage and only this webpage (<b>not</b> the content hyperlinked and hotlinked on this webpage) belongs to the public domain and includes no warranty.</p>
<p>Created 2020-09-13.</p>
</TD></TR></TABLE>
</body>
</html>

View File

@ -1,5 +1,5 @@
<!DOCTYPE html> <!DOCTYPE html>
<HTML> <HTML lang="en-US">
<HEAD> <HEAD>
<LINK HREF="http://www.trinity.moe/" REL="canonical" /> <LINK HREF="http://www.trinity.moe/" REL="canonical" />
<LINK HREF="https://raw.githubusercontent.com/devenblake/homepage/main/favicon.ico" REL="shortcut icon" TYPE="image/x-icon" /> <LINK HREF="https://raw.githubusercontent.com/devenblake/homepage/main/favicon.ico" REL="shortcut icon" TYPE="image/x-icon" />
@ -45,7 +45,9 @@ See something wack? File an issue. Got something to share? Make a pull request.
<A HREF="#contact">#contact</A>, <A HREF="#contact">#contact</A>,
<A HREF="#gallery">#gallery</A>, <A HREF="#gallery">#gallery</A>,
<A HREF="#kinlist">#kinlist</A>, <A HREF="#kinlist">#kinlist</A>,
<A HREF="#extensions">#extensions</A>,
<A HREF="#privacy">#privacy</A>, <A HREF="#privacy">#privacy</A>,
<A HREF="#services">#services</A>,
<A HREF="#praise">#praise</A>, <A HREF="#praise">#praise</A>,
<A HREF="#control">#control</A>, <A HREF="#control">#control</A>,
<A HREF="#stickers">#stickers</A> <A HREF="#stickers">#stickers</A>
@ -53,14 +55,13 @@ See something wack? File an issue. Got something to share? Make a pull request.
<HR ALIGN="left" SIZE="1" WIDTH="25%" /> <HR ALIGN="left" SIZE="1" WIDTH="25%" />
<H4 ID="contact"><A HREF="#contact">You can contact me at...</A></H4> <H3 ID="contact"><A HREF="#contact">You can contact me at...</A></H3>
<P>trinity@trinity.moe (<I>preferably</I>, redirects to a Google mail account)</P> <P>trinity@trinity.moe (<I>preferably</I>, redirects to a Google mail account)</P>
<P>deven@waifu.club</P> <P>deven@waifu.club</P>
<HR ALIGN="left" SIZE="1" WIDTH="25%" /> <HR ALIGN="left" SIZE="1" WIDTH="25%" />
<H4 ID="gallery"><A HREF="#gallery">Other pages on this site</A></H4> <H3 ID="gallery"><A HREF="#gallery">Other pages on this site</A></H3>
<P><A HREF="/home">check out a web browser landing page i made</A></P>
<P><A HREF="/thegame">you just lost the game</A></P> <P><A HREF="/thegame">you just lost the game</A></P>
<P><A HREF="/now">here's what i'm doing right now</A></P> <P><A HREF="/now">here's what i'm doing right now</A></P>
<P><A HREF="/devenzone">have you been to devenzone?</A></P> <P><A HREF="/devenzone">have you been to devenzone?</A></P>
@ -73,7 +74,8 @@ See something wack? File an issue. Got something to share? Make a pull request.
<HR ALIGN="left" SIZE="1" WIDTH="25%" /> <HR ALIGN="left" SIZE="1" WIDTH="25%" />
<H4 ID="kinlist"><A HREF="#kinlist">Here's my kinlist</A></H4> <H3 ID="kinlist"><A HREF="#kinlist">Here's my kinlist</A></H3>
<H4>updated 2021-05-04</H4>
<P>I should say that what I mean by "kin" is just that I identify with, or have a kinship with, these characters. <P>I should say that what I mean by "kin" is just that I identify with, or have a kinship with, these characters.
I don't believe I <I>am</I> these characters. I don't believe I <I>am</I> these characters.
@ -85,13 +87,47 @@ I've heard that's a thing.
<LI>Dr. Strangelove</LI> <LI>Dr. Strangelove</LI>
<LI>The Han Solo Angry Bird from Angry Birds Star Wars specifically. Not Han Solo himself.</LI> <LI>The Han Solo Angry Bird from Angry Birds Star Wars specifically. Not Han Solo himself.</LI>
<LI>IKARI Shinji</LI> <LI>IKARI Shinji</LI>
<LI>My friend Lily</LI> <LI>My friend Lily (who is a real person, but is cool and I aspire to be more like her)</LI>
<LI>SHAN Ling</LI> <LI>SHAN Ling</LI>
</UL> </UL>
<HR ALIGN="left" SIZE="1" WIDTH="25%" /> <HR ALIGN="left" SIZE="1" WIDTH="25%" />
<H4 ID="privacy"><A HREF="#privacy">Site privacy policy:</A></H4> <H3 ID="extensions"><A HREF="#extensions">Browser extensions I recommend</A></H3>
<H4>updated 2021-03-25</H4>
<P>
To browse the web I use Mozilla Firefox, TOR Browser, or Lynx in a terminal.
I <I>do not</I> recommend any form of Google Chrome, for <A HREF="/shitlist#alphabet">reasons</A>.
</P><P>
Lynx is fine on its own but sort of sucks in that it doesn't fully implement a lot of common web features.
As much as I love Lynx, it just doesn't work for me.
Firefox (and TOR Browser, which is based on Firefox) has bad defaults and lacks some features which these extensions implement.
</P>
<UL>
<LI><I>For Firefox and TOR Browser</I></LI><UL>
<LI><A HREF="https://addons.mozilla.org/en-US/firefox/addon/ublock-origin/">uBlock Origin</A></LI>
<LI><A HREF="https://addons.mozilla.org/en-US/firefox/addon/uaswitcher/">User-Agent Switcher</A></LI>
</UL>
<LI><I>For just Firefox</I></LI><UL>
<LI>Containerization</LI><UL>
<LI><A HREF="https://addons.mozilla.org/en-US/firefox/addon/facebook-container/">Facebook Container</A></LI>
<LI><A HREF="https://addons.mozilla.org/en-US/firefox/addon/google-container/">Google Container</A></LI>
</UL>
<LI><A HREF="https://addons.mozilla.org/en-US/firefox/addon/clearurls/">ClearURLs</A></LI>
<LI><A HREF="https://addons.mozilla.org/en-US/firefox/addon/image-search-options/">Image Search Options</A></LI>
<LI><A HREF="https://shinigami-eyes.github.io/">Shinigami Eyes</A></LI>
<LI><A HREF="https://addons.mozilla.org/en-US/firefox/addon/single-file/">SingleFile</A></LI>
<LI><A HREF="https://addons.mozilla.org/en-US/firefox/addon/wayback-machine_new/">Wayback Machine</A></LI>
</UL>
</UL>
<H5>Other Art</H5><UL>
<LI><A HREF="https://gist.github.com/emmatebibyte/f3ea2a6f589ff26d0fce1900271446b8">Emma Tebibyte's recommended Firefox extensions</A></LI>
</UL>
<HR ALIGN="left" SIZE="1" WIDTH="25%" />
<H3 ID="privacy"><A HREF="#privacy">Site privacy policy:</A></H3>
<H4>updated 2021-03-14</H4>
<P> <P>
This site uses Cloudflare for DNS but shouldn't have any Cloudflare tracking or anything like that. This site uses Cloudflare for DNS but shouldn't have any Cloudflare tracking or anything like that.
There's no proxying. Nor do I (currently) log visitor IP addresses - <I>this may change</I>. There's no proxying. Nor do I (currently) log visitor IP addresses - <I>this may change</I>.
@ -110,7 +146,7 @@ Seriously. The code is yours. Take all the JS without crediting me. Hotlink the
<HR ALIGN="left" SIZE="1" WIDTH="25%" /> <HR ALIGN="left" SIZE="1" WIDTH="25%" />
<H4>Services I'm on include...</H4> <H3 ID="services"><A HREF="#services">Services I'm on include...</A></H3>
<P> <P>
<I><B>All Things Weezer</B>, deven</I>; <I><B>All Things Weezer</B>, deven</I>;
<B>ArchWiki</B>, deven; <B>ArchWiki</B>, deven;
@ -139,7 +175,7 @@ Seriously. The code is yours. Take all the JS without crediting me. Hotlink the
None of these are guaranteed to still be on-line and italicized entries are ones I rarely use. None of these are guaranteed to still be on-line and italicized entries are ones I rarely use.
I would much rather talk to you via Signal instead of using something like Discord. I would much rather talk to you via Signal instead of using something like Discord.
</P> </P>
<H4>Services I <I>do not</I> use, and on which I do not have a profile, include...</H4> <H3>Services I <I>do not</I> use, and on which I do not have a profile, include...</H3>
<P> <P>
Facebook, Facebook Instagram, Facebook Messenger, Facebook Whatsapp; Facebook, Facebook Instagram, Facebook Messenger, Facebook Whatsapp;
Likee; Likee;
@ -154,13 +190,13 @@ On most of these I have had profiles in the past, but they are since deleted.
<HR ALIGN="left" SIZE="1" WIDTH="25%" /> <HR ALIGN="left" SIZE="1" WIDTH="25%" />
<H4 ID="praise"><A HREF="#praise">Praise for www.trinity.moe's bold approach to the web</A></H4> <H3 ID="praise"><A HREF="#praise">Praise for www.trinity.moe's bold approach to the web</A></H3>
<P>"<A HREF="https://invidious.tube/watch?v=fUpZO9LnNo0">my computer is making mustard gases</A>" ~ <I>a happy site visitor</I></P> <P>"<A HREF="https://invidious.tube/watch?v=fUpZO9LnNo0">my computer is making mustard gases</A>" ~ <I>a happy site visitor</I></P>
<HR ALIGN="left" SIZE="1" WIDTH="25%" /> <HR ALIGN="left" SIZE="1" WIDTH="25%" />
<H4 ID="control"><A HREF="#control">Control panel</A></H4> <H3 ID="control"><A HREF="#control">Control panel</A></H3>
<SMALL>The following inputs use JavaScript to change this page's stylesheet:<BR /></SMALL> <SMALL>The following inputs use JavaScript to change this page's stylesheet:<BR /></SMALL>
<INPUT ONCLICK="sheet = window.setStyling('/css/blank.css);" TYPE="button" VALUE="notheme" /> <INPUT ONCLICK="sheet = window.setStyling('/css/blank.css);" TYPE="button" VALUE="notheme" />
<INPUT ONCLICK="sheet = window.setStyling('/css/givemerights.css');" TYPE="button" VALUE="givemerights" /> <INPUT ONCLICK="sheet = window.setStyling('/css/givemerights.css');" TYPE="button" VALUE="givemerights" />
@ -183,13 +219,13 @@ Any stylesheet from any on-line source will work.
<HR ALIGN="left" SIZE="1" WIDTH="25%" /> <HR ALIGN="left" SIZE="1" WIDTH="25%" />
<H4>Play the Zelda theme song in your terminal</H4> <H3>Play the Zelda theme song in your terminal</H3>
<CODE>curl http://www.trinity.moe/zelda.sh | sudo sh</CODE> <CODE>curl http://www.trinity.moe/zelda.sh | sudo sh</CODE>
<P></P> <P></P>
<HR ALIGN="left" SIZE="1" WIDTH="25%" /> <HR ALIGN="left" SIZE="1" WIDTH="25%" />
<H4 ID="stickers"><A HREF="#stickers">Stickers</A></H4> <H3 ID="stickers"><A HREF="#stickers">Stickers</A></H3>
<A HREF="http://www.trinity.moe"><IMG <A HREF="http://www.trinity.moe"><IMG
ALT="trinity.moe. Hypertext on port 80. Click here." ALT="trinity.moe. Hypertext on port 80. Click here."
@ -221,4 +257,5 @@ WIDTH="88px"
<P><A HREF="/stickers">Check out some other people's stickers, too</A></P> <P><A HREF="/stickers">Check out some other people's stickers, too</A></P>
</BODY>
</HTML> </HTML>

View File

@ -1,199 +0,0 @@
<!DOCTYPE html>
<HTML lang="en">
<HEAD>
<META http-equiv="content-type" content="text/html; charset=windows-1252" />
<META charset="US-ASCII" />
<META NAME="viewport" CONTENT="width=device-width, initial-scale=1" />
<TITLE>Deven's Guide to Python</TITLE>
</HEAD>
<BODY>
<P><A HREF="/">~ Return</A></P>
<H1>Deven's Guide to Python</H1>
<H3>Updated 2020-11-17</H3>
<HR width="25%" size="1" align="left" />
<H2>Table of contents</H2>
<p>
<b><a href="#introduction">What is Python?</a></b><br />
<b><a href="#installation">How to install Python</a></b><br />
<b><a href="#guide">Deven's Guide to Python</a></b><br />
<a href="#variables">Variables</a><br />
<small>
<a href="#variable-types">Variable types</a><br />
</small>
<a href="#printing">Printing to the console</a><br />
<small>
<a href="#string-concatenation">String concatenation</a><br />
<a href="#print-multiple">Printing across multiple lines</a><br />
</small>
</p>
<hr width="25%" size="1" align="left">
<h2 id="introduction">What is Python?</h2>
<p><a href="https://en.wikipedia.org/wiki/Python_(programming_language)">
Python is an interpreted, high-level, general-purpose programming language.
Created by Guido van Rossum and first released in 1991, Python's design philosophy emphasizes code readability with its notable use of significant whitespace.
Its language constructs and object-oriented approach aim to help programmers write clear, logical code for small and large-scale projects.
</a></p>
<p>
Basically, Python is a programming language that's supposed to be easy to read and easy to use.
As you'll learn, Python mandates the use of readable code and is pretty easily understood.
</p>
<p>
I learned Python3 through the local community college in CPT127-51N (an on-line class), though my usage of Python dates back to 2014 or so and I had already taken a Python2 course in high school.
My knowledge of Python is that of a beginner and this guide is meant only to help beginner programmers understand Python.
The intent is to make a guide that teaches Python efficiently.
If you would like to learn Python more slowly, I recommend <i><a href="https://www.amazon.com/Python-Programming-Absolute-Beginner-3rd/dp/1435455002">Python Programming for the Absolute Beginner</a></i>, a book from which I learned the basics of Python3 in middle school, or <i><a href="https://www.amazon.com/Starting-Out-Python-Tony-Gaddis/dp/0134444329">Starting Out with Python</a></i>, a book from which I learned some more stuff about Python3 in CPT127.
<i>Starting Out</i> is pretty expensive though and <i>Python for the Absolute Beginner</i> isn't cheap either, so remember that you can nearly always learn anything for free on-line.
</p>
<h2 id="installation">How to install Python</h2>
<p>
On Debian-based Linux you can simply <code>apt install python3 python3-pip</code>.
On Linux and UNIX operating systems, you can compile the source code found on the official Python website.
For the proprietary macOS and Windows operating systems there are installers available.
There are also packages available for AIX, IBM i, iOS and iPad OS, OS/390 and z/OS, Solaris, VMS, and HP-UX on the Python website, though they may not be as well-supported as the more common operating systems' packages.
</p>
<hr width="25%" size="1" align="left">
<h1 id="guide">The Guide to Python</h1>
<p>
For brevity's sake, this guide will not delve into Python libraries.
There will be short tutorials for some important commands contained in modules like <code>math</code> and <code>time</code> but that's about it.
This will also not talk about objects or classes because (a) I don't like object-oriented programming and (b) I don't know how to program with objects in Python.
Yes, I am apathetically ignorant when it comes to OOP (<b>o</b>bject-<b>o</b>riented</b> <b>p</b>rogramming); I am not a good role model and I'm not your father.
</p>
<h2 id="variables">Variables</h2>
<p>
Python doesn't have variable declarations or explicit typing.
While in, for example, C, a variable named <code>a</code> that stores <code>5</code> could be declared with <code>int a = 5;</code>, that same variable could be declared in Python with just <code>a = 5</code>.
That means <code>a</code> could, across a program, hold <code>5</code>, <code>5.0</code>, <code>[1,2,3,4,5]</code>, or <code>"HI"</code>.
Though this makes Python very newbie-friendly, this has been the subject of intense debate in programmer circles, because <s>it's stupid</s> it enables programmers that aren't following best practices to reuse variables like <code>a</code> or <code>b</code> a ton of times in programs and make their code almost unreadable.
</p>
<h3 id="variable-types">Variable types</h3>
<p>
While variables aren't explicitly typed, they <i>are</i> implicitly typed.
You can see the type of a variable with <code>type(<i>variable</i>)</code>.
For example, <code>type(4)</code> would return <code>&lt;class 'int'&gt;</code>.
<code>type(hello)</code> would return class <code>'str'</code>, and <code>type('a')</code> would <i>also</i> return class <code>'str'</code>.
(As opposed to other languages, Python doesn't have a <code>char</code> type.
Only single-length strings.)
<code>type([1])</code> returns class <code>'list'</code> and <code>type(4.0)</code> returns class <code>'float'</code>.
Type conversion can be done using <code>int()</code>, <code>float()</code>, or <code>str()</code>, to integer, floating-point, and string variable types respectively.
There are probably other type conversions but I don't use them.
</p>
<h2 id="printing">Printing to the console</h2>
<p>
<code>print(<i>thing</i>)</code> will print <code>thing</code> to the terminal.
<code><i>thing</i></code> used to (in Python2) have to be a string, however modern Python versions will automatically convert any type of variable to a string before printing.
</p>
<p>
<code>print()</code> by default will add a newline (<code>\n</code>) to the end of the string it's printing.
It's possible to change the ending character with <code>end=</code>.
For example, <code>print("HELLO WORLD", end='')</code> will print "<code>HELLO WORLD</code> without the newline.
<code>print("HELLO WORL", end='D')</code> will print "<code>HELLO WORLD</code>" the same way <code>print("HELLO WORLD", end='')</code> did.
</p>
<h3 id="string-concatenation">String concatenation</h3>
<p>
To "join" two strings together in Python, just use the <code>+</code> operator.
For example, <code>print("HELLO " + "WORLD")</code> will just print "<code>HELLO WORLD</code>".
It is worth noting that <code>print("HELLO" + "WORLD")</code> <i>without</i> the space in that "<code>HELLO </code>" string will produce <code>HELLOWORLD</code>.
<b>You can only concatenate a string with another string. <code>print("THIS IS THE NUMBER FIVE " + 5)</code> will not work.</b>
</p>
<h3>Printing multiple <code>things</code></h3>
<p>
The ideal way to print multiple <code>things</code> is to use a comma to separate the terms in your <code>print()</code> statement.
For example, <code>print("THIS IS THE NUMBER FIVE", 5)</code> will print <code>THIS IS THE NUMBER FIVE 5</code>.
This relies on Python's automatic conversion of any variable to a string before it prints anything.
<code>print("HELLO" + 5)</code> <b>does not</b> work the same way, because you cannot concatenate a string with an integer.
In order to reproduce <code>print("THIS IS THE NUMBER FIVE", 5)</code> with string concatenation, you would need to write <code>print("THIS IS THE NUMBER FIVE " + str(5))</code>.
</p>
<h3><code>print(x+y)</code> versus <code>print(x,y)</code></h3>
<p>
Personally, I only ever use <code>print(x,y)</code> when I'm lazy.
It's a completely valid way to print things, I just prefer to convert and concatenate because it gives me more control over what's being printed.
When you use concatenation, you can do something like:
</p>
<p><code>
a = 1<br />
b = 2<br />
c = 3<br />
print(str(a) + "." + str(b) + "." + str(c))
</code></p>
<p>
Which will return <code>1.2.3</code>, whereas:
</p>
<p><code>
a = 1<br />
b = 2<br />
c = 3<br />
print(a, ".", b, ".", c)
</code></p>
<p>
Will return <code>1 . 2 . 3</code>.
These little differences can make a big deal in how your program is presented.
</p>
<h3 id="print-multiple">Printing across multiple lines</h3>
<p>
There are three ways to accomplish multi-line printing.
The first, easy way, is to just use multiple <code>print()</code> statements, because <code>print()</code> automatically adds a newline to the end of the print.
</p>
<p><code>
print("HELLO")<br />
print("WORLD")<br />
</code></p>
<p>Will return:</p>
<p><code>
HELLO<br />
WORLD
</code></p>
<p>
You can also use the newline escape character, <code>\n</code>.
This is similar to the <code>&lt;br /&gt;</code> tag in HTML.
</p>
<p><code>print("HELLO\nWORLD")</code></p>
<p>Will return:</p>
<p><code>
HELLO<br />
WORLD
</code></p>
<p>
Finally, you can use the triple-apostrophe (<code>'''</code>) to do the same thing without any codes.
</p>
<p><code>
print('''HELLO<br />
WORLD''')
</code></p>
<p>Will return:</p>
<p><code>
HELLO<br />
WORLD
</code></p>
<H2 ID="functions">Functions</H2>
<P>
Functions are the most powerful part of any programming language.
In Python functions are themselves variables, with the type <code>&lt;class 'function'&gt;</code>.
In Python a very simple function we can study is the following:
</P>
<P><CODE>
def f():<BR />
&emsp; return
</CODE></P>
<P>
This function's name is <CODE>f</CODE> and it does everything after the line with <CODE>def</CODE> (so, just <CODE>return</CODE>).
That line with <CODE>def</CODE> is actually officially called a <I>function header</I>.
I think that's a stupid name personally, I just call it the "line with def" and everybody gets what I'm talking about.
</P>
<H3>def</H3>
<P>
<CODE>def</CODE> is a special thing in Python that <B>def</B>ines a function.
Y'know words in English? How do those work? I can say something is "cold",
but that structure of vowels and consonants isn't <I>cold</I> itself.
"Coldness" is a <I>function</I> that can be performed by matter under a specific circumstance,
namely, its particles having a below-average level of excitement.
</P>
</BODY>
</html>

View File

@ -1,21 +0,0 @@
<!DOCTYPE html>
<HTML>
<HEAD>
<TITLE>deven's unix stuff</TITLE>
<META charset="UTF-8" />
<META name="viewport" content="width=device-width, initial-scale=1" />
<LINK rel="shortcut icon" type="image/x-icon" href="https://raw.githubusercontent.com/devenblake/homepage/main/favicon.ico">
</HEAD>
<BODY>
<p><a href="..">~ Return</a></p>
<h1>deven's unix stuff</h1>
<p>
So you just installed a UNIX-based OS and you don't know how to use it -
you don't know <i>at all</i> how to use it. UNIX stuff is heavy at first!
A lot of people get discouraged. However, after a while anyone can use
UNIX-based operating systems. This guide will serve as both a tutorial
and reference for general UNIX-based OSes, with testing being done on
Debian Linux.
</p>
</BODY>
</HTML>