How to spellcheck latex files

Февраль 2, 2011

List of all errors in all *.tex files in g2/

cat g2/*.tex | aspell -t -p .aspell.ru.pws -l ru list > xu.txt

-t is great option for .tex files to avoid spelling \section and the like

Create personal dictionary

bigmac:d askom$ vim ~/.aspell.ru.pws

Select only unique words from xu.txt

bigmac:d askom$ awk ‘a !~ $0; {a=$0}’ xu.txt > xu1.txt

Add xu1,txt to personal dictionary. It looks like:

bigmac:d askom$ head ~/.aspell.ru.pws

personal_ws-1.1 ru 173 utf-8
Байеса
ПУЗК
САКТ
маркировочные
Махаланобиса
максимизирует
БД
тренда
АК
bigmac:d askom$

Prepare script file:

bigmac:d askom$ cat spmany.sh

#!/bin/bash
for file in «$@»   # «$@» contains all the command line arguments passed to the program
do
#  aspell -t $file
aspell -t -p .aspell.ru.pws -l ru check $file
done

bigmac:d askom$

Check all tex files in a/

./spmany.sh a/*.tex


New Dyalog Operator – Power

Апрель 24, 2010

Smooth running medians of 3

med3←{1⌽⍵[1⌽1,⍴⍵],{(+/⍵)-(⌊/⍵)+⌈/⍵}⊃3,/⍵}

Old approach

⊃x (med3 x)(med3 med3 x)
14 76 46 54 22  5 68 94 39
14 46 54 46 22 22 68 68 39
14 46 46 46 22 22 68 68 39

Now it’s possible
⊃x ((med3⍣1) x)((med3⍣2) x) ((med3⍣3) x)
14 76 46 54 22  5 68 94 39
14 46 54 46 22 22 68 68 39
14 46 46 46 22 22 68 68 39
14 46 46 46 22 22 68 68 39

Or even iterate until the result is stabilized

(med3⍣≡) x
14 46 46 46 22 22 68 68 39


Привет от ScribeFire

Июль 2, 2008

Как видно-слышно?


Best off-the-shelf classifier in the world

Июнь 24, 2008

Data Mining Survivor: Classification – Boosting:

The Boosting meta-algorithm is an efficient, simple, and easy to program learning strategy. The popular variant called AdaBoost (an abbreviation for Adaptive Boosting) has been described as the «best off-the-shelf classifier in the world» (attributed to Leo Breiman by Hastie et al. (2001, p. 302)). Boosting algorithms build multiple models from a dataset, using some other learning algorithm that need not be a particularly good learner. Boosting associates weights with entities in the dataset, and increases (boosts) the weights for those entities that are hard to accurately model. A sequence of models is constructed and after each model is constructed the weights are modified to give more weight to those entities that are harder to classify. In fact, the weights of such entities generally oscillate up and down from one model to the next. The final model is then an additive model constructed from the sequence of models, each model’s output weighted by some score. There is little tuning required and little is assumed about the learner used, except that it should be a weak learner! We note that boosting can fail to perform if there is insufficient data or if the weak models are overly complex. Boosting is also susceptible to noise.


Июнь 24, 2008

Google Browser Sync for Firefox 3 | Grant Midwinter:

If you, like me, are tired of getting told to use Foxmarks or Weave – that DONT do everything GBS does despite anyone who tells you different – then have heart. We’d like to hear from you as to whether you’d be interested in a similar extension made by our team here? Also let us know of the features that are key – of course secure encryption, speed and reliability are big focuses but anything outside of that then slap down a comment and we’ll come up with a feature list.


Игры с регулярными выражениями и grep

Июнь 20, 2008

Есть директория mei с 5-ю файлами и одной поддиректорией:

sasha@zenon2:~/Documents/papers$ ls -l mei
total 2860
-rw------- 1 sasha sasha  265621 2006-12-04 15:39 article-12-2004-5.pdf
-rw------- 1 sasha sasha  505856 2005-09-14 14:11 control2005_3.doc
drwxr-xr-x 3 sasha sasha    4096 2008-06-20 23:17 diss
-rw------- 1 sasha sasha  690688 2004-05-27 13:48 exponenta.doc
-rw------- 1 sasha sasha 1084416 2005-06-01 15:20 ivanovo.doc
-rw------- 1 sasha sasha  351216 2006-12-11 11:38 teploen_2006_06.pdf

Надо подсчитать число файлов. Пробуем «начинается на что угодно, кроме d (directory)»:

sasha@zenon2:~/Documents/papers$ ls -l mei | grep -c ^[^d]
6

Лишку, т.к. посчитал и строку «total 2860″. Пробуем кроме «d» или «t»

sasha@zenon2:~/Documents/papers$ ls -l mei | grep -c ^[^dt]
5

Правильно, но лучше, начинается только с «-»:

sasha@zenon2:~/Documents/papers$ ls -l mei | grep -c ^[-]
5

Теперь, есть текстовый файл public.txt со списком статей (каждая начинается с * и номера):

sasha@zenon2:~/Documents/papers$ grep  ^*[0-9] public.txt
*12. Технологии искусственного интеллекта в задачах диагностики
*10. Технологии искусственного интеллекта в задачах диагностики
*9. Модифицированный генетический алгоритм для задач оптимизации и
*8?. Диагностика информационных подсистем АСУТП с использованием
*7. К вопросу о параметрической оптимизации алгоритмов управления и
*20. Диагностика информационных подсистем АСУТП с использованием
sasha@zenon2:~/Documents/papers$

Номер 8 помечен «?», т.к. для него приведена мертвая ссылка. Для остальных скачены файлы (в директории mei). Надо проверить совпадение числа файлов (5) числу ссылок в public.txt (кроме помеченной «?»). Начинается с «*», затем идет цифра, затем все (цифра или точка), кроме «?»:

sasha@zenon2:~/Documents/papers$ grep  ^*[0-9][^?] public.txt
*12. Технологии искусственного интеллекта в задачах диагностики
*10. Технологии искусственного интеллекта в задачах диагностики
*9. Модифицированный генетический алгоритм для задач оптимизации и
*7. К вопросу о параметрической оптимизации алгоритмов управления и
*20. Диагностика информационных подсистем АСУТП с использованием
sasha@zenon2:~/Documents/papers$ grep -c ^*[0-9][^?] public.txt
5

Славненько.


Excellent download manager for Firefox

Июнь 20, 2008

Browse Download Management :: Firefox Add-ons:

DownThemAll! by Federico Parodi, Nils Maier, others recommended Preview Image of DownThemAll! 234 reviews 358,679 weekly downloads * Download Management The first and only download manager/accelerator built inside Firefox!

Встроенный, идет как add-on, просто чудо как хорош/


Не было счастья, да…

Май 20, 2008

переустановка w2003 (from .tib) привела к неким позитивным результатам:

  • lenny netinstall works fine with wmii. let’s wait for a xmonad.
  • vimperator makes firefox expierence even better!!!

переключалка раскладки (cntr-shift) работает везде. Емакс-ТеХ с русским как песня, практически из консоли (wmii).

еще поиграл с twitter и научился посылать туда сообщения по мобиле. сколько стоит?


One more «registered» to remember

Март 1, 2008

Connotea: askom’s bookmarks:

A+ for Russia aplusdev.narod.ru А+ живет на народ.ру Posted by askom (who is an author) to mysites apl on Sat Mar 01 2008 at 00:03 UTC | info | related

вдруг, при проверке «живости» сайта apusdev.narod.ru что-то нажал и попал в свою(?)
библиотеку на Connotea. Подписался и забыл. А смотрится интересно. Надо освежить.


игры с pentax

Февраль 29, 2008

Все сфотографировать и выкинуть. Под впечатлением paper-free home.

Например, потребности колбасного завода в программистах со знанием алгоритмичесКОГО (единственное число, какой не важно) языка.

Знание алгоритмического языка


Follow

Get every new post delivered to your Inbox.