TL;DR:
- The design of both search and recommendations is to find and filter information
- Search is a "recommendation with a null query"
- Search is "I want this", recommendations is "you might like this"
""" | |
Hack to use requests + cachecontrol packages to make cached requests on cloud front for secured URLS. | |
If one redirects urls to protected CF urls, those urls will have expiry parameters that prevents | |
'normal' caching. This obviously only works if one can guarantee that the content is not affected | |
by the parameters. | |
""" | |
import urlparse | |
try: |
import sys | |
if hasattr(sys, "real_prefix"): | |
print("Using virtualenv.") | |
elif hasattr(sys, "base_prefix"): | |
print("Using venv.") | |
else: | |
print("Not in venv/virtualenv.") |
#include <iostream> | |
class Foo { | |
private: | |
int m_value; | |
public: | |
Foo(int i) : m_value(i) {}; | |
int get_value(void) { return m_value; }; | |
}; |
""" | |
Copyright 2013 Dropbox, Inc. | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
$ PYTHON_EMBED=/Users/cournape/.envs/python-pandas-test/ /Users/cournape/.envs/pypy-pandas-test/bin/python foo.py | |
Traceback (most recent call last): | |
File "app_main.py", line 75, in run_toplevel | |
File "foo.py", line 2, in <module> | |
pymetabiosis.module.import_module("numpy") | |
File "/Users/cournape/.envs/pypy-pandas-test/site-packages/pymetabiosis/module.py", line 5, in import_module | |
module_object = lib.PyImport_ImportModule(name) | |
File "/Users/cournape/.envs/pypy-pandas-test/site-packages/pymetabiosis/bindings.py", line 225, in wrapper | |
raise exception_by_py_exc[py_exc_type] | |
ImportError |
Version : 3.4.4 | |
Version tuple: ('3', '4', '4') | |
Compiler : MSC v.1600 64 bit (AMD64) | |
Build : ('v3.4.4:737efcadf5a6', 'Dec 20 2015 20:20:57') |
Version : 3.5.2 | |
Version tuple: ('3', '5', '2') | |
Compiler : MSC v.1900 64 bit (AMD64) | |
Build : ('default', 'Aug 18 2016 11:05:36') |
# using https://github.com/cournape/import-profiler. Python 2 output | |
cumtime (ms) intime (ms) name | |
19.1 3.1 inspect | |
3.3 1.4 +string | |
1.6 0.3 ++re | |
9.9 8 +tokenize | |
1.1 1.1 ++itertools | |
1.8 0.6 +collections |
TL;DR: