Lc-Core-Version
Fri 14 November 2025
import langchain_core
langchain_core.__version__
'0.3.19'
Score: 0
Category: langchain
Read More
import langchain_core
langchain_core.__version__
'0.3.19'
Score: 0
Category: langchain
Read More
!pip show beautifulsoup4 | grep "Version:"
Version: 4.12.3
import requests
from bs4 import BeautifulSoup
# URL to scrape
url = "https://stevesanjay.github.io/pynotes/archives.html"
# Send a GET request
response = requests.get(url)
# Parse the HTML content
soup = BeautifulSoup(response.text, 'html.parser')
# Find the element containing the "overall-score …Category: basics
Read Moretitle: "Letter Match" author: "Raja CSP Raman" date: 2019-04-20 description: "-" type: technical_note draft: false
import re
contents = [
"AB23",
"A2B3",
"DE09",
"MN90",
"XYi9",
"XY90"
]
for content in contents:
regex_pattern = "(?:AB|DE|XY)\d+"
# starts with AB or DE; should contain one or more number
m = re.match(regex_pattern, content)
if(m …Category: regex
Read Moretitle: "Levenshtein Distance" author: "Rj" date: 2019-04-21 description: "-" type: technical_note draft: false
import numpy as np
def levenshtein_distance(s, t):
if s == "":
return len(t)
if t == "":
return len(s)
if s[-1] == t[-1]:
cost = 0
else:
cost = 1
res = min([levenshtein_distance(s[:-1], t)+1,
levenshtein_distance(s, t …Category: textprocessing
Read Moretitle: "Lexical Diversity" author: "Rj" date: 2019-04-21 description: "-" type: technical_note draft: false
import nltk
f =open('canola.txt','r')
raw = f.read()
raw
'OTTAWA—The federal Liberals promised Wednesday to give Canada’s canola farmers much-needed financial aid to help lessen the impact of China’s decision to ban the …Category: textprocessing
Read Moretitle: "Linear Regression Simple" author: "Raja CSP Raman" date: 2019-04-20 description: "-" type: technical_note draft: false
import matplotlib.pyplot as plt
import numpy as np
from sklearn import datasets, linear_model
from sklearn.metrics import mean_squared_error, r2_score
import pandas as pd
# Load the diabetes dataset
diabetes_data = datasets.load_diabetes()
# Print all keys and …Category: basics
Read Moretitle: "Linear Regression Simple" author: "Rj" date: 2019-04-20 description: "-" type: technical_note draft: false
import matplotlib.pyplot as plt
import numpy as np
from sklearn import datasets, linear_model
from sklearn.metrics import mean_squared_error, r2_score
import pandas as pd
# Load the diabetes dataset
diabetes_data = datasets.load_diabetes()
# Print all keys and number of …Category: sklearn
Read Moretitle: "Linear Search" author: "Rj" date: 2019-04-20 description: "List Test" type: technical_note draft: false
def linear_search(lys, element):
for i in range (len(lys)):
if lys[i] == element:
return i
return -1
list = [1, 2, 5, 6]
print(linear_search(list, 5))
2
Score: 0
Category: basics
Read Moretitle: "Timeit on Linear and Binary" author: "Rj" date: 2019-04-20 description: "List Test" type: technical_note draft: false
import timeit
def linear_search(lys, element):
for i in range (len(lys)):
if lys[i] == element:
return i
return -1
def binary_search(lys, val):
first = 0
last = len(lys)-1
index = -1
while …Category: basics
Read Moretitle: "Text Classification - Naive Bayes - LinkedIn Summary" author: "Rj" date: 2019-04-21 description: "-" type: technical_note draft: false
# Disclaimer: some code copied form this https://towardsdatascience.com/multi-class-text-classification-model-comparison-and-selection-5eb066197568
import logging
import pandas as pd
import numpy as np
from numpy import random
import gensim
import nltk
from sklearn.model_selection import train_test_split
from …Category: textprocessing
Read More