Skip to content

Instantly share code, notes, and snippets.

View NotoriousArnav's full-sized avatar
😃
Available

Arnav Ghosh NotoriousArnav

😃
Available
View GitHub Profile
user_float = float(input("enter any number: "))
if user_float==0:
print("Zero")
elif user_float>0:
print("+ve")
else:
print("-ve")
# Goal: To get Square and Square root of any number given by user
num= float(input ("Enter a number "))
sq=num*num
sqrt=num **(1/2)
print (f"your square of the given is {sq} and square root is {sqrt}")
# Goal: To get Square and Square root of any number given by user
num= float(input ("Enter a number "))
sq=num*num
sqrt=num **(1/2)
print (f"your square of the given is {sq} and square root is {sqrt}")
import random
greetings=["Namaste", "Hola", "Hello", "Hi", "Subheccha", "Wenhou", "Konichiwa", "annyeonghasibnikka"]
name = input("Enter Your Name: ")
print(random.choice(greetings), name, sep=" ")
@NotoriousArnav
NotoriousArnav / app.py
Created September 19, 2022 19:10
A Sample Discord Webhook Bot
#!/usr/bin/env python3
import requests
import os
"""
This Script Faciliates with Easy Sending of Messages using WebHooks for Discord Channels.
For Example Use Case, NASA APOD Integration has been Done here.
To send a Message to Specified Channel, Just grab the webhook of the Channel and use the brodcast_message function to send the Message.
To grab latest NASA APOD Response Use apod_response function.
The Only Dependencies of this Script is requests and os
@NotoriousArnav
NotoriousArnav / social_media_ban.md
Created September 23, 2022 16:01
A comprehensive Document on Social Media Bans and the Pros/Cons of it

Social Media Ban (Pros & Cons)

Let us Imagine a Hypothetical Scenario where, a College "Good Students and No Ragging Institute (GSNR)" council members decides to impose a ban on all major Social Media Platforms like: TextBook, Bitter, GuruGram, and ChutkiChat and etc, so this Document will discuss the aftermath of the Situation.

PROS

  1. Student depression rates will go down. As per a article on the Internet, Social Media Causes loneliness and clinical Depression, which can be found in the Journal of Social and Clinical Psychology in 2018,
@NotoriousArnav
NotoriousArnav / social_media_ban.md
Created September 23, 2022 16:06
A comprehensive Document on Social Media Bans and the Pros/Cons of it

Social Media Ban (Pros & Cons)

Let us Imagine a Hypothetical Scenario where, a College "Good Students and No Ragging Institute (GSNR)" council members decides to impose a ban on all major Social Media Platforms like: TextBook, Bitter, GuruGram, and ChutkiChat and etc, so this Document will discuss the aftermath of the Situation.

PROS

  1. Student depression rates will go down. As per a article on the Internet, Social Media Causes loneliness and clinical Depression, which can be found in the Journal of Social and Clinical Psychology in 2018,
@NotoriousArnav
NotoriousArnav / Flask 101.html
Created April 18, 2023 08:54
Flask 101 Webpage
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><title>Flask 101 : Webinar on Web Development (for Beginners)</title><style>
/* cspell:disable-file */
/* webkit printing magic: print all background colors */
html {
-webkit-print-color-adjust: exact;
}
* {
box-sizing: border-box;
-webkit-print-color-adjust: exact;
}
try:
import wikipedia, langchain, dotenv
except ImportError:
os.system("python -m pip install wikipedia langchain python-dotenv")
print("Rerun the app app since wikipedia got reinstalled")
exit()
from langchain.llms import OpenAI
from langchain.agents import load_tools, initialize_agent
from langchain.chains import LLMChain, ConversationChain
@NotoriousArnav
NotoriousArnav / ascii_cereal.html
Created September 23, 2023 14:11
Have some cereal in the Morning.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<script src="https://cdn.tailwindcss.com"></script>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Ubuntu+Mono&display=swap" rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1.0">