Skip to content

Instantly share code, notes, and snippets.

View cheeseonamonkey's full-sized avatar
😅
Sweating, and smiling

Alexander H cheeseonamonkey

😅
Sweating, and smiling
View GitHub Profile
@cheeseonamonkey
cheeseonamonkey / chesscomapi.js
Created May 20, 2024 20:09 — forked from replete/chesscomapi.js
get game data from chess.com API
//https://api.chess.com/pub/player/{username}/games/2023/02
(async function main () {
async function getChessGamesForMonth(username, year, month) {
const res = await fetch(`https://api.chess.com/pub/player/${username}/games/${year}/${month}`);
if (res.ok) {
const data = await res.json();
return data.games
} else {
console.error('Problem loading chess.com games from API', res);

Most Important Azure Services

Service Description Example
Azure Compute Virtual Machines, Virtual Machine Scale Sets, Azure Kubernetes Service Azure VMs hosting web applications
Azure Storage Blob Storage, File Storage, Queue Storage, Table Storage Storing user files in Azure Blob Storage
Azure Networking Virtual Network, Load Balancer, Application Gateway, VPN Gateway Creating a secure network for an application
Azure Databases Azure SQL Database, Cosmos DB, Azure Database for MySQL/PostgreSQL Storing customer data in Azure SQL Database
Azure Identity Azure Active Directory, Azure AD B2C, Azure AD B2B Managing user identities for an application
Azure AI Azure Machine Learning, Azure Cognitive Services, Azure Bot Services Integrating chatbots into a website using Azure Bot Services
Azure D
@cheeseonamonkey
cheeseonamonkey / GithubReadmeTemplate.md
Created May 5, 2024 00:16
github readme template (source: /othneildrew/Best-README-Template/)

@cheeseonamonkey
cheeseonamonkey / downloadWikiDumps.js
Created April 27, 2024 02:07
Wikipedia dumps download script
/*
npm install axios cheerio fs-extra
*/
// Import the necessary libraries
const axios = require('axios');
const cheerio = require('cheerio');
const fs = require('fs-extra');
const path = require('path');

usage:

ui:

image

shell:

    py wiki_to_text.py '/hdd/Downloads/simplewiki-20240120-pages-meta-current.xml.bz2' `pwd`/output/
@cheeseonamonkey
cheeseonamonkey / scalers.py
Last active March 6, 2024 00:03
python scalers and transforms cheatsheet
import numpy as np
import matplotlib.pyplot as plt
from sklearn.preprocessing import StandardScaler, MinMaxScaler, RobustScaler, MaxAbsScaler, Normalizer
# Generate demonstration data ensuring positivity
better_datasets = [
np.random.rand(100, 2) * 20 + 10,
np.random.rand(100, 2) * 100,
np.random.beta(100, 2, size=(100, 2)),
np.random.f(100, 2, size=(100, 2)),
@cheeseonamonkey
cheeseonamonkey / Float32_Base64_Encoding_Decoding.js
Created December 23, 2023 08:51 — forked from sketchpunk/Float32_Base64_Encoding_Decoding.js
Encode Float32Array to base64 , then decode it back
let verts = new Float32Array( [ 0, 2, 0, -1, 0.2, 0, 1, 0.2, 0 ] );
let v = base64_test( verts );
function base64_test( fary ){
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// ENCODING TEST
console.log("Origin Data", fary );
let uint = new Uint8Array( fary.buffer );
console.log( "Convert F32 to Uint8 : Byte Length Test", fary.length * 4, uint.length );
@cheeseonamonkey
cheeseonamonkey / power_cycle_usb.zsh
Last active November 10, 2023 00:20
power_cycle_usb devices programatically (unplug, wait a short moment, then plug it back in; originally for use troubleshooting mobile tethering)
power_cycle_usb() {
# Check if no arguments are passed
if [[ $# -eq 0 ]]; then
power_cycle_usb -h;
return;
fi;
# Define local variables
local quiet=false verbose=false help=false sleep_time=0.5 wait_finish=true choice=false device
local RED='\033[0;31m' GREEN='\033[0;32m' YELLOW='\033[0;33m' BLUE='\033[0;34m' NC='\033[0m'
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>File Upload and Regex Matcher</title>
<!-- Include jQuery for simplicity -->
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<!-- Include FileSaver.js CDN for saving results -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/FileSaver.js/2.0.5/FileSaver.min.js"></script>
Font Name Description Common Uses Vibes
Lato A modern, clear font with strong structure Web design, print, corporate identity Professional, clean
Martel Sans A versatile, easy-to-read font Digital media, advertising, logos Friendly, approachable
Nunito Sans A light, rounded font User interfaces, mobile apps, children's books Soft, playful
Quicksand A geometric, light font Posters, logos, print media Modern, minimalist
Rubik A bold, cube-like font Headings, logos, signage Strong, impactful
Varela Round A rounded, sans-serif font Web design, mobile apps, logos Casual, friendly
Open Sans A humanist sans-serif font Web and print design, mobile apps Neutral, simple
Roboto A mechanical sans-serif font User interfaces, mobile apps, web design Modern, geometric