Skip to content

Instantly share code, notes, and snippets.

View potatoqualitee's full-sized avatar
big permz energy

Chrissy LeMaire potatoqualitee

big permz energy
View GitHub Profile
@potatoqualitee
potatoqualitee / Microsoft.Data.SqlClient.md
Created July 13, 2025 21:52 — forked from MartinHBA/Microsoft.Data.SqlClient.md
Microsoft.Data.SqlClient with PowerShell

Microsoft.Data.SqlClient with PowerShell

This is step by step guide how to use new .NET namespace Microsoft.Data.SqlClient with Powershell. I've tested connection string using SQL login and Windows login. This could not fit you all but might provide you some ideas.

Scenario

Fresh Windows Server 2016 in my case Azure VM.

  1. Install .NET CORE 3.0 SDK it must be SDK
@potatoqualitee
potatoqualitee / grpo_demo.py
Created February 3, 2025 20:03 — forked from willccbb/grpo_demo.py
GRPO Llama-1B
# train_grpo.py
import re
import torch
from datasets import load_dataset, Dataset
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import LoraConfig
from trl import GRPOConfig, GRPOTrainer
# Load and prep dataset
@potatoqualitee
potatoqualitee / new-development.json
Last active January 29, 2025 13:33
new-development.json
{
"New Developments": {
"keywords": {
"indicted party boss": {
"description": "Current trending topic",
"weight": 3,
"timestamp": "2025-01-29T00:05:14.7211272+00:00"
},
"urgent health care": {
"description": "Current trending topic",
@potatoqualitee
potatoqualitee / so.ps1
Last active August 22, 2024 10:15
Structured Objects in PowerShell using PSOpenAI
############# Install PSOpenAI and set your API key #############
Install-Module PSOpenAI
Import-Module PSOpenAI # only when it's first installed
$env:OPENAI_API_KEY = 'sk-xxxxxxxxxxxxxxxxxxxxxx'
############# Here's some markdown that'd be extracted from a PDF, however you want #############
$markdown = "# Dog Shot Record
2309 Kelley Road, Gulfport, MS, 39501
**CLINIC NAME**
Phone: 123-1234567 - Email: [email protected]
@potatoqualitee
potatoqualitee / structured_objects.json
Last active August 20, 2024 08:45
structured objects
{
"name": "pet",
"strict": true,
"schema": {
"type": "object",
"properties": {
"pet_name": {
"type": "string",
"description": "What is the name of the pet?"
},
@potatoqualitee
potatoqualitee / style.css
Created July 25, 2024 13:49
asciidoc.css for vscode
/*! Asciidoctor default stylesheet | MIT License | https://asciidoctor.org */
/* Uncomment the following line when using as a custom stylesheet */
@import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700";
html {
font-family: sans-serif;
-webkit-text-size-adjust: 100%
}

To use the DCLM-7B model on Jan.ai, follow these steps:

  1. Install the Required Tools: Ensure you have the necessary tools installed. You might need packages like transformers and open_lm. You can install them using:

    pip install git+https://github.com/mlfoundations/open_lm.git transformers
  2. Download the Model: Integrate the DCLM-7B model from Hugging Face with Jan.ai:

Loading and unloading models is a common practice in both machine learning (ML) and artificial intelligence (AI) applications, especially when dealing with large-scale or resource-intensive models.

In the context of this VS Code extension, the term "AI models" is used, but it encompasses both machine learning and artificial intelligence models. Machine learning is a subset of AI that focuses on enabling computers to learn and improve from experience without being explicitly programmed. AI, on the other hand, is a broader field that includes machine learning and other techniques to create intelligent systems.

The need to load and unload models arises due to several reasons:

  1. Resource Management: AI and ML models can be computationally expensive and consume significant amounts of memory. When multiple models are available, loading all of them simultaneously may exceed the available system resources. By selectively loading and unloading models, the extension can manage resource usage efficiently and ensure
@potatoqualitee
potatoqualitee / function-calling.ipynb
Created April 22, 2024 21:06 — forked from kylemcdonald/function-calling.ipynb
Example of OpenAI function calling API to extract data from LAPD newsroom articles.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@potatoqualitee
potatoqualitee / function_calling.json
Created April 21, 2024 20:53
function_calling.json
[
{
"type": "function",
"function": {
"name": "Invoke-DbaQuery",
"description": "Use this function to answer user questions about Northwind. Input should be a fully formed SQL query.",
"parameters": {
"properties": {
"Query": {
"type": "string",