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 script creates and interacts with ReActAgents for PDF and CSV data. | |
Dependencies (install in your virtual environment) : | |
python = "3.11.1" | |
llama-index-agent-openai = "^0.2.5" | |
openai = "^1.30.1" | |
pandas = "^2.2.2" | |
fitz = "^0.0.1.dev2" |
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 torch | |
import peft | |
import transformers | |
from transformers import AutoTokenizer, AutoModelForCausalLM | |
from huggingface_hub.hf_api import HfFolder | |
ACCESS_TOKEN = "ENTER YOUR HUGGINGFACE ACCESS TOKEN HERE" | |
HfFolder.save_token(ACCESS_TOKEN) |
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 | |
# Remove outdated letsencrypt CSRs, keys and certificates | |
lesslBasePath=/etc/letsencrypt | |
keepOldVersions=1 | |
keepOldCsrDays=180 | |
keepOldKeysDays=180 | |
if [ ! -d "$lesslBasePath" ]; 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
--- | |
- name: Docker install | |
hosts: all | |
become: yes | |
tasks: | |
- name: Install docker-ce (centos) via amazon-linux-extras packages | |
shell: "amazon-linux-extras install docker -y" | |
- name: Install dependencies | |
yum: |
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
/* eslint-disable no-undef */ | |
/* eslint-disable @typescript-eslint/no-var-requires */ | |
var fs = require('fs'); | |
function deleteFolderRecursive(path) { | |
if(!fs.existsSync(path)) return console.log(`${path} does not exist!`) | |
if (fs.existsSync(path) && fs.lstatSync(path).isDirectory()) { | |
// eslint-disable-next-line @typescript-eslint/no-unused-vars | |
fs.readdirSync(path).forEach(function(file, _index){ | |
var curPath = path + "/" + file; |
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
{ | |
"project_options":{ | |
"connections":{ | |
"hostname_resolution":[], | |
"out_of_scope_requests":{ | |
"advanced_mode":false, | |
"drop_all_out_of_scope":false, | |
"exclude":[], | |
"include":[], | |
"scope_option":"suite" |
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 { Injectable } from '@angular/core'; | |
@Injectable() | |
export class POIService { | |
// LEFT, BOTTOM, RIGHT, TOP | |
private country_bounding_boxes = [ | |
{'AF': {'Afghanistan': [60.5284298033, 29.318572496, 75.1580277851, 38.4862816432]}}, | |
{'AO': {'Angola': [11.6400960629, -17.9306364885, 24.0799052263, -4.43802336998]}}, | |
{'AL': {'Albania': [19.3044861183, 39.624997667, 21.0200403175, 42.6882473822]}}, | |
{'AE': {'United Arab Emirates': [51.5795186705, 22.4969475367, 56.3968473651, 26.055464179]}}, |
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
// https://github.com/dominictarr/JSONStream | |
// @ts-ignore | |
import JSONStream from "JSONStream"; | |
import { Observable } from "rxjs"; | |
class Bla { | |
public creativesOfChannelV4StreamEndpoint<T=any>( | |
channel: T, | |
brandId: string, |
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 type { ContentHandler } from 'owa-controls-content-handler-base'; | |
import { transformElementForDarkMode } from 'owa-dark-mode-utilities'; | |
import { | |
ATTR_COLOR, | |
ATTR_BGCOLOR, | |
DATA_OG_STYLE_COLOR, | |
DATA_OG_ATTR_COLOR, | |
DATA_OG_STYLE_BACKGROUNDCOLOR, | |
DATA_OG_ATTR_BGCOLOR, | |
} from 'owa-content-colors-constants'; |
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
files: | |
"/etc/httpd/conf.d/hello.conf": | |
mode: "000644" | |
owner: root | |
group: root | |
content: | | |
<VirtualHost *:80> | |
DocumentRoot /var/app/current | |
<Directory /var/app/current/> | |
Options Indexes FollowSymLinks |
NewerOlder