This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
def get_dog_fact(): | |
data = requests.get("https://some-random-api.ml/facts/dog") | |
if data.status_code == 200: | |
data = data.json() | |
return data["fact"] | |
else: | |
return f"Request Failed with status code: {data.status_code}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<profiles version="19"> | |
<profile kind="CodeFormatterProfile" name="vt-cs-style" version="19"> | |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/> | |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/> | |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/> | |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/> | |
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment" value="common_lines"/> | |
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="true"/> | |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_logical_operator" value="insert"/> |