Improved-Hybrid

Fri 14 November 2025
import re
from gliner import GLiNER
import spacy
# Load SpaCy English model
nlp = spacy.blank("en")
# Get SpaCy's stopword list
stop_words = nlp.Defaults.stop_words
# Initialize GLiNER with a pre-trained model
model = GLiNER.from_pretrained("urchade/gliner_medium-v2.1")
Fetching 5 files:   0%|          | 0/5 [00:00<?, ?it/s]


/home/rajaraman/miniconda3 …

Category: gliner

Read More

Index Isin

Fri 14 November 2025

title: "Index isin" author: "Rj" date: 2019-04-24 description: "-" type: technical_note draft: false source: http://pandas.pydata.org/pandas-docs/version/0.24/user_guide/cookbook.html#idioms


import numpy as np
import pandas as pd
df = pd.DataFrame({
    'maths' : [80, 89, 90, 20, 60],
    'science' : [40, 50, 90, 100, 50],
    'language' : [20 …

Category: data-wrangling

Read More

Index Remover

Fri 14 November 2025

"""
input sample:
17. random text1
18. random text2

output:
17, random text1
18, random text2
"""
'\ninput sample:\n17. random text1\n18. random text2\n\noutput:\n17, random text1\n18, random text2\n'
input_sample = """
17. random text1
18. random text2
"""

# Process the input sample
output = []
for line in input_sample.strip().split …

Category: basics

Read More

Infer Objects

Fri 14 November 2025

title: "Infer Objects" author: "Rj" date: 2019-04-24 description: "-" type: technical_note draft: false


import numpy as np
import pandas as pd
df = pd.DataFrame({'a': [7, 1, 5], 'b': ['3','2','1']}, dtype='object')
df

Category: data-wrangling

Read More

Initialize With Datatype

Fri 14 November 2025

title: "Initalize With DataType" author: "Rj" date: 2019-04-24 description: "-" type: technical_note draft: false


import numpy as np
import pandas as pd
df = pd.DataFrame({'a': [7, 1, 5], 'b': ['3','2','1']}, dtype='object')
df

Category: data-wrangling

Read More

Int And Nan

Fri 14 November 2025

title: "Int and NaN" author: "Rj" date: 2019-04-24 description: "-" type: technical_note draft: false


import numpy as np
import pandas as pd
df = pd.DataFrame({
    'one': [4, 5],
    'two': [10, 20]
})
df
one …

Category: data-wrangling

Read More

Integer Check

Fri 14 November 2025

title: "Integer Check" author: "Rj" date: 2019-04-20 description: "-" type: technical_note draft: false


content = "23"
content
'23'
isinstance(content, int)
False
type(content)
str
content.isdigit()
True
text = "one 2 three 4 five 6 seven 8 nine 10"
for x in text.split(" "):
    print(x, "==>", x.isdigit())
one ==> False
2 ==> True …

Category: basics

Read More

Integer Check Temp

Fri 14 November 2025

title: "Integer Check Temp" author: "Rj" date: 2019-05-20 description: "Integer Check" type: technical_note draft: false


content = "23"
content
'23'
isinstance(content, int)
False
type(content)
str
content.isdigit()
True
text = "one 2 three 4 five 6 seven 8 nine 10"
for x in text.split(" "):
    print(x, "==>", x.isdigit())
one …

Category: basics

Read More

Intialize-Variables

Fri 14 November 2025

title: "Initialize Variables" author: "Raja CSP Raman" date: 2019-05-07 description: "-" type: technical_note draft: false


import tensorflow as tf

import os

# Just disables the warning, doesn't enable AVX/FMA
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
init_op = tf.global_variables_initializer()
session = tf.Session()
# initialize variables
session.run(init_op)

Score: 5

Category: tensorflow-work

Read More

Ip-Generator

Fri 14 November 2025

import pyutil as pyu
pyu.get_local_pyinfo()
'conda env: ml312-2024; pyv: 3.12.7 | packaged by Anaconda, Inc. | (main, Oct  4 2024, 13:27:36) [GCC 11.2.0]'
# public ip

import random

def generate_public_ip():
    # Exclude private IP ranges
    excluded_ranges = [
        (10, 10),  # 10.0.0.0 - 10.255.255.255 …

Category: ip

Read More
Page 109 of 146

« Prev Next »