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 sys | |
| import io | |
| import base64 | |
| import hashlib | |
| import logging | |
| import threading | |
| from pathlib import Path | |
| from typing import Optional, Dict, List, Tuple, Iterable, Union |
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 random | |
| from typing import Sequence | |
| # Default per-octet inclusive ranges for the generated IPv4 address | |
| OCTET_RANGES: tuple[tuple[int, int], ...] = ( | |
| (31, 245), | |
| (31, 245), | |
| (33, 245), | |
| (66, 245), | |
| ) |
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
| # credit by : Pymmdrza.github.io | |
| import random | |
| from datetime import date | |
| OS_CHOICES = { | |
| "Macintosh": ["68K", "PPC", "Intel Mac OS X"], | |
| "Windows": [ | |
| "Win3.11", | |
| "WinNT3.51", | |
| "WinNT4.0", |
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
| //@version=5 | |
| strategy(shorttitle="MMDRZA Bollinger Meta 0.1.0", title="Mmdrza - Bollinger Bands Strategy with New Algorithm for any chart", overlay=true, commission_type=strategy.commission.percent, commission_value=0.1, slippage=0, default_qty_type=strategy.percent_of_equity, default_qty_value=100) | |
| // Inputs | |
| length = input.int(20, minval=1, title="Length") | |
| maType = input.string("SMA", "Basis MA Type", options = ["SMA", "EMA", "SMMA (RMA)", "WMA", "VWMA"]) | |
| src = input(close, title="Source") | |
| mult = input.float(2.0, minval=0.001, maxval=50, title="StdDev") | |
| offset = input.int(0, "Offset", minval = -500, maxval = 500) |
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 json | |
| import requests | |
| import sys | |
| from pathlib import Path | |
| def query_ollama(prompt, model='mistral', context=''): | |
| url = 'http://localhost:11434/api/generate' | |
| data = {"model": model, "stream": False, "prompt": context+prompt} | |
| response = requests.post(url, json=data) | |
| response.raise_for_status() |
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
| # -------------------------------------- | |
| # Programmer : github.com/PyMmdrza | |
| # pip install tqdm ftplib boto3 pysftp | |
| # -------------------------------------- | |
| import ftplib | |
| import pysftp | |
| import boto3 | |
| import tarfile | |
| import zipfile | |
| import os |
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 mysql.connector | |
| # Source database connection configuration | |
| SOURCE_DB_CONFIG = { | |
| 'host': 'source_db_host', | |
| 'user': 'source_db_user', | |
| 'password': 'source_db_password', | |
| 'database': 'source_db_name' | |
| } |
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 | |
| def create_project_structure_from_file(file_path, base_directory="PyMermid"): | |
| """ | |
| Create a file and folder structure based on the tree-like format in the input text file. | |
| Args: | |
| - file_path (str): The path to the text file containing the directory structure. | |
| - base_directory (str): The base directory where the project structure will be created. | |
| """ |
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 requests | |
| import concurrent.futures | |
| from urllib.parse import urlparse | |
| import boto3 | |
| from botocore.exceptions import ClientError | |
| from colorama import Fore, Style | |
| from datetime import datetime | |
| class S3Scanner: | |
| def __init__(self): |
NewerOlder