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
Traceback (most recent call last): | |
File "metrics.py", line 32, in <module> | |
test() | |
File "metrics.py", line 27, in test | |
distance_type='jaccard') | |
File "/Users/ai/.virtualenvs/unshred/lib/python2.7/site-packages/mongoengine/queryset/base.py", line 201, in create | |
return self._document(**kwargs).save() | |
File "/Users/ai/.virtualenvs/unshred/lib/python2.7/site-packages/mongoengine/document.py", line 229, in save | |
doc = self.to_mongo() | |
File "/Users/ai/.virtualenvs/unshred/lib/python2.7/site-packages/mongoengine/base/document.py", line 255, in to_mongo |
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
class BaseModelView(ModelView): | |
list_template = 'admin/model_list.html' | |
export_columns = None | |
# Exporting | |
def _get_data_for_export(self): | |
view_args = self._get_list_extra_args() | |
# Map column index to column 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
# -*- coding: utf-8 -*- | |
''' Generates database schema graph from a relational database. | |
Usages: | |
Add database configuation in this file and then | |
python app.py | |
Note: You must have your latest database schema in the database | |
engine you are running against. | |
''' | |
from __future__ import unicode_literals, absolute_import |
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
QUERY PLAN | |
-------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
Nested Loop (cost=0.00..6275.34 rows=882 width=163) (actual time=0.448..1058.363 rows=75615 loops=1) | |
Join Filter: (((msg.src_addr)::text ~~ (('380'::text || (mnc.code)::text) || '%'::text)) OR ((msg.dst_addr)::text ~~ (('380'::text || (mnc.code)::text) || | |
-> Seq Scan on sms_mobilenetworkcode mnc (cost=0.00..1.18 rows=1 width=7) (actual time=0.014..0.042 rows=12 loops=1) | |
Filter: (length((code)::text) = 2) | |
-> Seq Scan on messages msg (cost=0.00..4064.76 rows=88376 width=159) (actual time=0.005..16.282 rows=88382 loops=12) | |
Total runtime: 1064.521 ms | |
(6 rows) |
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
# Prompt setup (c) smax 2002, adapted for zsh (c) piranha 2004 | |
# 0-black, 1-red, 2-green, 3-yellow, 4-blue, 5-magenta 6-cyan, 7-white | |
Cr() { echo '%{\033[3'$1'm%}'; } | |
hc=`Cr 6`; wc=`Cr 3`; tc=`Cr 7`; w=`Cr 7`; n=`Cr 9`; r=`Cr 1`; y=`Cr 6`; gr=`Cr 2` | |
[ $UID = 0 ] && at=$r%B'#'%b || at=$w'@' | |
PW_LEN=25 | |
PS1="$wc%n$at$hc%m $wc%$PW_LEN<..<%~$w>$n" | |
export RPROMPT=$(echo "$gr%T$n") | |
unset n b Cr uc hc wc tc tty at r y gr |
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
Install XCode & Command Line Tools | |
curl -O http://python-distribute.org/distribute_setup.py | |
sudo python distribute_setup.py | |
sudo easy_install pip | |
sudo pip install virtualenvwrapper |
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
function trace() { | |
local DEV_ROOT=~/dev/branch | |
local dir=$DEV_ROOT/booking/gui/applications/${1:-booking}/errors/ | |
local ticket=`ls -1t ${dir} | head -1` | |
python -c "import cPickle as pickle; print pickle.load(open('${dir}/${ticket}', 'r')).get('traceback')" | |
} |
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
.home .thumb { display: none; } | |
.comment-reply-link { | |
background: url(/wp-content/themes/Lucid/images/more-arrow.png) no-repeat center right; | |
} | |
.article { padding: 14px; } | |
.post_content { padding: 36px 14px 30px 14px; } | |
#main-area .container { width: 1000px; } | |
#left-area { width: 670px; } | |
.flexslider img { width: 1000px; } |
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
diff --git a/gluon/languages.py b/gluon/languages.py | |
--- a/gluon/languages.py | |
+++ b/gluon/languages.py | |
@@ -283,6 +283,7 @@ | |
def write_plural_dict(filename, contents): | |
+ return | |
if '__corrupted__' in contents: | |
return |
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
[{"car_model": "Fiat Doblo", | |
"driver_name": "Vova Igorevich", | |
"location": "50.438263,30.526319", | |
"plate_id": "HT 8345 CT", | |
"status": "free", | |
"url": "/car/937"}, | |
{"car_model": "Ford Mondeo", | |
"driver_name": "Vova Alexovich", | |
"location": "50.447320,30.457700", | |
"plate_id": "IP 0157 IK", |
OlderNewer