Learner-Score-Collector

Fri 14 November 2025

!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 More

Linear-Regression-Simple

Fri 14 November 2025

title: "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 More

Linear Search

Fri 14 November 2025

title: "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 More

Linear Vs Binary Timeit

Fri 14 November 2025

title: "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 More

List-Operations

Fri 14 November 2025

title: "List Operations" author: "Rj" date: 2019-04-20 description: "-" type: technical_note draft: false


list = [
    "AB", 
    "CD",
    "EF",
    "GH",
    "IJ", 
    "KL",
    "MN",
    "OP",
    "QR",
    "ST",
    "UV",
    "WX",
    "YZ"
]
list
['AB', 'CD', 'EF', 'GH', 'IJ', 'KL', 'MN', 'OP', 'QR', 'ST', 'UV', 'WX', 'YZ']
# append to list
list.append("ABC")
list
['AB',
 'CD',
 'EF …

Category: basics

Read More

List Ref

Fri 14 November 2025

title: "List Reference" author: "Rj" date: 2019-04-20 description: "List Test" type: technical_note draft: false


a = [
    1, 2, 3, 4
]
b = a
b
[1, 2, 3, 4]
b.append(5)
a
[1, 2, 3, 4, 5]

As b is referring to a, whatever is added to b, will be reflected to …

Category: basics

Read More

List-Remove

Fri 14 November 2025

title: "Remove Item from list" author: "Rj" date: 2019-04-20 description: "-" type: technical_note draft: false


names = [
    "Kevin",
    "Peter",
    "John"
]
names
['Kevin', 'Peter', 'John']
names.pop(0)
'Kevin'
names
['Peter', 'John']


Score: 5

Category: basics

Read More

List Test

Fri 14 November 2025

title: "List Test" author: "Rj" date: 2019-04-20 description: "List Test" type: technical_note draft: false


entries = ['one', 2, 'three', False]
print(entries)
['one', 2, 'three', False]
print(entries[2:7])
['three', False]
entryTuple = (100, 200, 'three', 'four')
print(entryTuple)
(100, 200, 'three', 'four')
cities = ['Toronto', 'Monteal', 'Vancouver']
print(cities)
['Toronto', 'Monteal …

Category: basics

Read More

List Test 2

Fri 14 November 2025

title: "List Test 2" author: "Rj" date: 2019-04-20 description: "List Test" type: technical_note draft: false


entries = ['one', 2, 'three', False]
print(entries)
['one', 2, 'three', False]
print(entries[2:7])
['three', False]
entryTuple = (100, 200, 'three', 'four')
print(entryTuple)
(100, 200, 'three', 'four')
cities = ['Toronto', 'Monteal', 'Vancouver']
print(cities)
['Toronto …

Category: basics

Read More

List-With-Diff-Datatype

Fri 14 November 2025

import pyutil as pyu
pyu.get_local_pyinfo()
'conda env: ml311; pyv: 3.11.10 (main, Oct  3 2024, 07:29:13) [GCC 11.2.0]'
print(pyu.ps2("haystack-ai ollama-haystack python-dotenv"))
haystack-ai==2.8.0
ollama-haystack is not installed in the current environment.
python-dotenv==1.0.1

lista = ["one", 2, "three …

Category: basics

Read More
Page 8 of 17

« Prev Next »