text stringlengths 18 773k |
|---|
def _do_home_key(self, event=None, select=False):
""" Performs home key action """
# get nb char to first significative char
delta = (self.textCursor().positionInBlock() -
TextHelper(self).line_indent())
cursor = self.textCursor()
move = QtGui.QTextCursor.MoveAnc... |
def cached(key, timeout=3600):
"""Cache the return value of the decorated function with the given key.
Key can be a String or a function.
If key is a function, it must have the same arguments as the decorated function,
otherwise it cannot be called successfully.
"""
def decorator(f):
@... |
def _copy_cell_text(self):
"""
Copies the description of the selected message to the clipboard
"""
txt = self.currentItem().text()
QtWidgets.QApplication.clipboard().setText(txt) |
def clear(self):
"""
Clears the tables and the message list
"""
QtWidgets.QTableWidget.clear(self)
self.setRowCount(0)
self.setColumnCount(4)
self.setHorizontalHeaderLabels(
["Type", "File name", "Line", "Description"]) |
def _make_icon(cls, status):
"""
Make icon from icon filename/tuple (if you want to use a theme)
"""
icon = cls.ICONS[status]
if isinstance(icon, tuple):
return QtGui.QIcon.fromTheme(
icon[0], QtGui.QIcon(icon[1]))
elif isinstance(icon, str):
... |
def add_message(self, msg):
"""
Adds a checker message to the table.
:param msg: The message to append
:type msg: pyqode.core.modes.CheckerMessage
"""
row = self.rowCount()
self.insertRow(row)
# type
item = QtWidgets.QTableWidgetItem(
... |
def _on_item_activated(self, item):
"""
Emits the message activated signal
"""
msg = item.data(QtCore.Qt.UserRole)
self.msg_activated.emit(msg) |
def showDetails(self):
"""
Shows the error details.
"""
msg = self.currentItem().data(QtCore.Qt.UserRole)
desc = msg.description
desc = desc.replace('\r\n', '\n').replace('\r', '\n')
desc = desc.replace('\n', '<br/>')
QtWidgets.QMessageBox.information(
... |
def get_line(cls, parent, current_line, line_count):
"""
Gets user selected line.
:param parent: Parent widget
:param current_line: Current line number
:param line_count: Number of lines in the current text document.
:returns: tuple(line, status) status is False if the ... |
def close_panel(self):
"""
Closes the panel
"""
self.hide()
self.lineEditReplace.clear()
self.lineEditSearch.clear() |
def request_search(self, txt=None):
"""
Requests a search operation.
:param txt: The text to replace. If None, the content of lineEditSearch
is used instead.
"""
if self.checkBoxRegex.isChecked():
try:
re.compile(self.lineEditSearc... |
def _set_widget_background_color(widget, color):
"""
Changes the base color of a widget (background).
:param widget: widget to modify
:param color: the color to apply
"""
pal = widget.palette()
pal.setColor(pal.Base, color)
widget.setPalette(pal) |
def select_next(self):
"""
Selects the next occurrence.
:return: True in case of success, false if no occurrence could be
selected.
"""
current_occurence = self._current_occurrence()
occurrences = self.get_occurences()
if not occurrences:
... |
def replace(self, text=None):
"""
Replaces the selected occurrence.
:param text: The replacement text. If it is None, the lineEditReplace's
text is used instead.
:return True if the text could be replace properly, False if there is
no more occurrenc... |
def replace_all(self, text=None):
"""
Replaces all occurrences in the editor's document.
:param text: The replacement text. If None, the content of the lineEdit
replace will be used instead
"""
cursor = self.editor.textCursor()
cursor.beginEditBlock(... |
def _search_flags(self):
"""
Returns the user search flag: (regex, case_sensitive, whole_words).
"""
return (self.checkBoxRegex.isChecked(),
self.checkBoxCase.isChecked(),
self.checkBoxWholeWords.isChecked(),
self.checkBoxInSelection.isChec... |
def _create_decoration(self, selection_start, selection_end):
""" Creates the text occurences decoration """
deco = TextDecoration(self.editor.document(), selection_start,
selection_end)
deco.set_background(QtGui.QBrush(self.background))
deco.set_outline(sel... |
def _send_request(self):
"""
Sends the request to the backend.
"""
if isinstance(self._worker, str):
classname = self._worker
else:
classname = '%s.%s' % (self._worker.__module__,
self._worker.__name__)
self.reque... |
def send(self, obj, encoding='utf-8'):
"""
Sends a python object to the backend. The object **must be JSON
serialisable**.
:param obj: object to send
:param encoding: encoding used to encode the json message into a
bytes array, this should match CodeEdit.file.encodin... |
def _connect(self):
""" Connects our client socket to the backend socket """
if self is None:
return
comm('connecting to 127.0.0.1:%d', self._port)
address = QtNetwork.QHostAddress('127.0.0.1')
self.connectToHost(address, self._port)
if sys.platform == 'darwin... |
def _read_payload(self):
""" Reads the payload (=data) """
comm('reading payload data')
comm('remaining bytes to read: %d', self._to_read)
data_read = self.read(self._to_read)
nb_bytes_read = len(data_read)
comm('%d bytes read', nb_bytes_read)
self._data_buf += da... |
def _on_ready_read(self):
""" Read bytes when ready read """
while self.bytesAvailable():
if not self._header_complete:
self._read_header()
else:
self._read_payload() |
def _on_process_started(self):
""" Logs process started """
comm('backend process started')
if self is None:
return
self.starting = False
self.running = True |
def _on_process_error(self, error):
""" Logs process error """
if self is None:
return
if error not in PROCESS_ERROR_STRING:
error = -1
if not self._prevent_logs:
_logger().warning(PROCESS_ERROR_STRING[error]) |
def _on_process_stdout_ready(self):
""" Logs process output """
if not self:
return
o = self.readAllStandardOutput()
try:
output = bytes(o).decode(self._encoding)
except TypeError:
output = bytes(o.data()).decode(self._encoding)
for lin... |
def _on_process_stderr_ready(self):
""" Logs process output (stderr) """
try:
o = self.readAllStandardError()
except (TypeError, RuntimeError):
# widget already deleted
return
try:
output = bytes(o).decode(self._encoding)
except Typ... |
def replace_pattern(tokens, new_pattern):
""" Given a RegexLexer token dictionary 'tokens', replace all patterns that
match the token specified in 'new_pattern' with 'new_pattern'.
"""
for state in tokens.values():
for index, pattern in enumerate(state):
if isinstance(pattern, tu... |
def on_install(self, editor):
"""
:type editor: pyqode.code.api.CodeEdit
"""
self._clear_caches()
self._update_style()
super(PygmentsSH, self).on_install(editor) |
def set_mime_type(self, mime_type):
"""
Update the highlighter lexer based on a mime type.
:param mime_type: mime type of the new lexer to setup.
"""
try:
self.set_lexer_from_mime_type(mime_type)
except ClassNotFound:
_logger().exception('failed t... |
def set_lexer_from_filename(self, filename):
"""
Change the lexer based on the filename (actually only the extension is
needed)
:param filename: Filename or extension
"""
self._lexer = None
if filename.endswith("~"):
filename = filename[0:len(filename... |
def set_lexer_from_mime_type(self, mime, **options):
"""
Sets the pygments lexer from mime type.
:param mime: mime type
:param options: optional addtional options.
"""
self._lexer = get_lexer_for_mimetype(mime, **options)
_logger().debug('lexer for mimetype (%s):... |
def highlight_block(self, text, block):
"""
Highlights the block using a pygments lexer.
:param text: text of the block to highlith
:param block: block to highlight
"""
if self.color_scheme.name != self._pygments_style:
self._pygments_style = self.color_schem... |
def _update_style(self):
""" Sets the style to the specified Pygments style.
"""
try:
self._style = get_style_by_name(self._pygments_style)
except ClassNotFound:
# unknown style, also happen with plugins style when used from a
# frozen app.
... |
def _get_format(self, token):
""" Returns a QTextCharFormat for token or None.
"""
if token == Whitespace:
return self.editor.whitespaces_foreground
if token in self._formats:
return self._formats[token]
result = self._get_format_from_style(token, self._... |
def goto_line(self, line, column=0, move=True):
"""
Moves the text cursor to the specified position..
:param line: Number of the line to go to (0 based)
:param column: Optional column number. Default is 0 (start of line).
:param move: True to move the cursor. False will return t... |
def select_lines(self, start=0, end=-1, apply_selection=True):
"""
Selects entire lines between start and end line numbers.
This functions apply the selection and returns the text cursor that
contains the selection.
Optionally it is possible to prevent the selection from being ... |
def line_indent(self, line_nbr=None):
"""
Returns the indent level of the specified line
:param line_nbr: Number of the line to get indentation (1 base).
Pass None to use the current line number. Note that you can also
pass a QTextBlock instance instead of an int.
... |
def get_right_word(self, cursor=None):
"""
Gets the character on the right of the text cursor.
:param cursor: QTextCursor where the search will start.
:return: The word that is on the right of the text cursor.
"""
if cursor is None:
cursor = self._editor.tex... |
def search_text(self, text_cursor, search_txt, search_flags):
"""
Searches a text in a text document.
:param text_cursor: Current text cursor
:param search_txt: Text to search
:param search_flags: QTextDocument.FindFlags
:returns: the list of occurrences, the current occ... |
def is_comment_or_string(self, cursor_or_block, formats=None):
"""
Checks if a block/cursor is a string or a comment.
:param cursor_or_block: QTextCursor or QTextBlock
:param formats: the list of color scheme formats to consider. By
default, it will consider the following key... |
def match_select(self, ignored_symbols=None):
"""
Performs matched selection, selects text between matching quotes or
parentheses.
:param ignored_symbols; matching symbols to ignore.
"""
def filter_matching(ignored_symbols, matching):
"""
Removes ... |
def main():
"""Entrypoint for the console script gcp-devrel-py-tools."""
parser = argparse.ArgumentParser()
subparsers = parser.add_subparsers()
appengine.register_commands(subparsers)
requirements.register_commands(subparsers)
pylint.register_commands(subparsers)
args = parser.parse_args(... |
async def run(websession):
"""Run."""
try:
client = Client('17015', websession)
print('Client instantiated for ZIP "{0}"'.format(client.zip_code))
print()
print('CURRENT ALLERGENS')
print(await client.allergens.current())
print()
print('EXTENDED ALLERGEN... |
async def outlook(self) -> dict:
"""Get allergen outlook."""
try:
return await self._request(
'get', 'https://www.pollen.com/api/forecast/outlook')
except RequestError as err:
if '404' in str(err):
raise InvalidZipError('No data returned fo... |
def dev():
"""Define dev stage"""
env.roledefs = {
'web': ['192.168.1.2'],
'lb': ['192.168.1.2'],
}
env.user = 'vagrant'
env.backends = env.roledefs['web']
env.server_name = 'django_search_model-dev.net'
env.short_server_name = 'django_search_model-dev'
env.stat... |
def install_postgres(user=None, dbname=None, password=None):
"""Install Postgres on remote"""
execute(pydiploy.django.install_postgres_server,
user=user, dbname=dbname, password=password) |
def field_to_dict(fields):
"""
Build dictionnary which dependancy for each field related to "root"
fields = ["toto", "toto__tata", "titi__tutu"]
dico = {
"toto": {
EMPTY_DICT,
"tata": EMPTY_DICT
},
"titi" : {
... |
def alias_field(model, field):
"""
Return the prefix name of a field
"""
for part in field.split(LOOKUP_SEP)[:-1]:
model = associate_model(model,part)
return model.__name__ + "-" + field.split(LOOKUP_SEP)[-1] |
def associate_model(model, field):
"""
Return the model associate to the ForeignKey or ManyToMany
relation
"""
class_field = model._meta.get_field(field)
if hasattr(class_field, "field"):
return class_field.field.related.related_model
else:
return class_field.related_model |
def get_formfield(model, field):
"""
Return the formfied associate to the field of the model
"""
class_field = model._meta.get_field(field)
if hasattr(class_field, "field"):
formfield = class_field.field.formfield()
else:
formfield = class_field.formfield()
# Otherwise ... |
def get_q_object(self):
"""
Build Q object to filter the queryset
"""
q_object = Q()
for field in self.searchable_fields:
value = self.request.GET.getlist(alias_field(self.model, field), None)
mini_q = Q()
for val in value:
attr... |
def get_search_form(self):
"""
Return list of form based on model
"""
magic_dico_form = self.get_dict_for_forms()
forms = []
initial = list(self.request.GET.lists())
for key, value in magic_dico_form.items():
form = Form()
model = value["m... |
def get_dict_for_forms(self):
"""
Build a dictionnary where searchable_fields are
next to their model to be use in modelform_factory
dico = {
"str(model)" : {
"model" : Model,
"fields" = [] #searchable_fields which are attribut... |
def raise_on_invalid_zip(func: Callable) -> Callable:
"""Raise an exception when there's no data (via a bad ZIP code)."""
async def decorator(*args: list, **kwargs: dict) -> dict:
"""Decorate."""
data = await func(*args, **kwargs)
if not data['Location']['periods']:
raise Inv... |
def parse(self):
"""
Parses a GIT URL and returns an object. Raises an exception on invalid
URL.
:returns: Parsed object
:raise: :class:`.ParserError`
"""
d = {
'pathname': None,
'protocols': self._get_protocols(),
'protocol':... |
async def _request(
self,
method: str,
url: str,
*,
headers: dict = None,
params: dict = None,
json: dict = None) -> dict:
"""Make a request against AirVisual."""
full_url = '{0}/{1}'.format(url, self.zip_code)
p... |
def setup_errors(app, error_template="error.html"):
"""Add a handler for each of the available HTTP error responses."""
def error_handler(error):
if isinstance(error, HTTPException):
description = error.get_description(request.environ)
code = error.code
name = error.n... |
def domain_search(self, domain=None, company=None, limit=None, offset=None,
emails_type=None, raw=False):
"""
Return all the email addresses found for a given domain.
:param domain: The domain on which to search for emails. Must be
defined if company is not.
... |
def email_finder(self, domain=None, company=None, first_name=None,
last_name=None, full_name=None, raw=False):
"""
Find the email address of a person given its name and company's domain.
:param domain: The domain of the company where the person works. Must
be define... |
def email_verifier(self, email, raw=False):
"""
Verify the deliverability of a given email adress.abs
:param email: The email adress to check.
:param raw: Gives back the entire response instead of just the 'data'.
:return: Full payload of the query as a dict.
"""
... |
def email_count(self, domain=None, company=None, raw=False):
"""
Give back the number of email adresses Hunter has for this domain/company.
:param domain: The domain of the company where the person works. Must
be defined if company is not. If both 'domain' and 'company' are given,
... |
def account_information(self, raw=False):
"""
Gives the information about the account associated with the api_key.
:param raw: Gives back the entire response instead of just the 'data'.
:return: Full payload of the query as a dict.
"""
params = self.base_params
... |
def get_leads(self, offset=None, limit=None, lead_list_id=None,
first_name=None, last_name=None, email=None, company=None,
phone_number=None, twitter=None):
"""
Gives back all the leads saved in your account.
:param offset: Number of leads to skip.
:... |
def get_lead(self, lead_id):
"""
Get a specific lead saved on your account.
:param lead_id: Id of the lead to search. Must be defined.
:return: Lead found as a dict.
"""
params = self.base_params
endpoint = self.base_endpoint.format('leads/' + str(lead_id))
... |
def create_lead(self, first_name, last_name, email=None, position=None,
company=None, company_industry=None, company_size=None,
confidence_score=None, website=None, country_code=None,
postal_code=None, source=None, linkedin_url=None,
phone_... |
def get_leads_lists(self, offset=None, limit=None):
"""
Gives back all the leads lists saved on your account.
:param offset: Number of lists to skip.
:param limit: Maximum number of lists to return.
:return: Leads lists found as a dict.
"""
params = self.base_p... |
def create_leads_list(self, name, team_id=None):
"""
Create a leads list.
:param name: Name of the list to create. Must be defined.
:param team_id: The id of the list to share this list with.
:return: The created leads list as a dict.
"""
params = self.base_par... |
def update_leads_list(self, leads_list_id, name, team_id=None):
"""
Update a leads list.
:param name: Name of the list to update. Must be defined.
:param team_id: The id of the list to share this list with.
:return: 204 Response.
"""
params = self.base_params
... |
def delete_leads_list(self, leads_list_id):
"""
Delete a leads list.
:param leads_list_id: The id of the list to delete.
:return: 204 Response.
"""
params = self.base_params
endpoint = self.base_endpoint.format(
'leads_lists/' +
str(lead... |
def to_int(s):
""" converts a string to an integer
>>> to_int('1_000_000')
1000000
>>> to_int('1e6')
1000000
>>> to_int('1000')
1000
"""
try:
return int(s.replace('_', ''))
except ValueError:
return int(ast.literal_eval(s)) |
def dicts_from_lines(lines):
""" returns a generator producing dicts from json lines
1 JSON object per line is supported:
{"name": "n1"}
{"name": "n2"}
Or 1 JSON object:
{
"name": "n1"
}
Or a list of JSON objects:
[
{"name": "n1"},
... |
def compose(*funcs):
"""
Compose any number of unary functions into a single unary function.
>>> import textwrap
>>> from six import text_type
>>> stripped = text_type.strip(textwrap.dedent(compose.__doc__))
>>> compose(text_type.strip, textwrap.dedent)(compose.__doc__) == stripped
True
Compose also allows th... |
def method_caller(method_name, *args, **kwargs):
"""
Return a function that will call a named method on the
target object with optional positional and keyword
arguments.
>>> lower = method_caller('lower')
>>> lower('MyString')
'mystring'
"""
def call_method(target):
func = getattr(target, method_name)
ret... |
def once(func):
"""
Decorate func so it's only ever called the first time.
This decorator can ensure that an expensive or non-idempotent function
will not be expensive on subsequent calls and is idempotent.
>>> add_three = once(lambda a: a+3)
>>> add_three(3)
6
>>> add_three(9)
6
>>> add_three('12')
6
To... |
def method_cache(method, cache_wrapper=None):
"""
Wrap lru_cache to support storing the cache data in the object instances.
Abstracts the common paradigm where the method explicitly saves an
underscore-prefixed protected property on first call and returns that
subsequently.
>>> class MyClass:
... calls = 0... |
def _special_method_cache(method, cache_wrapper):
"""
Because Python treats special methods differently, it's not
possible to use instance attributes to implement the cached
methods.
Instead, install the wrapper method under a different name
and return a simple proxy to that wrapper.
https://github.com/jaraco/... |
def result_invoke(action):
r"""
Decorate a function with an action function that is
invoked on the results returned from the decorated
function (for its side-effect), then return the original
result.
>>> @result_invoke(print)
... def add_two(a, b):
... return a + b
>>> x = add_two(2, 3)
5
"""
def wrap(... |
def first_invoke(func1, func2):
"""
Return a function that when invoked will invoke func1 without
any parameters (for its side-effect) and then invoke func2
with whatever parameters were passed, returning its result.
"""
def wrapper(*args, **kwargs):
func1()
return func2(*args, **kwargs)
return wrapper |
def retry_call(func, cleanup=lambda: None, retries=0, trap=()):
"""
Given a callable func, trap the indicated exceptions
for up to 'retries' times, invoking cleanup on the
exception. On the final attempt, allow any exceptions
to propagate.
"""
attempts = count() if retries == float('inf') else range(retries)
fo... |
def retry(*r_args, **r_kwargs):
"""
Decorator wrapper for retry_call. Accepts arguments to retry_call
except func and then returns a decorator for the decorated function.
Ex:
>>> @retry(retries=3)
... def my_func(a, b):
... "this is my funk"
... print(a, b)
>>> my_func.__doc__
'this is my funk'
"""... |
def print_yielded(func):
"""
Convert a generator into a function that prints all yielded elements
>>> @print_yielded
... def x():
... yield 3; yield None
>>> x()
3
None
"""
print_all = functools.partial(map, print)
print_results = compose(more_itertools.recipes.consume, print_all, func)
return functool... |
def pass_none(func):
"""
Wrap func so it's not called if its first param is None
>>> print_text = pass_none(print)
>>> print_text('text')
text
>>> print_text(None)
"""
@functools.wraps(func)
def wrapper(param, *args, **kwargs):
if param is not None:
return func(param, *args, **kwargs)
return wrapper |
def assign_params(func, namespace):
"""
Assign parameters from namespace where func solicits.
>>> def func(x, y=3):
... print(x, y)
>>> assigned = assign_params(func, dict(x=2, z=4))
>>> assigned()
2 3
The usual errors are raised if a function doesn't receive
its required parameters:
>>> assigned = ass... |
def save_method_args(method):
"""
Wrap a method such that when it is called, the args and kwargs are
saved on the method.
>>> class MyClass:
... @save_method_args
... def method(self, a, b):
... print(a, b)
>>> my_ob = MyClass()
>>> my_ob.method(1, 2)
1 2
>>> my_ob._saved_method.args
(1, 2)... |
def _wait(self):
"ensure at least 1/max_rate seconds from last call"
elapsed = time.time() - self.last_called
must_wait = 1 / self.max_rate - elapsed
time.sleep(max(0, must_wait))
self.last_called = time.time() |
def row_col_maker(app, fromdocname, all_needs, need_info, need_key, make_ref=False, ref_lookup=False, prefix=''):
"""
Creates and returns a column.
:param app: current sphinx app
:param fromdocname: current document
:param all_needs: Dictionary of all need objects
:param need_info: need_info ob... |
def insert_blob(filename, hosts=None, table=None):
"""Upload a file into a blob table """
conn = connect(hosts)
container = conn.get_blob_container(table)
with open(filename, 'rb') as f:
digest = container.put(f)
return '{server}/_blobs/{table}/{digest}'.format(
server=conn.client.ac... |
def update_dois(csv_source, write_file=True):
"""
Get DOI publication info for a batch of DOIs. This is LiPD-independent and only requires a CSV file with all DOIs
listed in a single column. The output is LiPD-formatted publication data for each entry.
:param str csv_source: Local path to CSV file
... |
def write_json_to_file(json_data, filename="metadata"):
"""
Write all JSON in python dictionary to a new json file.
:param any json_data: JSON data
:param str filename: Target filename (defaults to 'metadata.jsonld')
:return None:
"""
# Use demjson to maintain unicode characters in output
... |
def compile_authors(authors):
"""
Compiles authors "Last, First" into a single list
:param list authors: Raw author data retrieved from doi.org
:return list: Author objects
"""
author_list = []
for person in authors:
author_list.append({'name': person['family'] + ", " + person['given... |
def compile_fetch(raw, doi_id):
"""
Loop over Raw and add selected items to Fetch with proper formatting
:param dict raw: JSON data from doi.org
:param str doi_id:
:return dict:
"""
fetch_dict = OrderedDict()
order = {'author': 'author', 'type': 'type', 'identifier': '', 'title': 'title'... |
def get_data(doi_id):
"""
Resolve DOI and compile all attributes into one dictionary
:param str doi_id:
:param int idx: Publication index
:return dict: Updated publication dictionary
"""
fetch_dict = {}
try:
# Send request to grab metadata at URL
print("Requesting : {}"... |
def clean_doi(doi_string):
"""
Use regex to extract all DOI ids from string (i.e. 10.1029/2005pa001215)
:param str doi_string: Raw DOI string value from input file. Often not properly formatted.
:return list: DOI ids. May contain 0, 1, or multiple ids.
"""
regex = re.compile(r'\b(10[.][0-9]{3,}... |
def log_benchmark(fn, start, end):
"""
Log a given function and how long the function takes in seconds
:param str fn: Function name
:param float start: Function start time
:param float end: Function end time
:return none:
"""
elapsed = round(end - start, 2)
line = ("Benchmark - Funct... |
def update_changelog():
"""
Create or update the changelog txt file. Prompt for update description.
:return None:
"""
# description = input("Please enter a short description for this update:\n ")
description = 'Placeholder for description here.'
# open changelog file for appending. if doesn... |
def create_benchmark(name, log_file, level=logging.INFO):
"""
Creates a logger for function benchmark times
:param str name: Name of the logger
:param str log_file: Filename
:return obj: Logger
"""
handler = logging.FileHandler(log_file)
rtf_handler = RotatingFileHandler(log_file, maxByt... |
def create_logger(name):
"""
Creates a logger with the below attributes.
:param str name: Name of the logger
:return obj: Logger
"""
logging.config.dictConfig({
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'simple': {
'forma... |
def timeit(hosts=None,
stmt=None,
warmup=30,
repeat=None,
duration=None,
concurrency=1,
output_fmt=None,
fail_if=None,
sample_mode='reservoir'):
"""Run the given statement a number of times and return the runtime stats
Args... |
def get_download_path():
"""
Determine the OS and the associated download folder.
:return str Download path:
"""
if os.name == 'nt':
import winreg
sub_key = r'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders'
downloads_guid = '{374DE290-123F-4565-9164-39C4925E... |
def download_file(src_url, dst_path):
"""
Use the given URL and destination to download and save a file
:param str src_url: Direct URL to lipd file download
:param str dst_path: Local path to download file to, including filename and ext. ex. /path/to/filename.lpd
:return none:
"""
if "MD9821... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.