Skip to content

Instantly share code, notes, and snippets.

- Always look for existing code to iterate on instead of creating new code.
- Do not change drastically the patterns before trying to iterate on existing patterns.
- Always prefer simple solutions.
- Avoid duplication of code and always check for other areas of the codebase that might already have similiar code and functionality.
- Write code that takes into account different environments: dev, test and prod.
- You are careful to only make changes that are requested or you are confident are well understood and related to the change being requested.
- When fixing an issue or bug, do not introduce a new pattern or technology without first exhausting all options for the existing implementation. Before you decide to change technology - ask the user about that first.
- Keep the codebase clean and organized.
- Avoid having files over 300 lines of code. For logic files refactor at that point.
- Never mock data for dev or prod envs. Mocking is allowed only in test environment.
{"last_node_id":66,"last_link_id":114,"nodes":[{"id":39,"type":"VAELoader","pos":[-9.999995231628418,313.7315368652344],"size":[306.36004638671875,58],"flags":{},"order":0,"mode":0,"inputs":[],"outputs":[{"name":"VAE","localized_name":"VAE","type":"VAE","links":[76,99],"slot_index":0}],"properties":{"cnr_id":"comfy-core","ver":"0.3.15","Node name for S&R":"VAELoader"},"widgets_values":["wan_2.1_vae.safetensors"],"color":"#322","bgcolor":"#533"},{"id":49,"type":"CLIPVisionLoader","pos":[-9.999995231628418,413.6364440917969],"size":[315,58],"flags":{},"order":1,"mode":0,"inputs":[],"outputs":[{"name":"CLIP_VISION","localized_name":"CLIP_VISION","type":"CLIP_VISION","links":[94],"slot_index":0}],"properties":{"cnr_id":"comfy-core","ver":"0.3.15","Node name for S&R":"CLIPVisionLoader"},"widgets_values":["clip_vision_h.safetensors"],"color":"#2a363b","bgcolor":"#3f5159"},{"id":51,"type":"CLIPVisionEncode","pos":[415,614.5447998046875],"size":[253.60000610351562,78],"flags":{},"order":13,"mode":0,"inputs":[{"name":

Instrukcja uruchomienia implementacji "computer use" od Anthropic na Ubuntu


1. Zainstaluj niezbędne narzędzia

Upewnij się, że masz najnowsze aktualizacje i zainstaluj niezbędne pakiety: git, python3-pip i docker.io.

sudo apt update
sudo apt install -y git python3-pip python3.12-venv docker.io curl
You are a helpful AI assistant. Solve tasks using your coding and language skills. In the following cases, suggest python code (in a python coding block) or shell script (in a sh coding block) for the user to execute.
1. When you need to collect info, use the code to output the info you need, for example, browse or search the web, download/read a file, print the content of a webpage or a file, get the current date/time, check the operating system. After sufficient info is printed and the task is ready to be solved based on your language skill, you can solve the task by yourself.
2. When you need to perform some task with code, use the code to perform the task and output the result. Finish the task smartly.
3. Solve the task step by step if you need to. If a plan is not provided, explain your plan first. Be clear which step uses code, and which step uses your language skill.
4. When using code, you must indicate the script type in the code block.
5. The user cannot provide any other feedback or perform an
conda create -n ag python=3.11
conda activate ag
pip install autogenstudio
autogenstudio ui --port 8081
#!/bin/sh
conda activate ag
autogenstudio ui --port 8081
@k-nowicki
k-nowicki / AutoGenRun.bat
Created October 14, 2024 15:28
Autogen - skrypt uruchamiający Windows
call activate ag
autogenstudio ui --port 8081
@k-nowicki
k-nowicki / google_search.py
Created October 14, 2024 14:32
AutogenStudion Skill for google search
# Autogen skill
# Name: google_search
# Description: Returns num of search results for query
from googlesearch import search
def google_search(query, num=5):
"""
Function to get google search resluts for query.
@k-nowicki
k-nowicki / Korad_KA_series_driver.rb
Created April 13, 2013 17:20
Ruby implementation of KORAD KA series power supplies communication protocol. Verified on KA3005P only, but should work also with all supplies of series, including multichannel ones.
require 'rubygems'
require 'serialport'
class Korad
def initialize(port="/dev/ttyACM0", baud=9600)
@serial = SerialPort::open(port,baud)
@serial.read_timeout = 100
end
def get_status
@k-nowicki
k-nowicki / lex_killer.rb
Created June 15, 2012 20:00
Linux Lexmark demon killer
#!/usr/bin/env ruby
#puts 'Linux Lexmark demon killer by knowicki'
loop do
ps = `ps aux`.scan(/^\S*\s+.*demond.*lexm.*$/)[0]
if ps
pid = ps.split(' ')[1]
`kill #{pid}`
end
sleep 30
end