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

# + [markdown] id="view-in-github" colab_type="text"
# <a href="https://colab.research.google.com/github/Tradingmouse/public-computing-space/blob/main/arrays.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>

# + id="yUpZYjqMpDjx"
#comparison opperators  is used for mathmetics as example greater then or smaller then


import numpy as np
import pandas as pd
import math 

# + colab={"base_uri": "https://localhost:8080/"} id="R6EfVdiup-P3" outputId="405d96fd-3687-436c-c6e2-a44e2b7695c1"
1 < 3

# + colab={"base_uri": "https://localhost:8080/"} id="S4pWkyJiqCXr" outputId="7a9d7090-c98b-406b-fa56-5ba3265b0b3c"
1 > 3

# + colab={"base_uri": "https://localhost:8080/"} id="v-gR67M9qE1j" outputId="3891b964-0cd3-426f-8772-cc0a57cda5c4"
1 <= 3

# + colab={"base_uri": "https://localhost:8080/"} id="z7QgNhx6qKEW" outputId="01a9a695-ad49-4f20-fa61-1c3001857545"
1 == 1

# + colab={"base_uri": "https://localhost:8080/"} id="9LLJdT-aqUkQ" outputId="ebb5eee6-0ccb-4b33-eb28-09e7a0143d98"
1 != 1

# + colab={"base_uri": "https://localhost:8080/"} id="lM8W58r4qZ4a" outputId="16c116bd-cadd-4d8a-f06f-902e6b53246c"
"string" == 'string'

# + colab={"base_uri": "https://localhost:8080/"} id="QL2kqcWYqjC0" outputId="8f476432-93c2-4ec2-849c-86ca7d187d06"
1 == "1"

# + id="0mY303OtqlQX"
#logic opperators

# + colab={"base_uri": "https://localhost:8080/"} id="jFPor1xpqxDT" outputId="ba406800-fe34-4583-bfbf-98353d4b1dc0"
(1==3) and (1==1)

# + colab={"base_uri": "https://localhost:8080/"} id="YpkZ-ipZq1ok" outputId="4f0d56c2-4160-4e11-f184-66500c5aa26a"
(1==3) or (1==1) 

# + colab={"base_uri": "https://localhost:8080/"} id="Lb3uKL0nq7_t" outputId="92bb5101-cb41-4a08-c695-0f7b7c5b8a1e"
(1==1) and not (1==2)  

# + id="kvcP7fmwrJVr"
#el if elif statement = controleflow 

# + colab={"base_uri": "https://localhost:8080/"} id="-MxplgLfrPZQ" outputId="498ecfb9-73ff-4075-e4c6-6d3e10a157f6"
if True:
  print ("hello world")

# + id="naHBgckurZSx"
if False:
  print ("hello world")

# + colab={"base_uri": "https://localhost:8080/"} id="p9VZnjF7rckl" outputId="f7f81ce0-f434-4b93-f1f5-c8817c167416"
if (1==1):
  print ("hello darkness my old friend")

# + id="3CjF9zh0rpDK"
if (1==2):
  print ("hello darkness my old friend")

# + id="zsqpkLLcrrXL"
import math 

# + colab={"base_uri": "https://localhost:8080/"} id="n76K9su8K-d3" outputId="4dcce674-5775-4b38-af6f-872ad5de61a5"
print(math.sqrt(300))  

# + id="5BVjqgpQLGMI"
import numpy as np

# + id="3Pn0JItzLXU6"
my_list = [1,2,3]

# + colab={"base_uri": "https://localhost:8080/"} id="AhTHhCOIMlJN" outputId="26d5d020-b2d0-4354-912d-9926cd30f8e8"
x = np.array(my_list)

type (x)

# + id="EQuaElSaNUEb"


# + id="cj-Bu2OGMuVr"
my_matrix = [[1,2,3], [4,5,6],[7,8,9]]

# + colab={"base_uri": "https://localhost:8080/"} id="CT6uAHFxM0DF" outputId="525e9d2d-1d80-4b10-d9b8-e9e3c34cf82c"
np.array(my_matrix)

# + colab={"base_uri": "https://localhost:8080/"} id="gcdUR_v8NYLD" outputId="d5cc3d4b-6576-4646-dc0e-13815bd1efcc"
list(range(0,5))
np.arange(0,5)


# + colab={"base_uri": "https://localhost:8080/"} id="jea2iYmWNrov" outputId="55c2d7af-e26a-4bb6-91f0-14844ceb394e"
np.arange (0,11,2)

# + colab={"base_uri": "https://localhost:8080/"} id="dCm5_j20OAMO" outputId="e80ef0f6-3cb9-4167-fcf7-3e74efbd85fe"
np.zeros(10)

# + colab={"base_uri": "https://localhost:8080/"} id="JKlNXsIiOK5J" outputId="f963bd9c-11a1-4a1d-97ad-93893423013b"
type(1)
type (1.0)

# + colab={"base_uri": "https://localhost:8080/"} id="1Rm7RumbOQPY" outputId="3703e94e-9855-400d-cb9f-f3cdffd2d350"
np.zeros((5,5))

# + colab={"base_uri": "https://localhost:8080/"} id="FOsjydTmO8g8" outputId="d66b6cd2-3db4-4949-a4b8-4fd95034643b"
np.random.rand(5)

# + [markdown] id="8AJOi-xOU2So"
#

# + colab={"base_uri": "https://localhost:8080/"} id="2BQm9KlXUlM4" outputId="70a09f9b-000e-4cd0-814d-de27ba6bfc2e"
np.random.rand(5,4) # every number have eq chance to get picked

# + colab={"base_uri": "https://localhost:8080/"} id="g7BiSW-uVAMu" outputId="b9e8f746-3756-43f9-c865-5c6f0f4b04d8"
np.random.randn(5,3)

# + colab={"base_uri": "https://localhost:8080/"} id="T1N3g_ypVgvc" outputId="ef444e17-296b-49b9-ca41-936229eeebe2"
np.random.randint(0,100)


# + colab={"base_uri": "https://localhost:8080/", "height": 165} id="LkF9UoyWV9A_" outputId="89fde054-35a1-4edc-fbed-78fda9338302"
np.array.reshape(5,6)

# + id="-ALdFo_uXVhG" colab={"base_uri": "https://localhost:8080/", "height": 165} outputId="8c4d1f69-3aca-4f43-fd7c-bd2e92ecc82d"
np.exp(arr)

# + colab={"base_uri": "https://localhost:8080/"} id="AKq6kZuGB2t5" outputId="ffb657be-730d-40a8-bf9e-0d59d293180f"
list(range(0,10,2))

# + colab={"base_uri": "https://localhost:8080/"} id="KNjEKrXpDhum" outputId="87b6a479-a5ae-4880-8708-f5b84bc060c2"
np.zeros((3,3))

# + colab={"base_uri": "https://localhost:8080/"} id="wF0BY2umDt5c" outputId="fcc83bff-a6b6-4e46-d15d-16976a62665c"
np.ones((420,69))

# + colab={"base_uri": "https://localhost:8080/"} id="LC0WeU9EEEVa" outputId="9626a24c-8b70-487f-d1a2-caecfd6a431d"
np.eye(4)  

# + colab={"base_uri": "https://localhost:8080/"} id="wVxsTTjeEiHu" outputId="00a32c1a-45ec-45e4-f2cd-68ab39d09a98"
np.random.rand(5,4)


# + colab={"base_uri": "https://localhost:8080/"} id="qcwlFa0XExP4" outputId="4e6e8c14-7e67-44ca-bff7-de7329f84d44"
np.random.randn(5,4)

# + colab={"base_uri": "https://localhost:8080/", "height": 165} id="TkF6dTlRFODG" outputId="86d85da9-37dc-4cbb-9ded-485b54cd228e"
ranarr.agrim()

# + colab={"base_uri": "https://localhost:8080/", "height": 182} id="3RuluAhVHnzO" outputId="9768ded7-f2f0-4370-de55-a69d16367f37"
np.max(np.array)
arr.max()

# + id="Q2HpGZEMIr8H"


StarcoderdataJupyterScriptsDedupFiltered