Skip to content

Commit

Permalink
Update workflow version
Browse files Browse the repository at this point in the history
  • Loading branch information
adonm authored Feb 22, 2024
1 parent ff0b2c2 commit 80bc12a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Upload to pages branch
uses: fastai/workflows/quarto-ghp@master
with:
version: '3.10'
version: '3.11'
- name: npm build
run: npm install && npm run build
- name: npm release upload
Expand Down
2 changes: 1 addition & 1 deletion nbdev_squ/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.2.7"
__version__ = "1.3.0"
12 changes: 6 additions & 6 deletions nbdev_squ/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
'atlaskit_transformer', 'security_incidents', 'security_alerts']

# %% ../nbs/01_api.ipynb 3
import pandas, json, logging, time, requests, httpx_cache
import pandas, json, logging, time, requests, httpx_cache, io
from .core import *
from diskcache import memoize_stampede
from subprocess import run, CalledProcessError
Expand Down Expand Up @@ -61,7 +61,7 @@ def tio(self):

clients = Clients()

# %% ../nbs/01_api.ipynb 9
# %% ../nbs/01_api.ipynb 13
@memoize_stampede(cache, expire=60 * 60 * 3) # cache for 3 hours
def list_workspaces(fmt: str = "df", # df, csv, json, list
agency: str = "ALL"): # Agency alias or ALL
Expand All @@ -83,7 +83,7 @@ def list_workspaces(fmt: str = "df", # df, csv, json, list
else:
raise ValueError("Invalid format")

# %% ../nbs/01_api.ipynb 13
# %% ../nbs/01_api.ipynb 17
@memoize_stampede(cache, expire=60 * 60 * 3) # cache for 3 hours
def list_subscriptions():
return pandas.DataFrame(azcli(["account", "list"]))["id"].unique()
Expand Down Expand Up @@ -174,7 +174,7 @@ def query_all(query, fmt="df", timespan=pandas.Timedelta("14d")):
else:
raise ValueError("Invalid format")

# %% ../nbs/01_api.ipynb 16
# %% ../nbs/01_api.ipynb 20
columns_of_interest = benedict({
"name": ['AADEmail', 'AccountName', 'AccountUPN', 'AccountUpn', 'Account', 'CompromisedEntity', 'DestinationUserName',
"Computer", "DisplayName", "EmailSenderAddress", "FileName", 'FilePath', "FolderPath", 'FullyQualifiedSubjectUserName', 'InitiatingProcessAccountUpn',
Expand Down Expand Up @@ -234,7 +234,7 @@ def hunt(indicators, expression="has", columns=columns, workspaces=None, timespa
else:
raise Exception("No results found!")

# %% ../nbs/01_api.ipynb 18
# %% ../nbs/01_api.ipynb 22
def atlaskit_transformer(inputtext, inputfmt="md", outputfmt="wiki", runtime="node"):
import nbdev_squ
transformer = dirs.user_cache_path / f"atlaskit-transformer.bundle_v{nbdev_squ.__version__}.js"
Expand All @@ -248,7 +248,7 @@ def atlaskit_transformer(inputtext, inputfmt="md", outputfmt="wiki", runtime="no
except CalledProcessError:
run(cmd, input=inputtext, text=True, check=True)

# %% ../nbs/01_api.ipynb 21
# %% ../nbs/01_api.ipynb 25
def security_incidents(start=pandas.Timestamp("now", tz="UTC") - pandas.Timedelta("1d"), timedelta=pandas.Timedelta("1d")):
# Queries for security incidents from `start` time for `timedelta` and returns a dataframe
# Sorts by TimeGenerated (TODO)
Expand Down

0 comments on commit 80bc12a

Please sign in to comment.