- Cosmic Python with original examples and adaptions to FastAPI
- Clean Architecture in Python and the repository for its rentomatic example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
hacky little script to convert plain text transcripts | |
that have timestamps in the beginning of lines | |
into documents that can be imported to otranscribe | |
The file format it takes looks like: | |
1:30 I mean yeah uhm | |
1:32 I dunno |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 Dirt is disorder, disorder is subjective | |
3 removing dirt is ordering the environment creatively | |
4 people violating the moral code can cause harm; they are treated as infectious | |
4 relations and pollution between people mirror that of society | |
5 "For I believe that ideas about separating, purifying, demarcating and punishing transgressions have as their main function to impose system on an inherently untidy experience." "It is only by exaggerating the difference between within and without, about and below, male and female, with and against, that a semblance of order is created. In this sense I am not afraid of the charge of having made the social structure seem over-rigid." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# based on https://github.com/alphacep/vosk-api/blob/master/python/example/test_simple.py | |
# by alphacep under Apache 2.0 | |
# modifications by Jan D. | |
# instead of returning a JSON it returns lines of text: MM:SS,texttexttext | |
# so you can use them in a transcript or for close captions | |
# (for the code below to work you need python 3 and pipenv installed. If you do not have pipenv, do | |
# $ pip install --user pipenv | |
# | |
# The lines that start with $ mean that the text of the line after the $ is put in the terminal and executed (press Enter). |
- Download sourcetrail and run it
- Set the taguette’s poetry (taguette’s designated package manager)
Script
folder as your environment (under Windows, it is atUser/foo/AppData/Local/pypoetry/Cache/virtualenvs/taguette-bar/Scripts – where
foois your username and
bar` some gibberish. The environment is thus not in your taguette folder!) - Set the root taguette repo folder as folder to index (not the
/taguette
subfolder, where most of the .py files are!) - Exclude the
/taguette/migrations
folder - Let Sourcetrail index the repo. Depending on your computer’s power, it might take a few minutes.
- Start exploring the code
Start reading at base.py, class BaseHandler. BaseHandler inherits from Tornado’s Request handler. BaseHandler has some more methods that get self and call super. These are extended methods of Tornado’s requestHandler.
(particularly relevant files are in bold)
Debugging Taguette with PyCharm (tested for PyCharm 2021.2)
- Install the poetry plugin for pycharm: https://plugins.jetbrains.com/plugin/14307-poetry
- in PyCharm’s menu: Run/Edit Configurations
- Add a new configuration by clicking the top-left plus icon on by pressing alt+insert on your keyboard.
- Select Python in the pop-up list (other options that show are shell, python test, compund etc.)
- In the main configuration window 5.1. In Module Name type taguette.main 5.2. In Environment, Python interpreter, choose "Poetry (taguette)"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 Truth to nature (underlying form) → Objectivity (mechanical product) → Trained judgment | |
19 Working Objects: Atlas Images, Type Specimens, Lab processes | |
29 Objectivity used to mean the opposite. With Kant came the now familiar objective=nature | |
31f objectivity as part of the tradition to examine 'obstacles to knowledge' | |
34 ""Man of science" began to fret openly about a new kind of obstacle to knowledge: themselves" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
LICENSE: | |
The MIT License (MIT) | |
Copyright © 2021 Jan Dittrich | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 computers are like the Rorschach-Test | |
10 Interacting with computers is seductive: Total control and no mess of social relations | |
13 Computers evoke rather than determine thinking | |
13 opacity of computers encourages to talk about them | |
20 Kids argue about "do computers think" | |
20 Kids know themselves and attribute what they know about them to things (childhood animism) | |
20 usually: material OR Psychological but computers are both | |
20 computers are "marginal Objects" – are they "in" or "out" e.g. of "living things" | |
22 Computers for exploring power, life, death: Switch them on, off, break, crash | |
23 Horrors of recursion and infinity |