index int64 0 731k | package stringlengths 2 98 ⌀ | name stringlengths 1 76 | docstring stringlengths 0 281k ⌀ | code stringlengths 4 8.19k | signature stringlengths 2 42.8k ⌀ | embed_func_code listlengths 768 768 |
|---|---|---|---|---|---|---|
725,553 | syne_tune.tuner | _init_callbacks | null | def _init_callbacks(self, callbacks: Optional[List[TunerCallback]]):
if callbacks is None:
callbacks = [self._default_callback()]
else:
if not any(
isinstance(callback, StoreResultsCallback) for callback in callbacks
):
logger.warning(
"None of the... | (self, callbacks: Optional[List[syne_tune.tuner_callback.TunerCallback]]) | [
-0.03314942121505737,
0.015446735545992851,
-0.0196137186139822,
0.011587382294237614,
-0.015735721215605736,
0.035834189504384995,
-0.03644944727420807,
0.05265127494931221,
0.014439946971833706,
0.03376467898488045,
0.024479858577251434,
0.05198008194565773,
0.023678157478570938,
-0.0448... |
725,554 | syne_tune.tuner | _initialize_early_checkpoint_removal |
If the scheduler supports early checkpoint removal, the specific callback
for this is created here and appended to ``self.callbacks``.
| def _initialize_early_checkpoint_removal(self):
"""
If the scheduler supports early checkpoint removal, the specific callback
for this is created here and appended to ``self.callbacks``.
"""
if self.trial_backend.delete_checkpoints:
callback = (
self.scheduler.callback_for_checkp... | (self) | [
-0.0231862124055624,
0.042490728199481964,
-0.025438984856009483,
0.03188537433743477,
-0.04082714393734932,
-0.0009357664384879172,
0.012424899265170097,
0.1084795892238617,
-0.00043620364158414304,
-0.011549783870577812,
0.022181130945682526,
0.00824427604675293,
0.05160578712821007,
-0.... |
725,555 | syne_tune.tuner | _process_new_results | Communicates new results from the backend to the scheduler
Returns dictionary of trials which are not running, along with their
status, in ``done_trials_statuses``, and list of new results (tuples
``(trial_id, result)``), observed since the previous call, in
``new_results``.
:p... | def _process_new_results(
self, running_trials_ids: Set[int]
) -> (TrialAndStatusInformation, TrialIdAndResultList):
"""Communicates new results from the backend to the scheduler
Returns dictionary of trials which are not running, along with their
status, in ``done_trials_statuses``, and list of new res... | (self, running_trials_ids: Set[int]) -> (typing.Dict[int, typing.Tuple[syne_tune.backend.trial_status.Trial, str]], typing.List[typing.Tuple[int, dict]]) | [
-0.0014536987291648984,
0.01371835544705391,
-0.09157732129096985,
0.00036370972520671785,
-0.031796667724847794,
-0.02665228396654129,
-0.046846725046634674,
-0.01667363941669464,
0.033128369599580765,
0.02176329493522644,
-0.03280000388622284,
0.029206233099102974,
0.029169747605919838,
... |
725,556 | syne_tune.tuner | _save_metadata | null | def _save_metadata(self):
dump_json_with_numpy(self.metadata, self.tuner_path / ST_METADATA_FILENAME)
| (self) | [
-0.005965528544038534,
0.0015318579971790314,
-0.03805982321500778,
0.013807479292154312,
0.04775743931531906,
-0.010029726661741734,
-0.05825211852788925,
0.03410771116614342,
0.023280920460820198,
0.022234775125980377,
-0.028926793485879898,
-0.005176766775548458,
0.0101210568100214,
-0.... |
725,557 | syne_tune.tuner | _schedule_new_task | Schedules a new task according to scheduler suggestion.
:return: Information for the trial suggested, ``None`` if the scheduler does
not suggest a new configuration (this can happen if its configuration
space is exhausted)
| def _schedule_new_task(self) -> Optional[TrialResult]:
"""Schedules a new task according to scheduler suggestion.
:return: Information for the trial suggested, ``None`` if the scheduler does
not suggest a new configuration (this can happen if its configuration
space is exhausted)
"""
sug... | (self) -> Optional[syne_tune.backend.trial_status.TrialResult] | [
0.08116833120584488,
-0.0012286575511097908,
-0.02619325928390026,
-0.06045990809798241,
-0.019314587116241455,
-0.031497079879045486,
0.016780341044068336,
0.0017185367178171873,
0.04072898253798485,
-0.028564592823386192,
-0.01535935141146183,
0.011992421932518482,
0.014354703016579151,
... |
725,558 | syne_tune.tuner | _schedule_new_tasks | Schedules new tasks if resources are available or sleep.
Note: If ``start_jobs_without_delay`` is False, we ask the backend for
the number of busy workers, instead of trusting ``running_trials_ids``.
The latter does not contain trials which have been stopped or completed,
but the underl... | def _schedule_new_tasks(self, running_trials_ids: Set[int]):
"""Schedules new tasks if resources are available or sleep.
Note: If ``start_jobs_without_delay`` is False, we ask the backend for
the number of busy workers, instead of trusting ``running_trials_ids``.
The latter does not contain trials which... | (self, running_trials_ids: Set[int]) | [
0.03203677386045456,
-0.0051055168733000755,
-0.049981772899627686,
-0.006701851263642311,
-0.040330372750759125,
-0.004743130877614021,
-0.0459083691239357,
-0.00919727049767971,
-0.04484414681792259,
-0.012477094307541847,
-0.04638543352484703,
0.03284411504864693,
0.05996344983577728,
0... |
725,559 | syne_tune.tuner | _set_metadata | null | @staticmethod
def _set_metadata(metadata: Dict[str, Any], name: str, value):
if name in metadata:
logger.warning(
f"Entry {name} in metadata is used, but will be overwritten:\n"
f"Old value: {metadata[name]}\n"
f"Overwrite: {value}\n"
)
metadata[name] = value
| (metadata: Dict[str, Any], name: str, value) | [
0.014765416271984577,
-0.03037162870168686,
-0.05401688441634178,
0.030423104763031006,
-0.011359332129359245,
-0.033751972019672394,
-0.023593779653310776,
0.023971280083060265,
0.06877372413873672,
-0.039191409945487976,
-0.03761277347803116,
0.00038098590448498726,
0.038745276629924774,
... |
725,560 | syne_tune.tuner | _sleep | null | def _sleep(self):
time.sleep(self.sleep_time)
for callback in self.callbacks:
callback.on_tuning_sleep(self.sleep_time)
| (self) | [
0.0133846839889884,
-0.00011295823787804693,
-0.07959804683923721,
0.015719015151262283,
-0.012452727183699608,
0.011005973443388939,
-0.0016808519139885902,
-0.0057115680538117886,
-0.04704166203737259,
0.05329021438956261,
-0.08918388932943344,
-0.015949785709381104,
0.051195528358221054,
... |
725,561 | syne_tune.tuner | _stop_condition | null | def _stop_condition(self) -> bool:
return (
self.stop_criterion(self.tuning_status)
or self.tuning_status.num_trials_failed > self.max_failures
)
| (self) -> bool | [
0.0429629385471344,
0.04690244793891907,
-0.005904616788029671,
0.06388693302869797,
-0.031460318714380264,
-0.034823764115571976,
-0.00647138524800539,
0.017579125240445137,
-0.023339727893471718,
0.0007328507490456104,
-0.004738559480756521,
0.03125590831041336,
0.03432203456759453,
-0.0... |
725,562 | syne_tune.tuner | _update_running_trials |
Updates schedulers with new results and sends decision to stop/pause
trials to the backend. Trials can be finished because:
* the scheduler decided to stop or pause.
* the trial failed.
* the trial was stopped independently of the scheduler, e.g. due to a
timeout argu... | def _update_running_trials(
self,
trial_status_dict: TrialAndStatusInformation,
new_results: TrialIdAndResultList,
) -> TrialAndStatusInformation:
"""
Updates schedulers with new results and sends decision to stop/pause
trials to the backend. Trials can be finished because:
* the scheduler d... | (self, trial_status_dict: Dict[int, Tuple[syne_tune.backend.trial_status.Trial, str]], new_results: List[Tuple[int, dict]]) -> Dict[int, Tuple[syne_tune.backend.trial_status.Trial, str]] | [
0.04006898030638695,
0.024697689339518547,
-0.09971188753843307,
0.017539773136377335,
-0.01054497342556715,
-0.03707531839609146,
-0.05265770107507706,
-0.0013493056176230311,
0.01811547763645649,
0.016302010044455528,
-0.016762573271989822,
0.0335635282099247,
0.04989432170987129,
0.0140... |
725,563 | syne_tune.tuner | best_config |
:param metric: Indicates which metric to use, can be the index or a name of the metric.
default to 0 - first metric defined in the Scheduler
:return: the best configuration found while tuning for the metric given and the associated trial-id
| def best_config(
self, metric: Optional[Union[str, int]] = 0
) -> Tuple[int, Dict[str, Any]]:
"""
:param metric: Indicates which metric to use, can be the index or a name of the metric.
default to 0 - first metric defined in the Scheduler
:return: the best configuration found while tuning for th... | (self, metric: Union[str, int, NoneType] = 0) -> Tuple[int, Dict[str, Any]] | [
0.04792306199669838,
-0.027753867208957672,
-0.003384330542758107,
0.0024433215148746967,
-0.03422536700963974,
-0.016546662896871567,
0.018395664170384407,
-0.015773102641105652,
0.001818340620957315,
-0.027999144047498703,
-0.06135661527514458,
-0.031999021768569946,
-0.05705485865473747,
... |
725,564 | syne_tune.tuner | load | null | @staticmethod
def load(tuner_path: Optional[str]):
with open(Path(tuner_path) / ST_TUNER_DILL_FILENAME, "rb") as f:
tuner = dill.load(f)
tuner.tuner_path = Path(experiment_path(tuner_name=tuner.name))
return tuner
| (tuner_path: Optional[str]) | [
0.07174260169267654,
-0.03328645974397659,
-0.04955163225531578,
0.05327943339943886,
-0.0493406243622303,
-0.014550737105309963,
0.011271325871348381,
-0.007930370979011059,
-0.03376122564077377,
0.042518045753240585,
-0.009521720930933952,
0.001341876806691289,
-0.055600520223379135,
0.0... |
725,565 | syne_tune.tuner | run | Launches the tuning. | def run(self):
"""Launches the tuning."""
done_trials_statuses = OrderedDict()
try:
logger.info(f"results of trials will be saved on {self.tuner_path}")
if self.tuning_status is None:
self.tuning_status = TuningStatus(
metric_names=self.scheduler.metric_names()
... | (self) | [
0.06209607422351837,
0.0023885841947048903,
-0.09551491588354111,
0.016519755125045776,
-0.011000526137650013,
0.0037316440138965845,
-0.05936490744352341,
-0.04616427794098854,
-0.031977392733097076,
-0.012669571675360203,
-0.03594137355685234,
0.008757746778428555,
0.009815124794840813,
... |
725,566 | syne_tune.tuner | save | null | def save(self, folder: Optional[str] = None):
if folder is None:
tuner_serialized_path = self.tuner_path / ST_TUNER_DILL_FILENAME
else:
tuner_serialized_path = Path(folder) / ST_TUNER_DILL_FILENAME
with open(tuner_serialized_path, "wb") as f:
logger.debug(f"saving tuner in {tuner_ser... | (self, folder: Optional[str] = None) | [
0.04855712503194809,
0.027054259553551674,
-0.054389603435993195,
0.03480161726474762,
-0.010171699337661266,
-0.047678738832473755,
-0.04662467911839485,
0.0015042343875393271,
-0.022240709513425827,
0.04785441607236862,
-0.025174515321850777,
-0.007909857667982578,
-0.01619742065668106,
... |
725,573 | syne_tune | read_version | null | def read_version():
with open(Path(__file__).parent / "version", "r") as f:
return f.readline().strip().replace('"', "")
| () | [
0.0448104552924633,
-0.008738039061427116,
0.011547310277819633,
0.01949254795908928,
0.0497051365673542,
-0.04429341107606888,
0.02812717854976654,
0.021560722962021828,
0.026817334815859795,
-0.027230968698859215,
0.025317907333374023,
-0.0051101152785122395,
-0.0686289370059967,
0.04153... |
725,582 | awpy.parser.demoparser | DemoParser | DemoParser can parse, load and clean data from a CSGO demofile. Can be instantiated without a specified demofile.
Attributes:
demofile (string): A string denoting the path to the demo file, which ends in .dem
Defaults to ''
outpath (string): Path where to save the outputfile to. Default... | class DemoParser:
"""DemoParser can parse, load and clean data from a CSGO demofile. Can be instantiated without a specified demofile.
Attributes:
demofile (string): A string denoting the path to the demo file, which ends in .dem
Defaults to ''
outpath (string): Path where to save t... | (demofile: str = '', outpath: Optional[str] = None, demo_id: Optional[str] = None, log: bool = False, parse_rate: int = 128, parse_frames: bool = True, parse_kill_frames: bool = False, trade_time: int = 5, dmg_rolled: bool = False, parse_chat: bool = False, buy_style: str = 'hltv', json_indentation: bool = False) | [
0.027178192511200905,
-0.03182605654001236,
-0.0923270732164383,
0.015804709866642952,
0.011068220250308514,
-0.042933665215969086,
-0.04639986902475357,
0.0851583331823349,
-0.0460059829056263,
-0.0213683620095253,
-0.0070111858658492565,
0.031274616718292236,
-0.026547973975539207,
0.057... |
725,583 | awpy.parser.demoparser | __init__ | null | def __init__(
self,
demofile: str = "",
outpath: Optional[str] = None,
demo_id: Optional[str] = None,
log: bool = False,
parse_rate: int = 128,
parse_frames: bool = True,
parse_kill_frames: bool = False,
trade_time: int = 5,
dmg_rolled: bool = False,
parse_chat: bool = False,... | (self, demofile: str = '', outpath: Optional[str] = None, demo_id: Optional[str] = None, log: bool = False, parse_rate: int = 128, parse_frames: bool = True, parse_kill_frames: bool = False, trade_time: int = 5, dmg_rolled: bool = False, parse_chat: bool = False, buy_style: str = 'hltv', json_indentation: bool = False) | [
0.0024582943879067898,
-0.02707964926958084,
-0.07225080579519272,
0.0041291662491858006,
-0.010687818750739098,
-0.04609302058815956,
-0.06468386948108673,
0.07651441544294357,
-0.07889588922262192,
0.003060864517465234,
-0.005852853413671255,
0.045900966972112656,
-0.006726700346916914,
... |
725,584 | awpy.parser.demoparser | _parse_bomb_events | Returns bomb events as a Pandas dataframe
Returns:
A Pandas dataframe where each row is a bomb event (defuse, plant, etc.)
Raises:
AttributeError: Raises an AttributeError if the .json attribute is None
| def _parse_bomb_events(self) -> pd.DataFrame:
"""Returns bomb events as a Pandas dataframe
Returns:
A Pandas dataframe where each row is a bomb event (defuse, plant, etc.)
Raises:
AttributeError: Raises an AttributeError if the .json attribute is None
"""
if self.json:
bomb_e... | (self) -> pandas.core.frame.DataFrame | [
0.024096939712762833,
-0.03525880351662636,
-0.06585127860307693,
-0.03664004057645798,
-0.06749382615089417,
-0.027699347585439682,
-0.02917390875518322,
0.08645780384540558,
0.03749864548444748,
-0.025160862132906914,
-0.029472554102540016,
0.02058785781264305,
-0.006556196603924036,
0.0... |
725,585 | awpy.parser.demoparser | _parse_damages | Returns damages as a Pandas dataframe
Returns:
A Pandas dataframe where each row is a damage event.
Raises:
AttributeError: Raises an AttributeError if the .json attribute is None
| def _parse_damages(self) -> pd.DataFrame:
"""Returns damages as a Pandas dataframe
Returns:
A Pandas dataframe where each row is a damage event.
Raises:
AttributeError: Raises an AttributeError if the .json attribute is None
"""
if self.json:
damages = []
for r in sel... | (self) -> pandas.core.frame.DataFrame | [
0.018613753840327263,
-0.056456129997968674,
-0.015446247532963753,
-0.04166201502084732,
-0.03972424566745758,
-0.016415132209658623,
-0.02232159860432148,
0.051350854337215424,
0.05869201570749283,
0.008733930997550488,
-0.022563818842172623,
0.02153903804719448,
-0.0295695960521698,
-0.... |
725,586 | awpy.parser.demoparser | _parse_flashes | Returns flashes as a Pandas dataframe
Returns:
A Pandas dataframe where each row is a flash event.
Raises:
AttributeError: Raises an AttributeError if the .json attribute is None
| def _parse_flashes(self) -> pd.DataFrame:
"""Returns flashes as a Pandas dataframe
Returns:
A Pandas dataframe where each row is a flash event.
Raises:
AttributeError: Raises an AttributeError if the .json attribute is None
"""
if self.json:
flashes = []
for r in self... | (self) -> pandas.core.frame.DataFrame | [
0.011691665276885033,
-0.03829681873321533,
-0.04691269248723984,
0.01118968054652214,
-0.03285713866353035,
-0.003831051057204604,
-0.02845793217420578,
0.07608252763748169,
0.04512380436062813,
0.02639523334801197,
0.012202776037156582,
0.011116664856672287,
0.0018744540866464376,
0.0007... |
725,587 | awpy.parser.demoparser | _parse_frames | Returns frames as a Pandas dataframe
Returns:
A Pandas dataframe where each row is a frame (game state) in the demo, which is a discrete point of time.
Raises:
AttributeError: Raises an AttributeError if the .json attribute is None
| def _parse_frames(self) -> pd.DataFrame:
"""Returns frames as a Pandas dataframe
Returns:
A Pandas dataframe where each row is a frame (game state) in the demo, which is a discrete point of time.
Raises:
AttributeError: Raises an AttributeError if the .json attribute is None
"""
if s... | (self) -> pandas.core.frame.DataFrame | [
0.026841172948479652,
-0.045806460082530975,
-0.0953279584646225,
0.022271672263741493,
-0.04138556122779846,
0.002955779666081071,
-0.044543344527482986,
0.10677028447389603,
0.01492517814040184,
-0.001963167218491435,
0.0047459653578698635,
0.058288998901844025,
-0.01821298897266388,
0.0... |
725,588 | awpy.parser.demoparser | _parse_grenades | Returns grenades as a Pandas dataframe
Returns:
A list or Pandas dataframe where each row is a grenade throw
Raises:
AttributeError: Raises an AttributeError if the .json attribute is None
| def _parse_grenades(self) -> pd.DataFrame:
"""Returns grenades as a Pandas dataframe
Returns:
A list or Pandas dataframe where each row is a grenade throw
Raises:
AttributeError: Raises an AttributeError if the .json attribute is None
"""
if self.json:
grenades = []
f... | (self) -> pandas.core.frame.DataFrame | [
0.010291054844856262,
-0.03874716907739639,
-0.039862729609012604,
-0.022069524973630905,
-0.03699945658445358,
0.0005926420562900603,
-0.04142451658844948,
0.09578954428434372,
0.08909618109464645,
-0.021009741351008415,
0.00042385526467114687,
0.03491707518696785,
-0.028316669166088104,
... |
725,589 | awpy.parser.demoparser | _parse_kills | Returns kills as either a Pandas dataframe
Returns:
A Pandas dataframe where each row is a kill
Raises:
AttributeError: Raises an AttributeError if the .json attribute is None
| def _parse_kills(self) -> pd.DataFrame:
"""Returns kills as either a Pandas dataframe
Returns:
A Pandas dataframe where each row is a kill
Raises:
AttributeError: Raises an AttributeError if the .json attribute is None
"""
if self.json:
kills = []
for r in self.json["... | (self) -> pandas.core.frame.DataFrame | [
0.018531037494540215,
-0.03247308358550072,
-0.03617744892835617,
-0.056173644959926605,
-0.05355663225054741,
-0.0008195445407181978,
-0.012716474942862988,
0.10217411071062088,
0.064614437520504,
0.0026607841718941927,
-0.019498594105243683,
0.020917680114507675,
-0.01277176383882761,
0.... |
725,590 | awpy.parser.demoparser | _parse_player_frames | Returns player frames as a Pandas dataframe.
Returns:
A Pandas dataframe where each row is a player's attributes at a given frame (game state).
Raises:
AttributeError: Raises an AttributeError if the .json attribute is None
| def _parse_player_frames(self) -> pd.DataFrame:
"""Returns player frames as a Pandas dataframe.
Returns:
A Pandas dataframe where each row is a player's attributes at a given frame (game state).
Raises:
AttributeError: Raises an AttributeError if the .json attribute is None
"""
if se... | (self) -> pandas.core.frame.DataFrame | [
0.013576286844909191,
-0.029366811737418175,
-0.09404885768890381,
0.020416032522916794,
-0.040944654494524,
-0.008749058470129967,
-0.02229250781238079,
0.09359850734472275,
0.032631877809762955,
-0.002894460689276457,
0.02199227176606655,
0.03756700083613396,
-0.013125932775437832,
0.055... |
725,591 | awpy.parser.demoparser | _parse_rounds | Returns rounds as a Pandas dataframe
Returns:
A Pandas dataframe where each row is a round
Raises:
AttributeError: Raises an AttributeError if the .json attribute is None
| def _parse_rounds(self) -> pd.DataFrame:
"""Returns rounds as a Pandas dataframe
Returns:
A Pandas dataframe where each row is a round
Raises:
AttributeError: Raises an AttributeError if the .json attribute is None
"""
if self.json:
rounds = []
# There is currently no... | (self) -> pandas.core.frame.DataFrame | [
0.019614778459072113,
-0.038464102894067764,
-0.062308020889759064,
0.005874865688383579,
-0.046998925507068634,
-0.01807430200278759,
-0.03953573852777481,
0.09966221451759338,
0.03450287505984306,
-0.021107416599988937,
0.021547552198171616,
0.07068975269794464,
-0.026944007724523544,
0.... |
725,592 | awpy.parser.demoparser | _parse_weapon_fires | Returns weapon fires as either a list or Pandas dataframe
Returns:
A Pandas dataframe where each row is a weapon fire event
Raises:
AttributeError: Raises an AttributeError if the .json attribute is None
| def _parse_weapon_fires(self) -> pd.DataFrame:
"""Returns weapon fires as either a list or Pandas dataframe
Returns:
A Pandas dataframe where each row is a weapon fire event
Raises:
AttributeError: Raises an AttributeError if the .json attribute is None
"""
if self.json:
sho... | (self) -> pandas.core.frame.DataFrame | [
0.0249027106910944,
-0.027918418869376183,
-0.03023107722401619,
-0.026197800412774086,
-0.03513391315937042,
-0.022682558745145798,
-0.03215520828962326,
0.07881541550159454,
0.02902849391102791,
0.04558713361620903,
-0.013755694963037968,
0.04436604678630829,
-0.013690941035747528,
0.018... |
725,593 | awpy.parser.demoparser | clean_rounds | Cleans a parsed demofile JSON.
Args:
remove_no_frames (bool, optional): Remove rounds where there are no frames. Default to True.
remove_warmups (bool, optional): Remove warmup rounds. Defaults to True.
remove_knifes (bool, optional): Remove knife rounds. Defaults to True.
... | def clean_rounds(
self,
remove_no_frames: bool = True,
remove_warmups: bool = True,
remove_knifes: bool = True,
remove_bad_timings: bool = True,
remove_excess_players: bool = True,
remove_excess_kills: bool = True,
remove_bad_endings: bool = True,
remove_bad_scoring: bool = True,
... | (self, remove_no_frames: bool = True, remove_warmups: bool = True, remove_knifes: bool = True, remove_bad_timings: bool = True, remove_excess_players: bool = True, remove_excess_kills: bool = True, remove_bad_endings: bool = True, remove_bad_scoring: bool = True, return_type: str = 'json', save_to_json: bool = True) ->... | [
-0.012673835270106792,
-0.004982354585081339,
-0.03730907291173935,
-0.04525833949446678,
-0.03267824649810791,
-0.02572263590991497,
-0.05740722641348839,
0.1085900217294693,
0.0566197969019413,
-0.009927213191986084,
0.004455059301108122,
0.06171932816505432,
-0.048708025366067886,
0.044... |
725,594 | awpy.parser.demoparser | parse | Wrapper for parse_demo() and read_json(). Use to parse a demo.
Args:
return_type (string, optional): Either "json" or "df". Default is "json"
clean (bool, optional): True to run clean_rounds, otherwise, uncleaned data is returned. Defaults to True.
Returns:
A dictio... | def parse(
self, return_type: str = "json", clean: bool = True
) -> Union[Game, dict[str, Any]]:
"""Wrapper for parse_demo() and read_json(). Use to parse a demo.
Args:
return_type (string, optional): Either "json" or "df". Default is "json"
clean (bool, optional): True to run clean_rounds, ... | (self, return_type: str = 'json', clean: bool = True) -> Union[awpy.types.Game, dict[str, Any]] | [
-0.009858689270913601,
-0.018793126568198204,
-0.05846347659826279,
-0.02790878899395466,
0.006854869890958071,
0.013591942377388477,
-0.04816984385251999,
0.09575976431369781,
0.014180926606059074,
-0.01776919886469841,
0.022961322218179703,
0.04701000079512596,
-0.03680698201060295,
0.05... |
725,595 | awpy.parser.demoparser | parse_demo | Parse a demofile using the Go script parse_demo.go -- this function needs the .demofile to be set in the class, and the file needs to exist.
Returns:
Outputs a JSON file to current working directory.
Raises:
ValueError: Raises a ValueError if the Golang version is lower than 1.... | def parse_demo(self) -> None:
"""Parse a demofile using the Go script parse_demo.go -- this function needs the .demofile to be set in the class, and the file needs to exist.
Returns:
Outputs a JSON file to current working directory.
Raises:
ValueError: Raises a ValueError if the Golang versi... | (self) -> NoneType | [
0.05005928501486778,
-0.03910177946090698,
-0.07054831832647324,
0.012955748476088047,
0.03609972447156906,
-0.020864291116595268,
-0.006440348457545042,
0.08660931885242462,
-0.04469311237335205,
0.00031779578421264887,
0.028500771149992943,
0.03958961367607117,
-0.03396075963973999,
0.04... |
725,596 | awpy.parser.demoparser | parse_json_to_df | Returns JSON into dictionary where keys correspond to data frames
Returns:
A dictionary of output
Raises:
AttributeError: Raises an AttributeError if the .json attribute is None
| def parse_json_to_df(self) -> dict[str, Any]:
"""Returns JSON into dictionary where keys correspond to data frames
Returns:
A dictionary of output
Raises:
AttributeError: Raises an AttributeError if the .json attribute is None
"""
if self.json:
demo_data: dict[str, Any] = {}
... | (self) -> dict[str, typing.Any] | [
0.03694697469472885,
-0.05303023383021355,
-0.04377897083759308,
-0.0034788993652909994,
-0.0535721480846405,
-0.0038079190999269485,
-0.03292132169008255,
0.08949335664510727,
-0.00215677241794765,
-0.014331710524857044,
-0.0247732475399971,
0.03297938406467438,
-0.02007020078599453,
0.04... |
725,597 | awpy.parser.demoparser | read_json | Reads the JSON file given a JSON path. Can be used to read in already processed demofiles.
Args:
json_path (string): Path to JSON file
Returns:
JSON in Python dictionary form
Raises:
FileNotFoundError: Raises a FileNotFoundError if the JSON path doesn't exi... | def read_json(self, json_path: str):
"""Reads the JSON file given a JSON path. Can be used to read in already processed demofiles.
Args:
json_path (string): Path to JSON file
Returns:
JSON in Python dictionary form
Raises:
FileNotFoundError: Raises a FileNotFoundError if the JSON... | (self, json_path: str) | [
0.012911306694149971,
-0.042398061603307724,
-0.0697375014424324,
0.01805572770535946,
0.02436061203479767,
0.022112783044576645,
0.013011819683015347,
0.09861204773187637,
0.05201072618365288,
0.017416100949048996,
0.028892818838357925,
0.025987088680267334,
-0.02710186503827572,
0.022185... |
725,598 | awpy.parser.demoparser | remove_bad_scoring | Removes rounds where the scoring is bad.
We loop through the rounds:
If the round ahead has equal or less score, we do not add the current round.
If the round ahead has +1 score, we add the current round
Raises:
AttributeError: Raises an AttributeError if the .json attribut... | def remove_bad_scoring(self) -> None:
"""Removes rounds where the scoring is bad.
We loop through the rounds:
If the round ahead has equal or less score, we do not add the current round.
If the round ahead has +1 score, we add the current round
Raises:
AttributeError: Raises an AttributeErro... | (self) -> NoneType | [
-0.021374523639678955,
-0.007998015731573105,
-0.10302799195051193,
0.019780896604061127,
-0.025876520201563835,
-0.07490047067403793,
-0.06577695906162262,
0.07498015463352203,
0.07737059891223907,
-0.05737057700753212,
-0.0014317743480205536,
0.03288847953081131,
0.0006474110414274037,
-... |
725,599 | awpy.parser.demoparser | remove_end_round | Removes rounds with bad end reason.
Args:
bad_endings (list, optional): List of bad round end reasons. Defaults to ["Draw", "Unknown", ""].
Raises:
AttributeError: Raises an AttributeError if the .json attribute is None
| def remove_end_round(self, bad_endings: Optional[list[str]] = None) -> None:
"""Removes rounds with bad end reason.
Args:
bad_endings (list, optional): List of bad round end reasons. Defaults to ["Draw", "Unknown", ""].
Raises:
AttributeError: Raises an AttributeError if the .json attribute ... | (self, bad_endings: Optional[list[str]] = None) -> NoneType | [
-0.03413407877087593,
0.015286440961062908,
-0.049037691205739975,
-0.005283927079290152,
-0.07692186534404755,
-0.05331112816929817,
-0.029735999181866646,
0.10726327449083328,
0.13810324668884277,
-0.0668792873620987,
-0.015553530305624008,
0.019052406772971153,
-0.01867848075926304,
-0.... |
725,600 | awpy.parser.demoparser | remove_excess_kill_rounds | Removes rounds with more than 10 kills.
Raises:
AttributeError: Raises an AttributeError if the .json attribute is None
| def remove_excess_kill_rounds(self) -> None:
"""Removes rounds with more than 10 kills.
Raises:
AttributeError: Raises an AttributeError if the .json attribute is None
"""
if self.json:
cleaned_rounds = []
for r in self.json["gameRounds"] or []:
if not r["isWarmup"]:
... | (self) -> NoneType | [
0.009418357163667679,
0.02011653035879135,
-0.04697462171316147,
0.0007075034081935883,
-0.02013455517590046,
-0.010707184672355652,
-0.017917411401867867,
0.03749317303299904,
0.08695532381534576,
-0.01603373885154724,
-0.014105004258453846,
0.03322111442685127,
0.0277593694627285,
-0.035... |
725,601 | awpy.parser.demoparser | remove_excess_players | Removes rounds where there are more than 5 players on a side.
Raises:
AttributeError: Raises an AttributeError if the .json attribute is None
| def remove_excess_players(self) -> None:
"""Removes rounds where there are more than 5 players on a side.
Raises:
AttributeError: Raises an AttributeError if the .json attribute is None
"""
if self.json:
if not self.parse_frames:
self.logger.warning(
"parse_fr... | (self) -> NoneType | [
-0.013591228984296322,
0.02318830043077469,
-0.09881839901208878,
0.028994621708989143,
-0.044305555522441864,
-0.00810850877314806,
-0.028051557019352913,
0.03258196637034416,
0.07877365499734879,
-0.001890752580948174,
0.034264691174030304,
0.019453024491667747,
-0.0072347866371273994,
-... |
725,602 | awpy.parser.demoparser | remove_knife_rounds | Removes knife rounds.
Raises:
AttributeError: Raises an AttributeError if the .json attribute is None
| def remove_knife_rounds(self) -> None:
"""Removes knife rounds.
Raises:
AttributeError: Raises an AttributeError if the .json attribute is None
"""
if self.json:
cleaned_rounds = []
for r in self.json["gameRounds"] or []:
if not r["isWarmup"]:
total_ki... | (self) -> NoneType | [
0.004144613165408373,
-0.013023944571614265,
-0.03521185740828514,
-0.01028401032090187,
-0.044246233999729156,
-0.051059044897556305,
-0.029769014567136765,
0.09797116369009018,
0.1481786072254181,
0.019475748762488365,
-0.04069172590970993,
0.02671435847878456,
-0.022641483694314957,
-0.... |
725,603 | awpy.parser.demoparser | remove_rounds_with_no_frames | Removes rounds with no frames
Raises:
AttributeError: Raises an AttributeError if the .json attribute is None
| def remove_rounds_with_no_frames(self) -> None:
"""Removes rounds with no frames
Raises:
AttributeError: Raises an AttributeError if the .json attribute is None
"""
if self.json:
if not self.parse_frames:
self.logger.warning(
"parse_frames is set to False, mus... | (self) -> NoneType | [
-0.017835160717368126,
0.01700541004538536,
-0.06741493940353394,
0.002772524254396558,
-0.05313967540860176,
-0.010403099469840527,
-0.07715781033039093,
0.09607253968715668,
0.10064062476158142,
0.00774433184415102,
0.0075926571153104305,
0.019093167036771774,
-0.014346642419695854,
-0.0... |
725,604 | awpy.parser.demoparser | remove_time_rounds | Remove rounds with odd round timings.
Raises:
AttributeError: Raises an AttributeError if the .json attribute is None
| def remove_time_rounds(self) -> None:
"""Remove rounds with odd round timings.
Raises:
AttributeError: Raises an AttributeError if the .json attribute is None
"""
if self.json:
cleaned_rounds = []
for r in self.json["gameRounds"] or []:
if (
(r["startT... | (self) -> NoneType | [
0.00411244248971343,
0.04639256373047829,
-0.06411474198102951,
0.014866124838590622,
-0.0557662770152092,
-0.05492410808801651,
-0.07110840827226639,
0.08084828406572342,
0.10003510862588882,
-0.004302388522773981,
0.01927836239337921,
0.016358230262994766,
0.0036272795405238867,
-0.02945... |
725,605 | awpy.parser.demoparser | remove_warmups | Removes warmup rounds.
Raises:
AttributeError: Raises an AttributeError if the .json attribute is None
| def remove_warmups(self) -> None:
"""Removes warmup rounds.
Raises:
AttributeError: Raises an AttributeError if the .json attribute is None
"""
if self.json:
cleaned_rounds = []
# Remove warmups where the demo may have started recording in the middle of a warmup round
if ... | (self) -> NoneType | [
0.013815740123391151,
0.01262268703430891,
-0.06039946526288986,
0.010773909278213978,
-0.029525794088840485,
-0.023004982620477676,
-0.044953521341085434,
0.08327694982290268,
0.051292188465595245,
0.04174776002764702,
-0.046337828040122986,
0.06192948669195175,
0.0109105184674263,
0.0311... |
725,606 | awpy.parser.demoparser | renumber_rounds | Renumbers the rounds.
Raises:
AttributeError: Raises an AttributeError if the .json attribute has a "gameRounds" key.
| def renumber_rounds(self) -> None:
"""Renumbers the rounds.
Raises:
AttributeError: Raises an AttributeError if the .json attribute has a "gameRounds" key.
"""
if self.json and self.json["gameRounds"]:
for i, r in enumerate(self.json["gameRounds"]):
self.json["gameRounds"][i]... | (self) -> NoneType | [
-0.0019531205762177706,
0.003806422231718898,
-0.0666523203253746,
0.05057484284043312,
-0.02864133194088936,
-0.011632213369011879,
-0.04507371783256531,
0.07087576389312744,
0.09469030052423477,
0.00005354861059458926,
-0.009103471413254738,
-0.0020717938896268606,
0.017390647903084755,
... |
725,607 | awpy.parser.demoparser | rescore_rounds | Rescore the rounds based on round end reason.
Raises:
AttributeError: Raises an AttributeError if the .json attribute has a "gameRounds" key.
| def rescore_rounds(self) -> None:
"""Rescore the rounds based on round end reason.
Raises:
AttributeError: Raises an AttributeError if the .json attribute has a "gameRounds" key.
"""
if self.json and self.json["gameRounds"]:
for i, r in enumerate(self.json["gameRounds"]):
if ... | (self) -> NoneType | [
0.012456012889742851,
-0.011003119871020317,
-0.0888393223285675,
0.0390152670443058,
-0.006982215214520693,
-0.05134172365069389,
-0.046936776489019394,
0.07440292835235596,
0.09890777617692947,
-0.048528481274843216,
0.007528207264840603,
0.035961415618658066,
0.029261451214551926,
0.004... |
725,608 | awpy.parser.demoparser | write_json | Rewrite the JSON file | def write_json(self) -> None:
"""Rewrite the JSON file"""
with open(self.outpath + "/" + self.output_file, "w", encoding="utf8") as fp:
json.dump(self.json, fp, indent=(1 if self.json_indentation else None))
| (self) -> NoneType | [
-0.056549541652202606,
-0.03281248360872269,
0.0008116105454973876,
-0.0029907659627497196,
0.016423430293798447,
-0.014713194221258163,
-0.07782866805791855,
0.04338329657912254,
0.020316584035754204,
-0.05991845205426216,
0.018769634887576103,
-0.06301234662532806,
0.010553622618317604,
... |
725,612 | flask_redis.client | FlaskRedis | null | class FlaskRedis(object):
def __init__(self, app=None, strict=True, config_prefix="REDIS", **kwargs):
self._redis_client = None
self.provider_class = redis.StrictRedis if strict else redis.Redis
self.provider_kwargs = kwargs
self.config_prefix = config_prefix
if app is not N... | (app=None, strict=True, config_prefix='REDIS', **kwargs) | [
0.03829891234636307,
-0.048682648688554764,
-0.019238358363509178,
0.013726443983614445,
0.09572950005531311,
0.007965604774653912,
-0.02354120835661888,
0.03890344500541687,
0.09096436202526093,
-0.029799897223711014,
0.019949574023485184,
0.0290709026157856,
0.0209808349609375,
0.0312756... |
725,613 | flask_redis.client | __delitem__ | null | def __delitem__(self, name):
del self._redis_client[name]
| (self, name) | [
0.01846068724989891,
0.0005913188797421753,
-0.04676707461476326,
-0.020870832726359367,
-0.009743140079081059,
-0.010102097876369953,
-0.07589393109083176,
0.05955280736088753,
0.07384274899959564,
0.007337268441915512,
-0.03938279673457146,
0.025075765326619148,
0.011965259909629822,
0.0... |
725,614 | flask_redis.client | __getattr__ | null | def __getattr__(self, name):
return getattr(self._redis_client, name)
| (self, name) | [
0.03561704233288765,
-0.04867333546280861,
-0.03357802331447601,
0.005652519874274731,
0.03163766860961914,
0.011091271415352821,
0.02527395822107792,
0.03808359429240227,
0.06524857878684998,
-0.00731744384393096,
-0.028743576258420944,
0.05248827114701271,
0.024385998025536537,
-0.002472... |
725,615 | flask_redis.client | __getitem__ | null | def __getitem__(self, name):
return self._redis_client[name]
| (self, name) | [
0.025455210357904434,
-0.046717025339603424,
-0.08629217743873596,
-0.0021990747191011906,
0.04946894198656082,
0.032941073179244995,
-0.016445966437458992,
0.018591804429888725,
0.09900340437889099,
-0.043997872620821,
-0.03623354062438011,
0.026175949722528458,
0.012457327917218208,
-0.0... |
725,616 | flask_redis.client | __init__ | null | def __init__(self, app=None, strict=True, config_prefix="REDIS", **kwargs):
self._redis_client = None
self.provider_class = redis.StrictRedis if strict else redis.Redis
self.provider_kwargs = kwargs
self.config_prefix = config_prefix
if app is not None:
self.init_app(app)
| (self, app=None, strict=True, config_prefix='REDIS', **kwargs) | [
-0.039172157645225525,
-0.03702181205153465,
0.02634175308048725,
-0.014523803256452084,
0.05745010823011398,
0.022632405161857605,
-0.007217102684080601,
0.05074819549918175,
0.0827883705496788,
-0.04365205019712448,
0.003680229652673006,
0.05995884910225868,
0.015975287184119225,
0.02060... |
725,617 | flask_redis.client | __setitem__ | null | def __setitem__(self, name, value):
self._redis_client[name] = value
| (self, name, value) | [
0.012517714872956276,
-0.0234342310577631,
-0.08593107014894485,
0.016037018969655037,
0.013068127445876598,
0.03314150497317314,
-0.0527728870511055,
0.04480024427175522,
0.05103825032711029,
-0.043332476168870926,
-0.042198292911052704,
0.009907425381243229,
0.017054447904229164,
0.02084... |
725,618 | flask_redis.client | init_app | null | def init_app(self, app, **kwargs):
redis_url = app.config.get(
"{0}_URL".format(self.config_prefix), "redis://localhost:6379/0"
)
self.provider_kwargs.update(kwargs)
self._redis_client = self.provider_class.from_url(
redis_url, **self.provider_kwargs
)
if not hasattr(app, "extens... | (self, app, **kwargs) | [
-0.013957136310636997,
-0.07001980394124985,
0.038359615951776505,
-0.0013596952194347978,
0.07005582004785538,
0.037171006202697754,
0.03749517351388931,
0.028940798714756966,
0.038107484579086304,
0.009760990738868713,
0.00704610301181674,
0.024618588387966156,
0.02202526293694973,
0.034... |
725,620 | zep_python.exceptions | APIError |
Raised when the API response format is unexpected.
Inherits from ZepClientError.
| class APIError(ZepClientError):
"""
Raised when the API response format is unexpected.
Inherits from ZepClientError.
"""
def __init__(
self, response: Union[httpx.Response, None] = None, message: str = "API error"
) -> None:
if response:
response_data = {
... | (response: 'Union[httpx.Response, None]' = None, message: 'str' = 'API error') -> 'None' | [
-0.043140675872564316,
-0.0291170384734869,
-0.0061657321639359,
0.009788342751562595,
-0.027249813079833984,
-0.05099857971072197,
-0.04065104201436043,
0.05687255784869194,
0.042129263281822205,
-0.025927195325493813,
0.07873465120792389,
0.020539473742246628,
0.033512797206640244,
0.000... |
725,621 | zep_python.exceptions | __init__ | null | def __init__(
self, response: Union[httpx.Response, None] = None, message: str = "API error"
) -> None:
if response:
response_data = {
"status_code": response.status_code,
"message": response.text,
}
else:
response_data = None
super().__init__(message=mess... | (self, response: Optional[httpx.Response] = None, message: str = 'API error') -> NoneType | [
-0.030269615352153778,
-0.013533547520637512,
0.01424736250191927,
-0.016340576112270355,
-0.011777947656810284,
-0.012414594180881977,
-0.03248823061585426,
0.08164500445127487,
0.023092880845069885,
-0.017035098746418953,
0.08179934322834015,
0.05015997588634491,
0.027452940121293068,
-0... |
725,622 | zep_python.exceptions | __str__ | null | def __str__(self):
return f"{self.message}: {self.response_data}"
| (self) | [
-0.0362754687666893,
0.002775908913463354,
0.012801521457731724,
-0.013583088293671608,
0.041360143572092056,
-0.05943499505519867,
-0.026573264971375465,
0.029016783460974693,
0.06798730790615082,
-0.031801674515008926,
0.016134409233927727,
-0.025944417342543602,
-0.01305306050926447,
-0... |
725,623 | zep_python.memory.models | Memory |
Represents a memory object with messages, metadata, and other attributes.
Attributes
----------
messages : Optional[List[Dict[str, Any]]]
A list of message objects, where each message contains a role and content.
metadata : Optional[Dict[str, Any]]
A dictionary containing metadata ... | class Memory(BaseModel):
"""
Represents a memory object with messages, metadata, and other attributes.
Attributes
----------
messages : Optional[List[Dict[str, Any]]]
A list of message objects, where each message contains a role and content.
metadata : Optional[Dict[str, Any]]
A... | (*, messages: List[zep_python.message.models.Message] = [], metadata: Optional[Dict[str, Any]] = None, summary: Optional[zep_python.memory.models.Summary] = None, uuid: Optional[str] = None, created_at: Optional[str] = None, token_count: Optional[int] = None) -> None | [
0.02053665928542614,
-0.0026137970853596926,
-0.03840390965342522,
-0.009111586026847363,
0.053032275289297104,
-0.05947445333003998,
-0.01751132868230343,
0.003290047636255622,
-0.008622193709015846,
-0.057979583740234375,
0.0036949082277715206,
0.023384030908346176,
0.0013558377977460623,
... |
725,645 | zep_python.memory.models | to_dict | null | def to_dict(self) -> Dict[str, Any]:
return self.dict()
| (self) -> Dict[str, Any] | [
-0.0007527309353463352,
-0.026187602430582047,
0.019273629412055016,
-0.06267181783914566,
-0.030016306787729263,
-0.0001218976904056035,
-0.017284933477640152,
0.04899256303906441,
0.010937831364572048,
-0.01914352737367153,
0.008888729847967625,
-0.017061900347471237,
0.017136244103312492,... |
725,646 | zep_python.memory.models | MemorySearchPayload |
Represents a search payload for querying memory.
Attributes
----------
metadata : Dict[str, Any]
Metadata associated with the search query.
text : str
The text of the search query.
search_scope : Optional[str]
Search over messages or summaries. Defaults to "messages".
... | class MemorySearchPayload(BaseModel):
"""
Represents a search payload for querying memory.
Attributes
----------
metadata : Dict[str, Any]
Metadata associated with the search query.
text : str
The text of the search query.
search_scope : Optional[str]
Search over mes... | (*, text: Optional[str] = None, metadata: Optional[Dict[str, Any]] = None, search_scope: Optional[str] = 'messages', search_type: Optional[str] = 'similarity', mmr_lambda: Optional[float] = None) -> None | [
0.030369305983185768,
-0.061938561499118805,
-0.053538914769887924,
0.02281668409705162,
0.028604675084352493,
-0.035222042351961136,
-0.05244484543800354,
-0.046198051422834396,
0.031392794102430344,
-0.05223308876156807,
0.012528883293271065,
0.019763872027397156,
0.023257842287421227,
0... |
725,668 | zep_python.memory.models | MemorySearchResult |
Represents a search result from querying memory.
Attributes
----------
message : Optional[Dict[str, Any]]
The message matched by search.
summary : Optional[Summary]
The summary matched by search.
metadata : Optional[Dict[str, Any]]
Metadata associated with the search re... | class MemorySearchResult(BaseModel):
"""
Represents a search result from querying memory.
Attributes
----------
message : Optional[Dict[str, Any]]
The message matched by search.
summary : Optional[Summary]
The summary matched by search.
metadata : Optional[Dict[str, Any]]
... | (*, message: Optional[Dict[str, Any]] = None, summary: Optional[zep_python.memory.models.Summary] = None, metadata: Optional[Dict[str, Any]] = None, dist: Optional[float] = None) -> None | [
0.022576043382287025,
-0.02311689220368862,
-0.04243040084838867,
-0.010485473088920116,
0.046687398105859756,
-0.04522187262773514,
-0.031299397349357605,
-0.023744972422719002,
0.06277326494455338,
-0.04864142835140228,
0.0005626564379781485,
0.025838578119874,
0.009438670240342617,
0.02... |
725,690 | zep_python.message.models | Message |
Represents a message in a conversation.
Attributes
----------
uuid : str, optional
The unique identifier of the message.
created_at : str, optional
The timestamp of when the message was created.
role : str
The role of the sender of the message (e.g., "user", "assistant"... | class Message(BaseModel):
"""
Represents a message in a conversation.
Attributes
----------
uuid : str, optional
The unique identifier of the message.
created_at : str, optional
The timestamp of when the message was created.
role : str
The role of the sender of the m... | (*, role: str = 'A role is required', content: str = 'Content is required', uuid: Optional[str] = None, created_at: Optional[str] = None, token_count: Optional[int] = None, metadata: Optional[Dict[str, Any]] = None) -> None | [
-0.01041126623749733,
-0.04804081842303276,
-0.05828855559229851,
0.0029798389878124,
0.033123452216386795,
-0.0730060562491417,
0.014808345586061478,
-0.004472029861062765,
0.018714841455221176,
-0.02898075059056282,
0.002384779741987586,
0.022203434258699417,
0.011256160214543343,
0.0639... |
725,712 | zep_python.message.models | to_dict |
Returns a dictionary representation of the message.
Returns
-------
Dict[str, Any]
A dictionary containing the attributes of the message.
| def to_dict(self) -> Dict[str, Any]:
"""
Returns a dictionary representation of the message.
Returns
-------
Dict[str, Any]
A dictionary containing the attributes of the message.
"""
return self.dict()
| (self) -> Dict[str, Any] | [
-0.01563066802918911,
0.0017767383251339197,
0.011352606117725372,
-0.04633640870451927,
-0.0045350235886871815,
-0.06756003946065903,
0.00008225372585002333,
0.04381772503256798,
0.04096568375825882,
-0.03692837804555893,
-0.003771083662286401,
-0.024131232872605324,
0.005481845699250698,
... |
725,713 | zep_python.exceptions | NotFoundError |
Raised when the API response contains no results.
Inherits from ZepClientError.
| class NotFoundError(ZepClientError):
"""
Raised when the API response contains no results.
Inherits from ZepClientError.
"""
def __init__(self, message: str) -> None:
super().__init__(message)
| (message: 'str') -> 'None' | [
-0.030779467895627022,
-0.04267153516411781,
-0.021814396604895592,
0.009517335332930088,
-0.024999113753437996,
-0.04005749151110649,
-0.029619716107845306,
0.019605344161391258,
0.06391526013612747,
-0.03085310384631157,
0.04351833835244179,
0.02249552123248577,
0.020433738827705383,
-0.... |
725,716 | zep_python.memory.models | Session |
Represents a session object with a unique identifier, metadata,
and other attributes.
Attributes
----------
uuid : Optional[str]
A unique identifier for the session.
This is generated server-side and is not expected to be present on creation.
created_at : str
The timest... | class Session(BaseModel):
"""
Represents a session object with a unique identifier, metadata,
and other attributes.
Attributes
----------
uuid : Optional[str]
A unique identifier for the session.
This is generated server-side and is not expected to be present on creation.
cr... | (*, uuid: Optional[str] = None, id: Optional[int] = None, created_at: Optional[str] = None, updated_at: Optional[str] = None, deleted_at: Optional[str] = None, session_id: str, user_id: Optional[str] = None, metadata: Optional[Dict[str, Any]] = None) -> None | [
-0.006057030521333218,
-0.03740103915333748,
-0.05574262514710426,
0.0015737061621621251,
0.04396955296397209,
-0.06170094758272171,
-0.0393751822412014,
0.04210308939218521,
0.03190933167934418,
-0.019041508436203003,
-0.019418390467762947,
-0.0004057649348396808,
0.03578583151102066,
0.0... |
725,738 | zep_python.memory.models | Summary |
Represents a summary of a conversation.
Attributes
----------
uuid : str
The unique identifier of the summary.
created_at : str
The timestamp of when the summary was created.
content : str
The content of the summary.
recent_message_uuid : str
The unique iden... | class Summary(BaseModel):
"""
Represents a summary of a conversation.
Attributes
----------
uuid : str
The unique identifier of the summary.
created_at : str
The timestamp of when the summary was created.
content : str
The content of the summary.
recent_message_u... | (*, uuid: str = 'A uuid is required', created_at: str = 'A created_at is required', content: str = 'Content is required', recent_message_uuid: str = 'A recent_message_uuid is required', token_count: int = 'A token_count is required') -> None | [
-0.05148075148463249,
-0.06070064753293991,
-0.045130860060453415,
-0.004722058307379484,
0.0210945513099432,
-0.06794741749763489,
-0.013399345800280571,
-0.03508583456277847,
0.005829701665788889,
-0.00956071075052023,
-0.03939084708690643,
0.02339055761694908,
0.013515939004719257,
0.04... |
725,760 | zep_python.memory.models | to_dict |
Returns a dictionary representation of the summary.
Returns
-------
Dict[str, Any]
A dictionary containing the attributes of the summary.
| def to_dict(self) -> Dict[str, Any]:
"""
Returns a dictionary representation of the summary.
Returns
-------
Dict[str, Any]
A dictionary containing the attributes of the summary.
"""
return self.dict()
| (self) -> Dict[str, Any] | [
-0.028562597930431366,
-0.03259726241230965,
0.04692299664020538,
-0.03792942315340042,
0.01705402135848999,
-0.03302383795380592,
-0.006971797440201044,
-0.0020617679692804813,
0.0181826613843441,
-0.018102679401636124,
-0.03570768982172012,
-0.01137527171522379,
0.027105139568448067,
0.0... |
725,761 | zep_python.zep_client | ZepClient |
ZepClient class implementation.
Attributes
----------
base_url : str
The base URL of the API.
memory : MemoryClient
The client used for making Memory API requests.
document : DocumentClient
The client used for making Document API requests.
Methods
-------
g... | class ZepClient:
"""
ZepClient class implementation.
Attributes
----------
base_url : str
The base URL of the API.
memory : MemoryClient
The client used for making Memory API requests.
document : DocumentClient
The client used for making Document API requests.
M... | (base_url: str, api_key: 'Optional[str]' = None) -> 'None' | [
-0.00015652990259695798,
-0.04050721600651741,
-0.08802489936351776,
0.010142359882593155,
0.023748470470309258,
-0.012589800171554089,
-0.06491939723491669,
0.04301687702536583,
-0.00497006718069315,
-0.07284247130155563,
0.008047516457736492,
0.006683794315904379,
0.002368365414440632,
0... |
725,762 | zep_python.zep_client | __aenter__ | Asynchronous context manager entry point | def _healthcheck(self, base_url: str) -> None:
"""
Check that the Zep server is running, the API URL is correct,
and that the server version is compatible with this client.
Raises
------
ConnectionError
If the server is not running or the API URL is incorrect.
"""
url = concat_ur... | (self) -> zep_python.zep_client.ZepClient | [
0.0004754902911372483,
-0.07580641657114029,
-0.065033920109272,
0.02259683981537819,
0.01750076375901699,
-0.017636779695749283,
-0.010137747973203659,
0.037975747138261795,
-0.05495058372616768,
-0.04671706259250641,
0.028799183666706085,
0.042944878339767456,
0.05360855534672737,
-0.047... |
725,763 | zep_python.zep_client | __aexit__ | Asynchronous context manager exit point | def _healthcheck(self, base_url: str) -> None:
"""
Check that the Zep server is running, the API URL is correct,
and that the server version is compatible with this client.
Raises
------
ConnectionError
If the server is not running or the API URL is incorrect.
"""
url = concat_ur... | (self, exc_type: Type[Exception], exc_val: Exception, exc_tb: traceback) -> NoneType | [
0.00046244222903624177,
-0.07580425590276718,
-0.06503207236528397,
0.022650601342320442,
0.017509331926703453,
-0.017681613564491272,
-0.010146526619791985,
0.037938397377729416,
-0.05498528853058815,
-0.04671573266386986,
0.028798362240195274,
0.04290738329291344,
0.053607027977705,
-0.0... |
725,764 | zep_python.zep_client | __enter__ | Sync context manager entry point | def __enter__(self) -> "ZepClient":
"""Sync context manager entry point"""
return self
| (self) -> zep_python.zep_client.ZepClient | [
0.05029427632689476,
-0.04958968609571457,
-0.04911996051669121,
0.034390684217214584,
0.01490542571991682,
-0.019493645057082176,
-0.005963847506791353,
0.05291132256388664,
0.048214059323072433,
-0.03007926605641842,
-0.012841984629631042,
-0.05858159437775612,
-0.018050914630293846,
0.0... |
725,765 | zep_python.zep_client | __exit__ | Sync context manager exit point | def __exit__(
self,
exc_type: Type[Exception],
exc_val: Exception,
exc_tb: TracebackType,
) -> None:
"""Sync context manager exit point"""
self.close()
| (self, exc_type: Type[Exception], exc_val: Exception, exc_tb: traceback) -> NoneType | [
0.045682668685913086,
-0.013311163522303104,
0.022944923490285873,
0.0413319393992424,
-0.024429697543382645,
-0.06926639378070831,
-0.020683234557509422,
0.04692573472857475,
0.03642873466014862,
-0.025620969012379646,
0.01301766186952591,
-0.05738820508122444,
0.028417866677045822,
0.007... |
725,766 | zep_python.zep_client | __init__ |
Initialize the ZepClient with the specified base URL.
Parameters
----------
base_url : str
The base URL of the API.
api_key : Optional[str]
The API key to use for authentication. (optional)
| def __init__(self, base_url: str, api_key: Optional[str] = None) -> None:
"""
Initialize the ZepClient with the specified base URL.
Parameters
----------
base_url : str
The base URL of the API.
api_key : Optional[str]
The API key to use for authentication. (optional)
"""
... | (self, base_url: str, api_key: Optional[str] = None) -> NoneType | [
-0.051197730004787445,
-0.036616791039705276,
-0.07652252167463303,
0.04122129827737808,
0.01226041279733181,
0.0012333500199019909,
-0.03665333613753319,
0.038297802209854126,
0.0016753004165366292,
-0.0036498026456683874,
0.04695866256952286,
0.018381483852863312,
-0.007418372202664614,
... |
725,767 | zep_python.zep_client | _healthcheck |
Check that the Zep server is running, the API URL is correct,
and that the server version is compatible with this client.
Raises
------
ConnectionError
If the server is not running or the API URL is incorrect.
| def _healthcheck(self, base_url: str) -> None:
"""
Check that the Zep server is running, the API URL is correct,
and that the server version is compatible with this client.
Raises
------
ConnectionError
If the server is not running or the API URL is incorrect.
"""
url = concat_ur... | (self, base_url: str) -> NoneType | [
0.0005035153008066118,
-0.0758746787905693,
-0.06503026187419891,
0.022595567628741264,
0.017536045983433723,
-0.01761765219271183,
-0.010155310854315758,
0.03793733939528465,
-0.05487494915723801,
-0.046714432537555695,
0.028797561302781105,
0.04290619120001793,
0.05356926843523979,
-0.04... |
725,768 | zep_python.zep_client | aadd_memory | null | def add_memory(self, session_id: str, memory_messages: Memory) -> str:
deprecated_warning(self.add_memory)
return self.memory.add_memory(session_id, memory_messages)
| (self, session_id: str, memory_messages: zep_python.memory.models.Memory) -> str | [
-0.004471245221793652,
-0.020079879090189934,
-0.00972270779311657,
-0.016727516427636147,
0.002304213121533394,
0.0035302690230309963,
-0.015544329769909382,
0.07318609952926636,
-0.013023626990616322,
-0.0566214844584465,
0.001016533118672669,
-0.0007705717580392957,
-0.005041404161602259,... |
725,769 | zep_python.zep_client | aadd_session | null | def add_session(self, session: Session) -> Session:
deprecated_warning(self.add_session)
return self.memory.add_session(session)
| (self, session: zep_python.memory.models.Session) -> zep_python.memory.models.Session | [
-0.015940215438604355,
-0.05159778520464897,
-0.045394960790872574,
0.0016990624135360122,
-0.011903182603418827,
0.009001024067401886,
-0.010854939930140972,
0.11227456480264664,
-0.006185496691614389,
-0.03808325529098511,
0.003374301129952073,
-0.03059828281402588,
-0.005657043773680925,
... |
725,770 | zep_python.zep_client | aclose |
Asynchronously close the HTTP client.
[Optional] This method may be called when the ZepClient is no longer needed to
release resources.
| def search_memory(
self,
session_id: str,
search_payload: MemorySearchPayload,
limit: Optional[int] = None,
) -> List[MemorySearchResult]:
deprecated_warning(self.search_memory)
return self.memory.search_memory(session_id, search_payload, limit)
| (self) -> NoneType | [
0.04390455037355423,
-0.052254289388656616,
-0.02600737288594246,
-0.02816324681043625,
0.005736165679991245,
0.07713239639997482,
-0.03367270529270172,
-0.024587232619524002,
0.018085390329360962,
-0.06768760830163956,
-0.025665171444416046,
-0.0033150846138596535,
0.010924807749688625,
-... |
725,773 | zep_python.zep_client | adelete_memory | null | def delete_memory(self, session_id: str) -> str:
deprecated_warning(self.delete_memory)
return self.memory.delete_memory(session_id)
| (self, session_id: str) -> str | [
0.012039180845022202,
-0.020486371591687202,
0.015261659398674965,
-0.06623697280883789,
0.0018604444339871407,
0.004307379946112633,
-0.05437825247645378,
0.14532949030399323,
-0.010114286094903946,
-0.04286326467990875,
-0.019008327275514603,
0.00009888981730910018,
-0.0016359450528398156,... |
725,774 | zep_python.zep_client | aget_memory | null | def get_memory(self, session_id: str, lastn: Optional[int] = None) -> Memory:
deprecated_warning(self.get_memory)
return self.memory.get_memory(session_id, lastn)
| (self, session_id: str, lastn: Optional[int] = None) -> zep_python.memory.models.Memory | [
0.02501039393246174,
-0.0212256982922554,
-0.00345549825578928,
-0.04911385849118233,
-0.00387190212495625,
0.03102754056453705,
0.00920012779533863,
0.06575257331132889,
-0.01515622902661562,
-0.09201871603727341,
-0.00965359341353178,
0.007320859935134649,
-0.0372190959751606,
0.00196756... |
725,775 | zep_python.zep_client | aget_session | null | def get_session(self, session_id: str) -> Session:
deprecated_warning(self.get_session)
return self.memory.get_session(session_id)
| (self, session_id: str) -> zep_python.memory.models.Session | [
-0.0006716129137203097,
-0.0696454867720604,
0.0001028441620292142,
-0.029581744223833084,
-0.025677377358078957,
0.0005919206887483597,
0.07372573018074036,
0.14273807406425476,
0.011836215853691101,
-0.036001089960336685,
-0.05219894275069237,
-0.02434074692428112,
-0.019609777256846428,
... |
725,776 | zep_python.zep_client | asearch_memory | null | def search_memory(
self,
session_id: str,
search_payload: MemorySearchPayload,
limit: Optional[int] = None,
) -> List[MemorySearchResult]:
deprecated_warning(self.search_memory)
return self.memory.search_memory(session_id, search_payload, limit)
| (self, session_id: str, search_payload: zep_python.memory.models.MemorySearchPayload, limit: Optional[int] = None) -> List[zep_python.memory.models.MemorySearchResult] | [
0.04390455037355423,
-0.052254289388656616,
-0.02600737288594246,
-0.02816324681043625,
0.005736165679991245,
0.07713239639997482,
-0.03367270529270172,
-0.024587232619524002,
0.018085390329360962,
-0.06768760830163956,
-0.025665171444416046,
-0.0033150846138596535,
0.010924807749688625,
-... |
725,777 | zep_python.zep_client | close |
Close the HTTP client.
[Optional] This method may be called when the ZepClient is no longer needed to
release resources.
| def close(self) -> None:
"""
Close the HTTP client.
[Optional] This method may be called when the ZepClient is no longer needed to
release resources.
"""
self.client.close()
| (self) -> NoneType | [
-0.003693012986332178,
-0.022940730676054955,
-0.031545642763376236,
0.00015169259859248996,
-0.04629203677177429,
-0.029492782428860664,
-0.038046374917030334,
0.0882730633020401,
0.019211364910006523,
0.011769741773605347,
0.00014968783943913877,
-0.044820819050073624,
0.021520834416151047... |
725,782 | zep_python | deprecated_import | null | def deprecated_import():
warnings.warn(
(
"Importing memory classes from the base client path is deprecated, "
"please import from zep_python.memory instead."
),
DeprecationWarning,
stacklevel=2,
)
from zep_python.memory.models import (
Memory,... | () | [
-0.02178375981748104,
-0.05176263302564621,
-0.008519108407199383,
-0.017257388681173325,
-0.002622913336381316,
-0.03201812505722046,
-0.019801685586571693,
0.06739053130149841,
-0.00450731348246336,
-0.026681769639253616,
-0.016847632825374603,
-0.037735648453235626,
-0.027920566499233246,... |
725,791 | databricks_api.databricks | DatabricksAPI | null | class DatabricksAPI:
def __init__(self, **kwargs):
warnings.warn(
"""
==================================================================
Please switch to the official Databricks SDK for Python by running
`pip install databricks-sdk`. See more information and sources at
... | (**kwargs) | [
-0.01091464702039957,
-0.07635592669248581,
-0.0041011483408510685,
0.007489256095141172,
-0.019163547083735466,
0.016926558688282967,
-0.04638025909662247,
0.06416433304548264,
0.009353414177894592,
0.009535170160233974,
0.009600415825843811,
0.027403127402067184,
-0.00984275620430708,
-0... |
725,792 | databricks_api.databricks | __init__ | null | def __init__(self, **kwargs):
warnings.warn(
"""
==================================================================
Please switch to the official Databricks SDK for Python by running
`pip install databricks-sdk`. See more information and sources at
https://github.com/databricks/databricks-sd... | (self, **kwargs) | [
-0.022278834134340286,
-0.08276089280843735,
0.012555769644677639,
-0.016326328739523888,
-0.0182020366191864,
0.0022369748912751675,
-0.017436441034078598,
0.06909500807523727,
0.016890954226255417,
0.014938686043024063,
-0.0014570242492482066,
0.0458974614739418,
-0.010402531363070011,
-... |
725,795 | flask_admin.base | Admin |
Collection of the admin views. Also manages menu structure.
| class Admin(object):
"""
Collection of the admin views. Also manages menu structure.
"""
def __init__(self, app=None, name=None,
url=None, subdomain=None,
index_view=None,
translations_path=None,
endpoint=None,
stat... | (app=None, name=None, url=None, subdomain=None, index_view=None, translations_path=None, endpoint=None, static_url_path=None, base_template=None, template_mode=None, category_icon_classes=None) | [
0.004677401855587959,
-0.00017513845523353666,
0.025861727073788643,
-0.010273909196257591,
0.03989129140973091,
-0.013585858047008514,
-0.0015292013995349407,
0.04318739473819733,
-0.01659672148525715,
0.019480811432003975,
-0.0010914377635344863,
0.009803792461752892,
0.02108660526573658,
... |
725,796 | flask_admin.base | __init__ |
Constructor.
:param app:
Flask application object
:param name:
Application name. Will be displayed in the main menu and as a page title. Defaults to "Admin"
:param url:
Base URL
:param subdomain:
... | def __init__(self, app=None, name=None,
url=None, subdomain=None,
index_view=None,
translations_path=None,
endpoint=None,
static_url_path=None,
base_template=None,
template_mode=None,
category_icon_classes=None):
... | (self, app=None, name=None, url=None, subdomain=None, index_view=None, translations_path=None, endpoint=None, static_url_path=None, base_template=None, template_mode=None, category_icon_classes=None) | [
0.021030129864811897,
-0.026292569935321808,
0.03312588855624199,
-0.03540366142988205,
0.031162291765213013,
-0.00009472823876421899,
0.021501392126083374,
0.009204363450407982,
-0.02639074996113777,
0.0347164049744606,
0.019488705322146416,
0.014599347487092018,
0.016857484355568886,
0.0... |
725,797 | flask_admin.base | _add_menu_item | null | def _add_menu_item(self, menu_item, target_category):
warnings.warn('Admin._add_menu_item is obsolete - use Admin.add_menu_item instead.')
return self.add_menu_item(menu_item, target_category)
| (self, menu_item, target_category) | [
-0.04615084454417229,
0.026616884395480156,
0.035414621233940125,
-0.0033131311647593975,
0.00502328434959054,
-0.04301944747567177,
0.054203011095523834,
0.07679381221532822,
0.030065150931477547,
-0.01072690263390541,
0.011202204041182995,
0.02751156874001026,
0.01765139400959015,
0.0380... |
725,798 | flask_admin.base | _add_view_to_menu |
Add a view to the menu tree
:param view:
View to add
| def _add_view_to_menu(self, view):
"""
Add a view to the menu tree
:param view:
View to add
"""
self.add_menu_item(MenuView(view.name, view), view.category)
| (self, view) | [
-0.06029827892780304,
-0.01588965766131878,
-0.0034709973260760307,
0.005485824309289455,
0.021540332585573196,
0.03529610484838486,
0.007184689864516258,
0.04861228168010712,
-0.014616654254496098,
0.01879284158349037,
0.03243871405720711,
0.04568162187933922,
0.05612209066748619,
0.01925... |
725,799 | flask_admin.base | _init_extension | null | def _init_extension(self):
if not hasattr(self.app, 'extensions'):
self.app.extensions = dict()
admins = self.app.extensions.get('admin', [])
for p in admins:
if p.endpoint == self.endpoint:
raise Exception(u'Cannot have two Admin() instances with same'
... | (self) | [
0.030668461695313454,
-0.021756896749138832,
0.03933766111731529,
0.04071727767586708,
0.011260638944804668,
0.037398744374513626,
0.030761679634451866,
0.013479208573698997,
-0.016005394980311394,
0.058838702738285065,
0.04000882804393768,
-0.014802892692387104,
0.010440327227115631,
0.00... |
725,800 | flask_admin.base | _set_admin_index_view |
Add the admin index view.
:param index_view:
Home page view to use. Defaults to `AdminIndexView`.
:param url:
Base URL
:param endpoint:
Base endpoint name for index view. If you use multiple instances of the `Admin` class with
... | def _set_admin_index_view(self, index_view=None,
endpoint=None, url=None):
"""
Add the admin index view.
:param index_view:
Home page view to use. Defaults to `AdminIndexView`.
:param url:
Base URL
:param endpoint:
Base endpoint n... | (self, index_view=None, endpoint=None, url=None) | [
-0.043694235384464264,
0.0014131349744275212,
0.015722695738077164,
0.003335801884531975,
0.01870458573102951,
0.010371356271207333,
0.013905448839068413,
0.01029103621840477,
-0.11726761609315872,
0.004211795050650835,
0.0051756384782493114,
0.05116401985287666,
-0.008749891072511673,
0.0... |
725,801 | flask_admin.base | add_category |
Add a category of a given name
:param name:
The name of the new menu category.
:param class_name:
The class name for the new menu category.
:param icon_type:
The icon name for the new menu category.
:param icon... | def add_category(self, name, class_name=None, icon_type=None, icon_value=None):
"""
Add a category of a given name
:param name:
The name of the new menu category.
:param class_name:
The class name for the new menu category.
:param icon_type:
The ic... | (self, name, class_name=None, icon_type=None, icon_value=None) | [
-0.02770477533340454,
0.004539648536592722,
0.06161049008369446,
-0.05769410729408264,
-0.010615933686494827,
-0.019164888188242912,
0.010271436534821987,
0.03406889736652374,
0.030116252601146698,
-0.007089376449584961,
0.03599082678556442,
0.0633511021733284,
0.01835804060101509,
-0.0292... |
725,802 | flask_admin.base | add_link |
Add link to menu links collection.
:param link:
Link to add.
| def add_link(self, link):
"""
Add link to menu links collection.
:param link:
Link to add.
"""
if link.category:
self.add_menu_item(link, link.category)
else:
self._menu_links.append(link)
| (self, link) | [
-0.05613868683576584,
0.04571398347616196,
-0.005456393118947744,
0.019486460834741592,
0.029450709000229836,
0.01908125914633274,
-0.024072593078017235,
0.042656559497117996,
0.01697237603366375,
0.016493501141667366,
-0.00881771557033062,
0.001988014904782176,
0.04107259586453438,
0.0152... |
725,803 | flask_admin.base | add_links |
Add one or more links to the menu links collection.
Examples::
admin.add_links(link1)
admin.add_links(link1, link2, link3, link4)
admin.add_links(*my_list)
:param args:
Argument list including the links to add.
... | def add_links(self, *args):
"""
Add one or more links to the menu links collection.
Examples::
admin.add_links(link1)
admin.add_links(link1, link2, link3, link4)
admin.add_links(*my_list)
:param args:
Argument list including the links to add.
... | (self, *args) | [
-0.05609922856092453,
0.014768034219741821,
-0.021466737613081932,
0.002589232288300991,
-0.011949559673666954,
0.04884069040417671,
-0.03467109799385071,
0.026640376076102257,
0.024516867473721504,
0.04660135507583618,
-0.013580800034105778,
0.00874499324709177,
0.03310742229223251,
0.012... |
725,804 | flask_admin.base | add_menu_item |
Add menu item to menu tree hierarchy.
:param menu_item:
MenuItem class instance
:param target_category:
Target category name
| def add_menu_item(self, menu_item, target_category=None):
"""
Add menu item to menu tree hierarchy.
:param menu_item:
MenuItem class instance
:param target_category:
Target category name
"""
if target_category:
cat_text = as_unicode(target_category)
... | (self, menu_item, target_category=None) | [
-0.043042462319135666,
0.02039146050810814,
0.03126320242881775,
-0.013057202100753784,
-0.00816306658089161,
-0.03180030733346939,
0.03154101222753525,
0.06641577929258347,
0.019261687994003296,
-0.010640230029821396,
0.02502167411148548,
0.026855237782001495,
0.01676137186586857,
0.01316... |
725,805 | flask_admin.base | add_sub_category |
Add a category of a given name underneath
the category with parent_name.
:param name:
The name of the new menu category.
:param parent_name:
The name of a parent_name category
| def add_sub_category(self, name, parent_name):
"""
Add a category of a given name underneath
the category with parent_name.
:param name:
The name of the new menu category.
:param parent_name:
The name of a parent_name category
"""
name_text = as_unicod... | (self, name, parent_name) | [
-0.06209104508161545,
-0.009233680553734303,
0.006507199723273516,
-0.014159521088004112,
-0.043260153383016586,
0.002653774106875062,
0.0028832529205828905,
0.06401775777339935,
0.09139162302017212,
-0.06209104508161545,
0.022975141182541847,
0.023684026673436165,
0.014813876710832119,
-0... |
725,806 | flask_admin.base | add_view |
Add a view to the collection.
:param view:
View to add.
| def add_view(self, view):
"""
Add a view to the collection.
:param view:
View to add.
"""
# Add to views
self._views.append(view)
# If app was provided in constructor, register view with Flask app
if self.app is not None:
self.app.register_blueprint(view.creat... | (self, view) | [
-0.035683389753103256,
-0.03418832644820213,
-0.04730165749788284,
-0.0019892905838787556,
0.04247422516345978,
0.0380430705845356,
0.012816119939088821,
0.04045678675174713,
-0.02948698215186596,
0.03011743165552616,
0.02408313751220703,
0.022263841703534126,
0.03559332713484764,
0.018733... |
725,807 | flask_admin.base | add_views |
Add one or more views to the collection.
Examples::
admin.add_views(view1)
admin.add_views(view1, view2, view3, view4)
admin.add_views(*my_list)
:param args:
Argument list including the views to add.
| def add_views(self, *args):
"""
Add one or more views to the collection.
Examples::
admin.add_views(view1)
admin.add_views(view1, view2, view3, view4)
admin.add_views(*my_list)
:param args:
Argument list including the views to add.
"""
... | (self, *args) | [
-0.07821157574653625,
-0.03961841017007828,
-0.040570423007011414,
0.0024715736508369446,
0.00760237779468298,
0.04291384294629097,
0.003583781886845827,
0.006133164279162884,
-0.00748337572440505,
0.04884561896324158,
0.011250237002968788,
0.06345536559820175,
0.004679970443248749,
0.0045... |
725,808 | flask_admin.base | get_category_menu_item | null | def get_category_menu_item(self, name):
return self._menu_categories.get(name)
| (self, name) | [
-0.023147480562329292,
-0.017305737361311913,
0.03280492499470711,
-0.031656838953495026,
0.017255086451768875,
-0.021307162940502167,
0.03839341178536415,
0.0043855272233486176,
0.09367047250270844,
-0.0013886799570173025,
-0.004710537381470203,
0.025798212736845016,
-0.012983524240553379,
... |
725,809 | flask_admin.base | init_app |
Register all views with the Flask application.
:param app:
Flask application instance
| def init_app(self, app, index_view=None,
endpoint=None, url=None):
"""
Register all views with the Flask application.
:param app:
Flask application instance
"""
self.app = app
self._init_extension()
# Register Index view
if index_view is not None:
... | (self, app, index_view=None, endpoint=None, url=None) | [
-0.015364729799330235,
-0.07168971747159958,
-0.017255203798413277,
-0.03517763316631317,
0.03273113816976547,
0.04496361315250397,
0.029061395674943924,
-0.006283043883740902,
-0.0674268826842308,
0.02274128422141075,
0.004559377208352089,
-0.010592211969196796,
0.012529020197689533,
0.00... |
725,810 | flask_admin.base | menu |
Return the menu hierarchy.
| def menu(self):
"""
Return the menu hierarchy.
"""
return self._menu
| (self) | [
-0.016509823501110077,
0.004859093111008406,
0.04928203672170639,
-0.012098671868443489,
0.006198649760335684,
-0.0182077344506979,
0.012909231707453728,
0.03296845406293869,
0.03296845406293869,
0.02537478879094124,
0.017729930579662323,
-0.013250520452857018,
0.008907626383006573,
-0.007... |
725,811 | flask_admin.base | menu_links |
Return menu links.
| def menu_links(self):
"""
Return menu links.
"""
return self._menu_links
| (self) | [
-0.04506678879261017,
-0.011601799167692661,
0.009509671479463577,
-0.008594932034611702,
0.005723916459828615,
0.026228580623865128,
-0.00940098986029625,
0.03189815580844879,
0.062419675290584564,
0.054014936089515686,
-0.00755339628085494,
-0.02780446782708168,
0.0519862063229084,
0.027... |
725,812 | flask_admin.base | AdminIndexView |
Default administrative interface index page when visiting the ``/admin/`` URL.
It can be overridden by passing your own view class to the ``Admin`` constructor::
class MyHomeView(AdminIndexView):
@expose('/')
def index(self):
arg1 = 'Hel... | class AdminIndexView(BaseView):
"""
Default administrative interface index page when visiting the ``/admin/`` URL.
It can be overridden by passing your own view class to the ``Admin`` constructor::
class MyHomeView(AdminIndexView):
@expose('/')
def index... | (name=None, category=None, endpoint=None, url=None, template='admin/index.html', menu_class_name=None, menu_icon_type=None, menu_icon_value=None) | [
-0.011184517294168472,
-0.039589643478393555,
0.024696677923202515,
-0.01864086277782917,
0.04611887410283089,
0.023730114102363586,
-0.003252288093790412,
0.035427503287792206,
-0.060242533683776855,
0.02745828777551651,
0.06718601286411285,
0.03949101269245148,
0.014902827329933643,
0.02... |
725,813 | flask_admin.base | __init__ | null | def __init__(self, name=None, category=None,
endpoint=None, url=None,
template='admin/index.html',
menu_class_name=None,
menu_icon_type=None,
menu_icon_value=None):
super(AdminIndexView, self).__init__(name or babel.lazy_gettext('Home'),
... | (self, name=None, category=None, endpoint=None, url=None, template='admin/index.html', menu_class_name=None, menu_icon_type=None, menu_icon_value=None) | [
-0.024427739903330803,
-0.037768129259347916,
0.06241326779127121,
-0.042017292231321335,
0.014121051877737045,
0.02160155214369297,
0.0005367037374526262,
0.027115581557154655,
-0.07344132661819458,
0.04486324265599251,
0.04041644558310509,
0.06846091151237488,
-0.0008411857997998595,
0.0... |
725,814 | flask_admin.base | _get_endpoint |
Generate Flask endpoint name. By default converts class name to lower case if endpoint is
not explicitly provided.
| def _get_endpoint(self, endpoint):
"""
Generate Flask endpoint name. By default converts class name to lower case if endpoint is
not explicitly provided.
"""
if endpoint:
return endpoint
return self.__class__.__name__.lower()
| (self, endpoint) | [
0.010945347137749195,
-0.07009101659059525,
0.026955466717481613,
0.0009145908406935632,
-0.0142000587657094,
-0.021363822743296623,
0.06455035507678986,
0.03514748066663742,
-0.016018617898225784,
-0.027159417048096657,
-0.037560898810625076,
-0.035895299166440964,
-0.007932827807962894,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.