This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| userDB = ['Anmol','Mohit','Meet','Darshin','Prasham','Yash','Harsh','Shaunak','Rushad'] | |
| kdc_name = 'MyKDC' | |
| session_key1 = 1 | |
| tgt_private_key = 3 | |
| user_private_key = 5 | |
| session_key2 = 2 | |
| service_key_private = 10 | |
| def client_login(username,user_ip): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| def initialize(): | |
| graph=np.array([ | |
| [0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,140, 118, 0 ,0, 75], | |
| [0, 0 ,0 ,0 ,0 ,211 ,90 ,0 ,0 ,0 ,0 ,0 ,0 ,101 ,0 ,0 ,0 ,85 ,0 ,0], | |
| [0 ,0 ,0 ,120 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,138 ,146 ,0 ,0 ,0 ,0 ,0], | |
| [0 ,0 ,120 ,0, 0, 0, 0, 0, 0, 0, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0], | |
| [0, 0, 0, 0, 0, 0, 0, 86, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], | |
| [0, 211, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 99, 0, 0, 0, 0], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <canvas id="gameCanvas"></canvas> | |
| <script> | |
| window.onload = function(){ | |
| canv = document.getElementById("gameCanvas"); //canvas id used for something???? | |
| canv.width=screen.width; | |
| canv.height=screen.height; | |
| ctx = canv.getContext("2d"); //context of the game i.e. 2D | |
| document.addEventListener("keydown",keyPush); //listening for a keyboard input | |
| setInterval(game,1000/14); //refreshing or rendering the game in these many seconds |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.io.*; | |
| import java.util.*; | |
| class project | |
| { | |
| double pr,at=0.03,fs=0.05;//at=airport taxes(3%), fs=fuel surcharge(5%); | |
| int a,a1,a2,a3,a4,a5,b1,b2,b3,b4,b5,c1,c2,c3,c4,c5,ch,j,l,b,n,k=0,m=0,q=0,f=0,g=0,h=0,o=0,p=0,pay,r=0,s=0,t=0,u=0,x,y,z,cl,num,year,dat,mon,enter,flag; | |
| String or="",de="",cot="",dt,em,mod="",ad1,ad2,ad3,ad4,ad5,ad6,ad7,ad8; //or=origin,de=destination,n=flight number,pr=price | |
| long ph_no; | |
| String name[]=new String[100]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| from queue import PriorityQueue | |
| def initialize(): | |
| graph=np.array([ | |
| [0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,1 ,1 ,0 ,0 ,1], | |
| [0 ,0 ,0 ,0 ,0 ,1 ,1 ,0 ,0 ,0 ,0 ,0 ,0 ,1 ,0 ,0 ,0 ,1 ,0 ,0], | |
| [0 ,0 ,0 ,1 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,1 ,1 ,0 ,0 ,0 ,0 ,0], | |
| [0 ,0 ,1 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,1 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0], | |
| [0 ,0 ,0 ,0 ,0 ,0 ,0 ,1 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| #numpy is used for working with arrays | |
| inputX, outputY = input("Enter the number of input and output nodes:").split(' ') | |
| inputX= int(inputX) | |
| outputY= int(outputY) | |
| alpha = 0.8 | |
| lines=np.zeros((outputY,inputX)) | |
| outs = [0]*outputY | |
| Xvals = [0]*inputX | |
| Xvals = np.asarray(Xvals) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ciphertext=input("Enter the text: ") | |
| ciphertext = ciphertext.lower() | |
| key=input("Enter the Key: ") | |
| key = key.lower() | |
| hi=[0]*len(ciphertext) | |
| if(len(ciphertext)==len(key)): | |
| print("Length are same : ") | |
| for i in range(0,len(key)): | |
| hi[i]=chr(((ord(ciphertext[i])+ord(key[i])-194)%26)+97) | |
| print(hi) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| p = int(input('Enter the First Prime No. : ')) | |
| q = int(input('Enter the Second Prime No. : ')) | |
| n=p*q | |
| z=(p-1)*(q-1) | |
| def gcd(x, y): | |
| while(y): | |
| x, y = y, x % y | |
| return x |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from graphics import * | |
| import time | |
| def DrawEllipse(R1,R2): | |
| global p2 | |
| x = 0 | |
| y = R2 | |
| r1 = R1*R1 | |
| r2= R2*R2 | |
| p1 = r2-(r1*R2) + (r1/4) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from graphics import * | |
| import time | |
| def DAA(x1, y1, x2, y2): | |
| dx = abs(x2 - x1) | |
| dy = abs(y2 - y1) | |
| slope = float(dy) / float(dx) | |
| win = GraphWin('DAA Line', 600, 600) | |
| if slope > 1: | |
| temp1 = x1 |
NewerOlder