Spaces:
Runtime error
Runtime error
Terry Zhuo
commited on
Commit
·
3584877
1
Parent(s):
1c55e07
update
Browse files- count_ip_data.py +1 -2
count_ip_data.py
CHANGED
|
@@ -29,7 +29,6 @@ WHITELIST_IPS = [
|
|
| 29 |
|
| 30 |
logging.basicConfig(level=logging.WARNING)
|
| 31 |
log = logging.getLogger(__name__)
|
| 32 |
-
# log.disabled = True
|
| 33 |
|
| 34 |
def get_ip_from_jsonl(file_path):
|
| 35 |
"""Extract IP from the first line of a JSONL file"""
|
|
@@ -149,7 +148,7 @@ def count_files_per_ip(smb_url, start_date_str="2025_02_18"):
|
|
| 149 |
password = unquote(password)
|
| 150 |
|
| 151 |
# Register the SMB session
|
| 152 |
-
smbclient.register_session(server, username=username, password=password)
|
| 153 |
|
| 154 |
# Convert start date string to datetime
|
| 155 |
start_date = datetime.strptime(start_date_str, "%Y_%m_%d")
|
|
|
|
| 29 |
|
| 30 |
logging.basicConfig(level=logging.WARNING)
|
| 31 |
log = logging.getLogger(__name__)
|
|
|
|
| 32 |
|
| 33 |
def get_ip_from_jsonl(file_path):
|
| 34 |
"""Extract IP from the first line of a JSONL file"""
|
|
|
|
| 148 |
password = unquote(password)
|
| 149 |
|
| 150 |
# Register the SMB session
|
| 151 |
+
smbclient.register_session(server, username=username, password=password, connection_timeout=1000)
|
| 152 |
|
| 153 |
# Convert start date string to datetime
|
| 154 |
start_date = datetime.strptime(start_date_str, "%Y_%m_%d")
|