body_hash stringlengths 64 64 | body stringlengths 23 109k | docstring stringlengths 1 57k | path stringlengths 4 198 | name stringlengths 1 115 | repository_name stringlengths 7 111 | repository_stars float64 0 191k | lang stringclasses 1
value | body_without_docstring stringlengths 14 108k | unified stringlengths 45 133k |
|---|---|---|---|---|---|---|---|---|---|
8b2a72c37cc0631288c4b7330601adb2515768997a12904d7315d3e286def0bd | def read_log(self):
'"Reads the players namne, and theirs point and upploads to log.txt'
import Intelligence
import Player
uploaded = 'Score uploaded'
self.Pn1 = Player.player.Player1nameR(self)
self.Pn2 = Player.player.Player2nameR(self)
self.S1 = Intelligence.Intelligence.takescores1(self)... | "Reads the players namne, and theirs point and upploads to log.txt | methoddice/HighScore.py | read_log | JohanK91/MethodDice | 0 | python | def read_log(self):
import Intelligence
import Player
uploaded = 'Score uploaded'
self.Pn1 = Player.player.Player1nameR(self)
self.Pn2 = Player.player.Player2nameR(self)
self.S1 = Intelligence.Intelligence.takescores1(self)
self.S2 = Intelligence.Intelligence.takescores2(self)
print... | def read_log(self):
import Intelligence
import Player
uploaded = 'Score uploaded'
self.Pn1 = Player.player.Player1nameR(self)
self.Pn2 = Player.player.Player2nameR(self)
self.S1 = Intelligence.Intelligence.takescores1(self)
self.S2 = Intelligence.Intelligence.takescores2(self)
print... |
fe332422030f33e893370a444d669136806f0aba2062c289984085adf69d12d9 | def load_transform_excel(path_to_file):
'\n Parameters\n ----------\n path_to_file : String\n Path to the excel-file\n\n Returns\n -------\n result_frame : List of Data Frames\n Returns a list where each Excel sheet becomes a Dataframe\n '
file = pd.ExcelFile(path_to_file)
... | Parameters
----------
path_to_file : String
Path to the excel-file
Returns
-------
result_frame : List of Data Frames
Returns a list where each Excel sheet becomes a Dataframe | timeseries/modules/load_transform_data.py | load_transform_excel | knschuckmann/Timeseries | 0 | python | def load_transform_excel(path_to_file):
'\n Parameters\n ----------\n path_to_file : String\n Path to the excel-file\n\n Returns\n -------\n result_frame : List of Data Frames\n Returns a list where each Excel sheet becomes a Dataframe\n '
file = pd.ExcelFile(path_to_file)
... | def load_transform_excel(path_to_file):
'\n Parameters\n ----------\n path_to_file : String\n Path to the excel-file\n\n Returns\n -------\n result_frame : List of Data Frames\n Returns a list where each Excel sheet becomes a Dataframe\n '
file = pd.ExcelFile(path_to_file)
... |
11a84e359cb16b64a47509500bed8b86b7c2d1ec62e7f6bc0c19634cd9d10c36 | def heatmap(data, row_labels, col_labels, ax=None, cbar_kw={}, cbarlabel='', **kwargs):
'\n Create a heatmap from a numpy array and two lists of labels.\n https://matplotlib.org/3.1.1/gallery/images_contours_and_fields/image_annotated_heatmap.html\n\n Parameters\n ----------\n data\n A 2D nump... | Create a heatmap from a numpy array and two lists of labels.
https://matplotlib.org/3.1.1/gallery/images_contours_and_fields/image_annotated_heatmap.html
Parameters
----------
data
A 2D numpy array of shape (N, M).
row_labels
A list or array of length N with the labels for the rows.
col_labels
A list or ar... | timeseries/modules/load_transform_data.py | heatmap | knschuckmann/Timeseries | 0 | python | def heatmap(data, row_labels, col_labels, ax=None, cbar_kw={}, cbarlabel=, **kwargs):
'\n Create a heatmap from a numpy array and two lists of labels.\n https://matplotlib.org/3.1.1/gallery/images_contours_and_fields/image_annotated_heatmap.html\n\n Parameters\n ----------\n data\n A 2D numpy ... | def heatmap(data, row_labels, col_labels, ax=None, cbar_kw={}, cbarlabel=, **kwargs):
'\n Create a heatmap from a numpy array and two lists of labels.\n https://matplotlib.org/3.1.1/gallery/images_contours_and_fields/image_annotated_heatmap.html\n\n Parameters\n ----------\n data\n A 2D numpy ... |
946c177dc7a029496afcfb3b2a401e5fceb87b108298acbd799d0a1718d321e1 | def PseudoalteromonasHaloplanktisAnt505(directed: bool=False, verbose: int=2, cache_path: str='graphs/string', **additional_graph_kwargs: Dict) -> EnsmallenGraph:
'Return new instance of the Pseudoalteromonas haloplanktis ANT505 graph.\n\n The graph is automatically retrieved from the STRING repository. \n\n\t\n... | Return new instance of the Pseudoalteromonas haloplanktis ANT505 graph.
The graph is automatically retrieved from the STRING repository.
Parameters
-------------------
directed: bool = False,
Wether to load the graph as directed or undirected.
By default false.
verbose: int = 2,
Wether to show load... | bindings/python/ensmallen_graph/datasets/string/pseudoalteromonashaloplanktisant505.py | PseudoalteromonasHaloplanktisAnt505 | caufieldjh/ensmallen_graph | 0 | python | def PseudoalteromonasHaloplanktisAnt505(directed: bool=False, verbose: int=2, cache_path: str='graphs/string', **additional_graph_kwargs: Dict) -> EnsmallenGraph:
'Return new instance of the Pseudoalteromonas haloplanktis ANT505 graph.\n\n The graph is automatically retrieved from the STRING repository. \n\n\t\n... | def PseudoalteromonasHaloplanktisAnt505(directed: bool=False, verbose: int=2, cache_path: str='graphs/string', **additional_graph_kwargs: Dict) -> EnsmallenGraph:
'Return new instance of the Pseudoalteromonas haloplanktis ANT505 graph.\n\n The graph is automatically retrieved from the STRING repository. \n\n\t\n... |
00771b2d1f3c78e1be657e6a2b3ad87e09f4aff90d8d44d9a40610943b620011 | def __init__(self, name: str, index: Optional[int]=0, label: Optional[str]=None, help: Optional[str]=None, default: Optional[bool]=None, required: Optional[bool]=False, group: Optional[str]=None):
'Initialize the base properties a Boolean parameter declaration.\n\n Parameters\n ----------\n nam... | Initialize the base properties a Boolean parameter declaration.
Parameters
----------
name: string
Unique parameter identifier
index: int, default=0
Index position of the parameter (for display purposes).
label: string, default=None
Human-readable parameter name.
help: string, default=None
Descriptive ... | flowserv/model/parameter/boolean.py | __init__ | anrunw/flowserv-core-1 | 1 | python | def __init__(self, name: str, index: Optional[int]=0, label: Optional[str]=None, help: Optional[str]=None, default: Optional[bool]=None, required: Optional[bool]=False, group: Optional[str]=None):
'Initialize the base properties a Boolean parameter declaration.\n\n Parameters\n ----------\n nam... | def __init__(self, name: str, index: Optional[int]=0, label: Optional[str]=None, help: Optional[str]=None, default: Optional[bool]=None, required: Optional[bool]=False, group: Optional[str]=None):
'Initialize the base properties a Boolean parameter declaration.\n\n Parameters\n ----------\n nam... |
4e8d1f1233356ca2a5f6553024739f46a55dead5b6e1969cfa7d6e3a45082136 | def cast(self, value: Any) -> Any:
"Convert the given value into a Boolean value. Converts string values\n to Boolean True if they match either of the string representations '1',\n 't' or 'true' (case-insensitive) and to False if the value is None or\n it matches '', '0', 'f' or 'false'. Raises... | Convert the given value into a Boolean value. Converts string values
to Boolean True if they match either of the string representations '1',
't' or 'true' (case-insensitive) and to False if the value is None or
it matches '', '0', 'f' or 'false'. Raises an error if a given value is
not a valid representation for a Bool... | flowserv/model/parameter/boolean.py | cast | anrunw/flowserv-core-1 | 1 | python | def cast(self, value: Any) -> Any:
"Convert the given value into a Boolean value. Converts string values\n to Boolean True if they match either of the string representations '1',\n 't' or 'true' (case-insensitive) and to False if the value is None or\n it matches , '0', 'f' or 'false'. Raises a... | def cast(self, value: Any) -> Any:
"Convert the given value into a Boolean value. Converts string values\n to Boolean True if they match either of the string representations '1',\n 't' or 'true' (case-insensitive) and to False if the value is None or\n it matches , '0', 'f' or 'false'. Raises a... |
7b62348650858191605d5b4815e954a16a7c73ddf143ea49f83fe1caaf61f7e8 | @staticmethod
def from_dict(doc: Dict, validate: Optional[bool]=True) -> Bool:
'Get Boolean parameter instance from a dictionary serialization.\n\n Parameters\n ----------\n doc: dict\n Dictionary serialization for a Boolean parameter declaration.\n validate: bool, default=Tru... | Get Boolean parameter instance from a dictionary serialization.
Parameters
----------
doc: dict
Dictionary serialization for a Boolean parameter declaration.
validate: bool, default=True
Validate the serialized object if True.
Returns
-------
flowserv.model.parameter.boolean.Bool
Raises
------
flowserv.error... | flowserv/model/parameter/boolean.py | from_dict | anrunw/flowserv-core-1 | 1 | python | @staticmethod
def from_dict(doc: Dict, validate: Optional[bool]=True) -> Bool:
'Get Boolean parameter instance from a dictionary serialization.\n\n Parameters\n ----------\n doc: dict\n Dictionary serialization for a Boolean parameter declaration.\n validate: bool, default=Tru... | @staticmethod
def from_dict(doc: Dict, validate: Optional[bool]=True) -> Bool:
'Get Boolean parameter instance from a dictionary serialization.\n\n Parameters\n ----------\n doc: dict\n Dictionary serialization for a Boolean parameter declaration.\n validate: bool, default=Tru... |
eed532aecbcbcc7a9bd3d8481e7dd93801c69cbe1f91c8966b0b07bcf11b918d | def __new__(cls, scheduler, host='127.0.0.1', port=Defaults.Port, framer=None, source_address=None, timeout=None, **kwargs):
'\n Scheduler to use:\n - reactor (Twisted)\n - io_loop (Tornado)\n - async_io (asyncio)\n :param scheduler: Backend to use\n :param host... | Scheduler to use:
- reactor (Twisted)
- io_loop (Tornado)
- async_io (asyncio)
:param scheduler: Backend to use
:param host: Host IP address
:param port: Port
:param framer: Modbus Framer to use
:param source_address: source address specific to underlying backend
:param timeout: Time out in seconds
:param k... | pymodbus/client/asynchronous/tcp.py | __new__ | julzhk/pymodbus | 1,125 | python | def __new__(cls, scheduler, host='127.0.0.1', port=Defaults.Port, framer=None, source_address=None, timeout=None, **kwargs):
'\n Scheduler to use:\n - reactor (Twisted)\n - io_loop (Tornado)\n - async_io (asyncio)\n :param scheduler: Backend to use\n :param host... | def __new__(cls, scheduler, host='127.0.0.1', port=Defaults.Port, framer=None, source_address=None, timeout=None, **kwargs):
'\n Scheduler to use:\n - reactor (Twisted)\n - io_loop (Tornado)\n - async_io (asyncio)\n :param scheduler: Backend to use\n :param host... |
3fa0fb0c877807d5486954894bfefc36465f14e573f66917f4f589379ee74904 | def scrape_site(self):
'\n Scrapes SNKRS site and adds items to array\n :return: None\n '
no_of_pages = (self.number_of_items // 50)
anchor = 0
while (no_of_pages != 0):
try:
html = rq.get(url=((self.url[0] + str(anchor)) + self.url[1]), timeout=5, verify=False, ... | Scrapes SNKRS site and adds items to array
:return: None | SNKRS/SNKRSMonitor.py | scrape_site | lamialifenojojo/Sneaker-Monitors | 1 | python | def scrape_site(self):
'\n Scrapes SNKRS site and adds items to array\n :return: None\n '
no_of_pages = (self.number_of_items // 50)
anchor = 0
while (no_of_pages != 0):
try:
html = rq.get(url=((self.url[0] + str(anchor)) + self.url[1]), timeout=5, verify=False, ... | def scrape_site(self):
'\n Scrapes SNKRS site and adds items to array\n :return: None\n '
no_of_pages = (self.number_of_items // 50)
anchor = 0
while (no_of_pages != 0):
try:
html = rq.get(url=((self.url[0] + str(anchor)) + self.url[1]), timeout=5, verify=False, ... |
d2257f1b427106354de9421cdd6a3f0f2ad864b780c67e3bbc34a1db300ec897 | def checker(self, product, colour):
'\n Determines whether the product status has changed\n :param product: Shoe name\n :param colour: Shoe colour\n :return: None\n '
for item in self.instock_copy:
if (item == [product, colour]):
self.instock_copy.remove([p... | Determines whether the product status has changed
:param product: Shoe name
:param colour: Shoe colour
:return: None | SNKRS/SNKRSMonitor.py | checker | lamialifenojojo/Sneaker-Monitors | 1 | python | def checker(self, product, colour):
'\n Determines whether the product status has changed\n :param product: Shoe name\n :param colour: Shoe colour\n :return: None\n '
for item in self.instock_copy:
if (item == [product, colour]):
self.instock_copy.remove([p... | def checker(self, product, colour):
'\n Determines whether the product status has changed\n :param product: Shoe name\n :param colour: Shoe colour\n :return: None\n '
for item in self.instock_copy:
if (item == [product, colour]):
self.instock_copy.remove([p... |
6e84762cd7cde7262d24f34a1993f9884a34693a77b0e83a873cfdf4e14dd4c3 | def discord_webhook(self, title, colour, slug, thumbnail):
'\n Sends a Discord webhook notification to the specified webhook URL\n :param title: Shoe name\n :param colour: Shoe Colour\n :param slug: Shoe URL\n :param thumbnail: URL to shoe image\n :return: None\n '
... | Sends a Discord webhook notification to the specified webhook URL
:param title: Shoe name
:param colour: Shoe Colour
:param slug: Shoe URL
:param thumbnail: URL to shoe image
:return: None | SNKRS/SNKRSMonitor.py | discord_webhook | lamialifenojojo/Sneaker-Monitors | 1 | python | def discord_webhook(self, title, colour, slug, thumbnail):
'\n Sends a Discord webhook notification to the specified webhook URL\n :param title: Shoe name\n :param colour: Shoe Colour\n :param slug: Shoe URL\n :param thumbnail: URL to shoe image\n :return: None\n '
... | def discord_webhook(self, title, colour, slug, thumbnail):
'\n Sends a Discord webhook notification to the specified webhook URL\n :param title: Shoe name\n :param colour: Shoe Colour\n :param slug: Shoe URL\n :param thumbnail: URL to shoe image\n :return: None\n '
... |
ca0e4cfbfc7cacc803ed650551aa1071dfaf98ede403f8c337b9b080de85fb83 | def monitor(self):
'\n Initiates the monitor\n :return: None\n '
print('STARTING MONITOR')
logging.info(msg='Successfully started monitor')
start = 1
while True:
self.scrape_site()
self.instock_copy = self.instock.copy()
for item in self.items:
... | Initiates the monitor
:return: None | SNKRS/SNKRSMonitor.py | monitor | lamialifenojojo/Sneaker-Monitors | 1 | python | def monitor(self):
'\n Initiates the monitor\n :return: None\n '
print('STARTING MONITOR')
logging.info(msg='Successfully started monitor')
start = 1
while True:
self.scrape_site()
self.instock_copy = self.instock.copy()
for item in self.items:
... | def monitor(self):
'\n Initiates the monitor\n :return: None\n '
print('STARTING MONITOR')
logging.info(msg='Successfully started monitor')
start = 1
while True:
self.scrape_site()
self.instock_copy = self.instock.copy()
for item in self.items:
... |
e3cbcb0876b4da5044002876652e21bebc8be28e4412a778cb8ab26df113c712 | def match_time_unit(val):
'match some val against time shortcut inputs '
match = re.match('^(\\d+(\\.\\d+)?)([m|h]?)$', val)
if match:
digit = float(match.group(1))
unit = match.group(3)
if (not unit):
return digit
elif (unit == 'm'):
return (digit * 6... | match some val against time shortcut inputs | scripts/automation/trex_control_plane/interactive/trex/utils/parsing_opts.py | match_time_unit | hazem-hamed/trex-core | 956 | python | def match_time_unit(val):
' '
match = re.match('^(\\d+(\\.\\d+)?)([m|h]?)$', val)
if match:
digit = float(match.group(1))
unit = match.group(3)
if (not unit):
return digit
elif (unit == 'm'):
return (digit * 60)
else:
return ((digit... | def match_time_unit(val):
' '
match = re.match('^(\\d+(\\.\\d+)?)([m|h]?)$', val)
if match:
digit = float(match.group(1))
unit = match.group(3)
if (not unit):
return digit
elif (unit == 'm'):
return (digit * 60)
else:
return ((digit... |
722e58cc032c45ca76dd65795286c2cf133f397a2a0b9998b21941d30c3a3ef0 | def match_multiplier(val):
'match some val against multiplier shortcut inputs '
result = decode_multiplier(val, allow_update=True)
if (not result):
raise argparse.ArgumentTypeError(match_multiplier_help)
return val | match some val against multiplier shortcut inputs | scripts/automation/trex_control_plane/interactive/trex/utils/parsing_opts.py | match_multiplier | hazem-hamed/trex-core | 956 | python | def match_multiplier(val):
' '
result = decode_multiplier(val, allow_update=True)
if (not result):
raise argparse.ArgumentTypeError(match_multiplier_help)
return val | def match_multiplier(val):
' '
result = decode_multiplier(val, allow_update=True)
if (not result):
raise argparse.ArgumentTypeError(match_multiplier_help)
return val<|docstring|>match some val against multiplier shortcut inputs<|endoftext|> |
8803aca4867505ed956d0b345ea153ea534f47df11337d7aa9e41eda773fa7a2 | def match_multiplier_strict(val):
'match some val against multiplier shortcut inputs '
result = decode_multiplier(val, allow_update=False)
if (not result):
raise argparse.ArgumentTypeError(match_multiplier_help)
return val | match some val against multiplier shortcut inputs | scripts/automation/trex_control_plane/interactive/trex/utils/parsing_opts.py | match_multiplier_strict | hazem-hamed/trex-core | 956 | python | def match_multiplier_strict(val):
' '
result = decode_multiplier(val, allow_update=False)
if (not result):
raise argparse.ArgumentTypeError(match_multiplier_help)
return val | def match_multiplier_strict(val):
' '
result = decode_multiplier(val, allow_update=False)
if (not result):
raise argparse.ArgumentTypeError(match_multiplier_help)
return val<|docstring|>match some val against multiplier shortcut inputs<|endoftext|> |
9d9586d17919a84ddd2facf2c543803ad16861f6587c569acebe9a97e77c2fdc | def pattern_score(data, dialect, eps=DEFAULT_EPS_PAT):
'\n Compute the pattern score for given data and a dialect.\n\n Parameters\n ----------\n\n data : string\n The data of the file as a raw character string\n\n dialect: dialect.Dialect\n The dialect object\n\n Returns\n -------... | Compute the pattern score for given data and a dialect.
Parameters
----------
data : string
The data of the file as a raw character string
dialect: dialect.Dialect
The dialect object
Returns
-------
score : float
the pattern score | clevercsv/detect_pattern.py | pattern_score | baldurmen/CleverCSV | 989 | python | def pattern_score(data, dialect, eps=DEFAULT_EPS_PAT):
'\n Compute the pattern score for given data and a dialect.\n\n Parameters\n ----------\n\n data : string\n The data of the file as a raw character string\n\n dialect: dialect.Dialect\n The dialect object\n\n Returns\n -------... | def pattern_score(data, dialect, eps=DEFAULT_EPS_PAT):
'\n Compute the pattern score for given data and a dialect.\n\n Parameters\n ----------\n\n data : string\n The data of the file as a raw character string\n\n dialect: dialect.Dialect\n The dialect object\n\n Returns\n -------... |
cbbf147add9e0938cf297a016f98c5c8e13b5fdc1cd9204bde32516fcc565e87 | def make_abstraction(data, dialect):
'Create an abstract representation of the CSV file based on the dialect.\n\n This function constructs the basic abstraction used to compute the row\n patterns.\n\n Parameters\n ----------\n data : str\n The data of the file as a string.\n\n dialect : Sim... | Create an abstract representation of the CSV file based on the dialect.
This function constructs the basic abstraction used to compute the row
patterns.
Parameters
----------
data : str
The data of the file as a string.
dialect : SimpleDialect
A dialect to parse the file with.
Returns
-------
abstraction : ... | clevercsv/detect_pattern.py | make_abstraction | baldurmen/CleverCSV | 989 | python | def make_abstraction(data, dialect):
'Create an abstract representation of the CSV file based on the dialect.\n\n This function constructs the basic abstraction used to compute the row\n patterns.\n\n Parameters\n ----------\n data : str\n The data of the file as a string.\n\n dialect : Sim... | def make_abstraction(data, dialect):
'Create an abstract representation of the CSV file based on the dialect.\n\n This function constructs the basic abstraction used to compute the row\n patterns.\n\n Parameters\n ----------\n data : str\n The data of the file as a string.\n\n dialect : Sim... |
ea294ae06f75ddda56ce5387255ed0165acec82e90aaffdb2485d312b0fc1e61 | def merge_with_quotechar(S, dialect):
'Merge quoted blocks in the abstraction\n\n This function takes the abstract representation and merges quoted blocks\n (``QC...CQ``) to a single cell (``C``). The function takes nested quotes\n into account.\n\n Parameters\n ----------\n S : str\n The d... | Merge quoted blocks in the abstraction
This function takes the abstract representation and merges quoted blocks
(``QC...CQ``) to a single cell (``C``). The function takes nested quotes
into account.
Parameters
----------
S : str
The data of a file as a string
dialect : SimpleDialect
The dialect used to make ... | clevercsv/detect_pattern.py | merge_with_quotechar | baldurmen/CleverCSV | 989 | python | def merge_with_quotechar(S, dialect):
'Merge quoted blocks in the abstraction\n\n This function takes the abstract representation and merges quoted blocks\n (``QC...CQ``) to a single cell (``C``). The function takes nested quotes\n into account.\n\n Parameters\n ----------\n S : str\n The d... | def merge_with_quotechar(S, dialect):
'Merge quoted blocks in the abstraction\n\n This function takes the abstract representation and merges quoted blocks\n (``QC...CQ``) to a single cell (``C``). The function takes nested quotes\n into account.\n\n Parameters\n ----------\n S : str\n The d... |
b8040091903e5c974e1939a187a3268a9cd389311a657f5cb693a1262f40cddf | def fill_empties(abstract):
'Fill empty cells in the abstraction\n\n The way the row patterns are constructed assumes that empty cells are\n marked by the letter `C` as well. This function fill those in. The function\n also removes duplicate occurrances of ``CC`` and replaces these with\n ``C``.\n\n ... | Fill empty cells in the abstraction
The way the row patterns are constructed assumes that empty cells are
marked by the letter `C` as well. This function fill those in. The function
also removes duplicate occurrances of ``CC`` and replaces these with
``C``.
Parameters
----------
abstract : str
The abstract repre... | clevercsv/detect_pattern.py | fill_empties | baldurmen/CleverCSV | 989 | python | def fill_empties(abstract):
'Fill empty cells in the abstraction\n\n The way the row patterns are constructed assumes that empty cells are\n marked by the letter `C` as well. This function fill those in. The function\n also removes duplicate occurrances of ``CC`` and replaces these with\n ``C``.\n\n ... | def fill_empties(abstract):
'Fill empty cells in the abstraction\n\n The way the row patterns are constructed assumes that empty cells are\n marked by the letter `C` as well. This function fill those in. The function\n also removes duplicate occurrances of ``CC`` and replaces these with\n ``C``.\n\n ... |
c07450e04ed81051e1d3646d4e177070d884b89a3d651c0cb88e307bb15e3dd3 | def strip_trailing(abstract):
'Strip trailing row separator from abstraction.'
while abstract.endswith('R'):
abstract = abstract[:(- 1)]
return abstract | Strip trailing row separator from abstraction. | clevercsv/detect_pattern.py | strip_trailing | baldurmen/CleverCSV | 989 | python | def strip_trailing(abstract):
while abstract.endswith('R'):
abstract = abstract[:(- 1)]
return abstract | def strip_trailing(abstract):
while abstract.endswith('R'):
abstract = abstract[:(- 1)]
return abstract<|docstring|>Strip trailing row separator from abstraction.<|endoftext|> |
b5c2c3434715b6cce83537ec8ca4f8d55324c63818adf95c778d4598be556448 | def main():
'\n parse top level CLI interface and invoke subcommands\n '
args = docopt(__doc__, version=version, options_first=True)
call_main = methodcaller('main')
if (args['<command>'] in MODULES):
sub_cmd = import_module(('dxmini.%s' % args['<command>']))
call_main(sub_cmd)
... | parse top level CLI interface and invoke subcommands | dxmini/cli.py | main | jondkelley/dxmini-update_agent | 0 | python | def main():
'\n \n '
args = docopt(__doc__, version=version, options_first=True)
call_main = methodcaller('main')
if (args['<command>'] in MODULES):
sub_cmd = import_module(('dxmini.%s' % args['<command>']))
call_main(sub_cmd)
elif (args['<command>'] == 'help'):
if ((le... | def main():
'\n \n '
args = docopt(__doc__, version=version, options_first=True)
call_main = methodcaller('main')
if (args['<command>'] in MODULES):
sub_cmd = import_module(('dxmini.%s' % args['<command>']))
call_main(sub_cmd)
elif (args['<command>'] == 'help'):
if ((le... |
6f2b5cc0ccf20df37b931689b7d08b7de8e4111a521ada2c35f976245f9e9243 | def statistics(diagram, k_max=None, quantity='persistence', statistics=['mean', 'sum'], f='linear', **kwargs):
"\n Return an i x k x n array of statistics of specified quantities of\n k-dimensional persistence diagram.\n\n Parameters\n ----------\n diagram: list of ndarrays\n list of arrays of... | Return an i x k x n array of statistics of specified quantities of
k-dimensional persistence diagram.
Parameters
----------
diagram: list of ndarrays
list of arrays of k-dimensional persistence diagram
k_max: int, optional
quantity: {'persistence', 'midlife', or 'multlife'}, optional
statistics: ['min', 'max', 'su... | diagram2vec/diagram2vec.py | statistics | Maxik-lun/diagram2vec | 3 | python | def statistics(diagram, k_max=None, quantity='persistence', statistics=['mean', 'sum'], f='linear', **kwargs):
"\n Return an i x k x n array of statistics of specified quantities of\n k-dimensional persistence diagram.\n\n Parameters\n ----------\n diagram: list of ndarrays\n list of arrays of... | def statistics(diagram, k_max=None, quantity='persistence', statistics=['mean', 'sum'], f='linear', **kwargs):
"\n Return an i x k x n array of statistics of specified quantities of\n k-dimensional persistence diagram.\n\n Parameters\n ----------\n diagram: list of ndarrays\n list of arrays of... |
6814209a85d22dafa87c20e0fbf12fdded19c41518cc0ed05c84ded8275ad59f | def euler_curve(diagram, m=101, k_max=None, f='linear', **kwargs):
"\n Return an m-dimensional array of Euler characteristic up to dimension k_max.\n\n Parameters\n ----------\n diagram: list of ndarrays\n list of arrays of k-dimensional persistence diagram\n m: int or list of floats or ndarra... | Return an m-dimensional array of Euler characteristic up to dimension k_max.
Parameters
----------
diagram: list of ndarrays
list of arrays of k-dimensional persistence diagram
m: int or list of floats or ndarray of floats, optional
k_max: int, optional
f: {'linear'}, optional
confidence interval function
a: f... | diagram2vec/diagram2vec.py | euler_curve | Maxik-lun/diagram2vec | 3 | python | def euler_curve(diagram, m=101, k_max=None, f='linear', **kwargs):
"\n Return an m-dimensional array of Euler characteristic up to dimension k_max.\n\n Parameters\n ----------\n diagram: list of ndarrays\n list of arrays of k-dimensional persistence diagram\n m: int or list of floats or ndarra... | def euler_curve(diagram, m=101, k_max=None, f='linear', **kwargs):
"\n Return an m-dimensional array of Euler characteristic up to dimension k_max.\n\n Parameters\n ----------\n diagram: list of ndarrays\n list of arrays of k-dimensional persistence diagram\n m: int or list of floats or ndarra... |
5807a35ed257b7d302dbd5bbba79d1dfaaca8bebd5ade2af7add957aa32a4e41 | def persistence_curve(diagram, m=101, k_max=None, quantity='betti', f='linear', **kwargs):
'\n Return an (k x m)-dimensional array of specified quantity up to dimension k=k_max.\n '
return _curve(diagram, m, k_max, 'persistence', quantity, f, **kwargs) | Return an (k x m)-dimensional array of specified quantity up to dimension k=k_max. | diagram2vec/diagram2vec.py | persistence_curve | Maxik-lun/diagram2vec | 3 | python | def persistence_curve(diagram, m=101, k_max=None, quantity='betti', f='linear', **kwargs):
'\n \n '
return _curve(diagram, m, k_max, 'persistence', quantity, f, **kwargs) | def persistence_curve(diagram, m=101, k_max=None, quantity='betti', f='linear', **kwargs):
'\n \n '
return _curve(diagram, m, k_max, 'persistence', quantity, f, **kwargs)<|docstring|>Return an (k x m)-dimensional array of specified quantity up to dimension k=k_max.<|endoftext|> |
f1f77edfa1598b251833c20ed6c41ac65d712922600ecfdfc686bf49848540e6 | def entropy_curve(diagram, m=101, k_max=None, quantity='persistence', f='linear', **kwargs):
'\n Return an (k x m)-dimensional array of a entropy of specified quantity up to dimension k=k_max.\n '
return _curve(diagram, m, k_max, 'entropy', quantity, f, **kwargs) | Return an (k x m)-dimensional array of a entropy of specified quantity up to dimension k=k_max. | diagram2vec/diagram2vec.py | entropy_curve | Maxik-lun/diagram2vec | 3 | python | def entropy_curve(diagram, m=101, k_max=None, quantity='persistence', f='linear', **kwargs):
'\n \n '
return _curve(diagram, m, k_max, 'entropy', quantity, f, **kwargs) | def entropy_curve(diagram, m=101, k_max=None, quantity='persistence', f='linear', **kwargs):
'\n \n '
return _curve(diagram, m, k_max, 'entropy', quantity, f, **kwargs)<|docstring|>Return an (k x m)-dimensional array of a entropy of specified quantity up to dimension k=k_max.<|endoftext|> |
044aa8ef46b85d4c8857c1b4ddbf2ec0c2cc05f84d3566159ae126fc8abe5721 | def get_fields(self, request, obj=None):
"\n Use to move 'is_active' field to last position\n :param request:\n :param obj:\n :return:\n "
fields = super().get_fields(request, obj)
fields = [field for field in fields if (field != 'is_active')]
fields.append('is_active'... | Use to move 'is_active' field to last position
:param request:
:param obj:
:return: | exo/studio/figures/admin.py | get_fields | moas/sketchbadges | 0 | python | def get_fields(self, request, obj=None):
"\n Use to move 'is_active' field to last position\n :param request:\n :param obj:\n :return:\n "
fields = super().get_fields(request, obj)
fields = [field for field in fields if (field != 'is_active')]
fields.append('is_active'... | def get_fields(self, request, obj=None):
"\n Use to move 'is_active' field to last position\n :param request:\n :param obj:\n :return:\n "
fields = super().get_fields(request, obj)
fields = [field for field in fields if (field != 'is_active')]
fields.append('is_active'... |
1719a90a5b8e8c5a116bd606d105e15c06470ffee132db1d60a95a8e2b358196 | @abc.abstractmethod
def train(self, examples):
'Perform any training steps using the (context, response) examples.\n\n Args:\n examples: a list of `(context, response)` string tuples, containing\n examples that can be used to set the parameters of this method.\n '
pass | Perform any training steps using the (context, response) examples.
Args:
examples: a list of `(context, response)` string tuples, containing
examples that can be used to set the parameters of this method. | baselines/method.py | train | nadavo/conversational-datasets | 1,017 | python | @abc.abstractmethod
def train(self, examples):
'Perform any training steps using the (context, response) examples.\n\n Args:\n examples: a list of `(context, response)` string tuples, containing\n examples that can be used to set the parameters of this method.\n '
pass | @abc.abstractmethod
def train(self, examples):
'Perform any training steps using the (context, response) examples.\n\n Args:\n examples: a list of `(context, response)` string tuples, containing\n examples that can be used to set the parameters of this method.\n '
pass<|d... |
09988581f567ad2d691bc10549dfc0080b6b05a3e8473e583bfd990d3e4889d9 | @abc.abstractmethod
def rank_responses(self, contexts, responses):
'Rank the responses for each context.\n\n Args:\n contexts: a list of strings giving the contexts to use.\n responses: a list of responses to rank, of the same length\n as `contexts`. These are shuffled, t... | Rank the responses for each context.
Args:
contexts: a list of strings giving the contexts to use.
responses: a list of responses to rank, of the same length
as `contexts`. These are shuffled, to help avoid cheating.
Returns:
predictions: a list of integers, giving the predictions indices
... | baselines/method.py | rank_responses | nadavo/conversational-datasets | 1,017 | python | @abc.abstractmethod
def rank_responses(self, contexts, responses):
'Rank the responses for each context.\n\n Args:\n contexts: a list of strings giving the contexts to use.\n responses: a list of responses to rank, of the same length\n as `contexts`. These are shuffled, t... | @abc.abstractmethod
def rank_responses(self, contexts, responses):
'Rank the responses for each context.\n\n Args:\n contexts: a list of strings giving the contexts to use.\n responses: a list of responses to rank, of the same length\n as `contexts`. These are shuffled, t... |
a798f719bfe0ca9e579019e822897076d47fdf8c89e7d846bfb11a35a7d462dc | async def request(self, method, url, headers={}, data={}):
'This function is a coroutine\n\n Parameters\n ---------\n method: `str`\n The request method to use\n \n url: `str`\n The GBL path url\n\n headers: Optional[`dict`]\n Headers to pas... | This function is a coroutine
Parameters
---------
method: `str`
The request method to use
url: `str`
The GBL path url
headers: Optional[`dict`]
Headers to pass to the request
data: Optional[`dict`]
Data to pass to the request | glennbotlist/GBL.py | request | A-Trash-Coder/GBLPYAPI | 3 | python | async def request(self, method, url, headers={}, data={}):
'This function is a coroutine\n\n Parameters\n ---------\n method: `str`\n The request method to use\n \n url: `str`\n The GBL path url\n\n headers: Optional[`dict`]\n Headers to pas... | async def request(self, method, url, headers={}, data={}):
'This function is a coroutine\n\n Parameters\n ---------\n method: `str`\n The request method to use\n \n url: `str`\n The GBL path url\n\n headers: Optional[`dict`]\n Headers to pas... |
9d9fe9dd52f2322fe9b2bff847c5b0fd933d48e687915d0f16ec32c0b88d726a | async def post_guild_count(self):
'This function is a coroutine.\n\n Parameters\n ----------\n None\n\n Returns\n -------\n str\n Returns a success message\n\n Raises\n ------\n glennbotlist.NoKey\n Raised when self.token is None\n... | This function is a coroutine.
Parameters
----------
None
Returns
-------
str
Returns a success message
Raises
------
glennbotlist.NoKey
Raised when self.token is None | glennbotlist/GBL.py | post_guild_count | A-Trash-Coder/GBLPYAPI | 3 | python | async def post_guild_count(self):
'This function is a coroutine.\n\n Parameters\n ----------\n None\n\n Returns\n -------\n str\n Returns a success message\n\n Raises\n ------\n glennbotlist.NoKey\n Raised when self.token is None\n... | async def post_guild_count(self):
'This function is a coroutine.\n\n Parameters\n ----------\n None\n\n Returns\n -------\n str\n Returns a success message\n\n Raises\n ------\n glennbotlist.NoKey\n Raised when self.token is None\n... |
8e450ee505360c7d612ed4269a8bc2c5a8417834485847e41a0da10567aebb03 | async def fetch_bot_stats(self, bot_id):
'This function is a coroutine.\n\n Parameters\n ----------\n bot_id: `int`\n Bot to get info on\n\n Returns\n -------\n glennbotlist.Bot\n A Bot class\n \n Raises\n ------\n None\... | This function is a coroutine.
Parameters
----------
bot_id: `int`
Bot to get info on
Returns
-------
glennbotlist.Bot
A Bot class
Raises
------
None | glennbotlist/GBL.py | fetch_bot_stats | A-Trash-Coder/GBLPYAPI | 3 | python | async def fetch_bot_stats(self, bot_id):
'This function is a coroutine.\n\n Parameters\n ----------\n bot_id: `int`\n Bot to get info on\n\n Returns\n -------\n glennbotlist.Bot\n A Bot class\n \n Raises\n ------\n None\... | async def fetch_bot_stats(self, bot_id):
'This function is a coroutine.\n\n Parameters\n ----------\n bot_id: `int`\n Bot to get info on\n\n Returns\n -------\n glennbotlist.Bot\n A Bot class\n \n Raises\n ------\n None\... |
acc4e715ec6e65bc8e0c4a0637b0e4e45bea885b997642f3f5342e8a79c23bf9 | async def fetch_bot_votes(self):
'This function is a coroutine.\n \n Requires authorization\n\n Parameters\n ----------\n None\n\n Returns\n -------\n dict\n Dictionary of bot votes\n\n Raises\n ------\n glennbotlist.Not200\n ... | This function is a coroutine.
Requires authorization
Parameters
----------
None
Returns
-------
dict
Dictionary of bot votes
Raises
------
glennbotlist.Not200
Http status code of the request was not 200 | glennbotlist/GBL.py | fetch_bot_votes | A-Trash-Coder/GBLPYAPI | 3 | python | async def fetch_bot_votes(self):
'This function is a coroutine.\n \n Requires authorization\n\n Parameters\n ----------\n None\n\n Returns\n -------\n dict\n Dictionary of bot votes\n\n Raises\n ------\n glennbotlist.Not200\n ... | async def fetch_bot_votes(self):
'This function is a coroutine.\n \n Requires authorization\n\n Parameters\n ----------\n None\n\n Returns\n -------\n dict\n Dictionary of bot votes\n\n Raises\n ------\n glennbotlist.Not200\n ... |
d36c8e62218d793506cfc6dd3137faf16a7a3367c0ce5ce04540db367050faf3 | async def fetch_user_info(self, user_id: int):
'This function is a coroutine.\n\n Parameters\n ----------\n user_id: `int`\n ID of the user you wish to get information on\n\n Returns\n ------\n dict\n Dictionary of user information\n\n Raises\n ... | This function is a coroutine.
Parameters
----------
user_id: `int`
ID of the user you wish to get information on
Returns
------
dict
Dictionary of user information
Raises
------
glennbotlist.Not200
This is usually raised when the user is not registered on the list | glennbotlist/GBL.py | fetch_user_info | A-Trash-Coder/GBLPYAPI | 3 | python | async def fetch_user_info(self, user_id: int):
'This function is a coroutine.\n\n Parameters\n ----------\n user_id: `int`\n ID of the user you wish to get information on\n\n Returns\n ------\n dict\n Dictionary of user information\n\n Raises\n ... | async def fetch_user_info(self, user_id: int):
'This function is a coroutine.\n\n Parameters\n ----------\n user_id: `int`\n ID of the user you wish to get information on\n\n Returns\n ------\n dict\n Dictionary of user information\n\n Raises\n ... |
28bfeea00f022002743460fa362ca41829d57ae8f92fa74eef020509bd314000 | async def fetch_has_voted(self, user_id: int):
'This function is a coroutine.\n\n Requires authorization\n\n Parameters\n ----------\n user_id: `int`\n ID of the user to get whether they have voted\n\n Returns\n ------\n boolean\n Whether the us... | This function is a coroutine.
Requires authorization
Parameters
----------
user_id: `int`
ID of the user to get whether they have voted
Returns
------
boolean
Whether the user has voted for the bot
Raises
------
glennbotlist.NoKey
Raised when self.token is None | glennbotlist/GBL.py | fetch_has_voted | A-Trash-Coder/GBLPYAPI | 3 | python | async def fetch_has_voted(self, user_id: int):
'This function is a coroutine.\n\n Requires authorization\n\n Parameters\n ----------\n user_id: `int`\n ID of the user to get whether they have voted\n\n Returns\n ------\n boolean\n Whether the us... | async def fetch_has_voted(self, user_id: int):
'This function is a coroutine.\n\n Requires authorization\n\n Parameters\n ----------\n user_id: `int`\n ID of the user to get whether they have voted\n\n Returns\n ------\n boolean\n Whether the us... |
1f614a7c15b149e783eec6cf4842fe0736b92b328cc750a66c890964249d88bd | async def fetch_vote_count(self):
'This function is a coroutine.\n \n Requires authorization\n\n Parameters\n ----------\n None\n\n Returns\n -------\n int\n Amount of votes the bot has received\n\n Raises\n ------\n glennbotlis... | This function is a coroutine.
Requires authorization
Parameters
----------
None
Returns
-------
int
Amount of votes the bot has received
Raises
------
glennbotlist.NoKey
Raised when self.token is None | glennbotlist/GBL.py | fetch_vote_count | A-Trash-Coder/GBLPYAPI | 3 | python | async def fetch_vote_count(self):
'This function is a coroutine.\n \n Requires authorization\n\n Parameters\n ----------\n None\n\n Returns\n -------\n int\n Amount of votes the bot has received\n\n Raises\n ------\n glennbotlis... | async def fetch_vote_count(self):
'This function is a coroutine.\n \n Requires authorization\n\n Parameters\n ----------\n None\n\n Returns\n -------\n int\n Amount of votes the bot has received\n\n Raises\n ------\n glennbotlis... |
dddd698f5902f781b7f97a5b3d0d8ca86e5f7e5022203dce01a4ca3e2e9f4dd6 | def get_market_status(self, market=Market.ALL, lang=None):
'\n 获取市场状态\n :param market: US 美股,HK 港股, CN A股,ALL 所有\n :param lang: 语言支持: zh_CN,zh_TW,en_US\n :return: MarketStatus 对象构成的列表. MarketStatus 对象有如下属性:\n market: 字符串,市场名称\n status: 字符串,当前市场所处的状态\n ope... | 获取市场状态
:param market: US 美股,HK 港股, CN A股,ALL 所有
:param lang: 语言支持: zh_CN,zh_TW,en_US
:return: MarketStatus 对象构成的列表. MarketStatus 对象有如下属性:
market: 字符串,市场名称
status: 字符串,当前市场所处的状态
open_time: 带 tzinfo 的 datetime 对象,表示最近的开盘、交易时间 | venv/lib/python3.7/site-packages/tigeropen/quote/quote_client.py | get_market_status | CatTiger/vnpy | 0 | python | def get_market_status(self, market=Market.ALL, lang=None):
'\n 获取市场状态\n :param market: US 美股,HK 港股, CN A股,ALL 所有\n :param lang: 语言支持: zh_CN,zh_TW,en_US\n :return: MarketStatus 对象构成的列表. MarketStatus 对象有如下属性:\n market: 字符串,市场名称\n status: 字符串,当前市场所处的状态\n ope... | def get_market_status(self, market=Market.ALL, lang=None):
'\n 获取市场状态\n :param market: US 美股,HK 港股, CN A股,ALL 所有\n :param lang: 语言支持: zh_CN,zh_TW,en_US\n :return: MarketStatus 对象构成的列表. MarketStatus 对象有如下属性:\n market: 字符串,市场名称\n status: 字符串,当前市场所处的状态\n ope... |
27753bc80e716d80b10e6732b5e74b30cc8f24cc90eea70eca9b634f39fe5dd3 | def get_symbols(self, market=Market.ALL):
'\n 获取股票代号列表\n :param market: US 美股,HK 港股, CN A股,ALL 所有\n :return: 所有 symbol 的列表,包含退市和不可交易的部分代码. 其中以.开头的代码为指数, 如 .DJI 表示道琼斯指数\n '
params = MarketParams()
params.market = market.value
request = OpenApiRequest(ALL_SYMBOLS, biz_model=par... | 获取股票代号列表
:param market: US 美股,HK 港股, CN A股,ALL 所有
:return: 所有 symbol 的列表,包含退市和不可交易的部分代码. 其中以.开头的代码为指数, 如 .DJI 表示道琼斯指数 | venv/lib/python3.7/site-packages/tigeropen/quote/quote_client.py | get_symbols | CatTiger/vnpy | 0 | python | def get_symbols(self, market=Market.ALL):
'\n 获取股票代号列表\n :param market: US 美股,HK 港股, CN A股,ALL 所有\n :return: 所有 symbol 的列表,包含退市和不可交易的部分代码. 其中以.开头的代码为指数, 如 .DJI 表示道琼斯指数\n '
params = MarketParams()
params.market = market.value
request = OpenApiRequest(ALL_SYMBOLS, biz_model=par... | def get_symbols(self, market=Market.ALL):
'\n 获取股票代号列表\n :param market: US 美股,HK 港股, CN A股,ALL 所有\n :return: 所有 symbol 的列表,包含退市和不可交易的部分代码. 其中以.开头的代码为指数, 如 .DJI 表示道琼斯指数\n '
params = MarketParams()
params.market = market.value
request = OpenApiRequest(ALL_SYMBOLS, biz_model=par... |
c1f02931f2c8e7999d4ae3528aa826672792a798accf412ae390a6496a8773ce | def get_symbol_names(self, market=Market.ALL, lang=None):
'\n 获取股票代号列表和名称\n :param market: US 美股,HK 港股, CN A股,ALL 所有\n :param lang: 语言支持: zh_CN,zh_TW,en_US\n :return: list, list 中的每个对象是一个 tuple. tuple 的第一个元素是 symbol,第二个是 name\n '
params = MarketParams()
params.market = mar... | 获取股票代号列表和名称
:param market: US 美股,HK 港股, CN A股,ALL 所有
:param lang: 语言支持: zh_CN,zh_TW,en_US
:return: list, list 中的每个对象是一个 tuple. tuple 的第一个元素是 symbol,第二个是 name | venv/lib/python3.7/site-packages/tigeropen/quote/quote_client.py | get_symbol_names | CatTiger/vnpy | 0 | python | def get_symbol_names(self, market=Market.ALL, lang=None):
'\n 获取股票代号列表和名称\n :param market: US 美股,HK 港股, CN A股,ALL 所有\n :param lang: 语言支持: zh_CN,zh_TW,en_US\n :return: list, list 中的每个对象是一个 tuple. tuple 的第一个元素是 symbol,第二个是 name\n '
params = MarketParams()
params.market = mar... | def get_symbol_names(self, market=Market.ALL, lang=None):
'\n 获取股票代号列表和名称\n :param market: US 美股,HK 港股, CN A股,ALL 所有\n :param lang: 语言支持: zh_CN,zh_TW,en_US\n :return: list, list 中的每个对象是一个 tuple. tuple 的第一个元素是 symbol,第二个是 name\n '
params = MarketParams()
params.market = mar... |
276fb2bc3f88003181ce6fd7cde1ed7980c11a56d751cd9b25c8dd17b9734eae | def get_trade_metas(self, symbols):
'\n 获取股票交易需要的信息(最新数量和报价单位等)\n :param symbols: 股票代号列表\n :return: pandas.DataFrame, 各 column 的含义如下:\n symbol: 证券代码\n lot_size: 每股手数\n min_tick: 价格最小变动单位\n spread_scale: 报价精度\n '
params = MultipleQuoteParams... | 获取股票交易需要的信息(最新数量和报价单位等)
:param symbols: 股票代号列表
:return: pandas.DataFrame, 各 column 的含义如下:
symbol: 证券代码
lot_size: 每股手数
min_tick: 价格最小变动单位
spread_scale: 报价精度 | venv/lib/python3.7/site-packages/tigeropen/quote/quote_client.py | get_trade_metas | CatTiger/vnpy | 0 | python | def get_trade_metas(self, symbols):
'\n 获取股票交易需要的信息(最新数量和报价单位等)\n :param symbols: 股票代号列表\n :return: pandas.DataFrame, 各 column 的含义如下:\n symbol: 证券代码\n lot_size: 每股手数\n min_tick: 价格最小变动单位\n spread_scale: 报价精度\n '
params = MultipleQuoteParams... | def get_trade_metas(self, symbols):
'\n 获取股票交易需要的信息(最新数量和报价单位等)\n :param symbols: 股票代号列表\n :return: pandas.DataFrame, 各 column 的含义如下:\n symbol: 证券代码\n lot_size: 每股手数\n min_tick: 价格最小变动单位\n spread_scale: 报价精度\n '
params = MultipleQuoteParams... |
c4b7153519489071ae568e2ae6aff23a12e09f6eef99c2bfadf76a2f465cb997 | def get_briefs(self, symbols, include_hour_trading=False, include_ask_bid=False, right=QuoteRight.BR, lang=None):
'\n 获取股票摘要\n :param symbols: 股票代号列表\n :param include_hour_trading: 是否包含盘前盘后\n :param include_ask_bid: 是否包含买卖盘\n :param right: 复权选项 ,br: 前复权,nr: 不复权\n :param lan... | 获取股票摘要
:param symbols: 股票代号列表
:param include_hour_trading: 是否包含盘前盘后
:param include_ask_bid: 是否包含买卖盘
:param right: 复权选项 ,br: 前复权,nr: 不复权
:param lang: 语言支持: zh_CN,zh_TW,en_US
:return: | venv/lib/python3.7/site-packages/tigeropen/quote/quote_client.py | get_briefs | CatTiger/vnpy | 0 | python | def get_briefs(self, symbols, include_hour_trading=False, include_ask_bid=False, right=QuoteRight.BR, lang=None):
'\n 获取股票摘要\n :param symbols: 股票代号列表\n :param include_hour_trading: 是否包含盘前盘后\n :param include_ask_bid: 是否包含买卖盘\n :param right: 复权选项 ,br: 前复权,nr: 不复权\n :param lan... | def get_briefs(self, symbols, include_hour_trading=False, include_ask_bid=False, right=QuoteRight.BR, lang=None):
'\n 获取股票摘要\n :param symbols: 股票代号列表\n :param include_hour_trading: 是否包含盘前盘后\n :param include_ask_bid: 是否包含买卖盘\n :param right: 复权选项 ,br: 前复权,nr: 不复权\n :param lan... |
a61cd8c79f265a1b925eb53fca80864fd2ee8ae0725d71334557f0a3d554b651 | def get_stock_briefs(self, symbols, lang=None):
'\n 获取股票实时行情\n :param symbols: 股票代号列表\n :param lang: 语言支持: zh_CN,zh_TW,en_US\n :return: pandas.DataFrame. 各 column 含义如下:\n symbol: 证券代码\n ask_price: 卖一价\n ask_size: 卖一量\n bid_price: 买一价\n ... | 获取股票实时行情
:param symbols: 股票代号列表
:param lang: 语言支持: zh_CN,zh_TW,en_US
:return: pandas.DataFrame. 各 column 含义如下:
symbol: 证券代码
ask_price: 卖一价
ask_size: 卖一量
bid_price: 买一价
bid_size: 买一量
pre_close: 前收价
latest_price: 最新价
latest_time: 最新成交时间
volume: 成交量
open: 开盘价
high: 最高价
low:... | venv/lib/python3.7/site-packages/tigeropen/quote/quote_client.py | get_stock_briefs | CatTiger/vnpy | 0 | python | def get_stock_briefs(self, symbols, lang=None):
'\n 获取股票实时行情\n :param symbols: 股票代号列表\n :param lang: 语言支持: zh_CN,zh_TW,en_US\n :return: pandas.DataFrame. 各 column 含义如下:\n symbol: 证券代码\n ask_price: 卖一价\n ask_size: 卖一量\n bid_price: 买一价\n ... | def get_stock_briefs(self, symbols, lang=None):
'\n 获取股票实时行情\n :param symbols: 股票代号列表\n :param lang: 语言支持: zh_CN,zh_TW,en_US\n :return: pandas.DataFrame. 各 column 含义如下:\n symbol: 证券代码\n ask_price: 卖一价\n ask_size: 卖一量\n bid_price: 买一价\n ... |
def8a6efea48bd3800e955ab124cd1e119da51f8120aca7c208f1e47508bb83d | def get_timeline(self, symbols, include_hour_trading=False, begin_time=(- 1), lang=None):
'\n 获取当日分时数据\n :param symbols: 股票代号列表\n :param include_hour_trading: 是否包含盘前盘后分时\n :param begin_time: 开始时间. 若是时间戳需要精确到毫秒, 为13位整数;\n 或是日期时间格式的字符串, 如 "2019-01-01" 或 "... | 获取当日分时数据
:param symbols: 股票代号列表
:param include_hour_trading: 是否包含盘前盘后分时
:param begin_time: 开始时间. 若是时间戳需要精确到毫秒, 为13位整数;
或是日期时间格式的字符串, 如 "2019-01-01" 或 "2019-01-01 12:00:00"
:param lang: 语言支持: zh_CN,zh_TW,en_US
:return: pandas.DataFrame, DataFrame 的 column 及含义如下:
symbol: 证券代码
time: 精确到... | venv/lib/python3.7/site-packages/tigeropen/quote/quote_client.py | get_timeline | CatTiger/vnpy | 0 | python | def get_timeline(self, symbols, include_hour_trading=False, begin_time=(- 1), lang=None):
'\n 获取当日分时数据\n :param symbols: 股票代号列表\n :param include_hour_trading: 是否包含盘前盘后分时\n :param begin_time: 开始时间. 若是时间戳需要精确到毫秒, 为13位整数;\n 或是日期时间格式的字符串, 如 "2019-01-01" 或 "... | def get_timeline(self, symbols, include_hour_trading=False, begin_time=(- 1), lang=None):
'\n 获取当日分时数据\n :param symbols: 股票代号列表\n :param include_hour_trading: 是否包含盘前盘后分时\n :param begin_time: 开始时间. 若是时间戳需要精确到毫秒, 为13位整数;\n 或是日期时间格式的字符串, 如 "2019-01-01" 或 "... |
854546ed190318267324029a8aa0554ba21d135e562d890aa6b046b8090312e8 | def get_bars(self, symbols, period=BarPeriod.DAY, begin_time=(- 1), end_time=(- 1), right=QuoteRight.BR, limit=251, lang=None):
'\n 获取K线数据\n :param symbols: 股票代号列表\n :param period: day: 日K,week: 周K,month:月K ,year:年K,1min:1分钟,5min:5分钟,15min:15分钟,30min:30分钟,60min:60分钟\n :param begin_time: ... | 获取K线数据
:param symbols: 股票代号列表
:param period: day: 日K,week: 周K,month:月K ,year:年K,1min:1分钟,5min:5分钟,15min:15分钟,30min:30分钟,60min:60分钟
:param begin_time: 开始时间. 若是时间戳需要精确到毫秒, 为13位整数;
或是日期时间格式的字符串, 如 "2019-01-01" 或 "2019-01-01 12:00:00"
:param end_time: 结束时间. 格式同 begin_time
:param right: 复权选项 ,Quo... | venv/lib/python3.7/site-packages/tigeropen/quote/quote_client.py | get_bars | CatTiger/vnpy | 0 | python | def get_bars(self, symbols, period=BarPeriod.DAY, begin_time=(- 1), end_time=(- 1), right=QuoteRight.BR, limit=251, lang=None):
'\n 获取K线数据\n :param symbols: 股票代号列表\n :param period: day: 日K,week: 周K,month:月K ,year:年K,1min:1分钟,5min:5分钟,15min:15分钟,30min:30分钟,60min:60分钟\n :param begin_time: ... | def get_bars(self, symbols, period=BarPeriod.DAY, begin_time=(- 1), end_time=(- 1), right=QuoteRight.BR, limit=251, lang=None):
'\n 获取K线数据\n :param symbols: 股票代号列表\n :param period: day: 日K,week: 周K,month:月K ,year:年K,1min:1分钟,5min:5分钟,15min:15分钟,30min:30分钟,60min:60分钟\n :param begin_time: ... |
42e4dbf9cb7324e6f32382e91327258dee42a91b8509a23d5aefa09d3b225f25 | def get_trade_ticks(self, symbols, begin_index=0, end_index=30, limit=30, lang=None):
'\n 获取逐笔成交\n :param symbols: 股票代号列表\n :param begin_index: 开始索引\n :param end_index: 结束索引\n :param limit: 数量限制\n :param lang: 语言支持: zh_CN,zh_TW,en_US\n :return: pandas.DataFrame 对象, c... | 获取逐笔成交
:param symbols: 股票代号列表
:param begin_index: 开始索引
:param end_index: 结束索引
:param limit: 数量限制
:param lang: 语言支持: zh_CN,zh_TW,en_US
:return: pandas.DataFrame 对象, column 有如下属性:
index: 索引值
time: 毫秒时间戳
price: 成交价
volume: 成交量
direction: 价格变动方向,"-"表示向下变动, "+" 表示向上变动 | venv/lib/python3.7/site-packages/tigeropen/quote/quote_client.py | get_trade_ticks | CatTiger/vnpy | 0 | python | def get_trade_ticks(self, symbols, begin_index=0, end_index=30, limit=30, lang=None):
'\n 获取逐笔成交\n :param symbols: 股票代号列表\n :param begin_index: 开始索引\n :param end_index: 结束索引\n :param limit: 数量限制\n :param lang: 语言支持: zh_CN,zh_TW,en_US\n :return: pandas.DataFrame 对象, c... | def get_trade_ticks(self, symbols, begin_index=0, end_index=30, limit=30, lang=None):
'\n 获取逐笔成交\n :param symbols: 股票代号列表\n :param begin_index: 开始索引\n :param end_index: 结束索引\n :param limit: 数量限制\n :param lang: 语言支持: zh_CN,zh_TW,en_US\n :return: pandas.DataFrame 对象, c... |
24688b6ea519752996f29818a1c589a90f43c2e7ad51889282e7340a05e596a4 | def get_short_interest(self, symbols, lang=None):
'\n 获取美股的做空数据\n :param symbols: 股票代号列表\n :param lang: 语言支持: zh_CN,zh_TW,en_US\n :return: pandas.DataFrame 对象,各 column 含义如下:\n symbol: 证券代码\n settlement_date: 收集信息的时间\n short_interest: 未平仓做空股数\n ... | 获取美股的做空数据
:param symbols: 股票代号列表
:param lang: 语言支持: zh_CN,zh_TW,en_US
:return: pandas.DataFrame 对象,各 column 含义如下:
symbol: 证券代码
settlement_date: 收集信息的时间
short_interest: 未平仓做空股数
avg_daily_volume: 过去一年的日均成交量
days_to_cover: 回补天数。使用最近一次获取的未平仓做空股数/日均成交量得到
percent_of_float: 未平仓股数占流通股本的比重 | venv/lib/python3.7/site-packages/tigeropen/quote/quote_client.py | get_short_interest | CatTiger/vnpy | 0 | python | def get_short_interest(self, symbols, lang=None):
'\n 获取美股的做空数据\n :param symbols: 股票代号列表\n :param lang: 语言支持: zh_CN,zh_TW,en_US\n :return: pandas.DataFrame 对象,各 column 含义如下:\n symbol: 证券代码\n settlement_date: 收集信息的时间\n short_interest: 未平仓做空股数\n ... | def get_short_interest(self, symbols, lang=None):
'\n 获取美股的做空数据\n :param symbols: 股票代号列表\n :param lang: 语言支持: zh_CN,zh_TW,en_US\n :return: pandas.DataFrame 对象,各 column 含义如下:\n symbol: 证券代码\n settlement_date: 收集信息的时间\n short_interest: 未平仓做空股数\n ... |
756dcd1b8a814f2b5534d9622665ccf7098bc7bd87206b486ef5cef88de3f34c | def get_option_expirations(self, symbols):
'\n 返回美股期权的过期日\n :param symbols: 股票代码列表\n :return: pandas.DataFrame, 各 column 的含义如下:\n symbol: 证券代码\n date: 到日期 YYYY-MM-DD 格式的字符串\n timestamp: 到期日,精确到毫秒的时间戳\n '
params = MultipleQuoteParams()
params.symbo... | 返回美股期权的过期日
:param symbols: 股票代码列表
:return: pandas.DataFrame, 各 column 的含义如下:
symbol: 证券代码
date: 到日期 YYYY-MM-DD 格式的字符串
timestamp: 到期日,精确到毫秒的时间戳 | venv/lib/python3.7/site-packages/tigeropen/quote/quote_client.py | get_option_expirations | CatTiger/vnpy | 0 | python | def get_option_expirations(self, symbols):
'\n 返回美股期权的过期日\n :param symbols: 股票代码列表\n :return: pandas.DataFrame, 各 column 的含义如下:\n symbol: 证券代码\n date: 到日期 YYYY-MM-DD 格式的字符串\n timestamp: 到期日,精确到毫秒的时间戳\n '
params = MultipleQuoteParams()
params.symbo... | def get_option_expirations(self, symbols):
'\n 返回美股期权的过期日\n :param symbols: 股票代码列表\n :return: pandas.DataFrame, 各 column 的含义如下:\n symbol: 证券代码\n date: 到日期 YYYY-MM-DD 格式的字符串\n timestamp: 到期日,精确到毫秒的时间戳\n '
params = MultipleQuoteParams()
params.symbo... |
07b87f019f700edc42d89ae30539e9295bec66cb8b73c718587544452549250f | def get_option_chain(self, symbol, expiry):
"\n 获取美股期权链\n :param symbol: 股票代码\n :param expiry: 过期日 ( 类似 '2021-06-18' 或者 1560484800000 )\n :return: pandas.DataFrame,各 column 含义如下:\n identifier: 期权代码\n symbol: 期权对应的正股代码\n expiry: 期权到期日,毫秒级别的时间戳\n ... | 获取美股期权链
:param symbol: 股票代码
:param expiry: 过期日 ( 类似 '2021-06-18' 或者 1560484800000 )
:return: pandas.DataFrame,各 column 含义如下:
identifier: 期权代码
symbol: 期权对应的正股代码
expiry: 期权到期日,毫秒级别的时间戳
strike: 行权价
put_call: 期权的方向
multiplier: 乘数
ask_price: 卖价
ask_size: 卖量
bid_price: 买价
bid_size: 买量
... | venv/lib/python3.7/site-packages/tigeropen/quote/quote_client.py | get_option_chain | CatTiger/vnpy | 0 | python | def get_option_chain(self, symbol, expiry):
"\n 获取美股期权链\n :param symbol: 股票代码\n :param expiry: 过期日 ( 类似 '2021-06-18' 或者 1560484800000 )\n :return: pandas.DataFrame,各 column 含义如下:\n identifier: 期权代码\n symbol: 期权对应的正股代码\n expiry: 期权到期日,毫秒级别的时间戳\n ... | def get_option_chain(self, symbol, expiry):
"\n 获取美股期权链\n :param symbol: 股票代码\n :param expiry: 过期日 ( 类似 '2021-06-18' 或者 1560484800000 )\n :return: pandas.DataFrame,各 column 含义如下:\n identifier: 期权代码\n symbol: 期权对应的正股代码\n expiry: 期权到期日,毫秒级别的时间戳\n ... |
d6830b7ee14ad27bfe9b053a0480eea05a5268f50cc451ec99b7228779af94fe | def get_option_briefs(self, identifiers):
'\n 获取期权最新行情\n :param identifiers: 期权代码列表\n :return: pandas.DataFrame, 各 column 的含义如下:\n identifier: 期权代码\n symbol: 期权对应的正股代码\n expiry: 到期日,毫秒级时间戳\n strike: 行权价\n put_call: 期权方向\n multipl... | 获取期权最新行情
:param identifiers: 期权代码列表
:return: pandas.DataFrame, 各 column 的含义如下:
identifier: 期权代码
symbol: 期权对应的正股代码
expiry: 到期日,毫秒级时间戳
strike: 行权价
put_call: 期权方向
multiplier: 乘数
ask_price: 卖价
ask_size: 卖量
bid_price: 买价
bid_size: 买量
pre_close: 前收价
latest_price: 最新价
latest... | venv/lib/python3.7/site-packages/tigeropen/quote/quote_client.py | get_option_briefs | CatTiger/vnpy | 0 | python | def get_option_briefs(self, identifiers):
'\n 获取期权最新行情\n :param identifiers: 期权代码列表\n :return: pandas.DataFrame, 各 column 的含义如下:\n identifier: 期权代码\n symbol: 期权对应的正股代码\n expiry: 到期日,毫秒级时间戳\n strike: 行权价\n put_call: 期权方向\n multipl... | def get_option_briefs(self, identifiers):
'\n 获取期权最新行情\n :param identifiers: 期权代码列表\n :return: pandas.DataFrame, 各 column 的含义如下:\n identifier: 期权代码\n symbol: 期权对应的正股代码\n expiry: 到期日,毫秒级时间戳\n strike: 行权价\n put_call: 期权方向\n multipl... |
2fef981a1d9aef6bc9793398301eb80ddcc36921cd17c10a2c7efe1c0d225ec1 | def get_option_bars(self, identifiers, begin_time=(- 1), end_time=4070880000000):
'\n 获取期权日K数据\n :param identifiers: 期权代码列表\n :param begin_time: 开始时间. 若是时间戳需要精确到毫秒, 为13位整数;\n 或是日期时间格式的字符串, 如 "2019-01-01" 或 "2019-01-01 12:00:00"\n :param end_time: 结束时间. ... | 获取期权日K数据
:param identifiers: 期权代码列表
:param begin_time: 开始时间. 若是时间戳需要精确到毫秒, 为13位整数;
或是日期时间格式的字符串, 如 "2019-01-01" 或 "2019-01-01 12:00:00"
:param end_time: 结束时间. 格式同 begin_time
:return: pandas.DataFrame, 各 column 含义如下:
time: 毫秒级时间戳
open: 开盘价
high: 最高价
low: 最低价
close: 收盘价
... | venv/lib/python3.7/site-packages/tigeropen/quote/quote_client.py | get_option_bars | CatTiger/vnpy | 0 | python | def get_option_bars(self, identifiers, begin_time=(- 1), end_time=4070880000000):
'\n 获取期权日K数据\n :param identifiers: 期权代码列表\n :param begin_time: 开始时间. 若是时间戳需要精确到毫秒, 为13位整数;\n 或是日期时间格式的字符串, 如 "2019-01-01" 或 "2019-01-01 12:00:00"\n :param end_time: 结束时间. ... | def get_option_bars(self, identifiers, begin_time=(- 1), end_time=4070880000000):
'\n 获取期权日K数据\n :param identifiers: 期权代码列表\n :param begin_time: 开始时间. 若是时间戳需要精确到毫秒, 为13位整数;\n 或是日期时间格式的字符串, 如 "2019-01-01" 或 "2019-01-01 12:00:00"\n :param end_time: 结束时间. ... |
66d8319079734ae78887679b0d957d998b87b05e4dea65e6b2fb0fda73c38daa | def get_option_trade_ticks(self, identifiers):
'\n 获取期权逐笔成交\n :param identifiers: 期权代码列表\n :return: pandas.DataFrame, 各 column 的含义如下:\n symbol: 期权对应的正股代码\n expiry: 期权到期时间, YYYY-MM-DD 格式的字符串\n put_call: 期权方向\n strike: 行权价\n time: 成交时间\n ... | 获取期权逐笔成交
:param identifiers: 期权代码列表
:return: pandas.DataFrame, 各 column 的含义如下:
symbol: 期权对应的正股代码
expiry: 期权到期时间, YYYY-MM-DD 格式的字符串
put_call: 期权方向
strike: 行权价
time: 成交时间
price: 成交价格
volume: 成交量 | venv/lib/python3.7/site-packages/tigeropen/quote/quote_client.py | get_option_trade_ticks | CatTiger/vnpy | 0 | python | def get_option_trade_ticks(self, identifiers):
'\n 获取期权逐笔成交\n :param identifiers: 期权代码列表\n :return: pandas.DataFrame, 各 column 的含义如下:\n symbol: 期权对应的正股代码\n expiry: 期权到期时间, YYYY-MM-DD 格式的字符串\n put_call: 期权方向\n strike: 行权价\n time: 成交时间\n ... | def get_option_trade_ticks(self, identifiers):
'\n 获取期权逐笔成交\n :param identifiers: 期权代码列表\n :return: pandas.DataFrame, 各 column 的含义如下:\n symbol: 期权对应的正股代码\n expiry: 期权到期时间, YYYY-MM-DD 格式的字符串\n put_call: 期权方向\n strike: 行权价\n time: 成交时间\n ... |
5cb8fcc6756107366471d89395d300aa1247e488d820e71d0a349e9152c503d9 | def get_future_exchanges(self, sec_type=SecurityType.FUT, lang=None):
'\n 获取期货交易所列表\n :param sec_type: FUT: 期货; FOP: 期货期权\n :param lang:\n :return: pandas.DataFrame , 各 column 的含义如下:\n code: 交易所代码\n name: 交易所名称\n zone: 交易所所在时区\n '
params = Mar... | 获取期货交易所列表
:param sec_type: FUT: 期货; FOP: 期货期权
:param lang:
:return: pandas.DataFrame , 各 column 的含义如下:
code: 交易所代码
name: 交易所名称
zone: 交易所所在时区 | venv/lib/python3.7/site-packages/tigeropen/quote/quote_client.py | get_future_exchanges | CatTiger/vnpy | 0 | python | def get_future_exchanges(self, sec_type=SecurityType.FUT, lang=None):
'\n 获取期货交易所列表\n :param sec_type: FUT: 期货; FOP: 期货期权\n :param lang:\n :return: pandas.DataFrame , 各 column 的含义如下:\n code: 交易所代码\n name: 交易所名称\n zone: 交易所所在时区\n '
params = Mar... | def get_future_exchanges(self, sec_type=SecurityType.FUT, lang=None):
'\n 获取期货交易所列表\n :param sec_type: FUT: 期货; FOP: 期货期权\n :param lang:\n :return: pandas.DataFrame , 各 column 的含义如下:\n code: 交易所代码\n name: 交易所名称\n zone: 交易所所在时区\n '
params = Mar... |
e82a16782853460395be55486cbf45576008eef8020de2ef73b10bb5af40e9b6 | def get_future_contracts(self, exchange, lang=None):
'\n 获取交易所下的可交易合约\n :param exchange:\n :param lang:\n :return: pandas.DataFrame, 各 column 含义如下:\n contract_code: 合约代码\n type: 期货合约对应的交易品种, 如 CL\n name: 期货合约的名称\n contract_month: 合约交割月份\n ... | 获取交易所下的可交易合约
:param exchange:
:param lang:
:return: pandas.DataFrame, 各 column 含义如下:
contract_code: 合约代码
type: 期货合约对应的交易品种, 如 CL
name: 期货合约的名称
contract_month: 合约交割月份
currency: 交易的货币
first_notice_date: 第一通知日,合约在第一通知日后无法开多仓。已有的多仓会在第一通知日之前(通常为前三个交易日)被强制平仓。
last_bidding_close_time: 竞价截止时间
la... | venv/lib/python3.7/site-packages/tigeropen/quote/quote_client.py | get_future_contracts | CatTiger/vnpy | 0 | python | def get_future_contracts(self, exchange, lang=None):
'\n 获取交易所下的可交易合约\n :param exchange:\n :param lang:\n :return: pandas.DataFrame, 各 column 含义如下:\n contract_code: 合约代码\n type: 期货合约对应的交易品种, 如 CL\n name: 期货合约的名称\n contract_month: 合约交割月份\n ... | def get_future_contracts(self, exchange, lang=None):
'\n 获取交易所下的可交易合约\n :param exchange:\n :param lang:\n :return: pandas.DataFrame, 各 column 含义如下:\n contract_code: 合约代码\n type: 期货合约对应的交易品种, 如 CL\n name: 期货合约的名称\n contract_month: 合约交割月份\n ... |
375da04375fadcfb83b3bd02670543326c5d48339bbeadf8d27349616954d8bf | def get_current_future_contract(self, future_type, lang=None):
'\n 查询指定品种的当前合约\n :param future_type: 期货合约对应的交易品种, 如 CL\n :param lang:\n :return: pandas.DataFrame, 各 column 的含义如下:\n contract_code: 合约代码\n type: 期货合约对应的交易品种, 如 CL\n name: 期货合约的名称\n ... | 查询指定品种的当前合约
:param future_type: 期货合约对应的交易品种, 如 CL
:param lang:
:return: pandas.DataFrame, 各 column 的含义如下:
contract_code: 合约代码
type: 期货合约对应的交易品种, 如 CL
name: 期货合约的名称
contract_month: 合约交割月份
currency: 交易的货币
first_notice_date: 第一通知日,合约在第一通知日后无法开多仓。已有的多仓会在第一通知日之前(通常为前三个交易日)被强制平仓。
last_bidding_clos... | venv/lib/python3.7/site-packages/tigeropen/quote/quote_client.py | get_current_future_contract | CatTiger/vnpy | 0 | python | def get_current_future_contract(self, future_type, lang=None):
'\n 查询指定品种的当前合约\n :param future_type: 期货合约对应的交易品种, 如 CL\n :param lang:\n :return: pandas.DataFrame, 各 column 的含义如下:\n contract_code: 合约代码\n type: 期货合约对应的交易品种, 如 CL\n name: 期货合约的名称\n ... | def get_current_future_contract(self, future_type, lang=None):
'\n 查询指定品种的当前合约\n :param future_type: 期货合约对应的交易品种, 如 CL\n :param lang:\n :return: pandas.DataFrame, 各 column 的含义如下:\n contract_code: 合约代码\n type: 期货合约对应的交易品种, 如 CL\n name: 期货合约的名称\n ... |
04db3e12cd8d085de8f5f76d8d5969b2b903624ea3d899ed9f047a2b831c8752 | def get_future_trading_times(self, identifier, trading_date=None):
'\n 查询指定期货合约的交易时间\n :param identifier: 合约代码\n :param trading_date: 指定交易日的时间. 若是时间戳需要精确到毫秒, 为13位整数;\n 或是日期时间格式的字符串, 如 "2019-01-01" 或 "2019-01-01 12:00:00"\n :return: pandas.DataF... | 查询指定期货合约的交易时间
:param identifier: 合约代码
:param trading_date: 指定交易日的时间. 若是时间戳需要精确到毫秒, 为13位整数;
或是日期时间格式的字符串, 如 "2019-01-01" 或 "2019-01-01 12:00:00"
:return: pandas.DataFrame, 各column含义如下:
start: 交易开始时间
end: 交易结束时间
trading: 是否为连续交易
bidding: 是否为竞价交易
zone: 时区 | venv/lib/python3.7/site-packages/tigeropen/quote/quote_client.py | get_future_trading_times | CatTiger/vnpy | 0 | python | def get_future_trading_times(self, identifier, trading_date=None):
'\n 查询指定期货合约的交易时间\n :param identifier: 合约代码\n :param trading_date: 指定交易日的时间. 若是时间戳需要精确到毫秒, 为13位整数;\n 或是日期时间格式的字符串, 如 "2019-01-01" 或 "2019-01-01 12:00:00"\n :return: pandas.DataF... | def get_future_trading_times(self, identifier, trading_date=None):
'\n 查询指定期货合约的交易时间\n :param identifier: 合约代码\n :param trading_date: 指定交易日的时间. 若是时间戳需要精确到毫秒, 为13位整数;\n 或是日期时间格式的字符串, 如 "2019-01-01" 或 "2019-01-01 12:00:00"\n :return: pandas.DataF... |
b5622faa594a89696d8cf5d9c2f4d62642d1018e0dc9f1ae8dfbf7eee70db4b7 | def get_future_bars(self, identifiers, period=BarPeriod.DAY, begin_time=(- 1), end_time=(- 1), limit=1000):
'\n 获取期货K线数据\n :param identifiers: 期货代码列表\n :param period: day: 日K,week: 周K,month:月K ,year:年K,1min:1分钟,5min:5分钟,15min:15分钟,30min:30分钟,60min:60分钟\n :param begin_time: 开始时间. 若是时间戳需要精... | 获取期货K线数据
:param identifiers: 期货代码列表
:param period: day: 日K,week: 周K,month:月K ,year:年K,1min:1分钟,5min:5分钟,15min:15分钟,30min:30分钟,60min:60分钟
:param begin_time: 开始时间. 若是时间戳需要精确到毫秒, 为13位整数;
或是日期时间格式的字符串, 如 "2019-01-01" 或 "2019-01-01 12:00:00"
:param end_time: 结束时间. 格式同 begin_time
:param limit: 数量限... | venv/lib/python3.7/site-packages/tigeropen/quote/quote_client.py | get_future_bars | CatTiger/vnpy | 0 | python | def get_future_bars(self, identifiers, period=BarPeriod.DAY, begin_time=(- 1), end_time=(- 1), limit=1000):
'\n 获取期货K线数据\n :param identifiers: 期货代码列表\n :param period: day: 日K,week: 周K,month:月K ,year:年K,1min:1分钟,5min:5分钟,15min:15分钟,30min:30分钟,60min:60分钟\n :param begin_time: 开始时间. 若是时间戳需要精... | def get_future_bars(self, identifiers, period=BarPeriod.DAY, begin_time=(- 1), end_time=(- 1), limit=1000):
'\n 获取期货K线数据\n :param identifiers: 期货代码列表\n :param period: day: 日K,week: 周K,month:月K ,year:年K,1min:1分钟,5min:5分钟,15min:15分钟,30min:30分钟,60min:60分钟\n :param begin_time: 开始时间. 若是时间戳需要精... |
435e6b47a65faf01296dc049908e16ad8ed5a1029cd73876e1562aa2625d244b | def get_future_trade_ticks(self, identifiers, begin_index=0, end_index=30, limit=1000):
'\n 获取期货逐笔成交\n :param identifiers: 期货代码列表\n :param begin_index: 开始索引\n :param end_index: 结束索引\n :param limit: 数量限制\n :return: pandas.DataFrame, 各 column 含义如下\n index: 索引值\n ... | 获取期货逐笔成交
:param identifiers: 期货代码列表
:param begin_index: 开始索引
:param end_index: 结束索引
:param limit: 数量限制
:return: pandas.DataFrame, 各 column 含义如下
index: 索引值
time: 成交时间,精确到毫秒的时间戳
price: 成交价格
volume: 成交量 | venv/lib/python3.7/site-packages/tigeropen/quote/quote_client.py | get_future_trade_ticks | CatTiger/vnpy | 0 | python | def get_future_trade_ticks(self, identifiers, begin_index=0, end_index=30, limit=1000):
'\n 获取期货逐笔成交\n :param identifiers: 期货代码列表\n :param begin_index: 开始索引\n :param end_index: 结束索引\n :param limit: 数量限制\n :return: pandas.DataFrame, 各 column 含义如下\n index: 索引值\n ... | def get_future_trade_ticks(self, identifiers, begin_index=0, end_index=30, limit=1000):
'\n 获取期货逐笔成交\n :param identifiers: 期货代码列表\n :param begin_index: 开始索引\n :param end_index: 结束索引\n :param limit: 数量限制\n :return: pandas.DataFrame, 各 column 含义如下\n index: 索引值\n ... |
1f40acc871366cba499741545c9283041057c23f41566bf95c948ddf3aec590e | def get_future_brief(self, identifiers):
'\n 获取期货最新行情\n :param identifiers: 期货代码列表\n :return: pandas.DataFrame,各 column 含义如下\n identifier: 期货代码\n ask_price: 卖价\n ask_size: 卖量\n bid_price: 买价\n bid_size: 买量\n pre_close: 前收价\n ... | 获取期货最新行情
:param identifiers: 期货代码列表
:return: pandas.DataFrame,各 column 含义如下
identifier: 期货代码
ask_price: 卖价
ask_size: 卖量
bid_price: 买价
bid_size: 买量
pre_close: 前收价
latest_price: 最新价
latest_size: 最新成交量
latest_time: 最新价成交时间
volume: 当日累计成交手数
open_interest: 未平仓合约数量
open: 开盘价
... | venv/lib/python3.7/site-packages/tigeropen/quote/quote_client.py | get_future_brief | CatTiger/vnpy | 0 | python | def get_future_brief(self, identifiers):
'\n 获取期货最新行情\n :param identifiers: 期货代码列表\n :return: pandas.DataFrame,各 column 含义如下\n identifier: 期货代码\n ask_price: 卖价\n ask_size: 卖量\n bid_price: 买价\n bid_size: 买量\n pre_close: 前收价\n ... | def get_future_brief(self, identifiers):
'\n 获取期货最新行情\n :param identifiers: 期货代码列表\n :return: pandas.DataFrame,各 column 含义如下\n identifier: 期货代码\n ask_price: 卖价\n ask_size: 卖量\n bid_price: 买价\n bid_size: 买量\n pre_close: 前收价\n ... |
a80ff680bb68223f102c2b8ea386ef43a87c1eee816f6b17188b733c7e24e852 | def get_corporate_split(self, symbols, market, begin_date, end_date):
'\n 获取公司拆合股数据\n :param symbols: 证券代码列表\n :param market: 查询的市场. 可选的值为 common.consts.Market 枚举类型, 如 Market.US\n :param begin_date: 起始时间. 若是时间戳需要精确到毫秒, 为13位整数;\n 或是日期时间格式的字符串, 如 "2019-01... | 获取公司拆合股数据
:param symbols: 证券代码列表
:param market: 查询的市场. 可选的值为 common.consts.Market 枚举类型, 如 Market.US
:param begin_date: 起始时间. 若是时间戳需要精确到毫秒, 为13位整数;
或是日期时间格式的字符串, 如 "2019-01-01" 或 "2019-01-01 12:00:00"
:param end_date: 截止时间. 格式同 begin_date
:return: pandas.DataFrame, 各 column 的含义如下:
symbol:... | venv/lib/python3.7/site-packages/tigeropen/quote/quote_client.py | get_corporate_split | CatTiger/vnpy | 0 | python | def get_corporate_split(self, symbols, market, begin_date, end_date):
'\n 获取公司拆合股数据\n :param symbols: 证券代码列表\n :param market: 查询的市场. 可选的值为 common.consts.Market 枚举类型, 如 Market.US\n :param begin_date: 起始时间. 若是时间戳需要精确到毫秒, 为13位整数;\n 或是日期时间格式的字符串, 如 "2019-01... | def get_corporate_split(self, symbols, market, begin_date, end_date):
'\n 获取公司拆合股数据\n :param symbols: 证券代码列表\n :param market: 查询的市场. 可选的值为 common.consts.Market 枚举类型, 如 Market.US\n :param begin_date: 起始时间. 若是时间戳需要精确到毫秒, 为13位整数;\n 或是日期时间格式的字符串, 如 "2019-01... |
e195bc7469287770cf56cf9cb5ee82e990d0c3df8751e402bb43ae0e5d8b6099 | def get_corporate_dividend(self, symbols, market, begin_date, end_date):
'\n 获取公司派息数据\n :param symbols: 证券代码列表\n :param market: 查询的市场. 可选的值为 common.consts.Market 枚举类型, 如 Market.US\n :param begin_date: 起始时间. 若是时间戳需要精确到毫秒, 为13位整数;\n 或是日期时间格式的字符串, 如 "2019-... | 获取公司派息数据
:param symbols: 证券代码列表
:param market: 查询的市场. 可选的值为 common.consts.Market 枚举类型, 如 Market.US
:param begin_date: 起始时间. 若是时间戳需要精确到毫秒, 为13位整数;
或是日期时间格式的字符串, 如 "2019-01-01" 或 "2019-01-01 12:00:00"
:param end_date: 截止时间. 格式同 begin_date
:return: pandas.DataFrame, 各 column 的含义如下:
symbol: ... | venv/lib/python3.7/site-packages/tigeropen/quote/quote_client.py | get_corporate_dividend | CatTiger/vnpy | 0 | python | def get_corporate_dividend(self, symbols, market, begin_date, end_date):
'\n 获取公司派息数据\n :param symbols: 证券代码列表\n :param market: 查询的市场. 可选的值为 common.consts.Market 枚举类型, 如 Market.US\n :param begin_date: 起始时间. 若是时间戳需要精确到毫秒, 为13位整数;\n 或是日期时间格式的字符串, 如 "2019-... | def get_corporate_dividend(self, symbols, market, begin_date, end_date):
'\n 获取公司派息数据\n :param symbols: 证券代码列表\n :param market: 查询的市场. 可选的值为 common.consts.Market 枚举类型, 如 Market.US\n :param begin_date: 起始时间. 若是时间戳需要精确到毫秒, 为13位整数;\n 或是日期时间格式的字符串, 如 "2019-... |
4493a11a0432d8b613b30e4924738aca51c31242325387b4151d0597883d14a1 | def get_financial_daily(self, symbols, market, fields, begin_date, end_date):
"\n 获取日级的财务数据\n :param symbols: 证券代码列表\n :param market: 查询的市场. 可选的值为 common.consts.Market 枚举类型, 如 Market.US\n :param fields: 查询的字段列表, 可选的项为 common.consts.Valuation 枚举类型, 如 Valuation.shares_outstanding\n ... | 获取日级的财务数据
:param symbols: 证券代码列表
:param market: 查询的市场. 可选的值为 common.consts.Market 枚举类型, 如 Market.US
:param fields: 查询的字段列表, 可选的项为 common.consts.Valuation 枚举类型, 如 Valuation.shares_outstanding
:param begin_date: 开始时间. 如: '2019-01-01'
:param end_date: 结束时间. 格式同 begin_date
:return: pandas.DataFrame, 各 column 的含义如下:
sy... | venv/lib/python3.7/site-packages/tigeropen/quote/quote_client.py | get_financial_daily | CatTiger/vnpy | 0 | python | def get_financial_daily(self, symbols, market, fields, begin_date, end_date):
"\n 获取日级的财务数据\n :param symbols: 证券代码列表\n :param market: 查询的市场. 可选的值为 common.consts.Market 枚举类型, 如 Market.US\n :param fields: 查询的字段列表, 可选的项为 common.consts.Valuation 枚举类型, 如 Valuation.shares_outstanding\n ... | def get_financial_daily(self, symbols, market, fields, begin_date, end_date):
"\n 获取日级的财务数据\n :param symbols: 证券代码列表\n :param market: 查询的市场. 可选的值为 common.consts.Market 枚举类型, 如 Market.US\n :param fields: 查询的字段列表, 可选的项为 common.consts.Valuation 枚举类型, 如 Valuation.shares_outstanding\n ... |
1e3ab742b51ed7a384e4aacde0e3fde045853af07008615a65d63fbccf065bc9 | def get_financial_report(self, symbols, market, fields, period_type):
'\n 获取财报数据\n :param symbols:\n :param market: 查询的市场. 可选的值为 common.consts.Market 枚举类型, 如 Market.US\n :param fields: 查询的字段列表. 可选的项为 common.consts 下的 Income, Balance, CashFlow, BalanceSheetRatio,\n ... | 获取财报数据
:param symbols:
:param market: 查询的市场. 可选的值为 common.consts.Market 枚举类型, 如 Market.US
:param fields: 查询的字段列表. 可选的项为 common.consts 下的 Income, Balance, CashFlow, BalanceSheetRatio,
Growth, Leverage, Profitability 枚举类型. 如 Income.total_revenue
:param period_type: 查询的周期类型. 可选的值为 common.consts.FinancialRe... | venv/lib/python3.7/site-packages/tigeropen/quote/quote_client.py | get_financial_report | CatTiger/vnpy | 0 | python | def get_financial_report(self, symbols, market, fields, period_type):
'\n 获取财报数据\n :param symbols:\n :param market: 查询的市场. 可选的值为 common.consts.Market 枚举类型, 如 Market.US\n :param fields: 查询的字段列表. 可选的项为 common.consts 下的 Income, Balance, CashFlow, BalanceSheetRatio,\n ... | def get_financial_report(self, symbols, market, fields, period_type):
'\n 获取财报数据\n :param symbols:\n :param market: 查询的市场. 可选的值为 common.consts.Market 枚举类型, 如 Market.US\n :param fields: 查询的字段列表. 可选的项为 common.consts 下的 Income, Balance, CashFlow, BalanceSheetRatio,\n ... |
ef38e8e44d8e830bdccc132183ba880d55024dadaa4a9adb3fe0b67f6aeba2b3 | def create(*args):
'\n This is the preferred interface for using fixtureless\n :param args: Arguments are parsed in the factory.\n :return: A (saved) model instance or list depending on the args\n '
return Factory(Model).create(*args) | This is the preferred interface for using fixtureless
:param args: Arguments are parsed in the factory.
:return: A (saved) model instance or list depending on the args | fixtureless/factory.py | create | ricomoss/django_fixtureless | 4 | python | def create(*args):
'\n This is the preferred interface for using fixtureless\n :param args: Arguments are parsed in the factory.\n :return: A (saved) model instance or list depending on the args\n '
return Factory(Model).create(*args) | def create(*args):
'\n This is the preferred interface for using fixtureless\n :param args: Arguments are parsed in the factory.\n :return: A (saved) model instance or list depending on the args\n '
return Factory(Model).create(*args)<|docstring|>This is the preferred interface for using fixtureless... |
cd9637d738009910986f7bdfad6e72ed5a9d5df76dfefc354f1e9297a2c0924d | def build(*args):
'\n This is the preferred interface for using fixtureless\n :param args: Arguments are parsed in the factory.\n :return: A model instance or list depending on the args\n '
return Factory(Model).build(*args) | This is the preferred interface for using fixtureless
:param args: Arguments are parsed in the factory.
:return: A model instance or list depending on the args | fixtureless/factory.py | build | ricomoss/django_fixtureless | 4 | python | def build(*args):
'\n This is the preferred interface for using fixtureless\n :param args: Arguments are parsed in the factory.\n :return: A model instance or list depending on the args\n '
return Factory(Model).build(*args) | def build(*args):
'\n This is the preferred interface for using fixtureless\n :param args: Arguments are parsed in the factory.\n :return: A model instance or list depending on the args\n '
return Factory(Model).build(*args)<|docstring|>This is the preferred interface for using fixtureless
:param ar... |
06c983ab36ef8173cbac803cdb1b1c87958f7df5088870cafe720a6bb90674bb | def create_form(*args):
'\n This is the preferred interface for using fixtureless\n :param args: Arguments are parsed in the factory.\n :return: A form instance or list depending on the args\n '
return Factory(Form).create(*args) | This is the preferred interface for using fixtureless
:param args: Arguments are parsed in the factory.
:return: A form instance or list depending on the args | fixtureless/factory.py | create_form | ricomoss/django_fixtureless | 4 | python | def create_form(*args):
'\n This is the preferred interface for using fixtureless\n :param args: Arguments are parsed in the factory.\n :return: A form instance or list depending on the args\n '
return Factory(Form).create(*args) | def create_form(*args):
'\n This is the preferred interface for using fixtureless\n :param args: Arguments are parsed in the factory.\n :return: A form instance or list depending on the args\n '
return Factory(Form).create(*args)<|docstring|>This is the preferred interface for using fixtureless
:par... |
cf5db82729aca59dcb3f7a07616429dcaaf7c4ef0c13ef7a7302148d04650e26 | def build_form(*args):
'\n This is the preferred interface for using fixtureless\n :param args: Arguments are parsed in the factory.\n :return: A form instance or list depending on the args\n '
return Factory(Form).build(*args) | This is the preferred interface for using fixtureless
:param args: Arguments are parsed in the factory.
:return: A form instance or list depending on the args | fixtureless/factory.py | build_form | ricomoss/django_fixtureless | 4 | python | def build_form(*args):
'\n This is the preferred interface for using fixtureless\n :param args: Arguments are parsed in the factory.\n :return: A form instance or list depending on the args\n '
return Factory(Form).build(*args) | def build_form(*args):
'\n This is the preferred interface for using fixtureless\n :param args: Arguments are parsed in the factory.\n :return: A form instance or list depending on the args\n '
return Factory(Form).build(*args)<|docstring|>This is the preferred interface for using fixtureless
:param... |
04afe0c2e97ba5b06c78d23359a0ec2a998a4776c4bad604f000ec89fe1faa1a | def extend_until_line(line: int):
'Extends the selection from current line to the specified line' | Extends the selection from current line to the specified line | code/line_commands.py | extend_until_line | tbodt/knausj_talon | 298 | python | def extend_until_line(line: int):
| def extend_until_line(line: int):
<|docstring|>Extends the selection from current line to the specified line<|endoftext|> |
490c447b0b2027ca4780aed1f16856417ce9069394f8a7a2bd7b2ee8983ec80e | def select_range(line_start: int, line_end: int):
'Selects lines from line_start to line line_end'
actions.edit.jump_line(line_start)
actions.edit.extend_line_end()
number_of_lines = (line_end - line_start)
for i in range(0, number_of_lines):
actions.edit.extend_line_down()
actions.edit.... | Selects lines from line_start to line line_end | code/line_commands.py | select_range | tbodt/knausj_talon | 298 | python | def select_range(line_start: int, line_end: int):
actions.edit.jump_line(line_start)
actions.edit.extend_line_end()
number_of_lines = (line_end - line_start)
for i in range(0, number_of_lines):
actions.edit.extend_line_down()
actions.edit.extend_line_end() | def select_range(line_start: int, line_end: int):
actions.edit.jump_line(line_start)
actions.edit.extend_line_end()
number_of_lines = (line_end - line_start)
for i in range(0, number_of_lines):
actions.edit.extend_line_down()
actions.edit.extend_line_end()<|docstring|>Selects lines from... |
489a3772446a4153f3041d5447926ad5e475efcb14d26234377e0d143ae881fa | def extend_camel_left():
'Extends the selection by camel/subword to the left' | Extends the selection by camel/subword to the left | code/line_commands.py | extend_camel_left | tbodt/knausj_talon | 298 | python | def extend_camel_left():
| def extend_camel_left():
<|docstring|>Extends the selection by camel/subword to the left<|endoftext|> |
555c7ba87081a27ad9bcdcb1916d6bd872fb1f6d365928e8cf0cfbe99ddc3e8a | def extend_camel_right():
'Extends the selection by camel/subword to the right' | Extends the selection by camel/subword to the right | code/line_commands.py | extend_camel_right | tbodt/knausj_talon | 298 | python | def extend_camel_right():
| def extend_camel_right():
<|docstring|>Extends the selection by camel/subword to the right<|endoftext|> |
73dba5861c7a2256d87ee013cf6831c6c4ea82eae40f155d228da5ef765ae551 | def camel_left():
'Moves cursor to the left by camel case/subword' | Moves cursor to the left by camel case/subword | code/line_commands.py | camel_left | tbodt/knausj_talon | 298 | python | def camel_left():
| def camel_left():
<|docstring|>Moves cursor to the left by camel case/subword<|endoftext|> |
f53cfee131283c2041198f930ae36705fa137b5cc174baacfdc7078e32058dba | def camel_right():
'Move cursor to the right by camel case/subword' | Move cursor to the right by camel case/subword | code/line_commands.py | camel_right | tbodt/knausj_talon | 298 | python | def camel_right():
| def camel_right():
<|docstring|>Move cursor to the right by camel case/subword<|endoftext|> |
cee206364897f868087f6c3b015a63ae6084b58ead5878e2a9461746c22f6342 | def line_clone(line: int):
'Clones specified line at current position' | Clones specified line at current position | code/line_commands.py | line_clone | tbodt/knausj_talon | 298 | python | def line_clone(line: int):
| def line_clone(line: int):
<|docstring|>Clones specified line at current position<|endoftext|> |
a2da4e149d140814dd3120abe9d05576085f586b2f97f97dfaf3388f430acc3a | def point_poip(actual, mean):
'give poisson pvalue. P[obs ==mean]'
p = math.exp((- mean))
for i in xrange(actual):
p *= mean
p /= (i + 1)
return p | give poisson pvalue. P[obs ==mean] | external/CrossMap/usr/lib64/python2.7/site-packages/cmmodule/poisson.py | point_poip | parlar/calls2xls | 0 | python | def point_poip(actual, mean):
p = math.exp((- mean))
for i in xrange(actual):
p *= mean
p /= (i + 1)
return p | def point_poip(actual, mean):
p = math.exp((- mean))
for i in xrange(actual):
p *= mean
p /= (i + 1)
return p<|docstring|>give poisson pvalue. P[obs ==mean]<|endoftext|> |
bd7ee49d199f57aca727dd58e9c0b5b06021ee9b537a506d40bf0dafbd8c1a24 | def cumu_poip(num, mean, logp=False):
'give poisson pvalue P[obs >=mean]'
s = 0.0
for i in range(0, (num + 1)):
s += point_poip(i, mean)
if (logp is True):
try:
return ((- 10) * math.log10((1 - s)))
except:
return 3000
else:
return (1 - s) | give poisson pvalue P[obs >=mean] | external/CrossMap/usr/lib64/python2.7/site-packages/cmmodule/poisson.py | cumu_poip | parlar/calls2xls | 0 | python | def cumu_poip(num, mean, logp=False):
s = 0.0
for i in range(0, (num + 1)):
s += point_poip(i, mean)
if (logp is True):
try:
return ((- 10) * math.log10((1 - s)))
except:
return 3000
else:
return (1 - s) | def cumu_poip(num, mean, logp=False):
s = 0.0
for i in range(0, (num + 1)):
s += point_poip(i, mean)
if (logp is True):
try:
return ((- 10) * math.log10((1 - s)))
except:
return 3000
else:
return (1 - s)<|docstring|>give poisson pvalue P[obs >... |
92a1ae1194f83068d14d9c713e8936d1d6cf56efb1fd02faa8639b1a9c0ff2fe | def _image_to_array(img_path):
'Read the image from the path and return it as an numpy.ndarray.\n\n Load the image file as an array\n\n Args:\n img_path: a string whose value is the image file name\n '
if os.path.exists(img_path):
img = read_image(img_path)
if (len(img.shape) < 3... | Read the image from the path and return it as an numpy.ndarray.
Load the image file as an array
Args:
img_path: a string whose value is the image file name | symnet/image/data_utils.py | _image_to_array | sahamath/sym-netv1 | 1 | python | def _image_to_array(img_path):
'Read the image from the path and return it as an numpy.ndarray.\n\n Load the image file as an array\n\n Args:\n img_path: a string whose value is the image file name\n '
if os.path.exists(img_path):
img = read_image(img_path)
if (len(img.shape) < 3... | def _image_to_array(img_path):
'Read the image from the path and return it as an numpy.ndarray.\n\n Load the image file as an array\n\n Args:\n img_path: a string whose value is the image file name\n '
if os.path.exists(img_path):
img = read_image(img_path)
if (len(img.shape) < 3... |
d150eaa98d5419aeaaf803201318045e658eed65f5686151f00278ed368b59ac | def read_images(img_file_names, images_dir_path, parallel=True):
'Read the images from the path and return their numpy.ndarray instances.\n Args:\n img_file_names: List of strings representing image file names.\n images_dir_path: Path to the directory containing images.\n parallel: (Default:... | Read the images from the path and return their numpy.ndarray instances.
Args:
img_file_names: List of strings representing image file names.
images_dir_path: Path to the directory containing images.
parallel: (Default: True) Run _image_to_array will use multiprocessing.
Returns:
x_train: a list of nump... | symnet/image/data_utils.py | read_images | sahamath/sym-netv1 | 1 | python | def read_images(img_file_names, images_dir_path, parallel=True):
'Read the images from the path and return their numpy.ndarray instances.\n Args:\n img_file_names: List of strings representing image file names.\n images_dir_path: Path to the directory containing images.\n parallel: (Default:... | def read_images(img_file_names, images_dir_path, parallel=True):
'Read the images from the path and return their numpy.ndarray instances.\n Args:\n img_file_names: List of strings representing image file names.\n images_dir_path: Path to the directory containing images.\n parallel: (Default:... |
a49eb8b1d3663f811b41ab660238d63271c665891a2045aa9c59b1f511769993 | def load_image_dataset(csv_file_path, images_path, parallel=True):
"Load images from their files and load their labels from a csv file.\n Assumes the dataset is a set of images and the labels are in a CSV file.\n The CSV file should contain two columns whose names are 'File Name' and 'Label'.\n The file na... | Load images from their files and load their labels from a csv file.
Assumes the dataset is a set of images and the labels are in a CSV file.
The CSV file should contain two columns whose names are 'File Name' and 'Label'.
The file names in the first column should match the file names of the images with extensions,
e.g.... | symnet/image/data_utils.py | load_image_dataset | sahamath/sym-netv1 | 1 | python | def load_image_dataset(csv_file_path, images_path, parallel=True):
"Load images from their files and load their labels from a csv file.\n Assumes the dataset is a set of images and the labels are in a CSV file.\n The CSV file should contain two columns whose names are 'File Name' and 'Label'.\n The file na... | def load_image_dataset(csv_file_path, images_path, parallel=True):
"Load images from their files and load their labels from a csv file.\n Assumes the dataset is a set of images and the labels are in a CSV file.\n The CSV file should contain two columns whose names are 'File Name' and 'Label'.\n The file na... |
ef24639095b2eefa30d411faa3afa3b05317efcb2eb9c94a7eec6530996abf3f | def read_csv_file(path: str):
'\n Reads a CSV file and returns the values in its two columns. This is meant to be used\n to read file names and their corresponding labels.\n :param path: str. Path to CSV file\n :return: (filenames, labels)\n '
df = pd.read_csv(path, header=True)
return (df[df... | Reads a CSV file and returns the values in its two columns. This is meant to be used
to read file names and their corresponding labels.
:param path: str. Path to CSV file
:return: (filenames, labels) | symnet/image/data_utils.py | read_csv_file | sahamath/sym-netv1 | 1 | python | def read_csv_file(path: str):
'\n Reads a CSV file and returns the values in its two columns. This is meant to be used\n to read file names and their corresponding labels.\n :param path: str. Path to CSV file\n :return: (filenames, labels)\n '
df = pd.read_csv(path, header=True)
return (df[df... | def read_csv_file(path: str):
'\n Reads a CSV file and returns the values in its two columns. This is meant to be used\n to read file names and their corresponding labels.\n :param path: str. Path to CSV file\n :return: (filenames, labels)\n '
df = pd.read_csv(path, header=True)
return (df[df... |
6f8a3ebe2f14240e72e81d522bfaa81600ec39911b8678c21dfcb533301a652e | def read_image(path: str):
'\n Read an image file\n :param path: str. Path to image\n :return: The image\n '
return imageio.imread(path) | Read an image file
:param path: str. Path to image
:return: The image | symnet/image/data_utils.py | read_image | sahamath/sym-netv1 | 1 | python | def read_image(path: str):
'\n Read an image file\n :param path: str. Path to image\n :return: The image\n '
return imageio.imread(path) | def read_image(path: str):
'\n Read an image file\n :param path: str. Path to image\n :return: The image\n '
return imageio.imread(path)<|docstring|>Read an image file
:param path: str. Path to image
:return: The image<|endoftext|> |
63e370aa5b6cedaa8be533ecd0e2723074cce6b5ebfb6456b7cf5e3ef5a39738 | def compute_median_dimensions(images: np.ndarray):
'\n Compute the median of each dimension of each image in the array\n :param images: array-like. List of images\n :return: median shape\n '
if ((images is None) or (len(images.shape) == 0)):
return []
median_shape = np.median([x.shape fo... | Compute the median of each dimension of each image in the array
:param images: array-like. List of images
:return: median shape | symnet/image/data_utils.py | compute_median_dimensions | sahamath/sym-netv1 | 1 | python | def compute_median_dimensions(images: np.ndarray):
'\n Compute the median of each dimension of each image in the array\n :param images: array-like. List of images\n :return: median shape\n '
if ((images is None) or (len(images.shape) == 0)):
return []
median_shape = np.median([x.shape fo... | def compute_median_dimensions(images: np.ndarray):
'\n Compute the median of each dimension of each image in the array\n :param images: array-like. List of images\n :return: median shape\n '
if ((images is None) or (len(images.shape) == 0)):
return []
median_shape = np.median([x.shape fo... |
85fc69fa7eea8c72a3cf8d29b3ab7e7519aeb15be9af883c1f199a1b87d2a2a0 | def resize_images(images: np.ndarray, size=None):
'\n Resizes all images to a fixed size.\n :param images: array-like. List of images.\n :param size: array-like. Size to resize images to\n :return: resized images\n '
if ((images is None) or (len(images.shape) == 0)):
return images
if ... | Resizes all images to a fixed size.
:param images: array-like. List of images.
:param size: array-like. Size to resize images to
:return: resized images | symnet/image/data_utils.py | resize_images | sahamath/sym-netv1 | 1 | python | def resize_images(images: np.ndarray, size=None):
'\n Resizes all images to a fixed size.\n :param images: array-like. List of images.\n :param size: array-like. Size to resize images to\n :return: resized images\n '
if ((images is None) or (len(images.shape) == 0)):
return images
if ... | def resize_images(images: np.ndarray, size=None):
'\n Resizes all images to a fixed size.\n :param images: array-like. List of images.\n :param size: array-like. Size to resize images to\n :return: resized images\n '
if ((images is None) or (len(images.shape) == 0)):
return images
if ... |
c27c6941fa4283f03117601478a76fab514c8f58f3558f1b8401b48e45074b7f | def grouper(n, iterable, padvalue=None):
"grouper(3, 'abcdefg', 'x') -->\n ('a','b','c'), ('d','e','f'), ('g','x','x')\n "
return zip_longest(*([iter(iterable)] * n), fillvalue=padvalue) | grouper(3, 'abcdefg', 'x') -->
('a','b','c'), ('d','e','f'), ('g','x','x') | pulsar/utils/tools/text.py | grouper | speed1981/pulsar | 1,410 | python | def grouper(n, iterable, padvalue=None):
"grouper(3, 'abcdefg', 'x') -->\n ('a','b','c'), ('d','e','f'), ('g','x','x')\n "
return zip_longest(*([iter(iterable)] * n), fillvalue=padvalue) | def grouper(n, iterable, padvalue=None):
"grouper(3, 'abcdefg', 'x') -->\n ('a','b','c'), ('d','e','f'), ('g','x','x')\n "
return zip_longest(*([iter(iterable)] * n), fillvalue=padvalue)<|docstring|>grouper(3, 'abcdefg', 'x') -->
('a','b','c'), ('d','e','f'), ('g','x','x')<|endoftext|> |
57b3c4082dc917c41e94014e7a8db1be2c3d1d708c95f00ee5bebd56adc0b830 | def num2eng(num):
'English representation of a number up to a trillion.\n '
num = str(int(num))
if ((len(num) / 3) >= len(_PRONOUNCE)):
return num
elif (num == '0'):
return 'zero'
pron = []
first = True
for (pr, bits) in zip(_PRONOUNCE, grouper(3, reversed(num), '')):
... | English representation of a number up to a trillion. | pulsar/utils/tools/text.py | num2eng | speed1981/pulsar | 1,410 | python | def num2eng(num):
'\n '
num = str(int(num))
if ((len(num) / 3) >= len(_PRONOUNCE)):
return num
elif (num == '0'):
return 'zero'
pron = []
first = True
for (pr, bits) in zip(_PRONOUNCE, grouper(3, reversed(num), )):
num = .join(reversed(bits))
n = int(num)
... | def num2eng(num):
'\n '
num = str(int(num))
if ((len(num) / 3) >= len(_PRONOUNCE)):
return num
elif (num == '0'):
return 'zero'
pron = []
first = True
for (pr, bits) in zip(_PRONOUNCE, grouper(3, reversed(num), )):
num = .join(reversed(bits))
n = int(num)
... |
5a5ebf6ffe3dd8cce61ef8f336bfad41e531ca5e3e1415f604f0010addbdb201 | def set_engineering_mode(expert):
'\n Switches between expert mode and user mode for `BaseInterface` features.\n\n Current features:\n - Autocomplete filtering\n\n Parameters\n ----------\n expert: bool\n Set to ``True`` to enable expert mode, or ``False`` to disable it.\n ``True`... | Switches between expert mode and user mode for `BaseInterface` features.
Current features:
- Autocomplete filtering
Parameters
----------
expert: bool
Set to ``True`` to enable expert mode, or ``False`` to disable it.
``True`` is the starting value. | pcdsdevices/interface.py | set_engineering_mode | slacAWallace/pcdsdevices | 0 | python | def set_engineering_mode(expert):
'\n Switches between expert mode and user mode for `BaseInterface` features.\n\n Current features:\n - Autocomplete filtering\n\n Parameters\n ----------\n expert: bool\n Set to ``True`` to enable expert mode, or ``False`` to disable it.\n ``True`... | def set_engineering_mode(expert):
'\n Switches between expert mode and user mode for `BaseInterface` features.\n\n Current features:\n - Autocomplete filtering\n\n Parameters\n ----------\n expert: bool\n Set to ``True`` to enable expert mode, or ``False`` to disable it.\n ``True`... |
236b16675c48c3cc29f5c2c551bd5616cd5646ffd977196107793e990663fa13 | def get_engineering_mode():
'\n Get the last value set by `set_engineering_mode`.\n\n Returns\n -------\n expert: bool\n The current engineering mode. See `set_engineering_mode`.\n '
return engineering_mode | Get the last value set by `set_engineering_mode`.
Returns
-------
expert: bool
The current engineering mode. See `set_engineering_mode`. | pcdsdevices/interface.py | get_engineering_mode | slacAWallace/pcdsdevices | 0 | python | def get_engineering_mode():
'\n Get the last value set by `set_engineering_mode`.\n\n Returns\n -------\n expert: bool\n The current engineering mode. See `set_engineering_mode`.\n '
return engineering_mode | def get_engineering_mode():
'\n Get the last value set by `set_engineering_mode`.\n\n Returns\n -------\n expert: bool\n The current engineering mode. See `set_engineering_mode`.\n '
return engineering_mode<|docstring|>Get the last value set by `set_engineering_mode`.
Returns
-------
expe... |
92ef7d86a89a6352b4790d6eb5c3c55f8d237d4d2c36ad724f27fd29bda479eb | def setup_preset_paths(**paths):
'\n Prepare the `Presets` class.\n\n Sets the paths for saving and loading presets.\n\n Parameters\n ----------\n **paths: ``str`` keyword args\n A mapping from type of preset to destination path. These will be\n directories that contain the yaml files t... | Prepare the `Presets` class.
Sets the paths for saving and loading presets.
Parameters
----------
**paths: ``str`` keyword args
A mapping from type of preset to destination path. These will be
directories that contain the yaml files that define the preset
positions. | pcdsdevices/interface.py | setup_preset_paths | slacAWallace/pcdsdevices | 0 | python | def setup_preset_paths(**paths):
'\n Prepare the `Presets` class.\n\n Sets the paths for saving and loading presets.\n\n Parameters\n ----------\n **paths: ``str`` keyword args\n A mapping from type of preset to destination path. These will be\n directories that contain the yaml files t... | def setup_preset_paths(**paths):
'\n Prepare the `Presets` class.\n\n Sets the paths for saving and loading presets.\n\n Parameters\n ----------\n **paths: ``str`` keyword args\n A mapping from type of preset to destination path. These will be\n directories that contain the yaml files t... |
af8b9bad7e8c3dcdfee17b97e5f0fbaa725800be3e20bc58830e47dbe1f7c219 | def tweak_base(*args):
'\n Base function to control motors with the arrow keys.\n\n With one motor, this will use the left and right arrows for the axis and up\n and down arrows for scaling the step size. With two motors, this will use\n left and right for the first axis and up and down for the second a... | Base function to control motors with the arrow keys.
With one motor, this will use the left and right arrows for the axis and up
and down arrows for scaling the step size. With two motors, this will use
left and right for the first axis and up and down for the second axis, with
shift+arrow used for scaling the step si... | pcdsdevices/interface.py | tweak_base | slacAWallace/pcdsdevices | 0 | python | def tweak_base(*args):
'\n Base function to control motors with the arrow keys.\n\n With one motor, this will use the left and right arrows for the axis and up\n and down arrows for scaling the step size. With two motors, this will use\n left and right for the first axis and up and down for the second a... | def tweak_base(*args):
'\n Base function to control motors with the arrow keys.\n\n With one motor, this will use the left and right arrows for the axis and up\n and down arrows for scaling the step size. With two motors, this will use\n left and right for the first axis and up and down for the second a... |
1531321b176db242c423efdc7e0405da51351140d902cd828fed74866b2a28dc | def __repr__(self):
'\n Simplify the ophydobject repr to avoid crazy long represenations\n '
prefix = getattr(self, 'prefix', None)
name = getattr(self, 'name', None)
return f'{self.__class__.__name__}({prefix}, name={name})' | Simplify the ophydobject repr to avoid crazy long represenations | pcdsdevices/interface.py | __repr__ | slacAWallace/pcdsdevices | 0 | python | def __repr__(self):
'\n \n '
prefix = getattr(self, 'prefix', None)
name = getattr(self, 'name', None)
return f'{self.__class__.__name__}({prefix}, name={name})' | def __repr__(self):
'\n \n '
prefix = getattr(self, 'prefix', None)
name = getattr(self, 'name', None)
return f'{self.__class__.__name__}({prefix}, name={name})'<|docstring|>Simplify the ophydobject repr to avoid crazy long represenations<|endoftext|> |
215c58a3ce9d54e3d0347de51d777fbb856cff8101ddb3811565d341f13ad2fe | def mv(self, position, timeout=None, wait=False):
"\n Absolute move to a position.\n\n Parameters\n ----------\n position\n Desired end position\n\n timeout: ``float``, optional\n If provided, the mover will throw an error if motion takes longer\n ... | Absolute move to a position.
Parameters
----------
position
Desired end position
timeout: ``float``, optional
If provided, the mover will throw an error if motion takes longer
than timeout to complete. If omitted, the mover's default timeout
will be use.
wait: ``bool``, optional
If ``True``, wait... | pcdsdevices/interface.py | mv | slacAWallace/pcdsdevices | 0 | python | def mv(self, position, timeout=None, wait=False):
"\n Absolute move to a position.\n\n Parameters\n ----------\n position\n Desired end position\n\n timeout: ``float``, optional\n If provided, the mover will throw an error if motion takes longer\n ... | def mv(self, position, timeout=None, wait=False):
"\n Absolute move to a position.\n\n Parameters\n ----------\n position\n Desired end position\n\n timeout: ``float``, optional\n If provided, the mover will throw an error if motion takes longer\n ... |
8a2965dd35b462ee24f1a2e6b8ac6bb81d72f986db3896e123a97ec22ac07757 | def wm(self):
"\n Get the mover's positon (where motor)\n\n Returns\n -------\n position\n Current position\n "
return self.position | Get the mover's positon (where motor)
Returns
-------
position
Current position | pcdsdevices/interface.py | wm | slacAWallace/pcdsdevices | 0 | python | def wm(self):
"\n Get the mover's positon (where motor)\n\n Returns\n -------\n position\n Current position\n "
return self.position | def wm(self):
"\n Get the mover's positon (where motor)\n\n Returns\n -------\n position\n Current position\n "
return self.position<|docstring|>Get the mover's positon (where motor)
Returns
-------
position
Current position<|endoftext|> |
ae298b1c716e80c89f3850368356b2d7614a9a3ba6855ba8772e738e6555af92 | def __call__(self, position=None, timeout=None, wait=False):
'\n Dispatches to `mv` or `wm` based on the arguments.\n\n Calling the object will either move the object or get the current\n position, depending on if the position argument is given. See the\n docstrings for `mv` and `wm`.\n ... | Dispatches to `mv` or `wm` based on the arguments.
Calling the object will either move the object or get the current
position, depending on if the position argument is given. See the
docstrings for `mv` and `wm`. | pcdsdevices/interface.py | __call__ | slacAWallace/pcdsdevices | 0 | python | def __call__(self, position=None, timeout=None, wait=False):
'\n Dispatches to `mv` or `wm` based on the arguments.\n\n Calling the object will either move the object or get the current\n position, depending on if the position argument is given. See the\n docstrings for `mv` and `wm`.\n ... | def __call__(self, position=None, timeout=None, wait=False):
'\n Dispatches to `mv` or `wm` based on the arguments.\n\n Calling the object will either move the object or get the current\n position, depending on if the position argument is given. See the\n docstrings for `mv` and `wm`.\n ... |
009f576b64472ccb0c64f346422bdf76062209f181ceb4375c63e59e58ef199b | def camonitor(self):
'\n Shows a live-updating motor position in the terminal.\n\n This will be the value that is returned by the ``position`` attribute.\n This method ends cleanly at a ctrl+c or after a call to\n `end_monitor_thread`, which may be useful when this is called in a\n ... | Shows a live-updating motor position in the terminal.
This will be the value that is returned by the ``position`` attribute.
This method ends cleanly at a ctrl+c or after a call to
`end_monitor_thread`, which may be useful when this is called in a
background thread. | pcdsdevices/interface.py | camonitor | slacAWallace/pcdsdevices | 0 | python | def camonitor(self):
'\n Shows a live-updating motor position in the terminal.\n\n This will be the value that is returned by the ``position`` attribute.\n This method ends cleanly at a ctrl+c or after a call to\n `end_monitor_thread`, which may be useful when this is called in a\n ... | def camonitor(self):
'\n Shows a live-updating motor position in the terminal.\n\n This will be the value that is returned by the ``position`` attribute.\n This method ends cleanly at a ctrl+c or after a call to\n `end_monitor_thread`, which may be useful when this is called in a\n ... |
01d968297a8f50991d91be64a695888611373ad5a9213f02b814cd3193d8d8b2 | def end_monitor_thread(self):
'\n Stop a `camonitor` or `wm_update` that is running in another thread.\n '
self._mov_ev.set() | Stop a `camonitor` or `wm_update` that is running in another thread. | pcdsdevices/interface.py | end_monitor_thread | slacAWallace/pcdsdevices | 0 | python | def end_monitor_thread(self):
'\n \n '
self._mov_ev.set() | def end_monitor_thread(self):
'\n \n '
self._mov_ev.set()<|docstring|>Stop a `camonitor` or `wm_update` that is running in another thread.<|endoftext|> |
cd8bba4f2823de6c31ad286adc868dac15a42109c3a885f23eff2f1702987033 | def mvr(self, delta, timeout=None, wait=False):
"\n Relative move from this position.\n\n Parameters\n ----------\n delta: ``float``\n Desired change in position\n\n timeout: ``float``, optional\n If provided, the mover will throw an error if motion takes lon... | Relative move from this position.
Parameters
----------
delta: ``float``
Desired change in position
timeout: ``float``, optional
If provided, the mover will throw an error if motion takes longer
than timeout to complete. If omitted, the mover's default timeout
will be use.
wait: ``bool``, optional
... | pcdsdevices/interface.py | mvr | slacAWallace/pcdsdevices | 0 | python | def mvr(self, delta, timeout=None, wait=False):
"\n Relative move from this position.\n\n Parameters\n ----------\n delta: ``float``\n Desired change in position\n\n timeout: ``float``, optional\n If provided, the mover will throw an error if motion takes lon... | def mvr(self, delta, timeout=None, wait=False):
"\n Relative move from this position.\n\n Parameters\n ----------\n delta: ``float``\n Desired change in position\n\n timeout: ``float``, optional\n If provided, the mover will throw an error if motion takes lon... |
bd23efcb6f9ff7a076f1ff3a6b847adc8dc6cda1b61bf8b9595c4d64fb0bebbb | def umv(self, position, timeout=None):
"\n Move to a position, wait, and update with a progress bar.\n\n Parameters\n ----------\n position: ``float``\n Desired end position\n\n timeout: ``float``, optional\n If provided, the mover will throw an error if moti... | Move to a position, wait, and update with a progress bar.
Parameters
----------
position: ``float``
Desired end position
timeout: ``float``, optional
If provided, the mover will throw an error if motion takes longer
than timeout to complete. If omitted, the mover's default timeout
will be use. | pcdsdevices/interface.py | umv | slacAWallace/pcdsdevices | 0 | python | def umv(self, position, timeout=None):
"\n Move to a position, wait, and update with a progress bar.\n\n Parameters\n ----------\n position: ``float``\n Desired end position\n\n timeout: ``float``, optional\n If provided, the mover will throw an error if moti... | def umv(self, position, timeout=None):
"\n Move to a position, wait, and update with a progress bar.\n\n Parameters\n ----------\n position: ``float``\n Desired end position\n\n timeout: ``float``, optional\n If provided, the mover will throw an error if moti... |
2326b3d3acc81901be90f867bb0b37d1c6d5a717ae2ac016457b2192dcc99b0c | def umvr(self, delta, timeout=None):
"\n Relative move from this position, wait, and update with a progress bar.\n\n Parameters\n ----------\n delta: ``float``\n Desired change in position\n\n timeout: ``float``, optional\n If provided, the mover will throw a... | Relative move from this position, wait, and update with a progress bar.
Parameters
----------
delta: ``float``
Desired change in position
timeout: ``float``, optional
If provided, the mover will throw an error if motion takes longer
than timeout to complete. If omitted, the mover's default timeout
wil... | pcdsdevices/interface.py | umvr | slacAWallace/pcdsdevices | 0 | python | def umvr(self, delta, timeout=None):
"\n Relative move from this position, wait, and update with a progress bar.\n\n Parameters\n ----------\n delta: ``float``\n Desired change in position\n\n timeout: ``float``, optional\n If provided, the mover will throw a... | def umvr(self, delta, timeout=None):
"\n Relative move from this position, wait, and update with a progress bar.\n\n Parameters\n ----------\n delta: ``float``\n Desired change in position\n\n timeout: ``float``, optional\n If provided, the mover will throw a... |
8885887db27be4211dbb221b1c051bb6e1a4365c516eeea8f57c4da2e56e6db8 | def mv_ginput(self, timeout=None):
"\n Moves to a location the user clicks on.\n\n If there are existing plots, this will be the position on the most\n recently active plot. If there are no existing plots, an empty plot\n will be created with the motor's limits as the range.\n "
... | Moves to a location the user clicks on.
If there are existing plots, this will be the position on the most
recently active plot. If there are no existing plots, an empty plot
will be created with the motor's limits as the range. | pcdsdevices/interface.py | mv_ginput | slacAWallace/pcdsdevices | 0 | python | def mv_ginput(self, timeout=None):
"\n Moves to a location the user clicks on.\n\n If there are existing plots, this will be the position on the most\n recently active plot. If there are no existing plots, an empty plot\n will be created with the motor's limits as the range.\n "
... | def mv_ginput(self, timeout=None):
"\n Moves to a location the user clicks on.\n\n If there are existing plots, this will be the position on the most\n recently active plot. If there are no existing plots, an empty plot\n will be created with the motor's limits as the range.\n "
... |
71a56bfe2a9d5ccf61786669b635a47ad7a79ee89ca75ec4045daf3a1b2dd8c6 | def tweak(self):
'\n Control this motor using the arrow keys.\n\n Use left arrow to step negative and right arrow to step positive.\n Use up arrow to increase step size and down arrow to decrease step\n size. Press q or ctrl+c to quit.\n '
return tweak_base(self) | Control this motor using the arrow keys.
Use left arrow to step negative and right arrow to step positive.
Use up arrow to increase step size and down arrow to decrease step
size. Press q or ctrl+c to quit. | pcdsdevices/interface.py | tweak | slacAWallace/pcdsdevices | 0 | python | def tweak(self):
'\n Control this motor using the arrow keys.\n\n Use left arrow to step negative and right arrow to step positive.\n Use up arrow to increase step size and down arrow to decrease step\n size. Press q or ctrl+c to quit.\n '
return tweak_base(self) | def tweak(self):
'\n Control this motor using the arrow keys.\n\n Use left arrow to step negative and right arrow to step positive.\n Use up arrow to increase step size and down arrow to decrease step\n size. Press q or ctrl+c to quit.\n '
return tweak_base(self)<|docstring|>C... |
de239ac8f7248c2086715728fef5d8258e30c8b6a7476d6a1f62e3e2ea9aafb9 | def _path(self, preset_type):
'\n Utility function to get the preset file ``Path``.\n '
path = (self._paths[preset_type] / (self._device.name + '.yml'))
logger.debug('select presets path %s', path)
return path | Utility function to get the preset file ``Path``. | pcdsdevices/interface.py | _path | slacAWallace/pcdsdevices | 0 | python | def _path(self, preset_type):
'\n \n '
path = (self._paths[preset_type] / (self._device.name + '.yml'))
logger.debug('select presets path %s', path)
return path | def _path(self, preset_type):
'\n \n '
path = (self._paths[preset_type] / (self._device.name + '.yml'))
logger.debug('select presets path %s', path)
return path<|docstring|>Utility function to get the preset file ``Path``.<|endoftext|> |
dc434599f60446ba804bcd434ae5a656ce6bc38e4d03aef40ff3820d99bd64ed | def _read(self, preset_type):
"\n Utility function to get a particular preset's datum dictionary.\n "
logger.debug('read presets for %s', self._device.name)
with self._file_open_rlock(preset_type) as f:
f.seek(0)
return (yaml.full_load(f) or {}) | Utility function to get a particular preset's datum dictionary. | pcdsdevices/interface.py | _read | slacAWallace/pcdsdevices | 0 | python | def _read(self, preset_type):
"\n \n "
logger.debug('read presets for %s', self._device.name)
with self._file_open_rlock(preset_type) as f:
f.seek(0)
return (yaml.full_load(f) or {}) | def _read(self, preset_type):
"\n \n "
logger.debug('read presets for %s', self._device.name)
with self._file_open_rlock(preset_type) as f:
f.seek(0)
return (yaml.full_load(f) or {})<|docstring|>Utility function to get a particular preset's datum dictionary.<|endoftext|> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.