Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View nnelluri928's full-sized avatar

Narasimha nnelluri928

  • vmware
  • Cupertino CA
View GitHub Profile
@nnelluri928
nnelluri928 / DcokerNotes.md
Last active September 23, 2021 21:09
DockerNotes

1.create Docker File azureuser@netbox01:~/docker$ cat > Dockerfile << EOF

FROM centos:latest RUN apt-get install -y httpd COPY file1.txt /var/www/html CMD ["/sbin/httpd", "-D", "FOREGROUND"] EOF azureuser@netbox01:~/docker$ cat Dockerfile FROM centos:latest RUN apt-get install -y httpd

@nnelluri928
nnelluri928 / os_module_notes.md
Created September 29, 2021 17:28
os module notes

In [22]: import os

In [23]: os.path.dirname("/Users/nnelluri/Desktop/nnelluri/python3-proj/add_device.py") Out[23]: '/Users/nnelluri/Desktop/nnelluri/python3-proj'

In [24]: import pathlib

In [25]: path=pathlib.Path("/Users/nnelluri/Desktop/nnelluri/python3-proj/add_device.py")

In [26]: path.parent

@nnelluri928
nnelluri928 / itertools_module_notes.md
Last active September 30, 2021 05:26
itertools module notes

In [30]: num_list = [1, 2, 3]

In [31]: from itertools import combinations

In [32]: comb = combinations(num_list,2)

In [33]: for pair in list(comb): ...: print(pair) ...: (1, 2)

In [22]: import os

In [23]: os.path.dirname("/Users/nnelluri/Desktop/nnelluri/python3-proj/add_device.py") Out[23]: '/Users/nnelluri/Desktop/nnelluri/python3-proj'

In [24]: import pathlib

In [25]: path=pathlib.Path("/Users/nnelluri/Desktop/nnelluri/python3-proj/add_device.py")

In [26]: path.parent