Hacktoberfest 2019!

Image source – https://hacktoberfest.digitalocean.com

Project and Learning Update

Before I get into the Hacktoberfest fun, I wanted to update you on my progress since the last post.

I was in New York visiting family these past few months (I recently moved from NYC to Florida last year) so it’s been a little hectic! Luckily my brain needed the time to process everything I had learned from the previous machine learning course before diving into a new one.

Since then, I’ve began another course on Udemy about Machine Learning and Data Science in Python and R, which is dense but very fascinating! I’ll definitely need to add math for python, and matrix math, to my list of topics to study.

I’ve also connected to an awesome community, Women Who Code organization, which is how I learned about Hacktoberfest, through conversation on the slack channel!

Hacktoberfest Participation

For Hacktoberfest, everyone get’s together and participates in helping open source code by submitting contributions. Open source is another reason why I love this field, because the teamwork is inspiring. In order to do this you need to use GitHub to submit pull requests. Prior to this event, I had some light experience in GitHub but hadn’t gone into too much depth yet. After this event, I now understand how incredibly crucial it is for anyone interested in developing to become proficient. It’s a skill most employers will expect you to have, as a bare minimum. Moreover, GitHub is where a lot of the magic happens.

In order to be considered a full participant of Hacktoberfest and receive a super cool shirt, (dreams!), you need to submit at least four pull requests that adhere to the Hacktoberfest guidelines and rules.

I submitted five pull requests. I felt so happy to see the bar completed! But, my requests had a little clock icon near it, meaning that their eligibility was pending. To this day, a few months later, they’re still pending. However, two of my submissions were unfortunately submitted to ineligible repositories. Since the repository was ineligible, so was my pull request on that repository.

If any of these words confuse you, don’t worry, they confused me too at first. But as a beginner, I loved the freedom of Hacktoberfest. It was a time where everyone was getting together and people knew that beginners would be involved. This gave me more confidence to actually participate by submitting pull requests with less fear.

I’m so incredibly happy to have participated in Hacktoberfest this year, and am excited to see my performance for next year’s event after much more learning. I’m now off to learn, more formally, about GitHub, in preparation!

Happy Coding!

Intro to Data Visualization with Python

Over the past few months as my learning journey continued, I finally completed my first introductory course in data visualization and plotting in Python. It was a short course on Udemy which focused on utilizing the matplot library. Besides learning the actual course objective, which was plotting, I also learned something very important from this course, which was how to utilize a library in Python.

Plotting with matplotlib and pyplot

Above is a screenshot of my screen with the code we wrote in the course and the chart that was produced once the code ran. This was incredibly exciting for me to see and test for myself because I had no idea how writing code would create a chart. I had a lot of questions about data science and absolutely no frame of reference into the subject prior to this course, but this introduction has piqued my interest!

The library that we were working with had a lot of features that made it simple to create visuals and change them as needed. The image above shows many lines of code beginning with plt. and that is because we were heavily working within that library and using its prewritten features. I never actually took a course that focused on utilizing a single library; the other courses and projects I have done used multiple libraries, so although I was able to follow the general philosophy behind their usage, this course really helped me understand the basics much better.

Scale Matters

One takeaway I took from this introductory course is that when working with data, scale matters. Scale alters the initial impression of what the visual data is saying. For example, we changed the y and x axis values often, and when doing this, the lines on the graph, including where they began and ended, shifted in ways that changed the visual to relay different messages. This made me realize why data science, interpretation, and visualization is so important.

Since I’m a visual learner, the visual aspect of data science is very satisfying for me because it combines two aspects that I favor: information and art.(Yes, for the sake of this post, I will consider a graph a piece of art!)

I’ve worked heavily with data in previous jobs, and with this new knowledge, I think back to all of our excel spreadsheets with statistical data sorted from A-Z, and wonder what that data would have said if plotted in a chart. What trends that may have been overlooked would we be able to see?

What’s Next?!

I will be posting soon about this year’s Hacktoberfest! Because I’ve been traveling these past few months, it’s been a tad difficult to write as many posts as I would like, but that won’t be the case for much longer!

Lastly, once I get back to my home base and re-unite with my Raspberry Pi and Vector Robot, I will be utilizing my new knowledge for more projects. This course made me better able to understand how to utilize the libraries offered in the Anki Vector SDK, which I’m very happy to test out! It feels wonderful to witness information click together.

Raspberry Pi Project Progress— LCD Screen PT 3

To catch you up on parts one and two: setting up the LCD screen I had with a pin adapter (to use only 4 instead of 16) was trickier than anticipated. Most of the code I was using had been with the 16 pins in mind and not my particular setup with the extension board. So, I was stuck for a few days with one “dead end” of an error code.

After a much needed break, I processed all that I had learned, read, and tested during my previous attempts. This morning I didn’t intend to mess around with the Raspberry Pi, but after taking a few classes on Team Treehouse, I felt inspired to give it another go.

With a fresh mind, I decided to go back to the original source I was following for my particular kit and setup. The reason why I hadn’t used this code in the first place was because it was for a more complicated program than what I was trying to setup. But then I went back to the instructions and tried to setup the more complicated program. Although that still didn’t run, it did help me create a must-needed file for my setup.

Then, after trial and error of various forms of code, I noticed that the LCD screen began to blink. The blinking matched up to the code of five seconds. Finally, I had received some sign that the communication between the components was working. But, the screen was too bright and there was no text. Then, I remembered from all of my reading the previous days from various sources and forum responses that the nob on the back of the LCD screen needs to be adjusted sometimes. So, I adjusted it, and black text boxes appeared. One step closer!

Finally, I looked at the code for the more complicated program and started deleting the stuff that I didn’t think I needed. After more trial and error of deleting, altering, and re-entering code, the LCD screen finally lit up with the famous words: Hello World!

But it wasn’t perfect. There were some strings of code running across the screen that shouldn’t have been there. After I finally isolated the code that ended up working and saving a new file, I tested it again to see if the fix was complete. After a couple of more trial and errors, unpinning and re-pinning the wires…it finally worked!

Here were the main issues:

  • This setup required a code specifically for the GPIO extension board and ic2 connection. Out of all the sources I had researched online, none had the exact address specifications that this required except for the example code in the ultimate beginner kit tutorial book.
  • This here was the key factor in getting the code to run:

PCF8574_address = 0x27  # I2C address of the PCF8574 chip.
PCF8574A_address = 0x3F  # I2C address of the PCF8574A chip.
# Create PCF8574 GPIO adapter.
try:
mcp = PCF8574_GPIO(PCF8574_address)
except:
try:
mcp = PCF8574_GPIO(PCF8574A_address)
except:
print (‘I2C Address Error !’)
exit(1)

  • I had also created another file titled PCF8574.py with code from GitHub by Freenove.
  • Another step that was important were these imports:

from PCF8574 import PCF8574_GPIO
from Adafruit_LCD1602 import Adafruit_CharLCD

Admittedly, my best friend was FaceTiming me as I was doing this, and when the code ran the second time across the LCD screen I was so happy to share that moment with someone. I screamed in excitement and showed my friend the words across the screen, and she called over her daughter to see as well.

Small backstory: My best friend’s daughter is incredibly smart, and a Minecraft Master, so I’ve been trying to pass on the coding bug to her through Minecraft. I sent her the whole code of Minecraft and told her to just read it and see if it made any sense. When she came over to the screen to see the Raspberry Pi, I showed her the code and explained what the experiment was and how it worked.

But we all know that seeing is believing. So I told Sammy that I would make the screen say her name. A couple of clicks later, the screen displayed “Hello Sammy!” and I showed it to her. She was elated with a big smile, as if I had performed a magic trick!

What a rewarding moment. I had imagined what the moment would be like when I got this to work, I had even accepted the fact that it may not work, and that I would have to try a different route completely, but I never expected it all to have unfolded in such a beautiful way.

I think what made this time different than the previous was that I wasn’t going by too many forums or outside advice. I just used the one code from the direct source, all I had learned from, and tried to get it to work from there the way I wanted. And it did!

Through this project I realized my pattern for learning will be exactly this: study through online sources like Team Treehouse and Udemy, and then take “breaks” with Raspberry Pi projects. The back and forth of the two helps me not rush through the online programs too fast. I don’t want to just pretend like I’ve learned this, I want to really learn this, and therefore I want to pace it in a way that truly allows my brain to digest all of the new information.

I ended the fun project by sharing the news with my friend and the forum I had gone to help for in the previous attempt. I’ve never really been an active forum member before, but I see now how some online communities can be really comforting and helpful!

Now, onto the next project!