Posts

Showing posts from July, 2023

Awesome Python Scripts

  1. Convert JSON to CSV import json if __name__ == '__main__' : try : with open ( 'input.json' , 'r' ) as f: data = json.loads(f.read()) output = ',' .join([*data[ 0 ]]) for obj in data: output += f'\n {obj[ "Name" ]} , {obj[ "age" ]} , {obj[ "birthyear" ]} ' with open ( 'output.csv' , 'w' ) as f: f.write(output) except Exception as ex: print ( f'Error: { str (ex)} ' ) 2. Password Generator import random import string total = string .ascii_letters + string .digits + string .punctuation length = 16 password = "" .join(random.sample(total, length)) print (password) 3. String search from multiple files import os text = input ( "input text : " ) path = input ( "path : " ) # os.chdir(path) def getfiles ( path ): f = 0 os.chdir(path) files = os.listdir() # ...

Developer desktops with the Oracle Linux Cloud Developer image

Image
  Sometimes you need something with more grunt than a basic laptop. So why not run develop and test your application in the cloud? And at other times you just wish all the tools you need are installed for you. Everything from Java to MySQL is pre-installed in the Oracle Linux Cloud Developer image. The Oracle Linux Cloud Developer has all the tools ready to go. You just need to make a start. Oracle Linux Cloud Developer Image Start your Oracle Linux Cloud Developer journey with a VNC connection. Setup the server for VNC The image of the Oracle Linux Cloud Developer has a number of components already installed. To list these run the following: # list the installed groups dnf group list --installed dnf group list --available ‘Server with GUI’ is already pre-installed into Oracle Linux Cloud Developer. This means we are ready to go with a GUI. The GUI is going to be the Gnome desktop. In addition, the ‘tigervnc-server’ VNC server software is also pre-installed into the Oracle Linux Cl...