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
| from google import genai | |
| import os | |
| import logging | |
| import json | |
| from datetime import datetime | |
| from decouple import config | |
| # Configure logging | |
| log_directory = config("LOG_DIR", default="logs") | |
| os.makedirs(log_directory, exist_ok=True) |
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
| #define _GNU_SOURCE | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <pthread.h> | |
| #include <unistd.h> | |
| #include <sched.h> | |
| #include <time.h> | |
| #include <string.h> | |
| typedef struct { |
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 os | |
| import subprocess | |
| import shutil | |
| import requests | |
| def download_appimage(url, download_path): | |
| print(f"Downloading AppImage from {url}...") | |
| response = requests.get(url, stream=True) | |
| with open(download_path, 'wb') as file: | |
| shutil.copyfileobj(response.raw, file) |
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
| class MyCallable(object): | |
| def __init__(self, urlparts, callable): | |
| self.urlparts = urlparts | |
| self.callable = callable | |
| def __call__(self, **kwargs): | |
| print kwargs | |
| print self.urlparts | |
| def __getattr__(self, name): | |
| # Return a callable object of this same type so that you can just keep | |
| # chaining together calls and just adding that missing attribute to the |
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
| class MyCallable(object): | |
| def __init__(self, urlparts, callable): | |
| self.urlparts = urlparts | |
| self.callable = callable | |
| def __call__(self, **kwargs): | |
| print kwargs | |
| print self.urlparts | |
| def __getattr__(self, name): | |
| # Return a callable object of this same type so that you can just keep | |
| # chaining together calls and just adding that missing attribute to the |