Skip to content

Instantly share code, notes, and snippets.

View Tomcat-42's full-sized avatar
🧙
0x4d61676500

Pablo Alessandro Santos Hugen Tomcat-42

🧙
0x4d61676500
View GitHub Profile
#!/usr/bin/env python
"""This script performs Welch's t-test on a JSON export file with two
benchmark results to test whether or not the two distributions are
the same."""
import argparse
import json
import sys
from scipy import stats
# Autogenerated.
set(DEFAULT_CUDA_VERSION 12.3)
set(CUDA_VERSIONS 12.3)
set(PROF_SUFFIX x64)
# End autogeneration.
# This cmake file is prepended by a script to populate some hardcoded variables.
# These variables are: DEFAULT_CUDA_VERSION, CUDA_VERSIONS, PROF_SUFFIX.
#
const nvhome = "/opt/nvidia/hpc_sdk"
const target = "Linux_x86_64"
const version = "2024"
const nvcudadir = "/opt/nvidia/hpc_sdk/Linux_x86_64/2024/cuda"
const nvcompdir = "/opt/nvidia/hpc_sdk/Linux_x86_64/2024/compilers"
const nvmathdir = "/opt/nvidia/hpc_sdk/Linux_x86_64/2024/math_libs"
const nvcommdir = "/opt/nvidia/hpc_sdk/Linux_x86_64/2024/comm_libs"
export-env {
load-env {
#!/bin/bash
# mapwacom script
MAPWACOM=$(basename $0)
EXIT_CODE_BAD_DEVICE=82
EXIT_CODE_NO_SUCH_DEVICE=80
EXIT_CODE_NO_SUCH_SCREEN=81
EXIT_CODE_MISSING_DEPS=83
EXIT_CODE_USAGE=64
#!/usr/bin/env bash
function dmenu() {
for opt in "${@:2}"; do
echo "$opt"
done | command dmenu -p "$1" -l 7
}
function toggle_daemon() {
if pgrep -x "picom" >/dev/null && pgrep -x "gromit-mpx" >/dev/null; then
#include <ESP8266WiFi.h>
#include <PubSubClient.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
#include <ESP8266mDNS.h>
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_SSD1306.h>
#include <Adafruit_Sensor.h>
#include <DHT.h>
#define NOTE_B0 31
#define NOTE_C1 33
#define NOTE_CS1 35
#define NOTE_D1 37
#define NOTE_DS1 39
#define NOTE_E1 41
#define NOTE_F1 44
#define NOTE_FS1 46
#define NOTE_G1 49
#define NOTE_GS1 52
@Tomcat-42
Tomcat-42 / rust_analyzer_external_modules.patch
Created April 6, 2023 13:32
This patch fixes the Kernel `rust-analyzer` target for out-of-tree rust kernel modules. https://lore.kernel.org/rust-for-linux/20230121052507.885734-1-varmavinaym@gmail.com/
Makefile | 12 +++++++-----
rust/Makefile | 6 ++++--
scripts/generate_rust_analyzer.py | 31 ++++++++++++++++++-------------
3 files changed, 29 insertions(+), 20 deletions(-)
diff --git a/Makefile b/Makefile
index f41ec8c8426b..a055a316d2a4 100644
--- a/Makefile
+++ b/Makefile
@@ -1831,11 +1831,6 @@ rustfmt:
<Program> ::= <Exps> | <Decs>
<Exps> ::= <Exp> | <Exp> <Exps> | ''
<Exp> ::= <Nil> | <Integer> | <String> | <ListExp> | <Struct> | <LValue> | <FnCall> | <Operation> | <Group> | <IfExp> | <WhileExp> | <ForExp> | <Break> | <LetExp>
<ListExp> ::= <Id> <LSquareBracket> <Exp> <RSquareBracket> <Of> <Exp>
<Struct> ::= <Id> <LCurlyBracket> <StructFields> <RCurlyBracket>
<StructFields> ::= <Id> <Equal> <Exp> | <Id> <Equal> <Exp> <Comma> <StructFields> | ''
<Program> ::= <Exps> | <Decs>
<Exps> ::= <Exp> | <Exp> <Exps> | ''
<Exp> ::= <Nil> | <Integer> | <String> | <ListExp> | <Struct> | <LValue> | <FnCall> | <Operation> | <Group> | <IfExp> | <WhileExp> | <ForExp> | <Break> | <LetExp>
<ListExp> ::= <Id> <LSquareBracket> <Exp> <RSquareBracket> <Of> <Exp>
<Struct> ::= <Id> <LCurlyBracket> <StructFields> <RCurlyBracket>
<StructFields> ::= <Id> <Equal> <Exp> | <Id> <Equal> <Exp> <Comma> <StructFields> | ''