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 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 |
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 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))) |
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
[Unit] | |
Description = pocketbase | |
[Service] | |
Type = simple | |
User = YOUR_USER | |
Group = YOUR_GROUP | |
LimitNOFILE = 4096 | |
Restart = always | |
RestartSec = 5s |
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
console.log("Hello World!") |
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 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 | |
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
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):") |
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
# 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 |
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
from flask import Flask | |
app = Flask(__name__) | |
@app.route('/') | |
def hello_world(): | |
return 'Hello, World!' | |
if __name__ == '__main__': | |
app.run() |
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
# !/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> |
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 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 |
NewerOlder