Programming Leftovers
-
Jacob Nowosad ☛ Optimizing the parameters of the spatial kinetic Ising model to simulate spatial patterns
The spatial kinetic Ising model is a simple model of spatial patterns that can be used to simulate the evolution of spatial patterns over time. Its two main parameters are B and J, which control the external pressure and the local autocorrelation tendency, respectively. Both of them have a strong effect on the results of the spatial kinetic Ising model. Thus, the question is how to find the best values of these parameters for a given situation.
This blog post shows how to use the simulated annealing algorithm to find the best values of B and J that minimize the difference between the metrics of the expected map and the metrics of the last simulation.
-
Anton Zhiyanov ☛ In-browser code playgrounds
Typically, a code playground consists of a client-side widget and a server-side part that executes the code and returns the result: [...]
-
Nicholas Tietz-Sokolsky ☛ TIL: enabling features on transitive dependencies (Rust)
While pairing on a small Rust program with a friend, I ran into a problem: to compile to WASM, one of my dependencies needed one of its dependencies to turn on a feature. A variation of this that I've run into in other projects is where a transitive dependency has a bug/CVE and I want to upgrade it. So what do you do if a transitive dependency is giving you grief?
-
Python
-
XDA ☛ How to use Jupyter Notebook on Windows, Linux, and macOS
However, to make the most of Python, you need to be familiar with the concept of Jupyter Notebook, which is a user-friendly, open-source web application that lets you write, execute, and share Python code interactively. In this guide, we’ll teach you how to install and create your first notebook.
-