- Running It
Install dependencies:
pip install -r requirements.txt
Run LiteLLM:
python run_litellm.py
Install dependencies:
pip install -r requirements.txt
Run LiteLLM:
python run_litellm.py
This gist contains a solution to automatically shut down an Azure VM running a GitHub Actions self‑hosted runner when it has been idle for a specified period. It does so by monitoring the last modified time of the runner’s Worker logs in the _diag folder. If no new Worker logs have been created for a set threshold (for example, 30 minutes), the script triggers a shutdown.
actions-runner/_diag directory for files whose names start with Worker_.| import * as ShepherdNamespace from 'shepherd.js' | |
| import 'shepherd.js/dist/css/shepherd.css' | |
| // Create a singleton instance of Shepherd.Tour | |
| class TourService { | |
| private static instance: TourService | |
| private tour: ShepherdNamespace.Tour | |
| private matterIdStep?: ShepherdNamespace.Step | |
| private constructor() { |
| import { Ref, watch } from 'vue' | |
| import type { VPVInstance } from '@vue-pdf-viewer/viewer' | |
| /** | |
| * Represents the data structure for text selection within a PDF viewer | |
| */ | |
| export interface SelectionData { | |
| /** The selected text content */ | |
| text: string | |
| /** Information about the selection range within the document */ |
| FROM nginx:alpine | |
| COPY nginx.conf /etc/nginx/nginx.conf |
| import transliterate from './transliterate'; | |
| const builtinOverridableReplacements = [ | |
| ['&', ' and '], | |
| ['🦄', ' unicorn '], | |
| ['♥', ' love '] | |
| ]; | |
| const matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; | |
| function escapeStringRegexp (str:string) { | |
| if (typeof str !== 'string') { |
| // eslint-disable-next-line @typescript-eslint/ban-ts-comment | |
| // @ts-nocheck | |
| /** | |
| * Taken from https://github.com/glorat/node-chatgpt-api/blob/main/src/ChatGPTClient.js | |
| * but with the following mods to make it browser friendly: | |
| * - Replace cacheOptions with cache, to decouple from keyv, which doesn't work in browser | |
| * - Remove undici, which doesn't work in browser | |
| * - Remove proxying support | |
| * - use uuid instead of crypto |
| import { updateEntrypointsFrom0_x_xTo0_2_x } from "@langchain/scripts/migrations"; | |
| const pathToMyProject = "./functions/src"; // This path is used in the following glob pattern: `${projectPath}/**/*.{ts,tsx,js,jsx}`. | |
| updateEntrypointsFrom0_x_xTo0_2_x({ | |
| projectPath: pathToMyProject, | |
| tsConfigPath: "tsconfig.json", // Path to the tsConfig file. This will be used to load all the project files into the script. | |
| // testRun: true, // If true, the script will not save any changes, but will log the changes that would be made. | |
| shouldLog: true, | |
| }); |
| steps: | |
| - name: 'gcr.io/cloud-builders/docker' | |
| args: | |
| - 'pull' | |
| - 'quay.io/unstructured-io/unstructured-api:latest' | |
| - name: 'gcr.io/cloud-builders/docker' | |
| args: | |
| - 'tag' | |
| - 'quay.io/unstructured-io/unstructured-api:latest' | |
| - 'asia-southeast1-docker.pkg.dev/glorat-gptapps/sg-unstructured/unstructured-api:latest' |
| /** | |
| * Created by Kevin Tam on 08/08/2014. | |
| */ | |
| var Base58 = require('bs58'); | |
| var Crypto = require('crypto'); | |
| var BigInteger = require('bigi'); | |
| var assert = require('assert'); | |
| var Bitcoin = require('../../') |