How to Get a User’s Email Address on Github

There are a lot of people (software engineers,  open source compatriots, coding warriors) who contribute to programming projects on Github. You may be interested in a certain someone on Github, and you need to contact them! Recruiters? Potential partners? This is the surest way to find someone’s email through Github! Find the person’s Github username. Go to a recent Github project that they’ve contributed. Check the link of a commit message. Add .patch to the link, and you’ll see the...

More

Largest Prime Factor

Project Euler is a website with a series of math problems that can be solved with programming. Problem 3 is about finding the largest prime factor of a number. Although my first impression is that the problem looks simple since I can iterate through the possibilities one by one and find the largest prime factor. The problem is that we’re finding the largest prime factor! The largest prime factor of a very large number can be as big as the...

More

How to Fix ^M Characters in Vim

I opened a CSV file in Microsoft Excel. I approved compatibility with macros on a Mac. Then, I opened the same CSV file with vim. The entire CSV file was reduced to a single line whenever I opened the file with vim. Something like this: Number of Sloths,Type^M15,black^M10,brown^M5,blue If we try to substitute all the ^M characters, those characters aren’t found! vim slothparadise.csv The characters are actually a little different. We use vim‘s substitution for \r. :%s/\r/\r/g All the ^M...

More

How to install Pip as a User

I don’t have root access on this Macintosh that I’m using. How am I supposed to get the pip package manager for Python? Python comes installed on every Macintosh. python –version Python 2.7.10 Step 1) Get easy_install easy_install is a Python utility for installing certain Python related packages. You might already have easy_install! To check: easy_install If you don’t have easy_install, you can install easy_install for the user. wget –no-check-certificate https://bootstrap.pypa.io/ez_setup.py -O – | python – –user Installing easy_install script to /Users/…/Library/Python/2.7/bin...

More

C++ Libraries: Linking and Compiling

What is the -I, the -L, and the –(little L)? Why am I getting so many errors? What’s going on underneath? C and C++ libraries can be thought of as a conglomeration of functions and new keywords that you are able to use in your code. To truly understand what libraries are made of, we should first refresh on header and source files.   Header and Source File Example Header files contain declarations of functions and variables and often have...

More

Google Testing: Example and CMake Integration

The Google testing environment is frequently used in software engineering projects as a means of ensuring the functionality of your code. It is a framework that highlights the fundamentals of the iterative development work flow with the ability to confirm a set of tests as you are developing, thereby increasing the reliability of your final product and reducing time spent trouble shooting overall. The main tests that the framework allows for is assertions. An assertion simply checks to see if...

More

Graph500 on CUDA

I recently went to ISC16 for their Student Cluster Competition, and one of the challenges was to create our “own implementation of Graph500 to run on a cluster.” If you don’t know about the Student Cluster Competition, they are cluster competitions where student teams work with vendors to create a cluster and optimize high performance scientific applications to be run under 3000 watts of power on real datasets. Graph500 is a rating of supercomputer systems focused on data intensive loads....

More

How to Setup CUDA 7.0 on NVIDIA Jetson TX1 with JetPack – Detailed

The most recent version of NVIDIA JetPack is 2.2., which supports the NVIDIA Jetson TX1 and Jetson TK1. The big news is that the latest version of JetPack 2.2 turns the userspace to 64 bit! In earlier versions of JetPack, the kernel was 64 bit, but the userspace was 32 bit apparently from what a source has told me. Now with the userspace at 64 bit, you’ll have an easier time compiling and running arm64 libraries. Note that we’ll be...

More

How to compile HPL (LINPACK)

This guide will show you how to compile HPL (Linpack) and provide some tips for selecting the best input values for hpl.dat based on my experiences at the student cluster competitions. This benchmark stresses the computers floating point operation capabilities. Although just calculating FLOPs is not reflective of applications typically run on supercomputers, floating point is still important when precise calculations are required. I assume a version of mpi, c/c++/fotran compilers, blas and whatever libraries you need are installed. There...

More

How to Create Shared Folder on VirtualBox – Windows and Ubuntu

I have a Windows 10 laptop, and I am running VirtualBox. One of my virtual machines has Ubuntu 14.04 64 bit operating system. Now, I want to be able to share folders from my Ubuntu to Windows 10 and vice versa. I’m assuming that you have installed the Ubuntu virtual machine already and ready to set up the shared folder. Step 1) Make a folder to be shared on your Windows 10 host operating system. I’ll create a folder called...

More