Session-2

Fri 14 November 2025

title: "Session 2" 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)
b = tf.constant(2.8)
c = a + b
c
<tf.Tensor 'add …

Category: tensorflow-work

Read More

Session-And-With-Block

Fri 14 November 2025

title: "Session and With Block" 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.Variable(2)
b = a * 4
b
<tf.Tensor 'mul:0' shape=() dtype=int32 …

Category: tensorflow-work

Read More

Shape-Factory-Pattern

Fri 14 November 2025

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==0.21.0

from abc import ABC …

Category: mythraki

Read More

Show-Image

Fri 14 November 2025
!python --version
Python 3.10.5
from IPython.display import Image, display
# Path to your PNG file
image_path = 'deer.jpg'
# Display the image
display(Image(filename=image_path))

jpeg



Score: 5

Category: image-work

Read More

Show-Negative-Values-Red

Fri 14 November 2025

title: "Show Negative values red" author: "Rj" date: 2019-09-05 description: "List Test" type: technical_note draft: false


import pandas as pd
data = {
    'Month' : [1, 2, 3],
    'Temp' : [7, -18, -20]
}
data
{'Month': [1, 2, 3], 'Temp': [7, -18, -20]}
type(data)
dict
df = pd.DataFrame(data)
df

Category: data-wrangling

Read More

Simple-Bar

Fri 14 November 2025

import matplotlib.pyplot as plt; plt.rcdefaults()
import numpy as np
import matplotlib.pyplot as plt

objects = ('Python', 'C++', 'Java', 'Perl', 'Scala', 'Lisp')
y_pos = np.arange(len(objects))
performance = [10,8,6,4,2,1]

plt.bar(y_pos, performance, align='center', alpha=0.5)
plt.xticks(y_pos, objects)
plt.ylabel …

Category: barchart

Read More

Simple-Bar-Chart

Fri 14 November 2025
import pylab as pl
import datetime

data = """0 14-11-2003
1 15-03-1999
12 04-12-2012
33 09-05-2007
44 16-08-1998
55 25-07-2001
76 31-12-2011
87 25-06-1993
118 16-02-1995
119 10-02-1981
145 03-05-2014"""

values = []
dates = []

for line in data.split("\n"):
    x, y = line.split()
    values.append(int(x))
    dates.append(datetime.datetime.strptime …

Category: barchart

Read More

Simple-Bar-Chart-2

Fri 14 November 2025
import matplotlib.pyplot as plt; plt.rcdefaults()
import numpy as np
import matplotlib.pyplot as plt

objects = ('Python', 'C++', 'Java', 'Perl', 'Scala', 'Lisp')
y_pos = np.arange(len(objects))
performance = [10,8,6,4,2,1]

plt.bar(y_pos, performance, align='center', alpha=0.5)
plt.xticks(y_pos, objects)
plt.ylabel …

Category: barchart

Read More

Simple-Beautifulsoup

Fri 14 November 2025

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


import requests
from bs4 import BeautifulSoup
page = requests.get('https://github.com/getify/BikechainJS')
soup = BeautifulSoup(page.text, 'html.parser')    

print(soup) 
<!DOCTYPE html>

<html lang="en">
<head>
<meta charset="utf-8"/>
<link href="https://github.githubassets …

Category: webreader

Read More

Simple-Calculation-Graph

Fri 14 November 2025

title: "Template" 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 = (b + c) * (c + 2)
const = tf.constant(2.0, name='const')
# create variables
b = tf.Variable(2 …

Category: tensorflow-work

Read More
Page 129 of 146

« Prev Next »