Skip to content

Instantly share code, notes, and snippets.

View pranav1698's full-sized avatar
🎯
Focusing

Pranav Kulshrestha pranav1698

🎯
Focusing
View GitHub Profile

CODEHEAT

CODEHEAT 2018 Work - Pranav Kulshrestha

Projects

@pranav1698
pranav1698 / hangman.py
Created May 21, 2019 09:13
Python-Hangman-Game
import time
import random
# Welcome
name = input('What is your name? \n')
print("Hello, " + name + " Ready for hangman!")
print(' ')
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<!DOCTYPE html>
<html>
<head>
<title>Flask Form</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
import os
import re
from flask import Flask, render_template
# Initialize the flask application
app = Flask(__name__)
@app.route('/')
def index():
return render_template('index.html')
{% extends "master.html" %}
{% block content %}
<div class="container">
<h2>Contact Form</h2>
<form method="POST" class="main-form">
<div class="form-group">
<label for="first_name">First Name *</label>
<input type="text" class="form-control" id="first_name" name="first_name" placeholder="Enter First Name" required>
</div>
<div class="form-group">
import os
import re
from flask import Flask, render_template, request
# Initialize the flask application
app = Flask(__name__)
@app.route('/', methods=['GET', 'POST'])
def index():
if request.method == 'POST':
@pranav1698
pranav1698 / sr.py
Created October 16, 2019 05:05
Microphone Speech Recognition
import speech_recognition as sr
r=sr.Recognizer()
with sr.Microphone() as source:
r.adjust_for_ambient_noise(source, duration=5)
print("Say")
audio = r.listen(source)
try:
print(r.recognize_sphinx(audio))