Host
Client or equivalent
| # log_issue.py | |
| """ | |
| We want logging the output of a heavy_task function when the log level is debug. | |
| The problem appears when we use info level and the whole process is being | |
| affected by our debug log statement. | |
| main : reproduce the problem | |
| main_lazy : has the solution. |
| .PHONY: html | |
| html: | |
| @# pandoc -t revealjs -s -o slides.html slides.md -V revealjs-url=https://unpkg.com/[email protected]/ | |
| pandoc -t slidy -s -o slides.html slides.md | |
| pdf: | |
| pandoc slides.md --pdf-engine=xelatex -t beamer -o slides.pdf | |
| show: |
| #!/usr/bin/env bash | |
| # Requierements: | |
| # - glab: https://github.com/profclems/glab#installation | |
| # - sed | |
| # - bash | |
| for m in {sprint:{39..47}} | |
| do | |
| milestone="$(echo $m | tr -d '{}')" |
| """My snippet.""" | |
| import pandas as pd | |
| def is_unicode(s: str) -> bool: | |
| """Check if a string is unicode. | |
| Parameters | |
| ---------- | |
| s : str |
| # alt 0 | |
| left | |
| right | |
| outer_join = left.merge(right, how='outer', indicator=True) | |
| outer_join | |
| # wrong: | |
| outer_join[(outer_join._merge != 'both')].drop('_merge', axis=1) | |
| # alt 1 lets use reindex to include the index | |
| left_reindex = left.reset_index() |
| { | |
| "configurations": { | |
| "Pytest: Launch": { | |
| "adapter": "debugpy", | |
| "configuration": { | |
| "name": "Pytest", | |
| "type": "python", | |
| "request": "launch", | |
| "cwd": "${workspaceRoot}", | |
| "python": "python", |
| """ | |
| This requires to have the library (pkg) pre-installed. | |
| Usage: | |
| $ python ./py2mermaid.py --pkg pandas | |
| $ python ./py2mermaid.py --pkg pandas --base-module pandas.core | |
| $ python ./docs/diagrams/py2mermaid.py --pkg pandas --base-module pandas.core | |
| $ python ./docs/diagrams/py2mermaid.py --pkg pandas --base-module pandas.core --raw | sed "s/\w\.\(\w\)/\U\1/g" | |
| Note: based on https://gist.github.com/Zulko/e0910cac1b27bcc3a1e6585eaee60121 |
| r""" | |
| This requires to have the library (pkg) pre-installed. | |
| Usage: | |
| $ python ./py2mermaid.py --pkg pandas | |
| $ python ./py2mermaid.py --pkg pandas --base-module pandas.core | |
| $ python ./docs/diagrams/py2mermaid.py --pkg pandas --base-module pandas.core | |
| $ python ./docs/diagrams/py2mermaid.py --pkg pandas --base-module pandas.core --raw | sed "s/\w\.\(\w\)/\U\1/g" | |
| Note: based on https://gist.github.com/Zulko/e0910cac1b27bcc3a1e6585eaee60121 |
| # class Parent(object): | |
| # def __init__(self): | |
| # print("parent") | |
| # super().__init__() | |
| # class Right(Parent): | |
| # def __init__(self): | |
| # print("right") | |
| # super().__init__() |