MCPcopy Create free account

hub / github.com/albertz/helpers / functions

Functions247 in github.com/albertz/helpers

↓ 33 callersMethodwrite
Send data to a process's standard input.
asyncproc.py:319
↓ 23 callersMethodread
Read data written by the process to its standard output.
asyncproc.py:279
↓ 18 callersMethodget
(self, tag, default=None)
our_exif.py:289
↓ 17 callersMethoditems
(self)
our_exif.py:270
↓ 10 callersFunctionbetter_exchook
Replacement for sys.excepthook. :param etype: exception type :param value: exception value :param tb: traceback :param bool debu
better_exchook.py:1226
↓ 7 callersFunctionis_source_code_missing_open_brackets
We check whether this source code snippet (e.g. one line) is complete/even w.r.t. opening/closing brackets. :param str source_code: :ret
better_exchook.py:436
↓ 7 callersFunctionis_stack_summary
:param StackSummary|object _tb: :rtype: bool
better_exchook.py:1047
↓ 7 callersFunctionparse_date
(date_str)
rename-dirs.py:64
↓ 6 callersMethodkeys
(self)
our_exif.py:267
↓ 6 callersFunctionparse_date_range
(date_str)
rename-dirs.py:83
↓ 6 callersMethodpy_syntax_highlight
:param str s: :rtype: str
better_exchook.py:670
↓ 5 callersMethodbuild_url
Build an API URL. This method adds scheme and hostname to the path returned from build_path. Args: target: A target url (e.g. '/files') to
webservicesession.py:98
↓ 5 callersFunctionget_same_indent_prefix
:param list[] lines: :rtype: str|None
better_exchook.py:516
↓ 5 callersMethodkill
Send a signal to the process. Raises OSError, with errno set to ECHILD, if the process is no longer running.
asyncproc.py:174
↓ 5 callersMethodupdate
(self)
cgroup-mem-log-rss-max.py:30
↓ 5 callersFunctionusage
()
indent-tabtospaces.py:8
↓ 5 callersFunctionusage
()
indent-spacestotabs.py:6
↓ 4 callersFunctionadd_indent_lines
:param str prefix: :param str s: :return: s with prefix indent added to all lines :rtype: str
better_exchook.py:493
↓ 4 callersFunctionbyteNumRepr
(c)
cgroup-mem-log-rss-max.py:10
↓ 4 callersFunctionformat_filename
:param str s: :rtype: str
better_exchook.py:1026
↓ 4 callersFunctionget_source_code
:param str filename: :param int lineno: :param dict[str]|None module_globals: :return: source code of that line (including newline)
better_exchook.py:448
↓ 4 callersFunctionmaybe_remove
Args: s (str): content (str): Returns: str:
rename-pics.py:97
↓ 4 callersFunctionremove_indent_lines
:param str s: :return: remove as much indentation as possible :rtype: str
better_exchook.py:531
↓ 4 callersMethodrequest
Perform a REST request and parse the response. Args: method: An HTTP method (e.g. 'GET' or 'POST'). url: The URL to m
rest.py:237
↓ 4 callersFunctionsubOut
(s2)
wolframalpha_translate.py:25
↓ 3 callersFunction_resolve_identifier
:param dict[str] namespace: :param tuple[str] keys: :return: namespace[name[0]][name[1]]...
better_exchook.py:1092
↓ 3 callersFunction_try_set
:param None|str old: :param str prefix: :param func: :return: old
better_exchook.py:1106
↓ 3 callersMethodbuild_access_headers
(self, params=None, withSessionKey=True)
webservicesession.py:201
↓ 3 callersFunctionbyteNumRepr
(c)
cgroup-mem-limit-watcher.py:9
↓ 3 callersMethodcloseinput
Close the standard input of a process, so it receives EOF.
asyncproc.py:329
↓ 3 callersMethodcolor
:param str s: :param str|None color: sth in self.ColorIdxTable :param bool bold: :return: s optionally wrapped with a
better_exchook.py:640
↓ 3 callersFunctionfixup
(value)
our_exif.py:728
↓ 3 callersMethodfold_text
:param str prefix: always visible :param str hidden: hidden If this is sys.stdout, it will replace that stream,
better_exchook.py:838
↓ 3 callersMethodfold_text_ctx
Folds text, via :class:`DomTerm`, if available. Notes that this temporarily overwrites self.lines. :param str line: always v
better_exchook.py:931
↓ 3 callersFunctionformat_date_str
(date)
rename-dirs.py:105
↓ 3 callersMethodload
(self, fp)
our_exif.py:383
↓ 3 callersFunctionparse_py_statement
Parse Python statement into tokens. Note that this is incomplete. It should be simple and fast and just barely enough for what we need he
better_exchook.py:94
↓ 3 callersMethodpid
Return the process id of the process. Note that if the process has died (and successfully been waited for), that process id may have been re
asyncproc.py:166
↓ 3 callersMethodrequest
(self, method, url, post_params=None, body=None, headers=None, raw_response=False)
rest.py:131
↓ 3 callersMethodstart
Start a program in the background, collecting its output. Returns an integer identifying the process. (Note that this integer is *not* the O
asyncproc.py:351
↓ 2 callersMethodPOST
Perform a POST request using RESTClient.request
rest.py:272
↓ 2 callersMethod__init__
(self, http_resp)
rest.py:304
↓ 2 callersFunction_dnsname_to_pat
(dn)
rest.py:53
↓ 2 callersFunction_escape_char
(_c)
better_exchook.py:113
↓ 2 callersFunction_format_final_exc_line
(etype, value)
better_exchook.py:1312
↓ 2 callersFunctionbaseStrCleanup
(s)
wolframalpha_translate.py:17
↓ 2 callersFunctionbuild_api_sig
(kwargs, api_secret)
webservicesession.py:36
↓ 2 callersMethodbuild_path
Build the path component for an API URL. This method urlencodes the parameters, adds them to the end of the target url, and puts a marker for the
webservicesession.py:70
↓ 2 callersFunctioncollect_file
(f: str, args)
rename-pics.py:158
↓ 2 callersFunctiondebug_shell
Spawns some interactive shell. Tries to use IPython if available. Falls back to :func:`pdb.post_mortem` or :func:`simple_debug_shell`. :
better_exchook.py:281
↓ 2 callersFunctionfallback_findfile
:param str filename: :return: try to find the full filename, e.g. in modules, etc :rtype: str|None
better_exchook.py:370
↓ 2 callersFunctionfile_time_creation
(f)
rename-pics.py:36
↓ 2 callersFunctionformat_tb
:param types.TracebackType|types.FrameType|StackSummary tb: traceback. if None, will use sys._getframe :param int|None limit: limit the trace
better_exchook.py:1011
↓ 2 callersMethodfrom_frame_summary
:param FrameSummary f: :rtype: DummyFrame
better_exchook.py:1512
↓ 2 callersFunctionget_current_frame
:return: current frame object (excluding this function call) :rtype: types.FrameType Uses sys._getframe if available, otherwise some tri
better_exchook.py:1388
↓ 2 callersFunctionget_indent_prefix
:param str s: :return: the indent spaces of s :rtype: str
better_exchook.py:507
↓ 2 callersMethodget_rss
(self)
cgroup-mem-log-rss-max.py:25
↓ 2 callersFunctiongetexif
(filename: str)
rename-pics.py:124
↓ 2 callersFunctioninstall
Replaces sys.excepthook by our better_exchook.
better_exchook.py:1564
↓ 2 callersMethodis_domterm
:return: whether we are inside DomTerm :rtype: bool
better_exchook.py:765
↓ 2 callersFunctionis_source_code_missing_brackets
We check whether this source code snippet (e.g. one line) is complete/even w.r.t. opening/closing brackets. :param str source_code: :par
better_exchook.py:396
↓ 2 callersFunctionjson_loadb
(data)
rest.py:122
↓ 2 callersFunctionopenurl
(h, d)
grab-pdfs.py:45
↓ 2 callersFunctionout
(c)
wolframalpha_translate.py:12
↓ 2 callersFunctionrecglob
This function iterates ``dirname(filepattern) + "/**/" + basename(filepattern)``, where ``filepattern`` is matched via :func:`fnmatchex`.
recglob.py:10
↓ 2 callersFunctionreplace_tab_indents
:param str s: multi-line string with tabs :param str replace: e.g. 4 spaces :rtype: str
better_exchook.py:556
↓ 2 callersMethodreset
(self)
our_exif.py:259
↓ 2 callersFunctionset_linecache
The :mod:`linecache` module has some cache of the source code for the current source. Sometimes it fails to find the source of some files.
better_exchook.py:220
↓ 2 callersFunctionusage
()
rename-dirs.py:16
↓ 2 callersMethodwait
Return the process' termination status. If bitmask parameter 'flags' contains os.WNOHANG, wait() will return None if the process hasn't ter
asyncproc.py:185
↓ 2 callersMethodwait
Unlike the os.wait() function, the process will be available even after ProcessManager.wait() has returned successfully, in order for
asyncproc.py:384
↓ 2 callersFunctionwith_timeout
Call a function, allowing it only to take a certain amount of time. Parameters: - timeout The time, in seconds, the function is allowed to spend
asyncproc.py:41
↓ 1 callersMethodGET
Perform a GET request using RESTClient.request
rest.py:267
↓ 1 callersMethod__call__
Adds to self.lines. This strange function signature is for historical reasons. :param str s1: :param str|None s2:
better_exchook.py:915
↓ 1 callersMethod__getitem__
(self, tag)
our_exif.py:279
↓ 1 callersMethod__init__
:param bool|None enable:
better_exchook.py:623
↓ 1 callersMethod__len__
(self)
our_exif.py:276
↓ 1 callersFunction_demo
Some demo.
better_exchook.py:1726
↓ 1 callersFunction_import_dummy_mod_by_path
:param str filename:
better_exchook.py:1631
↓ 1 callersFunction_main
Main entry point. Either calls the function, or just calls the demo.
better_exchook.py:1788
↓ 1 callersMethod_pp_extra_info
:param typing.Any|typing.Sized obj: :param int depth_limit: :rtype: str
better_exchook.py:956
↓ 1 callersFunction_safe_read
(fp, size)
our_exif.py:68
↓ 1 callersFunction_some_str
:param object value: :rtype: str
better_exchook.py:1300
↓ 1 callersMethod_temp_replace_attrib
(self, obj, attr, new_value)
better_exchook.py:813
↓ 1 callersFunctionadd_entry
(entry: str)
local-history-add.py:37
↓ 1 callersFunctionbetterRepr
(o)
lastfm-history-export.py:48
↓ 1 callersFunctionchange_ctime
Args: f (str): new_time (str): like "2017_09_05 13_23_49" Returns: Nothing.
rename-pics.py:212
↓ 1 callersFunctioncleanup_exif_tags
(exif: Dict[Any, Any])
rename-pics.py:23
↓ 1 callersFunctioncleanupstr
(s: Union[str, bytes])
cleanupstr.py:8
↓ 1 callersFunctioncollect
(fn: str, args)
rename-pics.py:232
↓ 1 callersFunctioncollect_dir
(dir: str, args)
rename-pics.py:207
↓ 1 callersMethodconnect
(self)
rest.py:43
↓ 1 callersFunctioncrawl
(d)
grab-pdfs.py:54
↓ 1 callersFunctioncreate_connection
(address)
rest.py:101
↓ 1 callersFunctiondump_exif
(filename: str)
rename-pics.py:137
↓ 1 callersFunctionf
()
better_exchook.py:1737
↓ 1 callersFunctionf1
(a)
better_exchook.py:1764
↓ 1 callersFunctionf2
(a, b)
better_exchook.py:1768
↓ 1 callersFunctionf3
(a)
better_exchook.py:1772
↓ 1 callersFunctionfile_ctime_underscore
(f)
rename-pics.py:149
next →1–100 of 247, ranked by callers