Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
# Use this one-liner to produce a JSON literal from the Git log:
git log \
--pretty=format:'{%n "commit": "%H",%n "author": "%an <%ae>",%n "date": "%ad",%n "message": "%f"%n},' \
$@ | \
perl -pe 'BEGIN{print "["}; END{print "]\n"}' | \
perl -pe 's/},]/}]/'
@sangheestyle
sangheestyle / mount_ntfs.md
Created January 19, 2015 19:15
Mount ntfs formatted partition in linux

Sometimes you might want to share partitions between Windows and Linux. If so, make a ntfs partion and do the following.

find UUID for the partition

sudo blkid
...
/dev/sdb2: LABEL="windows_shared" UUID="9CA40342A4031F00" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="0e6c7d28-a9e0-4767-8041-686726b47e42"
...

You can find the ntfs partion with blkid. In my case, I named the partition as "windows_shared" when I created the partition. Labeling the partition makes you find the right partition easier. You need to remember the UUID, 9CA40342A4031F00. Of course, you can use file system name, /dev/sdb2 instead of UUID. It's matter of taster but I prefer UUID. Read this article.

@sangheestyle
sangheestyle / install_driver.md
Last active June 24, 2022 17:38
Installing NVIDIA GTX 750 TI for Ubuntu or Ubuntu Gnome 14.xx

I use Ubuntu or Ubuntu Gnome 14.xx on NVIDIA GTX 750 TI. It requires the specific driver for booting. Even NVIDIA supports the driver on it's official website, sometimes installing it is not really stable specifically after you do update patches related to video drivers from Ubuntu archives.

After several trials, I realized that using ppa:xorg-edgers is the best way to install and maintain the driver so far. It does not require you several additional steps but you just do the following.

For the first boot

You need to do the way in this link because you need to set nouveau.modeset=0 for the kernel option. You don't need to do it everytime or add it into somewhere such as init code.

After the first boot

Open terminal on your desktop with Ctrl+Alt+T or click terminal icon then do the following.

@sangheestyle
sangheestyle / nlp2014_nlp_backpacking.ipynb
Last active August 29, 2015 14:11
Analyze submissions for NLP2014 project
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sangheestyle
sangheestyle / show.py
Last active August 29, 2015 14:11
Interpreting sumissions for NLP project.
import pandas as pd
import matplotlib.pyplot as plt
# test_set and answer_key path
test_set_path = 'test.csv'
answer_key_path = 'key.csv'
# 4 submission files from 30 submissions
submission_files = ['submit_20141118_a9c3331.csv',
@sangheestyle
sangheestyle / README.md
Created December 11, 2014 06:06
Developers' relationship, take 2

A simple example to show developers' relationship by analyzing commits in AOSP frameworks/base repository. Only commits submitted within past 2 months were used for generating this relationship. You might want to click 'open in a new window' link (right) to see this on larger window.

This graph was built by the following.

  • making edges by developer to his or her modified file (bipartite graph)
  • making projection by developer nodes

You might want to know what the graph represents

  • Each circle shows each developer.
@sangheestyle
sangheestyle / README.md
Created December 10, 2014 07:30
Developers' relationship, take 1

A simple example to show developers' relationship by analyzing commits in AOSP frameworks/base repository. Only commits submitted within past 2 months were used for generating this relationship. You might want to click 'open in a new window' link (right) to see this on larger window.

This graph was built by the following.

  • making edges by developer to his or her modified file (bipartite graph)
  • making projection by developer nodes

Each dot shows each developer and each color of circle represents each company which hires the developer. You can generate the json file by flatiron.

This example is based on Couchand's block 6495846.

A simple editor to allow the manipulation of force-directed graph parameters.

This example is based on Mike Bostock's block 4062045.

This simple force-directed graph shows character co-occurence in Les Misérables. A physical simulation of charged particles and springs places related characters in closer proximity, while unrelated characters are farther apart. Layout algorithm inspired by Tim Dwyer and Thomas Jakobsen. Data based on character coappearence in Victor Hugo's Les Misérables, compiled by Donald Knuth.

@sangheestyle
sangheestyle / README.md
Last active August 29, 2015 14:11 — forked from couchand/README.md

Object selection is tough, particularly when the things you'd like to select are moving around (like nodes in a force-directed layout, perhaps). Allowing a user the fudge factor of an area cursor helps, but can get in the way when targets are small enough. The use of a Voronoi tessellation promises a map of closest node for any given point.

This example illustrates the use of a Voronoi overlay to clip nodes in a force-directed simulation. By using the Voronoi shapes as the clipping path the nodes themselves can be drawn much simpler.

This builds on these two examples from Mike Bostock on force-directed graphs and voronoi tesselation, as well as Nate Vack's Voronoi selection example here and this first pass at an integration from Christopher Manning.

wget http://hivelocity.dl.sourceforge.net/project/math-atlas/Stable/3.10.2/atlas3.10.2.tar.bz2
tar jxf atlas3.10.2.tar.bz2

  288  tar jxf atlas3.10.2.tar.bz2 
  289  ls
  290  cd ATLAS/
  291  ls
  292  cd ..
  293  clear