Current:

Scraping Yelp NYC

Summary

This is a niftly little scraper that I'm building on python using Beautiful soup and and a combination of csv and a mysql database, I am able to store the information about each individual restaurant and then manipulate and analyze the data. I am currently working on getting the averages price range average from restaurants in each area. The area price range averages are calculated by getting a count of the '$' tags thats assigned to each restaurant on yelp. I Then took assigned a value of 1 to 4 corresponding to the $ to $$$$ price ranges in accordance and then created an average by iterating through the neighborhood area names that I retrieved with a simple Distinct(restaurantName) query. Then for each restaurant sum up the price ranges and a count of how many restaurants are in that neighborhood to get an average, the averages are stored as a dictionary and then will be stored as a dataframe using the pandas library. I am going to colorize each neighborhood with a red color gradient using the averages on a NYC neighborhoods map. I migh use OpenCV to colorize and then stitch each area together onto the map -- though, this might take much longer and less intuitive; The other option of doing this is to assign each neighborhood a minor offset of the color gray in RGB and then change the color by finding that color offset to one of the red gradients.




Dijkstra's Algorithm

summary

Dijkstra's algorithm is used to find the shortest path between nodes, the path distance is denoted as costs. The approach that I took involves the use of a map,  map<pair<int,int>,int>  to store the connected vertices and the associated cost -- The edge represented using the map looks like: ((1,2), 3). by grouping the two nodes together into a pair, I am able to access it through the use of iterators->first and second. Since the connected nodes are grouped together, I can then iterate further by looking for all existing and nonexisting nodes and checking comparing their costs for the lowest cost. When the lowest cost is found, I tend call the path function recursively until the destination is reached.




Pedestrian Tracking Rover

Summary

on hiatus, I need to spend some more time learning OpenCV and some time into Machine Learning; all my other OpenCV code can be found (here)

The pedestrian tracking rover is my little side project at the moment. The pedestrian tracking works by using openCV’s classifier function. The classifier function uses an identifier in this case I am using OpenCV’s pedestrian XML file to identify a pedestrian whenever they enter the frame. The goal is to capture the first instance of a pedestrian entering the frame and then create a set of features/classifications of that first pedestrian and then use those features to track the pedestrian as he or she moves. The rover will move according to the shift in speed and distance from frame to frame. The speed and distance change in those frames will be used to control the direction and speed of the rover. The Rover will continue to follow the pedestrian on it's own and will provide a video capture as it is following, the rover will not stop until it is ordered to terminate.

tech specs

  • Raspberry pi 3
  • Raspberry pi camera v2
  • Actobotics Whippersnapper Rover
  • OpenCV 3 + python 2.7

Past:

Minesweeper with OpenAi-Gym

summary

mini project for my CS 164 (software development) class, we created a minesweeper game using the OpenAI-Gym environment. The minesweeper game uses a python console interface. The creation of this program/game came with some assisstance from the professor, He taugh us and wrote some of the code for constraints.py. the constraints are used for the logic behind the game, such as setting equality between coordinates that do not contain a neighboring mine and deducing which coordinates have mines based on the neighboring coordinates. When a coordinate is selected and there are no mines (coordinates == 0), the game will automatically queue those coordinates into the actions just like a normal minesweeper game would. And when there are no more coordinates(squares) that is 0, it'll ask for user to input another coordinate until all coordinates except the ones with mines have been cleared.


Long Island University CompSci Website

Summary

For the Long Island University computer science club, I, the Vice President of the LIU CS club, created and manage the website. It’s mainly used to let our members know what the upcoming events are. The website also house some news articles and blogs that I found interesting as well as links to websites that I think might be useful, websites such as MIT’s OpenCourseWare; basically resources that I think are useful for the compsci club members.


Read and Write xlsx files

Summary

This is a simple program that I wrote when during my internship, it was used to find all the missing SKUs correlating to the respective Master_IDs. The program would copy over all of the entries that was retrieved from the POS system’s spreadsheet file into a finished file. While the program is copying all the entries over, it would halt when the SKU cell is empty then copy the read the name of the restaurant and the Master_ID corresponding to that missing SKU and then opens the menu for that restaurant and finds the corresponding SKU using the Master_ID. Once found it would then append that SKU from the restaurant’s menu onto the spreadsheet that the program is writing to.


Convert to Pig Latin

Summary

As the name implies, for my sophmore year project, this program converts an input string and converts it into pig latin. The program works by searching for the consonant and then moves it to the end of the word and adds “ay” to it. Once the word has been converted, it is then concatenated to the new sentence and then removes the word from the original sentence so it can move on to the next word. The function that does all of the heavy lifting keeps going until the original sentence has been emptied out.