Notepad/enter/Coding Tips (Classical)/Terminal Tips/2. CLI Tools/Languages/Python/code/About codes.md

17 lines
1.3 KiB
Markdown
Raw Normal View History

2023-07-05 18:29:11 +00:00
## About code
I think the point of things here is to maintain a collection of code and knowledge bases so that you don't have to keep rewriting the freaking wheel.
starts a local web server through python3
```
python3 -m http.server
```
When people on your network go to your ipaddress & port 8000 they can see what you have, which is good for file transfer.
- [[convert a .ipynb to .py]]
- Similarly you can do the same convert but in [bulk](https://www.webucator.com/article/bulk-convert-python-files-to-ipython-notebook-file/)!!
- Saving i[python notebooks to AWS S3](https://github.com/davidbrai/ipythonnb-s3) buckets. And alternatively automating ML within amazon[ with CodeWhisperer](https://aws.amazon.com/blogs/aws/now-in-preview-amazon-codewhisperer-ml-powered-coding-companion/). Setting up mySQL [database](https://towardsdatascience.com/how-to-set-up-an-aws-mysql-database-c33eba8870eb) to AWS is of use too.
- using[ list comprehension](obsidian://open?vault=Coding%20Tips&file=Python%2Fcodes%2Flist%20comprehension%20example) rather than loops and other conditionals may also save time
- using the [lambda](obsidian://open?vault=Coding%20Tips&file=Computers%2FPython%2Fcodes%2FMore%20data%20types%2Flambda) function and other functions will also save time