This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import PSReadLine for enhanced command-line experience | |
Import-Module PSReadLine | |
# Prediction settings | |
Set-PSReadLineOption -PredictionSource HistoryAndPlugin | |
Set-PSReadLineOption -PredictionViewStyle ListView | |
# Alternate prediction style: | |
# Set-PSReadLineOption -PredictionViewStyle InlineView | |
# Optional bell settings (uncomment to enable audio feedback) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from openai import OpenAI | |
client = OpenAI() | |
models = client.models.list() | |
print([m.id for m in models.data]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
budget_data = [ | |
{ | |
"Spending Category": "Social Security", | |
"FY2019 Outlays": "1.044T", | |
"FY2019 Outlays (2024 $)": "1.253T", | |
"FY2024 Outlays": "1.461T", | |
"Nominal Increase": "+$417B (40.0%)", | |
"Real Increase": "+$208B (16.6%)", | |
"2019 Budget in 2024 $ (Adjusted for Income Increase x1.11)": "1.391T", | |
"Change Beyond Income Increase": "+$70B (5.0%)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from langchain.prompts import PromptTemplate | |
from langchain_groq import ChatGroq | |
from langchain_ollama import ChatOllama | |
from docx import Document | |
# Step 1: Define the Prompt Template | |
prompt = PromptTemplate( | |
input_variables=["purpose"], | |
template="Write an introduction for a {purpose}. Keep it professional and concise. Include a header and footer with contact information, and a call to action.", | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ollama import chat | |
from pydantic import BaseModel | |
import pandas as pd | |
import argparse | |
import logging | |
# Set up logging | |
logging.basicConfig(level=logging.INFO) | |
# Initialize an empty DataFrame |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Laravel Artisan Alias | |
function artisan { | |
param ( | |
[string]$Command | |
) | |
php artisan $Command | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# PowerShell 7.3.1 Profile | |
# Posh Git | |
Import-Module posh-git | |
$omp_config = "atomic" # Themes atomic, takuya, material, jandedobbeleer | |
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH/$omp_config.omp.json" | Invoke-Expression | |
# Terminal Icons | |
Import-Module -Name Terminal-Icons |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
onMouseMove(event) { | |
this.mouse.x = (event.clientX / window.innerWidth) * 2 - 1; | |
this.mouse.y = - (event.clientY / window.innerHeight) * 2 + 1; | |
// Make the sphere follow the mouse | |
var vector = new THREE.Vector3(this.mouse.x, this.mouse.y, 0.5); | |
vector.unproject( this.camera ); | |
var dir = vector.sub( this.camera.position ).normalize(); | |
var distance = - this.camera.position.z / dir.z; | |
var pos = this.camera.position.clone().add( dir.multiplyScalar( distance ) ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react" | |
import PropTypes from "prop-types" | |
import classNames from "classnames" | |
import "./Container.scss" | |
const Container = ({ sm, md, lg, xl, xxl, fluid, ...props }) => { | |
let styles = { | |
"container-sm": sm, | |
"container-md": md, | |
"container-lg": lg, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$this->validate($request, [ | |
'phone' => 'required|digits:10' | |
]); | |
$this->validate($request, [ | |
'phone' => 'required|numeric|between:9,11' | |
]); | |
$this->validate($request, [ | |
'phone' => 'required|min:10|numeric' |
NewerOlder