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 tensorflow as tf | |
from tensorflow import keras | |
from tensorflow.keras import layers | |
class PositionalEmbedding(layers.Layer): | |
def __init__(self, sequence_length, vocab_size, embed_dim, **kwargs): | |
super().__init__(**kwargs) | |
self.token_embeddings = layers.Embedding(input_dim=vocab_size, output_dim=embed_dim) | |
self.position_embeddings = layers.Embedding(input_dim=sequence_length, output_dim=embed_dim) | |
self.sequence_length = sequence_length |
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
typer==0.9.0 | |
loguru==0.7.2 | |
pandas==2.0.3 | |
sh==2.0.6 | |
attrs==23.1.0 | |
rich==13.5.3 | |
python-rapidjson | |
numpy | |
python-dateutil==2.8.2 | |
python-dotenv==1.0.0 |
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
numpy==1.26.4 | |
pandas==2.2.2 | |
pandas-ta==0.3.14b | |
ccxt==4.2.97 | |
cryptography==42.0.5 | |
aiohttp==3.9.4 | |
SQLAlchemy==2.0.29 | |
python-telegram-bot==21.1 | |
# can't be hard-pinned due to telegram-bot pinning httpx with ~ |
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 numpy as np | |
import pandas as pd | |
import pandas_ta | |
import talib | |
import pandas_ta as ta | |
import finta as TA | |
def add_adx_di_signal(df, period=14): |
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
{ | |
"max_open_trades": 3, | |
"stake_currency": "USDT", | |
"stake_amount": 0.05, | |
"tradable_balance_ratio": 0.99, | |
"fiat_display_currency": "USD", | |
"timeframe": "1h", | |
"dry_run": true, | |
"cancel_open_orders_on_exit": false, | |
"unfilledtimeout": { |
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
.join : String join | |
ANY → ', '.join($expr$) | |
.len : Get length | |
ANY → len($expr$) | |
.str : Get length | |
ANY → str($expr$) |
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
# to make a headless browser | |
geckodriver_autoinstaller.install() | |
options = Options() | |
options.headless = True | |
driver = webdriver.Firefox(options=options) | |
def setup_driver(headless: bool): | |
""" |
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
# https://stackoverflow.com/a/7406369 | |
def safe_filename_from_url(url): | |
keepcharacters = ('.', '_', '-') | |
return "".join(c for c in url if c.isalnum() or | |
c in keepcharacters).rstrip()[:MAX_FILENAME_LEN] | |
import requests, json | |
def get_ip_location(x): | |
""" | |
input: |
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
set -xU RANGER_LOAD_DEFAULT_RC FALSE | |
set -gx PATH $HOME/.local/bin $HOME/bin $HOME/.gem/ruby/2.6.0/bin $HOME/.yarn/bin $PATH | |
set -gx EDITOR nvim | |
set -x JAVA_OPTS '-XX:+IgnoreUnrecognizedVMOptions --add-modules java.se.ee' | |
register-python-argcomplete --shell fish pipx | . | |
function vim | |
nvim $argv | |
end |
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
#!/path/to/python3 | |
"""" | |
If running as an executable: | |
Don't forget to chmod +x this file when adding it as a service. | |
And Also don't forget to modify the /path/to/python above | |
Requirements: | |
dbus-python: https://dbus.freedesktop.org/doc/dbus-python/index.html (pip install dbus-python) | |
gi-repository: https://pygobject.readthedocs.io/en/latest/getting_started.html (follow instructions on website) |