This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo "## Temp command for Geomview" > tmp.gcl | |
for filename in $*; do | |
filebase=$(basename $filename) | |
outputbase=$(basename $filebase .off) | |
echo "" >> tmp.gcl | |
echo "(load $filename geometry)" >> tmp.gcl | |
echo "(backcolor Camera 1. 1. 1.)" >> tmp.gcl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/opt/local/bin/perl | |
# | |
# Modified by @takaxp | |
# Last Update: 2012-01-09@22:13 | |
# 2012-01-09: support date([YYYY-MM-DD XX]) insertion | |
# 2012-01-09: support #+BEGIN_SRC | |
# 2011-11-16: use strict and warnings | |
# 2011-11-16: Add conversion from numeric items to ` - '. | |
# 2011-11-16: Skip headers, if #+TITLE: is, use it as the top headline. | |
# 2011-11-17: Add DISQUS comment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Installation | |
It is recommended to have a partition at the start of disk, mounted at /boot/ | |
For multiple system boots, boot-repair is very useful. My machine have two disks, one for Windows and one for Linux. I choose the later one as boot device when reparing boots. | |
2. Basics (step by step) | |
- time setting in Windows. (for multiple systems installed) | |
- install Dropbox and Google Drive(Insync) & sync | |
- install ssh, git & configure GitHub for new machine | |
[[https://help.github.com/articles/generating-ssh-keys]] | |
- dot.bashrc, import configuration from github |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% load std_expr captured data | |
clear; | |
dof=24; | |
header_file = fopen('start_frame.txt');%set header information file | |
i = 0; | |
while (1) | |
[name, count]= fscanf(header_file, '%s',1); | |
if (count ==0) | |
break; | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef _MARRAY_H_ | |
#define _MARRAY_H_ | |
#include <fstream> | |
#include <iostream> | |
#include "cv.h" | |
namespace BSPL { | |
// 1D array class with overloading operations | |
template <class T, int Size> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int dmf(int *a, int n) { | |
int *I = new int[n]; | |
int k=0; | |
for (int i=0; i<n; ++i) { | |
if (a[i] <= a[k]) { | |
k = i; } | |
I[i] = k; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% select img_id,artist_id from images into outfile '/tmp/art_wiki_img2artist.csv'; | |
% select task_id,artist_id from tasks into outfile '/tmp/art_wiki_task2artist.csv'; | |
% select usr_id,task_id,chosen from events where usr_id ='admin' into outfile '/tmp/art_wiki_admin.csv' ; | |
t2a=load('art_wiki_task2artist.csv'); | |
i2a=load('art_wiki_img2artist.csv'); | |
username={'admin', 'fei', 'chenl', 'yukun', 'xinlu'}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import Image | |
import glob | |
import numpy | |
def is_grey_scale(img_path="lena.jpg"): | |
im = Image.open(img_path).convert('RGB') | |
w,h = im.size | |
for i in range(w): | |
for j in range(h): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#wget http://disi.unitn.it/moschitti/corpora/ohsumed-all-docs.tar.gz | |
#tar xvf ohsumed-all-docs.tar.gz | |
cd ohsumed-all | |
filename=ohsumed_clusters.txt | |
rm -f $filename | |
for category in C*; do | |
echo %%%$category >> $filename | |
for abstract in $category/*; do | |
tr '\n' ' ' < $abstract | ../tocorpus.pl >> $filename |
OlderNewer