Содержание предоставили:
- Michael Sherman
- Yuan Cao
#pragma once | |
#include <mutex> | |
#include <utility> | |
#include <type_traits> | |
namespace details { | |
template <typename T, typename = void> | |
struct has_del_method : std::false_type {}; |
#pragma once | |
// Suppress warnings for AMQP-CPP | |
#if defined(__clang__) | |
#pragma clang diagnostic push | |
#pragma clang diagnostic ignored "-Wunused-parameter" | |
#pragma clang diagnostic ignored "-Wclass-conversion" | |
#pragma clang diagnostic ignored "-Wdeprecated-copy" | |
#include <amqpcpp.h> | |
#include <amqpcpp/libev.h> |
#!/bin/env bash | |
set -e | |
model="gpt-4.1"; | |
temperature=0.8; | |
endpoint_url="https://api.openai.com/v1/chat/completions" | |
api_key="$OPENAI_API_KEY" | |
# the hash of the commit that was marked with the last tag |
#!/bin/env bash | |
set -e | |
# model="gpt-4.1"; | |
# temperature=0.8; | |
model="o3"; | |
temperature=1; | |
endpoint_url="https://api.openai.com/v1/chat/completions" |
#include <unistd.h> | |
// true if current user is not root | |
// or true if owner changing is not required (targ_uid == 0) | |
// or true if current user is root and uid changed | |
// false otherwise (owner changing was unsuccessful) | |
bool change_owner(unsigned int targ_uid) noexcept | |
{ | |
return | |
(0u != getuid()) || // made sure that src_uid == 0 (source is root) |
#include <stdio.h> | |
#include <assert.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <errno.h> | |
#include <event2/bufferevent.h> | |
#include <event2/buffer.h> | |
#include <event2/listener.h> | |
#include <event2/util.h> |
#!/bin/bash | |
### BEGIN INIT INFO | |
# Provides: fixdell | |
# Required-Start: $local_fs $syslog $named | |
# Required-Stop: $local_fs $syslog $named | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Fix DELL freezes | |
# Description: startup script for Fix DELL freezes | |
### END INIT INFO |
#include <iostream> | |
#include <cmath> | |
#include <chrono> | |
struct BenchResult | |
{ | |
std::chrono::nanoseconds duration; | |
double sum; | |
}; |
#include <iostream> | |
#include <utility> | |
#include <vector> | |
// Равномерно разделяет диапазон значения | |
// Для балансировки нагрузки на ядра CPU | |
std::vector<std::pair<int, int>> | |
splitRange(int from, int to, uint threads) noexcept | |
{ | |
std::vector<std::pair<int, int>> pairs; |