This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
subject_prompt = """oue, photo of a oue electric scooter, sleek, smooth curves, colorful, | |
daytime, urban, futuristic cityscape""" | |
subject_negative_prompt = """person, people, human, rider, floating objects, text, | |
words, writing, letters, phrases, trademark, watermark, icon, logo, banner, signature, | |
username, monochrome, cropped, cut-off, patterned background""" | |
refiner_prompt = """ultra-high-definition, photorealistic, 8k uhd, high-quality, | |
ultra sharp detail""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
subject_prompt = """oue, photo of a oue electric scooter in a brightly colored | |
neon-lite city at night, sleek design, smooth curves, colorful, nighttime, | |
urban environment, futuristic cityscape""" | |
subject_negative_prompt = """person, people, human, rider, floating objects, daytime, | |
sunlight, text, words, writing, letters, phrases, trademark, watermark, icon, logo, | |
banner, signature, username, monochrome, cropped, cut-off, patterned background""" | |
refiner_prompt = """ultra-high-definition, photorealistic, 8k uhd, high-quality, | |
ultra sharp detail""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!autotrain dreambooth \ | |
--model ${MODEL_NAME} \ | |
--project-name ${PROJECT_NAME} \ | |
--image-path "${IMAGE_PATH}" \ | |
--prompt "${INSTANCE_PROMPT}" \ | |
--class-prompt "${CLASS_PROMPT}" \ | |
--resolution ${RESOLUTION} \ | |
--batch-size ${BATCH_SIZE} \ | |
--num-steps ${NUM_STEPS} \ | |
--gradient-accumulation ${GRADIENT_ACCUMULATION} \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chpt paras words chrs tokens ratio cost | |
-------------------------------------------------------- | |
1 39 5,547 30,624 7,218 4.24 0.080 | |
2 62 5,305 28,510 6,833 4.17 0.075 | |
3 46 5,571 29,805 7,075 4.21 0.078 | |
4 86 5,703 30,267 7,338 4.12 0.081 | |
5 28 3,390 18,019 4,650 3.88 0.051 | |
6 64 5,299 29,195 7,524 3.88 0.083 | |
7 62 5,424 29,964 7,120 4.21 0.078 | |
8 59 6,044 32,637 7,970 4.09 0.088 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Chapter | Characters | Words | Tokens | Chars/Token | |
---|---|---|---|---|---|
1 | 30624 | 5547 | 7227 | 4.24 | |
2 | 28510 | 5305 | 6842 | 4.17 | |
3 | 29805 | 5571 | 7084 | 4.21 | |
4 | 30267 | 5703 | 7347 | 4.12 | |
5 | 18019 | 3390 | 4659 | 3.87 | |
6 | 29195 | 5299 | 7533 | 3.88 | |
7 | 29964 | 5424 | 7130 | 4.20 | |
8 | 32637 | 6044 | 7979 | 4.09 | |
9 | 30180 | 5709 | 7486 | 4.03 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################################### | |
# Helpful Docker commands and code snippets | |
############################################################################### | |
### CONTAINERS ### | |
docker stop $(docker ps -a -q) #stop ALL containers | |
docker rm -f $(docker ps -a -q) # remove ALL containers | |
docker rm -f $(sudo docker ps --before="container_id_here" -q) # can also filter | |
# exec into container |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd ./pyspark/emr_jars/ | |
wget https://github.com/aws/aws-msk-iam-auth/releases/download/v1.1.1/aws-msk-iam-auth-1.1.1-all.jar | |
wget https://repo1.maven.org/maven2/org/apache/commons/commons-pool2/2.11.1/commons-pool2-2.11.1.jar | |
wget https://repo1.maven.org/maven2/org/apache/kafka/kafka-clients/2.8.1/kafka-clients-2.8.1.jar | |
wget https://repo1.maven.org/maven2/org/apache/spark/spark-avro_2.12/3.1.2/spark-avro_2.12-3.1.2.jar | |
wget https://repo1.maven.org/maven2/org/apache/spark/spark-sql-kafka-0-10_2.12/3.1.2/spark-sql-kafka-0-10_2.12-3.1.2.jar | |
wget https://repo1.maven.org/maven2/org/apache/spark/spark-streaming_2.12/3.1.2/spark-streaming_2.12-3.1.2.jar | |
wget https://repo1.maven.org/maven2/org/apache/spark/spark-tags_2.12/3.1.2/spark-tags_2.12-3.1.2.jar | |
wget https://repo1.maven.org/maven2/org/apache/spark/spark-token-provider-kafka-0-10_2.12/3.1.2/spark-token-provider-kafka-0-10_2.12-3.1.2.jar | |
wget https://repo1.maven.org/maven2/software/amazon/awssdk/bundle/2.17.66/bundle-2.17.66.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
import json | |
import logging | |
import sys | |
from datetime import datetime | |
import paho.mqtt.client as mqtt | |
import psycopg2 | |
# Mosquitto to TimescaleDB Script |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################################### | |
# Helpful Git/GitHub commands and code snippets | |
############################################################################### | |
#### Remove/Squash All History on Master - CAUTION! #### | |
# https://stackoverflow.com/a/26000395/580268 | |
git checkout --orphan latest_branch \ | |
&& git add -A \\ | |
&& git commit -am "Remove/squash all project history" \ | |
&& git branch -D master \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Purpose: Generate US residential address data | |
# Author: Gary A. Stafford and GitHub Copilot | |
# Date: 2023-04-13 | |
# Usage: python3 residential_address_data_gen.py 100 | |
# Command-line argument(s): rec_count (number of records to generate as an integer) | |
# Write an application that create a random list of united states addresses. | |
# The application should accept a command line argument that specifies the number of records to generate. | |
# Include address, city, state, zip code, country, and property type. | |
# Write the data to a csv file named 'address_data.csv'. |