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 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: |
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 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) |
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
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); |
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
package main | |
import ( | |
"math/rand" | |
"fmt" | |
) | |
type Cell struct { | |
X int | |
Y int |
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 collections import defaultdict | |
import sys | |
time = { | |
'Oslo': [ | |
{'London': 45}, | |
{'Dubai': 420}, | |
{'Melbourne': 700}, | |
], | |
'London': [ |
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 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) |