- Create a new directory with these three files (requirements.txt, main.py, README.md)
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python main.py
- Update
main()
to run the example prompt chains
sfThemeSelector = function() { | |
# -------------------------------------------------------------------------- | |
# Allow dynamic update of bootstrap theme. | |
# -------------------------------------------------------------------------- | |
div( | |
div( | |
selectInput( | |
"shinytheme-selector", "Select theme:", | |
c("default", shinythemes:::allThemes()), |
<# | |
.Synopsis | |
Not On a Friday. | |
.Description | |
Gist a little bit of friendly advice about the wisdom of shipping software on a Friday. | |
.Notes | |
Yes, this runs. | |
#> | |
[ValidateScript({ | |
if ([DateTime]::Now.DayOfWeek -eq 'Friday') { |
import logging | |
import requests | |
import time | |
from typing import Union, Dict | |
from config.settings import get_settings | |
class DocumentIntelligenceService: | |
""" | |
A service class for interacting with Azure Document Intelligence API. |
#!/usr/bin/env python3 | |
# Adaption of https://github.com/tom-doerr/chatgpt_commit_message_hook/main/prepare-commit-msg | |
# | |
# Mark this file as executable and add it into the global hooks folder | |
# whose path is given by the core.hooksPath configuration variable | |
# skip during rebase | |
import sys | |
if len(sys.argv) > 2: |
#requires -version 7.4 | |
<# | |
This function requires the gh.exe command line tool. | |
You many encounter API rate restrictions under heavy use. | |
#> | |
#load the custom formatting file | |
Update-FormatData $PSScriptRoot\ghLabelStatus.format.ps1xml |
Powerful AI tool Gemini's API release (Vertex AI & Google AI Studio) opens doors for diverse applications. Its recent upgrade to version 1.5 boosts capabilities. This report demonstrates using simple Google Apps Script function calls to leverage Gemini's power for both data retrieval and content generation.
The recent release of the LLM model Gemini as an API on Vertex AI and Google AI Studio unlocks a world of possibilities. Ref Excitingly, Gemini 1.5 was just announced, further expanding its capabilities. Ref I believe Gemini significantly expands the potential in various situations and paves the way for diverse applications. Notably, the Gemini API can retrieve new data and generate content through function calls. In this report, I introduce the basic flow of function
using namespace System.Collections.Generic | |
function Get-OpenApiDefinition { | |
<# | |
Fetches the OpenAPI definition from the specified URI and for every ref, downloads the relative file to the destination folder. Currently only works with relative refs | |
#> | |
param ( | |
#The source | |
[Parameter(Mandatory)] | |
[Uri]$Uri, |
Function Get-MACAddress { | |
Param( | |
[Switch]$Local, | |
[String]$ComputerName | |
) | |
if ($Local) { | |
$MACAddress = Get-WmiObject -Class Win32_NetworkAdapterConfiguration -Filter "IPEnabled = 'True'" | Select-Object -ExpandProperty MACAddress | |
} else { | |
$MACAddress = Get-WmiObject -Class Win32_NetworkAdapterConfiguration -Filter "IPEnabled = 'True'" -ComputerName $ComputerName | Select-Object -ExpandProperty MACAddress |
using namespace System.Collections.Generic | |
using namespace Microsoft.PowerShell.Commands.Internal.Format | |
#Inspired by: https://gist.github.com/aaroncalderon/09a2833831c0f3a3bb57fe2224963942 | |
<# | |
.Synopsis | |
Converts PowerShell Objects or Format-Table output to Markdown | |
#> | |
Function ConvertTo-Markdown { | |
[CmdletBinding()] |