Skip to content

Instantly share code, notes, and snippets.

View beaucarnes's full-sized avatar
💭
Follow me on Twitter: @beaucarnes

Beau Carnes beaucarnes

💭
Follow me on Twitter: @beaucarnes
View GitHub Profile
import random
class Card:
def __init__(self, suit, rank):
self.suit = suit
self.rank = rank
def __str__(self):
return f"{self.rank['rank']} of {self.suit}"
1. [HTML+CSS] Responsive Web Design
⭐️ PRACTICE PROJECTS ⭐️
- Learn Basic HTML by Building a Cat Photo App
- Learn Basic CSS by Building a Blog
- Learn Intermediate CSS by Building a Picasso Painting
- Learn the CSS Box Model by Building a Rothko Painting
- Learn CSS Variables by Building a City Skyline
- Learn CSS Animations by Building a Ferris Wheel
- Learn Typography by Building a Nutrition Label
- Learn Accessibility by Building a User Feedback Survey
1. [HTML+CSS] Responsive Web Design
⭐️ PRACTICE PROJECTS ⭐️
- Learn Basic HTML by Building a Cat Photo App
- Learn Basic CSS by Building a Blog
- Learn Intermediate CSS by Building a Picasso Painting
- Learn the CSS Box Model by Building a Rothko Painting
- Learn CSS Variables by Building a City Skyline
- Learn CSS Animations by Building a Ferris Wheel
- Learn Typography by Building a Nutrition Label
- Learn Accessibility by Building a User Feedback Survey
import random
class Card:
def __init__(self, suit, rank):
self.suit = suit
self.rank = rank
def __str__(self):
return f"{self.rank['rank']} of {self.suit}"
import sqlite3
class ContactDatabase(object):
def __init__(self, filename="example-contactbook.db"):
self.dbfilename = filename
db = sqlite3.connect(self.dbfilename)
c = db.cursor()
c.execute(
"CREATE TABLE IF NOT EXISTS contacts\
( name TEXT PRIMARY KEY, \

Certification Project: Mean-Variance-Standard Deviation Calculator

Create a function named mean_var_std() that uses Numpy to output the mean, variance, and standard deviation of a 3 x 3 matrix. The input of the function should be a list containing 9 digits. The function should convert the list into a 3 x 3 Numpy array, and then print the mean, variance, and standard deviation along both axis and for the flattened matrix.

For example: mean_var_std([0,1,2,3,4,5,6,7,8])

Demographic Data Analyzer

In this challenge you must anaylize demographic data using Pandas. You are given a dataset of demographic data. Here is a sample of what the data looks like:

   age         workclass  fnlwgt  education  education-num      marital-status  ...     sex capital-gain capital-loss hours-per-week  native-country  salary
0   39         State-gov   77516  Bachelors             13       Never-married  ...    Male         2174            0             40   United-States   <=50K
1   50  Self-emp-not-inc   83311  Bachelors             13  Married-civ-spouse  ...    Male            0            0             13   United-States   <=50K
2   38           Private  215646    HS-grad              9            Divorced  ...    Male            0            0             40   United-States   <=50K
class Category:
def __init__(self, name):
self.name = name
self.ledger = []
def withdraw(self, amount, description = ""):
self.ledger.append({"amount": -amount, "description": description})
def deposit(self, amount, description = ""):
self.ledger.append({"amount": amount, "description": description})
@beaucarnes
beaucarnes / keep_alive.py
Created December 10, 2020 15:42
Python Server for Discord Bot
from flask import Flask
from threading import Thread
app = Flask('')
@app.route('/')
def home():
return "Hello. I am alive!"
def run():