Open Source A Python Project I

I started my first open source project towards the end of summer 2014 I began working at the Social Decision Analytics Laboratory at the Virginia Informatics Institutee. The project involves creating a simulation environment where we can observe how an idea or belief spreads within a social network. The initial thought was to look for and extend an agent-based model package in Python. I did manage to find the pyabm package by Alex Zvoleff, but for simplicity’s sake I wrote my own package instead of extending his existing code base.

By Daniel Chen

February 5, 2015

Hacking Your MetroCard to $0.00

Earlier this month, Ben Wellington wrote a blog post about How Memorizing “$19.05” Can Help You Outsmart the MTA. A few days later, after the post went viral, the MTA responded by saying this is so there will be enough change in the machine for cash users and this will be addressed next year after the new fare increase. Ben suggested to us all to remember $9.55, $19.05, and $38.10 to get a MetroCard that will yield us a $0.

By Daniel Chen

September 29, 2014

Welcome to Jekyll!

You’ll find this post in your _posts directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run jekyll serve –watch, which launches a web server and auto-regenerates your site when a file is updated. To add new posts, simply add a file in the _posts directory that follows the convention YYYY-MM-DD-name-of-post.

By Daniel Chen

September 7, 2014

Absolute and Relative Directories in Python

One of the most common tasks (for me at least) is saving or getting data from another directory from where the current python script is running. However, for many of the file I/O functions, it assumes the current directory or you need to give it an absolute directory. Using something like ../other_directory will not work. Here is one way you can get the current script directory, and then append to the string the relative paths.

By Daniel

May 16, 2014

Setting Up Repast Simphony 2.1 in Linux

Repast Simphony is a Java based collection of agent-based modeling and simulation software. Repast Simphony 2.1 installs its library files into ~/.eclipse/ECLIPSEVERSION/plugins/ and features/ when you create the model it looks for these files in /opt/eclipse/plugins/ and /features This issue has been brought up and added to the issue tracker as of 2013-09-30 User mijael posted a solution to the Repast Interest Mailing list about creating symlinks to the /opt directory:

By Daniel

February 4, 2014

Installing Eclipse in Ubuntu 13.10

Adapted answer from Shubhmay and TimD on askubuntu on installing Eclipse. Extract the eclipse.XX.YY.tar.gz file: tar -zxvf eclipse.XX.YY.tar.gz Copy the extracted folder to /opt: sudo cp -r eclipse /opt Create a desktop file gedit eclipse.desktop copy the following to the eclipse.desktop file [Desktop Entry] Name=Eclipse Type=Application #Exec=eclipse Exec=env UBUNTU_MENUPROXY=0 eclipse # for menubar bug in 13.10 Terminal=false Icon=eclipse Comment=Integrated Development Environment NoDisplay=false Categories=Development;IDE; Name[en]=Eclipse Execute the following command to automatically install it in the unity: sudo desktop-file-install eclipse.

By Daniel

February 4, 2014

Setting up a WebDAV Client for Courseworks

Columbia University’s Courseworks website allows you to download files for a registered class. A problem arises when multiple files needed to be downloaded simultaneously. One simply cannot just select the files and bulk download them. Courseworks have instructions to circumvent this limitation in the web interface by implementing a WebDAV client. However, other than Cyberduck under their Mac instructions, the Windows suggestion is quite limited. In this post I discuss setting up a WebDAV Client for Windows and Mac.

By Daniel

September 4, 2013

Setting up VirtualBox

Edit: March 31, 2014: As an assignment for Software Carpentry I made a screencast to follow along with these steps, here Installing Windows XP in VirtualBox: Files needed: VirtualBox (VB) Intaller here: https://www.virtualbox.org/wiki/Downloads CD or ISO of OS (for my CUMC/CU friends you can find the windows XP ISO here: http://cuit.columbia.edu/cuit/software-downloads/operating-system-software/windows-xp The VB version I am using is 4.2.6 After Installing VB. You want to click “New” in the toolbar.

By Daniel

February 21, 2013