Skip to content

Instantly share code, notes, and snippets.

View thomasthaddeus's full-sized avatar
:dependabot:
Building things to make life easier

Thaddeus Thomas thomasthaddeus

:dependabot:
Building things to make life easier
View GitHub Profile
@thomasthaddeus
thomasthaddeus / tables.html
Last active February 17, 2023 11:35
Wine Festival Schedule The Aguillar Family is hosting their annual wine festival and they have asked you to build a web page for the event schedule! Use your knowledge of HTML to display a table to the attendees.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Aguillar Family Wine Festival</title>
<style>
body {
background-color: #242f44;
color: white;
font-family: 'Oswald', sans-serif;
@thomasthaddeus
thomasthaddeus / index.html
Created February 15, 2023 06:49
Fashion week in New York Project taken from Codecademy
<!DOCTYPE html>
<html>
<head>
<title element="Everyday with Isa" />
</head>
<body>
<a href="#contact"><img
src="https://content.codecademy.com/courses/learn-html/elements-and-structure/profile.jpg"
/></a>
<h3>by Isabelle Rodriguez | 1 day ago</h3>
@thomasthaddeus
thomasthaddeus / analyzing_hotel_dbs_wpy.py
Created February 8, 2023 13:39
SQLite3 in Python and ways to analyze it
"""analyzing_hotel_dbs_wpy.py"""
# %% [markdown]
# # Analyzing Hotel Databases with Python
#
# Sleep Away Inc., a hotel corporation, has just hired you as a data analyst.
#
# 1. They would like you to analyze their most recent data about:
# - customers who cancelled their booking and
# - customers who did not cancel.
@thomasthaddeus
thomasthaddeus / sql_schema.sql
Created August 4, 2022 18:44
Key Validation for DB design
CREATE TABLE book (
title varchar(100),
isbn varchar(50) PRIMARY KEY,
pages integer,
price money,
description varchar(256),
publisher varchar(100)
);
CREATE TABLE chapter (
@thomasthaddeus
thomasthaddeus / purchases.sqlite
Created August 4, 2022 04:47
Queries to remember
SELECT purchase_id, DATE(purchase_date, '7 days')
FROM purchases;
SELECT STRFTIME('%H', purchase_date)
FROM purchases;
SELECT date, (CAST(high AS 'REAL') +
CAST(low as 'REAL')) / 2.0 AS 'average'
FROM weather
;
@thomasthaddeus
thomasthaddeus / streams.sqlite
Created July 25, 2022 18:36
Window Functions in SQL
SELECT
artist,
week,
streams_millions,
streams_millions - LAG(streams_millions, 1, streams_millions) OVER (
PARTITION BY artist
ORDER BY week
) AS 'streams_millions_change',
chart_position,
LAG(chart_position, 1, chart_position) OVER (