Skip to content

Instantly share code, notes, and snippets.

View HundredVisionsGuy's full-sized avatar

Chris Winikka HundredVisionsGuy

View GitHub Profile
@HundredVisionsGuy
HundredVisionsGuy / nav.html
Created April 24, 2024 18:35
Starter Code for a navbar
<nav>
<ul>
<li><a href="index.html">home</a></li>
<li><a href=""></a></li>
<li><a href=""></a></li>
<li><a href=""></a></li>
</ul>
</nav>
@HundredVisionsGuy
HundredVisionsGuy / index.html
Created April 24, 2024 18:33
HTML Bones - What every HTML Document needs (to begin with)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
</body>
@HundredVisionsGuy
HundredVisionsGuy / datetime_typehints.py
Last active March 4, 2024 18:02
Sample of docstrings and type hinting
"""
datetime_typehints
by a now deleted user from Reddit
Example of docstrings and type annotations (type hints) in code.
Reddit article link:
https://www.reddit.com/r/learnpython/comments/qcbz67/type_hinting_for_datetimedate_and_datetimetime/
"""
import datetime
@HundredVisionsGuy
HundredVisionsGuy / randomness_v2.py
Created February 9, 2024 22:51
Some ways to generate or choose random numbers or strings
# Generate some random numbers
import random
# pick a random number between 100 and 200
width = random.randrange(100, 200)
# choose a random name
names = ["Logan", "Finn", "Alana", "Kate", "Komby", "Kaleo"]
pick = random.choice(names)
@HundredVisionsGuy
HundredVisionsGuy / randomness.py
Created February 8, 2024 23:02
Some Random Generation Code in Python
# Demo on using random
import random
# Generate random number between 10 and 30
for i in range(10):
random_number = random.randint(10, 30)
print(random_number)
# Choose a random name (14 times)
for i in range(14):
@HundredVisionsGuy
HundredVisionsGuy / if_then_#.py
Created January 19, 2024 02:33
If, Then, Else coding frames for the Socratica Video
"""
Here are some coding frames to help you with the If, Then, Else in Python video by Socratica.
by Chris Winikka (CS Teacher)
The concept of coding frames are I have replaced variables and values with underscores _____
Pay attention to the comments.
"""
"""Inputs and Conversions"""
# Get user input (will be in the form of a string)
@HundredVisionsGuy
HundredVisionsGuy / Starting a GitHub Classroom Web Project.md
Created January 5, 2024 17:22
How to accept and prep your GitHub Classroom web-based project.

How to get started working on your GitHub Classroom Web Project

Step 1: Clone your project

  1. Accept the assignment link.
  2. Click the link to your new project repo.
  3. Click the green code button and copy the HTTPS url (ends in .git)
  4. Open a folder in Windows explorer on your computer where you want your project.
  5. Right click in the folder and choose "Git Bash Here"
  6. Type: git clone + the URL you copied in step 4 by right-clicking and choosing paste
  • NOTE: My command was git clone https://github.com/CenturyHSTech/image-gallery-project-HundredVisionsGuy-1.git
@HundredVisionsGuy
HundredVisionsGuy / advent_o_code_starter.py
Created November 28, 2023 18:00
Advent of Code Starter Functions
"""
I organize my Advent of Code Challenges in folders.
Below is the folder structure:
01a
|_ inputs.txt # where I store the puzzle inputs
|_ main.py # where I put my code
|_ test.txt # where I store the sample inputs
"""
@HundredVisionsGuy
HundredVisionsGuy / GitCommands.md
Last active October 19, 2023 15:36
Most Common Git Commands

Most Common Git Commands

You need a copy of your GitHub Repo on a new computer

git clone https://github.com/username/Git-Project-You-Want-to-Clone.git

You're in Git Bash and you did something you don't want to lose

git add *

git commit -m "commit message"

@HundredVisionsGuy
HundredVisionsGuy / PythonStyleGuide.md
Last active October 16, 2023 22:30
CHSTech Python Code Formatting Styleguide

Python Code Formatting Styleguide

from PEP 8 - Style Guide for Python

Code Layout

  • Indentation is 4 spaces (not 2)
  • Maximum Line Length is 79 characters (break it up if you have to)

Blank Lines

  • Include 2 blank lines before and between function definitions.
  • Include a single blank line before a single-line comment.