{ "cells": [ { "cell_type": "markdown", "id": "234abc10", "metadata": {}, "source": [ "# External server example" ] }, { "cell_type": "markdown", "id": "1c29c15c", "metadata": {}, "source": [ "This notebook shows you how to upload a dataset on your own server , as long as you add your server on MorphoNet website : https://morphonet.org/distantservers\n", "\n" ] }, { "cell_type": "code", "execution_count": 1, "id": "0eb38aea", "metadata": {}, "outputs": [], "source": [ "import morphonet" ] }, { "cell_type": "code", "execution_count": null, "id": "f04d83b4", "metadata": {}, "outputs": [], "source": [ "#try correct connextion\n", "mn_login=\"login\"\n", "mn_password=\"password\"\n", "mn=morphonet.Net(mn_login,mn_password)\n", "\n", "datasetname=\"MyExternalData\"" ] }, { "cell_type": "markdown", "id": "76789ab8", "metadata": {}, "source": [ "delete previous dataset\n", "\n" ] }, { "cell_type": "code", "execution_count": null, "id": "acbdfe97", "metadata": {}, "outputs": [], "source": [ "mn.select_dataset_by_name(datasetname)\n", "if mn.id_dataset!=-1:\n", "\tmn.delete_dataset()\n" ] }, { "cell_type": "markdown", "id": "4bb7135d", "metadata": {}, "source": [ "create a new dataset on a sever your previously created \n", "\n" ] }, { "cell_type": "code", "execution_count": null, "id": "a1a51e59", "metadata": {}, "outputs": [], "source": [ "mn.create_dataset(datasetname,serveradress=\"server.address.com\")\n", "\n", "obj=mn.read_mesh(\"DATASET/Astec-Pm1_post_t001.obj\")" ] }, { "cell_type": "markdown", "id": "80ff2128", "metadata": {}, "source": [ "upload the mesh on your server, but for the dataset\n" ] }, { "cell_type": "code", "execution_count": null, "id": "69f79df2", "metadata": {}, "outputs": [], "source": [ "mn.upload_mesh_at(0,obj)" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "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.7" } }, "nbformat": 4, "nbformat_minor": 5 }