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 os | |
import time | |
from typing import List | |
import tiktoken | |
def make_tiktoken_serial_benchmark(method_name: str): | |
def wrapped(documents: List[str], encoding: str) -> None: | |
enc = tiktoken.get_encoding(encoding) |
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
diff --git a/rosbag2_py/src/rosbag2_py/_reader.cpp b/rosbag2_py/src/rosbag2_py/_reader.cpp | |
index 731e627..51fa640 100644 | |
--- a/rosbag2_py/src/rosbag2_py/_reader.cpp | |
+++ b/rosbag2_py/src/rosbag2_py/_reader.cpp | |
@@ -21,7 +21,7 @@ | |
#include "rosbag2_cpp/readers/sequential_reader.hpp" | |
#include "rosbag2_cpp/reader.hpp" | |
#include "rosbag2_storage/storage_filter.hpp" | |
-#include "rosbag2_storage/storage_options.hpp" | |
+#include "rosbag2_cpp/storage_options.hpp" |
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
Submitting Job: ./rotate -t tiers -M 47 | |
Waiting for job to finish... | |
==== Standard Output ==== | |
FYI: the max tier you can be graded on is 47. | |
Setting up test up to tier 47: Malloc 171968x171968 matrix... | |
Linear search from tier 0 to 8... | |
PASS (yay!): Tier 0 : Rotated 26624x26624 matrix in 94 ms | |
PASS (ayy!): Tier 1 : Rotated 27712x27712 matrix in 123 ms | |
PASS (skrrt!): Tier 2 : Rotated 28864x28864 matrix in 133 ms | |
PASS (eoo!): Tier 3 : Rotated 30080x30080 matrix in 126 ms |
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
From 5b7e17417e31e52f5920608399d20696b03b87e6 Mon Sep 17 00:00:00 2001 | |
From: Cattalyya Nuengsigkapian <[email protected]> | |
Date: Sat, 14 Sep 2019 23:01:46 -0400 | |
Subject: [PATCH] [Fix] Speed up overhead in tiers testing. Fix malloc issue if | |
size is too large. Fix index overflow (32b to 64b) for very large size | |
matrix. | |
--- | |
utils/libbmp.c | 5 +++++ | |
utils/main.c | 13 +++++++++---- |
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 re | |
from pathlib import Path | |
INP_DIR = Path('./cubemx/') | |
OUT_DIR = Path('./') | |
comment = r'/\*{}([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+/' | |
any_comment = re.compile(comment.format('')) | |
user_comment = re.compile(comment.format(' USER')) | |
empty_comment_title = re.compile(comment.format('') + r'[\s\t\r\n]+(?=/\*)') |
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
' Usage: terminator[.vbs] [path to starting directory] | |
' contents enclosed in square brackets optional | |
args = "-c" & " -l " & """DISPLAY=:0 terminator""" | |
' If there's a single argument, interpret it as the starting directory | |
If WScript.Arguments.Count = 1 Then | |
dir = WScript.Arguments(0) | |
Else | |
dir = "" |
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 copy | |
import dataclasses | |
import types | |
from dataclasses import dataclass, field | |
from functools import wraps | |
from inspect import isclass | |
from typing import ClassVar, Set, Mapping, Callable, Dict, T | |
@dataclass |
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
{ | |
"can0": { | |
"FrontCanNodeBrakeThrottle": { | |
"accel_1": null, | |
"accel_2": null, | |
"brake_1": null, | |
"brake_2": null | |
}, | |
"FrontCanNodeWheelSpeed": { | |
"front_right_wheel_speed": "mRPM", |
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 "CANlib.h" | |
#include "evil_macros.h" | |
static Frame lastMessage; | |
static Can_ErrorID_T lastError = Can_Error_NO_RX; | |
#define DEFINE(name) \ | |
Can_ErrorID_T name ##_Write(name ## _T *type) { \ | |
Frame frame; \ | |
pack_ ## name(type, &frame); \ |