Merge branch 'master' of http://git.d-popov.com/popov/scripts
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.aider*
|
33
3d printer/MachineSettings.gc
Normal file
33
3d printer/MachineSettings.gc
Normal file
@ -0,0 +1,33 @@
|
||||
; -- START GCODE --
|
||||
G21 ;metric values
|
||||
G90 ;absolute positioning
|
||||
M82 ;set extruder to absolute mode
|
||||
M107 ;start with the fan off
|
||||
|
||||
;G28 X0 Y0 ;move X/Y to min endstops
|
||||
;G28 Z0 ;move Z to min endstops
|
||||
;G1 Z1 F1000 ;move up slightly
|
||||
;G1 Y60.0 Z0 E9.0 F1000.0;intro line
|
||||
;G1 Y100.0 E21.5 F1000.0 ;continue line
|
||||
;G92 E0 ;zero the extruded length again
|
||||
|
||||
G28 ; Home all axes
|
||||
G29 ; Bed Leveling Touch
|
||||
G1 F80
|
||||
;Put printing message on LCD screen
|
||||
M117 Printing...
|
||||
; -- end of START GCODE --
|
||||
|
||||
|
||||
|
||||
|
||||
; -- END GCODE --
|
||||
M104 S0 ;extruder heater off
|
||||
M140 S0 ;heated bed heater off (if you have it)
|
||||
G91 ;relative positioning
|
||||
G1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure
|
||||
G1 Z+0.5 E-5 X-20 Y-20 F80 ;move Z up a bit and retract filament even more
|
||||
G28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way
|
||||
M84 ;steppers off
|
||||
G90 ;absolute positioning
|
||||
M107 ;turn the fan off; -- end of END GCODE --
|
1
default-backup.code-profile
Normal file
1
default-backup.code-profile
Normal file
File diff suppressed because one or more lines are too long
57
dev/continue-local-copilot.md
Normal file
57
dev/continue-local-copilot.md
Normal file
@ -0,0 +1,57 @@
|
||||
config.json location:
|
||||
win: C:\Users\popov\.continue\config.json
|
||||
linux: ??
|
||||
|
||||
# example:
|
||||
|
||||
"tabAutocompleteModel": {
|
||||
"title": "yi-coder:9b",
|
||||
"provider": "ollama",
|
||||
// "model": "stable-code:code",
|
||||
// "model": "starcoder-3b"
|
||||
"model": "yi-coder:9b",
|
||||
// "apiBase": "https://ollama.d-popov.com"
|
||||
"apiBase": "http://localhost:11434"
|
||||
},
|
||||
"allowAnonymousTelemetry": true,
|
||||
"docs": []
|
||||
,
|
||||
"models": [
|
||||
{
|
||||
"title": "GPT-4 Vision (Free Trial)",
|
||||
"provider": "free-trial",
|
||||
"model": "gpt-4-vision-preview"
|
||||
},
|
||||
{
|
||||
"title": "GPT-3.5-Turbo (Free Trial)",
|
||||
"provider": "free-trial",
|
||||
"model": "gpt-3.5-turbo"
|
||||
},
|
||||
{
|
||||
"title": "Gemini Pro (Free Trial)",
|
||||
"provider": "free-trial",
|
||||
"model": "gemini-pro"
|
||||
},
|
||||
{
|
||||
"title": "Codellama 70b (Free Trial)",
|
||||
"provider": "free-trial",
|
||||
"model": "codellama-70b"
|
||||
},
|
||||
{
|
||||
"title": "Mixtral (Free Trial)",
|
||||
"provider": "free-trial",
|
||||
"model": "mistral-8x7b"
|
||||
},
|
||||
{
|
||||
"title": "Claude 3 Sonnet (Free Trial)",
|
||||
"provider": "free-trial",
|
||||
"model": "claude-3-sonnet-20240229"
|
||||
},
|
||||
{
|
||||
"title": "ollama> yi-coder:9b",
|
||||
"provider": "ollama",
|
||||
"model": "yi-coder:9b",
|
||||
"apiBase": "https://ollama.d-popov.com"
|
||||
}
|
||||
],
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
### install miniconda
|
||||
>apt update
|
||||
>apt wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
|
||||
>wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
|
||||
>bash Miniconda3-latest-Linux-x86_64.sh
|
||||
|
||||
> conda create -n petals python=3.10
|
||||
|
65
portainer-compose-stacks/homeassistant/configuration.yaml
Normal file
65
portainer-compose-stacks/homeassistant/configuration.yaml
Normal file
@ -0,0 +1,65 @@
|
||||
# NOT USED. Check /hassio folder
|
||||
panel_iframe:
|
||||
portainer:
|
||||
title: "Portaiiner"
|
||||
url: "https://docker.d-popov.com//#!/1/docker/containers"
|
||||
icon: mdi:docker
|
||||
require_admin: true
|
||||
|
||||
# Loads default set of integrations. Do not remove.
|
||||
default_config:
|
||||
|
||||
# Load frontend themes from the themes folder
|
||||
frontend:
|
||||
themes: !include_dir_merge_named themes
|
||||
|
||||
# Text to speech
|
||||
tts:
|
||||
- platform: google_translate
|
||||
|
||||
http:
|
||||
use_x_forwarded_for: true
|
||||
trusted_proxies:
|
||||
- 192.168.0.10 # Add the IP address of the proxy server
|
||||
|
||||
#almond:
|
||||
# type: local
|
||||
# host: http://192.168.0.10:3001
|
||||
|
||||
|
||||
automation: !include automations.yaml
|
||||
script: !include scripts.yaml
|
||||
scene: !include scenes.yaml
|
||||
|
||||
|
||||
homeassistant:
|
||||
external_url: "https://home.d-popov.com"
|
||||
packages: !include_dir_named integrations/
|
||||
|
||||
sensor:
|
||||
- platform: command_line
|
||||
name: CPU Temp
|
||||
command: "cat /sys/class/thermal/thermal_zone0/temp"
|
||||
unit_of_measurement: "C"
|
||||
value_template: "{{ value | multiply(0.001) | round(1) }}"
|
||||
|
||||
- platform: command_line
|
||||
name: GPU Temp
|
||||
command: "/opt/vc/bin/vcgencmd measure_temp"
|
||||
unit_of_measurement: "C"
|
||||
value_template: '{{ value | regex_findall_index("=([0-9]*\.[0-9]*)", 0) }}'
|
||||
|
||||
- platform: command_line
|
||||
name: CPU Clock
|
||||
command: "/opt/vc/bin/vcgencmd measure_clock arm"
|
||||
unit_of_measurement: "MHz"
|
||||
value_template: '{{ value | regex_findall_index("=([0-9]*)", 0) | multiply(0.000001) | round(0) }}'
|
||||
|
||||
mqtt:
|
||||
sensor:
|
||||
state_topic: 'Esp/bedroom/temperature'
|
||||
name: 'Bedroom Temperature'
|
||||
unit_of_measurement: 'C'
|
||||
logger:
|
||||
logs:
|
||||
custom_components.extended_openai_conversation: info
|
115
portainer-compose-stacks/homeassistant/home.yml
Normal file
115
portainer-compose-stacks/homeassistant/home.yml
Normal file
@ -0,0 +1,115 @@
|
||||
version: '3.8'
|
||||
services:
|
||||
homeassistant:
|
||||
container_name: homeassistant
|
||||
image: homeassistant/home-assistant:stable
|
||||
volumes:
|
||||
- /mnt/apps/docker_volumes/homeassistant/config:/config
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- /run/dbus:/run/dbus
|
||||
- /dev/bus/usb:/dev/bus/usb
|
||||
- /dev/hci0:/dev/hci0
|
||||
privileged: true # Required for full access to host devices
|
||||
# cap_add:
|
||||
# - NET_ADMIN
|
||||
# - SYS_ADMIN
|
||||
# - SYS_RAWIO
|
||||
# restart: unless-stopped
|
||||
network_mode: host
|
||||
#devices:
|
||||
# - /dev/ttyACM0:/dev/ttyACM0
|
||||
# - /dev/hci0:/dev/hci0
|
||||
dind:
|
||||
deploy:
|
||||
replicas: 0
|
||||
image: docker:dind
|
||||
container_name: docker_in_docker
|
||||
privileged: true
|
||||
environment:
|
||||
- DOCKER_TLS_CERTDIR=/certs
|
||||
volumes:
|
||||
- docker_in_docker_vol:/var/lib/docker
|
||||
#- /mnt/apps/docker_volumes/dind:/var/lib/docker
|
||||
- /mnt/apps/docker_volumes/haos:/mnt/haos
|
||||
- /mnt/apps/DEV/docker-compose/home-infrastructure:/mnt/setup
|
||||
- /mnt/apps/docker_volumes/dind/certs:/certs
|
||||
- /mnt/apps/docker_volumes/dind/etc-docker:/etc/docker
|
||||
#- /sys/fs/cgroup:/sys/fs/cgroup:ro
|
||||
ports:
|
||||
- "2376:2376"
|
||||
- "8122:8123" # hassio HTTP
|
||||
restart: unless-stopped
|
||||
tty: true
|
||||
stdin_open: true
|
||||
homeassistant_old:
|
||||
deploy:
|
||||
replicas: 0
|
||||
container_name: homeassistant
|
||||
image: homeassistant/home-assistant:latest
|
||||
volumes:
|
||||
- /mnt/apps/docker_volumes/homeassistant/:/config
|
||||
environment:
|
||||
- TZ=YOUR_TIMEZONE
|
||||
restart: unless-stopped
|
||||
#network_mode: host
|
||||
ports:
|
||||
- "8123:8123"
|
||||
esphome:
|
||||
container_name: esphome
|
||||
image: esphome/esphome:latest
|
||||
volumes:
|
||||
- /mnt/apps/docker_volumes/esphome/config:/config # Maps the configuration directory to a local folder
|
||||
ports:
|
||||
- "6052:6052" # Optional: for API communication
|
||||
- "6123:6123" # Optional: for OTA updates
|
||||
restart: unless-stopped
|
||||
network_mode: host # Recommended for discovery to work properly
|
||||
wyoming-piper:
|
||||
image: rhasspy/wyoming-piper
|
||||
command: --voice en_US-lessac-medium
|
||||
volumes:
|
||||
- /mnt/apps/docker_volumes/ha/piper:/data
|
||||
ports:
|
||||
- "10200:10200"
|
||||
stdin_open: true
|
||||
tty: true
|
||||
wyoming-whisper:
|
||||
image: rhasspy/wyoming-whisper # tiny-int8 base 1GB, small 2GB RAM {tiny,tiny-int8,base,base-int8,small,small-int8,medium,medium-int8}
|
||||
command: --model small --language en
|
||||
volumes:
|
||||
- /path/to/local/data:/data
|
||||
ports:
|
||||
- "10300:10300"
|
||||
stdin_open: true
|
||||
tty: true
|
||||
wyoming-whisper-bg:
|
||||
image: rhasspy/wyoming-whisper # tiny-int8
|
||||
command: --model small --language bg
|
||||
volumes:
|
||||
- /path/to/local/data:/data
|
||||
ports:
|
||||
- "10301:10300"
|
||||
stdin_open: true
|
||||
tty: true
|
||||
openwakeword:
|
||||
image: dalehumby/openwakeword-rhasspy
|
||||
restart: always
|
||||
ports:
|
||||
- "12202:12202/udp"
|
||||
volumes:
|
||||
- /mnt/apps/docker_volumes/ha/openwakeword-rhasspy/config:/config
|
||||
# openwakeword:
|
||||
# container_name: openwakeword
|
||||
# image: homeassistant/amd64-addon-openwakeword
|
||||
# restart: unless-stopped
|
||||
# volumes:
|
||||
# - /mnt/apps/docker_volumes/ha/openwakeword/models:/data/models
|
||||
# network_mode: host
|
||||
# environment:
|
||||
# - TZ=Your/Timezone
|
||||
# - MODELS_DIR=/data/models
|
||||
# - CUSTOM_MODEL_DIR=/data/models
|
||||
# - THRESHOLD=0.5 # Example threshold value
|
||||
# - TRIGGER_LEVEL=3 # Example trigger level
|
||||
volumes:
|
||||
docker_in_docker_vol:
|
@ -0,0 +1,23 @@
|
||||
use 'homeassistant/home-assistant:stable' container
|
||||
|
||||
# https://community.home-assistant.io/t/addons-for-docker-installation/436190/42
|
||||
# resource: https://community.home-assistant.io/t/problems-installing-ha-supervisor-on-docker/526234/5
|
||||
|
||||
|
||||
enter container shell:
|
||||
docker exec -it homeassistant bash
|
||||
wget -O - https://get.hacs.xyz | bash -
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
custom agent AI
|
||||
https://community.home-assistant.io/t/custom-integration-ollama-conversation-local-ai-agent/636103/7
|
||||
|
||||
|
||||
|
||||
custom functions:
|
||||
https://community.home-assistant.io/t/custom-component-extended-openai-conversation-lets-control-entities-via-chatgpt/636500
|
||||
|
8
windows/.NET/EF.md
Normal file
8
windows/.NET/EF.md
Normal file
@ -0,0 +1,8 @@
|
||||
Update-Database -Script -StartupProjectName "GW.Web" -ProjectName GW.DomainModel
|
||||
|
||||
in VSCode:
|
||||
dotnet tool restore
|
||||
dotnet ef database update --startup-project GW.Web --project GW.DomainModel
|
||||
dotnet ef database update --project "D:\PROJECTS\gatewayserver\GW.DomainModel\GW.DomainModel.csproj" --startup-project "D:\PROJECTS\gatewayserver\GW.Web\GW.Web.csproj" --msbuildprojectextensionspath bin\build_artifacts
|
||||
|
||||
trust certs: dotnet dev-certs https --trust
|
Reference in New Issue
Block a user