Skip to content

Instantly share code, notes, and snippets.

View srisankethu's full-sized avatar

Sri Sanketh Uppalapati srisankethu

View GitHub Profile
@srisankethu
srisankethu / va.py
Created October 16, 2021 06:26
Wolfram Virtual Assistant
import speech_recognition as sr
from gtts import gTTS
from pydub import AudioSegment
from pydub.playback import play
from io import BytesIO
from threading import Thread
import wolframalpha
import os
class VirtualAssistant:
@srisankethu
srisankethu / cowin.py
Created May 26, 2021 13:37
Find available slots in vaccination centers near you(PIN code search)
import requests
from selenium import webdriver
def search_by(driver, key, value):
tab_buttons = driver.find_elements_by_xpath("//div[@role = 'tab']")
if(key == 'PIN'):
tab_buttons[1].click()
pin_input = driver.find_element_by_xpath("//input[@data-placeholder = 'Enter your PIN']")
pin_input.send_keys(value)
var image = document.getElementsByTagName("img")[0];
function strip_exif_metadata(buffer, format){
var dataview = new DataView(buffer);
var i = 0, offset = 0, recess = 0;
var chunks = [];
if (dataview.getUint16(offset) == 0xffd8){
offset += 2;
var uint16_value = dataview.getUint16(offset);
package main
import (
"math/rand"
"fmt"
)
type Cell struct {
X int
Y int
@srisankethu
srisankethu / get_cheapest_shortest_path.py
Created August 26, 2018 11:48
Usage: ``python get_cheapest_shortest_path.py 'city1' 'city2'
from collections import defaultdict
import sys
time = {
'Oslo': [
{'London': 45},
{'Dubai': 420},
{'Melbourne': 700},
],
'London': [
@srisankethu
srisankethu / main.py
Last active April 16, 2018 12:59
Press "C" to play
import pygame
import math
import numpy as np
import random
WHITE = (255, 255, 255)
RED = (255, 0, 0)
GREEN = (0, 255, 0)
BLUE = (0, 0, 255)
BLACK = (0, 0, 0)