An introduction to curl using GitHub's API
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
# The YUM package is too old for use with ruby-sqlite3, use the autoconf package from www.sqlite.org | |
cd /opt | |
wget http://www.sqlite.org/sqlite-autoconf-3070701.tar.gz | |
tar xvzf sqlite-autoconf-3070701.tar.gz | |
ln -s /opt/sqlite-autoconf-3070701 /opt/sqlite3 | |
cd /opt/sqlite3 | |
./configure --prefix=/opt/sqlite3 | |
make | |
make install |
#!/usr/bin/env python | |
""" | |
""" | |
import random | |
import igraph | |
from numpy import mean, nan_to_num, nan | |
from pprint import pprint | |
import nose | |
import logging | |
logging.basicConfig(level=logging.DEBUG) |
To get the version info of the Apache installed on my ubuntu, | |
open a terminal and type: | |
1. apache2 -v | |
or | |
2. /usr/sbin/apache2 -v |
1. create a mysite.conf file in the /etc/apache2/sites-available directory. Fill it with | |
LoadModule wsgi_module /usr/lib/apache2/modules/mod_wsgi.so | |
# configure the wsgi script | |
WSGIScriptAlias / wsgi.py | |
WSGIPythonHome virtualenv dir | |
WSGIPythonPath project_root: site-packages_dir_in_the_virtualenv | |
<VirtualHost *:8000> |
安装完win7后,再安装Ubuntu默认启动项则成了ubuntu,要想改成默认启动win7的话需要对ubuntu中配置文件进行修改。 | |
sudo gedit /boot/grub/grub.cfg | |
将 set default="0" 改为 set default="4"即可。 | |
原来的0表示开机的时候选择的是第一个启动项,即Ubuntu, | |
改为4后就是我们想要的win7了。中间还有三个分别是 | |
advanced option for Ubuntu, | |
Memory test (memtest86+) |
Following the this [simple tmux tutorial](http://www.sitepoint.com/tmux-a-simple-start/) | |
# 1. install tmux1.8 in ubuntu | |
```sh | |
~$ sudo add-apt-repository ppa:pi-rho/dev | |
~$ sudo apt-get update | |
~$ sudo apt-get install tmux | |
``` |
import collections | |
import sys | |
# setup the graph | |
G = { | |
1:set([ 2, 3, 5, 6,]), | |
2:set([ 1, 4,]), | |
3:set([ 1, 6, 7,]), | |
4:set([ 2, 5, 7, 8,]), | |
5:set([ 1, 4, 6, 8, 9, 10,]), |
%% Read Netflix dataset | |
A = readSMAT('/scratch/dgleich/netflix/netflix.smat'); | |
k = [10 25 50 100 150 200]; | |
l = size(k,2); | |
%% Matlab's SVDS | |
for i= 1:l | |
tic; | |
[U,S,V] = svds(A,k(i)); |
Author: Josef Jezek
sudo apt-get install python-setuptools