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 cv2 | |
from cv2 import COLOR_RGB2GRAY | |
from skimage.feature import hog | |
from sklearn.model_selection import train_test_split | |
from sklearn.svm import LinearSVC | |
import matplotlib.pyplot as plt | |
from glob import glob |
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
input_layer = blocks[0] | |
input_shape = (int(input_layer['shape']), | |
int(input_layer['shape']), | |
int(input_layer['channels'])) | |
true_boxes = Input(shape=(1, 1, 1, TRUE_BOX_BUFFER , 4)) | |
model_input = Input(input_shape) | |
x = model_input | |
skip_connection = None |
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
# theme | |
POWERLEVEL9K_MODE='nerdfont-complete' | |
POWERLEVEL9K_PROMPT_ON_NEWLINE=true | |
POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR='' | |
POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR='' | |
POWERLEVEL9K_LEFT_SUBSEGMENT_SEPARATOR='' | |
POWERLEVEL9K_RIGHT_SUBSEGMENT_SEPARATOR='' | |
POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX="%F{blue}\u256D\u2500%F{white}" | |
POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX="%F{blue}\u2570\uf460%F{white} " | |
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(root_indicator dir dir_writable_joined) |
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
template<class _Tp> | |
struct __shared_if | |
{ | |
typedef shared_ptr<_Tp> __shared_single; | |
}; | |
template<class _Tp> | |
struct __shared_if<_Tp[]> | |
{ | |
typedef shared_ptr<typename remove_extent<_Tp>::type> __shared_array_unknown_bound; |
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
template<class T> | |
struct Container | |
{ | |
union wrapper { | |
constexpr wrapper(): b() {} | |
~wrapper() = default; | |
bool b; | |
T t; | |
} w; |
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
#include<chrono> | |
#include<unordered_set> | |
#include<iostream> | |
#include<cassert> | |
using namespace std; | |
using namespace std::chrono; | |
template <class _Value, class _Hash, class _Pred, class _Alloc> | |
bool |
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
using namespace std; | |
template<class A, class... Args> | |
auto add_and_forward(A a, Args&&... args) | |
{ | |
return forward_as_tuple(a, forward<Args>(args)...); // <--- here is our issue | |
} | |
template<class A, class T1, class T2> | |
auto join(A a, T1 t1, T2 t2) |
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
using namespace std; | |
template<class T1, class T2> | |
void join(T1&& t1, T2&& t2) | |
{ | |
static_assert(is_same<decltype(get<0>(t1)), int&&>::value); // fails | |
} | |
template<class T1, class T2> | |
auto foward_pair(pair<T1, T2>&& p) |
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
case Builtin::BI__builtin_llroundf: { | |
APFloat FPVal(0.0); | |
APSInt IVal; | |
bool isExact = true; | |
if(!EvaluateFloat(E->getArg(0), FPVal, Info)) return false; | |
// I have also tried with several other rm values. | |
FPVal.convertToInteger(IVal, APFloat::rmNearestTiesToEven, &isExact); | |
return Success(IVal.getExtValue(), E); | |
} |
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
struct I { | |
virtual ~I() = default; | |
}; | |
struct A : public I { int value = 1; }; | |
struct B : public I { int value = 2; }; | |
struct C : public I { int value = 3; }; | |
template <template <int...> class _Tp, class> | |
struct instance_of : std::false_type { }; |