π¨βπ»
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 file defines tests for various GGML ops and backends. | |
| // For the forward pass it asserts that the results of multiple backends computing the same GGML ops are consistent. | |
| // For the backward pass it asserts that the gradients from backpropagation are consistent | |
| // with the gradients obtained via the method of finite differences ("grad" mode, this is optional). | |
| // It is also possible to check the performance ("perf" mode). | |
| // | |
| // this file has three sections: Section 1 does general setup, section 2 defines the GGML ops to be tested, | |
| // and section 3 defines which tests to run. | |
| // Quick start for adding a new GGML op: Go to section 2 and create a struct that inherits from test_case, | |
| // then go to section 3 and add an instantiation of your struct. |
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
| diff --git a/dtl/Diff.hpp b/dtl/Diff.hpp | |
| index 8c9c774f..57067f9f 100644 | |
| --- a/dtl/Diff.hpp | |
| +++ b/dtl/Diff.hpp | |
| @@ -164,7 +164,7 @@ namespace dtl { | |
| return trivial; | |
| } | |
| - void enableTrivial () const { | |
| + void enableTrivial () { |
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
| // Used in https://jina.ai/tokenizer (Aug. 14th version) | |
| // Define variables for magic numbers | |
| const MAX_HEADING_LENGTH = 6; | |
| const MAX_HEADING_CONTENT_LENGTH = 200; | |
| const MAX_HEADING_UNDERLINE_LENGTH = 200; | |
| const MAX_HTML_HEADING_ATTRIBUTES_LENGTH = 100; | |
| const MAX_LIST_ITEM_LENGTH = 200; | |
| const MAX_NESTED_LIST_ITEMS = 5; | |
| const MAX_LIST_INDENT_SPACES = 7; | |
| const MAX_BLOCKQUOTE_LINE_LENGTH = 200; |
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 <chrono> | |
| #include <iostream> | |
| #include <vector> | |
| #include <random> | |
| #include <cstring> | |
| #include <array> | |
| #include <cblas.h> | |
| #include <rknn_matmul_api.h> |
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 <string> | |
| #include <vector> | |
| #include <functional> | |
| #include <iostream> | |
| #include <optional> | |
| #include <cassert> | |
| #include <unordered_set> | |
| #include <cppcoro/generator.hpp> | |
| #include <cppcoro/task.hpp> | |
| #include <cppcoro/sync_wait.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 <cxxabi.h> | |
| #include <iostream> | |
| void demangle_name(const std::string& mangled_name) | |
| { | |
| std::size_t len = 0; | |
| int status = 0; | |
| auto name = __cxxabiv1::__cxa_demangle(mangled_name.c_str(), nullptr, &len, &status); | |
| if (status == 0) | |
| { |
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
| import gym | |
| from etaler import et | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| import pandas as pd | |
| def running_mean(x, N): | |
| cumsum = np.cumsum(np.insert(x, 0, 0)) | |
| return (cumsum[N:] - cumsum[:-N]) / float(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
| #include "crypto.hpp" | |
| #include <regex> | |
| #include <bsd/stdlib.h> | |
| #include <botan/argon2.h> | |
| #include <botan/system_rng.h> | |
| static Botan::System_RNG rng; | |
| uint32_t secureRandom(uint32_t lower, uint32_t upper) |
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 <drogon/drogon.h> | |
| #include <exception> | |
| #include <coroutine> | |
| #include <stdexcept> | |
| using namespace drogon; | |
| int main() | |
| { | |
| app().createDbClient("postgresql", "localhost", 5432, "test", "test", "some legit password 191561", 16) |
NewerOlder