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 yt_dlp | |
| from pathlib import Path | |
| import click | |
| def yt(urls: list[str], output_dir:str) -> None: | |
| for url in urls: | |
| print(f"Processing: {url}") | |
| options = { |
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 time import perf_counter | |
| import numpy as np | |
| DB = { | |
| "oss": [ | |
| { | |
| "name": "dapp1", | |
| "blockchain": [ | |
| { | |
| "address": "0x1", |
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 pandas as pd | |
| from backtesting import Backtest, Strategy | |
| from gymnasium import spaces, Env | |
| from stable_baselines3 import PPO | |
| import numpy as np | |
| class periodicStrategy(Strategy): | |
| def init(self): | |
| print(f"Start with equity={self.equity:.2f}") |
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 hmac | |
| import hashlib | |
| import time | |
| import httpx | |
| import pprint | |
| import datetime | |
| pp = pprint.PrettyPrinter(indent=4) | |
| def create_message() -> str: |
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 typing | |
| from binance.client import Client | |
| import talib | |
| def connect_to_binance(api_key: str, api_secret: str) -> Client: | |
| """ | |
| Connects to the Binance API using the provided API key and secret. | |
| Returns a Binance client object. | |
| """ | |
| return Client(api_key, api_secret) |