Skip to content

Instantly share code, notes, and snippets.

View raghavmri's full-sized avatar
🎯
Focusing

Raghav Mrituanjaya raghavmri

🎯
Focusing
View GitHub Profile
@raghavmri
raghavmri / app.py
Created January 12, 2023 11:57
Automatic Attendance System
import numpy as np
import speech_recognition as sr
import cv2
import face_recognition
from datetime import datetime
from core import *
from db import *
from vars import *
from art import text2art
@raghavmri
raghavmri / Concatenation.py
Created December 24, 2022 07:37
Added Two lists
import time
a = []
b = []
for i in range(1000000): # Adding 1000000 element to both the lists
a.append(i)
b.append(i+10)
start_time = time.time()
c = a+b # Adding The lists using + operator
print("Time Taken To Concatenate using + Operator {}s".format(round(time.time()-start_time, 4)))
[Unit]
Description = pocketbase
[Service]
Type = simple
User = YOUR_USER
Group = YOUR_GROUP
LimitNOFILE = 4096
Restart = always
RestartSec = 5s
console.log("Hello World!")
import random
import string
# In this video, we'll create a simple random password generator for staying safe.
# Let's import the required modules first
# Now we will create a function to generate random characters
data = dict()
def add_data():
while True:
name = input("Name: (type n to exit):")
if name == "n":
break
while True:
number = input("Number: (type n to exit):")
# Q14 A
string = input()
sub_string = input()
string.count(sub_string)
# Q14 B
# 1. ('b', 'o', 'o', 'k')
# 2. (1, 2, 4)
# 3. ('Riya', 'Riya', 'Riya')
# 4. 74
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello_world():
return 'Hello, World!'
if __name__ == '__main__':
app.run()
@raghavmri
raghavmri / python_email.py
Last active March 16, 2022 15:45
A simple way of sending emails using python
# !/usr/bin/python
import smtplib
sender = 'sender@fromdomain.com'
receivers = ['receiver@todomain.com']
# Your Email Meta Data and your message
message = """
From: From Person <sender@fromdomain.com>
To: To Person <receiver@todomain.com>
@raghavmri
raghavmri / simple_rest_api.py
Created December 12, 2021 05:41
A simple REST API using Python and FastAPI
import uvicorn # pip install uvicorn
from fastapi import FastAPI # pip install fastapi
from typing import Optional
# Create the FastAPI application
app = FastAPI()
# A simple example of a GET request