kristofer / symboltable2.md
最後活躍
describe how you would use python's dict data structure to build a symbol table for a small language compiler
TinyLlama
In a small language compiler like Python, the goal is to convert an input program into a bytecode that can be executed by an interpreter. This bytecode is then translated into machine code (CPU instructions) and executed by a CPU, or run directly in a virtual machine (VM). The intermediate representation for this process is called a symbol table,
kristofer / symboltable1.md
最後活躍
describe how you would use python's dict data structure to build a symbol table for a small language compiler
Phi3
Building a symbol table using Python's dictionary data structure for a small language compiler involves several steps. The symbol table will be used to keep track of variables, their types, and scopes during the compilation process. Here's how you can implement it:
- Define basic classes
kristofer / docker boot.md
最後活躍
Get Spring/jhipster running in Docker container
On the mac you'll need to download Docker Desktop
This provides the docker
commands on the Mac
Not sure if you need to download and install docker-compose or not....
./mvnw package -Pprod verify jib:dockerBuild
kristofer / Python OOP Sample
最後活躍
1 | # here is a very simple example of python OOP |
2 | |
3 | # normal hello-world |
4 | print("1 Hello World!") |
5 | |
6 | # an OOP version |
7 | |
8 | class HelloWorld: |
9 | def main(self): |
10 | print("2 Hello World!") |
kristofer / Git Tricks
最後活躍
For re-doing the repo, to take into account your changes to the .gitignore
Remove Stuff that should ignored.
The series of commands below will remove all of the items from the Git Index (not from the working directory or local repo), and then updates the Git Index, while respecting git ignores. PS. Index = Cache
First:
git rm -r --cached .
kristofer / Highlight Code for Keynote
最後活躍
Highlight Code for Keynote
https://gist.github.com/jimbojsb/1630790
https://medium.com/@bucknall/tricks-for-presenting-code-in-keynote-72f11a1524c2
highlight -O rtf my file.py | pbcopy