It maybe useful to share the knowledge of fastapi's tips and practice.
This is a minimum setup procedure for a fastapi project using poetry.
- Use
poetryfor dependency managementfastapiitself is also usingpoetry
- initialize project using poetry
| import PIL.Image | |
| import numpy as np | |
| import tensorflow_hub as hub | |
| import tensorflow as tf | |
| # https://github.com/tensorflow/hub/blob/master/examples/colab/tf_hub_generative_image_module.ipynb | |
| # https://tfhub.dev/google/progan-128/1 | |
| latent_dim = 512 | |
| progan = hub.load("https://tfhub.dev/google/progan-128/1").signatures['default'] |
It maybe useful to share the knowledge of fastapi's tips and practice.
This is a minimum setup procedure for a fastapi project using poetry.
poetry for dependency management
fastapi itself is also using poetry
| <div class="device single"> | |
| <div class="iphone"> | |
| <div class="button-right"></div> | |
| <div class="button-left"></div> | |
| </div> | |
| <div class="iphone iphone-back"> | |
| <div class="button-right"></div> | |
| <div class="button-left"></div> | |
| <div class="camera"></div> |
##Windows users:
cmder will be refered as console
##Mac Os, Ubuntu and windows users continue here:
homestead utf8_general_ci| const fetch = require('node-fetch'); | |
| const cheerio = require('cheerio'); | |
| async function main() { | |
| const args = process.argv.slice(2); | |
| const arg = args[0]; | |
| const res = await fetch(arg); | |
| const resText = await res.text(); | |
| const $ = cheerio.load(resText); |