Skip to content

Instantly share code, notes, and snippets.

View nb-programmer's full-sized avatar
📗
SBCs are the best!

imaprogrammer nb-programmer

📗
SBCs are the best!
  • phAIdelta
View GitHub Profile
.org $8000
.org $ff00
XAML = $24 ; Last "opened" location Low
XAMH = $25 ; Last "opened" location High
STL = $26 ; Store address Low
STH = $27 ; Store address High
L = $28 ; Hex value parsing Low
H = $29 ; Hex value parsing High
YSAV = $2A ; Used to see if hex value is given
@nb-programmer
nb-programmer / hdays.py
Created October 28, 2022 15:42
fbprophet v0.5 holiday package fix. Thanks to https://stackoverflow.com/a/60266469
# -*- coding: utf-8 -*-
# Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
from __future__ import absolute_import, division, print_function
#!/usr/bin/env python
from __future__ import print_function, division
from PIL import Image
from argparse import ArgumentParser
from sys import stderr
from pysstv import color, grayscale
SSTV_MODULES = [color, grayscale]
@nb-programmer
nb-programmer / cv2_car_classifier.py
Created August 11, 2022 15:21
Simple script to show images from a folder, drag a select box to send to an image classifier model
'''
Image classification (primarily used for classifying cars) using OpenCV/DNN module.
Left-click and drag to select region and send image to classifier
Right-click to go to next image in folder
'''
import cv2
import numpy as np
import os
@nb-programmer
nb-programmer / reqcache.py
Created May 8, 2021 07:23
Simple Request caching to file, for python requests module
import pickle
import hashlib
import requests
#Make sure the cache directory exists
class CachedSession(requests.Session):
cache_format = "{cache_dir}/res_{hash}_obj.bin"
cache_dir = "./cache"