Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
oribarilan committed Dec 22, 2023
1 parent b7bfe70 commit 6f9712d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@ from fliq import q
repos = requests.get('https://api.github.com/search/repositories?q=stars:>1&sort=stars&per_page=100').json()['items']

# get the language for each repo
languages = q(repos).select(lambda r: r['language'])
languages = q(repos).select(lambda r: r['language']).where(lambda l: l is not None)

# peek to see a language, without removing it from the query
peeked_language = languages.peek()

print(f"Here's a peek at the languages: {peeked_language}")

# count popularity of each language
popular_languages = Counter(languages).most_common()
# count popularity of each language using Counter (that accepts an iterable)
popular_languages = Counter(languages).most_common(n=6)
print(f"Here are the most popular programming languages: {popular_languages} 💪🧪🔍")

# [('JavaScript', 16), ('TypeScript', 15), ('Python', 13), (None, 13), ('C', 5), ('Java', 5) ...]
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/code_api/materializer_methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
::: fliq.query.Query
options:
filters: [
"^__contains__$", "^__eq__$", "^__repr__$", "^_validate_partition_index$", "^aggregate$", "^all$", "^any$", "^contains$", "^count$", "^equals$", "^first$", "^first_or_default$", "^max$", "^min$", "^partition$", "^peek$", "^sample$", "^single$", "^single_or_default$", "^sum$", "^to_dict$", "^to_list$"
"^__contains__$", "^__eq__$", "^__repr__$", "^_validate_partition_index$", "^aggregate$", "^all$", "^any$", "^contains$", "^count$", "^equals$", "^first$", "^first_or_default$", "^max$", "^min$", "^sample$", "^single$", "^single_or_default$", "^sum$", "^to_dict$", "^to_list$"
]

0 comments on commit 6f9712d

Please sign in to comment.