Skip to content

Instantly share code, notes, and snippets.

@mlconnor
mlconnor / stablediffusion_on_ec2.yaml
Last active December 14, 2023 02:07
Cloudformation Template for Stable Diffusion
# aws cloudformation create-stack --stack-name sd-webui-stack --template-body file://vpc-sf.yaml --parameters ParameterKey=KeyPair,ParameterValue=StableDiffusion
# ssh -i StableDiffusion.pem ubuntu@ip
# https://towardsdatascience.com/create-your-own-stable-diffusion-ui-on-aws-in-minutes-35480dfcde6a
# ssh -N -L 7860:127.0.0.1:7860 ubuntu@IP_ADDR
# cd /home/ubuntu/stable-diffusion-webui && nohup /home/ubuntu/stable-diffusion-webui/webui.sh --listen --theme dark --enable-insecure-extension-access --gradio-auth UNAME:PWD &
# systemctl - https://github.com/AUTOMATIC1111/stable-diffusion-webui/discussions/6049
# sdxl - a1111 https://github.com/FurkanGozukara/Stable-Diffusion/blob/main/Tutorials/How-To-Use-Stable-Diffusion-SDXL-Locally-And-Also-In-Google-Colab.md
AWSTemplateFormatVersion: "2010-09-09"
Description: StableDiffusion server
Parameters:
@mlconnor
mlconnor / flan-t5-xxl-sharded-fp16.ipynb
Last active February 27, 2023 19:17
This is a Python Jupyter notebook built for Amazon SageMaker notebooks. To launch, go to AWS Console | SageMaker | Notebooks | Create Notebook Instance (ml.g5.2xlarge, config volume size - 500G) | Open Jupyter Lab | Upload. Based on https://www.philschmid.de/fine-tune-flan-t5
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
We can't make this file beautiful and searchable because it's too large.
CensusId,State,County,TotalPop,Men,Women,Hispanic,White,Black,Native,Asian,Pacific,Citizen,Income,IncomeErr,IncomePerCap,IncomePerCapErr,Poverty,ChildPoverty,Professional,Service,Office,Construction,Production,Drive,Carpool,Transit,Walk,OtherTransp,WorkAtHome,MeanCommute,Employed,PrivateWork,PublicWork,SelfEmployed,FamilyWork,Unemployment
1001,Alabama,Autauga,55221,26745,28476,2.6,75.8,18.5,0.4,1.0,0.0,40725,51281.0,2391.0,24974,1080,12.9,18.6,33.2,17.0,24.2,8.6,17.1,87.5,8.8,0.1,0.5,1.3,1.8,26.5,23986,73.6,20.9,5.5,0.0,7.6
1003,Alabama,Baldwin,195121,95314,99807,4.5,83.1,9.5,0.6,0.7,0.0,147695,50254.0,1263.0,27317,711,13.4,19.2,33.1,17.7,27.1,10.8,11.2,84.7,8.8,0.1,1.0,1.4,3.9,26.4,85953,81.5,12.3,5.8,0.4,7.5
1005,Alabama,Barbour,26932,14497,12435,4.6,46.2,46.7,0.2,0.4,0.0,20714,32964.0,2973.0,16824,798,26.7,45.3,26.8,16.1,23.1,10.8,23.1,83.8,10.9,0.4,1.8,1.5,1.6,24.1,8597,71.8,20.8,7.3,0.1,17.6
1007,Alabama,Bibb,22604,12073,10531,2.2,74.5,21.4,0.4,0.1,0.0,17495,38678.0,3995.0,18431,1618,16.8,27.9,21.5,17.9,
@mlconnor
mlconnor / Amazon_Connect_Pricing.csv
Last active September 30, 2021 14:48
A CSV version of the Amazon Connect pricing as of 9/30/2021
Country Claimed Number Per Day USD Claimed Number Per Day Toll Free USD Per Minute Inbound Inward Dial (DID) USD Per Minute Inbound Toll Free USD region
Argentina 0.50 0.50 0.01 0.19 us-east
Argentina 0.50 0.50 0.01 0.19 canada
Argentina 0.50 0.50 0.01 0.19 us-west
Australia 0.10 0.39 0.01 0.05 apac-singapore
Australia 0.10 0.39 0.01 0.05 apac-tokyo
Australia 0.10 0.39 0.01 0.05 eu-frankfurt
Austria 0.10 0.42 0.01 0.04 us-east
Austria 0.10 0.42 0.01 0.04 canada
Austria 0.10 0.42 0.01 0.04 apac-sydney
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; Opinion Lexicon: Negative
;
; This file contains a list of NEGATIVE opinion words (or sentiment words).
;
; This file and the papers can all be downloaded from
; http://www.cs.uic.edu/~liub/FBS/sentiment-analysis.html
;
; If you use this list, please cite one of the following two papers:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; Opinion Lexicon: Positive
;
; This file contains a list of POSITIVE opinion words (or sentiment words).
;
; This file and the papers can all be downloaded from
; http://www.cs.uic.edu/~liub/FBS/sentiment-analysis.html
;
; If you use this list, please cite one of the following two papers:
@mlconnor
mlconnor / connectivity.sh
Last active March 16, 2017 21:36
Diagnose Connectivity
#set -o xtrace
echo "please copy the output of this script and send it to the network team so they can diagnose your issue"
# DESTINATION=destination.foo.com
# PORT=8089
if [ -z ${DESTINATION} ]
then
echo "Enter Server Name and press [ENTER]: "
read DESTINATION
@mlconnor
mlconnor / node_sync.js
Created October 18, 2016 17:10
Finally, a way to do node.js synchronously
'use strict';
var fs = require('fs');
var co = require('co');
var Promise = require('bluebird');
var readFile = Promise.promisify(require("fs").readFile);
function* doAsyncStuff() {
var file1 = yield readFile('testx.txt',{encoding:'utf8'});
return file1;
@mlconnor
mlconnor / move_sayings.txt
Last active May 6, 2016 14:01
Sayings for data center moves
Lift and Shift
Rip and Run
Lie and Die (sunset the app)
Choke and Croak
Sneak and Tweak
Snatch and Patch
Send and Mend
Flip and Ship
Lug and Debug
@mlconnor
mlconnor / app.coffee
Last active November 19, 2015 22:49
Socket.io complete example in a single coffee file.
express = require('express')
app = express()
server = require('http').createServer(app)
io = require('socket.io')(server)
app.use express.static(__dirname + '/public')
server.listen 3000
io.on 'connection', (socket)->