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 ProfilerLog(object): | |
def __init__(self, profiler_name="", start_ts=None): | |
self._profiler_name = profiler_name | |
self._start_ts = start_ts if start_ts else time.time() | |
self._steps_data = OrderedDict() | |
self._aux_data = {} | |
def step(self, step_name, begin_ts=None, end_ts=None): | |
if step_name not in self._steps_data: | |
begin_ts = begin_ts if begin_ts else time.time() |
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/env python3 | |
import os | |
import time | |
import datetime | |
import argparse | |
from sys import exit | |
from pathlib import Path | |
from typing import Iterator, Tuple | |
from shutil import disk_usage, rmtree |
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 timeit | |
import random | |
import string | |
# Function to generate random text of length 32 | |
def generate_random_text(): | |
return ''.join(random.choices(string.ascii_letters + string.digits, k=32)) | |
# Generate a list of a couple of hundred random text values | |
random_text_list = [generate_random_text() for _ in range(400000)] |
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
zbig@tx120-1:~/repos/private/openHASP$ git diff | |
diff --git a/src/hasp/hasp.cpp b/src/hasp/hasp.cpp | |
index 4e0f4eef..d30b3709 100644 | |
--- a/src/hasp/hasp.cpp | |
+++ b/src/hasp/hasp.cpp | |
@@ -134,8 +134,8 @@ HASP_ATTRIBUTE_FAST_MEM void hasp_update_sleep_state() | |
if(hasp_sleep_state != HASP_SLEEP_OFF) { | |
gui_hide_pointer(false); | |
hasp_sleep_state = HASP_SLEEP_OFF; | |
- dispatch_idle_state(HASP_SLEEP_OFF); |
OlderNewer