-
Notifications
You must be signed in to change notification settings - Fork 0
test #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test #25
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,10 @@ | ||
| import duckdb | ||
| import duckdb | ||
|
|
||
| duckdb.sql("SELECT 42 FROM data/2026-01-14/hey.parquet") | ||
| df = duckdb.read_parquet("../2026-01-14/hey.parquet") | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The file path |
||
|
|
||
| duckdb.sql("DESCRIBE SELECT * FROM df").show() | ||
|
|
||
| duckdb.sql("SELECT language, COUNT(language) AS c_p \ | ||
| FROM df \ | ||
| GROUP BY language \ | ||
| ORDER BY c_p DESC").show() | ||
|
Comment on lines
+7
to
+10
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For multi-line strings, especially for something like an SQL query, using triple quotes ( For example: duckdb.sql("""
SELECT language, COUNT(language) AS c_p
FROM df
GROUP BY language
ORDER BY c_p DESC
""").show()References
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The file is missing a newline character at the end. It's a common convention (and a POSIX standard) to end files with a newline. This can prevent issues with file concatenation and some command-line tools. PEP 8 also recommends this. References
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -123,15 +123,14 @@ def get_github_data(self, start_in_repo_num: int = 0, batch_size: int = 500, git | |||||
|
|
||||||
| except Exception as validation_error: | ||||||
| print(f"Validation error for repo {github_data_points.get('full_name')}: {validation_error}") | ||||||
| print("Skipping this repo and continuing...") | ||||||
| print("Skipping this repo and continuing") | ||||||
| continue | ||||||
|
|
||||||
| remaining_api_calls = github_instance.rate_limiting | ||||||
| remaining = remaining_api_calls[0] | ||||||
|
|
||||||
| if remaining_api_calls == 1: | ||||||
| if remaining == 2: | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using
Suggested change
|
||||||
| print(f"Reached batch size limit of {batch_size}") | ||||||
|
|
||||||
| break | ||||||
|
|
||||||
| # # start_in_repo_num = counter | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a trailing whitespace on this line. It's good practice to remove it to maintain a clean and consistent code style, as recommended by PEP 8.
References