Pandas DataFrames are central to Data Analysis in Python. In this post, we introduce the itables
Python package that enhances how these DataFrames are displayed, by turning them into interactive HTML DataTables.
Using itables
is as simple as
Pandas DataFrames are central to Data Analysis in Python. In this post, we introduce the itables
Python package that enhances how these DataFrames are displayed, by turning them into interactive HTML DataTables.
Using itables
is as simple as
from datetime import datetime | |
from typing import Optional | |
import pandas as pd | |
from rich import box | |
from rich.console import Console | |
from rich.table import Table | |
console = Console() |
#!/bin/sh | |
echo '' | |
echo ' __________' | |
echo ' / ___ ___ \' | |
echo ' / / @ \/ @ \ \' | |
echo ' \ \___/\___/ /\' | |
echo ' \____\/____/||' | |
echo ' / /\\\\\//' | |
echo ' | |\\\\\\' |
Tutorial and tips for GitHub Actions workflows
[tool.poetry.dependencies] | |
python = "3.7.7" | |
gdal = {platform = "windows", path = "thirdparty/GDAL-3.1.2-cp37-cp37m-win32.whl"} | |
fiona = {platform = "windows", path = "thirdparty/Fiona-1.8.13-cp37-cp37m-win32.whl"} | |
[tool.coverage.paths] | |
source = ["src", "*/site-packages"] | |
[tool.coverage.run] | |
branch = true |
## | |
## How to run multiple uvicorn server apps in the same process | |
## | |
import asyncio | |
from uvicorn import Server, Config | |
class MyServer(Server): | |
async def run(self, sockets=None): | |
self.config.setup_event_loop() | |
return await self.serve(sockets=sockets) |
image: docker:latest | |
services: | |
- docker:dind | |
stages: | |
- build | |
- integration | |
- dev-release | |
- prod-release |
# https://gist.github.com/althonos/6914b896789d3f2078d1e6237642c35c | |
[metadata] | |
name = {name} | |
version = file: {name}/_version.txt | |
author = Martin Larralde | |
author_email = martin.larralde@embl.de | |
url = https://github.com/althonos/{name} | |
description = {description} | |
long_description = file: README.md |
This is based on https://github.com/codeforamerica/ohana-api/wiki/Installing-MongoDB-with-MacPorts-on-OS-X
the macports version of MongoDB does not come pre-configured and will not run after installing until you change some settings. The instructions linked above describe a way to fix this but they ignore the fact that many of the directories are already created and owned by the user "_mongo". It also runs the daemon as root rather than _mongo. Below is a modified approach that uses the _mongo user and avoids creating unnecessary directories.
sudo port install mongodb
(you probably want to start with a sudo port selfupdate
)sudo mkdir /opt/local/etc/mongodb/
sudo pico /opt/local/etc/mongodb/mongod.conf
import os | |
import yaml | |
import logging.config | |
import logging | |
import coloredlogs | |
def setup_logging(default_path='logging.yaml', default_level=logging.INFO, env_key='LOG_CFG'): | |
""" | |
| **@author:** Prathyush SP | |
| Logging Setup |