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
/** | |
* Generates a client ID in the format historically used by the Google Analytics | |
* JavaScript libraries. Note that any alphanumeric value may be used, but | |
* ideally each should be unique to a given client. | |
* | |
* More information on Client IDs: | |
* https://developers.google.com/analytics/devguides/collection/protocol/v1/email#client-id-cid | |
*/ | |
function generateGaClientId() { |
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 python | |
# -*- coding: UTF-8 -*- | |
# Author : [email protected] <github.com/tintinweb> | |
''' | |
A simple TCP three-way handshake example | |
#> python scapy_tcp_handshake.py | |
DEBUG:__main__:init: ('oststrom.com', 80) | |
DEBUG:__main__:start | |
DEBUG:__main__:SND: SYN |
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
#Works for Windows and Linux | |
import re | |
import subprocess | |
def get_gpu_details(): | |
try: | |
# Execute the nvidia-smi command to get detailed GPU information | |
result = subprocess.run(['nvidia-smi', '-q'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) |
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
import os | |
import gguf # pip install gguf | |
import hashlib | |
import argparse | |
def calculate_file_hash(filepath): | |
"""Calculate and return the SHA-256 hash of the file specified by filepath.""" | |
print("Calculating SHA256...", end="\r") | |
sha256_hash = hashlib.sha256() |