partition stringclasses 3
values | func_name stringlengths 1 134 | docstring stringlengths 1 46.9k | path stringlengths 4 223 | original_string stringlengths 75 104k | code stringlengths 75 104k | docstring_tokens listlengths 1 1.97k | repo stringlengths 7 55 | language stringclasses 1
value | url stringlengths 87 315 | code_tokens listlengths 19 28.4k | sha stringlengths 40 40 |
|---|---|---|---|---|---|---|---|---|---|---|---|
test | TaskImporter.parse_category | Converts the text category to a tasks.Category instance. | sample_project/tasks/importers.py | def parse_category(self, item, field_name, source_name):
"""
Converts the text category to a tasks.Category instance.
"""
# Get and checks for the corresponding slug
slug = category_map.get(self.get_value(item, source_name), None)
if not slug:
return None
... | def parse_category(self, item, field_name, source_name):
"""
Converts the text category to a tasks.Category instance.
"""
# Get and checks for the corresponding slug
slug = category_map.get(self.get_value(item, source_name), None)
if not slug:
return None
... | [
"Converts",
"the",
"text",
"category",
"to",
"a",
"tasks",
".",
"Category",
"instance",
"."
] | ricobl/django-importer | python | https://github.com/ricobl/django-importer/blob/6967adfa7a286be7aaf59d3f33c6637270bd9df6/sample_project/tasks/importers.py#L50-L62 | [
"def",
"parse_category",
"(",
"self",
",",
"item",
",",
"field_name",
",",
"source_name",
")",
":",
"# Get and checks for the corresponding slug",
"slug",
"=",
"category_map",
".",
"get",
"(",
"self",
".",
"get_value",
"(",
"item",
",",
"source_name",
")",
",",
... | 6967adfa7a286be7aaf59d3f33c6637270bd9df6 |
test | TaskImporter.parse_date | Converts the date in the format: Thu 03.
As only the day is provided, tries to find the best match
based on the current date, considering that dates are on
the past. | sample_project/tasks/importers.py | def parse_date(self, item, field_name, source_name):
"""
Converts the date in the format: Thu 03.
As only the day is provided, tries to find the best match
based on the current date, considering that dates are on
the past.
"""
# Get the current date
now =... | def parse_date(self, item, field_name, source_name):
"""
Converts the date in the format: Thu 03.
As only the day is provided, tries to find the best match
based on the current date, considering that dates are on
the past.
"""
# Get the current date
now =... | [
"Converts",
"the",
"date",
"in",
"the",
"format",
":",
"Thu",
"03",
"."
] | ricobl/django-importer | python | https://github.com/ricobl/django-importer/blob/6967adfa7a286be7aaf59d3f33c6637270bd9df6/sample_project/tasks/importers.py#L64-L88 | [
"def",
"parse_date",
"(",
"self",
",",
"item",
",",
"field_name",
",",
"source_name",
")",
":",
"# Get the current date",
"now",
"=",
"datetime",
".",
"now",
"(",
")",
".",
"date",
"(",
")",
"# Get the date from the source",
"val",
"=",
"self",
".",
"get_val... | 6967adfa7a286be7aaf59d3f33c6637270bd9df6 |
test | TaskImporter.parse_totals | Parse numeric fields. | sample_project/tasks/importers.py | def parse_totals(self, item, field_name, source_name):
"""
Parse numeric fields.
"""
val = self.get_value(item, source_name)
try:
return int(val)
except:
return 0 | def parse_totals(self, item, field_name, source_name):
"""
Parse numeric fields.
"""
val = self.get_value(item, source_name)
try:
return int(val)
except:
return 0 | [
"Parse",
"numeric",
"fields",
"."
] | ricobl/django-importer | python | https://github.com/ricobl/django-importer/blob/6967adfa7a286be7aaf59d3f33c6637270bd9df6/sample_project/tasks/importers.py#L90-L98 | [
"def",
"parse_totals",
"(",
"self",
",",
"item",
",",
"field_name",
",",
"source_name",
")",
":",
"val",
"=",
"self",
".",
"get_value",
"(",
"item",
",",
"source_name",
")",
"try",
":",
"return",
"int",
"(",
"val",
")",
"except",
":",
"return",
"0"
] | 6967adfa7a286be7aaf59d3f33c6637270bd9df6 |
test | XMLImporter.get_items | Iterator of the list of items in the XML source. | django_importer/importers/xml_importer.py | def get_items(self):
"""
Iterator of the list of items in the XML source.
"""
# Use `iterparse`, it's more efficient, specially for big files
for event, item in ElementTree.iterparse(self.source):
if item.tag == self.item_tag_name:
yield item
... | def get_items(self):
"""
Iterator of the list of items in the XML source.
"""
# Use `iterparse`, it's more efficient, specially for big files
for event, item in ElementTree.iterparse(self.source):
if item.tag == self.item_tag_name:
yield item
... | [
"Iterator",
"of",
"the",
"list",
"of",
"items",
"in",
"the",
"XML",
"source",
"."
] | ricobl/django-importer | python | https://github.com/ricobl/django-importer/blob/6967adfa7a286be7aaf59d3f33c6637270bd9df6/django_importer/importers/xml_importer.py#L39-L48 | [
"def",
"get_items",
"(",
"self",
")",
":",
"# Use `iterparse`, it's more efficient, specially for big files",
"for",
"event",
",",
"item",
"in",
"ElementTree",
".",
"iterparse",
"(",
"self",
".",
"source",
")",
":",
"if",
"item",
".",
"tag",
"==",
"self",
".",
... | 6967adfa7a286be7aaf59d3f33c6637270bd9df6 |
test | XMLImporter.get_value | This method receives an item from the source and a source name,
and returns the text content for the `source_name` node. | django_importer/importers/xml_importer.py | def get_value(self, item, source_name):
"""
This method receives an item from the source and a source name,
and returns the text content for the `source_name` node.
"""
return force_text(smart_str(item.findtext(source_name))).strip() | def get_value(self, item, source_name):
"""
This method receives an item from the source and a source name,
and returns the text content for the `source_name` node.
"""
return force_text(smart_str(item.findtext(source_name))).strip() | [
"This",
"method",
"receives",
"an",
"item",
"from",
"the",
"source",
"and",
"a",
"source",
"name",
"and",
"returns",
"the",
"text",
"content",
"for",
"the",
"source_name",
"node",
"."
] | ricobl/django-importer | python | https://github.com/ricobl/django-importer/blob/6967adfa7a286be7aaf59d3f33c6637270bd9df6/django_importer/importers/xml_importer.py#L50-L55 | [
"def",
"get_value",
"(",
"self",
",",
"item",
",",
"source_name",
")",
":",
"return",
"force_text",
"(",
"smart_str",
"(",
"item",
".",
"findtext",
"(",
"source_name",
")",
")",
")",
".",
"strip",
"(",
")"
] | 6967adfa7a286be7aaf59d3f33c6637270bd9df6 |
test | Importer.save_error | Saves an error in the error list. | django_importer/importers/base.py | def save_error(self, data, exception_info):
"""
Saves an error in the error list.
"""
# TODO: what to do with errors? Let it flow? Write to a log file?
self.errors.append({'data': data,
'exception': ''.join(format_exception(*exception_info)),
... | def save_error(self, data, exception_info):
"""
Saves an error in the error list.
"""
# TODO: what to do with errors? Let it flow? Write to a log file?
self.errors.append({'data': data,
'exception': ''.join(format_exception(*exception_info)),
... | [
"Saves",
"an",
"error",
"in",
"the",
"error",
"list",
"."
] | ricobl/django-importer | python | https://github.com/ricobl/django-importer/blob/6967adfa7a286be7aaf59d3f33c6637270bd9df6/django_importer/importers/base.py#L39-L46 | [
"def",
"save_error",
"(",
"self",
",",
"data",
",",
"exception_info",
")",
":",
"# TODO: what to do with errors? Let it flow? Write to a log file?",
"self",
".",
"errors",
".",
"append",
"(",
"{",
"'data'",
":",
"data",
",",
"'exception'",
":",
"''",
".",
"join",
... | 6967adfa7a286be7aaf59d3f33c6637270bd9df6 |
test | Importer.parse | Parses all data from the source, saving model instances. | django_importer/importers/base.py | def parse(self):
"""
Parses all data from the source, saving model instances.
"""
# Checks if the source is loaded
if not self.loaded:
self.load(self.source)
for item in self.get_items():
# Parse the fields from the source into a dict
... | def parse(self):
"""
Parses all data from the source, saving model instances.
"""
# Checks if the source is loaded
if not self.loaded:
self.load(self.source)
for item in self.get_items():
# Parse the fields from the source into a dict
... | [
"Parses",
"all",
"data",
"from",
"the",
"source",
"saving",
"model",
"instances",
"."
] | ricobl/django-importer | python | https://github.com/ricobl/django-importer/blob/6967adfa7a286be7aaf59d3f33c6637270bd9df6/django_importer/importers/base.py#L48-L70 | [
"def",
"parse",
"(",
"self",
")",
":",
"# Checks if the source is loaded",
"if",
"not",
"self",
".",
"loaded",
":",
"self",
".",
"load",
"(",
"self",
".",
"source",
")",
"for",
"item",
"in",
"self",
".",
"get_items",
"(",
")",
":",
"# Parse the fields from... | 6967adfa7a286be7aaf59d3f33c6637270bd9df6 |
test | Importer.parse_item | Receives an item and returns a dictionary of field values. | django_importer/importers/base.py | def parse_item(self, item):
"""
Receives an item and returns a dictionary of field values.
"""
# Create a dictionary from values for each field
parsed_data = {}
for field_name in self.fields:
# A field-name may be mapped to another identifier on the s... | def parse_item(self, item):
"""
Receives an item and returns a dictionary of field values.
"""
# Create a dictionary from values for each field
parsed_data = {}
for field_name in self.fields:
# A field-name may be mapped to another identifier on the s... | [
"Receives",
"an",
"item",
"and",
"returns",
"a",
"dictionary",
"of",
"field",
"values",
"."
] | ricobl/django-importer | python | https://github.com/ricobl/django-importer/blob/6967adfa7a286be7aaf59d3f33c6637270bd9df6/django_importer/importers/base.py#L72-L95 | [
"def",
"parse_item",
"(",
"self",
",",
"item",
")",
":",
"# Create a dictionary from values for each field",
"parsed_data",
"=",
"{",
"}",
"for",
"field_name",
"in",
"self",
".",
"fields",
":",
"# A field-name may be mapped to another identifier on the source,",
"# it could... | 6967adfa7a286be7aaf59d3f33c6637270bd9df6 |
test | Importer.get_instance | Get an item from the database or an empty one if not found. | django_importer/importers/base.py | def get_instance(self, data):
"""
Get an item from the database or an empty one if not found.
"""
# Get unique fields
unique_fields = self.unique_fields
# If there are no unique fields option, all items are new
if not unique_fields:
return sel... | def get_instance(self, data):
"""
Get an item from the database or an empty one if not found.
"""
# Get unique fields
unique_fields = self.unique_fields
# If there are no unique fields option, all items are new
if not unique_fields:
return sel... | [
"Get",
"an",
"item",
"from",
"the",
"database",
"or",
"an",
"empty",
"one",
"if",
"not",
"found",
"."
] | ricobl/django-importer | python | https://github.com/ricobl/django-importer/blob/6967adfa7a286be7aaf59d3f33c6637270bd9df6/django_importer/importers/base.py#L97-L117 | [
"def",
"get_instance",
"(",
"self",
",",
"data",
")",
":",
"# Get unique fields",
"unique_fields",
"=",
"self",
".",
"unique_fields",
"# If there are no unique fields option, all items are new",
"if",
"not",
"unique_fields",
":",
"return",
"self",
".",
"model",
"(",
"... | 6967adfa7a286be7aaf59d3f33c6637270bd9df6 |
test | Importer.feed_instance | Feeds a model instance using parsed data (usually from `parse_item`). | django_importer/importers/base.py | def feed_instance(self, data, instance):
"""
Feeds a model instance using parsed data (usually from `parse_item`).
"""
for prop, val in data.items():
setattr(instance, prop, val)
return instance | def feed_instance(self, data, instance):
"""
Feeds a model instance using parsed data (usually from `parse_item`).
"""
for prop, val in data.items():
setattr(instance, prop, val)
return instance | [
"Feeds",
"a",
"model",
"instance",
"using",
"parsed",
"data",
"(",
"usually",
"from",
"parse_item",
")",
"."
] | ricobl/django-importer | python | https://github.com/ricobl/django-importer/blob/6967adfa7a286be7aaf59d3f33c6637270bd9df6/django_importer/importers/base.py#L119-L125 | [
"def",
"feed_instance",
"(",
"self",
",",
"data",
",",
"instance",
")",
":",
"for",
"prop",
",",
"val",
"in",
"data",
".",
"items",
"(",
")",
":",
"setattr",
"(",
"instance",
",",
"prop",
",",
"val",
")",
"return",
"instance"
] | 6967adfa7a286be7aaf59d3f33c6637270bd9df6 |
test | Importer.save_item | Saves a model instance to the database. | django_importer/importers/base.py | def save_item(self, item, data, instance, commit=True):
"""
Saves a model instance to the database.
"""
if commit:
instance.save()
return instance | def save_item(self, item, data, instance, commit=True):
"""
Saves a model instance to the database.
"""
if commit:
instance.save()
return instance | [
"Saves",
"a",
"model",
"instance",
"to",
"the",
"database",
"."
] | ricobl/django-importer | python | https://github.com/ricobl/django-importer/blob/6967adfa7a286be7aaf59d3f33c6637270bd9df6/django_importer/importers/base.py#L127-L133 | [
"def",
"save_item",
"(",
"self",
",",
"item",
",",
"data",
",",
"instance",
",",
"commit",
"=",
"True",
")",
":",
"if",
"commit",
":",
"instance",
".",
"save",
"(",
")",
"return",
"instance"
] | 6967adfa7a286be7aaf59d3f33c6637270bd9df6 |
test | download_file | Downloads a HTTP resource from `url` and save to `dest`.
Capable of dealing with Gzip compressed content. | django_importer/utils.py | def download_file(url, dest):
"""
Downloads a HTTP resource from `url` and save to `dest`.
Capable of dealing with Gzip compressed content.
"""
# Create the HTTP request
request = urllib2.Request(url)
# Add the header to accept gzip encoding
request.add_header('Accept-enco... | def download_file(url, dest):
"""
Downloads a HTTP resource from `url` and save to `dest`.
Capable of dealing with Gzip compressed content.
"""
# Create the HTTP request
request = urllib2.Request(url)
# Add the header to accept gzip encoding
request.add_header('Accept-enco... | [
"Downloads",
"a",
"HTTP",
"resource",
"from",
"url",
"and",
"save",
"to",
"dest",
".",
"Capable",
"of",
"dealing",
"with",
"Gzip",
"compressed",
"content",
"."
] | ricobl/django-importer | python | https://github.com/ricobl/django-importer/blob/6967adfa7a286be7aaf59d3f33c6637270bd9df6/django_importer/utils.py#L7-L36 | [
"def",
"download_file",
"(",
"url",
",",
"dest",
")",
":",
"# Create the HTTP request",
"request",
"=",
"urllib2",
".",
"Request",
"(",
"url",
")",
"# Add the header to accept gzip encoding",
"request",
".",
"add_header",
"(",
"'Accept-encoding'",
",",
"'gzip'",
")"... | 6967adfa7a286be7aaf59d3f33c6637270bd9df6 |
test | CSVImporter.load | Opens the source file. | django_importer/importers/csv_importer.py | def load(self, source):
"""
Opens the source file.
"""
self.source = open(self.source, 'rb')
self.loaded = True | def load(self, source):
"""
Opens the source file.
"""
self.source = open(self.source, 'rb')
self.loaded = True | [
"Opens",
"the",
"source",
"file",
"."
] | ricobl/django-importer | python | https://github.com/ricobl/django-importer/blob/6967adfa7a286be7aaf59d3f33c6637270bd9df6/django_importer/importers/csv_importer.py#L15-L20 | [
"def",
"load",
"(",
"self",
",",
"source",
")",
":",
"self",
".",
"source",
"=",
"open",
"(",
"self",
".",
"source",
",",
"'rb'",
")",
"self",
".",
"loaded",
"=",
"True"
] | 6967adfa7a286be7aaf59d3f33c6637270bd9df6 |
test | CSVImporter.get_items | Iterator to read the rows of the CSV file. | django_importer/importers/csv_importer.py | def get_items(self):
"""
Iterator to read the rows of the CSV file.
"""
# Get the csv reader
reader = csv.reader(self.source)
# Get the headers from the first line
headers = reader.next()
# Read each line yielding a dictionary mapping
# the column ... | def get_items(self):
"""
Iterator to read the rows of the CSV file.
"""
# Get the csv reader
reader = csv.reader(self.source)
# Get the headers from the first line
headers = reader.next()
# Read each line yielding a dictionary mapping
# the column ... | [
"Iterator",
"to",
"read",
"the",
"rows",
"of",
"the",
"CSV",
"file",
"."
] | ricobl/django-importer | python | https://github.com/ricobl/django-importer/blob/6967adfa7a286be7aaf59d3f33c6637270bd9df6/django_importer/importers/csv_importer.py#L29-L43 | [
"def",
"get_items",
"(",
"self",
")",
":",
"# Get the csv reader",
"reader",
"=",
"csv",
".",
"reader",
"(",
"self",
".",
"source",
")",
"# Get the headers from the first line",
"headers",
"=",
"reader",
".",
"next",
"(",
")",
"# Read each line yielding a dictionary... | 6967adfa7a286be7aaf59d3f33c6637270bd9df6 |
test | CSVImporter.get_value | This method receives an item from the source and a source name,
and returns the text content for the `source_name` node. | django_importer/importers/csv_importer.py | def get_value(self, item, source_name):
"""
This method receives an item from the source and a source name,
and returns the text content for the `source_name` node.
"""
val = item.get(source_name.encode('utf-8'), None)
if val is not None:
val = convert_string(... | def get_value(self, item, source_name):
"""
This method receives an item from the source and a source name,
and returns the text content for the `source_name` node.
"""
val = item.get(source_name.encode('utf-8'), None)
if val is not None:
val = convert_string(... | [
"This",
"method",
"receives",
"an",
"item",
"from",
"the",
"source",
"and",
"a",
"source",
"name",
"and",
"returns",
"the",
"text",
"content",
"for",
"the",
"source_name",
"node",
"."
] | ricobl/django-importer | python | https://github.com/ricobl/django-importer/blob/6967adfa7a286be7aaf59d3f33c6637270bd9df6/django_importer/importers/csv_importer.py#L45-L53 | [
"def",
"get_value",
"(",
"self",
",",
"item",
",",
"source_name",
")",
":",
"val",
"=",
"item",
".",
"get",
"(",
"source_name",
".",
"encode",
"(",
"'utf-8'",
")",
",",
"None",
")",
"if",
"val",
"is",
"not",
"None",
":",
"val",
"=",
"convert_string",... | 6967adfa7a286be7aaf59d3f33c6637270bd9df6 |
test | get_package_meta | Return value of variable set in the package where said variable is
named in the Python meta format `__<meta_name>__`. | setup.py | def get_package_meta(meta_name):
"""Return value of variable set in the package where said variable is
named in the Python meta format `__<meta_name>__`.
"""
regex = "__{0}__ = ['\"]([^'\"]+)['\"]".format(meta_name)
return re.search(regex, package_file).group(1) | def get_package_meta(meta_name):
"""Return value of variable set in the package where said variable is
named in the Python meta format `__<meta_name>__`.
"""
regex = "__{0}__ = ['\"]([^'\"]+)['\"]".format(meta_name)
return re.search(regex, package_file).group(1) | [
"Return",
"value",
"of",
"variable",
"set",
"in",
"the",
"package",
"where",
"said",
"variable",
"is",
"named",
"in",
"the",
"Python",
"meta",
"format",
"__<meta_name",
">",
"__",
"."
] | cnu/scrapy-random-useragent | python | https://github.com/cnu/scrapy-random-useragent/blob/0f49a66ec800733ea001e3140ce6a8f86e10ed9c/setup.py#L19-L24 | [
"def",
"get_package_meta",
"(",
"meta_name",
")",
":",
"regex",
"=",
"\"__{0}__ = ['\\\"]([^'\\\"]+)['\\\"]\"",
".",
"format",
"(",
"meta_name",
")",
"return",
"re",
".",
"search",
"(",
"regex",
",",
"package_file",
")",
".",
"group",
"(",
"1",
")"
] | 0f49a66ec800733ea001e3140ce6a8f86e10ed9c |
test | AutograderSandbox.allow_network_access | Raises ValueError if this sandbox instance is currently running. | autograder_sandbox/autograder_sandbox.py | def allow_network_access(self, value: bool):
"""
Raises ValueError if this sandbox instance is currently running.
"""
if self._is_running:
raise ValueError(
"Cannot change network access settings on a running sandbox")
self._allow_network_access = val... | def allow_network_access(self, value: bool):
"""
Raises ValueError if this sandbox instance is currently running.
"""
if self._is_running:
raise ValueError(
"Cannot change network access settings on a running sandbox")
self._allow_network_access = val... | [
"Raises",
"ValueError",
"if",
"this",
"sandbox",
"instance",
"is",
"currently",
"running",
"."
] | eecs-autograder/autograder-sandbox | python | https://github.com/eecs-autograder/autograder-sandbox/blob/230e806e3740e2aaf5f5568dd6a265558f165c63/autograder_sandbox/autograder_sandbox.py#L180-L188 | [
"def",
"allow_network_access",
"(",
"self",
",",
"value",
":",
"bool",
")",
":",
"if",
"self",
".",
"_is_running",
":",
"raise",
"ValueError",
"(",
"\"Cannot change network access settings on a running sandbox\"",
")",
"self",
".",
"_allow_network_access",
"=",
"value... | 230e806e3740e2aaf5f5568dd6a265558f165c63 |
test | AutograderSandbox.run_command | Runs a command inside the sandbox and returns the results.
:param args: A list of strings that specify which command should
be run inside the sandbox.
:param max_num_processes: The maximum number of processes the
command is allowed to spawn.
:param max_stack_size: The ... | autograder_sandbox/autograder_sandbox.py | def run_command(self,
args: List[str],
max_num_processes: int=None,
max_stack_size: int=None,
max_virtual_memory: int=None,
as_root: bool=False,
stdin: FileIO=None,
timeout: int=No... | def run_command(self,
args: List[str],
max_num_processes: int=None,
max_stack_size: int=None,
max_virtual_memory: int=None,
as_root: bool=False,
stdin: FileIO=None,
timeout: int=No... | [
"Runs",
"a",
"command",
"inside",
"the",
"sandbox",
"and",
"returns",
"the",
"results",
"."
] | eecs-autograder/autograder-sandbox | python | https://github.com/eecs-autograder/autograder-sandbox/blob/230e806e3740e2aaf5f5568dd6a265558f165c63/autograder_sandbox/autograder_sandbox.py#L201-L309 | [
"def",
"run_command",
"(",
"self",
",",
"args",
":",
"List",
"[",
"str",
"]",
",",
"max_num_processes",
":",
"int",
"=",
"None",
",",
"max_stack_size",
":",
"int",
"=",
"None",
",",
"max_virtual_memory",
":",
"int",
"=",
"None",
",",
"as_root",
":",
"b... | 230e806e3740e2aaf5f5568dd6a265558f165c63 |
test | AutograderSandbox.add_files | Copies the specified files into the working directory of this
sandbox.
The filenames specified can be absolute paths or relative paths
to the current working directory.
:param owner: The name of a user who should be granted ownership of
the newly added files.
Mus... | autograder_sandbox/autograder_sandbox.py | def add_files(self, *filenames: str, owner: str=SANDBOX_USERNAME, read_only: bool=False):
"""
Copies the specified files into the working directory of this
sandbox.
The filenames specified can be absolute paths or relative paths
to the current working directory.
:param o... | def add_files(self, *filenames: str, owner: str=SANDBOX_USERNAME, read_only: bool=False):
"""
Copies the specified files into the working directory of this
sandbox.
The filenames specified can be absolute paths or relative paths
to the current working directory.
:param o... | [
"Copies",
"the",
"specified",
"files",
"into",
"the",
"working",
"directory",
"of",
"this",
"sandbox",
".",
"The",
"filenames",
"specified",
"can",
"be",
"absolute",
"paths",
"or",
"relative",
"paths",
"to",
"the",
"current",
"working",
"directory",
"."
] | eecs-autograder/autograder-sandbox | python | https://github.com/eecs-autograder/autograder-sandbox/blob/230e806e3740e2aaf5f5568dd6a265558f165c63/autograder_sandbox/autograder_sandbox.py#L311-L345 | [
"def",
"add_files",
"(",
"self",
",",
"*",
"filenames",
":",
"str",
",",
"owner",
":",
"str",
"=",
"SANDBOX_USERNAME",
",",
"read_only",
":",
"bool",
"=",
"False",
")",
":",
"if",
"owner",
"!=",
"SANDBOX_USERNAME",
"and",
"owner",
"!=",
"'root'",
":",
... | 230e806e3740e2aaf5f5568dd6a265558f165c63 |
test | AutograderSandbox.add_and_rename_file | Copies the specified file into the working directory of this
sandbox and renames it to new_filename. | autograder_sandbox/autograder_sandbox.py | def add_and_rename_file(self, filename: str, new_filename: str) -> None:
"""
Copies the specified file into the working directory of this
sandbox and renames it to new_filename.
"""
dest = os.path.join(
self.name + ':' + SANDBOX_WORKING_DIR_NAME,
new_filen... | def add_and_rename_file(self, filename: str, new_filename: str) -> None:
"""
Copies the specified file into the working directory of this
sandbox and renames it to new_filename.
"""
dest = os.path.join(
self.name + ':' + SANDBOX_WORKING_DIR_NAME,
new_filen... | [
"Copies",
"the",
"specified",
"file",
"into",
"the",
"working",
"directory",
"of",
"this",
"sandbox",
"and",
"renames",
"it",
"to",
"new_filename",
"."
] | eecs-autograder/autograder-sandbox | python | https://github.com/eecs-autograder/autograder-sandbox/blob/230e806e3740e2aaf5f5568dd6a265558f165c63/autograder_sandbox/autograder_sandbox.py#L347-L356 | [
"def",
"add_and_rename_file",
"(",
"self",
",",
"filename",
":",
"str",
",",
"new_filename",
":",
"str",
")",
"->",
"None",
":",
"dest",
"=",
"os",
".",
"path",
".",
"join",
"(",
"self",
".",
"name",
"+",
"':'",
"+",
"SANDBOX_WORKING_DIR_NAME",
",",
"n... | 230e806e3740e2aaf5f5568dd6a265558f165c63 |
test | Enrollments.get_enrollments_for_course | Return a list of all enrollments for the passed course_id.
https://canvas.instructure.com/doc/api/enrollments.html#method.enrollments_api.index | uw_canvas/enrollments.py | def get_enrollments_for_course(self, course_id, params={}):
"""
Return a list of all enrollments for the passed course_id.
https://canvas.instructure.com/doc/api/enrollments.html#method.enrollments_api.index
"""
url = COURSES_API.format(course_id) + "/enrollments"
enrol... | def get_enrollments_for_course(self, course_id, params={}):
"""
Return a list of all enrollments for the passed course_id.
https://canvas.instructure.com/doc/api/enrollments.html#method.enrollments_api.index
"""
url = COURSES_API.format(course_id) + "/enrollments"
enrol... | [
"Return",
"a",
"list",
"of",
"all",
"enrollments",
"for",
"the",
"passed",
"course_id",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/enrollments.py#L10-L22 | [
"def",
"get_enrollments_for_course",
"(",
"self",
",",
"course_id",
",",
"params",
"=",
"{",
"}",
")",
":",
"url",
"=",
"COURSES_API",
".",
"format",
"(",
"course_id",
")",
"+",
"\"/enrollments\"",
"enrollments",
"=",
"[",
"]",
"for",
"datum",
"in",
"self"... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Enrollments.get_enrollments_for_course_by_sis_id | Return a list of all enrollments for the passed course sis id. | uw_canvas/enrollments.py | def get_enrollments_for_course_by_sis_id(self, sis_course_id, params={}):
"""
Return a list of all enrollments for the passed course sis id.
"""
return self.get_enrollments_for_course(
self._sis_id(sis_course_id, sis_field="course"), params) | def get_enrollments_for_course_by_sis_id(self, sis_course_id, params={}):
"""
Return a list of all enrollments for the passed course sis id.
"""
return self.get_enrollments_for_course(
self._sis_id(sis_course_id, sis_field="course"), params) | [
"Return",
"a",
"list",
"of",
"all",
"enrollments",
"for",
"the",
"passed",
"course",
"sis",
"id",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/enrollments.py#L24-L29 | [
"def",
"get_enrollments_for_course_by_sis_id",
"(",
"self",
",",
"sis_course_id",
",",
"params",
"=",
"{",
"}",
")",
":",
"return",
"self",
".",
"get_enrollments_for_course",
"(",
"self",
".",
"_sis_id",
"(",
"sis_course_id",
",",
"sis_field",
"=",
"\"course\"",
... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Enrollments.get_enrollments_for_section | Return a list of all enrollments for the passed section_id.
https://canvas.instructure.com/doc/api/enrollments.html#method.enrollments_api.index | uw_canvas/enrollments.py | def get_enrollments_for_section(self, section_id, params={}):
"""
Return a list of all enrollments for the passed section_id.
https://canvas.instructure.com/doc/api/enrollments.html#method.enrollments_api.index
"""
url = SECTIONS_API.format(section_id) + "/enrollments"
... | def get_enrollments_for_section(self, section_id, params={}):
"""
Return a list of all enrollments for the passed section_id.
https://canvas.instructure.com/doc/api/enrollments.html#method.enrollments_api.index
"""
url = SECTIONS_API.format(section_id) + "/enrollments"
... | [
"Return",
"a",
"list",
"of",
"all",
"enrollments",
"for",
"the",
"passed",
"section_id",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/enrollments.py#L31-L43 | [
"def",
"get_enrollments_for_section",
"(",
"self",
",",
"section_id",
",",
"params",
"=",
"{",
"}",
")",
":",
"url",
"=",
"SECTIONS_API",
".",
"format",
"(",
"section_id",
")",
"+",
"\"/enrollments\"",
"enrollments",
"=",
"[",
"]",
"for",
"datum",
"in",
"s... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Enrollments.get_enrollments_for_section_by_sis_id | Return a list of all enrollments for the passed section sis id. | uw_canvas/enrollments.py | def get_enrollments_for_section_by_sis_id(self, sis_section_id, params={}):
"""
Return a list of all enrollments for the passed section sis id.
"""
return self.get_enrollments_for_section(
self._sis_id(sis_section_id, sis_field="section"), params) | def get_enrollments_for_section_by_sis_id(self, sis_section_id, params={}):
"""
Return a list of all enrollments for the passed section sis id.
"""
return self.get_enrollments_for_section(
self._sis_id(sis_section_id, sis_field="section"), params) | [
"Return",
"a",
"list",
"of",
"all",
"enrollments",
"for",
"the",
"passed",
"section",
"sis",
"id",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/enrollments.py#L45-L50 | [
"def",
"get_enrollments_for_section_by_sis_id",
"(",
"self",
",",
"sis_section_id",
",",
"params",
"=",
"{",
"}",
")",
":",
"return",
"self",
".",
"get_enrollments_for_section",
"(",
"self",
".",
"_sis_id",
"(",
"sis_section_id",
",",
"sis_field",
"=",
"\"section\... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Enrollments.get_enrollments_for_regid | Return a list of enrollments for the passed user regid.
https://canvas.instructure.com/doc/api/enrollments.html#method.enrollments_api.index | uw_canvas/enrollments.py | def get_enrollments_for_regid(self, regid, params={},
include_courses=True):
"""
Return a list of enrollments for the passed user regid.
https://canvas.instructure.com/doc/api/enrollments.html#method.enrollments_api.index
"""
sis_user_id = self.... | def get_enrollments_for_regid(self, regid, params={},
include_courses=True):
"""
Return a list of enrollments for the passed user regid.
https://canvas.instructure.com/doc/api/enrollments.html#method.enrollments_api.index
"""
sis_user_id = self.... | [
"Return",
"a",
"list",
"of",
"enrollments",
"for",
"the",
"passed",
"user",
"regid",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/enrollments.py#L52-L83 | [
"def",
"get_enrollments_for_regid",
"(",
"self",
",",
"regid",
",",
"params",
"=",
"{",
"}",
",",
"include_courses",
"=",
"True",
")",
":",
"sis_user_id",
"=",
"self",
".",
"_sis_id",
"(",
"regid",
",",
"sis_field",
"=",
"\"user\"",
")",
"url",
"=",
"USE... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Enrollments.enroll_user | Enroll a user into a course.
https://canvas.instructure.com/doc/api/enrollments.html#method.enrollments_api.create | uw_canvas/enrollments.py | def enroll_user(self, course_id, user_id, enrollment_type, params=None):
"""
Enroll a user into a course.
https://canvas.instructure.com/doc/api/enrollments.html#method.enrollments_api.create
"""
url = COURSES_API.format(course_id) + "/enrollments"
if not params:
... | def enroll_user(self, course_id, user_id, enrollment_type, params=None):
"""
Enroll a user into a course.
https://canvas.instructure.com/doc/api/enrollments.html#method.enrollments_api.create
"""
url = COURSES_API.format(course_id) + "/enrollments"
if not params:
... | [
"Enroll",
"a",
"user",
"into",
"a",
"course",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/enrollments.py#L85-L100 | [
"def",
"enroll_user",
"(",
"self",
",",
"course_id",
",",
"user_id",
",",
"enrollment_type",
",",
"params",
"=",
"None",
")",
":",
"url",
"=",
"COURSES_API",
".",
"format",
"(",
"course_id",
")",
"+",
"\"/enrollments\"",
"if",
"not",
"params",
":",
"params... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | capacity_vesics_1975 | Calculates the foundation capacity according Vesics(1975)
#Gunaratne, Manjriker. 2006. "Spread Footings: Analysis and Design."
Ref: http://geo.cv.nctu.edu.tw/foundation/download/
BearingCapacityOfFoundations.pdf
:param sl: Soil object
:param fd: Foundation object
:param ... | geofound/capacity.py | def capacity_vesics_1975(sl, fd, h_l=0, h_b=0, vertical_load=1, slope=0, base_tilt=0, verbose=0, gwl=1e6, **kwargs):
"""
Calculates the foundation capacity according Vesics(1975)
#Gunaratne, Manjriker. 2006. "Spread Footings: Analysis and Design."
Ref: http://geo.cv.nctu.edu.tw/foundation/download/
... | def capacity_vesics_1975(sl, fd, h_l=0, h_b=0, vertical_load=1, slope=0, base_tilt=0, verbose=0, gwl=1e6, **kwargs):
"""
Calculates the foundation capacity according Vesics(1975)
#Gunaratne, Manjriker. 2006. "Spread Footings: Analysis and Design."
Ref: http://geo.cv.nctu.edu.tw/foundation/download/
... | [
"Calculates",
"the",
"foundation",
"capacity",
"according",
"Vesics",
"(",
"1975",
")",
"#Gunaratne",
"Manjriker",
".",
"2006",
".",
"Spread",
"Footings",
":",
"Analysis",
"and",
"Design",
".",
"Ref",
":",
"http",
":",
"//",
"geo",
".",
"cv",
".",
"nctu",
... | eng-tools/geofound | python | https://github.com/eng-tools/geofound/blob/6b1b097d5db998907bdcb5b4798fb4629674c770/geofound/capacity.py#L9-L140 | [
"def",
"capacity_vesics_1975",
"(",
"sl",
",",
"fd",
",",
"h_l",
"=",
"0",
",",
"h_b",
"=",
"0",
",",
"vertical_load",
"=",
"1",
",",
"slope",
"=",
"0",
",",
"base_tilt",
"=",
"0",
",",
"verbose",
"=",
"0",
",",
"gwl",
"=",
"1e6",
",",
"*",
"*"... | 6b1b097d5db998907bdcb5b4798fb4629674c770 |
test | capacity_terzaghi_1943 | Calculates the foundation capacity according Terzaghi (1943)
Ref: http://geo.cv.nctu.edu.tw/foundation/
download/BearingCapacityOfFoundations.pdf
:param sl: Soil object
:param fd: Foundation object
:param round_footing: if True, then foundation is round
:param verbose: verbosity
:return: ul... | geofound/capacity.py | def capacity_terzaghi_1943(sl, fd, round_footing=False, verbose=0, **kwargs):
"""
Calculates the foundation capacity according Terzaghi (1943)
Ref: http://geo.cv.nctu.edu.tw/foundation/
download/BearingCapacityOfFoundations.pdf
:param sl: Soil object
:param fd: Foundation object
:param roun... | def capacity_terzaghi_1943(sl, fd, round_footing=False, verbose=0, **kwargs):
"""
Calculates the foundation capacity according Terzaghi (1943)
Ref: http://geo.cv.nctu.edu.tw/foundation/
download/BearingCapacityOfFoundations.pdf
:param sl: Soil object
:param fd: Foundation object
:param roun... | [
"Calculates",
"the",
"foundation",
"capacity",
"according",
"Terzaghi",
"(",
"1943",
")",
"Ref",
":",
"http",
":",
"//",
"geo",
".",
"cv",
".",
"nctu",
".",
"edu",
".",
"tw",
"/",
"foundation",
"/",
"download",
"/",
"BearingCapacityOfFoundations",
".",
"pd... | eng-tools/geofound | python | https://github.com/eng-tools/geofound/blob/6b1b097d5db998907bdcb5b4798fb4629674c770/geofound/capacity.py#L143-L199 | [
"def",
"capacity_terzaghi_1943",
"(",
"sl",
",",
"fd",
",",
"round_footing",
"=",
"False",
",",
"verbose",
"=",
"0",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"not",
"kwargs",
".",
"get",
"(",
"\"disable_requires\"",
",",
"False",
")",
":",
"models",
".... | 6b1b097d5db998907bdcb5b4798fb4629674c770 |
test | capacity_hansen_1970 | Calculates the foundation capacity according Hansen (1970)
Ref: http://bestengineeringprojects.com/civil-projects/
hansens-bearing-capacity-theory/
:param sl: Soil object
:param fd: Foundation object
:param h_l: Horizontal load parallel to length
:param h_b: Horizontal load parallel to width
... | geofound/capacity.py | def capacity_hansen_1970(sl, fd, h_l=0, h_b=0, vertical_load=1, slope=0, base_tilt=0, verbose=0, **kwargs):
"""
Calculates the foundation capacity according Hansen (1970)
Ref: http://bestengineeringprojects.com/civil-projects/
hansens-bearing-capacity-theory/
:param sl: Soil object
:param fd: F... | def capacity_hansen_1970(sl, fd, h_l=0, h_b=0, vertical_load=1, slope=0, base_tilt=0, verbose=0, **kwargs):
"""
Calculates the foundation capacity according Hansen (1970)
Ref: http://bestengineeringprojects.com/civil-projects/
hansens-bearing-capacity-theory/
:param sl: Soil object
:param fd: F... | [
"Calculates",
"the",
"foundation",
"capacity",
"according",
"Hansen",
"(",
"1970",
")",
"Ref",
":",
"http",
":",
"//",
"bestengineeringprojects",
".",
"com",
"/",
"civil",
"-",
"projects",
"/",
"hansens",
"-",
"bearing",
"-",
"capacity",
"-",
"theory",
"/"
] | eng-tools/geofound | python | https://github.com/eng-tools/geofound/blob/6b1b097d5db998907bdcb5b4798fb4629674c770/geofound/capacity.py#L202-L313 | [
"def",
"capacity_hansen_1970",
"(",
"sl",
",",
"fd",
",",
"h_l",
"=",
"0",
",",
"h_b",
"=",
"0",
",",
"vertical_load",
"=",
"1",
",",
"slope",
"=",
"0",
",",
"base_tilt",
"=",
"0",
",",
"verbose",
"=",
"0",
",",
"*",
"*",
"kwargs",
")",
":",
"i... | 6b1b097d5db998907bdcb5b4798fb4629674c770 |
test | capacity_meyerhof_1963 | Calculates the foundation capacity according Meyerhoff (1963)
http://www.engs-comp.com/meyerhof/index.shtml
:param sl: Soil object
:param fd: Foundation object
:param h_l: Horizontal load parallel to length
:param h_b: Horizontal load parallel to width
:param vertical_load: Vertical load
:p... | geofound/capacity.py | def capacity_meyerhof_1963(sl, fd, gwl=1e6, h_l=0, h_b=0, vertical_load=1, verbose=0, **kwargs):
"""
Calculates the foundation capacity according Meyerhoff (1963)
http://www.engs-comp.com/meyerhof/index.shtml
:param sl: Soil object
:param fd: Foundation object
:param h_l: Horizontal load parall... | def capacity_meyerhof_1963(sl, fd, gwl=1e6, h_l=0, h_b=0, vertical_load=1, verbose=0, **kwargs):
"""
Calculates the foundation capacity according Meyerhoff (1963)
http://www.engs-comp.com/meyerhof/index.shtml
:param sl: Soil object
:param fd: Foundation object
:param h_l: Horizontal load parall... | [
"Calculates",
"the",
"foundation",
"capacity",
"according",
"Meyerhoff",
"(",
"1963",
")",
"http",
":",
"//",
"www",
".",
"engs",
"-",
"comp",
".",
"com",
"/",
"meyerhof",
"/",
"index",
".",
"shtml"
] | eng-tools/geofound | python | https://github.com/eng-tools/geofound/blob/6b1b097d5db998907bdcb5b4798fb4629674c770/geofound/capacity.py#L316-L414 | [
"def",
"capacity_meyerhof_1963",
"(",
"sl",
",",
"fd",
",",
"gwl",
"=",
"1e6",
",",
"h_l",
"=",
"0",
",",
"h_b",
"=",
"0",
",",
"vertical_load",
"=",
"1",
",",
"verbose",
"=",
"0",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"not",
"kwargs",
".",
... | 6b1b097d5db998907bdcb5b4798fb4629674c770 |
test | capacity_nzs_vm4_2011 | calculates the capacity according to
Appendix B verification method 4 of the NZ building code
:param sl: Soil object
:param fd: Foundation object
:param h_l: Horizontal load parallel to length
:param h_b: Horizontal load parallel to width
:param vertical_load: Vertical load
:param slope: g... | geofound/capacity.py | def capacity_nzs_vm4_2011(sl, fd, h_l=0, h_b=0, vertical_load=1, slope=0, verbose=0, **kwargs):
"""
calculates the capacity according to
Appendix B verification method 4 of the NZ building code
:param sl: Soil object
:param fd: Foundation object
:param h_l: Horizontal load parallel to length
... | def capacity_nzs_vm4_2011(sl, fd, h_l=0, h_b=0, vertical_load=1, slope=0, verbose=0, **kwargs):
"""
calculates the capacity according to
Appendix B verification method 4 of the NZ building code
:param sl: Soil object
:param fd: Foundation object
:param h_l: Horizontal load parallel to length
... | [
"calculates",
"the",
"capacity",
"according",
"to",
"Appendix",
"B",
"verification",
"method",
"4",
"of",
"the",
"NZ",
"building",
"code"
] | eng-tools/geofound | python | https://github.com/eng-tools/geofound/blob/6b1b097d5db998907bdcb5b4798fb4629674c770/geofound/capacity.py#L417-L537 | [
"def",
"capacity_nzs_vm4_2011",
"(",
"sl",
",",
"fd",
",",
"h_l",
"=",
"0",
",",
"h_b",
"=",
"0",
",",
"vertical_load",
"=",
"1",
",",
"slope",
"=",
"0",
",",
"verbose",
"=",
"0",
",",
"*",
"*",
"kwargs",
")",
":",
"# Need to make adjustments if sand ... | 6b1b097d5db998907bdcb5b4798fb4629674c770 |
test | capacity_salgado_2008 | calculates the capacity according to
THe Engineering of Foundations textbook by Salgado
ISBN: 0072500581
:param sl: Soil object
:param fd: Foundation object
:param h_l: Horizontal load parallel to length
:param h_b: Horizontal load parallel to width
:param vertical_load: Vertical load
... | geofound/capacity.py | def capacity_salgado_2008(sl, fd, h_l=0, h_b=0, vertical_load=1, verbose=0, **kwargs):
"""
calculates the capacity according to
THe Engineering of Foundations textbook by Salgado
ISBN: 0072500581
:param sl: Soil object
:param fd: Foundation object
:param h_l: Horizontal load parallel to ... | def capacity_salgado_2008(sl, fd, h_l=0, h_b=0, vertical_load=1, verbose=0, **kwargs):
"""
calculates the capacity according to
THe Engineering of Foundations textbook by Salgado
ISBN: 0072500581
:param sl: Soil object
:param fd: Foundation object
:param h_l: Horizontal load parallel to ... | [
"calculates",
"the",
"capacity",
"according",
"to",
"THe",
"Engineering",
"of",
"Foundations",
"textbook",
"by",
"Salgado"
] | eng-tools/geofound | python | https://github.com/eng-tools/geofound/blob/6b1b097d5db998907bdcb5b4798fb4629674c770/geofound/capacity.py#L540-L620 | [
"def",
"capacity_salgado_2008",
"(",
"sl",
",",
"fd",
",",
"h_l",
"=",
"0",
",",
"h_b",
"=",
"0",
",",
"vertical_load",
"=",
"1",
",",
"verbose",
"=",
"0",
",",
"*",
"*",
"kwargs",
")",
":",
"# Need to make adjustments if sand has DR<40% or",
"# clay has li... | 6b1b097d5db998907bdcb5b4798fb4629674c770 |
test | size_footing_for_capacity | Determine the size of a footing given an aspect ratio and a load
:param sl: Soil object
:param vertical_load: The applied load to the foundation
:param fos: The target factor of safety
:param length_to_width: The desired length to width ratio of the foundation
:param verbose: verbosity
:return: ... | geofound/capacity.py | def size_footing_for_capacity(sl, vertical_load, fos=1.0, length_to_width=1.0, verbose=0, **kwargs):
"""
Determine the size of a footing given an aspect ratio and a load
:param sl: Soil object
:param vertical_load: The applied load to the foundation
:param fos: The target factor of safety
:param... | def size_footing_for_capacity(sl, vertical_load, fos=1.0, length_to_width=1.0, verbose=0, **kwargs):
"""
Determine the size of a footing given an aspect ratio and a load
:param sl: Soil object
:param vertical_load: The applied load to the foundation
:param fos: The target factor of safety
:param... | [
"Determine",
"the",
"size",
"of",
"a",
"footing",
"given",
"an",
"aspect",
"ratio",
"and",
"a",
"load",
":",
"param",
"sl",
":",
"Soil",
"object",
":",
"param",
"vertical_load",
":",
"The",
"applied",
"load",
"to",
"the",
"foundation",
":",
"param",
"fos... | eng-tools/geofound | python | https://github.com/eng-tools/geofound/blob/6b1b097d5db998907bdcb5b4798fb4629674c770/geofound/capacity.py#L623-L696 | [
"def",
"size_footing_for_capacity",
"(",
"sl",
",",
"vertical_load",
",",
"fos",
"=",
"1.0",
",",
"length_to_width",
"=",
"1.0",
",",
"verbose",
"=",
"0",
",",
"*",
"*",
"kwargs",
")",
":",
"method",
"=",
"kwargs",
".",
"get",
"(",
"\"method\"",
",",
"... | 6b1b097d5db998907bdcb5b4798fb4629674c770 |
test | capacity_method_selector | Calculates the bearing capacity of a foundation on soil using the specified method.
:param sl: Soil Object
:param fd: Foundation Object
:param method: Method
:param kwargs:
:return: | geofound/capacity.py | def capacity_method_selector(sl, fd, method, **kwargs):
"""
Calculates the bearing capacity of a foundation on soil using the specified method.
:param sl: Soil Object
:param fd: Foundation Object
:param method: Method
:param kwargs:
:return:
"""
if method == 'vesics':
capaci... | def capacity_method_selector(sl, fd, method, **kwargs):
"""
Calculates the bearing capacity of a foundation on soil using the specified method.
:param sl: Soil Object
:param fd: Foundation Object
:param method: Method
:param kwargs:
:return:
"""
if method == 'vesics':
capaci... | [
"Calculates",
"the",
"bearing",
"capacity",
"of",
"a",
"foundation",
"on",
"soil",
"using",
"the",
"specified",
"method",
".",
":",
"param",
"sl",
":",
"Soil",
"Object",
":",
"param",
"fd",
":",
"Foundation",
"Object",
":",
"param",
"method",
":",
"Method"... | eng-tools/geofound | python | https://github.com/eng-tools/geofound/blob/6b1b097d5db998907bdcb5b4798fb4629674c770/geofound/capacity.py#L699-L720 | [
"def",
"capacity_method_selector",
"(",
"sl",
",",
"fd",
",",
"method",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"method",
"==",
"'vesics'",
":",
"capacity_vesics_1975",
"(",
"sl",
",",
"fd",
",",
"*",
"*",
"kwargs",
")",
"elif",
"method",
"==",
"'nzs'... | 6b1b097d5db998907bdcb5b4798fb4629674c770 |
test | deprecated_capacity_meyerhof_and_hanna_1978 | Calculates the two-layered foundation capacity according Meyerhof and Hanna (1978)
:param sl_0: Top Soil object
:param sl_1: Base Soil object
:param h0: Height of top soil layer
:param fd: Foundation object
:param h_l: Horizontal load parallel to length
:param h_b: Horizontal load parallel to w... | geofound/capacity.py | def deprecated_capacity_meyerhof_and_hanna_1978(sl_0, sl_1, h0, fd, verbose=0):
"""
Calculates the two-layered foundation capacity according Meyerhof and Hanna (1978)
:param sl_0: Top Soil object
:param sl_1: Base Soil object
:param h0: Height of top soil layer
:param fd: Foundation object
... | def deprecated_capacity_meyerhof_and_hanna_1978(sl_0, sl_1, h0, fd, verbose=0):
"""
Calculates the two-layered foundation capacity according Meyerhof and Hanna (1978)
:param sl_0: Top Soil object
:param sl_1: Base Soil object
:param h0: Height of top soil layer
:param fd: Foundation object
... | [
"Calculates",
"the",
"two",
"-",
"layered",
"foundation",
"capacity",
"according",
"Meyerhof",
"and",
"Hanna",
"(",
"1978",
")"
] | eng-tools/geofound | python | https://github.com/eng-tools/geofound/blob/6b1b097d5db998907bdcb5b4798fb4629674c770/geofound/capacity.py#L747-L912 | [
"def",
"deprecated_capacity_meyerhof_and_hanna_1978",
"(",
"sl_0",
",",
"sl_1",
",",
"h0",
",",
"fd",
",",
"verbose",
"=",
"0",
")",
":",
"# UNFINISHED, this code is copied from the Meyerhoff method",
"# horizontal_load = np.sqrt(h_l ** 2 + h_b ** 2)",
"sl_0",
".",
"nq_factor... | 6b1b097d5db998907bdcb5b4798fb4629674c770 |
test | capacity_meyerhof_and_hanna_1978 | Calculates the two-layered foundation capacity according Meyerhof and Hanna (1978)
:param sl_0: Top Soil object
:param sl_1: Base Soil object
:param h0: Height of top soil layer
:param fd: Foundation object
:param wtl: water table level
:param verbose: verbosity
:return: ultimate bearing st... | geofound/capacity.py | def capacity_meyerhof_and_hanna_1978(sl_0, sl_1, h0, fd, gwl=1e6, verbose=0):
"""
Calculates the two-layered foundation capacity according Meyerhof and Hanna (1978)
:param sl_0: Top Soil object
:param sl_1: Base Soil object
:param h0: Height of top soil layer
:param fd: Foundation object
:p... | def capacity_meyerhof_and_hanna_1978(sl_0, sl_1, h0, fd, gwl=1e6, verbose=0):
"""
Calculates the two-layered foundation capacity according Meyerhof and Hanna (1978)
:param sl_0: Top Soil object
:param sl_1: Base Soil object
:param h0: Height of top soil layer
:param fd: Foundation object
:p... | [
"Calculates",
"the",
"two",
"-",
"layered",
"foundation",
"capacity",
"according",
"Meyerhof",
"and",
"Hanna",
"(",
"1978",
")"
] | eng-tools/geofound | python | https://github.com/eng-tools/geofound/blob/6b1b097d5db998907bdcb5b4798fb4629674c770/geofound/capacity.py#L915-L931 | [
"def",
"capacity_meyerhof_and_hanna_1978",
"(",
"sl_0",
",",
"sl_1",
",",
"h0",
",",
"fd",
",",
"gwl",
"=",
"1e6",
",",
"verbose",
"=",
"0",
")",
":",
"sp",
"=",
"sm",
".",
"SoilProfile",
"(",
")",
"sp",
".",
"add_layer",
"(",
"0",
",",
"sl_0",
")"... | 6b1b097d5db998907bdcb5b4798fb4629674c770 |
test | capacity_sp_meyerhof_and_hanna_1978 | Calculates the two-layered foundation capacity according Meyerhof and Hanna (1978)
:param sp: Soil profile object
:param fd: Foundation object
:param wtl: water table level
:param verbose: verbosity
:return: ultimate bearing stress | geofound/capacity.py | def capacity_sp_meyerhof_and_hanna_1978(sp, fd, verbose=0):
"""
Calculates the two-layered foundation capacity according Meyerhof and Hanna (1978)
:param sp: Soil profile object
:param fd: Foundation object
:param wtl: water table level
:param verbose: verbosity
:return: ultimate bearing st... | def capacity_sp_meyerhof_and_hanna_1978(sp, fd, verbose=0):
"""
Calculates the two-layered foundation capacity according Meyerhof and Hanna (1978)
:param sp: Soil profile object
:param fd: Foundation object
:param wtl: water table level
:param verbose: verbosity
:return: ultimate bearing st... | [
"Calculates",
"the",
"two",
"-",
"layered",
"foundation",
"capacity",
"according",
"Meyerhof",
"and",
"Hanna",
"(",
"1978",
")"
] | eng-tools/geofound | python | https://github.com/eng-tools/geofound/blob/6b1b097d5db998907bdcb5b4798fb4629674c770/geofound/capacity.py#L1115-L1374 | [
"def",
"capacity_sp_meyerhof_and_hanna_1978",
"(",
"sp",
",",
"fd",
",",
"verbose",
"=",
"0",
")",
":",
"assert",
"isinstance",
"(",
"sp",
",",
"sm",
".",
"SoilProfile",
")",
"sl_0",
"=",
"sp",
".",
"layer",
"(",
"1",
")",
"sl_1",
"=",
"sp",
".",
"la... | 6b1b097d5db998907bdcb5b4798fb4629674c770 |
test | Roles.get_roles_in_account | List the roles for an account, for the passed Canvas account ID.
https://canvas.instructure.com/doc/api/roles.html#method.role_overrides.api_index | uw_canvas/roles.py | def get_roles_in_account(self, account_id, params={}):
"""
List the roles for an account, for the passed Canvas account ID.
https://canvas.instructure.com/doc/api/roles.html#method.role_overrides.api_index
"""
url = ACCOUNTS_API.format(account_id) + "/roles"
roles = []
... | def get_roles_in_account(self, account_id, params={}):
"""
List the roles for an account, for the passed Canvas account ID.
https://canvas.instructure.com/doc/api/roles.html#method.role_overrides.api_index
"""
url = ACCOUNTS_API.format(account_id) + "/roles"
roles = []
... | [
"List",
"the",
"roles",
"for",
"an",
"account",
"for",
"the",
"passed",
"Canvas",
"account",
"ID",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/roles.py#L8-L19 | [
"def",
"get_roles_in_account",
"(",
"self",
",",
"account_id",
",",
"params",
"=",
"{",
"}",
")",
":",
"url",
"=",
"ACCOUNTS_API",
".",
"format",
"(",
"account_id",
")",
"+",
"\"/roles\"",
"roles",
"=",
"[",
"]",
"for",
"datum",
"in",
"self",
".",
"_ge... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Roles.get_roles_by_account_sis_id | List the roles for an account, for the passed account SIS ID. | uw_canvas/roles.py | def get_roles_by_account_sis_id(self, account_sis_id, params={}):
"""
List the roles for an account, for the passed account SIS ID.
"""
return self.get_roles_in_account(self._sis_id(account_sis_id,
sis_field="account"),
... | def get_roles_by_account_sis_id(self, account_sis_id, params={}):
"""
List the roles for an account, for the passed account SIS ID.
"""
return self.get_roles_in_account(self._sis_id(account_sis_id,
sis_field="account"),
... | [
"List",
"the",
"roles",
"for",
"an",
"account",
"for",
"the",
"passed",
"account",
"SIS",
"ID",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/roles.py#L21-L27 | [
"def",
"get_roles_by_account_sis_id",
"(",
"self",
",",
"account_sis_id",
",",
"params",
"=",
"{",
"}",
")",
":",
"return",
"self",
".",
"get_roles_in_account",
"(",
"self",
".",
"_sis_id",
"(",
"account_sis_id",
",",
"sis_field",
"=",
"\"account\"",
")",
",",... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Roles.get_effective_course_roles_in_account | List all course roles available to an account, for the passed Canvas
account ID, including course roles inherited from parent accounts. | uw_canvas/roles.py | def get_effective_course_roles_in_account(self, account_id):
"""
List all course roles available to an account, for the passed Canvas
account ID, including course roles inherited from parent accounts.
"""
course_roles = []
params = {"show_inherited": "1"}
for role... | def get_effective_course_roles_in_account(self, account_id):
"""
List all course roles available to an account, for the passed Canvas
account ID, including course roles inherited from parent accounts.
"""
course_roles = []
params = {"show_inherited": "1"}
for role... | [
"List",
"all",
"course",
"roles",
"available",
"to",
"an",
"account",
"for",
"the",
"passed",
"Canvas",
"account",
"ID",
"including",
"course",
"roles",
"inherited",
"from",
"parent",
"accounts",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/roles.py#L29-L39 | [
"def",
"get_effective_course_roles_in_account",
"(",
"self",
",",
"account_id",
")",
":",
"course_roles",
"=",
"[",
"]",
"params",
"=",
"{",
"\"show_inherited\"",
":",
"\"1\"",
"}",
"for",
"role",
"in",
"self",
".",
"get_roles_in_account",
"(",
"account_id",
","... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Roles.get_role | Get information about a single role, for the passed Canvas account ID.
https://canvas.instructure.com/doc/api/roles.html#method.role_overrides.show | uw_canvas/roles.py | def get_role(self, account_id, role_id):
"""
Get information about a single role, for the passed Canvas account ID.
https://canvas.instructure.com/doc/api/roles.html#method.role_overrides.show
"""
url = ACCOUNTS_API.format(account_id) + "/roles/{}".format(role_id)
return... | def get_role(self, account_id, role_id):
"""
Get information about a single role, for the passed Canvas account ID.
https://canvas.instructure.com/doc/api/roles.html#method.role_overrides.show
"""
url = ACCOUNTS_API.format(account_id) + "/roles/{}".format(role_id)
return... | [
"Get",
"information",
"about",
"a",
"single",
"role",
"for",
"the",
"passed",
"Canvas",
"account",
"ID",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/roles.py#L41-L48 | [
"def",
"get_role",
"(",
"self",
",",
"account_id",
",",
"role_id",
")",
":",
"url",
"=",
"ACCOUNTS_API",
".",
"format",
"(",
"account_id",
")",
"+",
"\"/roles/{}\"",
".",
"format",
"(",
"role_id",
")",
"return",
"CanvasRole",
"(",
"data",
"=",
"self",
".... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Roles.get_role_by_account_sis_id | Get information about a single role, for the passed account SIS ID. | uw_canvas/roles.py | def get_role_by_account_sis_id(self, account_sis_id, role_id):
"""
Get information about a single role, for the passed account SIS ID.
"""
return self.get_role(self._sis_id(account_sis_id, sis_field="account"),
role_id) | def get_role_by_account_sis_id(self, account_sis_id, role_id):
"""
Get information about a single role, for the passed account SIS ID.
"""
return self.get_role(self._sis_id(account_sis_id, sis_field="account"),
role_id) | [
"Get",
"information",
"about",
"a",
"single",
"role",
"for",
"the",
"passed",
"account",
"SIS",
"ID",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/roles.py#L50-L55 | [
"def",
"get_role_by_account_sis_id",
"(",
"self",
",",
"account_sis_id",
",",
"role_id",
")",
":",
"return",
"self",
".",
"get_role",
"(",
"self",
".",
"_sis_id",
"(",
"account_sis_id",
",",
"sis_field",
"=",
"\"account\"",
")",
",",
"role_id",
")"
] | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Courses.get_course | Return course resource for given canvas course id.
https://canvas.instructure.com/doc/api/courses.html#method.courses.show | uw_canvas/courses.py | def get_course(self, course_id, params={}):
"""
Return course resource for given canvas course id.
https://canvas.instructure.com/doc/api/courses.html#method.courses.show
"""
include = params.get("include", [])
if "term" not in include:
include.append("term")... | def get_course(self, course_id, params={}):
"""
Return course resource for given canvas course id.
https://canvas.instructure.com/doc/api/courses.html#method.courses.show
"""
include = params.get("include", [])
if "term" not in include:
include.append("term")... | [
"Return",
"course",
"resource",
"for",
"given",
"canvas",
"course",
"id",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/courses.py#L9-L21 | [
"def",
"get_course",
"(",
"self",
",",
"course_id",
",",
"params",
"=",
"{",
"}",
")",
":",
"include",
"=",
"params",
".",
"get",
"(",
"\"include\"",
",",
"[",
"]",
")",
"if",
"\"term\"",
"not",
"in",
"include",
":",
"include",
".",
"append",
"(",
... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Courses.get_course_by_sis_id | Return course resource for given sis id. | uw_canvas/courses.py | def get_course_by_sis_id(self, sis_course_id, params={}):
"""
Return course resource for given sis id.
"""
return self.get_course(self._sis_id(sis_course_id, sis_field="course"),
params) | def get_course_by_sis_id(self, sis_course_id, params={}):
"""
Return course resource for given sis id.
"""
return self.get_course(self._sis_id(sis_course_id, sis_field="course"),
params) | [
"Return",
"course",
"resource",
"for",
"given",
"sis",
"id",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/courses.py#L23-L28 | [
"def",
"get_course_by_sis_id",
"(",
"self",
",",
"sis_course_id",
",",
"params",
"=",
"{",
"}",
")",
":",
"return",
"self",
".",
"get_course",
"(",
"self",
".",
"_sis_id",
"(",
"sis_course_id",
",",
"sis_field",
"=",
"\"course\"",
")",
",",
"params",
")"
] | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Courses.get_courses_in_account | Returns a list of courses for the passed account ID.
https://canvas.instructure.com/doc/api/accounts.html#method.accounts.courses_api | uw_canvas/courses.py | def get_courses_in_account(self, account_id, params={}):
"""
Returns a list of courses for the passed account ID.
https://canvas.instructure.com/doc/api/accounts.html#method.accounts.courses_api
"""
if "published" in params:
params["published"] = "true" if params["pu... | def get_courses_in_account(self, account_id, params={}):
"""
Returns a list of courses for the passed account ID.
https://canvas.instructure.com/doc/api/accounts.html#method.accounts.courses_api
"""
if "published" in params:
params["published"] = "true" if params["pu... | [
"Returns",
"a",
"list",
"of",
"courses",
"for",
"the",
"passed",
"account",
"ID",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/courses.py#L30-L44 | [
"def",
"get_courses_in_account",
"(",
"self",
",",
"account_id",
",",
"params",
"=",
"{",
"}",
")",
":",
"if",
"\"published\"",
"in",
"params",
":",
"params",
"[",
"\"published\"",
"]",
"=",
"\"true\"",
"if",
"params",
"[",
"\"published\"",
"]",
"else",
"\... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Courses.get_courses_in_account_by_sis_id | Return a list of courses for the passed account SIS ID. | uw_canvas/courses.py | def get_courses_in_account_by_sis_id(self, sis_account_id, params={}):
"""
Return a list of courses for the passed account SIS ID.
"""
return self.get_courses_in_account(
self._sis_id(sis_account_id, sis_field="account"), params) | def get_courses_in_account_by_sis_id(self, sis_account_id, params={}):
"""
Return a list of courses for the passed account SIS ID.
"""
return self.get_courses_in_account(
self._sis_id(sis_account_id, sis_field="account"), params) | [
"Return",
"a",
"list",
"of",
"courses",
"for",
"the",
"passed",
"account",
"SIS",
"ID",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/courses.py#L46-L51 | [
"def",
"get_courses_in_account_by_sis_id",
"(",
"self",
",",
"sis_account_id",
",",
"params",
"=",
"{",
"}",
")",
":",
"return",
"self",
".",
"get_courses_in_account",
"(",
"self",
".",
"_sis_id",
"(",
"sis_account_id",
",",
"sis_field",
"=",
"\"account\"",
")",... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Courses.get_published_courses_in_account | Return a list of published courses for the passed account ID. | uw_canvas/courses.py | def get_published_courses_in_account(self, account_id, params={}):
"""
Return a list of published courses for the passed account ID.
"""
params["published"] = True
return self.get_courses_in_account(account_id, params) | def get_published_courses_in_account(self, account_id, params={}):
"""
Return a list of published courses for the passed account ID.
"""
params["published"] = True
return self.get_courses_in_account(account_id, params) | [
"Return",
"a",
"list",
"of",
"published",
"courses",
"for",
"the",
"passed",
"account",
"ID",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/courses.py#L53-L58 | [
"def",
"get_published_courses_in_account",
"(",
"self",
",",
"account_id",
",",
"params",
"=",
"{",
"}",
")",
":",
"params",
"[",
"\"published\"",
"]",
"=",
"True",
"return",
"self",
".",
"get_courses_in_account",
"(",
"account_id",
",",
"params",
")"
] | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Courses.get_published_courses_in_account_by_sis_id | Return a list of published courses for the passed account SIS ID. | uw_canvas/courses.py | def get_published_courses_in_account_by_sis_id(self, sis_account_id,
params={}):
"""
Return a list of published courses for the passed account SIS ID.
"""
return self.get_published_courses_in_account(
self._sis_id(sis_accoun... | def get_published_courses_in_account_by_sis_id(self, sis_account_id,
params={}):
"""
Return a list of published courses for the passed account SIS ID.
"""
return self.get_published_courses_in_account(
self._sis_id(sis_accoun... | [
"Return",
"a",
"list",
"of",
"published",
"courses",
"for",
"the",
"passed",
"account",
"SIS",
"ID",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/courses.py#L60-L67 | [
"def",
"get_published_courses_in_account_by_sis_id",
"(",
"self",
",",
"sis_account_id",
",",
"params",
"=",
"{",
"}",
")",
":",
"return",
"self",
".",
"get_published_courses_in_account",
"(",
"self",
".",
"_sis_id",
"(",
"sis_account_id",
",",
"sis_field",
"=",
"... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Courses.get_courses_for_regid | Return a list of courses for the passed regid.
https://canvas.instructure.com/doc/api/courses.html#method.courses.index | uw_canvas/courses.py | def get_courses_for_regid(self, regid, params={}):
"""
Return a list of courses for the passed regid.
https://canvas.instructure.com/doc/api/courses.html#method.courses.index
"""
self._as_user = regid
data = self._get_resource("/api/v1/courses", params=params)
se... | def get_courses_for_regid(self, regid, params={}):
"""
Return a list of courses for the passed regid.
https://canvas.instructure.com/doc/api/courses.html#method.courses.index
"""
self._as_user = regid
data = self._get_resource("/api/v1/courses", params=params)
se... | [
"Return",
"a",
"list",
"of",
"courses",
"for",
"the",
"passed",
"regid",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/courses.py#L69-L86 | [
"def",
"get_courses_for_regid",
"(",
"self",
",",
"regid",
",",
"params",
"=",
"{",
"}",
")",
":",
"self",
".",
"_as_user",
"=",
"regid",
"data",
"=",
"self",
".",
"_get_resource",
"(",
"\"/api/v1/courses\"",
",",
"params",
"=",
"params",
")",
"self",
".... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Courses.create_course | Create a canvas course with the given subaccount id and course name.
https://canvas.instructure.com/doc/api/courses.html#method.courses.create | uw_canvas/courses.py | def create_course(self, account_id, course_name):
"""
Create a canvas course with the given subaccount id and course name.
https://canvas.instructure.com/doc/api/courses.html#method.courses.create
"""
url = ACCOUNTS_API.format(account_id) + "/courses"
body = {"course": {... | def create_course(self, account_id, course_name):
"""
Create a canvas course with the given subaccount id and course name.
https://canvas.instructure.com/doc/api/courses.html#method.courses.create
"""
url = ACCOUNTS_API.format(account_id) + "/courses"
body = {"course": {... | [
"Create",
"a",
"canvas",
"course",
"with",
"the",
"given",
"subaccount",
"id",
"and",
"course",
"name",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/courses.py#L88-L96 | [
"def",
"create_course",
"(",
"self",
",",
"account_id",
",",
"course_name",
")",
":",
"url",
"=",
"ACCOUNTS_API",
".",
"format",
"(",
"account_id",
")",
"+",
"\"/courses\"",
"body",
"=",
"{",
"\"course\"",
":",
"{",
"\"name\"",
":",
"course_name",
"}",
"}"... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Courses.update_sis_id | Updates the SIS ID for the course identified by the passed course ID.
https://canvas.instructure.com/doc/api/courses.html#method.courses.update | uw_canvas/courses.py | def update_sis_id(self, course_id, sis_course_id):
"""
Updates the SIS ID for the course identified by the passed course ID.
https://canvas.instructure.com/doc/api/courses.html#method.courses.update
"""
url = COURSES_API.format(course_id)
body = {"course": {"sis_course_i... | def update_sis_id(self, course_id, sis_course_id):
"""
Updates the SIS ID for the course identified by the passed course ID.
https://canvas.instructure.com/doc/api/courses.html#method.courses.update
"""
url = COURSES_API.format(course_id)
body = {"course": {"sis_course_i... | [
"Updates",
"the",
"SIS",
"ID",
"for",
"the",
"course",
"identified",
"by",
"the",
"passed",
"course",
"ID",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/courses.py#L98-L106 | [
"def",
"update_sis_id",
"(",
"self",
",",
"course_id",
",",
"sis_course_id",
")",
":",
"url",
"=",
"COURSES_API",
".",
"format",
"(",
"course_id",
")",
"body",
"=",
"{",
"\"course\"",
":",
"{",
"\"sis_course_id\"",
":",
"sis_course_id",
"}",
"}",
"return",
... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Analytics.get_activity_by_account | Returns participation data for the given account_id and term_id.
https://canvas.instructure.com/doc/api/analytics.html#method.analytics_api.department_participation | uw_canvas/analytics.py | def get_activity_by_account(self, account_id, term_id):
"""
Returns participation data for the given account_id and term_id.
https://canvas.instructure.com/doc/api/analytics.html#method.analytics_api.department_participation
"""
url = ("/api/v1/accounts/sis_account_id:%s/analyti... | def get_activity_by_account(self, account_id, term_id):
"""
Returns participation data for the given account_id and term_id.
https://canvas.instructure.com/doc/api/analytics.html#method.analytics_api.department_participation
"""
url = ("/api/v1/accounts/sis_account_id:%s/analyti... | [
"Returns",
"participation",
"data",
"for",
"the",
"given",
"account_id",
"and",
"term_id",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/analytics.py#L7-L15 | [
"def",
"get_activity_by_account",
"(",
"self",
",",
"account_id",
",",
"term_id",
")",
":",
"url",
"=",
"(",
"\"/api/v1/accounts/sis_account_id:%s/analytics/\"",
"\"terms/sis_term_id:%s/activity.json\"",
")",
"%",
"(",
"account_id",
",",
"term_id",
")",
"return",
"self"... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Analytics.get_grades_by_account | Returns grade data for the given account_id and term_id.
https://canvas.instructure.com/doc/api/analytics.html#method.analytics_api.department_grades | uw_canvas/analytics.py | def get_grades_by_account(self, account_id, term_id):
"""
Returns grade data for the given account_id and term_id.
https://canvas.instructure.com/doc/api/analytics.html#method.analytics_api.department_grades
"""
url = ("/api/v1/accounts/sis_account_id:%s/analytics/"
... | def get_grades_by_account(self, account_id, term_id):
"""
Returns grade data for the given account_id and term_id.
https://canvas.instructure.com/doc/api/analytics.html#method.analytics_api.department_grades
"""
url = ("/api/v1/accounts/sis_account_id:%s/analytics/"
... | [
"Returns",
"grade",
"data",
"for",
"the",
"given",
"account_id",
"and",
"term_id",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/analytics.py#L17-L25 | [
"def",
"get_grades_by_account",
"(",
"self",
",",
"account_id",
",",
"term_id",
")",
":",
"url",
"=",
"(",
"\"/api/v1/accounts/sis_account_id:%s/analytics/\"",
"\"terms/sis_term_id:%s/grades.json\"",
")",
"%",
"(",
"account_id",
",",
"term_id",
")",
"return",
"self",
... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Analytics.get_statistics_by_account | Returns statistics for the given account_id and term_id.
https://canvas.instructure.com/doc/api/analytics.html#method.analytics_api.department_statistics | uw_canvas/analytics.py | def get_statistics_by_account(self, account_id, term_id):
"""
Returns statistics for the given account_id and term_id.
https://canvas.instructure.com/doc/api/analytics.html#method.analytics_api.department_statistics
"""
url = ("/api/v1/accounts/sis_account_id:%s/analytics/"
... | def get_statistics_by_account(self, account_id, term_id):
"""
Returns statistics for the given account_id and term_id.
https://canvas.instructure.com/doc/api/analytics.html#method.analytics_api.department_statistics
"""
url = ("/api/v1/accounts/sis_account_id:%s/analytics/"
... | [
"Returns",
"statistics",
"for",
"the",
"given",
"account_id",
"and",
"term_id",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/analytics.py#L27-L35 | [
"def",
"get_statistics_by_account",
"(",
"self",
",",
"account_id",
",",
"term_id",
")",
":",
"url",
"=",
"(",
"\"/api/v1/accounts/sis_account_id:%s/analytics/\"",
"\"terms/sis_term_id:%s/statistics.json\"",
")",
"%",
"(",
"account_id",
",",
"term_id",
")",
"return",
"s... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Analytics.get_activity_by_sis_course_id | Returns participation data for the given sis_course_id.
https://canvas.instructure.com/doc/api/analytics.html#method.analytics_api.course_participation | uw_canvas/analytics.py | def get_activity_by_sis_course_id(self, sis_course_id):
"""
Returns participation data for the given sis_course_id.
https://canvas.instructure.com/doc/api/analytics.html#method.analytics_api.course_participation
"""
url = "/api/v1/courses/%s/analytics/activity.json" % (
... | def get_activity_by_sis_course_id(self, sis_course_id):
"""
Returns participation data for the given sis_course_id.
https://canvas.instructure.com/doc/api/analytics.html#method.analytics_api.course_participation
"""
url = "/api/v1/courses/%s/analytics/activity.json" % (
... | [
"Returns",
"participation",
"data",
"for",
"the",
"given",
"sis_course_id",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/analytics.py#L40-L48 | [
"def",
"get_activity_by_sis_course_id",
"(",
"self",
",",
"sis_course_id",
")",
":",
"url",
"=",
"\"/api/v1/courses/%s/analytics/activity.json\"",
"%",
"(",
"self",
".",
"_sis_id",
"(",
"sis_course_id",
",",
"sis_field",
"=",
"\"course\"",
")",
")",
"return",
"self"... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Analytics.get_assignments_by_sis_course_id | Returns assignment data for the given course_id.
https://canvas.instructure.com/doc/api/analytics.html#method.analytics_api.course_assignments | uw_canvas/analytics.py | def get_assignments_by_sis_course_id(self, sis_course_id):
"""
Returns assignment data for the given course_id.
https://canvas.instructure.com/doc/api/analytics.html#method.analytics_api.course_assignments
"""
url = "/api/v1/courses/%s/analytics/assignments.json" % (
... | def get_assignments_by_sis_course_id(self, sis_course_id):
"""
Returns assignment data for the given course_id.
https://canvas.instructure.com/doc/api/analytics.html#method.analytics_api.course_assignments
"""
url = "/api/v1/courses/%s/analytics/assignments.json" % (
... | [
"Returns",
"assignment",
"data",
"for",
"the",
"given",
"course_id",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/analytics.py#L53-L61 | [
"def",
"get_assignments_by_sis_course_id",
"(",
"self",
",",
"sis_course_id",
")",
":",
"url",
"=",
"\"/api/v1/courses/%s/analytics/assignments.json\"",
"%",
"(",
"self",
".",
"_sis_id",
"(",
"sis_course_id",
",",
"sis_field",
"=",
"\"course\"",
")",
")",
"return",
... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Analytics.get_student_summaries_by_sis_course_id | Returns per-student data for the given course_id.
https://canvas.instructure.com/doc/api/analytics.html#method.analytics_api.course_student_summaries | uw_canvas/analytics.py | def get_student_summaries_by_sis_course_id(self, sis_course_id):
"""
Returns per-student data for the given course_id.
https://canvas.instructure.com/doc/api/analytics.html#method.analytics_api.course_student_summaries
"""
url = "/api/v1/courses/%s/analytics/student_summaries.js... | def get_student_summaries_by_sis_course_id(self, sis_course_id):
"""
Returns per-student data for the given course_id.
https://canvas.instructure.com/doc/api/analytics.html#method.analytics_api.course_student_summaries
"""
url = "/api/v1/courses/%s/analytics/student_summaries.js... | [
"Returns",
"per",
"-",
"student",
"data",
"for",
"the",
"given",
"course_id",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/analytics.py#L66-L74 | [
"def",
"get_student_summaries_by_sis_course_id",
"(",
"self",
",",
"sis_course_id",
")",
":",
"url",
"=",
"\"/api/v1/courses/%s/analytics/student_summaries.json\"",
"%",
"(",
"self",
".",
"_sis_id",
"(",
"sis_course_id",
",",
"sis_field",
"=",
"\"course\"",
")",
")",
... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Analytics.get_student_activity_for_sis_course_id_and_sis_user_id | Returns student activity data for the given user_id and course_id.
https://canvas.instructure.com/doc/api/analytics.html#method.analytics_api.student_in_course_participation | uw_canvas/analytics.py | def get_student_activity_for_sis_course_id_and_sis_user_id(
self, sis_user_id, sis_course_id):
"""
Returns student activity data for the given user_id and course_id.
https://canvas.instructure.com/doc/api/analytics.html#method.analytics_api.student_in_course_participation
""... | def get_student_activity_for_sis_course_id_and_sis_user_id(
self, sis_user_id, sis_course_id):
"""
Returns student activity data for the given user_id and course_id.
https://canvas.instructure.com/doc/api/analytics.html#method.analytics_api.student_in_course_participation
""... | [
"Returns",
"student",
"activity",
"data",
"for",
"the",
"given",
"user_id",
"and",
"course_id",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/analytics.py#L80-L90 | [
"def",
"get_student_activity_for_sis_course_id_and_sis_user_id",
"(",
"self",
",",
"sis_user_id",
",",
"sis_course_id",
")",
":",
"url",
"=",
"(",
"\"/api/v1/courses/%s/analytics/users/\"",
"\"sis_user_id:%s/activity.json\"",
")",
"%",
"(",
"self",
".",
"_sis_id",
"(",
"s... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Analytics.get_student_assignments_for_sis_course_id_and_sis_user_id | Returns student assignment data for the given user_id and course_id.
https://canvas.instructure.com/doc/api/analytics.html#method.analytics_api.student_in_course_assignments | uw_canvas/analytics.py | def get_student_assignments_for_sis_course_id_and_sis_user_id(
self, sis_user_id, sis_course_id):
"""
Returns student assignment data for the given user_id and course_id.
https://canvas.instructure.com/doc/api/analytics.html#method.analytics_api.student_in_course_assignments
... | def get_student_assignments_for_sis_course_id_and_sis_user_id(
self, sis_user_id, sis_course_id):
"""
Returns student assignment data for the given user_id and course_id.
https://canvas.instructure.com/doc/api/analytics.html#method.analytics_api.student_in_course_assignments
... | [
"Returns",
"student",
"assignment",
"data",
"for",
"the",
"given",
"user_id",
"and",
"course_id",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/analytics.py#L96-L106 | [
"def",
"get_student_assignments_for_sis_course_id_and_sis_user_id",
"(",
"self",
",",
"sis_user_id",
",",
"sis_course_id",
")",
":",
"url",
"=",
"(",
"\"/api/v1/courses/%s/analytics/\"",
"\"users/sis_user_id:%s/assignments.json\"",
")",
"%",
"(",
"self",
".",
"_sis_id",
"("... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Analytics.get_student_assignments_for_sis_course_id_and_canvas_user_id | Returns student assignment data for the given user_id and course_id.
https://canvas.instructure.com/doc/api/analytics.html#method.analytics_api.student_in_course_assignments | uw_canvas/analytics.py | def get_student_assignments_for_sis_course_id_and_canvas_user_id(
self, sis_course_id, user_id):
"""
Returns student assignment data for the given user_id and course_id.
https://canvas.instructure.com/doc/api/analytics.html#method.analytics_api.student_in_course_assignments
... | def get_student_assignments_for_sis_course_id_and_canvas_user_id(
self, sis_course_id, user_id):
"""
Returns student assignment data for the given user_id and course_id.
https://canvas.instructure.com/doc/api/analytics.html#method.analytics_api.student_in_course_assignments
... | [
"Returns",
"student",
"assignment",
"data",
"for",
"the",
"given",
"user_id",
"and",
"course_id",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/analytics.py#L108-L118 | [
"def",
"get_student_assignments_for_sis_course_id_and_canvas_user_id",
"(",
"self",
",",
"sis_course_id",
",",
"user_id",
")",
":",
"url",
"=",
"\"/api/v1/courses/%s/analytics/users/%s/assignments.json\"",
"%",
"(",
"self",
".",
"_sis_id",
"(",
"sis_course_id",
",",
"sis_fi... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Analytics.get_student_messaging_for_sis_course_id_and_sis_user_id | Returns student messaging data for the given user_id and course_id.
https://canvas.instructure.com/doc/api/analytics.html#method.analytics_api.student_in_course_messaging | uw_canvas/analytics.py | def get_student_messaging_for_sis_course_id_and_sis_user_id(
self, sis_user_id, sis_course_id):
"""
Returns student messaging data for the given user_id and course_id.
https://canvas.instructure.com/doc/api/analytics.html#method.analytics_api.student_in_course_messaging
"""
... | def get_student_messaging_for_sis_course_id_and_sis_user_id(
self, sis_user_id, sis_course_id):
"""
Returns student messaging data for the given user_id and course_id.
https://canvas.instructure.com/doc/api/analytics.html#method.analytics_api.student_in_course_messaging
"""
... | [
"Returns",
"student",
"messaging",
"data",
"for",
"the",
"given",
"user_id",
"and",
"course_id",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/analytics.py#L124-L134 | [
"def",
"get_student_messaging_for_sis_course_id_and_sis_user_id",
"(",
"self",
",",
"sis_user_id",
",",
"sis_course_id",
")",
":",
"url",
"=",
"(",
"\"/api/v1/courses/%s/analytics/\"",
"\"users/sis_user_id:%s/communication.json\"",
")",
"%",
"(",
"self",
".",
"_sis_id",
"("... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Submissions.get_submissions_by_course_and_assignment | https://canvas.instructure.com/doc/api/submissions.html#method.submissions_api.index | uw_canvas/submissions.py | def get_submissions_by_course_and_assignment(
self, course_id, assignment_id, params={}):
"""
https://canvas.instructure.com/doc/api/submissions.html#method.submissions_api.index
"""
url = COURSES_API.format(course_id)
url += "/assignments/{}/submissions".format(assig... | def get_submissions_by_course_and_assignment(
self, course_id, assignment_id, params={}):
"""
https://canvas.instructure.com/doc/api/submissions.html#method.submissions_api.index
"""
url = COURSES_API.format(course_id)
url += "/assignments/{}/submissions".format(assig... | [
"https",
":",
"//",
"canvas",
".",
"instructure",
".",
"com",
"/",
"doc",
"/",
"api",
"/",
"submissions",
".",
"html#method",
".",
"submissions_api",
".",
"index"
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/submissions.py#L8-L19 | [
"def",
"get_submissions_by_course_and_assignment",
"(",
"self",
",",
"course_id",
",",
"assignment_id",
",",
"params",
"=",
"{",
"}",
")",
":",
"url",
"=",
"COURSES_API",
".",
"format",
"(",
"course_id",
")",
"url",
"+=",
"\"/assignments/{}/submissions\"",
".",
... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Submissions.get_submissions_multiple_assignments_by_sis_id | List submissions for multiple assignments by course/section sis id and
optionally student
https://canvas.instructure.com/doc/api/submissions.html#method.submissions_api.for_students | uw_canvas/submissions.py | def get_submissions_multiple_assignments_by_sis_id(
self, is_section, sis_id, students=None, assignments=None,
**params):
"""
List submissions for multiple assignments by course/section sis id and
optionally student
https://canvas.instructure.com/doc/api/submissi... | def get_submissions_multiple_assignments_by_sis_id(
self, is_section, sis_id, students=None, assignments=None,
**params):
"""
List submissions for multiple assignments by course/section sis id and
optionally student
https://canvas.instructure.com/doc/api/submissi... | [
"List",
"submissions",
"for",
"multiple",
"assignments",
"by",
"course",
"/",
"section",
"sis",
"id",
"and",
"optionally",
"student"
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/submissions.py#L21-L37 | [
"def",
"get_submissions_multiple_assignments_by_sis_id",
"(",
"self",
",",
"is_section",
",",
"sis_id",
",",
"students",
"=",
"None",
",",
"assignments",
"=",
"None",
",",
"*",
"*",
"params",
")",
":",
"if",
"is_section",
":",
"return",
"self",
".",
"get_submi... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Submissions.get_submissions_multiple_assignments | List submissions for multiple assignments by course/section id and
optionally student
https://canvas.instructure.com/doc/api/submissions.html#method.submissions_api.for_students | uw_canvas/submissions.py | def get_submissions_multiple_assignments(
self, is_section, course_id, students=None, assignments=None,
**params):
"""
List submissions for multiple assignments by course/section id and
optionally student
https://canvas.instructure.com/doc/api/submissions.html#me... | def get_submissions_multiple_assignments(
self, is_section, course_id, students=None, assignments=None,
**params):
"""
List submissions for multiple assignments by course/section id and
optionally student
https://canvas.instructure.com/doc/api/submissions.html#me... | [
"List",
"submissions",
"for",
"multiple",
"assignments",
"by",
"course",
"/",
"section",
"id",
"and",
"optionally",
"student"
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/submissions.py#L39-L59 | [
"def",
"get_submissions_multiple_assignments",
"(",
"self",
",",
"is_section",
",",
"course_id",
",",
"students",
"=",
"None",
",",
"assignments",
"=",
"None",
",",
"*",
"*",
"params",
")",
":",
"api",
"=",
"SECTIONS_API",
"if",
"is_section",
"else",
"COURSES_... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | rotational_stiffness | Rotation stiffness of foundation.
:param fd: Foundation object
:param sl: Soil Object.
:param axis: The axis which it should be computed around
:return: | geofound/stiffness.py | def rotational_stiffness(sl, fd, axis="length", a0=0.0, **kwargs):
"""
Rotation stiffness of foundation.
:param fd: Foundation object
:param sl: Soil Object.
:param axis: The axis which it should be computed around
:return:
"""
if not kwargs.get("disable_requires", False):
gf.mod... | def rotational_stiffness(sl, fd, axis="length", a0=0.0, **kwargs):
"""
Rotation stiffness of foundation.
:param fd: Foundation object
:param sl: Soil Object.
:param axis: The axis which it should be computed around
:return:
"""
if not kwargs.get("disable_requires", False):
gf.mod... | [
"Rotation",
"stiffness",
"of",
"foundation",
".",
":",
"param",
"fd",
":",
"Foundation",
"object",
":",
"param",
"sl",
":",
"Soil",
"Object",
".",
":",
"param",
"axis",
":",
"The",
"axis",
"which",
"it",
"should",
"be",
"computed",
"around",
":",
"return... | eng-tools/geofound | python | https://github.com/eng-tools/geofound/blob/6b1b097d5db998907bdcb5b4798fb4629674c770/geofound/stiffness.py#L4-L29 | [
"def",
"rotational_stiffness",
"(",
"sl",
",",
"fd",
",",
"axis",
"=",
"\"length\"",
",",
"a0",
"=",
"0.0",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"not",
"kwargs",
".",
"get",
"(",
"\"disable_requires\"",
",",
"False",
")",
":",
"gf",
".",
"models"... | 6b1b097d5db998907bdcb5b4798fb4629674c770 |
test | ExternalTools.get_external_tools_in_account | Return external tools for the passed canvas account id.
https://canvas.instructure.com/doc/api/external_tools.html#method.external_tools.index | uw_canvas/external_tools.py | def get_external_tools_in_account(self, account_id, params={}):
"""
Return external tools for the passed canvas account id.
https://canvas.instructure.com/doc/api/external_tools.html#method.external_tools.index
"""
url = ACCOUNTS_API.format(account_id) + "/external_tools"
... | def get_external_tools_in_account(self, account_id, params={}):
"""
Return external tools for the passed canvas account id.
https://canvas.instructure.com/doc/api/external_tools.html#method.external_tools.index
"""
url = ACCOUNTS_API.format(account_id) + "/external_tools"
... | [
"Return",
"external",
"tools",
"for",
"the",
"passed",
"canvas",
"account",
"id",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/external_tools.py#L11-L22 | [
"def",
"get_external_tools_in_account",
"(",
"self",
",",
"account_id",
",",
"params",
"=",
"{",
"}",
")",
":",
"url",
"=",
"ACCOUNTS_API",
".",
"format",
"(",
"account_id",
")",
"+",
"\"/external_tools\"",
"external_tools",
"=",
"[",
"]",
"for",
"data",
"in... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | ExternalTools.get_external_tools_in_course | Return external tools for the passed canvas course id.
https://canvas.instructure.com/doc/api/external_tools.html#method.external_tools.index | uw_canvas/external_tools.py | def get_external_tools_in_course(self, course_id, params={}):
"""
Return external tools for the passed canvas course id.
https://canvas.instructure.com/doc/api/external_tools.html#method.external_tools.index
"""
url = COURSES_API.format(course_id) + "/external_tools"
ex... | def get_external_tools_in_course(self, course_id, params={}):
"""
Return external tools for the passed canvas course id.
https://canvas.instructure.com/doc/api/external_tools.html#method.external_tools.index
"""
url = COURSES_API.format(course_id) + "/external_tools"
ex... | [
"Return",
"external",
"tools",
"for",
"the",
"passed",
"canvas",
"course",
"id",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/external_tools.py#L31-L42 | [
"def",
"get_external_tools_in_course",
"(",
"self",
",",
"course_id",
",",
"params",
"=",
"{",
"}",
")",
":",
"url",
"=",
"COURSES_API",
".",
"format",
"(",
"course_id",
")",
"+",
"\"/external_tools\"",
"external_tools",
"=",
"[",
"]",
"for",
"data",
"in",
... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | ExternalTools._create_external_tool | Create an external tool using the passed json_data.
context is either COURSES_API or ACCOUNTS_API.
context_id is the Canvas course_id or account_id, depending on context.
https://canvas.instructure.com/doc/api/external_tools.html#method.external_tools.create | uw_canvas/external_tools.py | def _create_external_tool(self, context, context_id, json_data):
"""
Create an external tool using the passed json_data.
context is either COURSES_API or ACCOUNTS_API.
context_id is the Canvas course_id or account_id, depending on context.
https://canvas.instructure.com/doc/api... | def _create_external_tool(self, context, context_id, json_data):
"""
Create an external tool using the passed json_data.
context is either COURSES_API or ACCOUNTS_API.
context_id is the Canvas course_id or account_id, depending on context.
https://canvas.instructure.com/doc/api... | [
"Create",
"an",
"external",
"tool",
"using",
"the",
"passed",
"json_data",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/external_tools.py#L57-L67 | [
"def",
"_create_external_tool",
"(",
"self",
",",
"context",
",",
"context_id",
",",
"json_data",
")",
":",
"url",
"=",
"context",
".",
"format",
"(",
"context_id",
")",
"+",
"\"/external_tools\"",
"return",
"self",
".",
"_post_resource",
"(",
"url",
",",
"b... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | ExternalTools._update_external_tool | Update the external tool identified by external_tool_id with the passed
json data.
context is either COURSES_API or ACCOUNTS_API.
context_id is the course_id or account_id, depending on context
https://canvas.instructure.com/doc/api/external_tools.html#method.external_tools.update | uw_canvas/external_tools.py | def _update_external_tool(self, context, context_id, external_tool_id,
json_data):
"""
Update the external tool identified by external_tool_id with the passed
json data.
context is either COURSES_API or ACCOUNTS_API.
context_id is the course_id or a... | def _update_external_tool(self, context, context_id, external_tool_id,
json_data):
"""
Update the external tool identified by external_tool_id with the passed
json data.
context is either COURSES_API or ACCOUNTS_API.
context_id is the course_id or a... | [
"Update",
"the",
"external",
"tool",
"identified",
"by",
"external_tool_id",
"with",
"the",
"passed",
"json",
"data",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/external_tools.py#L79-L92 | [
"def",
"_update_external_tool",
"(",
"self",
",",
"context",
",",
"context_id",
",",
"external_tool_id",
",",
"json_data",
")",
":",
"url",
"=",
"context",
".",
"format",
"(",
"context_id",
")",
"+",
"\"/external_tools/{}\"",
".",
"format",
"(",
"external_tool_i... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | ExternalTools._delete_external_tool | Delete the external tool identified by external_tool_id.
context is either COURSES_API or ACCOUNTS_API.
context_id is the course_id or account_id, depending on context
https://canvas.instructure.com/doc/api/external_tools.html#method.external_tools.destroy | uw_canvas/external_tools.py | def _delete_external_tool(self, context, context_id, external_tool_id):
"""
Delete the external tool identified by external_tool_id.
context is either COURSES_API or ACCOUNTS_API.
context_id is the course_id or account_id, depending on context
https://canvas.instructure.com/doc... | def _delete_external_tool(self, context, context_id, external_tool_id):
"""
Delete the external tool identified by external_tool_id.
context is either COURSES_API or ACCOUNTS_API.
context_id is the course_id or account_id, depending on context
https://canvas.instructure.com/doc... | [
"Delete",
"the",
"external",
"tool",
"identified",
"by",
"external_tool_id",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/external_tools.py#L102-L114 | [
"def",
"_delete_external_tool",
"(",
"self",
",",
"context",
",",
"context_id",
",",
"external_tool_id",
")",
":",
"url",
"=",
"context",
".",
"format",
"(",
"context_id",
")",
"+",
"\"/external_tools/{}\"",
".",
"format",
"(",
"external_tool_id",
")",
"response... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | ExternalTools._get_sessionless_launch_url | Get a sessionless launch url for an external tool.
https://canvas.instructure.com/doc/api/external_tools.html#method.external_tools.generate_sessionless_launch | uw_canvas/external_tools.py | def _get_sessionless_launch_url(self, context, context_id, tool_id):
"""
Get a sessionless launch url for an external tool.
https://canvas.instructure.com/doc/api/external_tools.html#method.external_tools.generate_sessionless_launch
"""
url = context.format(context_id) + "/exter... | def _get_sessionless_launch_url(self, context, context_id, tool_id):
"""
Get a sessionless launch url for an external tool.
https://canvas.instructure.com/doc/api/external_tools.html#method.external_tools.generate_sessionless_launch
"""
url = context.format(context_id) + "/exter... | [
"Get",
"a",
"sessionless",
"launch",
"url",
"for",
"an",
"external",
"tool",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/external_tools.py#L116-L124 | [
"def",
"_get_sessionless_launch_url",
"(",
"self",
",",
"context",
",",
"context_id",
",",
"tool_id",
")",
":",
"url",
"=",
"context",
".",
"format",
"(",
"context_id",
")",
"+",
"\"/external_tools/sessionless_launch\"",
"params",
"=",
"{",
"\"id\"",
":",
"tool_... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | ExternalTools.get_sessionless_launch_url_from_account_sis_id | Get a sessionless launch url for an external tool.
https://canvas.instructure.com/doc/api/external_tools.html#method.external_tools.generate_sessionless_launch | uw_canvas/external_tools.py | def get_sessionless_launch_url_from_account_sis_id(
self, tool_id, account_sis_id):
"""
Get a sessionless launch url for an external tool.
https://canvas.instructure.com/doc/api/external_tools.html#method.external_tools.generate_sessionless_launch
"""
return self.get... | def get_sessionless_launch_url_from_account_sis_id(
self, tool_id, account_sis_id):
"""
Get a sessionless launch url for an external tool.
https://canvas.instructure.com/doc/api/external_tools.html#method.external_tools.generate_sessionless_launch
"""
return self.get... | [
"Get",
"a",
"sessionless",
"launch",
"url",
"for",
"an",
"external",
"tool",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/external_tools.py#L135-L143 | [
"def",
"get_sessionless_launch_url_from_account_sis_id",
"(",
"self",
",",
"tool_id",
",",
"account_sis_id",
")",
":",
"return",
"self",
".",
"get_sessionless_launch_url_from_account",
"(",
"tool_id",
",",
"self",
".",
"_sis_id",
"(",
"account_sis_id",
",",
"\"account\"... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | ExternalTools.get_sessionless_launch_url_from_course_sis_id | Get a sessionless launch url for an external tool.
https://canvas.instructure.com/doc/api/external_tools.html#method.external_tools.generate_sessionless_launch | uw_canvas/external_tools.py | def get_sessionless_launch_url_from_course_sis_id(
self, tool_id, course_sis_id):
"""
Get a sessionless launch url for an external tool.
https://canvas.instructure.com/doc/api/external_tools.html#method.external_tools.generate_sessionless_launch
"""
return self.get_s... | def get_sessionless_launch_url_from_course_sis_id(
self, tool_id, course_sis_id):
"""
Get a sessionless launch url for an external tool.
https://canvas.instructure.com/doc/api/external_tools.html#method.external_tools.generate_sessionless_launch
"""
return self.get_s... | [
"Get",
"a",
"sessionless",
"launch",
"url",
"for",
"an",
"external",
"tool",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/external_tools.py#L154-L162 | [
"def",
"get_sessionless_launch_url_from_course_sis_id",
"(",
"self",
",",
"tool_id",
",",
"course_sis_id",
")",
":",
"return",
"self",
".",
"get_sessionless_launch_url_from_course",
"(",
"tool_id",
",",
"self",
".",
"_sis_id",
"(",
"course_sis_id",
",",
"\"course\"",
... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | create_foundation | Can define a Foundation Object from dimensions.
:param length: Foundation length
:param width: Foundation width
:param depth: Foundation depth
:param height: Foundation height
:return: A Foundation object | geofound/models.py | def create_foundation(length, width, depth=0.0, height=0.0):
"""
Can define a Foundation Object from dimensions.
:param length: Foundation length
:param width: Foundation width
:param depth: Foundation depth
:param height: Foundation height
:return: A Foundation object
"""
a_foundati... | def create_foundation(length, width, depth=0.0, height=0.0):
"""
Can define a Foundation Object from dimensions.
:param length: Foundation length
:param width: Foundation width
:param depth: Foundation depth
:param height: Foundation height
:return: A Foundation object
"""
a_foundati... | [
"Can",
"define",
"a",
"Foundation",
"Object",
"from",
"dimensions",
".",
":",
"param",
"length",
":",
"Foundation",
"length",
":",
"param",
"width",
":",
"Foundation",
"width",
":",
"param",
"depth",
":",
"Foundation",
"depth",
":",
"param",
"height",
":",
... | eng-tools/geofound | python | https://github.com/eng-tools/geofound/blob/6b1b097d5db998907bdcb5b4798fb4629674c770/geofound/models.py#L37-L51 | [
"def",
"create_foundation",
"(",
"length",
",",
"width",
",",
"depth",
"=",
"0.0",
",",
"height",
"=",
"0.0",
")",
":",
"a_foundation",
"=",
"FoundationRaft",
"(",
")",
"a_foundation",
".",
"length",
"=",
"length",
"a_foundation",
".",
"width",
"=",
"width... | 6b1b097d5db998907bdcb5b4798fb4629674c770 |
test | create_soil | Can define a Soil object.
:param phi: Internal friction angle
:param cohesion: Cohesion of soil
:param unit_dry_weight: The dry unit weight of the soil.
:param pw: specific weight of water
:return: A Soil object. | geofound/models.py | def create_soil(phi=0.0, cohesion=0.0, unit_dry_weight=0.0, pw=9800):
"""
Can define a Soil object.
:param phi: Internal friction angle
:param cohesion: Cohesion of soil
:param unit_dry_weight: The dry unit weight of the soil.
:param pw: specific weight of water
:return: A Soil object.
"... | def create_soil(phi=0.0, cohesion=0.0, unit_dry_weight=0.0, pw=9800):
"""
Can define a Soil object.
:param phi: Internal friction angle
:param cohesion: Cohesion of soil
:param unit_dry_weight: The dry unit weight of the soil.
:param pw: specific weight of water
:return: A Soil object.
"... | [
"Can",
"define",
"a",
"Soil",
"object",
".",
":",
"param",
"phi",
":",
"Internal",
"friction",
"angle",
":",
"param",
"cohesion",
":",
"Cohesion",
"of",
"soil",
":",
"param",
"unit_dry_weight",
":",
"The",
"dry",
"unit",
"weight",
"of",
"the",
"soil",
".... | eng-tools/geofound | python | https://github.com/eng-tools/geofound/blob/6b1b097d5db998907bdcb5b4798fb4629674c770/geofound/models.py#L54-L67 | [
"def",
"create_soil",
"(",
"phi",
"=",
"0.0",
",",
"cohesion",
"=",
"0.0",
",",
"unit_dry_weight",
"=",
"0.0",
",",
"pw",
"=",
"9800",
")",
":",
"soil",
"=",
"Soil",
"(",
"pw",
"=",
"pw",
")",
"soil",
".",
"phi",
"=",
"phi",
"soil",
".",
"cohesio... | 6b1b097d5db998907bdcb5b4798fb4629674c770 |
test | check_required | Check if a parameter is available on an object
:param obj: Object
:param required_parameters: list of parameters
:return: | geofound/models.py | def check_required(obj, required_parameters):
"""
Check if a parameter is available on an object
:param obj: Object
:param required_parameters: list of parameters
:return:
"""
for parameter in required_parameters:
if not hasattr(obj, parameter) or getattr(obj, parameter) is None:
... | def check_required(obj, required_parameters):
"""
Check if a parameter is available on an object
:param obj: Object
:param required_parameters: list of parameters
:return:
"""
for parameter in required_parameters:
if not hasattr(obj, parameter) or getattr(obj, parameter) is None:
... | [
"Check",
"if",
"a",
"parameter",
"is",
"available",
"on",
"an",
"object"
] | eng-tools/geofound | python | https://github.com/eng-tools/geofound/blob/6b1b097d5db998907bdcb5b4798fb4629674c770/geofound/models.py#L70-L80 | [
"def",
"check_required",
"(",
"obj",
",",
"required_parameters",
")",
":",
"for",
"parameter",
"in",
"required_parameters",
":",
"if",
"not",
"hasattr",
"(",
"obj",
",",
"parameter",
")",
"or",
"getattr",
"(",
"obj",
",",
"parameter",
")",
"is",
"None",
":... | 6b1b097d5db998907bdcb5b4798fb4629674c770 |
test | Users.get_user | Returns user profile data.
https://canvas.instructure.com/doc/api/users.html#method.profile.settings | uw_canvas/users.py | def get_user(self, user_id):
"""
Returns user profile data.
https://canvas.instructure.com/doc/api/users.html#method.profile.settings
"""
url = USERS_API.format(user_id) + "/profile"
return CanvasUser(data=self._get_resource(url)) | def get_user(self, user_id):
"""
Returns user profile data.
https://canvas.instructure.com/doc/api/users.html#method.profile.settings
"""
url = USERS_API.format(user_id) + "/profile"
return CanvasUser(data=self._get_resource(url)) | [
"Returns",
"user",
"profile",
"data",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/users.py#L10-L17 | [
"def",
"get_user",
"(",
"self",
",",
"user_id",
")",
":",
"url",
"=",
"USERS_API",
".",
"format",
"(",
"user_id",
")",
"+",
"\"/profile\"",
"return",
"CanvasUser",
"(",
"data",
"=",
"self",
".",
"_get_resource",
"(",
"url",
")",
")"
] | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Users.get_users_for_course | Returns a list of users for the given course id. | uw_canvas/users.py | def get_users_for_course(self, course_id, params={}):
"""
Returns a list of users for the given course id.
"""
url = COURSES_API.format(course_id) + "/users"
data = self._get_paged_resource(url, params=params)
users = []
for datum in data:
users.append... | def get_users_for_course(self, course_id, params={}):
"""
Returns a list of users for the given course id.
"""
url = COURSES_API.format(course_id) + "/users"
data = self._get_paged_resource(url, params=params)
users = []
for datum in data:
users.append... | [
"Returns",
"a",
"list",
"of",
"users",
"for",
"the",
"given",
"course",
"id",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/users.py#L27-L36 | [
"def",
"get_users_for_course",
"(",
"self",
",",
"course_id",
",",
"params",
"=",
"{",
"}",
")",
":",
"url",
"=",
"COURSES_API",
".",
"format",
"(",
"course_id",
")",
"+",
"\"/users\"",
"data",
"=",
"self",
".",
"_get_paged_resource",
"(",
"url",
",",
"p... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Users.get_users_for_sis_course_id | Returns a list of users for the given sis course id. | uw_canvas/users.py | def get_users_for_sis_course_id(self, sis_course_id, params={}):
"""
Returns a list of users for the given sis course id.
"""
return self.get_users_for_course(
self._sis_id(sis_course_id, sis_field="course"), params) | def get_users_for_sis_course_id(self, sis_course_id, params={}):
"""
Returns a list of users for the given sis course id.
"""
return self.get_users_for_course(
self._sis_id(sis_course_id, sis_field="course"), params) | [
"Returns",
"a",
"list",
"of",
"users",
"for",
"the",
"given",
"sis",
"course",
"id",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/users.py#L38-L43 | [
"def",
"get_users_for_sis_course_id",
"(",
"self",
",",
"sis_course_id",
",",
"params",
"=",
"{",
"}",
")",
":",
"return",
"self",
".",
"get_users_for_course",
"(",
"self",
".",
"_sis_id",
"(",
"sis_course_id",
",",
"sis_field",
"=",
"\"course\"",
")",
",",
... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Users.create_user | Create and return a new user and pseudonym for an account.
https://canvas.instructure.com/doc/api/users.html#method.users.create | uw_canvas/users.py | def create_user(self, user, account_id=None):
"""
Create and return a new user and pseudonym for an account.
https://canvas.instructure.com/doc/api/users.html#method.users.create
"""
if account_id is None:
account_id = self._canvas_account_id
if account_i... | def create_user(self, user, account_id=None):
"""
Create and return a new user and pseudonym for an account.
https://canvas.instructure.com/doc/api/users.html#method.users.create
"""
if account_id is None:
account_id = self._canvas_account_id
if account_i... | [
"Create",
"and",
"return",
"a",
"new",
"user",
"and",
"pseudonym",
"for",
"an",
"account",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/users.py#L45-L59 | [
"def",
"create_user",
"(",
"self",
",",
"user",
",",
"account_id",
"=",
"None",
")",
":",
"if",
"account_id",
"is",
"None",
":",
"account_id",
"=",
"self",
".",
"_canvas_account_id",
"if",
"account_id",
"is",
"None",
":",
"raise",
"MissingAccountID",
"(",
... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Users.get_user_logins | Return a user's logins for the given user_id.
https://canvas.instructure.com/doc/api/logins.html#method.pseudonyms.index | uw_canvas/users.py | def get_user_logins(self, user_id, params={}):
"""
Return a user's logins for the given user_id.
https://canvas.instructure.com/doc/api/logins.html#method.pseudonyms.index
"""
url = USERS_API.format(user_id) + "/logins"
data = self._get_paged_resource(url, params=params... | def get_user_logins(self, user_id, params={}):
"""
Return a user's logins for the given user_id.
https://canvas.instructure.com/doc/api/logins.html#method.pseudonyms.index
"""
url = USERS_API.format(user_id) + "/logins"
data = self._get_paged_resource(url, params=params... | [
"Return",
"a",
"user",
"s",
"logins",
"for",
"the",
"given",
"user_id",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/users.py#L61-L75 | [
"def",
"get_user_logins",
"(",
"self",
",",
"user_id",
",",
"params",
"=",
"{",
"}",
")",
":",
"url",
"=",
"USERS_API",
".",
"format",
"(",
"user_id",
")",
"+",
"\"/logins\"",
"data",
"=",
"self",
".",
"_get_paged_resource",
"(",
"url",
",",
"params",
... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Users.update_user_login | Update an existing login for a user in the given account.
https://canvas.instructure.com/doc/api/logins.html#method.pseudonyms.update | uw_canvas/users.py | def update_user_login(self, login, account_id=None):
"""
Update an existing login for a user in the given account.
https://canvas.instructure.com/doc/api/logins.html#method.pseudonyms.update
"""
if account_id is None:
account_id = self._canvas_account_id
... | def update_user_login(self, login, account_id=None):
"""
Update an existing login for a user in the given account.
https://canvas.instructure.com/doc/api/logins.html#method.pseudonyms.update
"""
if account_id is None:
account_id = self._canvas_account_id
... | [
"Update",
"an",
"existing",
"login",
"for",
"a",
"user",
"in",
"the",
"given",
"account",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/users.py#L84-L99 | [
"def",
"update_user_login",
"(",
"self",
",",
"login",
",",
"account_id",
"=",
"None",
")",
":",
"if",
"account_id",
"is",
"None",
":",
"account_id",
"=",
"self",
".",
"_canvas_account_id",
"if",
"account_id",
"is",
"None",
":",
"raise",
"MissingAccountID",
... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Canvas._next_page | return url path to next page of paginated data | uw_canvas/__init__.py | def _next_page(self, response):
"""
return url path to next page of paginated data
"""
for link in response.getheader("link", "").split(","):
try:
(url, rel) = link.split(";")
if "next" in rel:
return url.lstrip("<").rstrip(... | def _next_page(self, response):
"""
return url path to next page of paginated data
"""
for link in response.getheader("link", "").split(","):
try:
(url, rel) = link.split(";")
if "next" in rel:
return url.lstrip("<").rstrip(... | [
"return",
"url",
"path",
"to",
"next",
"page",
"of",
"paginated",
"data"
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/__init__.py#L98-L108 | [
"def",
"_next_page",
"(",
"self",
",",
"response",
")",
":",
"for",
"link",
"in",
"response",
".",
"getheader",
"(",
"\"link\"",
",",
"\"\"",
")",
".",
"split",
"(",
"\",\"",
")",
":",
"try",
":",
"(",
"url",
",",
"rel",
")",
"=",
"link",
".",
"s... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Canvas._get_resource_url | Canvas GET method on a full url. Return representation of the
requested resource, chasing pagination links to coalesce resources
if indicated. | uw_canvas/__init__.py | def _get_resource_url(self, url, auto_page, data_key):
"""
Canvas GET method on a full url. Return representation of the
requested resource, chasing pagination links to coalesce resources
if indicated.
"""
headers = {'Accept': 'application/json',
'Conne... | def _get_resource_url(self, url, auto_page, data_key):
"""
Canvas GET method on a full url. Return representation of the
requested resource, chasing pagination links to coalesce resources
if indicated.
"""
headers = {'Accept': 'application/json',
'Conne... | [
"Canvas",
"GET",
"method",
"on",
"a",
"full",
"url",
".",
"Return",
"representation",
"of",
"the",
"requested",
"resource",
"chasing",
"pagination",
"links",
"to",
"coalesce",
"resources",
"if",
"indicated",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/__init__.py#L110-L134 | [
"def",
"_get_resource_url",
"(",
"self",
",",
"url",
",",
"auto_page",
",",
"data_key",
")",
":",
"headers",
"=",
"{",
"'Accept'",
":",
"'application/json'",
",",
"'Connection'",
":",
"'keep-alive'",
"}",
"response",
"=",
"DAO",
".",
"getURL",
"(",
"url",
... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Canvas._get_paged_resource | Canvas GET method. Return representation of the requested paged
resource, either the requested page, or chase pagination links to
coalesce resources. | uw_canvas/__init__.py | def _get_paged_resource(self, url, params=None, data_key=None):
"""
Canvas GET method. Return representation of the requested paged
resource, either the requested page, or chase pagination links to
coalesce resources.
"""
if not params:
params = {}
se... | def _get_paged_resource(self, url, params=None, data_key=None):
"""
Canvas GET method. Return representation of the requested paged
resource, either the requested page, or chase pagination links to
coalesce resources.
"""
if not params:
params = {}
se... | [
"Canvas",
"GET",
"method",
".",
"Return",
"representation",
"of",
"the",
"requested",
"paged",
"resource",
"either",
"the",
"requested",
"page",
"or",
"chase",
"pagination",
"links",
"to",
"coalesce",
"resources",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/__init__.py#L144-L161 | [
"def",
"_get_paged_resource",
"(",
"self",
",",
"url",
",",
"params",
"=",
"None",
",",
"data_key",
"=",
"None",
")",
":",
"if",
"not",
"params",
":",
"params",
"=",
"{",
"}",
"self",
".",
"_set_as_user",
"(",
"params",
")",
"auto_page",
"=",
"not",
... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Canvas._get_resource | Canvas GET method. Return representation of the requested resource. | uw_canvas/__init__.py | def _get_resource(self, url, params=None, data_key=None):
"""
Canvas GET method. Return representation of the requested resource.
"""
if not params:
params = {}
self._set_as_user(params)
full_url = url + self._params(params)
return self._get_resourc... | def _get_resource(self, url, params=None, data_key=None):
"""
Canvas GET method. Return representation of the requested resource.
"""
if not params:
params = {}
self._set_as_user(params)
full_url = url + self._params(params)
return self._get_resourc... | [
"Canvas",
"GET",
"method",
".",
"Return",
"representation",
"of",
"the",
"requested",
"resource",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/__init__.py#L163-L174 | [
"def",
"_get_resource",
"(",
"self",
",",
"url",
",",
"params",
"=",
"None",
",",
"data_key",
"=",
"None",
")",
":",
"if",
"not",
"params",
":",
"params",
"=",
"{",
"}",
"self",
".",
"_set_as_user",
"(",
"params",
")",
"full_url",
"=",
"url",
"+",
... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Canvas._put_resource | Canvas PUT method. | uw_canvas/__init__.py | def _put_resource(self, url, body):
"""
Canvas PUT method.
"""
params = {}
self._set_as_user(params)
headers = {'Content-Type': 'application/json',
'Accept': 'application/json',
'Connection': 'keep-alive'}
url = url + self._pa... | def _put_resource(self, url, body):
"""
Canvas PUT method.
"""
params = {}
self._set_as_user(params)
headers = {'Content-Type': 'application/json',
'Accept': 'application/json',
'Connection': 'keep-alive'}
url = url + self._pa... | [
"Canvas",
"PUT",
"method",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/__init__.py#L176-L192 | [
"def",
"_put_resource",
"(",
"self",
",",
"url",
",",
"body",
")",
":",
"params",
"=",
"{",
"}",
"self",
".",
"_set_as_user",
"(",
"params",
")",
"headers",
"=",
"{",
"'Content-Type'",
":",
"'application/json'",
",",
"'Accept'",
":",
"'application/json'",
... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Canvas._post_resource | Canvas POST method. | uw_canvas/__init__.py | def _post_resource(self, url, body):
"""
Canvas POST method.
"""
params = {}
self._set_as_user(params)
headers = {'Content-Type': 'application/json',
'Accept': 'application/json',
'Connection': 'keep-alive'}
url = url + self._... | def _post_resource(self, url, body):
"""
Canvas POST method.
"""
params = {}
self._set_as_user(params)
headers = {'Content-Type': 'application/json',
'Accept': 'application/json',
'Connection': 'keep-alive'}
url = url + self._... | [
"Canvas",
"POST",
"method",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/__init__.py#L194-L209 | [
"def",
"_post_resource",
"(",
"self",
",",
"url",
",",
"body",
")",
":",
"params",
"=",
"{",
"}",
"self",
".",
"_set_as_user",
"(",
"params",
")",
"headers",
"=",
"{",
"'Content-Type'",
":",
"'application/json'",
",",
"'Accept'",
":",
"'application/json'",
... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Canvas._delete_resource | Canvas DELETE method. | uw_canvas/__init__.py | def _delete_resource(self, url):
"""
Canvas DELETE method.
"""
params = {}
self._set_as_user(params)
headers = {'Accept': 'application/json',
'Connection': 'keep-alive'}
url = url + self._params(params)
response = DAO.deleteURL(url, head... | def _delete_resource(self, url):
"""
Canvas DELETE method.
"""
params = {}
self._set_as_user(params)
headers = {'Accept': 'application/json',
'Connection': 'keep-alive'}
url = url + self._params(params)
response = DAO.deleteURL(url, head... | [
"Canvas",
"DELETE",
"method",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/__init__.py#L211-L225 | [
"def",
"_delete_resource",
"(",
"self",
",",
"url",
")",
":",
"params",
"=",
"{",
"}",
"self",
".",
"_set_as_user",
"(",
"params",
")",
"headers",
"=",
"{",
"'Accept'",
":",
"'application/json'",
",",
"'Connection'",
":",
"'keep-alive'",
"}",
"url",
"=",
... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Admins.get_admins | Return a list of the admins in the account.
https://canvas.instructure.com/doc/api/admins.html#method.admins.index | uw_canvas/admins.py | def get_admins(self, account_id, params={}):
"""
Return a list of the admins in the account.
https://canvas.instructure.com/doc/api/admins.html#method.admins.index
"""
url = ADMINS_API.format(account_id)
admins = []
for data in self._get_paged_resource(url, para... | def get_admins(self, account_id, params={}):
"""
Return a list of the admins in the account.
https://canvas.instructure.com/doc/api/admins.html#method.admins.index
"""
url = ADMINS_API.format(account_id)
admins = []
for data in self._get_paged_resource(url, para... | [
"Return",
"a",
"list",
"of",
"the",
"admins",
"in",
"the",
"account",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/admins.py#L9-L20 | [
"def",
"get_admins",
"(",
"self",
",",
"account_id",
",",
"params",
"=",
"{",
"}",
")",
":",
"url",
"=",
"ADMINS_API",
".",
"format",
"(",
"account_id",
")",
"admins",
"=",
"[",
"]",
"for",
"data",
"in",
"self",
".",
"_get_paged_resource",
"(",
"url",
... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Admins.create_admin | Flag an existing user as an admin within the account.
https://canvas.instructure.com/doc/api/admins.html#method.admins.create | uw_canvas/admins.py | def create_admin(self, account_id, user_id, role):
"""
Flag an existing user as an admin within the account.
https://canvas.instructure.com/doc/api/admins.html#method.admins.create
"""
url = ADMINS_API.format(account_id)
body = {"user_id": unquote(str(user_id)),
... | def create_admin(self, account_id, user_id, role):
"""
Flag an existing user as an admin within the account.
https://canvas.instructure.com/doc/api/admins.html#method.admins.create
"""
url = ADMINS_API.format(account_id)
body = {"user_id": unquote(str(user_id)),
... | [
"Flag",
"an",
"existing",
"user",
"as",
"an",
"admin",
"within",
"the",
"account",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/admins.py#L28-L39 | [
"def",
"create_admin",
"(",
"self",
",",
"account_id",
",",
"user_id",
",",
"role",
")",
":",
"url",
"=",
"ADMINS_API",
".",
"format",
"(",
"account_id",
")",
"body",
"=",
"{",
"\"user_id\"",
":",
"unquote",
"(",
"str",
"(",
"user_id",
")",
")",
",",
... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Admins.create_admin_by_sis_id | Flag an existing user as an admin within the account sis id. | uw_canvas/admins.py | def create_admin_by_sis_id(self, sis_account_id, user_id, role):
"""
Flag an existing user as an admin within the account sis id.
"""
return self.create_admin(self._sis_id(sis_account_id), user_id, role) | def create_admin_by_sis_id(self, sis_account_id, user_id, role):
"""
Flag an existing user as an admin within the account sis id.
"""
return self.create_admin(self._sis_id(sis_account_id), user_id, role) | [
"Flag",
"an",
"existing",
"user",
"as",
"an",
"admin",
"within",
"the",
"account",
"sis",
"id",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/admins.py#L41-L45 | [
"def",
"create_admin_by_sis_id",
"(",
"self",
",",
"sis_account_id",
",",
"user_id",
",",
"role",
")",
":",
"return",
"self",
".",
"create_admin",
"(",
"self",
".",
"_sis_id",
"(",
"sis_account_id",
")",
",",
"user_id",
",",
"role",
")"
] | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Admins.delete_admin | Remove an account admin role from a user.
https://canvas.instructure.com/doc/api/admins.html#method.admins.destroy | uw_canvas/admins.py | def delete_admin(self, account_id, user_id, role):
"""
Remove an account admin role from a user.
https://canvas.instructure.com/doc/api/admins.html#method.admins.destroy
"""
url = ADMINS_API.format(account_id) + "/{}?role={}".format(
user_id, quote(role))
re... | def delete_admin(self, account_id, user_id, role):
"""
Remove an account admin role from a user.
https://canvas.instructure.com/doc/api/admins.html#method.admins.destroy
"""
url = ADMINS_API.format(account_id) + "/{}?role={}".format(
user_id, quote(role))
re... | [
"Remove",
"an",
"account",
"admin",
"role",
"from",
"a",
"user",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/admins.py#L47-L57 | [
"def",
"delete_admin",
"(",
"self",
",",
"account_id",
",",
"user_id",
",",
"role",
")",
":",
"url",
"=",
"ADMINS_API",
".",
"format",
"(",
"account_id",
")",
"+",
"\"/{}?role={}\"",
".",
"format",
"(",
"user_id",
",",
"quote",
"(",
"role",
")",
")",
"... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Admins.delete_admin_by_sis_id | Remove an account admin role from a user for the account sis id. | uw_canvas/admins.py | def delete_admin_by_sis_id(self, sis_account_id, user_id, role):
"""
Remove an account admin role from a user for the account sis id.
"""
return self.delete_admin(self._sis_id(sis_account_id), user_id, role) | def delete_admin_by_sis_id(self, sis_account_id, user_id, role):
"""
Remove an account admin role from a user for the account sis id.
"""
return self.delete_admin(self._sis_id(sis_account_id), user_id, role) | [
"Remove",
"an",
"account",
"admin",
"role",
"from",
"a",
"user",
"for",
"the",
"account",
"sis",
"id",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/admins.py#L59-L63 | [
"def",
"delete_admin_by_sis_id",
"(",
"self",
",",
"sis_account_id",
",",
"user_id",
",",
"role",
")",
":",
"return",
"self",
".",
"delete_admin",
"(",
"self",
".",
"_sis_id",
"(",
"sis_account_id",
")",
",",
"user_id",
",",
"role",
")"
] | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | GradingStandards.get_grading_standards_for_course | List the grading standards available to a course
https://canvas.instructure.com/doc/api/grading_standards.html#method.grading_standards_api.context_index | uw_canvas/grading_standards.py | def get_grading_standards_for_course(self, course_id):
"""
List the grading standards available to a course
https://canvas.instructure.com/doc/api/grading_standards.html#method.grading_standards_api.context_index
"""
url = COURSES_API.format(course_id) + "/grading_standards"
... | def get_grading_standards_for_course(self, course_id):
"""
List the grading standards available to a course
https://canvas.instructure.com/doc/api/grading_standards.html#method.grading_standards_api.context_index
"""
url = COURSES_API.format(course_id) + "/grading_standards"
... | [
"List",
"the",
"grading",
"standards",
"available",
"to",
"a",
"course",
"https",
":",
"//",
"canvas",
".",
"instructure",
".",
"com",
"/",
"doc",
"/",
"api",
"/",
"grading_standards",
".",
"html#method",
".",
"grading_standards_api",
".",
"context_index"
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/grading_standards.py#L7-L17 | [
"def",
"get_grading_standards_for_course",
"(",
"self",
",",
"course_id",
")",
":",
"url",
"=",
"COURSES_API",
".",
"format",
"(",
"course_id",
")",
"+",
"\"/grading_standards\"",
"standards",
"=",
"[",
"]",
"for",
"data",
"in",
"self",
".",
"_get_resource",
"... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | GradingStandards.create_grading_standard_for_course | Create a new grading standard for the passed course.
https://canvas.instructure.com/doc/api/grading_standards.html#method.grading_standards_api.create | uw_canvas/grading_standards.py | def create_grading_standard_for_course(self, course_id, name,
grading_scheme, creator):
"""
Create a new grading standard for the passed course.
https://canvas.instructure.com/doc/api/grading_standards.html#method.grading_standards_api.create
"... | def create_grading_standard_for_course(self, course_id, name,
grading_scheme, creator):
"""
Create a new grading standard for the passed course.
https://canvas.instructure.com/doc/api/grading_standards.html#method.grading_standards_api.create
"... | [
"Create",
"a",
"new",
"grading",
"standard",
"for",
"the",
"passed",
"course",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/grading_standards.py#L19-L33 | [
"def",
"create_grading_standard_for_course",
"(",
"self",
",",
"course_id",
",",
"name",
",",
"grading_scheme",
",",
"creator",
")",
":",
"url",
"=",
"COURSES_API",
".",
"format",
"(",
"course_id",
")",
"+",
"\"/grading_standards\"",
"body",
"=",
"{",
"\"title\"... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Sections.get_section | Return section resource for given canvas section id.
https://canvas.instructure.com/doc/api/sections.html#method.sections.show | uw_canvas/sections.py | def get_section(self, section_id, params={}):
"""
Return section resource for given canvas section id.
https://canvas.instructure.com/doc/api/sections.html#method.sections.show
"""
url = SECTIONS_API.format(section_id)
return CanvasSection(data=self._get_resource(url, pa... | def get_section(self, section_id, params={}):
"""
Return section resource for given canvas section id.
https://canvas.instructure.com/doc/api/sections.html#method.sections.show
"""
url = SECTIONS_API.format(section_id)
return CanvasSection(data=self._get_resource(url, pa... | [
"Return",
"section",
"resource",
"for",
"given",
"canvas",
"section",
"id",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/sections.py#L9-L16 | [
"def",
"get_section",
"(",
"self",
",",
"section_id",
",",
"params",
"=",
"{",
"}",
")",
":",
"url",
"=",
"SECTIONS_API",
".",
"format",
"(",
"section_id",
")",
"return",
"CanvasSection",
"(",
"data",
"=",
"self",
".",
"_get_resource",
"(",
"url",
",",
... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Sections.get_section_by_sis_id | Return section resource for given sis id. | uw_canvas/sections.py | def get_section_by_sis_id(self, sis_section_id, params={}):
"""
Return section resource for given sis id.
"""
return self.get_section(
self._sis_id(sis_section_id, sis_field="section"), params) | def get_section_by_sis_id(self, sis_section_id, params={}):
"""
Return section resource for given sis id.
"""
return self.get_section(
self._sis_id(sis_section_id, sis_field="section"), params) | [
"Return",
"section",
"resource",
"for",
"given",
"sis",
"id",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/sections.py#L18-L23 | [
"def",
"get_section_by_sis_id",
"(",
"self",
",",
"sis_section_id",
",",
"params",
"=",
"{",
"}",
")",
":",
"return",
"self",
".",
"get_section",
"(",
"self",
".",
"_sis_id",
"(",
"sis_section_id",
",",
"sis_field",
"=",
"\"section\"",
")",
",",
"params",
... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Sections.get_sections_in_course | Return list of sections for the passed course ID.
https://canvas.instructure.com/doc/api/sections.html#method.sections.index | uw_canvas/sections.py | def get_sections_in_course(self, course_id, params={}):
"""
Return list of sections for the passed course ID.
https://canvas.instructure.com/doc/api/sections.html#method.sections.index
"""
url = COURSES_API.format(course_id) + "/sections"
sections = []
for data ... | def get_sections_in_course(self, course_id, params={}):
"""
Return list of sections for the passed course ID.
https://canvas.instructure.com/doc/api/sections.html#method.sections.index
"""
url = COURSES_API.format(course_id) + "/sections"
sections = []
for data ... | [
"Return",
"list",
"of",
"sections",
"for",
"the",
"passed",
"course",
"ID",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/sections.py#L25-L37 | [
"def",
"get_sections_in_course",
"(",
"self",
",",
"course_id",
",",
"params",
"=",
"{",
"}",
")",
":",
"url",
"=",
"COURSES_API",
".",
"format",
"(",
"course_id",
")",
"+",
"\"/sections\"",
"sections",
"=",
"[",
"]",
"for",
"data",
"in",
"self",
".",
... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
test | Sections.get_sections_in_course_by_sis_id | Return list of sections for the passed course SIS ID. | uw_canvas/sections.py | def get_sections_in_course_by_sis_id(self, sis_course_id, params={}):
"""
Return list of sections for the passed course SIS ID.
"""
return self.get_sections_in_course(
self._sis_id(sis_course_id, sis_field="course"), params) | def get_sections_in_course_by_sis_id(self, sis_course_id, params={}):
"""
Return list of sections for the passed course SIS ID.
"""
return self.get_sections_in_course(
self._sis_id(sis_course_id, sis_field="course"), params) | [
"Return",
"list",
"of",
"sections",
"for",
"the",
"passed",
"course",
"SIS",
"ID",
"."
] | uw-it-aca/uw-restclients-canvas | python | https://github.com/uw-it-aca/uw-restclients-canvas/blob/9845faf33d49a8f06908efc22640c001116d6ea2/uw_canvas/sections.py#L39-L44 | [
"def",
"get_sections_in_course_by_sis_id",
"(",
"self",
",",
"sis_course_id",
",",
"params",
"=",
"{",
"}",
")",
":",
"return",
"self",
".",
"get_sections_in_course",
"(",
"self",
".",
"_sis_id",
"(",
"sis_course_id",
",",
"sis_field",
"=",
"\"course\"",
")",
... | 9845faf33d49a8f06908efc22640c001116d6ea2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.