Linear-Regression-Simple
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 …
Read More
Linear Search
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))
Score: 0
Read More
Linear Vs Binary Timeit
title: "Timeit on Linear and Binary"
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
def binary_search(lys, val):
first = 0
last = len(lys)-1
index = -1
while …
Read More
List-Operations
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"
]
['AB', 'CD', 'EF', 'GH', 'IJ', 'KL', 'MN', 'OP', 'QR', 'ST', 'UV', 'WX', 'YZ']
# append to list
list.append("ABC")
Read More
List Ref
title: "List Reference"
author: "Rj"
date: 2019-04-20
description: "List Test"
type: technical_note
draft: false
As b is referring to a, whatever is added to b, will be reflected to …
Read More
List-Remove
title: "Remove Item from list"
author: "Rj"
date: 2019-04-20
description: "-"
type: technical_note
draft: false
names = [
"Kevin",
"Peter",
"John"
]
['Kevin', 'Peter', 'John']
Score: 5
Read More
List Test
title: "List Test"
author: "Rj"
date: 2019-04-20
description: "List Test"
type: technical_note
draft: false
entries = ['one', 2, 'three', False]
['one', 2, 'three', False]
entryTuple = (100, 200, 'three', 'four')
print(entryTuple)
(100, 200, 'three', 'four')
cities = ['Toronto', 'Monteal', 'Vancouver']
print(cities)
Read More
List Test 2
title: "List Test 2"
author: "Rj"
date: 2019-04-20
description: "List Test"
type: technical_note
draft: false
entries = ['one', 2, 'three', False]
['one', 2, 'three', False]
entryTuple = (100, 200, 'three', 'four')
print(entryTuple)
(100, 200, 'three', 'four')
cities = ['Toronto', 'Monteal', 'Vancouver']
print(cities)
Read More
List-With-Diff-Datatype
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 …
Read More