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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Baseball Seam visualizer</title> | |
| <style> | |
| body { | |
| font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; | |
| margin: 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
| # Updating https://github.com/AndRoo88/Baseball-Flight-Calculator to use real Statcast data as input | |
| # Modify processing.py to change scipy deprecated rotation | |
| # Here one pitch is randomly selected from each pitch typea and calculate its trajectory using different seam orientation | |
| #from scipy.spatial.transform import Rotation as R | |
| def _create_rotation_from_matrix(matrix): | |
| # """ | |
| # Create a scipy Rotation object from a rotation matrix. | |
| # Handles compatibility between old (from_dcm) and new (from_matrix) scipy versions. | |
| # """ |
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 | |
| from typing import Dict, List | |
| import numpy as np | |
| import pandas as pd | |
| DRS_DIR = os.path.join("Statcast_data", "DRS") |
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
| #Adapt from github.com/HKUNLP/Dream and github.com/ML-GSAI/LLaDA | |
| import torch | |
| import numpy as np | |
| import gradio as gr | |
| import torch.nn.functional as F | |
| from transformers import AutoTokenizer, AutoModel | |
| import time | |
| import re | |
| import traceback |
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
| # outlines/processor/structured.py | |
| ... | |
| class GuideLogitsProcessor(OutlinesLogitsProcessor): | |
| """Bias generation using a finite | |
| Attributes | |
| ---------- | |
| tokenizer | |
| The tokenizer used to convert tokens to ids. | |
| guide |
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 chess | |
| import re | |
| import outlines.text.generate as generate | |
| import outlines.models as models | |
| import chess.engine | |
| import chessboard.display | |
| import os | |
| os.environ["TOKENIZERS_PARALLELISM"] = "false" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder