# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3 (ipykernel)
#     language: python
#     name: python3
# ---



import syft as sy
import numpy as np
from syft.core.adp.entity import DataSubject

# Instantiate Domain Object & DataSubject
ishan = DataSubject(name="Ishan")
uk = sy.login(email="<EMAIL>", password="<PASSWORD>", port=8081)

uk.store.pandas

data = np.random.rand(1, 10)
private_tensor = sy.Tensor(data).private(0, 10, entity=ishan).tag("private")
print(private_tensor)

priv_ptr = private_tensor.send(uk)

uk.store.pandas



private_autograd_tensor = priv_autograd_ptr.get()

private_autograd_tensor

y = private_tensor + private_tensor

y

new_acc = sy.core.adp.adversarial_accountant.AdversarialAccountant()
y.publish(acc=new_acc, sigma=0.1)

uk.store.pandas

public_tensor = sy.Tensor(np.random.randn(1, 3) * 10).tag("Fresh Public Data")
public_tensor

ag_ptr = uk.store['autograd']

ag_tensor = ag_ptr.get()

ag_tensor

ag_tensor + public_tensor

ag_tensor * public_tensor

y = sy.core.adp.publish.publish(private_tensor + private_tensor, acc=new_acc, sigma=0.1)

uk.domain.id



StarcoderdataJupyterScriptsDedupFiltered