Sys Version

Fri 14 November 2025

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


import sys
print(sys.version)
3.6.8 |Anaconda, Inc.| (default, Dec 29 2018, 19:04:46) 
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)]


Score: 0

Category: basics

Read More

Sysargv1

Fri 14 November 2025

import sys
# Simulate command-line arguments
sys.argv = ['notebook_name', 'arg1', 'arg2', 'arg3']
# Access the arguments
print(f"Script name: {sys.argv[0]}")  # Usually the script name
print(f"First argument: {sys.argv[1]}")
print(f"Second argument: {sys.argv[2]}")
print(f"Third argument: {sys.argv[3]}")
Script name: notebook_name
First …

Category: sysargs

Read More

Temp-File

Fri 14 November 2025

title: "Create Temp File" author: "Rj" date: 2019-04-20 description: "-" type: technical_note draft: false


import tempfile
fp = tempfile.TemporaryFile()
fp.name
57
fp.write(b'Hey Toronto')
11
fp.seek(0)
0
fp.read()
b'Hey Toronto'
# Close the file

fp.close()


Score: 5

Category: file-utils

Read More

Temp-File-In-Context-Manager

Fri 14 November 2025

title: "Temp File in Context Manager" author: "Rj" date: 2019-04-20 description: "-" type: technical_note draft: false


import tempfile
with tempfile.TemporaryFile() as fp:
    fp.write(b'Hey Toronto')
    fp.seek(0)
    print(fp.read())
b'Hey Toronto'
fp
<_io.BufferedRandom name=59>
fp.read()
---------------------------------------------------------------------------

ValueError                                Traceback (most recent call last)

<ipython …

Category: file-utils

Read More

Template

Fri 14 November 2025

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




Score: 0

Category: basics

Read More

Template-Copy1

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'


Score: 0

Category: tensorflow-work

Read More

Template-Copy2

Fri 14 November 2025

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


print('Hello Toronto')
Hello Toronto


Score: 0

Category: webreader

Read More

Test233Q4

Fri 14 November 2025
import math_csp_util as msu
msu.add(10, 20)
30
!pip show catboost
Name: catboost
Version: 1.2.7
Summary: CatBoost Python Package
Home-page: https://catboost.ai
Author: CatBoost Developers
Author-email: 
License: Apache License, Version 2.0
Location: /home/rajaraman/miniconda3/envs/ml312/lib/python3.12/site-packages …

Category: resume-analysis

Read More

Testtwo

Fri 14 November 2025
import matplotlib.pyplot as plt

# Data
x = [1, 2, 3, 4, 5]
y = [2, 4, 6, 8, 10]

# Create a plot
plt.plot(x, y)

# Add labels and title
plt.xlabel('X-axis')
plt.ylabel('Y-axis')
plt.title('Simple Line Plot')

# Display the plot
plt.show()

png



Score: 0

Category: one

Read More
Page 136 of 146

« Prev Next »