Yearly Archive: 2020
List Slices
While opening a file as an example. while open(“ext.ext”, “r”) as f: ….output = f.readlines() ….len(output) ….print(output[0:5]) This would create a list and 1 element per lines The Len would be the total of element in the list The output…
Read more
Lists
Creating a list in Python my_list = [ ] type(my_list) my_list = [‘haha’, ‘100’, 100, 2.0] To access element from a list you can choose each of them starting by element 0 my_list[0] haha my_list[3] 2.0 To change an element…
Read more
GIT
Commands : mkdir directory git init will create the master branch git status git branch git add file1,file2,etc…. git rm file1,file2,etc…. git rebase “branch” git merge “branch” git commit -m “comments” tree . git diff git log git reset…
Read more
Files , read write open !
Basic commands to understand the open command f = open(“text.ext”) <— default mode is read “r” f.read() f.readline() f.readlines() Once read, if you need to go back to the beginning of the file : f.seek(X) output = f.”read.option”() print(output) =…
Read more
Create shortcuts in Linux
Python Basics
Operators : = += *= != < > <= >= == %= **= //= IN NOT IN AND OR XOR NOT Numbers : Integer : Number without any decimal Float : Number with decimal Complex : Number with a letter…
Read more
Netshot
Netshot is a powerfull and simple free software for network engineer, it is use to backup/push/compare/etc… configuration of multiple vendors. Github : https://github.com/netfishers-onl/Netshot/wiki/Installing-Netshot-on-Ubuntu-16-or-later-(or-any-Debian-based-distribution) Netshot : http://www.netfishers.onl/netshot Installation : I use Ubuntu Server 18.04, and Java 8 . To install Java 8 since…
Read more
Aruba Switching and Routing Basics
This will cover the basic commands by comparing them with Cisco since I will use Cisco as a reference. This is going to be messy at 1st but then i will clean up this section. Commands : Access enable : …
Read more