Skip to main content

DPS 909 - Release 0.2 - Hacktoberfest Week 4

It's the home stretch for Hacktober fest! For my final contribution, I decided to tackle my last goal, which was simply to do something fun and interesting. Once again, thanks to GitHub user vichitr and his brilliant project, I was able to quickly find something to contribute. I've always thought that programming algorithms was a good challenge and invited great learning experiences, so for my final PR, I decided to program an example of the sliding window technique in Python.

The sliding window technique is a very useful algorithm that is used across many disciplines of software design. It allows users to compare subsets of data (i.e. windows) within a larger collection, in order to find significant items. Personally, I have encountered the sliding window technique during some applied research projects that I have tackled in the past. In a particular machine learning project, I used the sliding window technique to construct subsets of data that were then fed into a separate pattern mining algorithm. If you're at all interested, you can find a summary of the aforementioned project here.

Visual example of sliding window technique (image from https://www.researchgate.net/)
The sliding window code for the research project I'd done could not be used for this contribution, primarily due to the fact that the implementation we'd written was far too specialized to use as a general example, so it would not fit the purpose of vichitr's project. The second reason is that it is proprietary code written for a client, so it would simply be unlawful to use it for open source purposes! So, I just wrote an original example using Python. Even though I'm familiar with the concept, it was still a good learning experience... mostly due to the fact that I've grown rusty with the fundamentals of the algorithm. A quick Internet search brought me back up to speed, and the rest was simply figuring out an implementation that would be simple and straightforward enough to teach other beginners about the concept of sliding window technique.

You can the issue here, and find the pull request here.

Console output of my sliding window program, coded in Spyder
With this final contribution, I've finished my 4 required PRs for Hacktoberfest. Hopefully all of them pass the review period. I'll be looking forward to my T-Shirt!

Comments

Popular posts from this blog

DPS909 - Lab 1 - Github Trending Research: WebGL Fluid Simulator

The WebGL Fluid Simulator is a small application that allows the user to play with simulated fluids right in their browser, and works on both PCs and mobile devices. The visual effects follow proper fluid dynamics, and can be manipulated in real time by pointing and click, as well as several available options such as quality, density, and velocity.  The app is written in JavaScript, and as the name suggests, visually renders its effects using WebGL. It was created by Github user PavelDoGreat based off another Github project:  Fluids-2D , and is distributed under the MIT license. As of September 8th, 2019, WebGL Fluid Simulator is trending with 2,307 stars during the month, and 6,070 stars in total. Main interface of WebGL Fluid Simulator by Github user PavelDoGreat I was interested in investigating this project as it demonstrates the breadth of open source resources on Github. Users can find projects that range from complex systems and APIs, to small plug-ins and simpl...

DPS 909 - Release 0.4 - Quick Weekly Recap

Last week , I talked about my external contribution and the trouble I had with setup. This week, I performed my contribution to our internal project: Seneca Telescope . I wanted to work on an aspect of the project that I had not dabbled in before, so I chose to restructure some code in order to create fixtures. So here's a quick recap of the work I did for this week's release 0.4 contribution. Internal Contribution - Adding Fixtures to Telescope In this context, fixtures refers to elements in a software project that are used to create a reproducible testing environment. In the case of project Telescope, there are certain components of the web app that parse RSS and Atom feed URLs in order to derive the contents of a blog. In order to test these components, we created a "dummy" blog account that produced a very specific feed output when parsed. Since we know what output to anticipate, we can use the dummy blog to test the various parsing components of Telescope. ...