Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/albertz/helpers
/ functions
Functions
247 in github.com/albertz/helpers
⨍
Functions
247
◇
Types & classes
26
↓ 33 callers
Method
write
Send data to a process's standard input.
asyncproc.py:319
↓ 23 callers
Method
read
Read data written by the process to its standard output.
asyncproc.py:279
↓ 18 callers
Method
get
(self, tag, default=None)
our_exif.py:289
↓ 17 callers
Method
items
(self)
our_exif.py:270
↓ 10 callers
Function
better_exchook
Replacement for sys.excepthook. :param etype: exception type :param value: exception value :param tb: traceback :param bool debu
better_exchook.py:1226
↓ 7 callers
Function
is_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 callers
Function
is_stack_summary
:param StackSummary|object _tb: :rtype: bool
better_exchook.py:1047
↓ 7 callers
Function
parse_date
(date_str)
rename-dirs.py:64
↓ 6 callers
Method
keys
(self)
our_exif.py:267
↓ 6 callers
Function
parse_date_range
(date_str)
rename-dirs.py:83
↓ 6 callers
Method
py_syntax_highlight
:param str s: :rtype: str
better_exchook.py:670
↓ 5 callers
Method
build_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 callers
Function
get_same_indent_prefix
:param list[] lines: :rtype: str|None
better_exchook.py:516
↓ 5 callers
Method
kill
Send a signal to the process. Raises OSError, with errno set to ECHILD, if the process is no longer running.
asyncproc.py:174
↓ 5 callers
Method
update
(self)
cgroup-mem-log-rss-max.py:30
↓ 5 callers
Function
usage
()
indent-tabtospaces.py:8
↓ 5 callers
Function
usage
()
indent-spacestotabs.py:6
↓ 4 callers
Function
add_indent_lines
:param str prefix: :param str s: :return: s with prefix indent added to all lines :rtype: str
better_exchook.py:493
↓ 4 callers
Function
byteNumRepr
(c)
cgroup-mem-log-rss-max.py:10
↓ 4 callers
Function
format_filename
:param str s: :rtype: str
better_exchook.py:1026
↓ 4 callers
Function
get_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 callers
Function
maybe_remove
Args: s (str): content (str): Returns: str:
rename-pics.py:97
↓ 4 callers
Function
remove_indent_lines
:param str s: :return: remove as much indentation as possible :rtype: str
better_exchook.py:531
↓ 4 callers
Method
request
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 callers
Function
subOut
(s2)
wolframalpha_translate.py:25
↓ 3 callers
Function
_resolve_identifier
:param dict[str] namespace: :param tuple[str] keys: :return: namespace[name[0]][name[1]]...
better_exchook.py:1092
↓ 3 callers
Function
_try_set
:param None|str old: :param str prefix: :param func: :return: old
better_exchook.py:1106
↓ 3 callers
Method
build_access_headers
(self, params=None, withSessionKey=True)
webservicesession.py:201
↓ 3 callers
Function
byteNumRepr
(c)
cgroup-mem-limit-watcher.py:9
↓ 3 callers
Method
closeinput
Close the standard input of a process, so it receives EOF.
asyncproc.py:329
↓ 3 callers
Method
color
: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 callers
Function
fixup
(value)
our_exif.py:728
↓ 3 callers
Method
fold_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 callers
Method
fold_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 callers
Function
format_date_str
(date)
rename-dirs.py:105
↓ 3 callers
Method
load
(self, fp)
our_exif.py:383
↓ 3 callers
Function
parse_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 callers
Method
pid
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 callers
Method
request
(self, method, url, post_params=None, body=None, headers=None, raw_response=False)
rest.py:131
↓ 3 callers
Method
start
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 callers
Method
POST
Perform a POST request using RESTClient.request
rest.py:272
↓ 2 callers
Method
__init__
(self, http_resp)
rest.py:304
↓ 2 callers
Function
_dnsname_to_pat
(dn)
rest.py:53
↓ 2 callers
Function
_escape_char
(_c)
better_exchook.py:113
↓ 2 callers
Function
_format_final_exc_line
(etype, value)
better_exchook.py:1312
↓ 2 callers
Function
baseStrCleanup
(s)
wolframalpha_translate.py:17
↓ 2 callers
Function
build_api_sig
(kwargs, api_secret)
webservicesession.py:36
↓ 2 callers
Method
build_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 callers
Function
collect_file
(f: str, args)
rename-pics.py:158
↓ 2 callers
Function
debug_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 callers
Function
fallback_findfile
:param str filename: :return: try to find the full filename, e.g. in modules, etc :rtype: str|None
better_exchook.py:370
↓ 2 callers
Function
file_time_creation
(f)
rename-pics.py:36
↓ 2 callers
Function
format_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 callers
Method
from_frame_summary
:param FrameSummary f: :rtype: DummyFrame
better_exchook.py:1512
↓ 2 callers
Function
get_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 callers
Function
get_indent_prefix
:param str s: :return: the indent spaces of s :rtype: str
better_exchook.py:507
↓ 2 callers
Method
get_rss
(self)
cgroup-mem-log-rss-max.py:25
↓ 2 callers
Function
getexif
(filename: str)
rename-pics.py:124
↓ 2 callers
Function
install
Replaces sys.excepthook by our better_exchook.
better_exchook.py:1564
↓ 2 callers
Method
is_domterm
:return: whether we are inside DomTerm :rtype: bool
better_exchook.py:765
↓ 2 callers
Function
is_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 callers
Function
json_loadb
(data)
rest.py:122
↓ 2 callers
Function
openurl
(h, d)
grab-pdfs.py:45
↓ 2 callers
Function
out
(c)
wolframalpha_translate.py:12
↓ 2 callers
Function
recglob
This function iterates ``dirname(filepattern) + "/**/" + basename(filepattern)``, where ``filepattern`` is matched via :func:`fnmatchex`.
recglob.py:10
↓ 2 callers
Function
replace_tab_indents
:param str s: multi-line string with tabs :param str replace: e.g. 4 spaces :rtype: str
better_exchook.py:556
↓ 2 callers
Method
reset
(self)
our_exif.py:259
↓ 2 callers
Function
set_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 callers
Function
usage
()
rename-dirs.py:16
↓ 2 callers
Method
wait
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 callers
Method
wait
Unlike the os.wait() function, the process will be available even after ProcessManager.wait() has returned successfully, in order for
asyncproc.py:384
↓ 2 callers
Function
with_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 callers
Method
GET
Perform a GET request using RESTClient.request
rest.py:267
↓ 1 callers
Method
__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 callers
Method
__getitem__
(self, tag)
our_exif.py:279
↓ 1 callers
Method
__init__
:param bool|None enable:
better_exchook.py:623
↓ 1 callers
Method
__len__
(self)
our_exif.py:276
↓ 1 callers
Function
_demo
Some demo.
better_exchook.py:1726
↓ 1 callers
Function
_import_dummy_mod_by_path
:param str filename:
better_exchook.py:1631
↓ 1 callers
Function
_main
Main entry point. Either calls the function, or just calls the demo.
better_exchook.py:1788
↓ 1 callers
Method
_pp_extra_info
:param typing.Any|typing.Sized obj: :param int depth_limit: :rtype: str
better_exchook.py:956
↓ 1 callers
Function
_safe_read
(fp, size)
our_exif.py:68
↓ 1 callers
Function
_some_str
:param object value: :rtype: str
better_exchook.py:1300
↓ 1 callers
Method
_temp_replace_attrib
(self, obj, attr, new_value)
better_exchook.py:813
↓ 1 callers
Function
add_entry
(entry: str)
local-history-add.py:37
↓ 1 callers
Function
betterRepr
(o)
lastfm-history-export.py:48
↓ 1 callers
Function
change_ctime
Args: f (str): new_time (str): like "2017_09_05 13_23_49" Returns: Nothing.
rename-pics.py:212
↓ 1 callers
Function
cleanup_exif_tags
(exif: Dict[Any, Any])
rename-pics.py:23
↓ 1 callers
Function
cleanupstr
(s: Union[str, bytes])
cleanupstr.py:8
↓ 1 callers
Function
collect
(fn: str, args)
rename-pics.py:232
↓ 1 callers
Function
collect_dir
(dir: str, args)
rename-pics.py:207
↓ 1 callers
Method
connect
(self)
rest.py:43
↓ 1 callers
Function
crawl
(d)
grab-pdfs.py:54
↓ 1 callers
Function
create_connection
(address)
rest.py:101
↓ 1 callers
Function
dump_exif
(filename: str)
rename-pics.py:137
↓ 1 callers
Function
f
()
better_exchook.py:1737
↓ 1 callers
Function
f1
(a)
better_exchook.py:1764
↓ 1 callers
Function
f2
(a, b)
better_exchook.py:1768
↓ 1 callers
Function
f3
(a)
better_exchook.py:1772
↓ 1 callers
Function
file_ctime_underscore
(f)
rename-pics.py:149
next →
1–100 of 247, ranked by callers