Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
P
PHY571 Birds flocking
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Quentin LOUIS
PHY571 Birds flocking
Commits
81228b9d
Commit
81228b9d
authored
Nov 13, 2018
by
Amaury BARRAL
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
load 100Mb at a time
parent
0994807d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
Amaury/God/SaveAndLoad.py
Amaury/God/SaveAndLoad.py
+2
-2
No files found.
Amaury/God/SaveAndLoad.py
View file @
81228b9d
...
...
@@ -9,9 +9,9 @@ from God.Bird import Bird
from
God.Pandora
import
NumpyEncoder
from
God.Sky
import
Sky
def
read_in_chunks
(
file_object
,
chunk_size
=
1024
):
def
read_in_chunks
(
file_object
,
chunk_size
=
1024
*
1000
*
100
):
"""Lazy function (generator) to read a file piece by piece.
Default chunk size: 1
k
."""
Default chunk size: 1
00M
."""
while
True
:
data
=
file_object
.
read
(
chunk_size
)
if
not
data
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment