This file contains hidden or 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/env python | |
| # Before you run this script make sure Flask-SQLAlchemy is installed in | |
| # your virtual environment | |
| from flask import Flask | |
| from flask_sqlalchemy import SQLAlchemy | |
| app = Flask(__name__) | |
| app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///' # in-memory |
This file contains hidden or 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
| default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam' | |
| default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes' | |
| default['sshd']['sshd_config']['PasswordAuthentication'] = 'no' |
This file contains hidden or 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
| ======= Interviews ========== | |
| # Duration July - August 2021 | |
| ## Django: | |
| * Flow of Django | |
| * Django Middlewares | |
| * Django request/response cycle | |
| * API security(auth based token and others) | |
| * Avoid deadloak in django ( F() ) |
This file contains hidden or 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
| # Create your views here. | |
| from django.contrib.auth.models import User | |
| from rest_framework.views import APIView | |
| from rest_framework import status | |
| from .serializers import UserSerializer | |
| from rest_framework.response import Response | |
| from django.contrib.auth import authenticate, login | |
| import pyotp | |
| class Register(APIView): |
This file contains hidden or 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 speech_recognition as sr | |
| import pyttsx3 | |
| import openai | |
| openai.api_key = "Your API Key" | |
| engine = pyttsx3.init() | |
| voices = engine.getProperty('voices') | |
| engine.setProperty('voices', voices[1].id) |
OlderNewer