File not found!
Posted on Thursday, September 27, 2018, 08:57 PM
| nessy
I’ve seen it before, a customer deletes a file and then needs it restored.
Normally a challenging request, but under special circumstances a process may have the file opened.
While showing my son some fun and exciting Linux security scenarios, I recalled all those times I was able to recover data from the /proc (in memory) filesystem. In order to visualize this scenario I threw together a small Dockerfile and had him poke around:
Dungeon Brawl
Posted on Thursday, August 23, 2018, 09:07 AM
| nessy
In order to re-familiarize myself with MongoDB I decided to write a little web application utilizing it as a backend datastore. Dungeon Brawl is a Python Flask app that runs inside Docker with the help of docker-compose.
Using this application a Dungeon Master can easily track all things combat for their Dungeons and Dragons group.
Grab the source code from Github , or check out a demo .
Android Open Trivia Database Application
Posted on Monday, February 26, 2018, 08:42 AM
| nessy
This month I went from owning an iPhone to an Android, I also decided to freshen up on the new hotness in the Android development realm.
I learned Kotlin is now an officially supported Language, Android Studio works much better than the old days of Eclipse and plugins, and OkHttp + Gson make interacting with Rest APIs pretty darn easy.
So what did I manage to create?
Using a list of public-apis found on toddmotto’s Github I came across the Open Trivia Database .
Magic the Gathering Card Recognition
Posted on Friday, January 12, 2018, 07:09 PM
| nessy
This weekend I took a bit of time to read up on OpenCV (Open Source Computer Vision Library) , I wanted to capture images of Magic the Gathering cards, then identify them using a Python library called ImageHash .
Below is a demonstration of what I was able to accomplish in about 2 days of research and hacking:
I’ll try and break down the steps and image manipulation functions I used to achieve this.
MySQL IN Operator Not Using Index
Posted on Friday, October 13, 2017, 02:09 PM
| nessy
After being alerted for elevated cpu on a staging mysql instance, I logged into the mysql console and ran a SHOW PROCESS LIST :
SHOW PROCESSLIST\G *************************** 1. row *************************** Id: 1 User: my_user Host: x.x.x.x:xxx db: my_db Command: Sleep Time: 2 State: Info: NULL *************************** 2. row *************************** Id: 3 User: my_user Host: x.x.x.x:xxx db: my_db Command: Query Time: 786 State: Sending data Info: SELECT file_id, fs_file_id FROM my_data WHERE file_id IN ('123456', 123457); A query running for 786 seconds quickly caught my eye, my next course of action was to run an EXPLAIN :
Remote Controlled Car using Raspberry Pi and Webcam
Posted on Friday, March 24, 2017, 11:32 AM
| nessy
Setup First thing I tackled was setting up the L293D H-Bridge on the Bread Board.
I found myself referencing the following Diagram a couple times.
Step one is connecting your chip down the center of your board:
From here I connected the 3 power pins to my board’s power rail using a few Jumpers :
A few more Jumpers connect each side of the chip to ground:
Finally I use a couple Wires to connect both sides of my power and ground rails:
Python says, Simon's hipster brother
Posted on Friday, December 30, 2016, 06:10 PM
| nessy
Many of you may remember playing with a Simon Electronic Memory Game when you were younger, you know something that looks like this: At it’s core the game is rather simple, the device lights up random colors, and you need to repeat the pattern. Of course it gets harder the longer you play.
I thought it would be fun to build a Simon game using Raspberry Pi and a few electronic components:
Arduino values to Python over Serial
Posted on Wednesday, October 5, 2016, 08:11 PM
| nessy
I’ve done a little bit of reading on the ReadAnalogVoltage of Arduino’s home page, and they give a straight forward way to read voltage from an analog pin.
I wanted to take this one step further and send the value over serial, then read it in Python using pySerial .
My setup is very straight forward, I have a Arduino UNO , a bread board, and a battery pack holding 4x AA batteries: To start out I want to merely print the voltage value in Arduino Studio to the serial console, my code looks something like this:
Python and sentiment analysis
Posted on Saturday, October 1, 2016, 04:51 PM
| nessy
While looking for datasets to throw at sklearn , I came across UCI Sentiment Labelled Sentences Data Set .
UCI is providing us with positive / negative tagging on real world data, the data comes from three sources ( Amazon , Yelp , and IMDB ).
The only problem is the format is a little strange.. We have a .txt file for each source, this is a raw unstructured formatting, plus not every line is tagged with sentiment.
Test your Machine Learning
Posted on Saturday, October 1, 2016, 10:11 AM
| nessy
In my previous post " Python Machine Learning with Presidential Tweets “, I started messing around with sklearn and text classification.
Since then I’ve discovered a great tutorial from SciPy 2015 . This video starts out slow enough for novices, and a reoccurring theme is testing your datasets.
After watching a good chunk of this video, I decided to go back to my code and implement a testing phase. Basically I’ll split my data into two pieces, a training set , and a testing set .