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 abc import ABC, abstractmethod | |
| import dask.dataframe as dd | |
| import dask.array as da | |
| from dask.distributed import Client, LocalCluster | |
| import pandas as pd | |
| import numpy as np | |
| import logging | |
| import time | |
| # ========================================== |
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 abc import ABC, abstractmethod | |
| from pyspark.sql import SparkSession | |
| import pyspark.sql.functions as F | |
| import logging | |
| import time | |
| class SparkJobBase(ABC): | |
| def __init__(self, job_name): | |
| self.job_name = job_name | |
| logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') |
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
| #include <iostream> | |
| #include <memory> | |
| #include <vector> | |
| #include <string> | |
| // ========================================== | |
| // CONFIGURATION | |
| // ========================================== | |
| // Increase this number until your program crashes on the "Unsafe" tests. | |
| // On many systems, 50,000 to 100,000 is enough to overflow the default stack. |
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 torch | |
| import torch.nn as nn | |
| import torch.optim as optim | |
| import torch.nn.init as init | |
| import math | |
| # ========================================== | |
| # 1. The Scheduler Class | |
| # ========================================== | |
| class SaliencePulseScheduler: |
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 torch | |
| import torch.nn as nn | |
| import torch.optim as optim | |
| import torch.nn.init as init | |
| import math | |
| # ========================================== | |
| # 1. Setup: Model, Optimizer, Data, Metrics | |
| # ========================================== | |
| # A simple model for demonstration |