Track GPS data for a certain time with Python - python

I want to create a fitness program using python.
When the user creates a account in my program he/she needs to have the option to select the location of their gym or the place where they workout. So in other words, a map opens up and the user has to find the place where they workout and mark it.
Then, I want to use the GPS of their phones in order to look if they were at least 30 minutes inside a 30 meter radius from the mark (their gym, or other place where they workout) in 24 hours.
If they were, I want to count that day.
My questions are:
Is this thing even possible?
Is python the best programing language for this or should I use something else?
Is there any library for Python that can help me?
Thank you in advance!

Are you planning on making a phone app for iOS/Android?
Since you said you maps on their phone, I am assuming you mean a phone app.
I would suggest learning Objective-C, if you are trying to make apps for iOS specifically, and the preferred language of implementation for Android would be Java.
With that said, you absolutely can use python to develop an Android or iOS app with something like BeeWare! Which is a nice suite of python tools so you can build your program from the ground up with pure python.
So there are many options with advantages/disadvantages; everyone will give their two sense on which is the best way to approach, but I would suggest researching the many ways phone apps are developed to get your feet wet and get familiar with the process before going head first at those additional questions!
It is a bit different than writing a python program on your computer, running it on command prompt/terminal and being good to go!

Related

Best way to create a script to automate a simple process using selenium?

Ok, so I'm a total noob with aspirations of learning to code. I've read about a guy who, for example, wrote a script which, if he was at work past a certain time, would automatically send a text to his wife stating he would be late. I want to do something sorta similar.
What I want in essence is a script that will log in to a website at a certain time of day, check if a box/text is green/yes or red/no, and send a text or notification to my phone informing me of the result each day.
The progress I've made so far is installing Python, installing PyCharm and done some research about tools I could use toward achieving my goal. Selenium seems like it would be capable of logging into the website, but I've no idea how to go about setting up a conditional statement to check the result, nor how I could set it up to send a text/notification to my phone. Also, if there is a more appropriate tool I should look into rather than Selenium and Python, I'm not attached to the idea of using these specific tools.
Finally, I realize that this may end up being too complicated for a first project, so I'd be up for hiring a freelancer to set this up. Equally, if this is something that could feasibly be written by someone with very little knowledge of coding such as myself, I'd really appreciate some direction from an expert!
Thanks for any input!
You are on the right track with selenium for web form automation. Sending notification however would require something else as was pointed out, and if you're on windows you can use windows task scheduler to automate, to performed only on certain time of day etc.
To make things more simplified, you can also look up general purpose automation programs that might support all these features together. For example, JRVSInputs uses selenium for web auto-fills https://jrvs.in/forums/viewtopic.php?t=182 and have features to send email or windows notifications. It can convert all its scripts into a neat batch file, you can then automate this batch file in the task scheduler.

Automating DOSbox application

I have a very old DOS application which I would like to automate. Like there are keypresses and such which if automated will help a lot as I might have to run the program over a hundred times manually.
My question seems to be very similar to this one but the solutions offered there are not very useful for me, plus it is over nine years old
Automating old DOS application using Python
Only big difference between this question and mine is that I have no option other than DOSbox for doing this. This application is set up on a lot of computers, and all the people using the application know how to use DOSBox. Migrating to Virtualbox would be a pain and very time-consuming.
I was thinking maybe if I could mechanize this somehow in python using xautomaton or uinput, but I haven't been able to figure out exactly how. The application will be running on Ubuntu primarily.
To give an idea of the application, I am attaching a screenshot:
The solution does not necessarily need to be in python. Any other language would work. Any help is appreciated.
I figured this out. Although this does not use python, to do this, I just captured the windowid of DOSbox and sent all the key presses there using xdotool. Here is an example:
wid=$(xdotool search --class DOSbox)
xdotool key --window $wid m t 5 Return Return i
Which will type "mt5", then press enter twice and then type "i"
The series of keypresses can be stored in a string or a file and called iteratively each time this has to be run. If there is a better method to do this, please feel free to answer.

Drawing meteorological maps in python

I found a user friendly way plotiing meteorological maps with python. I found this flight path tool, http://www.aviationweather.gov/flightpath2?gis=off , and i want to make something like this in python. I have made the scripts retrieving the data and plotting the maps but i want to make the interface. Is it difficult? Do you have any ideas?
Are you wanting to make a web-based interface? If so, I suggest maybe Django. If you want just a script with some nice GUI on a local machine, I think Qt is easy to use. I can't run the java file from aviationweather.gov (or rather, do not wish to) so I don't know what the interface is like. But using either Django or Qt, I think those are the tools I would start with.
Check out the video here.
https://blogs.msdn.microsoft.com/visualstudio/2016/03/22/introducing-r-tools-for-visual-studio-3/
Start watching about 7 minutes into the video. I think that will be a great learning experience for you, and should get you going in the right direction.

Drag and Drop realization

I am a music teacher and trying to teach my students with some hand-made program.
I had learned programming language in a elementary level, such as Python, Java, Pro-log etc.
I have a Open Lecture with parents of my students upcoming 12/12, so I want to make a simple lecture program.
Two Image Below is the U.I. which I want to realize.
4/4beat_practing1
4/4beat practing2
First, I want to make an apple droppable to match the gray-colored field. I want (half-sized apple should be matched to half-sized grayfield, and same for the full-sized color.)
Second, I want to make notes are droppable so that they could be aligned on the bar. In this case, it the summation is not 4/4beat, I want to show Error.
In which way, I could make this program fast?
I think I can encode the elementary level of programing such as checking out whether the summation is 4/4beat or not, however, I don't know how to connect programmed codes being linked with those images and User interfaces yet.
For an application like that, I would suggest using PyGame. I've seen beginning students with no programming skill at all make impressive games in only a few weeks with it.
Unfortunately, I'm not a game builder so I can't answer technical questions about PyGame. But I do know it has the sound and graphics libraries you need for your demonstration.

Using Python to tie together a DLA AI

So, I am completely new to programming. I've been learning basic Python over the last couple weeks. I've always wanted to learn a programming language but right now my primary reason for delving into it is to Create an AI program for my man cave. Here are my Ideas which I am sure have been thought of many times before. They are just my goals:
I would like to take a pre-established open source chat bot and tie it to a Natural Language process to give it the ability to convert my speech to a text command that it can execute and at the same time take its text output and filter it through an audible speech sample (very much like SIRI). This way when I have the function of Natural Language response on, I can have basic conversations with it. I can also turn the conversational aspect off via a voice command so that the only thing it responds to is direct commands (e.g. "Gerard, please open an email, execute. Recipient, logan.wolf.ypher#gmail.com, Subject, Hello World, Body, insert text i speak.)
I would also like to have it recognize that I am there when my phone attempts to connect to the wifi.
I know that this may be a bit complicated for me at the moment but I hear the best way to learn a language is to jump on into a project you enjoy.
Does anyone have any pointers on where to start looking for a base AI or just any tips in general that you wish to give me? I'd appreciate the info very much. Thank you.
-Logan
Considering that So, I am completely new to programming, I would recommend you take a smaller part of this project and successfully implement it. For example, an email account which is checked every 1 minute and you can send textual commands to it. From there, start upgrading it to use chat, cell phone, speech-to-text, and lastly, AI. I only say this because I know the diffulculty of starting a too-ambitious project when I am new at an area (electronics, engineering, programming, language, etc...) and fail. Success, even in small steps, is better!

Categories

Resources