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 argparse | |
from typing import Optional, List, Mapping, Any | |
from llama_index.core import SimpleDirectoryReader, SummaryIndex | |
from llama_index.core.callbacks import CallbackManager | |
from llama_index.core.llms import ( | |
CustomLLM, | |
CompletionResponse, | |
CompletionResponseGen, | |
LLMMetadata, |
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
--- | |
- hosts: nginx_deb_websites | |
become: true | |
tasks: | |
- name: ensure nginx is at the latest version | |
apt: name=nginx state=latest |
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 ubuntu:22.04 | |
EXPOSE 22 | |
EXPOSE 5984 | |
RUN apt-get update && apt-get install -y openssh-server sudo | |
COPY --chown=root:root authorized_keys /root/.ssh/authorized_keys | |
RUN chmod 0644 /root/.ssh/authorized_keys | |
ENTRYPOINT service ssh start && bash |
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
irm get.scoop.sh | iex | |
scoop install nodejs busybox | |
npm install discord.js dotenv openai |
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 dotenv from "dotenv"; | |
import { Client, GatewayIntentBits, Partials } from "discord.js"; | |
import OpenAI from 'openai'; | |
dotenv.config(); | |
const client = new Client({ | |
intents: [ | |
GatewayIntentBits.Guilds, | |
GatewayIntentBits.GuildMessages, |
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
AdrenalineJunkie == Adrenaline Junkie | |
Agoraphobic == Agoraphobic | |
AllThumbs == All Thumbs | |
Mechanics == Amateur Mechanic | |
Mechanics2 == Amateur Mechanic | |
Fishing == Angler | |
Asthmatic == Asthmatic | |
Athletic == Athletic | |
Axeman == Axe Man | |
BaseballPlayer == Baseball Player |
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
local originalSleepOption = ISWorldObjectContextMenu.doSleepOption | |
function ISWorldObjectContextMenu.doSleepOption(context, bed, player, playerObj) | |
-- Avoid player sleeping inside a car from the context menu, new radial menu does that now | |
if(playerObj:getVehicle() ~= nil) then return end | |
if(bed and bed:getSquare():getRoom() ~= playerObj:getSquare():getRoom()) then return end | |
local text = getText(bed and "ContextMenu_Sleep" or "ContextMenu_SleepOnGround") | |
local sleepOption = context:addOption(text, bed, ISWorldObjectContextMenu.onSleep, player); | |
-- Not tired enough | |
-- MOD CHANGE START -- |
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
ISWorldObjectContextMenu.doSleepOption = function(context, bed, player, playerObj) | |
-- Avoid player sleeping inside a car from the context menu, new radial menu does that now | |
if(playerObj:getVehicle() ~= nil) then return end | |
if(bed and bed:getSquare():getRoom() ~= playerObj:getSquare():getRoom()) then return end | |
local text = getText(bed and "ContextMenu_Sleep" or "ContextMenu_SleepOnGround") | |
local sleepOption = context:addOption(text, bed, ISWorldObjectContextMenu.onSleep, player); | |
local tooltipText = nil | |
-- Not tired enough | |
local sleepNeeded = not isClient() or getServerOptions():getBoolean("SleepNeeded") | |
if sleepNeeded and playerObj:getStats():getFatigue() <= 0.3 then |
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
#!/bin/bash | |
# file: /usr/local/share/batt.sh | |
# Checks to see if the battery is below | |
# the low battery threshold, | |
# if so, then put the computer to sleep | |
SECONDS_BETWEEN_CHECK=60 | |
LOW_BATTERY_THRESHOLD=6 |
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 astroid | |
import astroid; astroid.context.InferenceContext.max_inferred = 500 | |
ret = astroid.extract_node(""" | |
import pandas as pd | |
df = pd.read_csv("some.csv") | |
df #@ | |
df.columns | |
df.columns # |
NewerOlder