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
# Cell 1: Install dependencies | |
!pip install -q -U transformers llama-index accelerate pypdf einops bitsandbytes | |
!pip install -q llama-index-llms-huggingface | |
!pip install -q llama-index-embeddings-huggingface | |
# Cell 2: Import libraries and set up warnings | |
import warnings | |
warnings.filterwarnings('ignore') | |
from llama_index.core import VectorStoreIndex, SimpleDirectoryReader, ServiceContext |
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
version: "3.1" | |
intents: | |
- greet | |
- goodbye | |
- affirm | |
- deny | |
- mood_great | |
- mood_unhappy |
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 zipfile | |
import os | |
import torch | |
import torch.nn as nn | |
import torch.optim as optim | |
import torchvision.transforms as transforms | |
from torchvision.datasets import ImageFolder | |
from torch.utils.data import DataLoader | |
from PIL import Image | |
import matplotlib.pyplot as plt |
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
asrserver(){ | |
ssh root@192.168.10.98 | |
} | |
voicebotMTB() { | |
ssh -t root@192.168.10.98 "ssh -t appadm@10.45.57.103 'sudo -i'" | |
} | |
MTBproj() { |
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
Part_1.pdf: | |
topics: | |
- Algorithms | |
- Design and analysis | |
- Computational procedures | |
- Input/output relationship | |
- Sorting problem definition | |
- Pseudocode | |
- Insertion sort | |
- Incremental approach |
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 | |
merge_md_files() { | |
for dir in "$1"/*; do | |
if [ -d "$dir" ]; then | |
md_files=("$dir"/*.md) | |
if [ ${#md_files[@]} -gt 1 ]; then | |
merged_file="$dir/$(basename "$dir").md" | |
cat "${md_files[@]}" > "$merged_file" | |
fi |
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 yaml | |
# Define the Unicode ranges for Bengali characters | |
# The ranges are tuples of start and end points, inclusive | |
# Unassigned code points will be skipped | |
bengali_char_ranges = [ | |
(0x0980, 0x0983), # Bengali Anji, etc. | |
(0x0985, 0x098C), # Bengali vowels | |
(0x098F, 0x0990), # Bengali E, AI | |
(0x0993, 0x09A8), # Bengali O, etc. |
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 re | |
import csv | |
def is_bangla_word(word): | |
# Check if the word contains Bangla characters (Unicode range for Bangla: U+0980 to U+09FF) | |
return bool(re.search('[\u0980-\u09FF]', word)) | |
def extract_bangla_words(line): | |
# Split the line into potential words, filtering out non-Bangla words | |
words = re.findall('[\u0980-\u09FF]+', line) |
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
class ActionAnalyzePreviousMessages(Action): | |
def name(self) -> Text: | |
return "action_analyze_previous_messages" | |
def run(self, dispatcher, tracker: Tracker, domain: Dict[Text, Any]) -> List[EventType]: | |
# Your predefined list or dictionary of keywords | |
keywords = ["খতিয়ান", "পর্চা", "পর্চার", "খাজনা"] | |
# Get the list of events | |
events = tracker.events |
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 requests | |
from bs4 import BeautifulSoup | |
def scrape_page(url): | |
try: | |
response = requests.get(url) | |
response.raise_for_status() | |
soup = BeautifulSoup(response.content, 'html.parser') | |
faqs = [] |
NewerOlder