Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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 / 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 / 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.

#!/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 / commits.txt
Last active October 14, 2022 12:40
setTag, 7822 repos out of 105876 info items of github repos. query: watchers >= 5, size <= 50MB
Not Found in 0xPr0xy/ShadowImageView
Not Found in 01walid/my-arch-stuff
Not Found in 0xroot/whitesnow
Not Found in 0xroot/Tapjacking-Framework-for-Android
Found in 157688302/rejuvenation
{
"full_name": "157688302/rejuvenation",
"regex": "\".setTag\\\\([^,|^\\\\(]*,[^,]*\\\\)\"",
"results": [
{
@sangheestyle
sangheestyle / fcq_sample.json
Last active August 29, 2015 14:16
FCQ Data Sample
{"YearTerm":"20141"
,"CrsPBADept":"CSCI"
,"CrsPBAColl":"EN"
,"CrsPBADiv":""
,"Subject":"CSCI"
,"Course":"4830"
,"CourseTitle":"Special Topics in Computer Science"
,"Level":"Upper"
,"CrsLvlNum":"4XXX"
,"Activity_Type":"LEC - Lecture"
/**
* @fileoverview Pearson correlation score algorithm.
* @author [email protected] (Matt West)
* @license Copyright 2013 Matt West.
* Licensed under MIT (http://opensource.org/licenses/MIT).
*/
/**
* Calculate the person correlation score between two items in a dataset.
var _ = require('lodash');
var github = require('octonode');
var Rx = require('rx');
// repos :: Search -> Options -> Observable Data
// callback style is converted to Promise and then to Observable
function repos(search, options) {
return Rx.Observable.fromPromise(new Promise(function (resolve, reject) {
search.repos(options, function (err, body, header) {