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
# 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 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.
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.
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
query = ''' | |
SELECT pitch_type,release_speed,release_pos_x,release_pos_z,pitcher,pfx_x,pfx_z,plate_x,plate_z,balls,strikes, | |
vx0,vy0,vz0,ax,ay,az,release_spin_rate,release_extension,description | |
FROM statcast_2018 | |
WHERE release_speed >= 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
import math | |
import matplotlib.pyplot as plt | |
#initial condition | |
mass = 5.125 #Oz | |
circumference = 9.125 #inches | |
x0 = 0 #ft | |
y0 = 2.000 #ft | |
z0 = 3 #ft | |
exit_speed = 100 #mph |
NewerOlder