Skip to content

Instantly share code, notes, and snippets.

@OxiBo
OxiBo / FavoriteRecipesPage.js
Created November 16, 2020 02:20 — forked from chaddjohnson/FavoriteRecipesPage.js
React Pagination Example Using Hooks
import React, { useState } from 'react';
import { useRouter } from 'next/router';
const FavoriteRecipesPage = () => {
const { router } = useRouter();
const [page, setPage] = useState(router.query.page);
const [pageSize, setPageSize] = useState(router.query.pageSize);
@OxiBo
OxiBo / add_cash.html
Created September 26, 2017 22:46
pset7 cs50 week9 CSFinance
{% extends "layout.html" %}
{% block title %}
Add_cash
{% endblock %}
{% block main %}
<form action="{{ url_for('add_cash') }}" method="post">
<fieldset>
<div class="form-group">
@OxiBo
OxiBo / analyzer.py
Created September 8, 2017 03:33
CS50 pset6 Sentiments - Implement a website that generates a pie chart categorizing a user’s tweets.
import nltk
class Analyzer():
"""Implements sentiment analysis."""
def __init__(self, positives, negatives):
"""Initialize Analyzer."""
# load list of positive words in memory
self.positives = set()
@OxiBo
OxiBo / analyzer.py
Last active September 8, 2017 03:28
CS50 pset6 Sentiments
import nltk
class Analyzer():
"""Implements sentiment analysis."""
def __init__(self, positives, negatives):
"""Initialize Analyzer."""
# load list of positive words in memory
self.positives = set()
@OxiBo
OxiBo / Smile.py
Created September 8, 2017 03:24
CS50 pset6 Sentiments/smile
#!/usr/bin/env python3
# a program that categorizes a word as positive or negative
import os
import sys
from analyzer import Analyzer
from termcolor import colored
@OxiBo
OxiBo / Makefile
Created August 6, 2017 16:12
CS50 pset5/speller_implemented with trie
# compiler to use
CC = clang
# flags to pass compiler
CFLAGS = -ggdb3 -O0 -Qunused-arguments -std=c11 -Wall -Werror
# name for executable
EXE = speller
# space-separated list of header files
@OxiBo
OxiBo / Makefile
Created August 6, 2017 16:09
CS50 pset5/speller_implemented with hash table
# compiler to use
CC = clang
# flags to pass compiler
CFLAGS = -ggdb3 -O0 -Qunused-arguments -std=c11 -Wall -Werror
# name for executable
EXE = speller
# space-separated list of header files
@OxiBo
OxiBo / Makefile
Created July 28, 2017 05:05
CS50 pset3 fifteen
fifteen: fifteen.c
clang -ggdb3 -O0 -std=c11 -Wall -Werror -o fifteen fifteen.c -lcs50 -lm
clean:
rm -f *.o a.out core fifteen log.txt
@OxiBo
OxiBo / Makefile
Created July 28, 2017 05:02
CS50 pset3 find - other version
#
# Makefile
# CS50
#
all: find generate
find: find.c helpers.c helpers.h
clang -ggdb3 -O0 -std=c11 -Wall -Werror -o find find.c helpers.c -lcs50 -lm
@OxiBo
OxiBo / Makefile
Created July 28, 2017 04:58
CS50 week3 find
#
# Makefile
# CS50
#
all: find generate
find: find.c helpers.c helpers.h
clang -ggdb3 -O0 -std=c11 -Wall -Werror -o find find.c helpers.c -lcs50 -lm