Tools
Записки программиста, обо всем и ни о чем. Но, наверное, больше профессионального.
2014-08-29
PEP 8, Introduction
Posted by Valentin at 11:30 0 comments
Labels: python
2014-08-28
PEP 8
Posted by Valentin at 11:30 2 comments
Labels: python
2014-08-27
NTFS
mkdir -p /mnt/ntfsvolume/data/t # mkdir: cannot create directory Operation not permitted aptitude install ntfs-3g # remount /mnt/ntfsvolume mkdir -p /mnt/ntfsvolume/data/t # OK |
2014-08-26
Apache2 setup in Debian
su -l aptitude install apache2-mpm-itk apache2 openssl a2dissite default cp /etc/apache2/sites-available/default-ssl /etc/apache2/sites-available/rover-ssl.conf a2ensite rover-ssl.conf service apache2 restart curl -k https://localhost/ openssl s_client -connect 192.168.1.9:443 -state -debug mkdir -p /etc/ssl/localcerts openssl req -new -x509 -days 3650 -nodes -out /etc/ssl/localcerts/apache.pem -keyout /etc/ssl/localcerts/apache.key ls -la /etc/ssl/localcerts/ chmod 600 /etc/ssl/localcerts/apache* a2enmod ssl nano /etc/apache2/sites-available/rover-ssl.conf nano /etc/apache2/ports.conf netstat -tnlpua|grep apache2 |
nano /etc/apache2/sites-available/rover-ssl.conf <IfModule mod_ssl.c> NameVirtualHost *:443 <VirtualHost *:443> SSLEngine On SSLCertificateFile /etc/ssl/localcerts/apache.pem SSLCertificateKeyFile /etc/ssl/localcerts/apache.key AssignUserId valik root DocumentRoot /home/valik/www/ <Directory /home/valik/www/> AuthType Basic AuthUserFile /home/valik/.htpasswd AuthName "Alwaysglum restricted services" Require valid-user </Directory> Alias "/torr/" "/mnt/sams640/data/" <Directory /mnt/sams640/data/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all AuthType Basic AuthUserFile /home/valik/.htpasswd AuthName "Alwaysglum restricted services" Require valid-user </Directory> </VirtualHost> </IfModule> |
nano /etc/apache2/ports.conf # NameVirtualHost *:80 # Listen 80 <IfModule mod_ssl.c> Listen 443 </IfModule> <IfModule mod_gnutls.c> Listen 443 </IfModule> |
su -l valik htpasswd -c ~/.htpasswd guest htpasswd ~/.htpasswd valik |
Posted by Valentin at 11:30 0 comments
Labels: Apache, HTTP. Apache, HTTPD
2014-08-25
Samba & Win Explorer
cd \\rover\torr\data
root@rover:~# diff -u /etc/samba/smb.conf.orig /etc/samba/smb.conf --- /etc/samba/smb.conf.orig 2014-08-08 16:20:28.951020194 +0400 +++ /etc/samba/smb.conf 2014-08-08 18:00:35.458898060 +0400 @@ -35,7 +35,7 @@ ## Browsing/Identification ### # Change this to the workgroup/NT-domain name your Samba server will part of - workgroup = WORKGROUP + workgroup = NHOME # server string is the equivalent of the NT Description field server string = %h server @@ -100,6 +100,11 @@ # /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html # in the samba-doc package for details. # security = user +security = user +guest account = valik +follow symlinks = yes +wide links = yes +unix extensions = no # You may wish to use password encryption. See the section on # 'encrypt passwords' in the smb.conf(5) manpage before enabling. @@ -331,3 +336,26 @@ ; preexec = /bin/mount /cdrom ; postexec = /bin/umount /cdrom +[www] +comment = www files +path = /home/valik/www +guest ok = yes +read only = no +browseable = yes +create mask = 0666 +directory mask = 0777 +public = yes +force user = valik +force group = valik + +[torr] +comment = torrents folder +path = /home/valik/torrent +guest ok = yes +read only = yes +browseable = yes +create mask = 0666 +directory mask = 0777 +public = yes +force user = valik +force group = valik |
# To recursively give directories read&execute privileges: find /path/to/base/dir -type d -exec chmod 755 {} + # To recursively give files read privileges: find /path/to/base/dir -type f -exec chmod 644 {} +
Posted by Valentin at 11:00 0 comments
2014-08-22
MS SQL stored procedures
select * from (exec mydb.myschema.uspMyStoredProc @param1 = N'value 1', @param2 = N'value 2')
Posted by Valentin at 08:30 0 comments
2014-08-21
In Fu Wo
Posted by Valentin at 11:30 0 comments
2014-08-20
Площадка
Posted by Valentin at 11:30 0 comments
2014-08-19
translitbot
Posted by Valentin at 11:30 0 comments
Labels: im, opensource, python
2014-08-18
libtorrent-rasterbar 0.15/0.16
su -l aptitude purge libtorrent-rasterbar6 libtorrent14 aptitude install libboost-all-dev su -l valik pushd /opt/deluge wget http://downloads.sourceforge.net/project/libtorrent/libtorrent/libtorrent-rasterbar-0.16.16.tar.gz tar xvzf libtorrent-rasterbar-0.16.16.tar.gz pushd /opt/deluge/libtorrent-rasterbar-0.16.16 ./configure --enable-python-binding make sudo checkinstall -D python -c "import libtorrent as lt; print lt.version" 0.16.16.0 sudo ldconfig
pushd /opt/deluge/deluge-1.3.7 source env/bin/activate deluge -v deluge: 1.3.7 libtorrent: 0.16.16.0
Posted by Valentin at 11:30 0 comments
2014-08-15
Оргсобрание
Posted by Valentin at 11:30 0 comments
2014-08-14
portal_view_customizations
Filed under: category
http://localhost:8080/cms/news/prognoz/@@manage-viewlets
Viewlet: plone.belowcontenttitle.keywords
ViewletManager: plone.belowcontent (plone.app.layout.viewlets.interfaces.IBelowContent)
plone.belowcontenttitle.keywords (zope.publisher.interfaces.browser.IDefaultBrowserLayer)
<tal:filedunder i18n:translate="label_filed_under">Filed under:</tal:filedunder>
<!-- tal:filedunder i18n:translate="label_filed_under">Filed under:</tal:filedunder -->
Posted by Valentin at 11:30 0 comments
Labels: Zope(Plone)
2014-08-13
Plone sticky news
Posted by Valentin at 11:30 0 comments
Labels: todo, Zope(Plone)
2014-08-12
Языки программирования
Posted by Valentin at 11:30 0 comments
Labels: citation, programming
2014-08-11
Внутренний экзамен
Posted by Valentin at 11:30 0 comments
2014-08-08
Толковый мужик
Posted by Valentin at 11:30 0 comments
Labels: Wisdom
2014-08-07
one hundred twenty-three million four hundred fifty-six thousand seven hundred eighty-nine
Posted by Valentin at 11:30 0 comments
Labels: Google
2014-08-06
Итоги
Posted by Valentin at 11:30 0 comments
2014-08-05
Getting Lots of Data and Artificial Data
Posted by Valentin at 11:30 0 comments
2014-08-04
Machine Learning Example Application
В отличие от распознавалки текста в документах, разпознавать текст на фотографиях окружающего мира значительно сложнее.
Имея классификатор (нейросеть), обученный отличать пешеходов от всего остального, мы можем подавать ему на вход куски (patch) интересующей нас картинки, получая ответ — пешеход или нет.
Фишка в том, как готовить эти патчи — техника скользящего окна. Для начала надо выбрать некий исходный размер этого окна и перемещать его по всей картинке, чтобы пошагово в рамку/окно попали все детали изображения. Потом размер окна увеличивается и цикл повторяется. И так столько раз, сколько надо, чтобы покрыть все возможные варианты фигур пешеходов на картинке.
Posted by Valentin at 11:30 0 comments
Архив блога
-
▼
2014
(267)
-
▼
августа
(21)
- PEP 8, Introduction
- PEP 8
- NTFS
- Apache2 setup in Debian
- Samba & Win Explorer
- MS SQL stored procedures
- In Fu Wo
- Площадка
- translitbot
- libtorrent-rasterbar 0.15/0.16
- Оргсобрание
- portal_view_customizations
- Plone sticky news
- Языки программирования
- Внутренний экзамен
- Толковый мужик
- one hundred twenty-three million four hundred fift...
- Итоги
- Getting Lots of Data and Artificial Data
- Machine Learning Example Application
- Large-Scale Machine Learning & Example
-
▼
августа
(21)