-
Notifications
You must be signed in to change notification settings - Fork 4
Add request size check #82
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
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
c158024
Add size check
ijufumi 5e1797e
Change to actual size.
ijufumi a00bc7f
Minus size for extra information.
ijufumi 195d8f4
Update comment
ijufumi adff32e
Merge branch 'develop' into bugfix/789-limitation-size
ijufumi cb999df
Fixed calculate method of length.
ijufumi bf5ede8
Add description of API limitation
ijufumi 1bc60d8
Modify to use json for calculation length
ijufumi 26e2614
Add limitation to README.md.
ijufumi 560e7f5
Change limitation of video.
ijufumi 63d7ae5
fix conflict and readme
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,7 @@ | |
| import base64 | ||
| import numpy as np | ||
| import geojson | ||
| import json | ||
| from typing import List | ||
|
|
||
|
|
||
|
|
@@ -15,7 +16,7 @@ def is_image_supported_ext(file_path: str) -> bool: | |
|
|
||
|
|
||
| def is_video_supported_ext(file_path: str) -> bool: | ||
| return file_path.lower().endswith(('.mp4')) | ||
| return file_path.lower().endswith('.mp4') | ||
|
|
||
|
|
||
| def get_basename(file_path: str) -> str: | ||
|
|
@@ -44,13 +45,14 @@ def reverse_points(points: List[int]) -> List[int]: | |
| 0, points[index]) | ||
| return reversed_points | ||
|
|
||
|
|
||
| def is_clockwise(points: list) -> bool: | ||
| """ | ||
| points: [x1, y1, x2, y2, x3, y3, ... xn, yn] | ||
| Sum over the edges, (x2 − x1)(y2 + y1). | ||
| Sum over the edges, (x2 − x1)(y2 + y1). | ||
| If the result is positive the curve is clockwise, if it's negative the curve is counter-clockwise. | ||
| The above is assumes a normal Cartesian coordinate system. | ||
|
|
||
| The above is assumes a normal Cartesian coordinate system. | ||
| HTML5 canvas, use an inverted Y-axis. | ||
| Therefore If the area is negative, the curve is clockwise. | ||
| """ | ||
|
|
@@ -65,4 +67,10 @@ def is_clockwise(points: list) -> bool: | |
|
|
||
| if sum_edges < 0: | ||
| return True | ||
| return False | ||
| return False | ||
|
|
||
|
|
||
| def get_json_length(value) -> int: | ||
|
Contributor
Author
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. 前に書いていた処理は長さではなくメモリサイズを計算していたので修正しました。 |
||
| json_str = json.dumps(value) | ||
| return len(json_str) | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.