Skip to content

Instantly share code, notes, and snippets.

resized = resize("checkers.jpg", 50)
print(resized.shape)
plt.imshow(resized) # can use cv2.imshow("name", image)
from dataclasses import dataclass
@dataclass
class Pixel:
red: int
green: int
blue: int
# alpha: float = 1
pixel = Pixel(255,0,0)
from __future__ import annotations
from dataclasses import dataclass, astuple
from itertools import cycle
from typing import List
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@NicholasBallard
NicholasBallard / asyncio.py
Created December 27, 2019 23:36
mod of asyncio.py for Win10 Python 3.8.X (so Jupyter web apps works)
# Modify [...]lib\site-packages\tornado\platform\asyncio.py on Windows with 3.8.x so asyncio works with Tornado
# Nick note 12/27/2019: still needed to check for sys.platform == 'win32' with 3.8.1 upgrade
"""Bridges between the `asyncio` module and Tornado IOLoop.
.. versionadded:: 3.2
This module integrates Tornado with the ``asyncio`` module introduced
in Python 3.4. This makes it possible to combine the two libraries on
the same event loop.
@NicholasBallard
NicholasBallard / gitonremote.md
Last active November 1, 2019 03:06
Using Git for to Move Code to a Remote Server

Running Code on a Remote Server

Nicholas Ballard

Cha... Charmander?



Hope you enjoyed the gif. We are going to be working with remote servers. Fun is officially cancelled.

Crontab is Beautiful

Nicholas Ballard


AWS Lambda. Azure Functions. Firebase Functions. Cloud Run. Serverless. Docker. Kubernetes. Hakuna Matata.

We're swimming in a world of great hosted options for scheduling and automating our software programs.

choco install --confirm audacity autohotkey.install awscli azure-cli chromedriver colortool conemu dart-sdk docker-desktop everything ffmpeg filezilla firacode firefox git googlechrome jq jre8 microsoft-windows-terminal mysql mysql.workbench nodejs nvm pgadmin4 postgresql postman pritunl-client python quicklook sgt-puzzles steam tor-browser treesizefree vim virtualbox vlc vscode wget youtube-dl zeal.portable typora
<#
chocopkgs.ps1
Install packages listed in variable $packages on a Windows machine in Powershell (Administrator)
#>
$packages = @"
audacity
autohotkey.install
awscli