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
# md_seq_show | |
- printf("%s: %sactive", dev, active ? "" : "in") | |
- if active | |
- if rdonly then printf(" (read-only)") | |
- if autoread then printf(" (auto-read-only)") | |
- printf(" %s", raidtype) | |
- for each dev | |
- printf(" %pg[%d]", dev, nr) | |
- * NOTE: %pg is a special format that prints the device name | |
- if writemostly then printf("(W)") |
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
[package] | |
name = "globals" | |
version = "0.1.0" | |
edition = "2021" | |
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | |
[dependencies] | |
log = "0.4.21" | |
simple_logger = "4.3.3" |
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
#!/bin/bash | |
CGROUP_PATH="/sys/fs/cgroup" | |
# Function to show IO PSI if avg10 is not 0 for a given cgroup | |
show_io_psi_if_needed() { | |
local cgroup_path=$1 | |
local psi_file="${cgroup_path}/io.pressure" | |
if [ -f "${psi_file}" ]; then |
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 dbus | |
from dbus.mainloop.glib import DBusGMainLoop | |
import gi.repository.GLib as glib | |
import os | |
def device_removed_callback(object_, interfaces): | |
if interfaces[-1] != "org.bluez.MediaPlayer1": | |
return |
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
/* | |
_______ | |
/ \ | |
.==. .==. | |
(( ))==(( )) | |
/ "==" "=="\ | |
/____|| || ||___\ | |
________ ____ ________ ___ ___ | |
| ___ \ / \ | ___ \ | | / / | |
| | \ \ / /\ \ | | \ \| |_/ / |
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
Considering root directory '/run/log/journal'. | |
Root directory /run/log/journal added. | |
Considering root directory '/var/log/journal'. | |
Root directory /var/log/journal added. | |
Considering directory '/var/log/journal/16d4ba3e7960484ca6a7dda49d8e5394'. | |
Directory /var/log/journal/16d4ba3e7960484ca6a7dda49d8e5394 added. | |
Journal effective settings seal=no keyed_hash=yes compress=ZSTD compress_threshold_bytes=8B | |
File /var/log/journal/16d4ba3e7960484ca6a7dda49d8e5394/system@22316234162f4e16a4208558d2318feb-0000000000af220d-0005fb7ebd5b49dc.journal added. | |
File /var/log/journal/16d4ba3e7960484ca6a7dda49d8e5394/user-1000@5c9d6a903213438bbcfebd81e0c430d5-0000000000ae7364-0005fb7e9183b5da.journal added. | |
File /var/log/journal/16d4ba3e7960484ca6a7dda49d8e5394/system@22316234162f4e16a4208558d2318feb-0000000000b2a9ea-0005fbb495eac39b.journal added. |
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
> SYSTEMD_LOG_LEVEL=debug journalctl -b -1 | |
Considering root directory '/run/log/journal'. | |
Root directory /run/log/journal added. | |
Considering root directory '/var/log/journal'. | |
Root directory /var/log/journal added. | |
Considering directory '/var/log/journal/16d4ba3e7960484ca6a7dda49d8e5394'. | |
Directory /var/log/journal/16d4ba3e7960484ca6a7dda49d8e5394 added. | |
Journal effective settings seal=no keyed_hash=yes compress=ZSTD compress_threshold_bytes=8B | |
File /var/log/journal/16d4ba3e7960484ca6a7dda49d8e5394/system@22316234162f4e16a4208558d2318feb-0000000000af220d-0005fb7ebd5b49dc.journal added. | |
File /var/log/journal/16d4ba3e7960484ca6a7dda49d8e5394/user-1000@5c9d6a903213438bbcfebd81e0c430d5-0000000000ae7364-0005fb7e9183b5da.journal added. |
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
> SYSTEMD_LOG_LEVEL=debug journalctl -b -1 | |
Considering root directory '/run/log/journal'. | |
Root directory /run/log/journal added. | |
Considering root directory '/var/log/journal'. | |
Root directory /var/log/journal added. | |
Considering directory '/var/log/journal/16d4ba3e7960484ca6a7dda49d8e5394'. | |
Directory /var/log/journal/16d4ba3e7960484ca6a7dda49d8e5394 added. | |
Journal effective settings seal=no keyed_hash=yes compress=ZSTD compress_threshold_bytes=8B | |
File /var/log/journal/16d4ba3e7960484ca6a7dda49d8e5394/system@22316234162f4e16a4208558d2318feb-00000000009fd362-0005fa2ea9e08fff.journal added. | |
File /var/log/journal/16d4ba3e7960484ca6a7dda49d8e5394/system@22316234162f4e16a4208558d2318feb-00000000009fdab9-0005fa2eaab216f6.journal added. |
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
# Deps: | |
# pip install bigdl-llm[all] | |
import torch | |
import time | |
import argparse | |
# import numpy as np | |
import readline | |
from bigdl.llm.transformers import AutoModel | |
from transformers import AutoTokenizer |
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
use std::{time::Duration, thread::sleep}; | |
use zbus::blocking::Connection; | |
mod mutter; | |
fn main() { | |
let connection = Connection::session().unwrap(); | |
let proxy = mutter::IdleMonitorProxyBlocking::new(&connection).unwrap(); | |
for _ in 0..10000 { |
NewerOlder