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
"""Utility script to tweak the ntriples DBpedia dumps""" | |
# License: MIT | |
import csv | |
import logging | |
import os | |
import sys | |
import re | |
from collections import namedtuple | |
from urllib import unquote |
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
\o /tmp/pgconf.txt | |
\timing | |
SELECT now(), Version(); | |
SELECT current_database() AS db_name, pg_size_pretty(pg_database_size(current_database())) AS db_size, pg_size_pretty(SUM(pg_relation_size(indexrelid))::int8) AS index_size FROM pg_index; | |
-- pg buffer cache first so they are not modified by stats | |
SELECT (SELECT pg_size_pretty(COUNT(*) * 8192) FROM pg_buffercache) AS buffer_size, | |
pg_size_pretty(count(*) * 8192) as buffered FROM pg_class c | |
INNER JOIN pg_buffercache b ON b.relfilenode = c.relfilenode | |
INNER JOIN pg_database d ON (b.reldatabase = d.oid AND d.datname = current_database()) |
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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
""" | |
Extract dbpedia summaries and export Nuxeo SQL dump. | |
It requires dbpediakit https://github.com/ogrisel/dbpediakit. | |
""" | |
import sys | |
import random | |
import itertools |
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
#!/usr/bin/python | |
""" | |
1m docs gen in 6s | |
""" | |
#NB_FOLDER=50000 | |
#NB_FILE=1000000 | |
#NB_FOLDER= 1000*1000 |
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
-- ------------------------------------------------------------ | |
-- NXP-11897 Script to store fulltext field as tsvector instead of text | |
-- WARNING: | |
-- 1. Be aware that after converting the fulltext table from text to tsvector | |
-- the phrase search will not work anymore | |
-- 2. Make sure to backup you database before running the script | |
-- 3. Make sure that your fulltext table is not already using tsvector (From | |
-- psql type '\d fullltext' and check that the fulltext field is 'text' | |
-- 4. Run the script using psql using the same user as the Nuxeo instance | |
-- Note that the old fulltext table is renamed into fulltext_old |
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
-- ------------------------------------------------------------ | |
-- Dump Nuxeo and Oracle info | |
-- | |
SET ESCAPE \ | |
SET SQLPROMPT 'SQL> ' | |
SPOOL '/tmp/oraconf.txt'; | |
SET PAGESIZE 50000; | |
SET LONG 50000; | |
SET LINESIZE 200; | |
-- version and db name |
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
input { | |
file { | |
path => "/var/log/nuxeo/server.log" | |
type => "nuxeo" | |
} | |
file { | |
path => "/var/log/postgresql/postgresql-9.1-main.log" | |
type => "postgresql" | |
} | |
file { |
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
set terminal png transparent nocrop enhanced font arial 8 size 640,480 | |
#set terminal png nocrop enhanced font arial 8 size 640,480 | |
set output 'ci-stat.png' | |
set border 3 front linetype -1 linewidth 1.000 | |
set boxwidth 0.75 absolute | |
set style fill solid 0.75 border -1 | |
set grid nopolar | |
set grid noxtics nomxtics ytics nomytics noztics nomztics \ | |
nox2tics nomx2tics noy2tics nomy2tics nocbtics nomcbtics |
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/bash | |
# number of images to generate | |
MAX=6607360 | |
# directory that contains some tiff images used as template | |
SAMPLE=/tmp/sample | |
# directory where new tiff are generated | |
OUTDIR=/tmp/gentif | |
#OUTDIR=/opt/nuxeo/repo1/data |
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 -x | |
HERE=`dirname $0` | |
HERE=`cd $HERE; pwd` | |
KSAR_JAR=$HERE/kSar.jar | |
LOG_PATH=$HERE/log | |
SAR_FILE=$LOG_PATH/bench.sar | |
SAR_PID=$LOG_PATH/sar.pid | |
mkdir -p $LOG_PATH |
OlderNewer