Skip to content

Instantly share code, notes, and snippets.

View BexTuychiev's full-sized avatar
🏠
Working from home

bexgboost BexTuychiev

🏠
Working from home
View GitHub Profile
{
"league": {
"name": "Premier League"
},
"clubs": [
{
"name": "Manchester United",
"founded_year": 1878
},
{
# 1. Import statements and environment setup
import os
import random
import warnings
from typing import Callable, Tuple
import matplotlib.pyplot as plt
import neptune
import numpy as np
import tensorflow as tf
import os
import time
import warnings
import neptune
from dotenv import load_dotenv
from lightgbm import LGBMClassifier
from xgboost import XGBClassifier
from sklearn.datasets import make_classification
from sklearn.model_selection import train_test_split
import gymnasium as gym
import numpy as np
import matplotlib.pyplot as plt
from moviepy.editor import ImageSequenceClip
def create_environment(env_name='Taxi-v3', render_mode='rgb_array'):
"""Create and return a Gymnasium environment."""
return gym.make(env_name, render_mode=render_mode)
def initialize_q_table(env):
# Please, run the following GitHub gist first: https://gist.github.com/BexTuychiev/00b665c256351a63cca0512b1cd6d220
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.ticker import ScalarFormatter
# Read the CSV file
data = pd.read_csv("optimization_results.csv")
import seaborn as sns
import numpy as np
import pandas as pd
import time
from tabulate import tabulate # pip install tabulate
np.random.seed(42)
# Load and prepare data
dataset_size = 20_000
import seaborn as sns
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import warnings
warnings.filterwarnings("ignore")
np.random.seed(42)
# Load the data
import seaborn as sns
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import warnings
warnings.filterwarnings("ignore")
np.random.seed(42)
# Load the data
import seaborn as sns
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import warnings
warnings.filterwarnings("ignore")
np.random.seed(42)
# Load the data
import seaborn as sns
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import warnings
warnings.filterwarnings("ignore")
np.random.seed(42)
# Load the data