Skip to content

Instantly share code, notes, and snippets.

View ptenteromano's full-sized avatar

Phil Tenteromano ptenteromano

View GitHub Profile
// Program for heap sort in ascending order
// 6/10/2019
// Binary heap sort algorithm
// Min heap, ascending sort
class HeapSort {
// Accepts an Array, Unsorted (or sorted - ezpz)
constructor(arr) {
this.heap = [...arr];
@ptenteromano
ptenteromano / player.js
Last active March 16, 2022 19:43
Card game "War" using OOP
class Player {
constructor(deck) {
this.deck = deck;
this.winningPile = [];
}
playCard() {
return this.deck.pop();
}
@ptenteromano
ptenteromano / lstm_stock_analysis.ipynb
Created March 16, 2022 01:29
LSTM Stock Analysis
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ptenteromano
ptenteromano / photos.tsx
Last active March 28, 2024 10:42
Infinite Scroll with Remix Run
/*
* Infinite Scroll using Remix Run
* Based on client-side Scroll position
* Full Article here: https://dev.to/ptenteromano/infinite-scroll-with-remix-run-1g7
*/
import { useEffect, useState, useCallback } from "react";
import { LoaderFunction, useLoaderData, useFetcher } from "remix";
import { fetchPhotos } from "~/utils/api/restful";
import type { PhotoHash } from "~/utils/api/types";