Skip to content

Instantly share code, notes, and snippets.

View Kakarot-2000's full-sized avatar
💭
studying graphql

Rohan Krishna Ullas Kakarot-2000

💭
studying graphql
  • India
View GitHub Profile
token = "API_KEY"
fetch("http://127.0.0.1:5000/getSummary", {
"body": JSON.stringify({"url":"https://owasp.org/www-community/attacks/csrf"}),
"method": "POST",
"headers":{
"Content-Type": "application/json"
}
}).then(response=> response.body). then(rb => {
const reader = rb.getReader();
return new ReadableStream({
start(controller) {
import json
from flask import Flask, request, jsonify, Response
import nlpcloud
from flask_cors import CORS, cross_origin
import trafilatura
from dotenv import load_dotenv
import os
app = Flask(__name__)
CORS(app, support_credentials=True)
flask
flask-cors
trafilatura
nlpcloud
python-dotenv
flask
flask-cors
nlpcloud
trafilatura
<!doctype html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta charset="utf-8">
def gen_frames(): # generate frame by frame from camera
while True:
# Capture frame by frame
success, frame = camera.read()
if not success:
break
else:
gray_img= cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
faces_detected = face_haar_cascade.detectMultiScale(gray_img, 1.32, 5)
from apscheduler.schedulers.blocking import BlockingScheduler
from run import sendMail
sched = BlockingScheduler()
@sched.scheduled_job('interval', minutes=1)
def timed_job():
print('This job is run every one minute.')
sendMail()
clock: python clock.py
from apscheduler.schedulers.blocking import BlockingScheduler
from run import sendMail
sched = BlockingScheduler()
@sched.scheduled_job('cron', day_of_week='mon-fri', hour=8)
def scheduled_job():
print('This job is run every weekday at 8 AM.')
sendMail()
sched.start()