Skip to content

Commit

Permalink
general updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
djl11 committed Feb 22, 2025
1 parent 2132d9a commit d865123
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 7 deletions.
52 changes: 52 additions & 0 deletions demo_testing/10x_engineers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import unify
unify.activate("10x_engineers")
import random
from datetime import datetime, timedelta

num_employees = 20
ages = [
random.randint(20, 50)
for _ in range(num_employees)
]
catchphrases = random.choices(
[
"hello... friend",
"hell no",
"did you ask o3?",
"will do it tomorrow",
"ask the intern",
],
k=num_employees,
)
last_logins = [
(datetime.now() - timedelta(
days=random.randint(0, 5)
)).isoformat()
for _ in range(num_employees)
]
open_task_progress = [
{
task: random.random()
for task in random.sample(
[
"add NextJS loader",
"SQL migration",
"refactor life",
],
random.randint(0, 3),
)
}
for _ in range(num_employees)
]

for age, catchphrase, last_login, otp in zip(
ages, catchphrases, last_logins, open_task_progress
):
unify.log(
age=age,
how_10x=random.random()*10,
catchphrase=catchphrase,
last_login=last_login,
open_task_progress=otp,
will_to_live=random.choice([True, False]),
)
13 changes: 6 additions & 7 deletions interfaces/tables.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Rows are sorted in the order of the column sorts. For example, sorting by column

<img class="dark-light" width="100%" src="https://raw.githubusercontent.com/unifyai/unifyai.github.io/refs/heads/main/img/externally_linked/sorting_dark.gif"/>

### With Grouping [Coming Soon! 🚧]
### With Grouping [🚧]

When grouping is applied, the contents of each group are sorted as usual.
However, the groups themselves are *also* sorted based on the reduction metric that is set in the bottom left.
Expand All @@ -119,7 +119,7 @@ So far, everything we've considered has been about *viewing* data.
Filtering enables you to *select* a subset of the data that you want to view.
Each column type has a different set of filter options.

Let's consider the following data for self-proclaimed "10x" engineers:
Let's consider the following data for self-proclaimed "10x" engineers on the team:

```python
num_employees = 20
Expand Down Expand Up @@ -192,7 +192,7 @@ Everything else is column specific.

- `==`, `!=`, `>`, `>=`, `<`, `<=`: standard comparison operators

GIF
<img class="dark-light" width="100%" src="https://raw.githubusercontent.com/unifyai/unifyai.github.io/refs/heads/main/img/externally_linked/table_numeric_filtering_dark.gif"/>

### DateTime

Expand All @@ -216,15 +216,15 @@ GIF

GIF

### Groups [Coming Soon 🚧]
### Groups [🚧]

Groups can also be directly filtered. This is useful if you want to select a specific subset of experiments, for example.
The group filtering is applied *independently* to the standard column-wise filtering.
If you want to propagate the group filters to the columns filters, you can simply press "propagate" in the group filter dropdown.

{/* GIF */}

### Global [Coming Soon 🚧]
### Global [🚧]

Filters at the column level apply the filter directly to that column, and each column filter is effectivrely stitched together with an `AND` operator.
However, you can write your own expressive filter expressions by the global filter, using basic Python syntax, using the column names as variable names.
Expand Down Expand Up @@ -265,8 +265,7 @@ Filtering, grouping, and sorting all work on derived columns, just like any othe

GIF


## Joins [Coming Soon 🚧]
## Joins [🚧]

We will soon support creating new tables by joining existing ones πŸ”—

Expand Down

0 comments on commit d865123

Please sign in to comment.