Skip to content

Instantly share code, notes, and snippets.

View zeronyk's full-sized avatar

Michael Hermel zeronyk

  • Germany
View GitHub Profile
@zeronyk
zeronyk / gist:7dc3c7bd69a5f81c433fbde98bcb43cd
Created October 16, 2023 14:45
ChatGPT-4V easy script for automated visual description
# Start chromium with chromium --remote-debugging-port=9230
# Login on your chromium to chatgpt and navigate to gpt4 (with visual feature)
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.options import Options
import time
# Set up the webdriver with options
options = Options()
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDTva+Gy42pbtny7wCT+q9xZsEVPNha1VWBg2VWV8kYC+n1u7UyG34DhMSCzZkhJPfWPb1Sr5hxakIXngc5tYmMEIv01F2y7v7SHQVUtGSY15Khz5mC0tBaVb1BZK+uBG9ECKNyN9X541rz0bZxZiJqhnoK76Wtg4S7kHR/Xtmipf4yuF9rZ+eHhz5u9fSo7viRLkHBSYVrzOsLdEj7/x3S8AlzNAtMWb3z+RrXoz2XZzH4hs4IzqvS8G+v1vXaoAKB7KyxeUCLH4YqJuzMmxhRDlo7l1rKx1ucpXUXLD5wnT4ze7JdZMUe48mV6WpcrtQ/3Z79CjqxSJ68hIjcSxVQYyQDHLL4OeL2jjvF9nsuzbT+7dCTCnGG8fnw85q4ArrGKA6ZHlGBH2BjVhjOuusmUwKHRuBEoAHTa5SgUt6D0XIIjJMLee0En0zZl7N7ZbLsINON4HXnY/gqO+/4snbdVzm71ULsPLOmZY5sODyxgJgpxzLPH/5Eq6lOpYtr6ks= hermel
@zeronyk
zeronyk / Clockwise_indexing.cs
Last active November 16, 2020 11:48
This function will create the clockwise indexing for Moor Neighbourhood.
// clockwise gernation is distance max -> ascending -> distance min -> descendig
// if you want to understand this method, write down x and y coordinates (on top of each other, y = shifted) of a clockwise Moor Neighbour rotation
/*
* if you want to search in a Moor neighbourhood (surrounding 8 pixels of a pixel) you might need to get a clockwise rotation.
* I was searching for a generalized method to generate clockwise rotated indexing for
*range 1 (x = [0,1,1,1,0,-1-1-1], y =[1,1,0,-1,-1,-1,0,1])
*range 2 (x = { 2, -1, 0, 1, -2, -2, -2, -2, -2, 1, 0, -1, 2, 2, 2, 2 }, y = { 2, 2, 2, 2, 2, -1, 0, 1, -2, -2, -2, -2, -2, 1, 0, -1 })
*range 3 (x = { 3, 3, 3, 3, 3, 3, 3, -2, -1, 0, 1, 2, -3, -3, -3, -3, -3, -3, -3, 2, 1, 0, -1, -2 }, y = { 3, -2, -1, 0, 1, 2, -3, -3, -3, -3, -3, -3, -3, 2, 1, 0, -1, -2, 3, 3, 3, 3, 3, 3 })
* HOW to use,
* the clockwise rotated sequence of x will be returned if shifted = false