Skip to content

Instantly share code, notes, and snippets.

View rushout09's full-sized avatar

Rushabh Agarwal rushout09

View GitHub Profile
@rushout09
rushout09 / parkshed_invoices_download.py
Created July 31, 2022 04:41
Small python script to download all parkshed invoices at once. Just login to parkshed with phone number and otp. copy the authorization token and customer id from the network tab by doing inspect element.
import requests
from pathlib import Path
customer_id = input("Input customerId.")
bearer_token = input("Bearer token")
headers = {
"authorization": bearer_token
}
@rushout09
rushout09 / cowin.py
Created May 6, 2021 20:33
Cowin Vaccine Email notification python code.
import requests
import datetime
import smtplib
import time
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
# Disable 2fa and allow less secure app access on your sender's gmail account
# if too much work then subscribe here to get updates: https://forms.gle/cEFnEVM7nwvaXsLa6
sender = '[email protected]'
/* Hidden stub code will pass a root argument to the function below. Complete the function to solve the challenge. Hint: you may want to write one or more helper functions.
The Node struct is defined as follows:
struct Node {
int data;
Node* left;
Node* right;
}
*/
#include <climits>
Test Case 1
Input (stdin)
4
9 8 7 6
Expected Output
6 7 8 9
#include <stdio.h>
#include <stdlib.h>
struct node {
int data;
struct node *next;
};
struct node* add(struct node *h,int v)
{
struct node *t;
t = (struct node *)malloc(sizeof(struct node));
@rushout09
rushout09 / Push_element _in_stack.txt
Last active December 17, 2018 03:46
A program to perform the push operation in stack.
#Test Case 1
Input (stdin)
6
3 5 9 1 12 15
Expected Output
Top=15
@rushout09
rushout09 / sorted_insertion_linked_list.c
Created December 16, 2018 15:51
A Teacher correct the exam answersheets of a class. She decides to arrange the papers in the ascending order of the marks as she corrects the answersheets. Write a function to insert the marks in a Singly linked list in ascending order from the given marks. INPUT First line contains 1 int N (number of sheets). Second line contains N integers (ma…
#include <stdio.h>
#include <stdlib.h>
struct node{
int data;
struct node *next;
};
struct node *head;
void disp(){
printf("Marks\n");
struct node *p = head;