Skip to content

Instantly share code, notes, and snippets.

View brennerhaverlock's full-sized avatar
:octocat:

Brenner Haverlock brennerhaverlock

:octocat:
View GitHub Profile
const LoginPage = () => {
const logo = "/assets/images/no-placeholder/logo.png"
return (
<Fragment>
<Head>
<title>Login - [Store Name] </title>
</Head>
# # 1
def factorial(n):
current = 0
if n == 0:
print("0")
else:
for i in range(1, n+1):
current = current * i
songs = ["ROCKSTAR", "Do It", "For The Night"]
print(songs[1])
# will print ROCKSTAR and Do It
print(songs[0:2])
#print "Do it" and "for the night"
print(songs[1:3])
def area(width, height):
result = width * height
return result
result = area(5, 6)
print(result)
print(area(4, 3))
print(area(2, 3))
class ElecScooterRental:
def __init__(self,stock=0):
"""
Our constructor class that instantiates scooter rental shop.
"""
self.stock = stock
def displaystock(self):
int hIndex(int[] citations) {
int len = citations.length;
if (len == 0) {
return 0;
}
if (len == 1) {
if (citations[0] == 0) {
return 0;
import sys
from typing import List, Any, Tuple, Union
class KnightsTravails:
def __init__(self, width, height):
self.w = width
self.h = height
self.board = []

#Sprint 02 - "Student Name"

Part 1 - What's the breakdown of guests’ occupations per year?


What went well:

  • Example: "Great use of crosstab! Excellect use of variables"
<code here=""></code>
@brennerhaverlock
brennerhaverlock / install-tensorflow.sh
Created April 9, 2019 18:05 — forked from erikbern/install-tensorflow.sh
Installing TensorFlow on EC2
# Note – this is not a bash script (some of the steps require reboot)
# I named it .sh just so Github does correct syntax highlighting.
#
# This is also available as an AMI in us-east-1 (virginia): ami-cf5028a5
#
# The CUDA part is mostly based on this excellent blog post:
# http://tleyden.github.io/blog/2014/10/25/cuda-6-dot-5-on-aws-gpu-instance-running-ubuntu-14-dot-04/
# Install various packages
sudo apt-get update
@brennerhaverlock
brennerhaverlock / text_cleaning_nltk.py
Last active August 11, 2022 10:11
clean_your_text_reviews
import pandas as pd
import numpy as np
import tensorflow as tf
import re
from nltk.corpus import stopwords
import time
clean_texts = []
for text in dataset.review:
clean_texts.append(clean_text(text))