Gitignored.ipynb (83 lines of code) (raw):
{
"metadata": {
"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.8.5-final"
},
"orig_nbformat": 2,
"kernelspec": {
"name": "Python 3.8.5 64-bit",
"display_name": "Python 3.8.5 64-bit",
"metadata": {
"interpreter": {
"hash": "1ee38ef4a5a9feb55287fd749643f13d043cb0a7addaab2a9c224cbe137c0062"
}
}
}
},
"nbformat": 4,
"nbformat_minor": 2,
"cells": [
{
"cell_type": "code",
"execution_count": 15,
"metadata": {
"tags": []
},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": "{'a': 'b'}\nhello_a_b\n"
}
],
"source": [
"def cross_scala_library(name,cross_build,**kwargs):\n",
" for cross in cross_build:\n",
" suffix = \"_\".join([key + \"_\" + value for key, value in cross.items()])\n",
" yield cross, name + \"_\" + suffix\n",
"\n",
"for a, b in cross_scala_library(\"hello\", [{\"a\": \"b\"}]):\n",
" print(a)\n",
" print(b)\n"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": "'a12'"
},
"metadata": {},
"execution_count": 17
}
],
"source": [
"d = {\n",
" \"b\": \"1\",\n",
" \"c\": \"2\"\n",
"}\n",
"\"a{b}{c}\".format_map(d)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
]
}