Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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 maths | |
# solving for the value of e using approaching. | |
def e(num: int) -> int: | |
return math.pow(1 + 1 / num, num) | |
for i in range(1, int(1e10), 1000): | |
# slowly aproaching towards the value of e | |
print(f"{i=} {e=}") | |
This file contains 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 requests | |
from tqdm import tqdm | |
def download_file(filename, url): | |
chunkSize = 1024 | |
r = requests.get(url, stream=True) | |
with open(filename, 'wb') as f: | |
pbar = tqdm( unit="B", total=int(r.headers['Content-Length']) ) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
# Write a shell program to do the following | |
# 1. Take first name as input from user | |
# 2. Take second name as input from user | |
# 3. Display both names individualy | |
# 4. Display the message "Welcome $first_name and $second_name" | |
# 5. Redirect this output to a file | |
( | |
# Input First Name | |
echo -n "Enter first person's name: " |
This file contains 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
#include <stdio.h> | |
#include <stdlib.h> | |
#define AVAILLISTMAX 100 | |
struct Node // Creating a Node | |
{ | |
int data; | |
struct Node *next; | |
}; |