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
import networkx as nx | |
import numpy as np | |
import matplotlib.pyplot as plt | |
# Bidrectional path graph: nodes labelled 0 to 7. | |
# 0 <-> 1 <-> .... 6 <-> 7 | |
dig = nx.path_graph(8).to_directed() | |
weights = {} |
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
http://d.stavrovski.net/blog/post/how-to-install-and-setup-oracle-java-jdk-in-centos-6 | |
# rpm | |
wget --no-cookies \ | |
--no-check-certificate \ | |
--header "Cookie: oraclelicense=accept-securebackup-cookie" \ | |
"http://download.oracle.com/otn-pub/java/jdk/7u55-b13/jdk-7u55-linux-x64.rpm" \ | |
-O jdk-7-linux-x64.rpm | |
# ubuntu |
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 -*- | |
from functools import wraps | |
from django.core.cache import get_cache # deprecated in newer versions of django; use caches array. | |
def once_only_task(fun): | |
""" | |
Decorator function to apply locking to Celery tasks; using a cache. | |
If a task has already acquired a lock and is executing, then other tasks |
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
{ | |
"variants": [ | |
{ | |
"attributes": { | |
"medium": "digital" | |
}, | |
"code": "1-5-C-FT-58", | |
"id": 1, | |
"image_urls": [ | |
{ |
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
"attributes": { | |
"properties": { | |
"Frog (123)": { | |
"type": "string" | |
}, | |
"color": { | |
"type": "string" | |
}, | |
"medium": { | |
"type": "string" |
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
cls._buttons.update({ | |
'update_product': { | |
'invisible': Eval('_parent_sale', {}).get('state').in_( | |
['processing', 'cancel', 'done'] | |
), | |
'readonly': ~Eval('_parent_sale', {}).get('state').in_( | |
['draft', 'confirmed', 'quotation'] | |
), | |
}, | |
}) |
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
ERROR: test_0055_guest_checkout (tests.test_templates.TestLNTemplates) | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/home/pritishc/RestOfFileSystem/nereid-stuff/lie-nielsen/tests/test_templates.py", line 716, in test_0055_guest_checkout | |
'endicia_mailclass': mailclass.id, | |
File "/home/pritishc/.virtualenvs/ln-dev/local/lib/python2.7/site-packages/werkzeug/test.py", line 772, in post | |
return self.open(*args, **kw) | |
File "/home/pritishc/.virtualenvs/ln-dev/local/lib/python2.7/site-packages/flask/testing.py", line 108, in open | |
follow_redirects=follow_redirects) | |
File "/home/pritishc/.virtualenvs/ln-dev/local/lib/python2.7/site-packages/werkzeug/test.py", line 736, in open |
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
def test_0055_guest_checkout(self): | |
""" | |
Test for guest checkout. | |
""" | |
with Transaction().start(DB_NAME, USER, CONTEXT): | |
self.setup_defaults() | |
self.create_test_products() | |
app = self.get_app() | |
product1, = self.ProductTemplate.search([ |
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 "/home/pritishc/RestOfFileSystem/nereid-stuff/nereid-webshop/tests/test_party.py", line 57, in test_0030_test_party_search | |
results = self.Party.search([('rec_name', 'ilike', '%thomas%')]) | |
File "/home/pritishc/.virtualenvs/webshop/local/lib/python2.7/site-packages/openlabs_nereid_webshop-3.2.1.0-py2.7.egg/trytond/modules/nereid_webshop/party.py", line 166, in search | |
cls.search_name(search_phrase, limit=limit, fields=["id"]) | |
File "/home/pritishc/.virtualenvs/webshop/local/lib/python2.7/site-packages/pyes-0.99.5-py2.7.egg/pyes/es.py", line 1613, in __next__ | |
self._do_search() | |
File "/home/pritishc/.virtualenvs/webshop/local/lib/python2.7/site-packages/pyes-0.99.5-py2.7.egg/pyes/es.py", line 1416, in _do_search | |
self._results = self._search_raw(self.start, self.chuck_size) | |
File "/home/pritishc/.virtualenvs/webshop/local/lib/python2.7/site-packages/pyes-0.99.5-py2.7.egg/pyes/es.py", line 1659, in _search_raw |
NewerOlder