Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
shyamkanani authored Jul 10, 2018
2 parents bfea036 + fcbcc16 commit b071604
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 1 deletion.
2 changes: 2 additions & 0 deletions windows/activities.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ NOTE: Try different expression to make B.E.N.J.I. more secure. Make sure to make
NOTE: All the recorded files will be saved on the desktop. Make sure that the file names should not be same. "input.avi" and "input.mp3" have no conflicts. But "input.avi" and "input.avi" will result into conflicts.
* "***images to video*** _time_". Here time is the display time of each image. For this feature to run, you should create a folder "Images" on desktop. Add the images to the folder and rename them as "img001.jpg", "img002.jpg" and so on. After running the command, you will get the video in the same folder in ".avi" format.
* "***lookfor/find*** _Filename_ _PathWhereYouWantToSearch_" to look for a file at a specified location and open it. Also you can open files from C drive, D drive, Desktop, Documents, Downloads by saying- find/lookfor in <C or D drive/Documents/Desktop?downloads>. C and D drive can be opened by saying- lookfor/find C/D drive(Version: Microsoft Windows [Version 10.0.16299.431]).
* "***draw graph for*** _formula_ ***from*** _Upper-limit_ ***to*** _Lower-limit_" to plot graph for formula like(x^n+ax^m+b ...) for example,
_draw graph for x**2+4*x+6 from -100 to 100_.
* "***add event in google calendar*** to add event on your google calendar, type(or say) in the following format: "add event <event_name> <start date in format yyyy-mm-dd> to <end date in format yyyy-mm-dd>" and it will save the event on your google calendar.
* "***play/stream/queue*** _Song/VideoName_" to play any song or video on Youtube.
* "***download video*** _SongName_" to download video.
Expand Down
31 changes: 31 additions & 0 deletions windows/benji.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,18 @@
import dataset
import trainer
import recognizer
import matplotlib.pyplot as plt
import numpy as np

import httplib2
import os

from apiclient import discovery
from oauth2client import client
from oauth2client import tools
from oauth2client.file import Storage

import datetime
requests.packages.urllib3.disable_warnings()
try:
_create_unverified_https_context=ssl._create_unverified_context
Expand All @@ -56,6 +67,7 @@ def events(frame,put):
check_keywords = ["what","when","was","how","has","had","should","would","can","could","cool","good"] #could or cool or good
download_music=("download ","download music ")
search_pc= ("find ","lookfor ")
graph_generation = ("draw graph for ")
close_keywords=("close ","over ","stop ","exit ")
pc_locations = ("desktop", "documents", "downloads")

Expand Down Expand Up @@ -345,6 +357,8 @@ def main():
speak.runAndWait()
except:
print("Unable to create video file!")

#Open Files
elif put.startswith(search_pc):
try:
name=link[1]
Expand All @@ -361,6 +375,23 @@ def main():
except:
print("Error")

#Plotting of graph
elif put.startswith(graph_generation):
try:
formula = link[3]
lower_limit = int(link[5])
upper_limit = int(link[7])
x = np.array(range(lower_limit,upper_limit))
y = eval(formula)
speak.say("Plotting The Graph")
speak.runAndWait()
plt.plot(x, y)
plt.show()
except:
print("Error")
speak.say("Sorry Graph can not be Plotted")
speak.runAndWait()

# elif put.startswith(search_pc):
# process=subprocess.Popen("dir /b/s "+link[1],shell=True,stdout=subprocess.PIPE)
# while True:
Expand Down
9 changes: 8 additions & 1 deletion windows/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
apiclient==1.0.3
beautifulsoup4==4.6.0
certifi==2017.11.5
chardet==3.0.4
Expand All @@ -7,21 +8,27 @@ data==0.4
decorator==4.1.2
funcsigs==1.0.2
future==0.16.0
google-api-python-client
httplib2==0.11.3
idna==2.6
ipython==6.2.1
ipython-genutils==0.2.0
jedi==0.11.0
latex==0.7.0
mpmath==1.0.0
matplotlib
numpy==1.13.3
opencv-python==3.4.1.15
opencv-contrib-python==3.4.1.15
oauth2client==4.1.2
pandas==0.21.0
parso==0.1.0
pickleshare==0.7.4
prompt-toolkit==1.0.15
PyAudio==0.2.11
#incase pyAudio blows up first install portaudio19-dev and then try installing pyaudio
Pygments==2.2.0
pypiwin32==219
pypiwin32
python-dateutil==2.6.1
python-pptx==0.6.7
pyttsx3==2.7
Expand Down

0 comments on commit b071604

Please sign in to comment.