# [[Python]]
![[Python.svg]]
## Programming in Python
[[Installing Python]]
[[Declaring variables in Python]]
[[Convert string to int in Python]]
[[Date and date formatting in Python]]
[[Regular Expressions in Python]]
[[Converting between byte code and unicode in Python]]
[[String manipulation in Python]]
[[Case-insensitive string comparison in Python]]
[[Generating numbers in Python]]
[[Converting to and from json in Python]]
[[Lists in Python]]
[[Multiline strings in Python]]
[[Replace variables in string in Python]]
### File manipulation
[[File manipulation in Python]]
[[CSV file manipulation in Python]]
[[Iterate over a directory in Python]]
### Parsing webpages
[[Opening URLs in Python]]
## Deploying Python
- [[PyPI]] is Python's official [[Package Manager]]
- [[Flask]] is a lightweight web application framework for Python
- [[How to create a CLI for a Python script]]
## Troubleshooting
[[Python error - UnicodeDecodeError]]
[[Python error - unicodeescape codec can't decode bytes]]
[[Python error - CERTIFICATE_VERIFY_FAILED]]
## Optimization
[[Python programming for performance]]
[[Use wait instead of sleep in Python]]
## Tools
- [[Anaconda]] is another [[Package Manager]] for Python that is more geared towards the data sciences. It's also an environment manager.
## Python in Practice
- [[Taking Notes on a Video - my YiNote to Roam Research Workflow]]
- [[Readwise to Obsidian]]
- [[downloadfirebase.py]]
- I made a two-player, AI-assisted D&D app for [[Asimov's Zeroth Law of Robotics - Observability for AI - KubeCON EU 2025]]. [Here's the repo](https://github.com/nicolevanderhoeven/asimov)
## References
%%
# Excalidraw Data
## Text Elements
## Drawing
```json
{
"type": "excalidraw",
"version": 2,
"source": "https://github.com/zsviczian/obsidian-excalidraw-plugin/releases/tag/2.1.4",
"elements": [
{
"id": "4y8R7iOA",
"type": "text",
"x": 118.49495565891266,
"y": -333.44393157958984,
"width": 3.8599853515625,
"height": 24,
"angle": 0,
"strokeColor": "#1e1e1e",
"backgroundColor": "transparent",
"fillStyle": "solid",
"strokeWidth": 2,
"strokeStyle": "solid",
"roughness": 1,
"opacity": 100,
"groupIds": [],
"frameId": null,
"roundness": null,
"seed": 967149026,
"version": 2,
"versionNonce": 939059582,
"isDeleted": true,
"boundElements": null,
"updated": 1713723615080,
"link": null,
"locked": false,
"text": "",
"rawText": "",
"fontSize": 20,
"fontFamily": 4,
"textAlign": "left",
"verticalAlign": "top",
"containerId": null,
"originalText": "",
"lineHeight": 1.2
}
],
"appState": {
"theme": "dark",
"viewBackgroundColor": "#ffffff",
"currentItemStrokeColor": "#1e1e1e",
"currentItemBackgroundColor": "transparent",
"currentItemFillStyle": "solid",
"currentItemStrokeWidth": 2,
"currentItemStrokeStyle": "solid",
"currentItemRoughness": 1,
"currentItemOpacity": 100,
"currentItemFontFamily": 4,
"currentItemFontSize": 20,
"currentItemTextAlign": "left",
"currentItemStartArrowhead": null,
"currentItemEndArrowhead": "arrow",
"scrollX": 583.2388916015625,
"scrollY": 573.6323852539062,
"zoom": {
"value": 1
},
"currentItemRoundness": "round",
"gridSize": null,
"gridColor": {
"Bold": "#C9C9C9FF",
"Regular": "#EDEDEDFF"
},
"currentStrokeOptions": null,
"previousGridSize": null,
"frameRendering": {
"enabled": true,
"clip": true,
"name": true,
"outline": true
}
},
"files": {}
}
```
%%