Giter Site home page Giter Site logo

nightmachinery / stochastic Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 0.0 80.3 MB

My Julia megarepo; an infectious disease model, a Poisson picture redrawing filter, a colorful animator of a 2D ising model, and more.

R 0.01% Python 0.01% Julia 0.51% HTML 99.10% Shell 0.01% Jupyter Notebook 0.37%
julia visualization art poisson-process coronavirus coronavirus-analysis sir-model modeling cairo ising-model

stochastic's Introduction

My Julia Megarepo

This repository contains my simulation course exercises and other experimentations. I am generally using it as my Julia scratchpad. I’ll refactor out some of its parts when I should have the time.

The things of interest in it currently include:

An elaborate infectious disease model (which is remarkable in that it runs in a continuous mode, unlike most simulations that run in discrete steps)

Quickstart: The Infectious Disease Model

You need Julia v1.5 installed. You can copy my environment from this commit. The .julia directory needs to be in your HOME directory (i.e., at ~/.julia).

The model was tested with this commit, though I recommend just using the latest commit. Do not use the readme from that commit, always use the latest master commit for the readme.

  • Go to the project directory: cd ./project/
  • Start a Julia REPL: julia
  • Source the code: include("./prj.jl")
  • Now you can run the models. There are a few sample runs with the command that runs them in the project’s Telegram channel, since Github doesn’t show videos. I have also included a few screenshots below.

Screenshots

withMW(m3_2_1,0.2; discrete_opt=1//24, visualize=true, c=100, initialPeople=gp_H_dV, isolationProbability=0.9, smallGridMode=0, daysInSec=1, simDuration=3000, tracking=true)

See the full video.

readme.org_imgs/20200817_170159_YrPf7a.png

readme.org_imgs/20200817_170215_9mnH1i.png

withMW(m3_1_2,0.2; discrete_opt=1//24, visualize=true, c=500, isolationProbability=0.3, smallGridMode=10, daysInSec=10, simDuration=1500, tracking=true)

See full video.

readme.org_imgs/mpv-shot0001.jpg

readme.org_imgs/20200817_170448_0pvUbq.png

A happily-colored ising model

The code is at exercises/ising.jl. The generated pictures and videos are at art/ising/.

readme.org_imgs/ising_d4.mp4

art/ising/d4_rev.png

art/ising/intense_pink.png

An image redrawing filter using Poisson processes

The code needs refactoring, it’s currently at line 108, @plot drawP2D(G=(λ) -> imgrate …. You can see examples at art/2d/. Most generated files have the code that generated them as their filename, or in a companion file with the same name as them. These code fragments might still have used an older API or a global variable, so they might not be copy-pasteable.

readme.org_imgs/20200817_181209_T1fIpC.png

readme.org_imgs/20200817_181229_8ZwVZQ.png

readme.org_imgs/20200817_181039_EHCgcR.png

readme.org_imgs/20200817_182034_zli1Dr.png

readme.org_imgs/20200817_180422_Ps0b2O.png

readme.org_imgs/20200817_180544_HUj7eO.png

Misc stuff

You can generally browse art/ to see some stuff generated here.

art/S2.png

art/photo_2020-04-26_02-58-12.jpg

art/S1_Eye_C1.png

art/photo_2020-04-26_02-58-21.jpg

art/stair/seismic.png

art/triangles/flag.png

art/photo_2020-04-26_02-58-17.jpg

Licenses

Dual-licensed under MIT and GPL v3 or later. The generated media are also licensed under CC0.

stochastic's People

Contributors

batbone avatar nightmachinery avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.