GitHub's CSS is boring. So I refreshed the design

2019-06-12 09:09:00 -0400

I have been using GitHub since 2017, and have been getting tired of GitHub’s theme. I didn’t need a huge change, just a small refresh. So, to solve this, I whipped out Stylus and made a nice little CSS file for it.

The CSS

Here is the CSS. Feel free to play with it.

@-moz-document url-prefix("https://github.com/") {
.Header {
    background-color: #1a3652;
}

.repohead.experiment-repo-nav {
    background-color: #fff;
}
.reponav-item.selected {
    border-color: #fff #fff #4a79a8;
}

.btn.hover,
.btn:hover,
.btn,
.btn {
    background-color: #fafafa;
    background-image: linear-gradient(-180deg, #fafafa, #fafafa 90%);
}

.btn-primary.hover,
.btn-primary:hover,
.btn-primary,
.btn-primary {
    background-color: #1aaa55;
    background-image: linear-gradient(-180deg, #1aaa55, #1aaa55 90%);
}

.overall-summary {}
}

Use it yourself

I put this theme on userstyles.org. You can download and install it by going to my userstyles page.

Building a safe and easy system for sending computer vision data from a raspberry pi to a roborio

2019-05-27 05:22:00 -0400

Computer vision on an FRC robot has some problems.

  • RoboRIO is not powerfull enough
  • NetworkTables is not fast enough
  • A TCP connection is great until you lose connection
  • mDNS discovery is not reliable on the field
  • UDP can skip frames

Needs

These are the things I need to have.

  • Send data from any device
  • Recive data on RoboRIO at any time
  • Data rate faster than period time

Wants

These are the things I would like to have.

  • Easy discovery
  • Threaded
  • Simple interface for new programmers
  • Fallback in case of UDP issues
  • FMS network firewall compliant

I am currently working on a protocol for solving this problem, nad will post an update here once it has been tested. Feel free to let me know your thoughts and ideas.

The language hunt

2019-04-30 14:32:00 -0400

Our programming team is looking to switch languages in the 2020 season. Here is the what, why, and how.

Our history

We started out as a java team back in 2014 because java was (and still is) the language being taught in our programming classes. Honestly, our code sucked, as many rookie team’s do. There where no fancy features, or sensor-assisted autonomous. Direct input into talons was our way to roll.

A few years later, we had a change in team organization and switched to C++. Up until the 2019 / 2020 season, this was our language and we where getting pretty good at using it.

The Problem

We, as a team are looking to bring our programming and robots to the next level in 2020. Because of this, we ran into a problem. While C++ is an amazing language for embedded and robotics programming, some of it’s “features” where starting to act as a bottleneck to our design. Less time was being spent on polishing our new vision system or autonomous climb, and more on that crazy linker error that came out of nowhere.

It’s time for a change, but what do we change to?

Part 2

We are currently doing our evaluation of new programming languages, and an update will be posted to this blog in the near future.

Using a python script to create devRant posts based on the style and content of another user

2018-06-27 14:32:00 -0400

Ok… The title is slightly wrong. There are actually 2 scripts.. Sorry about that.

This is a guide on installing and using the BecomeRanter script.

Getting dependancies

The scripts use Google’s tensorflow library to do its “magic”. So first, we should install Tensorflow’s dependencies.

sudo apt install python3 python3-pip #change this command to fit your distro
pip3 install numpy

Then install Tensorflow

pip3 install tensorflow #for cpu processing
pip3 install tensorflow-gpu #for gpu processing

Next up, install the rest of the stuff:

pip3 install textgenrnn pandas keras

Clone the repo

This is pretty simple. just make sure you have git installed and run

git clone https://github.com/Ewpratten/BecomeRanter.git

Generate some rants with a .hdf5 file

As of the time of writing this, I have pre-generated some files for the two most popular ranters. These files can be found in BecomeRanter/Checkpoint\ Files.

Higher epoch numbers mean that they have had more time to train. The files with lower numbers are generally funnier.

To change the .hdf5 file you would like to use, open the file called createsomerants.py and change the variable called input_file to the path of your file. By default, the script generates from the Linuxxx-epoch-90.hdf5 file.

Next, save that file and run the following in your terminal:

python3 createsomerants.py >> output.txt

It will not print the results out to the screen and put them in the file instead.

To stop the script, press CTRL + C

Create your own .hdf5 file

If you want to make your own hdf5 file, you just have to use the other script in the repo.

By default, you can just put all your text to train on in the input.txt file.

If you want to use a different file, or change the number of epochs, those variables can be found at the top of the createhfd5frominput.py file.

To start training, run:

python3 createhfd5frominput.py

A new hdf5 file will be generated in the same folder as the script