Skip to content

Instantly share code, notes, and snippets.

View isaackogan's full-sized avatar
:shipit:
Currently exploding

Isaac Kogan isaackogan

:shipit:
Currently exploding
View GitHub Profile
@isaackogan
isaackogan / model.py
Created August 16, 2023 03:32
2023 Undergraduate Conference Model Architecture - UMIATR - 2023 - York University - License to View, NOT use commercially
import os.path
import shutil
from glob import glob
from typing import Optional, List
from keras import Sequential, Model
from keras.callbacks import History, Callback, ModelCheckpoint
from keras.layers import Conv2D, Dropout, MaxPooling2D, Flatten, Dense, BatchNormalization, Activation, Rescaling
from matplotlib import pyplot
import pandas as pd
@isaackogan
isaackogan / PDFNoteGenerator.py
Last active September 13, 2022 00:36
Create Notability note from lecture PDFs
"Moved to https://github.com/isaackogan/LectureNoteGenerator"
@isaackogan
isaackogan / TikTokLiveTempfix.py
Last active July 21, 2022 04:53
Temporary fix to TikTokLive by providing authentication details
from TikTokLive import TikTokLiveClient
from TikTokLive.types.events import ConnectEvent, CommentEvent
sessionid = "SESSION_ID_HERE"
sid_guard = "SID_GUARD_HERE"
client = TikTokLiveClient("@PERSON_YOU_WANT_TO_WATCH", **{
"headers": {
"Cookie": f"sessionid={sessionid}; sid_guard={sid_guard};"
}
@isaackogan
isaackogan / secondsToMilitaryTimestamp.js
Last active March 2, 2022 00:20
Convert seconds into DD:HH:MM:SS format that automatically removes leading values and does not include leading zeroes in the first non-zero value.
function secondsToMilitary(seconds) {
let negative = seconds < 0;
seconds = Math.abs(Math.floor(seconds));
/*
Less than 60 seconds
*/
if (seconds < 60) {
return "00:" + ((seconds > 10) ? seconds.toString() : '0' + seconds)
@isaackogan
isaackogan / React Site Pterodactyl Egg
Last active February 17, 2022 17:50
Serve a react site
{
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
"meta": {
"version": "PTDL_v1",
"update_url": null
},
"exported_at": "2022-02-17T12:45:09-05:00",
"name": "NodeJS Server",
"author": "yajtpg@gmail.com",
"description": "NodeJS Universal Egg.",
@isaackogan
isaackogan / uvicorn-fastapi-egg.json
Created October 11, 2021 01:11
Pterodactyl.io Uvicorn FastAPI Python Egg
{
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
"meta": {
"version": "PTDL_v1",
"update_url": null
},
"exported_at": "2021-10-10T21:10:16-04:00",
"name": "FastAPI (Uvicorn)",
"author": "parker@parkervcp.com",
"description": "A Discord bot written in Python using discord.py\r\n\r\nhttps:\/\/github.com\/Ispira\/pixel-bot",
@isaackogan
isaackogan / milestone.py
Last active August 23, 2021 21:31
[Python] Milestone Caculation
from typing import Optional
def roundup(x: int, tens: int) -> int:
val: int = int("1" + ("0" * tens))
return x if x % val == 0 else x + val - x % val
def halfway(x: int) -> int:
val: int = int("5" + ("0" * (len(str(x)) - 2)))