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 "query_classifier/AstFeatureVectorizer.hpp" | |
| #include <functional> | |
| #include <stdexcept> | |
| namespace query_classifier { | |
| AstFeatureVectorizer::AstFeatureVectorizer(std::size_t max_path_length, | |
| std::size_t bucket_count) | |
| : max_path_length_(max_path_length), bucket_count_(bucket_count) { |
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
| aback | |
| abaft | |
| abaxially | |
| abeam | |
| abed | |
| abjectly | |
| ably | |
| abnormally | |
| aboard | |
| abominably |
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 <cstring> | |
| #include <functional> | |
| #include <iostream> | |
| #include <string> | |
| #include <utility> | |
| #include <vector> | |
| class MyBuf : public std::streambuf { | |
| public: | |
| MyBuf(int maxLength, std::function<void(const char *, int)> callbackFn); |
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
| set(CMAKE_BUILD_TYPE Debug) | |
| cmake_minimum_required(VERSION 2.8.12) | |
| project(libuv1) | |
| add_definitions("-std=c++11") | |
| include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) | |
| conan_basic_setup() | |
| add_executable(server server.cpp) |
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
| var bucket = "a-bucket"; | |
| var filename = "logs/abc"; | |
| var event = { | |
| "Records": [ | |
| { | |
| "s3": { | |
| "object": { |
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
| #!/usr/bin/env bash | |
| # Formatting constants | |
| export BOLD=`tput bold` | |
| export UNDERLINE_ON=`tput smul` | |
| export UNDERLINE_OFF=`tput rmul` | |
| export TEXT_BLACK=`tput setaf 0` | |
| export TEXT_RED=`tput setaf 1` | |
| export TEXT_GREEN=`tput setaf 2` | |
| export TEXT_YELLOW=`tput setaf 3` |
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
| # Lists out all files that have changes when compared to trunk | |
| # this assumes the name of the current directory | |
| # is the name of the folder in ^/trunk/<<folder>> | |
| BASE=$(pwd); BASE=$(basename $BASE); svn diff ^/trunk/$BASE . | grep Index | grep "\." | cut -d " " -f2 | xargs basename | sort | uniq |
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
| #!/usr/bin/awk -f | |
| # Convert the "svn log" output into a one liner format, which is easier to grep | |
| # or use in scripts. Pipe "svn log" into this script | |
| # When we get a line that starts with a revision number, put the data in variables | |
| /^r[0-9]+/ { | |
| rev=$1 | |
| user=$3 | |
| date=$5 |
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
| // thanks https://gist.github.com/thomseddon/3511330 | |
| function formatBytes(bytes, precision) { | |
| if (isNaN(parseFloat(bytes)) || !isFinite(bytes)) return '-'; | |
| if (typeof precision === 'undefined') precision = 1; | |
| var units = ['bytes', 'kB', 'MB', 'GB', 'TB', 'PB'], | |
| number = Math.floor(Math.log(bytes) / Math.log(1024)); | |
| return (bytes / Math.pow(1024, Math.floor(number))).toFixed(precision) + ' ' + units[number]; | |
| } |
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
| if (typeof($) === 'undefined') { | |
| alert('jquery is required'); | |
| } | |
| $("body").append($('<div id="console-log"></div>').css({ | |
| backgroundColor:'black', | |
| color:'#33FF00', | |
| padding:3 | |
| })); | |
| var consoleLineCss = { |
NewerOlder