OpenShift4

What is Openshift?

It is a platform as a service

oc explain

oc explain pod.spec.container.env

How to create pod

oc create -f pod.yaml

oc get pods

OC rsh

The oc rsh command in OpenShift allows you to “step inside” a running container and interact with it as if you were using a regular command prompt. It’s like opening a door to the container and being able to run commands and access files inside it.

  1. You need a tool called oc (OpenShift command-line tool) to use oc rsh. It helps you connect to an OpenShift cluster.
  2. You find the container you want to access within a group of containers called a “pod.”
  3. You use the oc rsh a command followed by the pod’s name to enter the container. It’s like opening the door to the container.
  4. Once inside, you can run commands and navigate the container’s files as if you were using a regular command prompt. You can check logs, run scripts, and do other things that the container allows.
  5. When you’re done, you exit the container by typing exit or pressing Ctrl+D. It’s like closing the door behind you.

Remember, it’s important to be careful when using oc rsh it because you can make changes that affect the container and the application running inside it.

OC delete

The oc delete command in OpenShift is used to delete various resources within an OpenShift cluster. It allows you to remove objects like pods, services, deployments, routes, and more.

oc delete <resource-type> <resource-name>

oc get pods –watch

Java Programming

Chapter 1

What is Java?

  • Java is an object-oriented programming language.
  • Popular programming language.
  • It is strongly typed language

.Class File

A class file in Java has a .class extension. It contains bytecode, which is instruction for Java Virtual Machine, which translates that bytecode into platform-specific machine-level instruction based upon whether the Java program runs on Windows or Linux.

First Java Program.

public class Main {
    public static void main(String[] args) {
        System.out.println("Welcom to Java programming");
    }
}

Chapter 2

Scanner Class

https://docs.oracle.com/javase/8/docs/api/java/util/Scanner.html

  • Scanner class is found in the java.util.package
  • Scanner class is use to get input from the user in Java
  • It can parse primitive types and strings using regex.
Scanner input = new Scanner(System.in); //Create an instance of the scanner 
System.out.print("Enter a double value: ");
Scanner input = new Scanner(System.in);
double d = input.nextDouble();
System.out.println("Your value is " + d);

Import Package

import java.util.* ; // Implicit import
import java.util.Scanner; // Explicit Import
No performance difference

Variable

  • A container that holds the value
  • Strongly typed

Primitive Data Types

  • Primitive data types are stored by Value. It is the fastest possible memory.
  • Numbers, characters, and Booleans values .
  • Primitive type names are all lowercase.
  • Primitive values are always signed they support positive and negative values.
  • btye, int,char,short, long, double, float, boolean
  • String is not primitive type.It is an object. It is a complex object, an instance of a class.
  • https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html

How to declare a variable?

int myVariable =20;
int => Data type
myVariable => identifier
= Assigment
20 = value

Starting Java 10, local variables can use type inference

var myVariable=20;

DataTypes example

        int firstValue=100;
        int secondValue=firstValue;
        firstValue=50;
        secondValue=70;
        System.out.println(firstValue);
        System.out.println(secondValue);

Explicit Types in Literal Values

var  myIntValue=5;
var  myFloatValue=5f;
var myDoubleValue=5d;
var myLongValue=5L or 5l

Stored by Value

Constants

  • A variable whose value cannot be changed once it is assigned.
  • Constant the variable name on constants
  • final datatype CONSTANTNAME = VALUE;  
final int VALUE=123;

Constant example

Type Casting

Converting the value from one data type to another data type

Implicit casting
double data= 3; (type widening)
Explicit casting
int i = (int)3.0; (type narrowing)
int i = (int)3.9; (Fraction part is truncated)

Chapter 3

Selections

How do we compare two values in java?

byte value1=1;
byte values2=2;
boolean result=(value1>value2);
System.out.println(result);

Result: false

Java if condition

Java if condition checks for the decision-making statement based on its true or false condition.

if(condition) 
{
   // Statements to execute if the given condition is true
  
}
---------------------------------
if (condition)
{
   // Run this block if
 condition is true
}
else
{
  // Run this block if
 condition is false
}
-----------------------------------------------------
if (condition)
    statement;
else if (condition)
    statement;
.
.
else
    statement;

Switch

Execute the code based on the value of the switch expression value.

switch (expression)
{
  case value1:
    statement1;
    break;
  case value2:
    statement2;
    break;

  default:
    statementDefault;
}

How to access YAML variable in puppet bolt plan

yaml file

groups:
-name: test
targets:
-uri: test.abc.edu
vars:
server_short_name: test123
config:
transport: ssh

plan test:passvariablevalue(
 
TargetSpec $targets

){
    
    # Gather facts 
   $tragets.apply_prep
    
   get_targets('development').each | $traget | {
      $results= run_command ("touch /shiva/files/svc.test.${target.vars['server_short_name']}",$target, {_run_as => 
'root'})
      out::message ("${results}")
 
   }



}

Run plan

bolt plan run test:test:passvariablevalue -t test

Ansible

ansible 

Get Fact

ansible all-m setup 
ansible all -m setup --fork=4
ansible-playbook message.yml  --syntax-check



Change windows registry entries using ansible-playbook

#Create registry entry and change pwd
---
- hosts: windows_servers
  vars:
     dbuserdata: ""
     dbpwddata: ""
  tasks:
  - name: Create Registry Entry User DBConnect
    win_regedit:
      path: HKLM:\SOFTWARE\Temp\DBConnect
      name: User
      data: '{{dbuserdata}}'

  - name: Create Registry Entry Password DBConnect
    win_regedit:
      path: HKLM:\SOFTWARE\Temp\DBConnect
      name: Pwd
      data: '{{dbpwddata}}'
  

Run ansible-playbook with

ansible-playbook registry_password_playbook.yaml --extra-vars "dbuserdata=tempuser dbpwddata=temppassword"

Change Registry Using Params in powershell

param (
   
   [string]  $userName = "UserName",
   [Parameter(Mandatory=$true)] [string] $value = "SecretPassword"
   
)

$registryPath = "HKLM:\SOFTWARE\WOW6432Node\TESTAPP"
IF(!(Test-Path $registryPath))

  {

    New-Item -Path $registryPath -Force | Out-Null
    New-ItemProperty -Path $registryPath -Name $userName -PropertyType 'String' -value $value

}

 ELSE {
    New-ItemProperty -Path $registryPath -Name $userName -Value $value -PropertyType 'String' -Force | Out-Null

 }

Modify webconfig connectionstring using powershell


 [CmdletBinding()]
  param ($PT_connectionstring_new =  "newpassword")  
  $webConfig = 'D:\Web.config'

Function updateWebConfig($config) 
{ 
$doc = (Get-Content $config) -as [Xml]
$root = $doc.get_DocumentElement();
$activeConnection = $root.connectionStrings.SelectNodes("add")|?{$_.name -eq "PROD"};
$activeConnection.SetAttribute("connectionString",$PT_connectionstring_new);
$doc.Save($config)
} 

updateWebConfig($webConfig)

Download remote zip, extract zip and copy files using puppet in windows

#download file from repo
 download_file { 'Download dotnet 4.0' :
  url                   => 'https://repos.shivaprogramming.com/Myapp.ZIP',
  destination_directory => 'D:\downloadapp',
}

#extract zip
 exec { 'Unzip Folder':
        command =>'Expand-Archive -Path D:\downloadapp\Myapp.ZIP -DestinationPath D:\downloadapp\DEST',
        provider  => powershell,
        logoutput =>    true,
        subscribe => Download_file['Download dotnet 4.0'],
    } 
#copy resources to the destination
 
 file { 'D:\CA_Websites\MyApp':  #destination
 ensure    => 'directory',
 recurse   => true,
 source    => 'D:\downloadapp\DEST',
 subscribe => Exec['Unzip Folder'],
  }


From Lightbulb to Launch: Turning Your AI Automation Idea Into Reality

We’ve all been there. You’re staring at a repetitive task—copying data between spreadsheets, responding to the same customer inquiry for the hundredth time, or manually sorting through hundreds of emails—and suddenly it hits you: This could be automated with AI.

But having the idea is just the beginning. The gap between “I have an idea about AI automation” and a working system that saves hours of manual labor is where most concepts die. This post bridges that gap, showing you how to validate, architect, and build your intelligent automation concept.

Understanding the AI Automation Landscape

Before writing a single line of code or configuring a no-code workflow, you need to understand where your idea fits in the current ecosystem. AI automation isn’t just about replacing human effort; it’s about augmenting decision-making with machine learning capabilities.

Today’s automation landscape operates on three distinct levels:

Rule-based automation follows “if this, then that” logic—reliable but rigid. AI-enhanced automation adds pattern recognition, natural language processing, or computer vision to handle variability. Autonomous AI agents can make decisions, learn from outcomes, and complete multi-step processes with minimal human oversight.

Your idea likely falls into the second or third category, which means you’re not just saving time—you’re enabling capabilities that were previously impossible at scale.

The Three Pillars of Intelligent Automation

Every successful AI automation project rests on three pillars:

  1. Data Infrastructure: Clean, accessible data sources
  2. Intelligence Layer: The AI model or service (OpenAI, Anthropic, open-source LLMs, or specialized ML models)
  3. Integration Fabric: How the system connects to your existing tools (APIs, webhooks, RPA)

Missing any one of these pillars means building on unstable ground. The most common mistake? Jumping to the AI model before ensuring your data is accessible and your integration points are defined.

Mapping Your Idea to Technical Reality

Transforming a vague concept into an executable project requires structured thinking. Start by answering the “Automation Trinity”:

  • Trigger: What event starts this process? (A new email, a database update, a scheduled time?)
  • Transformation: What intelligence does the AI provide? (Classification, generation, summarization, prediction?)
  • Action: What happens to the output? (Send a message, update a record, create a ticket?)

Let’s say your idea is: “I want AI to automatically categorize customer support tickets and draft initial responses.”

Breaking this down:

  • Trigger: New ticket created in Zendesk/Intercom
  • Transformation: AI analyzes sentiment and topic, then drafts response
  • Action: Update ticket priority and post draft reply for human review

The Validation Sprint

Before building, validate with the “Weekend Test”: Can you manually execute this workflow in under 30 minutes? If the logic is too complex for you to explain to a human assistant, your AI isn’t ready to handle it either. Simplify first, then automate.

Building Your First Prototype

Once your idea is mapped, it’s time to build a minimal viable automation (MVA). Here’s a practical example using Python and the OpenAI API to automate content categorization:

Python
import openai

import json

from typing import Dict, List

class ContentAutomationAgent:

def init(self, api_key: str):

self.client = openai.OpenAI(apikey=apikey)

def categorizeandsummarize(self, content: str) -> Dict:

"""

Analyzes content and returns structured metadata

"""

prompt = f"""

Analyze the following content and provide:

  1. Category (Technology, Business, or Lifestyle)
  2. Sentiment (Positive, Neutral, Negative)
  3. One-sentence summary

Content: {content}

Return as JSON with keys: category, sentiment, summary

"""

response = self.client.chat.completions.create(

model="gpt-4",

messages=[

{"role": "system", "content": "You are a content analysis assistant."},

{"role": "user", "content": prompt}

],

responseformat={"type": "jsonobject"}

)

return json.loads(response.choices[0].message.content)

def batch_process(self, contents: List[str]) -> List[Dict]:

"""Process multiple content items"""

return [self.categorizeandsummarize(c) for c in contents]

Usage example

if name == "main":

agent = ContentAutomationAgent("your-api-key")

articles = [

"New breakthrough in quantum computing announced by researchers...",

"10 tips for better work-life balance in remote settings..."

]

results = agent.batch_process(articles)

print(json.dumps(results, indent=2))

This prototype demonstrates the core pattern: input → AI processing → structured output. From here, you’d add integrations—perhaps connecting to your CMS via API or triggering from a Google Sheets update.

Real-World Applications That Started as Ideas

The most successful AI automation projects often begin with specific pain points. Here are three patterns that started as “what if” questions:

Content Operations at Scale

Marketing teams use AI automation to transform raw webinar transcripts into blog posts, social threads, and email newsletters automatically. The workflow extracts key insights, reformats for different channels, and schedules publication—turning a 6-hour task into a 15-minute review process.

Intelligent Customer Routing

Instead of round-robin ticket assignment, AI analyzes incoming messages for urgency and complexity, routing technical issues to senior engineers while handling common FAQs automatically. One SaaS company reduced response time by 70% using this approach.

Document Processing Pipelines

Legal and finance teams automate invoice processing and contract review. The system extracts key data points, checks against compliance rules, and flags anomalies for human review—processing hundreds of documents in minutes rather than days.

Overcoming Common Roadblocks

Even great ideas face implementation challenges:

The Hallucination Problem: AI makes confident mistakes. Always include human-in-the-loop checkpoints for high-stakes decisions. API Rate Limits: Your automation is only as fast as your slowest API. Build in retry logic and queue systems for bulk operations. Context Windows: Large language models have token limits. For long documents, implement chunking strategies:
Python
def chunktext(text: str, maxtokens: int = 3000) -> List[str]:

"""Split text into processable chunks"""

words = text.split()

chunks = []

current_chunk = []

current_length = 0

for word in words:

current_length += len(word) + 1 # +1 for space

if currentlength > maxtokens * 4: # Approximate tokens

chunks.append(" ".join(current_chunk))

current_chunk = [word]

current_length = len(word)

else:

current_chunk.append(word)

if current_chunk:

chunks.append(" ".join(current_chunk))

return chunks

Your Next Steps

You have the idea. You have the context. Now execute:

  1. Sketch your workflow on paper—triggers, transformations, actions
  2. Choose your stack: No-code tools like Make or Zapier for simple flows; Python/Node.js for complex logic
  3. Start with one input/output pair before scaling to batch processing
  4. Measure time saved to prove ROI

The barrier to AI automation has never been lower. The tools are accessible, the APIs are documented, and the infrastructure is mature. Your idea deserves to exist beyond the “what if” stage.

AI automation workflow diagram showing data flow from input to AI processing to action
AI automation workflow diagram showing data flow from input to AI processing to action

What will you automate first?

AI Tools

AI Tools Directory – Solutions for Every Need

AI Tools Directory

Discover the perfect AI solution for every challenge. From content creation to automation, find tools that transform how you work.

🤖

AI Assistants

ChatGPT

Popular
⚡ Problem Solved

Helps with everyday tasks like writing, analysis, research, and problem-solving across multiple domains.

Key Features

File analysis (PDFs, spreadsheets, screenshots), data extraction, content summarization, conversational AI

Productivity Content Creation Data Analysis

Grok

Uncensored
⚡ Problem Solved

Uncensored AI assistant with real-time information and fact-checking capabilities integrated with X (Twitter).

Key Features

Multiple reasoning modes, deep search, image generation without restrictions, X integration

Fact-Checking Meme Creation Social Media

Claude

Coding
⚡ Problem Solved

Provides coding assistance and technical documentation with clean, reliable code generation.

Key Features

Clean code generation, code explanation, collaborative problem-solving, technical writing

Developers Coding Projects Technical Writing

Gemini

Research
⚡ Problem Solved

Handles large documents and complex information processing with massive context window.

Key Features

1 million token context window, audio overviews, podcast-style summaries

Academic Research Document Analysis Learning
🎥

Video Generation

Synthesia

Enterprise
⚡ Problem Solved

Creates professional videos without cameras, studios, or actors using AI avatars.

Key Features

240+ AI avatars, 140+ languages, training videos, explainer videos, text-to-video

Corporate Training Onboarding Marketing Videos

Google Veo

Creative
⚡ Problem Solved

Generates creative AI videos with realistic physics for social media and marketing.

Key Features

B-roll generation, audio generation (Veo 3), realistic physics simulation

Social Media Marketing Creative Projects

OpusClip

Editing
⚡ Problem Solved

Converts long videos into short, shareable social media clips automatically.

Key Features

Auto-clip selection, auto-resizing, caption generation, hook detection

Social Media Marketing Content Repurposing
🎨

Image Generation

Midjourney

Premium
⚡ Problem Solved

Creates high-quality artistic and photorealistic images for professional use.

Key Features

Photorealistic and artistic images, creative control, professional quality output

Professional Graphics Artistic Projects Marketing

Nano Banana

Fast
⚡ Problem Solved

Lightning-fast image generation and editing with extensive customization options.

Key Features

Ultra-fast generation, extensive editing capabilities, Gemini 2.5 Flash powered

Quick Images Image Editing

GPT-4o

Integrated
⚡ Problem Solved

Generates images directly within ChatGPT conversations for seamless workflow.

Key Features

Text-to-image within ChatGPT interface, conversational image creation

Quick Needs Conversations
⚙️

Productivity & Automation

n8n

Automation
⚡ Problem Solved

Automates workflows without coding using visual workflow builder.

Key Features

Visual workflow builder, API integrations, task automation, no-code platform

Process Automation Integration Workflows

Manus

AI Agent
⚡ Problem Solved

Provides AI-powered task automation and autonomous assistance.

Key Features

Autonomous task execution, multi-tool integration, intelligent automation

Complex Automation Productivity

Fathom

Meetings
⚡ Problem Solved

Automates meeting transcription and note-taking for remote teams.

Key Features

Real-time transcription, meeting summaries, action item extraction

Remote Teams Meeting Documentation

Reclaim

Scheduling
⚡ Problem Solved

Intelligently manages calendars and time blocking for busy professionals.

Key Features

Auto-scheduling, habit tracking, meeting optimization, focus time protection

Time Management Busy Professionals

Clockwise

Teams
⚡ Problem Solved

Optimizes team calendars to protect focus time and improve productivity.

Key Features

Meeting scheduling, focus time protection, team coordination

Teams Managers Remote Workers

Notion Q&A

Knowledge
⚡ Problem Solved

Enables intelligent search and retrieval within Notion workspaces.

Key Features

AI-powered search, context-aware answers, workspace integration

Notion Users Knowledge Bases
✍️

Content Creation

Rytr

Writing
⚡ Problem Solved

AI-powered content writing and copywriting for marketing and blogs.

Key Features

Multiple content types, tone adjustment, templates, SEO optimization

Marketing Copy Blog Posts Social Media

Sudowrite

Creative
⚡ Problem Solved

Creative writing assistance for authors, novelists, and screenwriters.

Key Features

Story development, character creation, plot suggestions, creative brainstorming

Fiction Writers Novelists Screenwriters

Gamma

Presentations
⚡ Problem Solved

Creates AI-powered presentations quickly with auto-generated slides.

Key Features

Auto-generated slides, design templates, content suggestions

Quick Presentations Pitch Decks

Canva Magic Studio

Design
⚡ Problem Solved

Easy graphic design with AI assistance for non-designers.

Key Features

AI-powered design suggestions, templates, image editing, brand kit

Social Media Graphics Presentations Marketing

ElevenLabs

Voice
⚡ Problem Solved

Generates realistic AI voices and voice cloning for content creation.

Key Features

Voice cloning, multilingual support, emotion control, natural speech

Voiceovers Audiobooks Content Creation

Suno

Music
⚡ Problem Solved

Creates AI-powered music from text descriptions with lyrics.

Key Features

Full song generation, multiple genres, lyrics creation, customization

Content Creators Background Music
💼

Business Tools

AdCreative

Marketing
⚡ Problem Solved

Generates AI-powered advertising creatives and copy with performance prediction.

Key Features

Ad design, copy generation, performance prediction, A/B testing

Digital Marketers Advertising Teams

Attio

CRM
⚡ Problem Solved

AI-powered CRM and relationship management for sales teams.

Key Features

Contact management, pipeline tracking, AI insights, relationship intelligence

Sales Teams Relationship Management

HubSpot Email Writer

Email
⚡ Problem Solved

AI-powered email composition for sales and marketing teams.

Key Features

Email templates, personalization, CRM integration, campaign management

Sales Teams Marketing Professionals

Teal

Career
⚡ Problem Solved

AI-powered resume optimization and job search assistance.

Key Features

Resume analysis, keyword optimization, job tracking, ATS compatibility

Job Seekers Career Changers

Guru

Knowledge
⚡ Problem Solved

Company knowledge management and intelligent search for enterprises.

Key Features

Knowledge capture, AI-powered search, browser extension, team collaboration

Enterprise Teams Customer Support
🔍

Research & Search

Perplexity

Search
⚡ Problem Solved

AI-powered search with cited sources for accurate research.

Key Features

Real-time information, source citations, conversational interface

Research Fact-Checking Learning

NotebookLM

Research
⚡ Problem Solved

Research organization and knowledge synthesis with AI insights.

Key Features

Note organization, source management, AI-powered insights, synthesis

Students Researchers Knowledge Workers

Looka

Branding
⚡ Problem Solved

AI-powered logo and brand identity creation for businesses.

Key Features

Logo generation, brand kit creation, design assets, customization

Startups Small Businesses Rebranding

Cursor

Development
⚡ Problem Solved

AI-enhanced code editor for faster and smarter development.

Key Features

AI code completion, code explanation, refactoring, pair programming

Professional Developers Software Projects

Discover the perfect AI tool for your needs. Updated regularly with the latest innovations.

Power BI DAX

01 CALCULATED COLUMN

When calculations is done on a row level

Revenue = [Price_USD] * [Sales]
02 CALCULATED MEASURES

When calculation is done on an aggregated level and don’t want to store information on a row level

Measure do not create physical values in your table. It does not increase the file size.

PySpark

Data

Filter customer data by type VIP/Regular

from pyspark.sql.functions import *  
customer=spark.sql("Select * FROM workspace.customerdata.customer")
display(customer)
df.printSchema()
df1=df.filter(df["customer_type"]=="VIP")
df0=customer.filter(col("customer_type")=="Regular")
display(df1)
# filter by customer_type and country
df1=customer.filter((customer.customer_type=="VIP") & (customer.country=='USA'))
# where condition
df2=customer.where((customer.customer_type=="VIP") & (customer.country=='USA'))
# or operator
df3=customer.where((customer.customer_type=="VIP") | (customer.country=='USA'))

Add new column withColumn Function

from pyspark.sql.functions import *  
customer=spark.sql("Select * FROM workspace.customerdata.customer")
customer =customer.withColumn("Salary", col("age")* 1000)
customer.printSchema()
display(customer)

# withColumn fuction
customer =customer.withColumn("Seniority", when(customer.age>50, "Senior").otherwise("Junior"))