Example of Service Description for DARQ

@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix sd: <http://darq.sf.net/dose/0.1#> .
@prefix a: <http://example.com/a#> .
@prefix b: <http://example.com/b#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/#> .

# definition of an endpoint A
[] a sd:Service ;
sd:capability [
sd:predicate foaf:name ;
sd:triples 10 ;
sd:subjectSelectivity 0.1 ; # 1/10 (10 of distint subject)
sd:objectSelectivity 0.2 ] ; # 1/5 ( 5 of distinct object)
sd:capability [
sd:predicate foaf:mbox ;
sd:triples 10 ] ;
sd:totalTriples “20″ ;
sd:url “http://a.com/sparql” . Read more

[MamaKey] Melukis Dengan Jari Untuk Balita

Saya perhatikan Key seringkali melakukan finger paint atau melukis dengan jari kecilnya di sekolah. Sayapun ingin membuatkan pewarna sendiri dengan biaya murah. Setelah googling akhirnya saya menemukan di web ini. Saya tulis dulu disini biar tidak lupa :)
Bahan :

  • 1/2 cangkir tepung jagung/maizena
  • 3 sendok makan gula
  • 1/2 sendok makan garam
  • 2 cangkir air dingin
  • pewarna makanan

Read more

[Octave] Cara Menyelesaikan Multi Regresi Linear

Saya mengambil data dari ilmu statistik yang saya simpan di x.dat
1 30
1 35
2 42
2 47
3 50
3 62
4 64
5 71
6 79
7 85

Sedangkan data y, disimpan di y.dat
40
44
49
53
60
65
69
78
85
92

Saya membuat script kecil di octave untuk menyelesaikan kasus diatas. Script ini menggunakan persamaan matriks transpose biasa
\Theta = (X^T X)^{-1}X^T y
dimana theta adalah koeficien yang kita cari.
Read more

[AWK] Ekstrak Pita Lebar TCPDump

AWK is really awesome script ! almost of my PhD code rely on AWK. At This time, I wanna share my snippet to extract uplink adn downlink bandwith for certain port in localhost. In this case, suppose that we will investigate port 8000, thus I put regex

(.*)8000:$

ok, let’s play TCPDUMP now.

tcpdump -l -i lo port 8000 -nNqttf > tcpdump

Here is the following awk code to parse each line of tcpdump that are stored in tcpdump file

cat tcpdump | awk -F " " '{
if($5 ~ /(.*)8000:$/)
uplink=uplink+$7
else
downlink=downlink+$7
}
END {
print uplink
print downlink
}'

Above code will produce the number of uplink and downlink in bytes.

[Octave]Plot banyak variabel

x = 0:0.01:2;                
y1= 5*x.*exp(-3*x);          
y2 = y + 0.02*randn(size(x)); 
y3=yn + 0.03*randn(size(x));
plot(x,y1,'-',x,y2,'ro',x,y3,'+');      

xlabel('x');         
ylabel('y1,y2,y3');
title('Plot banyak variable');
legend('y1','y2',' y3');

hasil :

Ikuti

Get every new post delivered to your Inbox.

Bergabunglah dengan 1.383 pengikut lainnya.