Skip to content

Instantly share code, notes, and snippets.

View pitmonticone's full-sized avatar

Pietro Monticone pitmonticone

View GitHub Profile
@RaphaelS1
RaphaelS1 / Documentation.yml
Last active September 19, 2022 05:35
Workflow to check if all objects in Julia package documented as expected.
name: Documentation
on:
push:
branches:
- main
- master
tags: '*'
pull_request:
@seabbs
seabbs / epinow2-covid-rt-national.R
Last active June 25, 2023 08:02
Example of using EpiNow2 to estimate the Rt of Covid-19 in last 3 months for a country in the WHO dataset. See the documentation for more details and examples of producing estimates for subregional areas: https://epiforecasts.io/EpiNow2/
# packages
# install.packages(c("data.table", "remotes", "EpiNow2"))
library(data.table)
library(EpiNow2)
library(covidregionaldata)
# target country (must be present in ECDC data)
country <- "france"
# set number of cores to use fitting the model
A=140,E=11,E&F=28,C=57,C&F=179,C&F&A=259,C&F&A&E=69,C&F&E=54,S&F=10,S&F&C=22,S&F&C&A=26,S&F&C&A&D=18,S&F&C&A&E=17,S&F&C&A&E&D=23,S&F&C&E=11,S&F&C&E&D=8,S&F&C&D=7,C&S=1,S=5,F&D=43,F&D&A=64,F&D&A&C=41,F&D&A&C&E=50,F&D&A&E=17,F&D&C&E=17,F&D&E=12,F&C&D=31,C&D=7,D=12,A&F=281,E&F&A=46,F=198
@jg-you
jg-you / draw_nx_beautiful.py
Last active October 30, 2022 00:04
Beautiful networkx graph
import copy
import networkx
import matplotlib.pyplot as plt
# Generate a graph.
# Here I chose an ER graph.
g = nx.erdos_renyi_graph(20, 0.3)
# Get positions.
# Here I use the spectral layout and add a little bit of noise.
@lukas-h
lukas-h / license-badges.md
Last active April 17, 2024 14:06
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.

Translations: (No guarantee that the translations are up-to-date)