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 System.IO.Ports; | |
namespace AsyncExtensions { | |
public static class SerialPortExtensions | |
{ | |
/// <summary> | |
/// Read a line from the SerialPort asynchronously | |
/// </summary> | |
/// <param name="serialPort">The port to read data from</param> | |
/// <returns>A line read from the input</returns> |
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 io.dropwizard.auth.AuthenticationException; | |
import io.dropwizard.auth.Authenticator; | |
import io.dropwizard.auth.Authorizer; | |
import javax.annotation.Priority; | |
import javax.ws.rs.WebApplicationException; | |
import javax.ws.rs.container.ContainerRequestContext; | |
import javax.ws.rs.container.ContainerRequestFilter; | |
import javax.ws.rs.core.SecurityContext; | |
import java.io.IOException; |
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
class Array | |
def select_random | |
return self.sample | |
end | |
def select_random_that_isnt(*excluded_vals) | |
selected_value = self.select_random | |
if excluded_vals.include? selected_value | |
return self.select_random_that_isnt(*excluded_vals) |
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
--- | |
tests: | |
should_work: | |
inputs: | |
somestring: someval | |
somelist: | |
- val1 | |
expectations: | |
isAccepted: true |
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
#!/usr/bin/python3 | |
# -*- coding: utf-8 -*- | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
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 <vector> | |
#include <iostream> | |
#include <fstream> | |
#include <cstring> | |
#include <cerrno> | |
#include <chrono> | |
#include <string> | |
using std::chrono::time_point; | |
using std::chrono::microseconds; |
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
#define UNLIKELY(x) __builtin_expect(!!(x), 0) | |
#include <iostream> | |
#include <iterator> | |
#include <vector> | |
#include <string> | |
#include <immintrin.h> | |
using std::istream; | |
using std::ostream; |
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
#define UNLIKELY(x) __builtin_expect(!!(x), 0) | |
#include <iostream> | |
#include <string> | |
#include <immintrin.h> | |
using std::istream; | |
using std::ostream; | |
using std::runtime_error; | |
using std::string; |
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
#define UNLIKELY(x) __builtin_expect(!!(x), 0) | |
#include <iostream> | |
#include <string> | |
#include <immintrin.h> | |
#include <array> | |
#include <thread> | |
#include <mutex> | |
#include <condition_variable> | |
#include <atomic> |
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 <iostream> | |
#include <string> | |
#include <immintrin.h> | |
#include <array> | |
#include <thread> | |
#include <mutex> | |
#include <condition_variable> | |
#include <atomic> | |
#include <vector> |
OlderNewer