Astype 2

Fri 14 November 2025

title: "Astype 2" author: "Rj" date: 2019-04-24 description: "-" type: technical_note draft: false


import numpy as np
import pandas as pd
marks = [
    [90, 87],
    [90, 95],
    [92, 95]
]
marks
[[90, 87], [90, 95], [92, 95]]
df = pd.DataFrame(marks, columns=['maths', 'science'])
df

Category: data-wrangling

Read More

Auc-Curve-On-Binary-Classification

Fri 14 November 2025

title: "AUC Curve on Binary Classification" author: "Rj" date: 2019-04-20 description: "List Test" type: technical_note draft: false


from sklearn import svm, datasets
from sklearn import metrics
from sklearn.linear_model import LogisticRegression
from sklearn.model_selection import train_test_split
from sklearn.datasets import load_breast_cancer
import matplotlib.pyplot as plt
# Load Breast Cancer Dataset …

Category: plot

Read More

Auc-Curve-Simple

Fri 14 November 2025

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


import matplotlib.pyplot as plt
import numpy as np
score = np.array([0.9, 0.8, 0.7, 0.6, 0.55, 0.54, 0.53, 0.52, 0.51, 0.505, 0.4, 0 …

Category: plot

Read More

Bag-Of-Words

Fri 14 November 2025

title: "Bag of Words" author: "Raja CSP Raman" date: 2019-04-20 description: "-" type: technical_note draft: false


from gensim.utils import simple_preprocess
from gensim import corpora
from pprint import pprint
contents = [
    "More than half of survey participants also reported clicking on a headline expecting to read a balanced news account, only to …

Category: gensim-samples

Read More

Bag-Of-Words-9965

Fri 14 November 2025

title: "Bag of Words" author: "Rj" date: 2019-04-20 description: "-" type: technical_note draft: false


import re
from nltk.tokenize import word_tokenize
from collections import Counter
word_counter = Counter(word_tokenize("""The cat is in the box. The cat likes the box. The box is over the cat."""))
print(word_counter)
Counter({'The': 3, 'cat …

Category: textprocessing

Read More

Bar-29283

Fri 14 November 2025

import pandas as pd;
import numpy as np;
from datetime import date
import matplotlib.pyplot as plt; plt.rcdefaults()



sizes = np.full((10), 7, dtype=int);    
print(sizes);

from functools import reduce
product = reduce((lambda x, y: x * y), [1, 2, 3, 4])
[7 7 7 7 7 7 7 …

Category: barchart

Read More

Bar-Plot-With-Table

Fri 14 November 2025

title: "Bar Plot with Table" author: "Rj" date: 2020-09-05 description: "List Test" type: technical_note draft: false


# https://matplotlib.org/3.3.1/gallery/misc/table_demo.html
import numpy as np
import matplotlib.pyplot as plt


data = [[ 66386, 174296,  75131, 577908,  32015],
        [ 58230, 381139,  78045,  99308, 160454],
        [ 89135,  80552, 152558, 497981 …

Category: plot

Read More

Barcode Or Not

Fri 14 November 2025

title: "Barcode Or Not" author: "Rj" date: 2019-04-20 description: "-" type: technical_note draft: false


from PIL import Image
from colormap import rgb2hex
from os import listdir
from os.path import isfile, join, isdir
import os.path as path
NON_BARCODE_PAR = 500

def is_barcode_image(filename):

    im = Image.open(filename, 'r')
    #width, height = im …

Category: basics

Read More

Barcode-Validator

Fri 14 November 2025

# !pip install colormap
from PIL import Image
from colormap import rgb2hex
from os import listdir
from os.path import isfile, join, isdir
import os.path as path
NON_BARCODE_PAR = 500

def is_barcode_image(filename):

    im = Image.open(filename, 'r')
    #width, height = im.size
    pixel_values = list(im.getdata())

    #print(pixel_values)

    color_set = set()

    for …

Category: basics

Read More

Base

Fri 14 November 2025
!pip show gliner
Name: gliner
Version: 0.2.13
Summary: Generalist model for NER (Extract any entity types from texts)
Home-page: 
Author: Urchade Zaratiana, Nadi Tomeh, Pierre Holat, Thierry Charnois
Author-email: 
License: Apache-2.0
Location: /home/rajaraman/miniconda3/envs/ml312/lib/python3.12/site-packages
Requires …

Category: gliner

Read More
Page 87 of 146

« Prev Next »