This file contains hidden or 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 | |
# Script to download, unzip, and run a Windows executable from WSL with error handling | |
# Function to download and extract cam2ip | |
download_and_extract_cam2ip() { | |
local download_url="https://github.com/gen2brain/cam2ip/releases/download/1.6/cam2ip-1.6-64bit-cv2.zip" | |
local target_directory="wsl_utils" | |
local zip_file="${target_directory}/cam2ip-1.6-64bit-cv2.zip" | |
local executable_file="${target_directory}/cam2ip-1.6-64bit-cv/cam2ip.exe" |
This file contains hidden or 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 typing import Tuple | |
def code_likelihood_score(text) -> Tuple[int, list]: | |
# Calculate a score based on code-like elements | |
score = 0 | |
code_elements = [ | |
';', '{', '}', 'function', 'class', 'var', 'int', 'void', 'public', | |
'import', 'for', 'while', 'elif', 'switch', 'case', 'break', |