Skip to content

Instantly share code, notes, and snippets.

@tsnow
Last active May 17, 2021 14:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 6 You must be signed in to fork a gist
  • Save tsnow/4668213 to your computer and use it in GitHub Desktop.
Save tsnow/4668213 to your computer and use it in GitHub Desktop.
Ridecharge Ruby Data Processing Programming Take-Home Assignment

Spend 5 literal minutes thinking:

  • How much time do you have to devote to this exercise?
  • How can you verify that your solution is correct?

Then:

  1. Fork this gist and clone it locally.

  2. Send tsnowhite@taximagic.com and aharris@taximagic.com a link to your forked gist with "[gh_repo_stats]" in the subject. Provide an estimate of how long you'll be working on your solution in man-hours and an estimate of when you will be finished. Feel free to ask any questions about the assignment, as well.

  3. Complete the exercise, pushing your changes to the gist repo as you go.

  4. Send tsnowhite@taximagic.com and aharris@taximagic.com a link to your forked gist, along with the actual amount of time you spent on the problem, and a discussion of your solution. If you choose to use external dependencies besides ruby, please provide a Rakefile which allows one to run rake install to install the dependencies.

Create a ruby script utilizing http://www.githubarchive.org/ which has the following options and output:

   > ./gh_repo_stats -h
   gh_repo_stats [--after DATETIME] [--before DATETIME] [--event EVENT_NAME] [-n COUNT]

Here's some example interactions:

   > ./gh_repo_stats --after 2012-10-12T10:00:00-08:00 --before 2012-10-12T11:00:00-08:00 \
                     --event PushEvent -n 20
   hughht5/Guido - 30 events
   gordonbrander/French-Toast-Assets - 19 events
   iblanky/iblanky.github.com - 18 events
   honielui/hackathon_hnb - 17 events
   MilkZoft/codejobs - 16 events
   danberindei/infinispan - 12 events
   gilgomesp/site - 11 events
   HKCodeCamp/bartr - 11 events
   josephwilk/tlearn-rb - 10 events
   soapboxCommunications/Young-Final - 10 events
   sakai-mirror/melete - 10 events
   fabiantheblind/auto-typo-adbe-id - 9 events
   demobox/jclouds-maven-site-1.5.2 - 9 events
   davecoa/opendataday_workshop - 9 events
   freebsd/freebsd-ports - 9 events
   joonasrouhiainen/studio4-election - 9 events
   bunuelo/funk2 - 9 events
   Certainist/To_aru_Library - 9 events
   lanticezdd/uni - 8 events
   pfinette/finettedotcom - 8 events
   >
   > ./gh_repo_stats --after 2013-01-12T10:00:01Z --before 2013-01-12T11:00:00Z \
                     --event WatchEvent -n 2
   airbnb/javascript - 19 events
   piranha/gostatic - 4 events
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment