Tools
Записки программиста, обо всем и ни о чем. Но, наверное, больше профессионального.
2014-03-05
Yate
Posted by
Valentin
at
12:30
6
comments
Labels: frameworks, JS
2014-03-04
Type hinting with docstrings/comments
Posted by
Valentin
at
12:30
0
comments
2014-03-03
IDS
sk@server1:~$ sudo apt-get update sk@server1:~$ sudo apt-get install psad
Posted by
Valentin
at
12:30
0
comments
2014-02-28
distribution
pushd ~/projects/translit.bot
source env/bin/activate
translitbot/ CHANGELOG COPYING README.rst
from setuptools import setup
with open('README.rst', 'r') as infile:
long_description = infile.read()
setup(
name = 'translitbot',
description = "XMPP chat bot for translit service",
long_description = long_description,
keywords = "XMPP GTalk chat bot translit",
url = 'https://github.com/vasnake/transbot',
download_url = 'https://github.com/vasnake/transbot/archive/master.zip',
version = "0.1.2",
license = 'GPLv3',
author = "Valentin Fedulov",
author_email='vasnake@gmail.com',
packages = ['translitbot'],
scripts = [],
install_requires = ['dnspython', 'trans', 'xmpppy'],
classifiers = [ # https://pypi.python.org/pypi?%3Aaction=list_classifiers
'Development Status :: 3 - Alpha',
'Intended Audience :: Education',
'Topic :: Communications :: Chat'
],
zip_safe = False
)
|
packages = ['translitbot'],
install_requires = ['dnspython', 'trans', 'xmpppy'],
pip freeze > requirements.txt
pip install -r requirements.txt
python setup.py check
python setup.py sdist
python setup.py develop
python setup.py install
valik@snafu:~/t$ virtualenv env valik@snafu:~/t$ source env/bin/activate (env)valik@snafu:~/t$ pip install ~/projects/translit.bot/dist/translitbot-0.1.2.tar.gz
Downloading/unpacking xmpppy (from translitbot==0.1.2) Could not find a version that satisfies the requirement xmpppy (from translitbot==0.1.2) (from versions: 0.5.0rc1) Cleaning up... No distributions matching the version for xmpppy (from translitbot==0.1.2)
wget http://downloads.sourceforge.net/project/xmpppy/xmpppy/0.5.0-rc1/xmpppy-0.5.0rc1.tar.gz pip install ./xmpppy-0.5.0rc1.tar.gz
pip install ~/projects/translit.bot/dist/translitbot-0.1.2.tar.gz
Posted by
Valentin
at
12:30
0
comments
Labels: python
2014-02-27
PP4D
Posted by
Valentin
at
12:30
0
comments
Labels: Book
2014-02-26
Dirsizecalc
Posted by
Valentin
at
12:30
4
comments
2014-02-25
Транзакционные издержки
Posted by
Valentin
at
12:30
0
comments
Labels: бытовуха
2014-02-24
Исходники
Posted by
Valentin
at
12:30
0
comments
Labels: opensource
2014-02-21
TOX
Posted by
Valentin
at
12:30
0
comments
2014-02-20
Лучше, потому как привычней
original post http://vasnake.blogspot.com/2014/01/blog-post_26.html
Posted by
Valentin
at
12:30
0
comments
2014-02-19
waze
Posted by
Valentin
at
12:30
0
comments
Labels: GIS
2014-02-18
Две карты в одной
Posted by
Valentin
at
12:30
0
comments
2014-02-17
Новый сайт
Пока заказов нет, выпиливаю новую версию нашего корпоративного сайта: www.allgis.org
Получается прикольный, с ёжиками
Работаем.
Posted by
Valentin
at
20:14
0
comments
Только 5% людей правильно моют руки
Posted by
Valentin
at
12:30
4
comments
Labels: health
2014-02-14
Все велосипеды уже украдены до нас
Posted by
Valentin
at
12:30
0
comments
Labels: python
2014-02-13
subject, verb, object
Posted by
Valentin
at
12:37
0
comments
Labels: language
2014-02-12
XenServer open source
Posted by
Valentin
at
12:25
0
comments
Labels: virtbox
2014-02-11
Yet another HTTP server via Python
# Python 2.* $ python -m SimpleHTTPServer # Python 3 $ python -m http.server
# Python 2.* $ pyserve # Python 3 $ pyserve
Posted by
Valentin
at
12:30
0
comments
Labels: python
2014-02-10
Повезло/не повезло
Posted by
Valentin
at
12:30
0
comments
Labels: gov.ru
2014-02-07
Как не надо лечиться
Posted by
Valentin
at
12:21
0
comments
Labels: health
2014-02-06
Deluge 1.3.6 rutracker patch
pkill deluged
su -l
aptitude purge deluge-common
aptitude install python python-twisted python-twisted-web python-openssl python-simplejson python-setuptools intltool python-xdg python-chardet geoip-database python-libtorrent python-notify python-pygame python-glade2 librsvg2-common xdg-utils python-mako
aptitude show libtorrent-rasterbar7
Version: 0.16.11-2
mkdir /opt/deluge
chown -R valik /opt/deluge
su -l valik pushd /opt/deluge wget http://download.deluge-torrent.org/source/deluge-1.3.6.tar.gz tar -zxvf deluge-1.3.6.tar.gz cd deluge-1.3.6/ # патчить pushd deluge/core/ cp core.py core.py.orig wget https://gist.github.com/vasnake/8436923/raw/c5a7e7bd3b135a4aa7d62cbc6b720e22d9d32f6c/deluge.core.py.patch patch core.py < deluge.core.py.patch popd # установить virtualenv --system-site-packages env source env/bin/activate python setup.py clean -a python setup.py build python setup.py develop
pushd /opt/deluge/deluge-1.3.6 source env/bin/activate deluged
pushd /opt/deluge/deluge-1.3.6 source env/bin/activate deluge-gtk &
Posted by
Valentin
at
12:24
3
comments
2014-02-05
Логотип в выдаче поисковика
<div itemscope itemtype="http://schema.org/Organization"><a itemprop="url" href="http://www.example.com/">Главная</a><img itemprop="logo" src="http://www.example.com/logo.png" /></div>
Posted by
Valentin
at
12:13
0
comments
Labels: web-develop
2014-02-04
Не договорились
--- deluge-1.3.6.orig/deluge/core/core.py
+++ deluge-1.3.6/deluge/core/core.py
@@ -87,14 +87,18 @@ class Core(component.Component):
# Note: All libtorrent python bindings to set plugins/extensions need to be disabled
# due to GIL issue. https://code.google.com/p/libtorrent/issues/detail?id=369
# Setting session flags to 1 enables all libtorrent default plugins
- self.session = lt.session(lt.fingerprint("DE", *version), flags=1)
+ self.session = lt.session(lt.fingerprint("DE", *version), flags=0)
+ self.session.add_extension("ut_pex")
+ self.session.add_extension("ut_metadata")
+ self.session.add_extension("smart_ban")
+ self.session.add_extension("metadata_transfer")
# Load the session state if available
self.__load_session_state()
# Set the user agent
self.settings = lt.session_settings()
- self.settings.user_agent = "Deluge %s" % deluge.common.get_version()
+ self.settings.user_agent = "Neluge patched %s" % deluge.common.get_version()
# Increase the alert queue size so that alerts don't get lost
self.settings.alert_queue_size = 10000
|
Posted by
Valentin
at
12:30
0
comments











