You are browsing as a guest. Sign up (or log in) to start making projects!

Bishopviz

  • 4 Devlogs
  • 8 Total hours

Drunken bishop algorithm implementation with data visualization and other things.

Ship #1 Changes requested

PLEASE TRY BOTH THE CLI APP (https://pypi.org/project/bishopviz/) AND THE WEBSITE (https://bishopviz.streamlit.app/)

I made bishopviz, an implementation of the Drunken Bishop Algorithm to generate randomart (like in ssh-keygen!) from (md5 hashes of) text, videos, images, etc. This project can be used as both a CLI app and as a web app. The web app has many cool data visualizations.

  • 4 devlogs
  • 8h
Try project → See source code →
Open comments for this post

1h 37m 48s logged

I’ve recorded a demo, published it on BOTH Streamlit and Pypi, fixed any bugs, and added a file input option. I think I’m ready to ship.

0
0
8
Open comments for this post

1h 56m 11s logged

I think I’m done with the data part. Lowk, it looked better in my head, but this was more of a practice in Streamlit and plotly than actual data analysis. I wanted to make it so that there was just an option in the CLI and then users could put it to start the server and visualize the data they just put the option. Unfortunately, due to the way Streamlit works, I just made it a separate app. This way users can launch the command from the cli and it can also be deployed as a standalone app.

0
0
5
Open comments for this post

2h 45m logged

I’ve got a lot of the cosmetic stuff done.

I moved the algorithm into its own class, which overall made it easier to track certain variables like its position. For the animate option (next paragraph) I had to make a move function that ran 1 generation of the algorithm, so that I could print between frames.

I made an animate option that takes in an amount of seconds and then displays an animation as the bishop moves. The only complicated part about this is that it uses an escape code to move the cursor back up, so as to give the illusion that the same printed text is moving.

I made a character set option and then got ChatGPT to generate some character sets. These follow the convention set by the actual algorithm, in which it’s just 17 characters, with 0 being empty, 15 being the start, and 16 being the ending position. I also added a bishop key so that during the animation it would show where the bishop was. To accomodate the Katakana and emoji options (I didn’t show Katakana but the emojis do show it), I had to modify the draw function to double the width of the graph. It’s still 17, just getting printed as 34 or so.

I got colors too. I just made the same dictionary as a character set but with the color names (I’m using click for the CLI, and it has an API for coloring text) as the values. I then modified the draw function to use the value of the dictionary at the key corresponding to the tile as the foreground if the colorize option was enabled.

Overall, the project has turned out pretty nice, and I will be working on the data visualization part next!

0
0
6
Open comments for this post

1h 23m 47s logged

I got the algorithm working, so that’s pretty much half the project done. I wrote the draw function with a character set argument, so that it is possible in the future to change what characters it uses.

0
0
34

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…