Discover gists
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
#!/bin/sh | |
# rename-pictures.sh | |
# Author: Justine Tunney <jtunney@gmail.com> | |
# License: Apache 2.0 | |
# | |
# This shell script can be used to ensure all the images in a folder | |
# have good descriptive filenames that are written in English. It's | |
# based on the Mistral 7b and LLaVA v1.5 models. | |
# | |
# For example, the following command: |
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 pandas as pd | |
import numpy as np | |
def get_dataset(size): | |
# Create Fake Dataset | |
df = pd.DataFrame() | |
df['size'] = np.random.choice(['big','medium','small'], size) | |
df['age'] = np.random.randint(1, 50, size) | |
df['team'] = np.random.choice(['red','blue','yellow','green'], size) | |
df['win'] = np.random.choice(['yes','no'], size) |
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
# usage: redfin-images "http://www.redfin.com/WA/Seattle/123-Home-Row-12345/home/1234567" | |
function redfin-images() { | |
wget -O - $1 | grep "full:" | awk -F \" '{print $4}' | xargs wget - | |
} |
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
version: '2.1' | |
services: | |
homeassistant: | |
restart: always | |
image: homeassistant/raspberrypi3-homeassistant | |
expose: | |
- 8123 | |
ports: | |
- "8123:8123" |
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
{0: u'__background__', | |
1: u'person', | |
2: u'bicycle', | |
3: u'car', | |
4: u'motorcycle', | |
5: u'airplane', | |
6: u'bus', | |
7: u'train', | |
8: u'truck', | |
9: u'boat', |
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
from picamera.array import PiRGBArray | |
from picamera import PiCamera | |
import time | |
import cv2 | |
import numpy as np | |
import RPi.GPIO as GPIO | |
GPIO.setmode(GPIO.BOARD) | |
GPIO.setup(40, GPIO.OUT) | |
GPIO.output(40, GPIO.HIGH) |
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
"""Entrypoint to invoke the FastAPI application service with.""" | |
from fastapi import FastAPI, status | |
from pydantic import BaseModel | |
import uvicorn | |
app = FastAPI() | |
class HealthCheck(BaseModel): |
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
4U612-DN31H-MJEJ0-0V0Z4-978HD | |
5G44H-ACH50-0J4C9-1VC5P-CY0QD | |
JC000-8G047-MJDF1-0H3E6-8QR5F | |
JV2NU-0XL5N-0J4Q8-0T0E6-8GH56 | |
JZ6E0-4R1E0-HJ1Q0-1R8NH-3AK28 | |
0Z48K-4X29Q-MJE80-113GK-C7K3A | |
HF4H0-46K80-MJ8D9-1KAZP-CKK12 | |
NY69H-2N05P-HJ170-1V1ZM-CG222 | |
4C45A-D8J0H-HJ5T0-1T25H-92A76 | |
0Z4H2-0WK9K-4JE10-0T9G6-9C8M4 |
NewerOlder