{"id":22832528,"url":"https://github.com/powercommands/power-ml","last_synced_at":"2025-09-10T23:34:53.077Z","repository":{"id":116340706,"uuid":"591954531","full_name":"PowerCommands/power-ML","owner":"PowerCommands","description":"PowerCommands using machine learning in some way","archived":false,"fork":false,"pushed_at":"2023-01-24T19:58:52.000Z","size":312,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-31T02:18:53.276Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PowerCommands.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-22T13:25:06.000Z","updated_at":"2023-01-22T14:26:04.000Z","dependencies_parsed_at":"2023-03-13T12:58:18.395Z","dependency_job_id":null,"html_url":"https://github.com/PowerCommands/power-ML","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PowerCommands/power-ML","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PowerCommands%2Fpower-ML","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PowerCommands%2Fpower-ML/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PowerCommands%2Fpower-ML/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PowerCommands%2Fpower-ML/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PowerCommands","download_url":"https://codeload.github.com/PowerCommands/power-ML/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PowerCommands%2Fpower-ML/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263426207,"owners_count":23464793,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-12T21:07:51.756Z","updated_at":"2025-07-04T00:33:54.373Z","avatar_url":"https://github.com/PowerCommands.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# power-ML\n\n\nPowerCommands using machine learning in some way, every lab I do to learn more will be one or more PowerCommands that I add the Visual Studio project located in the **src** directory.\n\n## ComputerVision\nMy first lab is to try out the Microsoft Azure CognitiveService **ComputerVision** using machine learning photo recognition to categorize photos.\n\n### Before you start\nYou need an Azure account, you need to add a new Cognitive Service of the type Computer Vision here:\n\nhttps://portal.azure.com/#view/Microsoft_Azure_ProjectOxford/CognitiveServicesHub/~/overview\n\nSetup two environment variables for the endpoint and the key, look in the **PowerCommandsConfiguration.yaml** file and there you se the details.\n\n```\nenvironment:\n    variables:\n    - name: powercommands-computer-vision-endpoint\n      environmentVariableTarget: User\n    - name: powercommands-computer-vision\n      environmentVariableTarget: User\n```\n### Computer vision command\nSo the first PowerCommand I added is the ```computervision``` command (**ComputerVisionCommand.cs**), just run it and of course check out the [code](/src/).\n\n```\ncomputervision\n```\n\n![Alt text](docs/images/computervision.png?raw=true \"ai query\")\n\nRead more about it here: https://learn.microsoft.com/en-us/azure/cognitive-services/computer-vision/quickstarts-sdk/image-analysis-client-library?tabs=visual-studio%2C3-2\u0026pivots=programming-language-csharp\n\n## AIaC Artificial Intelligence Infrastructure-as-Code\n### Before you start\nYou need an Open AI API account witch is free (for the moment), you can register an account here: \n\nhttps://openai.com/\n\nYou also need Docker Desktop or likewise that can run Docker container images.\n\nSetup one environment variables for Open AI key with the name **aiac**,  and apply this to the **PowerCommandsConfiguration.yaml** file. \n```\nenvironment:\n    variables:\n    - name: aiac\n      environmentVariableTarget: User\n```\nI named this command simply ```ai``` and it is spinning up a Docker container created by Firefly, this container hosing a services that using Open AI to answer your instructions.\n\nFirst run this command to start Docker Desktop and pull the image.\n```\nai ----pull-image\n```\nThis should display something like this.\n```\nDocker Desktop started\n docker Docker Desktop needs to pull image ghcr.io/gofireflyio/aiac\nerror during connect: This error may indicate that the docker daemon is not running.: Post \"http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/images/create?fromImage=ghcr.io%2Fgofireflyio%2Faiac\u0026tag=latest\": open //./pipe/docker_engine: The system cannot find the file specified.\nUsing default tag: latest\nDocker Desktop needs to spin up the image, waiting a 1 seconds, before executing your query ...\n```\nNow you are ready to run your query, please not that this AIaC service created by Firefly is a service that is concentrated to help DevOps and handling query's regarding infrastructure as code mainly. (I have not try to ask about great movies in Denmark, maybe it works), to run a query just run command like this:\n```\nai \"get kubernetes deployment and service manifest for keycloak\"\n```\n![Alt text](docs/images/ai_query.png?raw=true \"ai query\")\n\n\nRead more about that here: https://aiac.dev/\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpowercommands%2Fpower-ml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpowercommands%2Fpower-ml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpowercommands%2Fpower-ml/lists"}