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 |
|---|---|---|---|---|---|---|
723,590 | wordninja | split | Uses dynamic programming to infer the location of spaces in a string without spaces. | def split(self, s):
"""Uses dynamic programming to infer the location of spaces in a string without spaces."""
l = [self._split(x) for x in _SPLIT_RE.split(s)]
return [item for sublist in l for item in sublist]
| (self, s) | [
0.0027021451387554407,
0.004090184345841408,
-0.02770354598760605,
-0.009453930892050266,
0.010713182389736176,
0.014338302426040173,
0.058612462133169174,
0.017247937619686127,
0.0016313038067892194,
-0.014242904260754585,
-0.010598705150187016,
-0.0046983459033071995,
-0.04529491811990738,... |
723,594 | wordninja | split | null | def split(s):
return DEFAULT_LANGUAGE_MODEL.split(s)
| (s) | [
-0.007785600610077381,
0.0055325329303741455,
0.005023506470024586,
-0.02748742699623108,
-0.002709939843043685,
0.0025722524151206017,
0.023014670237898827,
0.021062010899186134,
0.06261859089136124,
0.0007379840244539082,
-0.0007651042542420328,
-0.0014853557804599404,
-0.0852494090795517,... |
723,595 | maybe_type.main | Some |
Some[T] is a wrapper for a value of type T.
This allows us to apply the functions bind and map to the value.
Also allows for fancy pattern matching.
| class Some(typing.Generic[T]):
"""
Some[T] is a wrapper for a value of type T.
This allows us to apply the functions bind and map to the value.
Also allows for fancy pattern matching.
"""
value: T
def bind(self, f: typing.Callable[[T], 'Maybe[T]']) -> 'Maybe[T]':
"""Applies a functi... | (value: ~T) -> None | [
0.022808076813817024,
-0.028114816173911095,
0.050123248249292374,
0.009604835882782936,
0.033058080822229385,
0.027042564004659653,
-0.02251729741692543,
-0.025861268863081932,
0.04179966449737549,
-0.034711893647909164,
-0.005443043075501919,
0.039546117186546326,
0.017201470211148262,
-... |
723,596 | maybe_type.main | __delattr__ | null | import typing
import functools
from dataclasses import dataclass
T = typing.TypeVar('T')
@dataclass(frozen=True)
class Some(typing.Generic[T]):
"""
Some[T] is a wrapper for a value of type T.
This allows us to apply the functions bind and map to the value.
Also allows for fancy pattern matching.
"... | (self, name) | [
0.044881269335746765,
-0.025340266525745392,
0.038361597806215286,
-0.0041018095798790455,
0.023611294105648994,
0.013849797658622265,
-0.026420874521136284,
-0.04066689684987068,
0.03684874624013901,
-0.022098440676927567,
-0.0026272290851920843,
0.05892917886376381,
0.005880310665816069,
... |
723,600 | maybe_type.main | __repr__ | null | def __repr__(self) -> str:
return f'Some[{self.value.__class__.__name__}]({self.value})'
| (self) -> str | [
0.03352752700448036,
-0.052435293793678284,
0.0694185197353363,
0.034152157604694366,
0.022706205025315285,
-0.038321997970342636,
0.015582027845084667,
-0.01671311818063259,
0.0628008022904396,
-0.04227237030863762,
-0.01000254787504673,
0.06030227616429329,
-0.011429071426391602,
-0.0017... |
723,602 | maybe_type.main | bind | Applies a function, that returns a Maybe, to the value, that is wrapped. | def bind(self, f: typing.Callable[[T], 'Maybe[T]']) -> 'Maybe[T]':
"""Applies a function, that returns a Maybe, to the value, that is wrapped."""
return f(self.value)
| (self, f: Callable[[~T], Optional[maybe_type.main.Some[~T]]]) -> Optional[maybe_type.main.Some[~T]] | [
0.035374633967876434,
-0.04756569489836693,
0.06592078506946564,
0.04455217346549034,
0.015478542074561119,
0.029946869239211082,
0.0025555004831403494,
-0.005402079783380032,
0.04376455023884773,
-0.04023735970258713,
-0.011300705373287201,
0.058523956686258316,
-0.005205173511058092,
-0.... |
723,603 | maybe_type.main | map | Applies a function to the value, that is wrapped. | def map(self, f: typing.Callable[[T], T]) -> 'Maybe[T]':
"""Applies a function to the value, that is wrapped."""
return Some(f(self.value))
| (self, f: Callable[[~T], ~T]) -> Optional[maybe_type.main.Some[~T]] | [
0.07632310688495636,
-0.04401922971010208,
0.023621343076229095,
0.050743427127599716,
-0.003957831300795078,
0.011308089829981327,
0.0018922636518254876,
-0.017547035589814186,
0.055734582245349884,
-0.009878330864012241,
0.02341337688267231,
0.06110700964927673,
0.02682746760547161,
-0.0... |
723,608 | maybe_type.main | with_maybe | A decorator that wraps a function, that may throw an exception, in a Maybe. | def with_maybe(f: typing.Callable[..., T]) -> typing.Callable[..., Maybe[T]]:
"""A decorator that wraps a function, that may throw an exception, in a Maybe."""
@functools.wraps(f)
def wrapper(*args: typing.Any, **kwargs: typing.Any) -> Maybe[T]:
try:
return Some(f(*args, **kwargs))
... | (f: Callable[..., ~T]) -> Callable[..., Optional[maybe_type.main.Some[~T]]] | [
-0.011149550788104534,
-0.033733170479536057,
0.04815467819571495,
0.05220906063914299,
0.016626523807644844,
0.002140553668141365,
-0.01440372597426176,
-0.018155807629227638,
0.025997836142778397,
-0.02560662478208542,
0.037805333733558655,
0.02926979400217533,
-0.0034831231459975243,
-0... |
723,609 | yfinance.ticker | Ticker | null | class Ticker(TickerBase):
def __init__(self, ticker, session=None, proxy=None):
super(Ticker, self).__init__(ticker, session=session, proxy=proxy)
self._expirations = {}
self._underlying = {}
def __repr__(self):
return f'yfinance.Ticker object <{self.ticker}>'
def _downloa... | (ticker, session=None, proxy=None) | [
0.036085836589336395,
-0.06951334327459335,
-0.021584050729870796,
-0.011268144473433495,
-0.018935641273856163,
-0.06399829685688019,
-0.05971322953701019,
-0.010593642480671406,
0.003365068696439266,
-0.022893378511071205,
-0.012389007024466991,
-0.005088519304990768,
0.022933054715394974,... |
723,610 | yfinance.ticker | __init__ | null | def __init__(self, ticker, session=None, proxy=None):
super(Ticker, self).__init__(ticker, session=session, proxy=proxy)
self._expirations = {}
self._underlying = {}
| (self, ticker, session=None, proxy=None) | [
0.02001267671585083,
-0.06481795758008957,
-0.02445993758738041,
0.011844772845506668,
-0.04394734650850296,
-0.0011774736922234297,
-0.05802450329065323,
0.07465796172618866,
0.040305495262145996,
0.02642093412578106,
0.0043969233520329,
0.0108905378729105,
0.014471108093857765,
0.0300627... |
723,611 | yfinance.ticker | __repr__ | null | def __repr__(self):
return f'yfinance.Ticker object <{self.ticker}>'
| (self) | [
0.005202966742217541,
-0.053708046674728394,
0.03213649243116379,
0.02692469209432602,
0.00849788449704647,
-0.03770163282752037,
-0.013912857510149479,
0.06003287434577942,
0.06568635255098343,
-0.028497064486145973,
0.016015244647860527,
-0.05437939614057541,
0.0008607199997641146,
0.023... |
723,612 | yfinance.ticker | _download_options | null | def _download_options(self, date=None):
if date is None:
url = f"{_BASE_URL_}/v7/finance/options/{self.ticker}"
else:
url = f"{_BASE_URL_}/v7/finance/options/{self.ticker}?date={date}"
r = self._data.get(url=url, proxy=self.proxy).json()
if len(r.get('optionChain', {}).get('result', []))... | (self, date=None) | [
0.03681772202253342,
-0.023420989513397217,
-0.009754087775945663,
-0.02660713717341423,
-0.013769379816949368,
-0.03051995299756527,
-0.052357181906700134,
-0.0007482093060389161,
0.04028335586190224,
0.030631747096776962,
0.012316049076616764,
-0.015232027508318424,
-0.007024433463811874,
... |
723,613 | yfinance.utils | wrapper | null | def log_indent_decorator(func):
def wrapper(*args, **kwargs):
logger = get_indented_logger('yfinance')
logger.debug(f'Entering {func.__name__}()')
with IndentationContext():
result = func(*args, **kwargs)
logger.debug(f'Exiting {func.__name__}()')
return result
... | (*args, **kwargs) | [
-0.02549825608730316,
-0.009734597988426685,
0.0476105660200119,
0.02822774462401867,
0.019158242270350456,
-0.03372127190232277,
-0.06882455945014954,
0.009820974431931973,
-0.015651367604732513,
-0.015003547072410583,
-0.0053726001642644405,
-0.04940718784928322,
0.004089913330972195,
-0... |
723,614 | yfinance.base | _get_ticker_tz | null | def _get_ticker_tz(self, proxy, timeout):
proxy = proxy or self.proxy
if self._tz is not None:
return self._tz
c = cache.get_tz_cache()
tz = c.lookup(self.ticker)
if tz and not utils.is_valid_timezone(tz):
# Clear from cache and force re-fetch
c.store(self.ticker, None)
... | (self, proxy, timeout) | [
0.06456679105758667,
-0.04818851873278618,
0.030609173700213432,
0.03996298834681511,
-0.029735665768384933,
-0.01288424152880907,
0.0055322167463600636,
0.03967181593179703,
0.03530427813529968,
0.002511335304006934,
0.03923506289720535,
0.007447564974427223,
-0.020272662863135338,
-0.020... |
723,615 | yfinance.base | _lazy_load_price_history | null | def _lazy_load_price_history(self):
if self._price_history is None:
self._price_history = PriceHistory(self._data, self.ticker, self._get_ticker_tz(self.proxy, timeout=10))
return self._price_history
| (self) | [
-0.04384774714708328,
-0.039912693202495575,
-0.02538461424410343,
-0.02800212800502777,
-0.013421345502138138,
0.006864386145025492,
-0.004888075403869152,
0.029829116538167,
0.046447694301605225,
-0.0022551901638507843,
0.027246737852692604,
-0.0052438112907111645,
0.028792651370167732,
... |
723,616 | yfinance.ticker | _options2df | null | def _options2df(self, opt, tz=None):
data = _pd.DataFrame(opt).reindex(columns=[
'contractSymbol',
'lastTradeDate',
'strike',
'lastPrice',
'bid',
'ask',
'change',
'percentChange',
'volume',
'openInterest',
'impliedVolatility',
... | (self, opt, tz=None) | [
0.0031848791986703873,
0.013370372354984283,
0.030676530674099922,
-0.06839604675769806,
-0.05393344536423683,
-0.013784665614366531,
-0.04399040713906288,
-0.019161062315106392,
-0.011430727317929268,
-0.009218024089932442,
0.0354597344994545,
-0.011506052687764168,
-0.02095947228372097,
... |
723,617 | yfinance.base | get_actions | null | def get_actions(self, proxy=None) -> pd.Series:
return self._lazy_load_price_history().get_actions(proxy)
| (self, proxy=None) -> pandas.core.series.Series | [
-0.059732887893915176,
-0.046794112771749496,
0.00534646213054657,
-0.04059288650751114,
0.02793903462588787,
0.003988896496593952,
-0.022843973711133003,
0.03905096277594566,
0.0789734423160553,
-0.012033729813992977,
0.051889173686504364,
0.03948672115802765,
0.05108468979597092,
-0.0243... |
723,618 | yfinance.base | get_analyst_price_target | null | def get_analyst_price_target(self, proxy=None, as_dict=False):
self._analysis.proxy = proxy or self.proxy
data = self._analysis.analyst_price_target
if as_dict:
return data.to_dict()
return data
| (self, proxy=None, as_dict=False) | [
0.03360904008150101,
-0.014251491986215115,
0.0573207251727581,
-0.005363981705158949,
-0.018238412216305733,
-0.019689790904521942,
-0.01278262585401535,
0.008725759573280811,
0.05735569819808006,
-0.004983650520443916,
0.020634060725569725,
-0.00754105020314455,
0.020861385390162468,
-0.... |
723,619 | yfinance.base | get_balance_sheet |
:Parameters:
as_dict: bool
Return table as Python dict
Default is False
pretty: bool
Format row names nicely for readability
Default is False
freq: str
"yearly" or "quarterly"
Def... | def get_balance_sheet(self, proxy=None, as_dict=False, pretty=False, freq="yearly"):
"""
:Parameters:
as_dict: bool
Return table as Python dict
Default is False
pretty: bool
Format row names nicely for readability
Default is False
freq: str... | (self, proxy=None, as_dict=False, pretty=False, freq='yearly') | [
0.03516973927617073,
-0.014516245573759079,
-0.05479423329234123,
-0.05332423374056816,
-0.03456336632370949,
-0.011024996638298035,
-0.03564748913049698,
-0.0030089053325355053,
-0.032983116805553436,
-0.035573989152908325,
0.007942591793835163,
-0.004910717252641916,
-0.0369153656065464,
... |
723,620 | yfinance.base | get_balancesheet | null | def get_balancesheet(self, proxy=None, as_dict=False, pretty=False, freq="yearly"):
return self.get_balance_sheet(proxy, as_dict, pretty, freq)
| (self, proxy=None, as_dict=False, pretty=False, freq='yearly') | [
0.031712453812360764,
-0.026778649538755417,
-0.04338345676660538,
-0.046581920236349106,
-0.028990356251597404,
-0.012300485745072365,
-0.020398730412125587,
-0.017863774672150612,
-0.005716408137232065,
-0.022406278178095818,
0.0027901516295969486,
-0.0016651591286063194,
-0.01883352361619... |
723,621 | yfinance.base | get_calendar | null | def get_calendar(self, proxy=None) -> dict:
self._quote.proxy = proxy or self.proxy
return self._quote.calendar
| (self, proxy=None) -> dict | [
0.01558361854404211,
-0.006083490327000618,
0.026123221963644028,
-0.011042301543056965,
-0.0570518933236599,
-0.02015901729464531,
-0.0032717930153012276,
0.02746943011879921,
0.07300188392400742,
-0.004379431251436472,
0.0074722981080412865,
0.004796925932168961,
-0.007012202404439449,
-... |
723,622 | yfinance.base | get_capital_gains | null | def get_capital_gains(self, proxy=None) -> pd.Series:
return self._lazy_load_price_history().get_capital_gains(proxy)
| (self, proxy=None) -> pandas.core.series.Series | [
-0.029687372967600822,
-0.06596050411462784,
0.030493443831801414,
0.0034858223516494036,
-0.007709112949669361,
0.0021019980777055025,
-0.027732225134968758,
-0.004652050789445639,
0.1141531839966774,
-0.030184734612703323,
-0.010461755096912384,
0.007683387026190758,
-0.00206126575358212,
... |
723,623 | yfinance.base | get_cash_flow |
:Parameters:
as_dict: bool
Return table as Python dict
Default is False
pretty: bool
Format row names nicely for readability
Default is False
freq: str
"yearly" or "quarterly"
Def... | def get_cash_flow(self, proxy=None, as_dict=False, pretty=False, freq="yearly") -> Union[pd.DataFrame, dict]:
"""
:Parameters:
as_dict: bool
Return table as Python dict
Default is False
pretty: bool
Format row names nicely for readability
Default i... | (self, proxy=None, as_dict=False, pretty=False, freq='yearly') -> Union[pandas.core.frame.DataFrame, dict] | [
-0.0023866407573223114,
-0.01156461052596569,
0.010412756353616714,
-0.061518196016550064,
-0.03947632759809494,
0.023903265595436096,
-0.03344982862472534,
-0.012541382573544979,
-0.014660792425274849,
-0.025525076314806938,
0.019332710653543472,
-0.0016540618380531669,
-0.03162529319524765... |
723,624 | yfinance.base | get_cashflow | null | def get_cashflow(self, proxy=None, as_dict=False, pretty=False, freq="yearly"):
return self.get_cash_flow(proxy, as_dict, pretty, freq)
| (self, proxy=None, as_dict=False, pretty=False, freq='yearly') | [
-0.016123667359352112,
-0.026676876470446587,
-0.020288735628128052,
-0.03774965554475784,
-0.024053480476140976,
0.016029974445700645,
-0.02277585305273533,
-0.02827817015349865,
0.020629437640309334,
-0.025791054591536522,
0.023849060758948326,
0.007163235452026129,
-0.018670406192541122,
... |
723,625 | yfinance.base | get_dividends | null | def get_dividends(self, proxy=None) -> pd.Series:
return self._lazy_load_price_history().get_dividends(proxy)
| (self, proxy=None) -> pandas.core.series.Series | [
-0.04878018796443939,
-0.05536298081278801,
0.02619614265859127,
-0.023951241746544838,
-0.023748693987727165,
0.03720122203230858,
-0.028964292258024216,
0.021368760615587234,
0.06481520086526871,
0.00734234694391489,
0.032576389610767365,
-0.006338048726320267,
0.0410158671438694,
-0.078... |
723,626 | yfinance.base | get_earnings |
:Parameters:
as_dict: bool
Return table as Python dict
Default is False
freq: str
"yearly" or "quarterly"
Default is "yearly"
proxy: str
Optional. Proxy server URL scheme
Default ... | def get_earnings(self, proxy=None, as_dict=False, freq="yearly"):
"""
:Parameters:
as_dict: bool
Return table as Python dict
Default is False
freq: str
"yearly" or "quarterly"
Default is "yearly"
proxy: str
Optional. Proxy serve... | (self, proxy=None, as_dict=False, freq='yearly') | [
0.028293075039982796,
-0.036670565605163574,
-0.026941251009702682,
-0.05590071901679039,
0.0011935546062886715,
0.00877256691455841,
-0.04881792888045311,
-0.0476374626159668,
-0.011538091115653515,
-0.0001317908026976511,
0.014774848707020283,
-0.040554676204919815,
0.024370884522795677,
... |
723,628 | yfinance.base | get_earnings_forecast | null | def get_earnings_forecast(self, proxy=None, as_dict=False):
self._analysis.proxy = proxy or self.proxy
data = self._analysis.eps_est
if as_dict:
return data.to_dict()
return data
| (self, proxy=None, as_dict=False) | [
0.04066630080342293,
-0.018802886828780174,
-0.004560007713735104,
-0.04699842259287834,
0.008702271617949009,
-0.0031418760772794485,
-0.04168647527694702,
0.012549915350973606,
0.06244176626205444,
0.030728384852409363,
0.022338321432471275,
-0.02543402649462223,
0.015566468238830566,
-0... |
723,629 | yfinance.base | get_earnings_trend | null | def get_earnings_trend(self, proxy=None, as_dict=False):
self._analysis.proxy = proxy or self.proxy
data = self._analysis.earnings_trend
if as_dict:
return data.to_dict()
return data
| (self, proxy=None, as_dict=False) | [
-0.03142174333333969,
-0.022029278799891472,
0.033250048756599426,
-0.03871703892946243,
0.019627388566732407,
0.012690585106611252,
-0.021455692127346992,
0.013766057789325714,
0.0653170794248581,
-0.004250360187143087,
0.026958530768752098,
-0.010387280024588108,
0.014733984135091305,
-0... |
723,630 | yfinance.base | get_fast_info | null | def get_fast_info(self, proxy=None):
if self._fast_info is None:
self._fast_info = FastInfo(self, proxy=proxy)
return self._fast_info
| (self, proxy=None) | [
0.04809301719069481,
-0.008269757963716984,
-0.0050032250583171844,
0.03166554495692253,
0.02447744831442833,
-0.01648780331015587,
0.022943299263715744,
0.04533499479293823,
-0.036543797701597214,
-0.04481786489486694,
0.009816835634410381,
0.04219774156808853,
-0.052574802190065384,
-0.0... |
723,631 | yfinance.base | get_financials | null | def get_financials(self, proxy=None, as_dict=False, pretty=False, freq="yearly"):
return self.get_income_stmt(proxy, as_dict, pretty, freq)
| (self, proxy=None, as_dict=False, pretty=False, freq='yearly') | [
-0.009349792264401913,
-0.07452258467674255,
0.01028046291321516,
-0.02505916729569435,
-0.028006291016936302,
0.021732881665229797,
-0.03457268700003624,
-0.05873565375804901,
0.00956522487103939,
0.018441064283251762,
0.026541344821453094,
-0.025886429473757744,
0.023680396378040314,
-0.... |
723,632 | yfinance.base | get_history_metadata | null | def get_history_metadata(self, proxy=None) -> dict:
return self._lazy_load_price_history().get_history_metadata(proxy)
| (self, proxy=None) -> dict | [
-0.039736852049827576,
-0.034142009913921356,
-0.01633794605731964,
-0.02728327549993992,
-0.01334672886878252,
-0.001093268976546824,
-0.01632109470665455,
0.06956476718187332,
0.05753248929977417,
-0.017879897728562355,
0.02163787931203842,
0.0021549405064433813,
0.03267589211463928,
-0.... |
723,633 | yfinance.base | get_income_stmt |
:Parameters:
as_dict: bool
Return table as Python dict
Default is False
pretty: bool
Format row names nicely for readability
Default is False
freq: str
"yearly" or "quarterly"
Def... | def get_income_stmt(self, proxy=None, as_dict=False, pretty=False, freq="yearly"):
"""
:Parameters:
as_dict: bool
Return table as Python dict
Default is False
pretty: bool
Format row names nicely for readability
Default is False
freq: str
... | (self, proxy=None, as_dict=False, pretty=False, freq='yearly') | [
0.004997751675546169,
-0.05282267928123474,
0.02618672139942646,
-0.04563489928841591,
-0.0025924667716026306,
0.01676212251186371,
-0.04058099538087845,
-0.02717878483235836,
-0.029967792332172394,
-0.06132072955369949,
0.0022976554464548826,
-0.007913107052445412,
-0.03313116356730461,
-... |
723,634 | yfinance.base | get_incomestmt | null | def get_incomestmt(self, proxy=None, as_dict=False, pretty=False, freq="yearly"):
return self.get_income_stmt(proxy, as_dict, pretty, freq)
| (self, proxy=None, as_dict=False, pretty=False, freq='yearly') | [
-0.0008526017190888524,
-0.06961697340011597,
0.05954896658658981,
-0.032025180757045746,
0.000029613547667395324,
0.017765041440725327,
-0.020496802404522896,
-0.05302022770047188,
0.002456867368891835,
-0.05009947717189789,
-0.0030603462364524603,
-0.0004351597453933209,
-0.012396012432873... |
723,635 | yfinance.base | get_info | null | def get_info(self, proxy=None) -> dict:
self._quote.proxy = proxy or self.proxy
data = self._quote.info
return data
| (self, proxy=None) -> dict | [
0.03149780258536339,
-0.014262664131820202,
0.009751803241670132,
-0.013862857595086098,
-0.005944949574768543,
0.008665372617542744,
0.037268925458192825,
0.011776911094784737,
0.05649440363049507,
-0.01399322971701622,
0.021520022302865982,
0.024666326120495796,
-0.007700622081756592,
-0... |
723,636 | yfinance.base | get_insider_purchases | null | def get_insider_purchases(self, proxy=None, as_dict=False):
self._holders.proxy = proxy or self.proxy
data = self._holders.insider_purchases
if data is not None:
if as_dict:
return data.to_dict()
return data
| (self, proxy=None, as_dict=False) | [
-0.02553439326584339,
-0.036941077560186386,
-0.021389784291386604,
-0.05928592383861542,
0.00723954988643527,
0.008901898749172688,
0.0012951901881024241,
0.007117914501577616,
0.04948302358388901,
-0.014325929805636406,
-0.021750185638666153,
0.012505905702710152,
-0.018884999677538872,
... |
723,637 | yfinance.base | get_insider_roster_holders | null | def get_insider_roster_holders(self, proxy=None, as_dict=False):
self._holders.proxy = proxy or self.proxy
data = self._holders.insider_roster
if data is not None:
if as_dict:
return data.to_dict()
return data
| (self, proxy=None, as_dict=False) | [
0.0017496789805591106,
-0.015773620456457138,
-0.02886086516082287,
-0.041992295533418655,
0.01848650723695755,
0.03398618847131729,
0.02534383535385132,
0.015649905428290367,
0.05012211576104164,
0.01947622373700142,
0.0003236464108340442,
-0.035011254251003265,
-0.02875482477247715,
0.02... |
723,638 | yfinance.base | get_insider_transactions | null | def get_insider_transactions(self, proxy=None, as_dict=False):
self._holders.proxy = proxy or self.proxy
data = self._holders.insider_transactions
if data is not None:
if as_dict:
return data.to_dict()
return data
| (self, proxy=None, as_dict=False) | [
-0.033725351095199585,
-0.03932851180434227,
0.03209405019879341,
-0.03805183991789818,
-0.01424727588891983,
0.013440491631627083,
-0.009610483422875404,
-0.0038721205200999975,
0.0440450944006443,
-0.020994119346141815,
0.011055602692067623,
-0.014575309120118618,
-0.026880983263254166,
... |
723,639 | yfinance.base | get_institutional_holders | null | def get_institutional_holders(self, proxy=None, as_dict=False):
self._holders.proxy = proxy or self.proxy
data = self._holders.institutional
if data is not None:
if as_dict:
return data.to_dict()
return data
| (self, proxy=None, as_dict=False) | [
0.009700937196612358,
-0.059794794768095016,
0.02055446058511734,
-0.003134686267003417,
-0.01101942639797926,
0.025339441373944283,
0.01634577289223671,
-0.07411481440067291,
0.05123771354556084,
0.011796548962593079,
-0.0058808112516999245,
0.006011786870658398,
-0.044252339750528336,
-0... |
723,640 | yfinance.base | get_isin | null | def get_isin(self, proxy=None) -> Optional[str]:
# *** experimental ***
if self._isin is not None:
return self._isin
ticker = self.ticker.upper()
if "-" in ticker or "^" in ticker:
self._isin = '-'
return self._isin
q = ticker
self._quote.proxy = proxy or self.proxy
i... | (self, proxy=None) -> Optional[str] | [
0.049872927367687225,
-0.08606982231140137,
0.03240625187754631,
0.01770823448896408,
-0.018562985584139824,
0.003888193052262068,
0.04894384741783142,
-0.016937099397182465,
0.0626198798418045,
-0.08859691023826599,
-0.017884759232401848,
-0.005300391931086779,
-0.06514697521924973,
-0.07... |
723,641 | yfinance.base | get_major_holders | null | def get_major_holders(self, proxy=None, as_dict=False):
self._holders.proxy = proxy or self.proxy
data = self._holders.major
if as_dict:
return data.to_dict()
return data
| (self, proxy=None, as_dict=False) | [
0.03253275156021118,
-0.03657946363091469,
-0.061354540288448334,
-0.006396988406777382,
0.03583727031946182,
0.04195152223110199,
0.012838155031204224,
0.012246168218553066,
0.04587453603744507,
-0.013050209730863571,
-0.003364162053912878,
-0.017397334799170494,
-0.06181399151682854,
-0.... |
723,642 | yfinance.base | get_mutualfund_holders | null | def get_mutualfund_holders(self, proxy=None, as_dict=False):
self._holders.proxy = proxy or self.proxy
data = self._holders.mutualfund
if data is not None:
if as_dict:
return data.to_dict()
return data
| (self, proxy=None, as_dict=False) | [
0.053184278309345245,
-0.01679692044854164,
-0.008532763458788395,
-0.010135455057024956,
-0.015767257660627365,
-0.002303309040144086,
-0.00865811388939619,
-0.029170770198106766,
0.032859645783901215,
0.03377291187644005,
0.0035523336846381426,
0.010663716122508049,
-0.03137335181236267,
... |
723,643 | yfinance.base | get_news | null | def get_news(self, proxy=None) -> list:
if self._news:
return self._news
# Getting data from json
url = f"{_BASE_URL_}/v1/finance/search?q={self.ticker}"
data = self._data.cache_get(url=url, proxy=proxy)
if "Will be right back" in data.text:
raise RuntimeError("*** YAHOO! FINANCE IS ... | (self, proxy=None) -> list | [
-0.04596376791596413,
-0.04254205897450447,
-0.012028890661895275,
-0.0174260176718235,
-0.016667596995830536,
0.043318115174770355,
-0.009312689304351807,
0.040496088564395905,
0.11259888112545013,
0.04317701607942581,
0.004850359167903662,
-0.009233320131897926,
-0.014198323711752892,
-0... |
723,644 | yfinance.base | get_recommendations |
Returns a DataFrame with the recommendations
Columns: period strongBuy buy hold sell strongSell
| def get_recommendations(self, proxy=None, as_dict=False):
"""
Returns a DataFrame with the recommendations
Columns: period strongBuy buy hold sell strongSell
"""
self._quote.proxy = proxy or self.proxy
data = self._quote.recommendations
if as_dict:
return data.to_dict()
retu... | (self, proxy=None, as_dict=False) | [
0.0054562813602387905,
-0.052450988441705704,
0.013890322297811508,
-0.05199151113629341,
0.00904814898967743,
0.04368559271097183,
-0.016929935663938522,
-0.016337918117642403,
0.038207221776247025,
0.03456675633788109,
0.022620372474193573,
0.017053639516234398,
-0.01283882837742567,
0.0... |
723,645 | yfinance.base | get_recommendations_summary | null | def get_recommendations_summary(self, proxy=None, as_dict=False):
return self.get_recommendations(proxy=proxy, as_dict=as_dict)
| (self, proxy=None, as_dict=False) | [
-0.029958469793200493,
-0.07216961681842804,
0.015568305738270283,
-0.03982120007276535,
0.06557202339172363,
0.03441857919096947,
0.022839125245809555,
-0.04500502720475197,
0.05352130904793739,
0.0422448068857193,
-0.008011366240680218,
0.027551693841814995,
-0.02585180290043354,
-0.0103... |
723,646 | yfinance.base | get_rev_forecast | null | def get_rev_forecast(self, proxy=None, as_dict=False):
self._analysis.proxy = proxy or self.proxy
data = self._analysis.rev_est
if as_dict:
return data.to_dict()
return data
| (self, proxy=None, as_dict=False) | [
0.03584672138094902,
0.009073165245354176,
-0.008893073536455631,
-0.017734693363308907,
0.013952778652310371,
-0.017288751900196075,
-0.05142031982541084,
0.057560570538043976,
0.09570559859275818,
-0.00040842106682248414,
0.014467324130237103,
0.028094222769141197,
-0.034646112471818924,
... |
723,647 | yfinance.base | get_shares | null | def get_shares(self, proxy=None, as_dict=False) -> Union[pd.DataFrame, dict]:
self._fundamentals.proxy = proxy or self.proxy
data = self._fundamentals.shares
if as_dict:
return data.to_dict()
return data
| (self, proxy=None, as_dict=False) -> Union[pandas.core.frame.DataFrame, dict] | [
0.019220763817429543,
-0.02739865332841873,
0.00914799515157938,
-0.030245501548051834,
-0.025059523060917854,
0.021686824038624763,
-0.025168320164084435,
0.029828447848558426,
0.0376436822116375,
0.01974661462008953,
0.009982103481888771,
0.0026201889850199223,
-0.03049936145544052,
-0.0... |
723,649 | yfinance.base | get_splits | null | def get_splits(self, proxy=None) -> pd.Series:
return self._lazy_load_price_history().get_splits(proxy)
| (self, proxy=None) -> pandas.core.series.Series | [
0.011005528271198273,
-0.020956534892320633,
-0.03655676543712616,
-0.006590763106942177,
-0.008812791667878628,
0.03068157099187374,
-0.0013589526060968637,
0.03997140750288963,
0.043754298239946365,
0.014244417659938335,
0.025291791185736656,
0.021140657365322113,
0.010946943424642086,
-... |
723,650 | yfinance.base | get_sustainability | null | def get_sustainability(self, proxy=None, as_dict=False):
self._quote.proxy = proxy or self.proxy
data = self._quote.sustainability
if as_dict:
return data.to_dict()
return data
| (self, proxy=None, as_dict=False) | [
-0.0019792800303548574,
0.0016816688003018498,
0.002582246670499444,
-0.04652027040719986,
0.03103121556341648,
0.02522503212094307,
-0.02577378787100315,
-0.00594779709354043,
0.06553197652101517,
-0.012568261474370956,
-0.028889300301671028,
0.031473759561777115,
-0.025844594463706017,
-... |
723,651 | yfinance.base | get_trend_details | null | def get_trend_details(self, proxy=None, as_dict=False):
self._analysis.proxy = proxy or self.proxy
data = self._analysis.analyst_trend_details
if as_dict:
return data.to_dict()
return data
| (self, proxy=None, as_dict=False) | [
-0.013309399597346783,
0.018813418224453926,
0.07700376212596893,
-0.02534123696386814,
0.029086420312523842,
0.00005571561268880032,
-0.012014336884021759,
0.019530953839421272,
0.0527125746011734,
-0.011078041046857834,
-0.00283732614479959,
-0.004917740356177092,
0.00529838353395462,
-0... |
723,652 | yfinance.base | get_upgrades_downgrades |
Returns a DataFrame with the recommendations changes (upgrades/downgrades)
Index: date of grade
Columns: firm toGrade fromGrade action
| def get_upgrades_downgrades(self, proxy=None, as_dict=False):
"""
Returns a DataFrame with the recommendations changes (upgrades/downgrades)
Index: date of grade
Columns: firm toGrade fromGrade action
"""
self._quote.proxy = proxy or self.proxy
data = self._quote.upgrades_downgrades
if a... | (self, proxy=None, as_dict=False) | [
0.026233192533254623,
-0.020907387137413025,
-0.006270417012274265,
-0.0018498629797250032,
-0.03334026411175728,
-0.04138295352458954,
-0.022328801453113556,
0.032584577798843384,
0.06430550664663315,
-0.008015697821974754,
0.023120475932955742,
-0.008802874013781548,
-0.005523724481463432,... |
723,654 | yfinance.ticker | option_chain | null | def option_chain(self, date=None, tz=None):
if date is None:
options = self._download_options()
else:
if not self._expirations:
self._download_options()
if date not in self._expirations:
raise ValueError(
f"Expiration `{date}` cannot be found. "
... | (self, date=None, tz=None) | [
0.030109357088804245,
-0.0037187032867223024,
0.018211305141448975,
-0.0077431765384972095,
-0.024047914892435074,
-0.05967911705374718,
-0.03575710952281952,
-0.02127799764275551,
0.0054588946513831615,
0.037483811378479004,
0.04082929342985153,
0.03662046045064926,
-0.009006726555526257,
... |
723,655 | yfinance.tickers | Tickers | null | class Tickers:
def __repr__(self):
return f"yfinance.Tickers object <{','.join(self.symbols)}>"
def __init__(self, tickers, session=None):
tickers = tickers if isinstance(
tickers, list) else tickers.replace(',', ' ').split()
self.symbols = [ticker.upper() for ticker in tic... | (tickers, session=None) | [
0.025867247954010963,
-0.03185146301984787,
-0.08949295431375504,
0.004111734218895435,
-0.019429391250014305,
-0.03596319630742073,
-0.06378013640642166,
0.04690851643681526,
0.010539937764406204,
-0.021465955302119255,
0.012508937157690525,
-0.009970472194254398,
-0.005810478702187538,
0... |
723,656 | yfinance.tickers | __init__ | null | def __init__(self, tickers, session=None):
tickers = tickers if isinstance(
tickers, list) else tickers.replace(',', ' ').split()
self.symbols = [ticker.upper() for ticker in tickers]
self.tickers = {ticker: Ticker(ticker, session=session) for ticker in self.symbols}
# self.tickers = _namedtuple... | (self, tickers, session=None) | [
0.033497150987386703,
-0.03813578188419342,
-0.05416014418005943,
-0.04176601395010948,
-0.04627630487084389,
-0.021341370418667793,
-0.04667966440320015,
0.055993594229221344,
0.026750050485134125,
0.0005099285626783967,
0.006825021468102932,
0.01750945672392845,
-0.005381178576499224,
0.... |
723,657 | yfinance.tickers | __repr__ | null | def __repr__(self):
return f"yfinance.Tickers object <{','.join(self.symbols)}>"
| (self) | [
0.012253775261342525,
-0.06297487765550613,
0.03886568546295166,
-0.0029032353777438402,
-0.0054124449379742146,
-0.04627856984734535,
-0.028283271938562393,
0.03869248554110527,
0.07405956834554672,
-0.020056355744600296,
0.020281514152884483,
-0.0599612295627594,
0.005919049493968487,
0.... |
723,658 | yfinance.tickers | download | null | def download(self, period="1mo", interval="1d",
start=None, end=None, prepost=False,
actions=True, auto_adjust=True, repair=False,
proxy=None,
threads=True, group_by='column', progress=True,
timeout=10, **kwargs):
data = multi.download(self.symbols,
... | (self, period='1mo', interval='1d', start=None, end=None, prepost=False, actions=True, auto_adjust=True, repair=False, proxy=None, threads=True, group_by='column', progress=True, timeout=10, **kwargs) | [
0.005378891248255968,
-0.013543115928769112,
-0.030556485056877136,
-0.03872070834040642,
-0.01804531179368496,
0.016081878915429115,
-0.0818248987197876,
-0.022794079035520554,
-0.04573427140712738,
0.011972370557487011,
-0.0077989352867007256,
-0.0725100114941597,
0.012045428156852722,
0... |
723,659 | yfinance.tickers | history | null | def history(self, period="1mo", interval="1d",
start=None, end=None, prepost=False,
actions=True, auto_adjust=True, repair=False,
proxy=None,
threads=True, group_by='column', progress=True,
timeout=10, **kwargs):
return self.download(
period, inter... | (self, period='1mo', interval='1d', start=None, end=None, prepost=False, actions=True, auto_adjust=True, repair=False, proxy=None, threads=True, group_by='column', progress=True, timeout=10, **kwargs) | [
-0.021283717826008797,
0.028615161776542664,
-0.04877229779958725,
-0.0656883493065834,
0.005957880988717079,
0.023224903270602226,
-0.07917265594005585,
0.005810558795928955,
-0.053971901535987854,
0.002214165171608329,
-0.024732789024710655,
-0.015477491542696953,
0.03806111216545105,
0.... |
723,660 | yfinance.tickers | news | null | def news(self):
return {ticker: [item for item in Ticker(ticker).news] for ticker in self.symbols}
| (self) | [
0.0419192910194397,
-0.038013990968465805,
-0.011312833987176418,
-0.043782372027635574,
-0.023342236876487732,
-0.013722297735512257,
-0.031152840703725815,
-0.009781167842447758,
0.11042329668998718,
0.04790264368057251,
0.0036365881096571684,
-0.04478556662797928,
0.006798448972404003,
... |
723,666 | yfinance.utils | enable_debug_mode | null | def enable_debug_mode():
get_yf_logger().setLevel(logging.DEBUG)
setup_debug_formatting()
| () | [
0.009746873751282692,
0.00891699269413948,
0.04217153042554855,
-0.006994715891778469,
0.03898749500513077,
-0.006033577490597963,
-0.05714327469468117,
0.008739161305129528,
-0.03715837001800537,
0.009298061020672321,
-0.047116950154304504,
-0.07201339304447174,
0.01796947605907917,
0.016... |
723,669 | yfinance | pdr_override |
make pandas datareader optional
otherwise can be called via fix_yahoo_finance.download(...)
| def pdr_override():
"""
make pandas datareader optional
otherwise can be called via fix_yahoo_finance.download(...)
"""
try:
import pandas_datareader
pandas_datareader.data.get_data_yahoo = download
pandas_datareader.data.get_data_yahoo_actions = download
pandas_datar... | () | [
-0.016982339322566986,
-0.01416249293833971,
0.009250358678400517,
0.055999238044023514,
-0.007564777974039316,
-0.008658371865749359,
-0.011469179764389992,
0.04612978175282478,
0.07100226730108261,
-0.021998411044478416,
0.03842943161725998,
-0.02734888717532158,
0.0010195955401286483,
0... |
723,671 | yfinance.cache | set_tz_cache_location | null | def set_tz_cache_location(cache_dir: str):
set_cache_location(cache_dir)
| (cache_dir: str) | [
0.004521857015788555,
0.03348347544670105,
0.007046073209494352,
-0.014986488036811352,
-0.02270122803747654,
0.014501704834401608,
-0.03854862228035927,
0.08057431131601334,
-0.03356705605983734,
-0.027465475723147392,
0.015203803777694702,
0.022216444835066795,
-0.019976411014795303,
0.0... |
723,680 | zappa | running_in_docker |
Determine if zappa is running in docker.
- When docker is used allow usage of any python version
| def running_in_docker() -> bool:
"""
Determine if zappa is running in docker.
- When docker is used allow usage of any python version
"""
# https://stackoverflow.com/questions/63116419
running_in_docker_flag = os.getenv("ZAPPA_RUNNING_IN_DOCKER", "False").lower() in {"y", "yes", "t", "true", "1"... | () -> bool | [
0.08994106203317642,
-0.09321826696395874,
0.013145231641829014,
0.01656808890402317,
0.057897280901670456,
0.017478425055742264,
-0.004961323458701372,
-0.029312774538993835,
-0.023887179791927338,
0.029676908627152443,
0.001488397130742669,
-0.007728740572929382,
-0.0067410278134047985,
... |
723,682 | inflector.languages.english | English |
Inflector for pluralize and singularize English nouns.
This is the default Inflector for the Inflector obj
| class English(Base):
"""
Inflector for pluralize and singularize English nouns.
This is the default Inflector for the Inflector obj
"""
def pluralize(self, word) :
'''Pluralizes English nouns.'''
rules = [
['(?i)(quiz)$' , '\\1zes'],
['(?i)^... | () | [
0.0019274302758276463,
-0.014241920784115791,
0.018495209515094757,
0.004037579521536827,
0.015906693413853645,
-0.05522170290350914,
0.0015607236418873072,
-0.07365600764751434,
0.046857237815856934,
-0.029478644952178,
-0.05091765895485878,
0.07609225809574127,
-0.01684059016406536,
-0.0... |
723,683 | inflector.languages.base | camelize | Returns given word as CamelCased
Converts a word like "send_email" to "SendEmail". It
will remove non alphanumeric character from the word, so
"who's online" will be converted to "WhoSOnline" | def camelize(self, word):
''' Returns given word as CamelCased
Converts a word like "send_email" to "SendEmail". It
will remove non alphanumeric character from the word, so
"who's online" will be converted to "WhoSOnline"'''
return ''.join(w[0].upper() + w[1:] for w in re.sub('[^A-Z^a-z^0-9^:]+', ' ... | (self, word) | [
-0.003118035616353154,
0.004271474201232195,
0.00031795757240615785,
-0.013663090765476227,
-0.03826040402054787,
-0.1008274257183075,
0.03452813997864723,
0.029745589941740036,
0.05105138570070267,
-0.043549343943595886,
-0.0322587750852108,
0.028376467525959015,
-0.042386528104543686,
0.... |
723,684 | inflector.languages.base | classify | Converts a table name to its class name according to rails
naming conventions. Example: Converts "people" to "Person" | def classify(self, table_name):
'''Converts a table name to its class name according to rails
naming conventions. Example: Converts "people" to "Person" '''
return self.camelize(self.singularize(table_name))
| (self, table_name) | [
-0.028195159509778023,
-0.0041817729361355305,
-0.00947472732514143,
-0.03314882144331932,
-0.03319971635937691,
-0.050622355192899704,
0.006039396394044161,
0.05628852918744087,
0.030078228563070297,
-0.02405579760670662,
-0.053981345146894455,
0.024479912593960762,
-0.00306635070592165,
... |
723,685 | inflector.languages.base | conditional_plural | Returns the plural form of a word if first parameter is greater than 1 | def conditional_plural(self, number_of_records, word):
'''Returns the plural form of a word if first parameter is greater than 1'''
if number_of_records > 1:
return self.pluralize(word)
else:
return word
| (self, number_of_records, word) | [
0.007187138311564922,
-0.0005919638788327575,
0.026502840220928192,
0.0004928568378090858,
-0.008897136896848679,
-0.01013142243027687,
0.01433999091386795,
0.005987138953059912,
0.013362848199903965,
-0.07817137986421585,
-0.019062845036387444,
0.053725678473711014,
0.005549996625632048,
... |
723,686 | inflector.languages.base | demodulize | null | def demodulize(self, module_name):
return self.humanize(self.underscore(re.sub('^.*::', '', module_name)))
| (self, module_name) | [
-0.012377576902508736,
0.007959400303661823,
0.04670405760407448,
-0.008452164940536022,
-0.004163442645221949,
-0.06795139610767365,
-0.008402053266763687,
0.062071628868579865,
0.01927627995610237,
-0.021581416949629784,
-0.040557026863098145,
-0.03325743228197098,
-0.00012560536561068147,... |
723,687 | inflector.languages.base | foreign_key | Returns class_name in underscored form, with "_id" tacked on at the end.
This is for use in dealing with the database. | def foreign_key(self, class_name, separate_class_name_and_id_with_underscore=1):
''' Returns class_name in underscored form, with "_id" tacked on at the end.
This is for use in dealing with the database.'''
if separate_class_name_and_id_with_underscore:
tail = '_id'
else:
tail = 'id'
... | (self, class_name, separate_class_name_and_id_with_underscore=1) | [
-0.047564491629600525,
-0.0017505413852632046,
0.024821529164910316,
0.06505908071994781,
0.0037132694851607084,
-0.04704485088586807,
0.04191772639751434,
0.05348840355873108,
0.06433158367872238,
-0.026363130658864975,
-0.067414790391922,
-0.056155893951654434,
0.05632910877466202,
-0.00... |
723,688 | inflector.languages.base | humanize | Returns a human-readable string from word
Returns a human-readable string from word, by replacing
underscores with a space, and by upper-casing the initial
character by default.
If you need to uppercase all the words you just have to
pass 'all' as a second parameter. | def humanize(self, word, uppercase=''):
'''Returns a human-readable string from word
Returns a human-readable string from word, by replacing
underscores with a space, and by upper-casing the initial
character by default.
If you need to uppercase all the words you just have to
pass 'all' as a sec... | (self, word, uppercase='') | [
-0.01134750060737133,
-0.019029544666409492,
0.005181311629712582,
-0.011544475331902504,
0.02380833961069584,
-0.07933829724788666,
0.07392575591802597,
-0.017119737342000008,
0.03819611296057701,
-0.04467061161994934,
-0.04833607003092766,
0.05909264460206032,
-0.028518622741103172,
0.00... |
723,689 | inflector.languages.base | modulize | null | def modulize(self, module_description):
return self.camelize(self.singularize(module_description))
| (self, module_description) | [
0.008852544240653515,
0.004002525005489588,
0.050581175833940506,
-0.0217831339687109,
0.020725863054394722,
-0.06880650669336319,
0.025592664256691933,
0.0668262243270874,
0.00047828914830461144,
-0.011839753948152065,
-0.049305737018585205,
0.0056681460700929165,
-0.002544582122936845,
0... |
723,690 | inflector.languages.base | ordinalize | Converts number to its ordinal English form.
This method converts 13 to 13th, 2 to 2nd ... | def ordinalize(self, number):
'''Converts number to its ordinal English form.
This method converts 13 to 13th, 2 to 2nd ...'''
tail = 'th'
if number % 100 == 11 or number % 100 == 12 or number % 100 == 13:
tail = 'th'
elif number % 10 == 1:
tail = 'st'
elif number % 10 == 2:
... | (self, number) | [
-0.053054921329021454,
0.05084285885095596,
-0.041476160287857056,
-0.015985602512955666,
0.02357228472828865,
-0.0131600396707654,
-0.015812786296010017,
0.0404738187789917,
-0.02125653252005577,
-0.09836762398481369,
0.024557342752814293,
0.011958959512412548,
0.03269704058766365,
-0.046... |
723,691 | inflector.languages.english | pluralize | Pluralizes English nouns. | def pluralize(self, word) :
'''Pluralizes English nouns.'''
rules = [
['(?i)(quiz)$' , '\\1zes'],
['(?i)^(ox)$' , '\\1en'],
['(?i)([m|l])ouse$' , '\\1ice'],
['(?i)(matr|vert|ind)ix|ex$' , '\\1ices'],
['(?i)(x|ch|ss|sh)$' , '\\1es'],
['(?i)([^aeiouy]|qu)ies$' ... | (self, word) | [
-0.00882712658494711,
-0.006563136819750071,
0.018189821392297745,
0.01762504130601883,
0.018608538433909416,
-0.04187164455652237,
-0.006826051976531744,
-0.05978881195187569,
0.044286567717790604,
-0.041754793375730515,
-0.04253380000591278,
0.0883394330739975,
-0.03501638025045395,
-0.0... |
723,692 | inflector.languages.english | singularize | Singularizes English nouns. | def singularize(self, word) :
'''Singularizes English nouns.'''
rules = [
['(?i)(quiz)zes$' , '\\1'],
['(?i)(matr)ices$' , '\\1ix'],
['(?i)(vert|ind)ices$' , '\\1ex'],
['(?i)^(ox)en' , '\\1'],
['(?i)(alias|status)es$' , '\\1'],
['(?i)([octop|vir])i$' , '\\1us... | (self, word) | [
-0.011104200035333633,
-0.005556969903409481,
0.03136449307203293,
0.00657485518604517,
0.015185480006039143,
-0.043988216668367386,
0.008508349768817425,
-0.0501052662730217,
0.07052140682935715,
-0.014357535168528557,
-0.0414167158305645,
0.08096325397491455,
-0.03695555776357651,
-0.014... |
723,693 | inflector.languages.base | string_replace | This function returns a copy of word, translating
all occurrences of each character in find to the
corresponding character in replace | def string_replace(self, word, find, replace):
'''This function returns a copy of word, translating
all occurrences of each character in find to the
corresponding character in replace'''
for k in range(0, len(find)):
word = re.sub(find[k], replace[k], word)
return word
| (self, word, find, replace) | [
0.029525328427553177,
-0.078959159553051,
0.008060882799327374,
0.02856926992535591,
-0.05661364272236824,
-0.05031490698456764,
0.000024183382265619002,
0.0011148154735565186,
0.05207705497741699,
-0.022158054634928703,
-0.011510191485285759,
0.027257032692432404,
-0.049190133810043335,
0... |
723,694 | inflector.languages.base | tableize | Converts a class name to its table name according to rails
naming conventions. Example. Converts "Person" to "people" | def tableize(self, class_name):
''' Converts a class name to its table name according to rails
naming conventions. Example. Converts "Person" to "people" '''
return self.pluralize(self.underscore(class_name))
| (self, class_name) | [
-0.04136219248175621,
-0.01786957122385502,
-0.008891663514077663,
-0.06192254647612572,
-0.02882244437932968,
-0.043880488723516464,
-0.005467812530696392,
0.031892698258161545,
0.03049555979669094,
-0.03413501754403114,
-0.06354391574859619,
-0.012143028900027275,
0.011168481782078743,
-... |
723,695 | inflector.languages.base | titleize | Converts an underscored or CamelCase word into a English sentence.
The titleize function converts text like "WelcomePage",
"welcome_page" or "welcome page" to this "Welcome Page".
If second parameter is set to 'first' it will only
capitalize the first character of the ti... | def titleize(self, word, uppercase=''):
'''Converts an underscored or CamelCase word into a English sentence.
The titleize function converts text like "WelcomePage",
"welcome_page" or "welcome page" to this "Welcome Page".
If second parameter is set to 'first' it will only
capitaliz... | (self, word, uppercase='') | [
-0.027050379663705826,
-0.016899755224585533,
-0.009845476597547531,
-0.005147111136466265,
0.02240137569606304,
-0.05833691731095314,
0.05919850990176201,
0.005905490834265947,
0.04885940998792648,
-0.04228977859020233,
-0.012421275489032269,
0.020175598561763763,
0.0012789247557520866,
-... |
723,696 | inflector.languages.base | unaccent | Transforms a string to its unaccented version.
This might be useful for generating "friendly" URLs | def unaccent(self, text):
'''Transforms a string to its unaccented version.
This might be useful for generating "friendly" URLs'''
# find = u'\u00C0\u00C1\u00C2\u00C3\u00C4\u00C5\u00C6\u00C7\u00C8\u00C9\u00CA\u00CB\u00CC\u00CD\u00CE\u00CF\u00D0\u00D1\u00D2\u00D3\u00D4\u00D5\u00D6\u00D8\u00D9\u00DA\u00DB\u00... | (self, text) | [
-0.04110732674598694,
-0.03516685962677002,
0.06842994689941406,
0.03009014017879963,
-0.01567084528505802,
-0.0575714111328125,
-0.01050598919391632,
-0.04699490964412689,
0.08630423247814178,
-0.012497896328568459,
0.006438443902879953,
0.03648892045021057,
-0.02284523844718933,
0.026194... |
723,697 | inflector.languages.base | underscore | Converts a word "into_it_s_underscored_version"
Convert any "CamelCased" or "ordinary Word" into an
"underscored_word".
This can be really useful for creating friendly URLs. | def underscore(self, word):
''' Converts a word "into_it_s_underscored_version"
Convert any "CamelCased" or "ordinary Word" into an
"underscored_word".
This can be really useful for creating friendly URLs.'''
return re.sub(r'[^A-Z^a-z^0-9^\/]+', '_', \
re.sub(r'([a-z\d])([A-Z])', '\\1_\... | (self, word) | [
-0.05036496743559837,
-0.005969021935015917,
0.006287026219069958,
0.04118582233786583,
-0.0036742358934134245,
-0.05813457816839218,
0.020971078425645828,
0.03671657666563988,
0.06903266161680222,
-0.018169203773140907,
-0.009394011460244656,
0.006256944499909878,
0.007180875167250633,
0.... |
723,698 | inflector.languages.base | urlize | Transform a string its unaccented and underscored
version ready to be inserted in friendly URLs | def urlize(self, text):
'''Transform a string its unaccented and underscored
version ready to be inserted in friendly URLs'''
return re.sub('^_|_$', '', self.underscore(self.unaccent(text)))
| (self, text) | [
-0.06793922185897827,
-0.034952763468027115,
0.03949560597538948,
0.033834006637334824,
-0.006572713144123554,
-0.0397329181432724,
0.0019027390517294407,
0.0033732298761606216,
0.05970108509063721,
-0.02407028339803219,
-0.028172403573989868,
0.023782119154930115,
-0.0028986046090722084,
... |
723,699 | inflector.languages.base | variablize | Same as camelize but first char is lowercased
Converts a word like "send_email" to "sendEmail". It
will remove non alphanumeric character from the word, so
"who's online" will be converted to "whoSOnline" | def variablize(self, word):
'''Same as camelize but first char is lowercased
Converts a word like "send_email" to "sendEmail". It
will remove non alphanumeric character from the word, so
"who's online" will be converted to "whoSOnline"'''
word = self.camelize(word)
return word[0].lower() + word[... | (self, word) | [
-0.009155120700597763,
0.016351304948329926,
0.008318770676851273,
-0.00033711150172166526,
-0.0075852880254387856,
-0.05828506872057915,
0.03293517604470253,
0.02704942412674427,
0.04665667563676834,
-0.042470455169677734,
-0.03298884630203247,
0.030645279213786125,
-0.03674571216106415,
... |
723,700 | inflector | Inflector |
Inflector for pluralizing and singularizing nouns.
It provides methods for helping on creating programs
based on naming conventions like on Ruby on Rails.
| class Inflector(object):
"""
Inflector for pluralizing and singularizing nouns.
It provides methods for helping on creating programs
based on naming conventions like on Ruby on Rails.
"""
def __init__(self, language =English):
assert callable(language), "language should be a callable o... | (language=<class 'inflector.languages.english.English'>) | [
-0.013520040549337864,
-0.03727548569440842,
-0.01058899238705635,
-0.0010322639718651772,
0.030557338148355484,
-0.060965798795223236,
0.009304914623498917,
0.025607123970985413,
0.02149435132741928,
-0.05385684221982956,
-0.0687447041273117,
0.008067360147833824,
0.03401876613497734,
0.0... |
723,701 | inflector | __init__ | null | def __init__(self, language =English):
assert callable(language), "language should be a callable obj"
self._language = language()
| (self, language=<class 'inflector.languages.english.English'>) | [
-0.003711102297529578,
-0.003662991337478161,
0.030126189813017845,
-0.005987624172121286,
-0.012578821741044521,
-0.012001490220427513,
-0.006788014899939299,
0.020871397107839584,
0.03352019935846329,
-0.030441097915172577,
0.02912898175418377,
0.036354370415210724,
-0.0008791179279796779,... |
723,702 | inflector | camelize | Returns given word as CamelCased.
Converts a word like "send_email" to "SendEmail". It
will remove non alphanumeric characters from the word, so
"who's online" will be converted to "WhoSOnline"
| def camelize(self, word):
'''Returns given word as CamelCased.
Converts a word like "send_email" to "SendEmail". It
will remove non alphanumeric characters from the word, so
"who's online" will be converted to "WhoSOnline"
'''
return self._language.camelize(word)
| (self, word) | [
-0.013856012374162674,
-0.006726530846208334,
0.01294937264174223,
-0.012088523246347904,
-0.025166107341647148,
-0.0772932842373848,
0.02696107141673565,
0.03450724110007286,
0.05465478077530861,
-0.06469191610813141,
-0.030111413449048996,
0.00004607604932971299,
-0.02177765779197216,
0.... |
723,703 | inflector | classify | Converts a table name to its class name according to rails
naming conventions. Example: Converts "people" to "Person"
| def classify(self, table_name):
'''Converts a table name to its class name according to rails
naming conventions. Example: Converts "people" to "Person"
'''
return self._language.classify(table_name)
| (self, table_name) | [
-0.021667031571269035,
-0.020685244351625443,
-0.003895410569384694,
-0.0313156321644783,
-0.02374909818172455,
-0.04231841862201691,
0.003027882892638445,
0.0478028878569603,
0.030147641897201538,
-0.031688034534454346,
-0.044789817184209824,
0.011273627169430256,
-0.016444938257336617,
-... |
723,704 | inflector | conditionalPlural | Deprecated, alias of #conditional_plural for backwards
compatibility.
| def conditionalPlural(self, number_of_records, word):
'''Deprecated, alias of #conditional_plural for backwards
compatibility.
'''
return self.conditional_plural(number_of_records, word)
| (self, number_of_records, word) | [
0.002499362686648965,
0.019017072394490242,
0.015889707952737808,
0.005146242678165436,
-0.018932778388261795,
-0.0048680673353374004,
0.012003684416413307,
0.00007230976916616783,
0.01457469817250967,
-0.08470015227794647,
-0.027834385633468628,
0.03188057243824005,
0.0073421411216259,
-0... |
723,705 | inflector | conditional_plural | Returns the plural form of a word if first parameter is
greater than 1.
| def conditional_plural(self, number_of_records, word):
'''Returns the plural form of a word if first parameter is
greater than 1.
'''
return self._language.conditional_plural(number_of_records, word)
| (self, number_of_records, word) | [
0.013303275220096111,
0.01579243689775467,
0.02978668175637722,
0.008949324488639832,
0.009873393923044205,
0.0005249923560768366,
0.004108364228159189,
-0.009065873920917511,
0.011030563153326511,
-0.07172779738903046,
-0.009024249389767647,
0.04968332126736641,
0.007338446099311113,
-0.0... |
723,706 | inflector | demodulize | null | def demodulize(self, module_name):
return self._language.demodulize(module_name)
| (self, module_name) | [
0.02666875533759594,
0.0258701890707016,
0.07965689152479172,
-0.04328889772295952,
-0.003926279488950968,
-0.04036082327365875,
-0.03783203288912773,
0.058761101216077805,
0.022226735949516296,
-0.01803426630795002,
-0.03329019248485565,
-0.028515437617897987,
-0.020180411636829376,
0.032... |
723,707 | inflector | foreignKey | Deprecated, alias of #foreign_key for backwards compatibility. | def foreignKey(self, class_name, separate_class_name_and_id_with_underscore=1):
'''Deprecated, alias of #foreign_key for backwards compatibility.'''
return self.foreign_key(class_name,
separate_class_name_and_id_with_underscore)
| (self, class_name, separate_class_name_and_id_with_underscore=1) | [
-0.03827713057398796,
-0.022868221625685692,
0.0017827494302764535,
0.061600614339113235,
-0.031010428443551064,
-0.06254616379737854,
0.0470321923494339,
0.06380689144134521,
0.08453887701034546,
-0.026247674599289894,
-0.057538267225027084,
-0.0743129625916481,
0.0789356380701065,
-0.002... |
723,708 | inflector | foreign_key | Returns class_name in underscored form, with "_id" tacked on at the end.
This is for use in dealing with the database.
| def foreign_key(self, class_name,
separate_class_name_and_id_with_underscore=1):
''' Returns class_name in underscored form, with "_id" tacked on at the end.
This is for use in dealing with the database.
'''
return self._language.foreign_key(
class_name,
separate_class_na... | (self, class_name, separate_class_name_and_id_with_underscore=1) | [
-0.055438436567783356,
-0.008273557759821415,
0.018330171704292297,
0.07435434311628342,
-0.0014751137932762504,
-0.04386148601770401,
0.038038551807403564,
0.06188156083226204,
0.07559473067522049,
-0.03082018718123436,
-0.05943524092435837,
-0.053819041699171066,
0.06587836146354675,
-0.... |
723,709 | inflector | humanize | Returns a human-readable string from word
Returns a human-readable string from word, by replacing
underscores with a space, and by upper-casing the initial
character by default.
If you need to uppercase all the words you just have to
pass 'all' as a second parameter.
| def humanize(self, word, uppercase=''):
'''Returns a human-readable string from word
Returns a human-readable string from word, by replacing
underscores with a space, and by upper-casing the initial
character by default.
If you need to uppercase all the words you just have to
pass 'all' as a sec... | (self, word, uppercase='') | [
-0.02525017037987709,
-0.035497862845659256,
-0.004626051057130098,
0.010745484381914139,
0.019534122198820114,
-0.07367350906133652,
0.0438402034342289,
-0.033609677106142044,
0.0412997342646122,
-0.05503198504447937,
-0.036459118127822876,
0.011131703853607178,
-0.017748931422829628,
-0.... |
723,710 | inflector | modulize | null | def modulize(self, module_description):
return self._language.modulize(module_description)
| (self, module_description) | [
0.040345046669244766,
-0.00008244394848588854,
0.061722155660390854,
-0.0028820920269936323,
0.056293047964572906,
-0.04957452788949013,
0.012147625908255577,
0.04977811872959137,
-0.010196540504693985,
-0.01881524734199047,
-0.036951854825019836,
-0.021139582619071007,
-0.008304836228489876... |
723,711 | inflector | ordinalize | Converts number to its ordinal form.
This method converts 13 to 13th, 2 to 2nd ...
| def ordinalize(self, number):
'''Converts number to its ordinal form.
This method converts 13 to 13th, 2 to 2nd ...
'''
return self._language.ordinalize(number)
| (self, number) | [
-0.0394459031522274,
0.038605913519859314,
-0.017060184851288795,
0.009340682066977024,
0.02825724519789219,
-0.00981947686523199,
-0.01980695128440857,
0.019202157855033875,
-0.007858101278543472,
-0.08877008408308029,
0.010676265694200993,
-0.018143771216273308,
0.046165820211172104,
-0.... |
723,712 | inflector | pluralize | Pluralizes nouns. | def pluralize(self, word):
'''Pluralizes nouns.'''
return self._language.pluralize(word)
| (self, word) | [
-0.02593686431646347,
-0.007463535293936729,
0.03440991789102554,
0.0266098752617836,
0.005612751003354788,
-0.022589057683944702,
0.008844073861837387,
-0.008775047026574612,
0.07378977537155151,
-0.05905252695083618,
-0.043279875069856644,
0.0038590359035879374,
0.002808532677590847,
-0.... |
723,713 | inflector | singularize | Singularizes nouns. | def singularize(self, word):
'''Singularizes nouns.'''
return self._language.singularize(word)
| (self, word) | [
-0.014429536648094654,
0.005240681581199169,
0.0479765459895134,
0.008270385675132275,
-0.0029798324685543776,
-0.022176269441843033,
0.01718910224735737,
0.001806809101253748,
0.10147222876548767,
0.00038001174107193947,
-0.03969785198569298,
0.012393110431730747,
-0.014155242592096329,
-... |
723,714 | inflector | tableize | Converts a class name to its table name according to rails
naming conventions. Example. Converts "Person" to "people".
| def tableize(self, class_name):
''' Converts a class name to its table name according to rails
naming conventions. Example. Converts "Person" to "people".
'''
return self._language.tableize(class_name)
| (self, class_name) | [
-0.02928871475160122,
-0.03288347274065018,
-0.009526107460260391,
-0.0742916539311409,
-0.034355610609054565,
-0.04406145587563515,
-0.0056745815090835094,
0.023537103086709976,
0.03296906128525734,
-0.03348259627819061,
-0.05008695274591446,
-0.029545482248067856,
0.004048381466418505,
-... |
723,715 | inflector | titleize | Converts an underscored or CamelCase word into a sentence.
The titleize function converts text like "WelcomePage",
"welcome_page" or "welcome page" to this "Welcome Page".
If the "uppercase" parameter is set to 'first' it will only
capitalize the first character of the title.
| def titleize(self, word, uppercase=''):
'''Converts an underscored or CamelCase word into a sentence.
The titleize function converts text like "WelcomePage",
"welcome_page" or "welcome page" to this "Welcome Page".
If the "uppercase" parameter is set to 'first' it will only
capitalize the first cha... | (self, word, uppercase='') | [
-0.036281101405620575,
-0.022689171135425568,
-0.003982291091233492,
-0.011308628134429455,
0.01866193301975727,
-0.046385154128074646,
0.05292941629886627,
0.0007865699590183794,
0.04156684875488281,
-0.04361642524600029,
-0.009110727347433567,
0.011614266782999039,
-0.011245702393352985,
... |
723,716 | inflector | unaccent | Transforms a string to its unaccented version.
This might be useful for generating "friendly" URLs | def unaccent(self, text):
'''Transforms a string to its unaccented version.
This might be useful for generating "friendly" URLs'''
return self._language.unaccent(text)
| (self, text) | [
-0.029764324426651,
-0.02109362743794918,
0.11094436794519424,
0.03135310858488083,
-0.02374723181128502,
-0.054322849959135056,
0.001154614146798849,
-0.04391125217080116,
0.08863379806280136,
-0.03464898839592934,
0.00048144132597371936,
0.014096221886575222,
-0.02665436640381813,
0.0056... |
723,717 | inflector | underscore | Converts a word "into_it_s_underscored_version"
Convert any "CamelCased" or "ordinary Word" into an
"underscored_word".
This can be really useful for creating friendly URLs.
| def underscore(self, word):
''' Converts a word "into_it_s_underscored_version"
Convert any "CamelCased" or "ordinary Word" into an
"underscored_word".
This can be really useful for creating friendly URLs.
'''
return self._language.underscore(word)
| (self, word) | [
-0.05066530033946037,
-0.0072987377643585205,
0.003828569548204541,
0.027390295639634132,
0.01294461265206337,
-0.03767852112650871,
0.006194018293172121,
0.030426165089011192,
0.07704363763332367,
-0.040410805493593216,
-0.012438634410500526,
-0.018029695376753807,
0.00871969386935234,
-0... |
723,718 | inflector | urlize | Transform a string its unaccented and underscored
version ready to be inserted in friendly URLs.
| def urlize(self, text):
'''Transform a string its unaccented and underscored
version ready to be inserted in friendly URLs.
'''
return self._language.urlize(text)
| (self, text) | [
-0.06377661228179932,
-0.04486238583922386,
0.0466461107134819,
0.018998362123966217,
0.0006594316218979657,
-0.03153492510318756,
0.00019430620886851102,
0.005540487822145224,
0.046444181352853775,
-0.03604472056031227,
-0.023945676162838936,
0.009372973814606667,
-0.003075244138017297,
0... |
723,719 | inflector | variablize | Same as camelize but first char is lowercased
Converts a word like "send_email" to "sendEmail". It
will remove non alphanumeric character from the word, so
"who's online" will be converted to "whoSOnline" | def variablize(self, word):
'''Same as camelize but first char is lowercased
Converts a word like "send_email" to "sendEmail". It
will remove non alphanumeric character from the word, so
"who's online" will be converted to "whoSOnline"'''
return self._language.variablize(word)
| (self, word) | [
0.0053525157272815704,
0.018202098086476326,
0.009809991344809532,
-0.007532513700425625,
0.004080850165337324,
-0.04406077414751053,
0.02477753907442093,
0.006947636138647795,
0.03931086137890816,
-0.04349362105131149,
-0.03509265184402466,
0.03452549874782562,
-0.04409622400999069,
-0.01... |
723,721 | plexapi.config | PlexConfig | PlexAPI configuration object. Settings are stored in an INI file within the
user's home directory and can be overridden after importing plexapi by simply
setting the value. See the documentation section 'Configuration' for more
details on available options.
Parameters:
path... | class PlexConfig(ConfigParser):
""" PlexAPI configuration object. Settings are stored in an INI file within the
user's home directory and can be overridden after importing plexapi by simply
setting the value. See the documentation section 'Configuration' for more
details on available options... | (path) | [
0.02113039791584015,
-0.04843708500266075,
0.006068672519177198,
-0.006321338936686516,
-0.000572885968722403,
0.042672548443078995,
-0.004208766855299473,
-0.009343978017568588,
0.004592445679008961,
-0.02382550574839115,
-0.017031585797667503,
-0.04866167530417442,
-0.02004486694931984,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.