This file contains hidden or 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
#include <iostream> | |
#include <boost/filesystem.hpp> | |
#include <boost/python.hpp> | |
#include <opencv2/cudaarithm.hpp> | |
#include <opencv2/cudaimgproc.hpp> | |
#include "pytorch_cpp_interop.h" | |
namespace py = boost::python; |
This file contains hidden or 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
>> f | |
f(t) = | |
- (exp(-2*lambda_1*t) - 1)*(lambda_1*exp(- lambda_1*t - lambda_2*t) + lambda_2*exp(- lambda_1*t - lambda_2*t)) - 2*lambda_1*exp(-2*lambda_1*t)*(exp(- lambda_1*t - lambda_2*t) - 1) | |
>> collect(f) | |
ans(t) = | |
This file contains hidden or 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
# | |
# This shell prompt config file was created by promptline.vim | |
# | |
function __promptline_host { | |
local only_if_ssh="0" | |
if [ ! $only_if_ssh -o -n "${SSH_CLIENT}" ]; then | |
if [[ -n ${ZSH_VERSION-} ]]; then print %m; elif [[ -n ${FISH_VERSION-} ]]; then hostname -s; else printf "%s" \\h; fi | |
fi | |
} |
This file contains hidden or 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
x_val = [1 2 3 4 5 6 7 8 9 10]; | |
n = length(x_val); | |
x_ = linspace(0, 11, 100); | |
F_val = zeros(1, length(x)); | |
for j = 1:length(x_) | |
if x_(j) <= x(1) | |
F_val(j) = 0; | |
continue; | |
end | |
if x_(j) > x_val(n) |
This file contains hidden or 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
$> scrapy startproject airspider | |
Traceback (most recent call last): | |
File "/Users/d1ff/.brew/bin/scrapy", line 11, in <module> | |
sys.exit(execute()) | |
File "/Users/d1ff/.brew/lib/python3.5/site-packages/scrapy/cmdline.py", line 122, in execute | |
cmds = _get_commands_dict(settings, inproject) | |
File "/Users/d1ff/.brew/lib/python3.5/site-packages/scrapy/cmdline.py", line 46, in _get_commands_dict | |
cmds = _get_commands_from_module('scrapy.commands', inproject) | |
File "/Users/d1ff/.brew/lib/python3.5/site-packages/scrapy/cmdline.py", line 29, in _get_commands_from_module | |
for cmd in _iter_command_classes(module): |
This file contains hidden or 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
template <class T, class P, typename... Params1, typename... Params2> | |
static void call_all(QList<QPointer<T>> &objs, void (P::*func)(Params1...), Params2&&... parameters) { | |
//qDebug() << "call_all" << objs.size(); | |
for (QPointer<T> &obj: objs) { | |
if (obj.isNull()) continue; | |
(obj->*func)(std::forward<Params2>(parameters)...); | |
} | |
} |
This file contains hidden or 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
enum severity_level | |
{ | |
debug = 7, | |
info = 6, | |
warning = 4, | |
error = 3, | |
critical = 2 | |
}; |
This file contains hidden or 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
#!/bin/bash | |
source /etc/container_environment.sh | |
echo $DJANGO_HOST >> /app-data/test.txt |
This file contains hidden or 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
[ | |
{ | |
$match: | |
{ | |
"last_request.2015_05_20": {$exists: true} | |
} | |
}, | |
{ | |
$project: { | |
"main_computer": 1, |
This file contains hidden or 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
#include <boost/type_erasure/any.hpp> | |
#include <boost/type_erasure/member.hpp> | |
#include <boost/mpl/vector.hpp> | |
BOOST_TYPE_ERASURE_MEMBER((has_init), init, 0) | |
BOOST_TYPE_ERASURE_MEMBER((has_loadIntoTexture), loadIntoTexture, 1) | |
using _self = boost::type_erasure::_self; |
NewerOlder