/seedlings

Useful or fun code snippets 💻⌨

Primary LanguagePython

seedlings

The repo that hosts bits of code I enjoyed writing or don't want to lose.

Repo contents:

  • CSVtoJson.py- a Python script that takes a CSV file and creates a JSON file that can be used as a Django fixture. Hard coded variables so you need to edit for the headings + specific database object you're writing.
  • TortoiseHare.py and test_TortoiseHare.py- an implementation of the cycle detection algorithm + the associated unit tests. Very helpful in debugging when the stack kept overflowing (due to the cycles).