How do I write a file in python?

What is a file? A file is a thing that stores dataThe filename is the name of that thing Files are made of bytes: Plaintext files are meant to be read by humans as text How do you create files? In Unix, Mac touch notes.txt echo “hello world” > hello.txt >> # append (add to…

Setup a telegram bot

Telegram allows bots that users can create chats with. Messages to the bot are retrievable from the Telegram API by you. (docs) Very meta: Bots on telegram are made from a bot called “BotFather” Create a chat with “BotFather” and type “/newbot” This will create a new bot for you with a new API Token…

iOS Speech Recognition (SFSpeechRecognizer)

The iOS Speech framework provides functionality to convert audio to text. This audio can be real-time or pre-recorded. Transcription models are hosted on device with more powerful ones available from Apple servers. How does it work with real time audio? For audio you need to import AVFoundation Flow: Microphone → AVAudioEngine (captures) → Audio Buffers…

Creating a dotfiles repo

Your zshrc on one computer is different than the next. Don’t do that. Create a repo called “dotfiles” and put your zshrc, vimrc, and other quality of life dot files into a version controlled home. Now when you make improvements, you can pull down and iterate on every computer.

Docker Beginner Tutorial

Let’s assume you are sold on Docker – you need and love Docker. How is it used? On your computer:– install docker (docker desktop is most popular, podman is gaining ground) – develop an application adjusting your Dockerfile– use Dockerfile to build a “image” – a portable package of your app– test locally by running…

Why Docker? Most servers run Linux

Imagine a world where most servers run Linux. A little bit of chaos In this same world (the real world), developers build software on personal computers that run many different operating systems – Mac, Windows, wacky new forks of Linux. For developers to deploy their software, someone must SSH into a server, install dependencies, run…