Code
This page lists some code snippets that I learned along the way, and that I found worth documenting for future use.
Python Notes
| File | Description |
|---|---|
| Get 'RunPath' | Get the path of the running file |
| Get valid CIDR notation | Validate CIDR ranges in Python |
| Hashes | Custom Hashes in Python |
| List Flattening | List flattening |
| Printing Stack trace | Print traceback in except |
| Singleton | - |
| Click | Click - Easily create command-line interfaces |
| Django | Django documentation |
| MongoEngine | MongoEngine documentation |
| Paramiko | Paramiko documentation |
| PyMongo | PyMongo documentation |
| SKLearn - Confusion Matrix | SKLearn documentation - Confusion Matrix |
| SKLearn - DBSCAN | SKLearn documentation - DBSCAN Clustering |
| SKLearn - Decision Trees | SKLearn documentation - Decision Trees |
| SKLearn - K-Means Clustering | SKLearn documentation - K-Means Clustering |
| SKLearn - Machine Learning Stats | SKLearn documentation - Statistics Machine Learning |
| SKLearn - Reducing Dimensionality | SKLearn documentation - Scaling Data |
| SKLearn - Scaling | SKLearn documentation - Scaling Data |
| SKLearn - Support Vector Classifier | SKLearn documentation - Support Vector Classifier |