create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
| import xmltodict | |
| import json | |
| import os # Import os module | |
| def read_xml_to_dict(file_path): | |
| """ | |
| Reads an XML file and converts it into a Python dictionary. | |
| Args: | |
| file_path (str): The path to the XML file. |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Advanced KG Prompt Generator</title> | |
| <style> | |
| :root { | |
| --primary: #667eea; |
| from langchain_community.embeddings import OllamaEmbeddings | |
| import faiss | |
| import numpy as np | |
| # Initialize Ollama embeddings model | |
| embedding_model = ( | |
| OllamaEmbeddings(model="llama3.2:3b") | |
| ) | |
| # Sample sentences |
| import chromadb | |
| from loguru import logger | |
| class ChromaHelper: | |
| def __init__(self, host, port): | |
| self.host = host | |
| self.port = port | |
| self.chroma_client = None |
| import numpy as np | |
| import re | |
| from sklearn.metrics.pairwise import cosine_similarity | |
| # Load GloVe embeddings | |
| def load_glove_embeddings(glove_file): | |
| embeddings_index = {} | |
| with open(glove_file, 'r', encoding='utf-8') as f: | |
| for line in f: |
| class wordle: | |
| def __init__(self, input_data_path): | |
| self.input_data_path = input_data_path | |
| def get_path(self): | |
| print(self.input_data_path) | |
| def get_words_by_len(self, word_length): | |
| """ | |
| filter words of specific length |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
| # -*- coding: utf-8 -*- | |
| import numpy as np | |
| import os | |
| import cv2 | |
| import pandas as pd | |
| from sklearn.cross_validation import train_test_split | |
| from keras.models import Sequential | |
| from keras.layers.core import Dense, Dropout, Activation, Flatten | |
| from keras.layers.convolutional import Convolution2D |
| import numpy as np | |
| from keras import backend as K | |
| from keras.models import Sequential | |
| from keras.layers.core import Dense, Dropout, Activation, Flatten | |
| from keras.layers.convolutional import Convolution2D, MaxPooling2D | |
| from keras.preprocessing.image import ImageDataGenerator | |
| from sklearn.metrics import classification_report, confusion_matrix | |
| #Start | |
| train_data_path = 'F://data//Train' |
| import mechanicalsoup | |
| user_agent_string = 'Mozilla/5.0 (X11; CrOS x86_64 8172.45.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.64 Safari/537.36' | |
| browser = mechanicalsoup.StatefulBrowser(user_agent=user_agent_string, ) | |
| browser.open('https://ebootcamp.dev') | |
| headings_list = browser.get_current_page().find_all('h3') | |
| for heading in headings_list: | |
| print(heading.text) |