IIabm/test.ipynb

72 lines
1.3 KiB
Plaintext

{
"cells": [
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"85\n",
"63\n",
"51\n",
"26\n",
"30\n",
"4\n",
"7\n",
"1\n",
"17\n",
"81\n"
]
}
],
"source": [
"import numpy as np\n",
"\n",
"np.random.randint(0.5, 3.5)\n",
"p_remove = 1\n",
"np.random.choice([True, False], p=[p_remove, 1-p_remove])\n",
"rng = np.random.default_rng(0)\n",
"for _ in range(10):\n",
" print(rng.integers(0,100))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "base",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.13"
},
"orig_nbformat": 4,
"vscode": {
"interpreter": {
"hash": "bcdafc093860683ffb58d6956591562b7f8ed5d58147d17d71a5d4d6605a08df"
}
}
},
"nbformat": 4,
"nbformat_minor": 2
}