Skip to content

Instantly share code, notes, and snippets.

@jart
jart / rename-pictures.sh
Created December 12, 2023 15:24
Shell script for renaming all images in a folder
#!/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:
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)
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active April 27, 2024 17:47
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@troy
troy / save-redfin-listing-images-bashrc
Created September 10, 2009 13:22
Given a redfin.com house listing URL, save all full-size images
# 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 -
}
@gaieges
gaieges / docker-compose.yml
Created March 8, 2020 16:14
Homeassistant with traefik 2.2 for TLS in docker-compose in network_mode: host
version: '2.1'
services:
homeassistant:
restart: always
image: homeassistant/raspberrypi3-homeassistant
expose:
- 8123
ports:
- "8123:8123"
@bradtraversy
bradtraversy / mysql_cheat_sheet.md
Last active April 27, 2024 17:45
MySQL Cheat Sheet

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

@AruniRC
AruniRC / ms_coco_classnames.txt
Created March 5, 2018 20:37
Class Names of MS-COCO classes in order of Detectron dict
{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',
@flyboy74
flyboy74 / Follower_cv_2.py
Created March 15, 2017 01:18
Line Follow using CV green sign dection
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)
@Jarmos-san
Jarmos-san / main.py
Last active April 27, 2024 17:36
A simple FastAPI project with a health check route
"""Entrypoint to invoke the FastAPI application service with."""
from fastapi import FastAPI, status
from pydantic import BaseModel
import uvicorn
app = FastAPI()
class HealthCheck(BaseModel):
@PurpleVibe32
PurpleVibe32 / vmwk17key-5000keys-unchecked.txt
Created February 21, 2023 19:28
5000k+ vmware workstation pro 17 (untested)
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