If you can define the language like Python for you Travis config file, then the following tip is NOT required … More
Tag: python
[Ansible] – How to upgrade for python3?
Following the installation steps. $ pip3 install –upgrade setuptools pip $ pip install –user ansible After the python3 be already … More
[Python] – Code to get unique values of some string attribute in a json.
#!/usr/bin/env python import re if __name__ == ‘__main__’: lines = [line.rstrip(‘\n’) for line in open(‘file.json’)] ids = set() for line … More
[Python] – What is @something above any method ?
The name of this is decorator. Normally you will see @staticmethod and @classmethod. This annotations call a function in your method. Definition … More
[Python] – How to run a python file ?
It’s really easy you can use : $python fileName.py
[Python] – How to open a python shell in the terminal ?
It’s so easy you can use the command : python