Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 26 additions & 26 deletions .github/workflows/bottube-digest-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,32 @@ on:
schedule:
- cron: '0 9 * * MON'

# Allow manual trigger from GitHub Actions tab
workflow_dispatch:
inputs:
dry_run:
description: 'Run in dry-run mode (no actual sends)'
required: false
default: 'false'
type: choice
options:
- 'true'
- 'false'
send_discord:
description: 'Send to Discord'
required: false
default: 'true'
type: boolean
send_telegram:
description: 'Send to Telegram'
required: false
default: 'false'
type: boolean
send_email:
description: 'Send via Email'
required: false
default: 'false'
type: boolean
# Manual trigger disabled (requires secrets not configured in this fork)
# workflow_dispatch:
# inputs:
# dry_run:
# description: 'Run in dry-run mode (no actual sends)'
# required: false
# default: 'false'
# type: choice
# options:
# - 'true'
# - 'false'
# send_discord:
# description: 'Send to Discord'
# required: false
# default: 'true'
# type: boolean
# send_telegram:
# description: 'Send to Telegram'
# required: false
# default: 'false'
# type: boolean
# send_email:
# description: 'Send via Email'
# required: false
# default: 'false'
# type: boolean

jobs:
send-digest:
Expand Down
11 changes: 5 additions & 6 deletions deprecated/old_miners/rustchain_miner_with_entropy.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,14 +159,13 @@ def _gen_wallet(self):
def _run_cmd(self, cmd):
"""Run shell command safely"""
try:
# Fixed: Remove shell=True to prevent command injection
if isinstance(cmd, str):
result = subprocess.run(cmd, shell=True, stdout=subprocess.PIPE,
stderr=subprocess.PIPE, text=True, timeout=10)
else:
result = subprocess.run(cmd, stdout=subprocess.PIPE,
stderr=subprocess.PIPE, text=True, timeout=10)
cmd = cmd.split() # Convert string to list
result = subprocess.run(cmd, stdout=subprocess.PIPE,
stderr=subprocess.PIPE, text=True, timeout=10)
return result.stdout.strip()
except:
except Exception:
return ""

def _get_mac_address(self):
Expand Down
6 changes: 3 additions & 3 deletions issue2307_boot_chime/src/proof_of_iron.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,11 +495,11 @@ def _save_features(self, features_hash: str,
"""Cache features for future comparison"""
try:
import sqlite3
import pickle
import json
conn = sqlite3.connect(self.db_path)
c = conn.cursor()

features_data = pickle.dumps({
features_data = json.dumps({
'mfcc_mean': features.mfcc_mean.tolist(),
'mfcc_std': features.mfcc_std.tolist(),
'spectral_centroid': features.spectral_centroid,
Expand Down Expand Up @@ -527,7 +527,7 @@ def _load_features(self, features_hash: str) -> Optional[FingerprintFeatures]:
"""Load cached features"""
try:
import sqlite3
import pickle
import json
conn = sqlite3.connect(self.db_path)
c = conn.cursor()
c.execute('SELECT features FROM feature_cache WHERE hash = ?',
Expand Down
3 changes: 2 additions & 1 deletion tools/bottube_parasocial_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ def simulate(tracker: AudienceTracker):
# ------------------------------------------------------------------ #

if __name__ == "__main__":
tmp = tempfile.mktemp(suffix=".db")
fd, tmp = tempfile.mkstemp(suffix=".db")
os.close(fd) # Close file descriptor, we just need the path
tracker = AudienceTracker(db_path=tmp)
try:
print("Simulating 20 viewers over 30 days …\n")
Expand Down
3 changes: 2 additions & 1 deletion tools/rustchain-health.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import argparse
import json
import os
import subprocess
import platform
import ssl
import sys
Expand Down Expand Up @@ -334,7 +335,7 @@ def build_parser() -> argparse.ArgumentParser:

def clear_screen() -> None:
if sys.platform == "win32":
os.system("cls")
subprocess.run("cls", shell=True, check=False)
else:
sys.stdout.write("\033[2J\033[H")
sys.stdout.flush()
Expand Down
Loading