This file contains hidden or 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
| # Install | |
| !pip install python-restcountries | |
| # From restcountries import RestCountryApi as rapi | |
| from restcountries import RestCountryApiV2 as rapi | |
| # Get Denmark info | |
| country_list = rapi.get_countries_by_name('Denmark') | |
| # Print information |
This file contains hidden or 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
| {"1": "My task", "2": "Another task", "3": "Rember to read", "4": "Read about FastAPI"} |
This file contains hidden or 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
| from fastapi import FastAPI, Request | |
| from fastapi.responses import RedirectResponse | |
| from fastapi.templating import Jinja2Templates | |
| import json | |
| app = FastAPI() | |
| templates = Jinja2Templates(directory="templates") | |
| @app.get("/") | |
| async def root(request: Request): |
This file contains hidden or 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
| <html> | |
| <head> | |
| <title>MyTODO list</title> | |
| </head> | |
| <style> | |
| *{ | |
| margin: 0; | |
| } | |
| table { | |
| align-items: center; |
This file contains hidden or 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
| conda install -c r r-irkernel |
This file contains hidden or 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
| install.packages("ggplot2") |
This file contains hidden or 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
| # Install packages | |
| pip install pandas | |
| pip install xlsxwriter | |
| # pip install xlrd | |
| # pip install openpyxl | |
| # Use packages | |
| import pandas as pd |
This file contains hidden or 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
| # Opret en Pandas DataFrame ("Tabel") med noget data - Navn og Alder | |
| df = pd.DataFrame({'Navn': ['Ole', 'Per', 'Lise', 'Kim'], | |
| 'Alder': [10, 30, 25, 50]}) | |
| # Opret en Excel fil, med Sheet1 ved at bruge XlsxWriter | |
| writer = pd.ExcelWriter('MyData.xlsx', engine='xlsxwriter') | |
| # Gem Pandas DataFrame over i Excel filen - index = row nummer | |
| df.to_excel(writer, sheet_name='Sheet1', index=False) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.