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
| #define method_checker(name, method, result, ...)\ | |
| template <typename T>\ | |
| struct name {\ | |
| template <typename testee, result (testee::*)(__VA_ARGS__) = &testee::method> struct tester {};\ | |
| template <typename testee> static std::true_type test(tester<testee> *);\ | |
| template <typename> static std::false_type test(...);\ | |
| static constexpr bool has_method = decltype(test<T>(nullptr))::value;\ | |
| }; | |
| method_checker(has_update, update, void); |
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 | |
| # MacOSX-SDKs: download from https://github.com/phracker/MacOSX-SDKs | |
| FROM=5 | |
| TO=10 | |
| CMD="/usr/bin/sudo /bin/ln -s" | |
| MY_PATH=`pwd` |
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 "ofMain.h" | |
| namespace linear_regression { | |
| using default_value_type = float; | |
| template <std::size_t num, typename value_type = default_value_type> | |
| struct model { | |
| using record = std::array<value_type, num>; | |
| using result = value_type; | |
| using datum = std::pair<record, result>; |
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 <type_traits> | |
| #include <array> | |
| #include <cmath> | |
| #if 201402L <= __cplusplus | |
| # define constexpr_14 constexpr | |
| #else | |
| # define constexpr_14 | |
| #endif |
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
| // | |
| // logistic_regression.hpp | |
| // | |
| // Created by ISHII 2bit on 2016/01/08. | |
| // | |
| // | |
| #pragma once | |
| #include "vec.hpp" |
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 <array> | |
| namespace bbb { | |
| template <typename type> | |
| using get_type = typename type::type; | |
| namespace sequences { | |
| template <typename type, type ... ns> | |
| struct integer_sequence { | |
| using value_type = type; |
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 | |
| echo -n "`pwd`" | pbcopy |
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 | |
| cd $1 | |
| FILES="./*" | |
| for FILEPATH in $FILES; | |
| do | |
| if [ -d $FILEPATH ]; | |
| then | |
| cd $FILEPATH | |
| /usr/bin/git config --get remote.origin.url >/dev/null 2>&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
| #!/bin/bash | |
| cd $1 | |
| FILES="*" | |
| for FILEPATH in $FILES; | |
| do | |
| if [ -d $FILEPATH ]; | |
| then | |
| cd $FILEPATH | |
| git config --get remote.origin.url >/dev/null 2>&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
| #pragma once | |
| #include "ofConstants.h" | |
| #define OFX_MAKE_OF_VERSION(major, minor, patch) (major * 10000 + minor * 100 + patch) | |
| #define OFX_THIS_OF_VERSION OFX_MAKE_OF_VERSION(OF_VERSION_MAJOR, OF_VERSION_MINOR, OF_VERSION_PATCH) | |
| #define OFX_THIS_OF_IS_OLDER_THAN(major, minor, patch) (OFX_OF_VERSION < OFX_MAKE_OF_VERSION(major, minor, patch)) | |
| #define OFX_THIS_OF_IS_OLDER_THAN_EQ(major, minor, patch) (OFX_OF_VERSION <= OFX_MAKE_OF_VERSION(major, minor, patch)) | |
| #define OFX_THIS_OF_IS_NEWER_THAN(major, minor, patch) (OFX_MAKE_OF_VERSION(major, minor, patch) < OFX_OF_VERSION) | |
| #define OFX_THIS_OF_IS_NEWER_THAN_EQ(major, minor, patch) (OFX_MAKE_OF_VERSION(major, minor, patch) <= OFX_OF_VERSION) |