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 "tensorflow/cc/client/client_session.h" | |
#include "tensorflow/cc/ops/standard_ops.h" | |
#include "tensorflow/core/framework/tensor.h" | |
namespace tf = tensorflow; | |
namespace to = tf::ops; | |
int main() { | |
tf::Scope r = tf::Scope::NewRootScope(); | |
tf::Scope s = r.ExitOnError(); |
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
--start-lib | |
bazel-out/local-dbg/bin/tensorflow/core/_objs/gpu_lib/tensorflow/core/common_runtime/gpu/gpu_event_mgr.pic.o | |
--end-lib | |
bazel-out/local-dbg/bin/tensorflow/cc/_objs/real_math_grad/tensorflow/cc/gradients/real_math_grad.pic.o |
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
Starting /home/Void/devel/tensorflow/bazel-out/local-dbg/bin/tensorflow/cc/DimanNe/bitwise_operations/bitwise_operations... | |
2017-07-16 19:19:58.949382: I tensorflow/cc/DimanNe/tensorflow_utils/variable_initializer.cpp:11] -0.159492 | |
-0.959603 | |
2017-07-16 19:19:58.955909: I tensorflow/cc/DimanNe/bitwise_operations/main.cpp:96] Prediction: -1.11909, Loss: 4.49056 | |
2017-07-16 19:19:58.959526: I tensorflow/cc/DimanNe/bitwise_operations/main.cpp:96] Prediction: -0.271457, Loss: 1.6166 | |
2017-07-16 19:19:58.963232: I tensorflow/cc/DimanNe/bitwise_operations/main.cpp:96] Prediction: 0.237126, Loss: 0.581977 | |
2017-07-16 19:19:58.966743: I tensorflow/cc/DimanNe/bitwise_operations/main.cpp:96] Prediction: 0.542275, Loss: 0.209512 | |
2017-07-16 19:19:58.970338: I tensorflow/cc/DimanNe/bitwise_operations/main.cpp:96] Prediction: 0.725365, Loss: 0.0754242 | |
2017-07-16 19:19:58.974059: I tensorflow/cc/DimanNe/bitwise_operations/main.cpp:96] Prediction: 0.835219, Loss: 0.0271527 | |
2017-07-16 19:19:58.978500: I tensorflow/cc/DimanNe/bitw |
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
// Return a 64-bit random value. Uses | |
// std::mersenne_twister_engine::default_seed as seed value | |
uint64 New64DefaultSeed(); | |
/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. |
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 <cassert> | |
#include <unordered_set> | |
#include <vector> | |
// 21:30 - 22:16 | |
struct TPoint { | |
double X; | |
double Y; | |
}; |
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
qtc.clangcodemodel.ipc: ====> DocumentVisibilityChangedMessage(<EDITED.cpp>, <EDITED.cpp>, ) | |
qtc.clangbackend.server: ########## documentVisibilityChanged | |
qtc.clangbackend.timers: ClangCodeModelServer::documentVisibilityChanged needed 0 ms | |
qtc.clangbackend.jobs: [ <EDITED.cpp> ] Adding Job<23,"<EDITED.cpp>",UpdateAnnotations,PreviouslyParsed> | |
qtc.clangbackend.jobs: [ <EDITED.cpp> ] Adding Job<24,"<EDITED.cpp>",UpdateExtraAnnotations,RecentlyParsed> | |
qtc.clangbackend.jobs: [ <EDITED.cpp> ] Expired: Job<18,"<EDITED.cpp>",UpdateExtraAnnotations,RecentlyParsed> "outdated unsaved files" | |
qtc.clangbackend.jobs: [ <EDITED.cpp> ] Expired: Job<20,"<EDITED.cpp>",RequestReferences,RecentlyParsed> "changed document revision" | |
qtc.clangbackend.jobs: [ <EDITED.cpp> ] Not choosing due to dirty document: Job<24,"<EDITED.cpp>",UpdateExtraAnnotations,RecentlyParsed> | |
qtc.clangbackend.jobs: [ <EDITED.cpp> ] Running Job<23,"<EDITED.cpp>",UpdateAnnotations,PreviouslyParsed> with TranslationUnit {2d149b75-18eb-4344-b6bd-d25efbfbf107} |
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
Size of array: 1000 | |
Number of calls: 100000 | |
Actors reduce: | |
Linear Histrogram. Recorded 100000 samples, Min: 8, Max: 2675, Avg: 10 | |
(-inf; 1) (0 = 0.0%} {0.00%} | |
[1; 5) (0 = 0.0%} {0.00%} | |
[5; 10) ##################################################################################### (87875 = 87.9%} {0.00%} | |
[10; 15) ######## (8349 = 8.3%} {87.88%} | |
[15; 20) ## (2374 = 2.4%} {96.22%} |
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
// ================================================================================================== | |
// First, given a password, generate a key, as per https://stackoverflow.com/a/52196373/758986 | |
// aka perform "key stretching" | |
const std::string Password = "Password"; | |
const std::string Salt = "1234"; | |
std::string Key; | |
Key.resize(32); | |
// https://crypto.stackexchange.com/questions/35423/appropriate-scrypt-parameters-when-generating-an-scrypt-hash?newreg=c73ca93cedae4729b07a9ab776e4904b | |
const int ScryptResult = EVP_PBE_scrypt(Password.data(), | |
Password.size(), |
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
namespace std { | |
using gibi = std::ratio<1024LL * 1024 * 1024, 1LL>; // https://en.wikipedia.org/wiki/Binary_prefix | |
} | |
int main() { | |
const ctu::Status status = ct::AeadConfig::Register(); | |
if(!status.ok()) { | |
std::cout << status.error_message() << std::endl; | |
return 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
#pragma once | |
#include <filesystem> | |
class TPath { | |
template <class SourceOrIter, class Tp = std::filesystem::path &> | |
using _EnableIfPathable = std::enable_if_t<std::filesystem::__is_pathable<SourceOrIter>::value, Tp>; | |
public: | |
using path = std::filesystem::path; |
OlderNewer