Required software to run the PDF merger and conversion script.
Prerequisites: Node.js and Python are already installed.
For merging PDF files.
// ECMAScript 2025 Iterator Examples | |
// New built-in Iterator global with functional operators | |
// Example 1: Working with Arrays using Iterator helpers | |
const numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; | |
const result = Iterator.from(numbers) | |
.filter(x => x % 2 === 0) // Keep even numbers | |
.map(x => x * x) // Square them | |
.take(3) // Take first 3 |
// Enhanced job scraper that opens individual job links and scrapes detailed data | |
const { chromium } = require('playwright'); | |
const fs = require('fs'); | |
const path = require('path'); | |
async function scrapeJobsToCSV() { | |
const browser = await chromium.launch({ headless: false }); | |
const page = await browser.newPage(); | |
// Array to store all job data |
import { | |
GenerationConfig, | |
GoogleGenerativeAI, | |
HarmBlockThreshold, | |
HarmCategory, | |
Part, | |
Tool, | |
} from "@google/generative-ai"; | |
interface AgentOptions { |
import streamlit as st | |
import os | |
import tempfile | |
import google.generativeai as genai | |
import whisper | |
from pydub import AudioSegment | |
from dotenv import load_dotenv | |
load_dotenv() | |
# Configure the Gemini model |
# | |
# Add the following flags to your sysctl.conf file | |
# | |
kern.ipc.shmmax=134217728 | |
kern.ipc.shmmin=1 | |
kern.ipc.shmmni=1048576 | |
kern.ipc.shmseg=1024 | |
kern.ipc.shmall=1048576 | |
kern.ipc.somaxconn=32767 |
#!/bin/sh | |
# Function to check the exit status of the last command and handle errors | |
check_error() { | |
if [ $? -ne 0 ]; then | |
echo "Error: $1 failed. Exiting." | |
exit 1 | |
fi | |
} |
# Update package repository | |
pkg update | |
# Install X.Org | |
pkg install -y xorg | |
# Install KDE Plasma | |
pkg install -y kde5 | |
# Install SDDM (display manager) |
import os | |
import time | |
from dotenv import load_dotenv | |
load_dotenv() | |
from pydantic import BaseModel, Field | |
from typing import TypedDict, Literal | |
from langgraph.graph import StateGraph, END | |
from langgraph.prebuilt import ToolNode | |
from langgraph.graph import MessagesState | |
from langchain.tools import tool |
function mapArray(arr,cb){ | |
let res = []; | |
for(const e of arr){ | |
res.push(cb(e)); | |
} | |
return res; | |
} | |
function filterArray(arr, cb){ | |
let res = []; |