machineconfig 2.6__py3-none-any.whl → 2.7__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of machineconfig might be problematic. Click here for more details.
- machineconfig/cluster/remote/remote_machine.py +0 -1
- machineconfig/cluster/sessions_managers/wt_local.py +1 -1
- machineconfig/cluster/sessions_managers/wt_local_manager.py +1 -1
- machineconfig/cluster/sessions_managers/wt_remote.py +1 -1
- machineconfig/cluster/sessions_managers/wt_remote_manager.py +1 -1
- machineconfig/cluster/sessions_managers/wt_utils/layout_generator.py +1 -1
- machineconfig/cluster/sessions_managers/wt_utils/process_monitor.py +1 -1
- machineconfig/cluster/sessions_managers/wt_utils/status_reporter.py +1 -1
- machineconfig/cluster/sessions_managers/zellij_local.py +1 -1
- machineconfig/cluster/sessions_managers/zellij_local_manager.py +1 -1
- machineconfig/cluster/sessions_managers/zellij_remote.py +1 -1
- machineconfig/cluster/sessions_managers/zellij_remote_manager.py +1 -1
- machineconfig/cluster/sessions_managers/zellij_utils/example_usage.py +1 -1
- machineconfig/cluster/sessions_managers/zellij_utils/layout_generator.py +1 -1
- machineconfig/cluster/sessions_managers/zellij_utils/process_monitor.py +1 -1
- machineconfig/cluster/sessions_managers/zellij_utils/status_reporter.py +1 -1
- machineconfig/jobs/__pycache__/__init__.cpython-313.pyc +0 -0
- machineconfig/jobs/python/vscode/sync_code.py +0 -1
- machineconfig/jobs/python_generic_installers/__pycache__/__init__.cpython-313.pyc +0 -0
- machineconfig/jobs/python_linux_installers/__pycache__/__init__.cpython-313.pyc +0 -0
- machineconfig/profile/create.py +8 -16
- machineconfig/profile/shell.py +140 -179
- machineconfig/scripts/__pycache__/__init__.cpython-313.pyc +0 -0
- machineconfig/scripts/linux/choose_wezterm_theme +1 -1
- machineconfig/scripts/linux/cloud_copy +1 -1
- machineconfig/scripts/linux/cloud_mount +1 -1
- machineconfig/scripts/linux/cloud_repo_sync +1 -1
- machineconfig/scripts/linux/cloud_sync +1 -1
- machineconfig/scripts/linux/croshell +2 -1
- machineconfig/scripts/linux/devops +1 -1
- machineconfig/scripts/linux/fire +1 -1
- machineconfig/scripts/linux/fire_agents +1 -1
- machineconfig/scripts/linux/ftpx +1 -1
- machineconfig/scripts/linux/gh_models +1 -1
- machineconfig/scripts/linux/kill_process +1 -1
- machineconfig/scripts/linux/mcinit +1 -1
- machineconfig/scripts/linux/mount_nfs +1 -1
- machineconfig/scripts/linux/mount_nw_drive +1 -11
- machineconfig/scripts/linux/repos +1 -1
- machineconfig/scripts/linux/scheduler +1 -1
- machineconfig/scripts/linux/start_slidev +1 -1
- machineconfig/scripts/linux/start_terminals +1 -1
- machineconfig/scripts/linux/wifi_conn +1 -1
- machineconfig/scripts/python/__pycache__/__init__.cpython-313.pyc +0 -0
- machineconfig/scripts/python/__pycache__/cloud_repo_sync.cpython-313.pyc +0 -0
- machineconfig/scripts/python/__pycache__/devops.cpython-313.pyc +0 -0
- machineconfig/scripts/python/__pycache__/devops_devapps_install.cpython-313.pyc +0 -0
- machineconfig/scripts/python/__pycache__/devops_update_repos.cpython-313.pyc +0 -0
- machineconfig/scripts/python/__pycache__/get_zellij_cmd.cpython-313.pyc +0 -0
- machineconfig/scripts/python/__pycache__/repos.cpython-313.pyc +0 -0
- machineconfig/scripts/python/__pycache__/repos_helper_record.cpython-313.pyc +0 -0
- machineconfig/scripts/python/ai/mcinit.py +16 -2
- machineconfig/scripts/python/ai/scripts/lint_and_type_check.sh +1 -1
- machineconfig/scripts/python/croshell.py +0 -1
- machineconfig/scripts/python/devops.py +1 -13
- machineconfig/scripts/python/devops_update_repos.py +39 -19
- machineconfig/scripts/python/fire_agents.py +1 -1
- machineconfig/scripts/python/fire_jobs.py +8 -3
- machineconfig/scripts/python/fire_jobs_layout_helper.py +1 -1
- machineconfig/scripts/python/helpers/__pycache__/__init__.cpython-313.pyc +0 -0
- machineconfig/scripts/python/helpers/__pycache__/repo_sync_helpers.cpython-313.pyc +0 -0
- machineconfig/scripts/python/repos.py +10 -227
- machineconfig/scripts/python/repos_helper_record.py +193 -0
- machineconfig/scripts/windows/choose_wezterm_theme.ps1 +1 -1
- machineconfig/scripts/windows/cloud_copy.ps1 +1 -1
- machineconfig/scripts/windows/cloud_mount.ps1 +1 -1
- machineconfig/scripts/windows/cloud_repo_sync.ps1 +1 -1
- machineconfig/scripts/windows/cloud_sync.ps1 +1 -1
- machineconfig/scripts/windows/croshell.ps1 +1 -1
- machineconfig/scripts/windows/devops.ps1 +1 -29
- machineconfig/scripts/windows/dotfile.ps1 +1 -1
- machineconfig/scripts/windows/fire.ps1 +1 -45
- machineconfig/scripts/windows/ftpx.ps1 +1 -1
- machineconfig/scripts/windows/gpt.ps1 +1 -23
- machineconfig/scripts/windows/kill_process.ps1 +1 -1
- machineconfig/scripts/windows/mcinit.ps1 +1 -1
- machineconfig/scripts/windows/mount_ssh.ps1 +1 -1
- machineconfig/scripts/windows/pomodoro.ps1 +1 -1
- machineconfig/scripts/windows/repos.ps1 +1 -1
- machineconfig/scripts/windows/scheduler.ps1 +1 -1
- machineconfig/scripts/windows/snapshot.ps1 +1 -1
- machineconfig/scripts/windows/start_slidev.ps1 +1 -1
- machineconfig/scripts/windows/start_terminals.ps1 +1 -1
- machineconfig/scripts/windows/wifi_conn.ps1 +1 -2
- machineconfig/settings/shells/pwsh/init.ps1 +0 -4
- machineconfig/setup_linux/web_shortcuts/croshell.sh +1 -1
- machineconfig/setup_linux/web_shortcuts/interactive.sh +7 -13
- machineconfig/setup_windows/web_shortcuts/interactive.ps1 +9 -18
- machineconfig/setup_windows/wt_and_pwsh/set_wt_settings.py +1 -66
- machineconfig/utils/links.py +1 -2
- machineconfig/utils/options.py +8 -5
- machineconfig/utils/procs.py +5 -1
- machineconfig/utils/scheduling.py +0 -1
- machineconfig/{cluster/sessions_managers → utils/schemas/layouts}/layout_types.py +0 -1
- machineconfig/utils/schemas/repos/repos_types.py +28 -0
- machineconfig/utils/source_of_truth.py +1 -4
- machineconfig/utils/ssh.py +1 -1
- {machineconfig-2.6.dist-info → machineconfig-2.7.dist-info}/METADATA +1 -1
- {machineconfig-2.6.dist-info → machineconfig-2.7.dist-info}/RECORD +103 -110
- {machineconfig-2.6.dist-info → machineconfig-2.7.dist-info}/entry_points.txt +1 -1
- machineconfig/jobs/python_custom_installers/__pycache__/__init__.cpython-313.pyc +0 -0
- machineconfig/profile/create_hardlinks.py +0 -140
- machineconfig/scripts/linux/checkout_versions +0 -2
- machineconfig/scripts/linux/cloud_manager +0 -2
- machineconfig/scripts/linux/url2md +0 -2
- machineconfig/scripts/python/__pycache__/croshell.cpython-313.pyc +0 -0
- machineconfig/scripts/windows/checkout_version.ps1 +0 -1
- machineconfig/scripts/windows/cloud_manager.ps1 +0 -1
- machineconfig/scripts/windows/neofetch.ps1 +0 -2
- machineconfig/scripts/windows/wsl_windows_transfer.ps1 +0 -1
- machineconfig/settings/__pycache__/__init__.cpython-313.pyc +0 -0
- machineconfig/settings/shells/ipy/profiles/default/__pycache__/__init__.cpython-313.pyc +0 -0
- machineconfig/settings/shells/ipy/profiles/default/startup/__pycache__/__init__.cpython-313.pyc +0 -0
- machineconfig/utils/ai/browser_user_wrapper.py +0 -66
- machineconfig/utils/ai/url2md.py +0 -85
- /machineconfig/setup_windows/wt_and_pwsh/{set_pwsh_theme.py → install_nerd_fonts.py} +0 -0
- {machineconfig-2.6.dist-info → machineconfig-2.7.dist-info}/WHEEL +0 -0
- {machineconfig-2.6.dist-info → machineconfig-2.7.dist-info}/top_level.txt +0 -0
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
# """
|
|
2
|
-
# playwright install
|
|
3
|
-
# sudo nala install libavif13
|
|
4
|
-
# """
|
|
5
|
-
|
|
6
|
-
# import os
|
|
7
|
-
# os.environ["ANONYMIZED_TELEMETRY"] = "false"
|
|
8
|
-
|
|
9
|
-
# from langchain_ollama import ChatOllama
|
|
10
|
-
# from browser_use import Agent
|
|
11
|
-
# import asyncio
|
|
12
|
-
# from rich.panel import Panel
|
|
13
|
-
# from rich import print as rprint
|
|
14
|
-
|
|
15
|
-
# BOX_WIDTH = 150 # width for box drawing
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
# def _get_padding(text: str, padding_before: int = 2, padding_after: int = 1) -> str:
|
|
19
|
-
# """Calculate the padding needed to align the box correctly.
|
|
20
|
-
|
|
21
|
-
# Args:
|
|
22
|
-
# text: The text to pad
|
|
23
|
-
# padding_before: The space taken before the text (usually "║ ")
|
|
24
|
-
# padding_after: The space needed after the text (usually " ║")
|
|
25
|
-
|
|
26
|
-
# Returns:
|
|
27
|
-
# A string of spaces for padding
|
|
28
|
-
# """
|
|
29
|
-
# # Count visible characters (might not be perfect for all Unicode characters)
|
|
30
|
-
# text_length = len(text)
|
|
31
|
-
# padding_length = BOX_WIDTH - padding_before - text_length - padding_after
|
|
32
|
-
# return ' ' * max(0, padding_length)
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
# # Create agent with the model
|
|
36
|
-
# async def main():
|
|
37
|
-
# # header for browser automation agent
|
|
38
|
-
# title = "🌐 Browser Automation Agent"
|
|
39
|
-
# rprint(Panel(title, title="Status", width=BOX_WIDTH))
|
|
40
|
-
|
|
41
|
-
# rprint("🔄 Initializing LLM model (llama3.1:8b)...")
|
|
42
|
-
# llm = ChatOllama(model="llama3.1:8b")
|
|
43
|
-
# rprint("✅ LLM model initialized")
|
|
44
|
-
|
|
45
|
-
# task_line1 = "🤖 Task: Open https://chat.openai.com/ and ask how many r's in"
|
|
46
|
-
# task_line2 = "rrraaararewey, use Thinking Button and type the answer"
|
|
47
|
-
# task_content = f"{task_line1}\n{task_line2}"
|
|
48
|
-
# rprint(Panel(task_content, title="Task", width=BOX_WIDTH))
|
|
49
|
-
|
|
50
|
-
# rprint("🚀 Creating and launching browser agent...")
|
|
51
|
-
# agent = Agent(
|
|
52
|
-
# task="open https://chat.openai.com/ and ask how many r's in rrraaararewey, use Thinking Button and type the answer",
|
|
53
|
-
# llm=llm
|
|
54
|
-
# )
|
|
55
|
-
|
|
56
|
-
# rprint("🏃♂️ Running agent task...")
|
|
57
|
-
# await agent.run()
|
|
58
|
-
|
|
59
|
-
# # footer success box
|
|
60
|
-
# title = "✅ Browser automation task completed"
|
|
61
|
-
# rprint(Panel(title, title="Status", width=BOX_WIDTH))
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
# if __name__ == "__main__":
|
|
65
|
-
# asyncio.run(main())
|
|
66
|
-
|
machineconfig/utils/ai/url2md.py
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
from machineconfig.utils.utils2 import randstr
|
|
2
|
-
from pathlib import Path
|
|
3
|
-
import subprocess
|
|
4
|
-
import multiprocessing
|
|
5
|
-
import time
|
|
6
|
-
|
|
7
|
-
cwd = Path.cwd()
|
|
8
|
-
|
|
9
|
-
print("\n" + "=" * 50)
|
|
10
|
-
print("🌐 Welcome to the URL to Markdown Converter")
|
|
11
|
-
print("=" * 50 + "\n")
|
|
12
|
-
|
|
13
|
-
tools_needed = ["xcrawl3r", "html2markdown"]
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
url = input("🔗 Enter the URL: ")
|
|
17
|
-
depth = input("🔍 Enter the crawl depth (default: 4): ") or "4"
|
|
18
|
-
|
|
19
|
-
website_name_as_valid_filename = url.split("//")[-1].split("/")[0].replace(".", "_").replace(":", "_")
|
|
20
|
-
domain = url.split("//")[-1].split("/")[0]
|
|
21
|
-
op_dir = cwd.joinpath(".ai/website", website_name_as_valid_filename)
|
|
22
|
-
op_dir.mkdir(exist_ok=True, parents=True)
|
|
23
|
-
urls_file = op_dir.joinpath("urls", "urls.txt")
|
|
24
|
-
urls_file.parent.mkdir(exist_ok=True, parents=True)
|
|
25
|
-
# if urls_file.exists():
|
|
26
|
-
# urls_file.unlink()
|
|
27
|
-
|
|
28
|
-
print("🌐 Crawling the website to extract URLs...")
|
|
29
|
-
command = f"""xcrawl3r --url {url} --domain {domain} --depth {depth} --concurrency 20 --parallelism 4 --output {urls_file} """
|
|
30
|
-
|
|
31
|
-
try:
|
|
32
|
-
print(f"Running command: {command}")
|
|
33
|
-
subprocess.run(command, shell=True, check=True)
|
|
34
|
-
except KeyboardInterrupt:
|
|
35
|
-
if urls_file.exists():
|
|
36
|
-
print("\n❌ Process interrupted by user, proceeding with existing URLs...")
|
|
37
|
-
else:
|
|
38
|
-
print("\n❌ Process interrupted by user, no URLs found.")
|
|
39
|
-
exit(1)
|
|
40
|
-
|
|
41
|
-
all_urls = urls_file.read_text(encoding="utf-8").splitlines()
|
|
42
|
-
relevant_urls = list(set(all_urls)) # remove duplicates
|
|
43
|
-
relevant_urls = [a_url for a_url in relevant_urls if not a_url.endswith(".css") and not a_url.endswith(".js") and not a_url.endswith(".png") and not a_url.endswith(".jpg") and not a_url.endswith(".jpeg") and not a_url.endswith(".gif")]
|
|
44
|
-
|
|
45
|
-
print(f"✅ Found {len(relevant_urls)} relevant URLs. Preparing to convert to Markdown...\n")
|
|
46
|
-
|
|
47
|
-
commands: list[str] = []
|
|
48
|
-
for a_url in relevant_urls:
|
|
49
|
-
commands.append(f"""curl {a_url} | html2markdown --output {op_dir.joinpath(a_url.split("/")[-1] + "_" + randstr(5) + ".md")} """)
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
def run_command(cmd: str) -> bool:
|
|
53
|
-
try:
|
|
54
|
-
_result = subprocess.run(cmd, shell=True, check=True, capture_output=True, text=True)
|
|
55
|
-
print(f"✅ Completed: {cmd[:60]} ...")
|
|
56
|
-
return True
|
|
57
|
-
except subprocess.SubprocessError as e:
|
|
58
|
-
print(f"❌ Error with command: {cmd[:60]}...\n{str(e)}")
|
|
59
|
-
return False
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
def main():
|
|
63
|
-
cpu_count = multiprocessing.cpu_count()
|
|
64
|
-
max_processes = min(20, cpu_count)
|
|
65
|
-
print(f"🚀 Running commands with {max_processes} parallel processes...\n")
|
|
66
|
-
|
|
67
|
-
start_time = time.time()
|
|
68
|
-
|
|
69
|
-
with multiprocessing.Pool(processes=max_processes) as pool:
|
|
70
|
-
results = pool.map(run_command, commands)
|
|
71
|
-
|
|
72
|
-
successful = results.count(True)
|
|
73
|
-
failed = results.count(False)
|
|
74
|
-
elapsed_time = time.time() - start_time
|
|
75
|
-
|
|
76
|
-
print(f"\n⏱️ Completed in {elapsed_time:.2f} seconds")
|
|
77
|
-
print(f"✅ Successfully processed: {successful} files")
|
|
78
|
-
if failed > 0:
|
|
79
|
-
print(f"❌ Failed to process: {failed} files")
|
|
80
|
-
|
|
81
|
-
print(f"📂 Output saved to: {op_dir}\n")
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
if __name__ == "__main__":
|
|
85
|
-
main()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|