Skip to content

Instantly share code, notes, and snippets.

import requests
import subprocess
import re
import argparse
import tarfile
import zipfile
import io
import os
from typing import List, Dict, Optional, Tuple, Any
load("@rules_python//python:defs.bzl", "py_library")
_PROTOTXT_COMMAND = """
cat <<EOF >>{out}
# Autogenerated by bazel. DO NOT EDIT.
from google.protobuf import text_format
from {pkg} import {message}
text = \"\"\"
@crackcomm
crackcomm / liquidation_calculator.py
Created September 18, 2023 14:39 — forked from mattj161/liquidation_calculator.py
Binance liquidation calculator (based
# BTC-USDT
x125_lookup_table = [
( 50_000, 0.004, 0),
( 250_000, 0.005, 50),
( 1_000_000, 0.01, 1_300),
( 10_000_000, 0.02, 16_300),
( 20_000_000, 0.05, 266_300),
( 50_000_000, 0.1, 1_266_300),
( 100_000_000, 0.125, 2_516_300),
From: Frank Barrus
Patch from https://sourceware.org/bugzilla/attachment.cgi?id=13419&action=diff
diff --git a/nptl/pthread_cond_common.c b/nptl/pthread_cond_common.c
index fb035f72c3..a55eee3e6b 100644
--- a/nptl/pthread_cond_common.c
+++ b/nptl/pthread_cond_common.c
@@ -201,7 +201,6 @@ static bool __attribute__ ((unused))
__condvar_quiesce_and_switch_g1 (pthread_cond_t *cond, uint64_t wseq,
# Configuration for Alacritty, the GPU enhanced terminal emulator.
# Import additional configuration files
#
# Imports are loaded in order, skipping all missing files, with the importing
# file being loaded last. If a field is already present in a previous import, it
# will be replaced.
#
# All imports must either be absolute paths starting with `/`, or paths relative
# to the user's home directory starting with `~/`.
diff --git a/src/core/reactor.cc b/src/core/reactor.cc
index 29090d3c..0d68e5c1 100644
--- a/src/core/reactor.cc
+++ b/src/core/reactor.cc
@@ -2851,7 +2851,7 @@ class reactor::syscall_pollfn final : public reactor::pollfn {
void
reactor::wakeup() {
uint64_t one = 1;
- ::write(_notify_eventfd.get(), &one, sizeof(one));
+ [[maybe_unused]] auto ret = ::write(_notify_eventfd.get(), &one, sizeof(one));
SUBCOMMAND: # @cryptopp//:cryptopp_internal [action 'Compiling marss.cpp', configuration: 8580d020f4a3025015f7c4d5c33ae19b2fda2e0114bb37ba6cbb4770bbb637f8, execution platform: @local_config_platform//:host]
(cd /home/pah/.cache/bazel/_bazel_pah/207698d8a98c489342bc1045d7a0acff/execroot/seastar_bazel && \
exec env - \
PATH=/home/pah/.cache/bazelisk/downloads/bazelbuild/bazel-5.4.0-linux-x86_64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin \
PWD=/proc/self/cwd \
/usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer '-std=c++0x' -MD -MF bazel-out/k8-fastbuild/bin/external/cryptopp/_objs/cryptopp_internal/marss.pic.d '-frandom-seed=bazel-out/k8-fastbuild/bin/external/cryptopp/_objs/cryptopp_internal/marss.pic.o' -fPIC -DCRYPTOPP_DISABLE_SSE4 -iquote external/cryptopp -iquote bazel-out/k8-fastbuild/bin/external/cryptopp '-march=native' '-std=c++20' -fopenmp -msha -maes -
This file has been truncated, but you can view the full file.
Loading:
Loading: 0 packages loaded
Analyzing: 78 targets (0 packages loaded, 0 targets configured)
INFO: Analyzed 78 targets (1 packages loaded, 4 targets configured).
INFO: Found 5 targets and 73 test targets...
[0 / 7] [Prepa] BazelWorkspaceStatusAction stable-status.txt
SUBCOMMAND: # @org_lzma_lzma//:copy_config [action 'Copying files', configuration: 8580d020f4a3025015f7c4d5c33ae19b2fda2e0114bb37ba6cbb4770bbb637f8, execution platform: @local_config_platform//:host]
(cd /home/pah/.cache/bazel/_bazel_pah/207698d8a98c489342bc1045d7a0acff/execroot/seastar_bazel && \
exec env - \
INFO: Invocation ID: 1bedb17b-ddde-4c28-9752-aad54c7069da
Loading:
Loading: 0 packages loaded
Analyzing: 78 targets (0 packages loaded, 0 targets configured)
INFO: Analyzed 78 targets (11 packages loaded, 471 targets configured).
INFO: Found 5 targets and 73 test targets...
[3 / 11] [Prepa] BazelWorkspaceStatusAction stable-status.txt ... (2 actions, 0 running)
[37 / 61] Compiling tests/unit/abortable_fifo_test.cc; 1s remote-cache, local ... (24 actions running)
[38 / 61] Compiling tests/unit/abortable_fifo_test.cc; 7s remote-cache, local ... (23 actions, 22 running)
[40 / 61] Compiling tests/unit/alien_test.cc; 8s remote-cache, local ... (24 actions running)
template <typename... Ts>
struct type_list {};
// base case
template <typename Func, typename = void>
struct invoke_args;
// nonmembers
template <typename Ret, typename... Args, bool noex>
struct invoke_args<Ret(Args...) noexcept(noex)> { using args = type_list<Args...>; };