Remove Numbers-7765

Fri 14 November 2025

title: "Remove Numbers" author: "Raja CSP Raman" date: 2019-04-20 description: "-" type: technical_note draft: false


content = '15. TFRecord in Tensorflow'
content
'15. TFRecord in Tensorflow'
import re
result = re.sub(r'\d+\.', '', content)
result.strip()
'TFRecord in Tensorflow'
content2 = """1. Cross Entropy Loss Derivation

2. How to split a tensorflow model …

Category: regex

Read More

Remove Symbols

Fri 14 November 2025

title: "Remove Symbols" author: "Raja CSP Raman" date: 2019-04-20 description: "-" type: technical_note draft: false


content = "This device is costing only 12.89$. This is fantastic!"
content
'This device is costing only 12.89$. This is fantastic!'
import re
re.sub(r'[^\w]', ' ', content)
'This device is costing only 12 89 …

Category: regex

Read More

Remove-Th-From-Date

Fri 14 November 2025

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


from datetime import datetime
import re
content = 'Sunday, May 18th, 2019'
content
'Sunday, May 18th, 2019'
d = datetime.strptime(re.sub('(\d+)(st|nd|rd|th)', '\g<1>', content), '%A, %B %d, %Y')
d …

Category: basics

Read More

Reshape

Fri 14 November 2025

title: "Reshape" 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'
tf.InteractiveSession()

a = tf.zeros((2, 2))
b = tf.ones((2, 2))

abc = tf.reduce_sum(b, reduction_indices=1 …

Category: tensorflow-work

Read More

Reshape-1

Fri 14 November 2025

title: "Reshape Extra" 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'
a = tf.constant([1, 2, 3, 4, 5, 6, 7, 9])
b = tf.reshape(a, [2, 4 …

Category: tensorflow-work

Read More

Resume-1

Fri 14 November 2025
!python --version
Python 3.12.4
!pip show PyPDF2 spacy gliner | grep "Version"
Version: 3.0.1
Version: 3.8.2
Version: 0.2.13

import PyPDF2

def extract_text_from_pdf(pdf_path):
    with open(pdf_path, 'rb') as file:
        reader = PyPDF2.PdfReader(file)
        text = ""
        for page in reader.pages:
            text += page.extract_text()
    return …

Category: resume-analysis

Read More

Resume2

Fri 14 November 2025

# https://github.com/urchade/GLiNER/blob/main/examples/finetune.ipynb
!pip show accelerate
Name: accelerate
Version: 1.1.1
Summary: Accelerate
Home-page: https://github.com/huggingface/accelerate
Author: The HuggingFace team
Author-email: zach.mueller@huggingface.co
License: Apache
Location: /home/rajaraman/miniconda3/envs/ml312/lib/python3.12/si …

Category: resume-analysis

Read More

Retrieval-Chain

Fri 14 November 2025
# https://python.langchain.com/docs/how_to/streaming/
!python --version
Python 3.12.4
from constants import OPENAI_API_KEY
!pip show langchain-openai | grep "Version:"
Version: 0.2.9
import os
os.environ["OPENAI_API_KEY"] = OPENAI_API_KEY
from langchain_openai import ChatOpenAI

model = ChatOpenAI(model="gpt-4o-mini")
!pip install faiss-cpu
Requirement already satisfied: faiss-cpu …

Category: langchain

Read More

Retriever-2

Fri 14 November 2025
!python --version
Python 3.12.4
from constants import OPENAI_API_KEY
!pip show langchain-openai | grep "Version:"
Version: 0.2.9
import os
os.environ["OPENAI_API_KEY"] = OPENAI_API_KEY
from langchain_openai import ChatOpenAI

model = ChatOpenAI(model="gpt-4o-mini")
from langchain_community.vectorstores import FAISS
from langchain_core.output_parsers import StrOutputParser
from langchain_core.prompts import ChatPromptTemplate
from …

Category: langchain

Read More
Page 126 of 146

« Prev Next »