Posts

Aws services that you might like

AWS is one of the largest cloud computing platform in world. which offers more than 200 University featured resources, from the very beginning of infrastructure to the deep of machine learning. AWS offers more features and solutions than the other provider and has free tiers with access to AWS console, where users can control their ministrations. Let's see some of the options for AWS services: 1. Amazon S3 (Simple Storage device) Amazon S3 is one among the simplest AWS services because it stores, retrieves the info in cloud computing. Amazon S3, at its centre, encourages object storage, giving maximum scalability, data availability, security, and performance. Organizations of giant sizes can use S3 for storage and ensure large sums of knowledge for various use cases, for instance , sites, applications, backup, and more. Amazon S3'sS3's intuitive management features empower the frictionless organization of knowledge and configurable access controls. 2. Amazon EC2 (Elastic co...

patterns

import random import numpy as np def random_matrix(matrix_width,matrix_height): matrix=[] for i in range(matrix_width*matrix_height): matrix.append(random.randint(0,100)) return (matrix) def form_dna(max_width): for i in range(max_width): if i>max_width/2: spacing=max_width-i else: spacing=i-1 if i==1 or i==max_width: print(f"{' '*40}0") elif i%2==0: print(f"{' '*(40-spacing)}0{' '*spacing*2}0") else: print(f"{' '*(40-spacing)}0{'0'*spacing*2}0") if __name__ == '__main__': while True: form_dna(20)

My first kivy game--pong ball

 ##### pong.kv file##### <pongBall>: size:100,100 canvas: Ellipse: pos:self.pos size:self.size <pongPaddle>: size:50,300 canvas: Rectangle: pos:self.pos size:self.size <pongGame>: ball:pong_ball player1:playerLeft player2:playerRight canvas: Rectangle: pos :self.center_x -5 ,0 size:10,self.height Label: font_size:70 center_x:root.width/4 top: root.top-50 text:str(root.player2.score) Label: font_size:70 center_x:root.width*3/4 top: root.top-50 text:str(root.player1.score) pongBall: id:pong_ball center:self.parent.center pongPaddle: id:playerLeft x:root.x center_y:root.center_y pongPaddle: id:playerRight x:root.width-self.width center_y:root.center_y #main.py file from kivy.app import App from kivy.uix.widget import Widget from kivy.properties import NumericProperty , ReferenceListProperty,ObjectProperty   from kivy.vector import Vector from kivy.clock import Clo...

Colur foll multicolored

 from tkinter import * from random import choice lis=["green","blue","red","black","white","yellow"] root=Tk() root.geometry("1040x1900") c1=Canvas(root,height=1900,width=1040,background="grey") c1.pack(fill="both") def texts(row,column):  text=color()  fill=color()  while text==fill:   fill=color()  c1.create_text(row,column,text=text,fill=fill,font="comicsanns 10") def color():  return str(choice(lis)) height=100 def make():   texts(100,height)  texts(300,height)  texts(500,height)  texts(700,height)  texts(900,height) while height<1900:   make()  height+=200  root.mainloop()

Query fecther

 #wolfram alpha api   import wolframalpha # Taking input from user question = input('Question: ') # App id obtained by the above steps app_id = "T7JEE3-8VXU93896P" # Instance of wolf ram alpha # client class client = wolframalpha.Client(app_id) # Stores the response from # wolf ram alpha res = client.query(question) # Includes only text from the response answer = next(res.results).text print(answer)

Snake water gun console game

 import random  def user_input():     inp=input("enter\n s - snake\n w -water \n g - gun\n")      return(inp)        def bot_choice():     choice_list=["s","g","w"]     choice=random.choice(choice_list)     return(choice) user_win=0 bot_win=0 tie=0    def result(user, bot):          global user_win     global bot_win     global tie          if user == "s" and bot=="g":                 print(f"You chose {user} and bot chose {bot}\n bot wins")         bot_win+=1     elif user == "g" and bot=="w":                   print(f"You chose {user} and bot chose {bot}\n bot wins")          bot_win+=1      elif user == "w" and bot=="s":          print...

Clutter organizer

 import os,sys #getting cwd cwd=os.getcwd() print(f"folder : {cwd}\n\n") #listing files and removing lis= os.listdir() if lis==["organizer.py"]:  print(f"No files found in folder : {os.getcwd()}")  sys.exit() lis.remove("organizer.py") files=lis.copy() class main:  def __init__(self):   pass     def getext(ext_name):   exts=[fil for fil in files if os.path.splitext(fil)[1].lower() in ext_name]   return exts  def create_if_not(folder):      if not os.path.exists(folder):       os.makedirs(folder)  def move(foldername,filee):       for fi in filee:                     os.replace(fi,f"{cwd}/{foldername}/{fi}")      #===creating folders===# print("=========================================") print("Defining folder's") main.create_if_not("python_Images") main.create_if_not("python_Docs") main.create_if_not("python_...