Skip to content

Instantly share code, notes, and snippets.

View managedkaos's full-sized avatar
💭
Time for some Actions! :D

Michael managedkaos

💭
Time for some Actions! :D
View GitHub Profile
@managedkaos
managedkaos / jupyter-environment-specs.ipynb
Last active March 12, 2024 01:25
Jupyter-Environment-Specs.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@managedkaos
managedkaos / ubuntu-install-node20.sh
Last active December 14, 2023 01:25
A script to install Nodejs v20 on Ubuntu
apt-get update
apt-get install -y ca-certificates curl gnupg
mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --batch --yes --dearmor -o /etc/apt/keyrings/nodesource.gpg
NODE_MAJOR=20
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" > /etc/apt/sources.list.d/nodesource.list
apt-get update
apt install -y nodejs
@managedkaos
managedkaos / ipython-profile.ipynb
Created June 12, 2023 22:27
Locate iPython profiles using a Jupyter notebook.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@managedkaos
managedkaos / 1-pull-request.png
Last active June 7, 2023 21:35
A GitHub Actions workflow that displays the Terraform plan in the workflow summary...
1-pull-request.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@managedkaos
managedkaos / output.txt
Last active May 30, 2023 19:25
Threaded API calls using Python.
Breed: terrier
Message: https://images.dog.ceo/breeds/terrier-australian/n02096294_1470.jpg
Status: success
HTTP Status Code: 200
------------------------
Breed: FAKE_DOG_1
Message: None
Status: None
HTTP Status Code: 404
------------------------
@managedkaos
managedkaos / input.csv
Last active May 5, 2023 08:52
Reads a CSV of topic words and weights stored in one row across 11 columns. Creates a new CSV with the topics words and scores stored across four rows and seven columns.
We can make this file beautiful and searchable if this error is corrected: It looks like row 8 should actually have 21 columns, instead of 7. in line 7.
Topic,Word 1,Weight 1,Word 2,Weight 2,Word 3,Weight 3,Word 4,Weight 4,Word 5,Weight 5,Word 6,Weight 6,Word 7,Weight 7,Word 8,Weight 8,Word 9,Weight 9,Word 10,Weight 10
1,report,0.7596,adverse,0.0413,submit,0.0409,impact,0.0398,upon,0.0349,follow,0.0341,completion,0.0333,number,0.0082,visually,0.0013,inspect,0.0013
2,injury,0.398,intervention,0.3205,medical,0.279,report,0.0,fda,0.0,doc,0.0,problem,0.0,power,0.0,stick,0.0,via,0.0
3,confirmation,0.4171,could,0.1582,allegation,0.1121,determine,0.0965,probable,0.0957,cause,0.0614,via,0.0476,aberration,0.0038,count,0.0025,high,0.0016
4,fail,0.3576,error,0.3275,transmitter,0.313,occur,0.0004,report,0.0,fda,0.0,via,0.0,recall,0.0,safety,0.0,power,0.0
5,could,0.3327,probable,0.2869,determine,0.2133,cause,0.165,allegation,0.0,confirmation,0.0,report,0.0,inaccuracies,0.0,additionally,0.0,via,0.0
6,could,0.3064,determine,0.2886,cause,0.259,root,0.1422,possible,0.0011,probable,0.0,allegation,0.0,additionally,0.0,via,0.0,doc,0.0
7,report,0.9937,occur,0.0009,transmitter,0.0
@managedkaos
managedkaos / jupyter-environment-specs.ipynb
Created March 23, 2023 16:54
Jupyter-Environment-Specs.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import re
import git
import os
repos = {
'terraform': 'https://github.com/hashicorp/terraform.git',
'aws-cli': 'https://github.com/aws/aws-cli.git',
}
for repo_name, repo_url in repos.items():
@managedkaos
managedkaos / data.json
Last active February 18, 2023 21:12
Simple Golang API
[
{
"guid": "05024756-765e-41a9-89d7-1407436d9a58",
"school": "Iowa State University",
"mascot": "Cy",
"nickname": "Cyclones",
"location": "Ames, IA, USA",
"latlong": "42.026111,-93.648333"
},
]